1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for gettext-tools 0.21.
4#
5# Report bugs to <bug-gettext@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
203  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
204    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
205    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207    PATH=/empty FPATH=/empty; export PATH FPATH
208    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
209      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210  if (eval "$as_required") 2>/dev/null; then :
211  as_have_required=yes
212else
213  as_have_required=no
214fi
215  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216
217else
218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219as_found=false
220for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221do
222  IFS=$as_save_IFS
223  test -z "$as_dir" && as_dir=.
224  as_found=:
225  case $as_dir in #(
226	 /*)
227	   for as_base in sh bash ksh sh5; do
228	     # Try only shells that exist, to save several forks.
229	     as_shell=$as_dir/$as_base
230	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  CONFIG_SHELL=$as_shell as_have_required=yes
233		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234  break 2
235fi
236fi
237	   done;;
238       esac
239  as_found=false
240done
241$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243  CONFIG_SHELL=$SHELL as_have_required=yes
244fi; }
245IFS=$as_save_IFS
246
247
248      if test "x$CONFIG_SHELL" != x; then :
249  export CONFIG_SHELL
250             # We cannot yet assume a decent shell, so we have to provide a
251# neutralization value for shells without unset; and this also
252# works around shells that cannot unset nonexistent variables.
253# Preserve -v and -x to the replacement shell.
254BASH_ENV=/dev/null
255ENV=/dev/null
256(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257case $- in # ((((
258  *v*x* | *x*v* ) as_opts=-vx ;;
259  *v* ) as_opts=-v ;;
260  *x* ) as_opts=-x ;;
261  * ) as_opts= ;;
262esac
263exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264# Admittedly, this is quite paranoid, since all the known shells bail
265# out after a failed `exec'.
266$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267exit 255
268fi
269
270    if test x$as_have_required = xno; then :
271  $as_echo "$0: This script requires a shell more modern than all"
272  $as_echo "$0: the shells that I found on your system."
273  if test x${ZSH_VERSION+set} = xset ; then
274    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276  else
277    $as_echo "$0: Please tell bug-autoconf@gnu.org and
278$0: bug-gettext@gnu.org about your system, including any
279$0: error possibly output before this message. Then install
280$0: a modern shell, or manually run the script under such a
281$0: shell if you do have one."
282  fi
283  exit 1
284fi
285fi
286fi
287SHELL=${CONFIG_SHELL-/bin/sh}
288export SHELL
289# Unset more variables known to interfere with behavior of common tools.
290CLICOLOR_FORCE= GREP_OPTIONS=
291unset CLICOLOR_FORCE GREP_OPTIONS
292
293## --------------------- ##
294## M4sh Shell Functions. ##
295## --------------------- ##
296# as_fn_unset VAR
297# ---------------
298# Portably unset VAR.
299as_fn_unset ()
300{
301  { eval $1=; unset $1;}
302}
303as_unset=as_fn_unset
304
305# as_fn_set_status STATUS
306# -----------------------
307# Set $? to STATUS, without forking.
308as_fn_set_status ()
309{
310  return $1
311} # as_fn_set_status
312
313# as_fn_exit STATUS
314# -----------------
315# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
316as_fn_exit ()
317{
318  set +e
319  as_fn_set_status $1
320  exit $1
321} # as_fn_exit
322
323# as_fn_mkdir_p
324# -------------
325# Create "$as_dir" as a directory, including parents if necessary.
326as_fn_mkdir_p ()
327{
328
329  case $as_dir in #(
330  -*) as_dir=./$as_dir;;
331  esac
332  test -d "$as_dir" || eval $as_mkdir_p || {
333    as_dirs=
334    while :; do
335      case $as_dir in #(
336      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
337      *) as_qdir=$as_dir;;
338      esac
339      as_dirs="'$as_qdir' $as_dirs"
340      as_dir=`$as_dirname -- "$as_dir" ||
341$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
342	 X"$as_dir" : 'X\(//\)[^/]' \| \
343	 X"$as_dir" : 'X\(//\)$' \| \
344	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
345$as_echo X"$as_dir" |
346    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\/\)[^/].*/{
351	    s//\1/
352	    q
353	  }
354	  /^X\(\/\/\)$/{
355	    s//\1/
356	    q
357	  }
358	  /^X\(\/\).*/{
359	    s//\1/
360	    q
361	  }
362	  s/.*/./; q'`
363      test -d "$as_dir" && break
364    done
365    test -z "$as_dirs" || eval "mkdir $as_dirs"
366  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
367
368
369} # as_fn_mkdir_p
370
371# as_fn_executable_p FILE
372# -----------------------
373# Test if FILE is an executable regular file.
374as_fn_executable_p ()
375{
376  test -f "$1" && test -x "$1"
377} # as_fn_executable_p
378# as_fn_append VAR VALUE
379# ----------------------
380# Append the text in VALUE to the end of the definition contained in VAR. Take
381# advantage of any shell optimizations that allow amortized linear growth over
382# repeated appends, instead of the typical quadratic growth present in naive
383# implementations.
384if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
385  eval 'as_fn_append ()
386  {
387    eval $1+=\$2
388  }'
389else
390  as_fn_append ()
391  {
392    eval $1=\$$1\$2
393  }
394fi # as_fn_append
395
396# as_fn_arith ARG...
397# ------------------
398# Perform arithmetic evaluation on the ARGs, and store the result in the
399# global $as_val. Take advantage of shells that can avoid forks. The arguments
400# must be portable across $(()) and expr.
401if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
402  eval 'as_fn_arith ()
403  {
404    as_val=$(( $* ))
405  }'
406else
407  as_fn_arith ()
408  {
409    as_val=`expr "$@" || test $? -eq 1`
410  }
411fi # as_fn_arith
412
413
414# as_fn_error STATUS ERROR [LINENO LOG_FD]
415# ----------------------------------------
416# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
417# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
418# script with STATUS, using 1 if that was 0.
419as_fn_error ()
420{
421  as_status=$1; test $as_status -eq 0 && as_status=1
422  if test "$4"; then
423    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
424    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
425  fi
426  $as_echo "$as_me: error: $2" >&2
427  as_fn_exit $as_status
428} # as_fn_error
429
430if expr a : '\(a\)' >/dev/null 2>&1 &&
431   test "X`expr 00001 : '.*\(...\)'`" = X001; then
432  as_expr=expr
433else
434  as_expr=false
435fi
436
437if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
438  as_basename=basename
439else
440  as_basename=false
441fi
442
443if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
444  as_dirname=dirname
445else
446  as_dirname=false
447fi
448
449as_me=`$as_basename -- "$0" ||
450$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
451	 X"$0" : 'X\(//\)$' \| \
452	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
453$as_echo X/"$0" |
454    sed '/^.*\/\([^/][^/]*\)\/*$/{
455	    s//\1/
456	    q
457	  }
458	  /^X\/\(\/\/\)$/{
459	    s//\1/
460	    q
461	  }
462	  /^X\/\(\/\).*/{
463	    s//\1/
464	    q
465	  }
466	  s/.*/./; q'`
467
468# Avoid depending upon Character Ranges.
469as_cr_letters='abcdefghijklmnopqrstuvwxyz'
470as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
471as_cr_Letters=$as_cr_letters$as_cr_LETTERS
472as_cr_digits='0123456789'
473as_cr_alnum=$as_cr_Letters$as_cr_digits
474
475
476  as_lineno_1=$LINENO as_lineno_1a=$LINENO
477  as_lineno_2=$LINENO as_lineno_2a=$LINENO
478  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
479  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
480  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
481  sed -n '
482    p
483    /[$]LINENO/=
484  ' <$as_myself |
485    sed '
486      s/[$]LINENO.*/&-/
487      t lineno
488      b
489      :lineno
490      N
491      :loop
492      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
493      t loop
494      s/-\n.*//
495    ' >$as_me.lineno &&
496  chmod +x "$as_me.lineno" ||
497    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
498
499  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
500  # already done that, so ensure we don't try to do so again and fall
501  # in an infinite loop.  This has already happened in practice.
502  _as_can_reexec=no; export _as_can_reexec
503  # Don't try to exec as it changes $[0], causing all sort of problems
504  # (the dirname of $[0] is not the place where we might find the
505  # original and so on.  Autoconf is especially sensitive to this).
506  . "./$as_me.lineno"
507  # Exit status is that of the last command.
508  exit
509}
510
511ECHO_C= ECHO_N= ECHO_T=
512case `echo -n x` in #(((((
513-n*)
514  case `echo 'xy\c'` in
515  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
516  xy)  ECHO_C='\c';;
517  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
518       ECHO_T='	';;
519  esac;;
520*)
521  ECHO_N='-n';;
522esac
523
524rm -f conf$$ conf$$.exe conf$$.file
525if test -d conf$$.dir; then
526  rm -f conf$$.dir/conf$$.file
527else
528  rm -f conf$$.dir
529  mkdir conf$$.dir 2>/dev/null
530fi
531if (echo >conf$$.file) 2>/dev/null; then
532  if ln -s conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s='ln -s'
534    # ... but there are two gotchas:
535    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
536    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
537    # In both cases, we have to default to `cp -pR'.
538    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
539      as_ln_s='cp -pR'
540  elif ln conf$$.file conf$$ 2>/dev/null; then
541    as_ln_s=ln
542  else
543    as_ln_s='cp -pR'
544  fi
545else
546  as_ln_s='cp -pR'
547fi
548rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
549rmdir conf$$.dir 2>/dev/null
550
551if mkdir -p . 2>/dev/null; then
552  as_mkdir_p='mkdir -p "$as_dir"'
553else
554  test -d ./-p && rmdir ./-p
555  as_mkdir_p=false
556fi
557
558as_test_x='test -x'
559as_executable_p=as_fn_executable_p
560
561# Sed expression to map a string onto a valid CPP name.
562as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
563
564# Sed expression to map a string onto a valid variable name.
565as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
566
567SHELL=${CONFIG_SHELL-/bin/sh}
568
569
570test -n "$DJDIR" || exec 7<&0 </dev/null
571exec 6>&1
572
573# Name of the host.
574# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
575# so uname gets run too.
576ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
577
578#
579# Initializations.
580#
581ac_default_prefix=/usr/local
582ac_clean_files=
583ac_config_libobj_dir=.
584LIBOBJS=
585cross_compiling=no
586subdirs=
587MFLAGS=
588MAKEFLAGS=
589
590# Identity of this package.
591PACKAGE_NAME='gettext-tools'
592PACKAGE_TARNAME='gettext-tools'
593PACKAGE_VERSION='0.21'
594PACKAGE_STRING='gettext-tools 0.21'
595PACKAGE_BUGREPORT='bug-gettext@gnu.org'
596PACKAGE_URL=''
597
598ac_unique_file="src/msgfmt.c"
599# Factoring default headers for most tests.
600ac_includes_default="\
601#include <stdio.h>
602#ifdef HAVE_SYS_TYPES_H
603# include <sys/types.h>
604#endif
605#ifdef HAVE_SYS_STAT_H
606# include <sys/stat.h>
607#endif
608#ifdef STDC_HEADERS
609# include <stdlib.h>
610# include <stddef.h>
611#else
612# ifdef HAVE_STDLIB_H
613#  include <stdlib.h>
614# endif
615#endif
616#ifdef HAVE_STRING_H
617# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
618#  include <memory.h>
619# endif
620# include <string.h>
621#endif
622#ifdef HAVE_STRINGS_H
623# include <strings.h>
624#endif
625#ifdef HAVE_INTTYPES_H
626# include <inttypes.h>
627#endif
628#ifdef HAVE_STDINT_H
629# include <stdint.h>
630#endif
631#ifdef HAVE_UNISTD_H
632# include <unistd.h>
633#endif"
634
635gl_use_threads_default=
636gl_use_winpthreads_default=
637gt_needs=
638ac_header_list=
639ac_func_list=
640gl_fnmatch_required=POSIX
641gl_getopt_required=POSIX
642gl_log10_required=plain
643enable_option_checking=no
644ac_subst_vars='gtpotests_LTLIBOBJS
645gtpotests_LIBOBJS
646gtpo_LTLIBOBJS
647gtpo_LIBOBJS
648grgltests_LTLIBOBJS
649grgltests_LIBOBJS
650grgl_LTLIBOBJS
651grgl_LIBOBJS
652gltests_LTLIBOBJS
653gltests_LIBOBJS
654gl_LTLIBOBJS
655gl_LIBOBJS
656am__EXEEXT_FALSE
657am__EXEEXT_TRUE
658LTLIBOBJS
659LIBOBJS
660subdirs
661TEST_SYSTEM_LIBINTL_FALSE
662TEST_SYSTEM_LIBINTL_TRUE
663TESTLIBASPRINTF
664CXXCPP
665LOCALE_DE_UTF8
666CROSS_COMPILING
667PERL
668TEXI2PDF
669DVIPS
670PACKAGE_SUFFIX
671ARCHIVE_VERSION
672ARCHIVE_FORMAT
673aclocaldir
674EMACSLOADPATH
675EMACS
676HAVE_GLOBAL_SYMBOL_PIPE
677GLOBAL_SYMBOL_PIPE
678GETTEXTLIB_EXPORTS_FLAGS
679WOE32DLL_FALSE
680WOE32DLL_TRUE
681gtpotests_WITNESS
682LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC_FALSE
683LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC_TRUE
684LIBUNISTRING_COMPILE_UNISTR_U8_NEXT_FALSE
685LIBUNISTRING_COMPILE_UNISTR_U8_NEXT_TRUE
686LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_ALPHA_FALSE
687LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_ALPHA_TRUE
688LIBGREP_LTLIBDEPS
689LIBGREP_LIBDEPS
690grgltests_WITNESS
691LIB_NL_LANGINFO
692LIBTESTS_LIBDEPS
693YIELD_LIB
694LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_FALSE
695LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_TRUE
696LIBUNISTRING_COMPILE_UNISTR_U8_CMP_FALSE
697LIBUNISTRING_COMPILE_UNISTR_U8_CMP_TRUE
698HAVE_SYS_UIO_H
699NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
700NEXT_SYS_UIO_H
701NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
702NEXT_SYS_IOCTL_H
703HAVE_SYS_IOCTL_H
704GL_GENERATE_STDALIGN_H_FALSE
705GL_GENERATE_STDALIGN_H_TRUE
706STDALIGN_H
707LIB_PTHREAD_SIGMASK
708LIB_PTHREAD
709HAVE_PTHREAD_H
710NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H
711NEXT_PTHREAD_H
712REPLACE_PTHREAD_SPIN_DESTROY
713REPLACE_PTHREAD_SPIN_UNLOCK
714REPLACE_PTHREAD_SPIN_TRYLOCK
715REPLACE_PTHREAD_SPIN_LOCK
716REPLACE_PTHREAD_SPIN_INIT
717REPLACE_PTHREAD_KEY_DELETE
718REPLACE_PTHREAD_GETSPECIFIC
719REPLACE_PTHREAD_SETSPECIFIC
720REPLACE_PTHREAD_KEY_CREATE
721REPLACE_PTHREAD_COND_DESTROY
722REPLACE_PTHREAD_COND_BROADCAST
723REPLACE_PTHREAD_COND_SIGNAL
724REPLACE_PTHREAD_COND_TIMEDWAIT
725REPLACE_PTHREAD_COND_WAIT
726REPLACE_PTHREAD_CONDATTR_DESTROY
727REPLACE_PTHREAD_CONDATTR_INIT
728REPLACE_PTHREAD_COND_INIT
729REPLACE_PTHREAD_RWLOCK_DESTROY
730REPLACE_PTHREAD_RWLOCK_UNLOCK
731REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK
732REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK
733REPLACE_PTHREAD_RWLOCK_TRYWRLOCK
734REPLACE_PTHREAD_RWLOCK_TRYRDLOCK
735REPLACE_PTHREAD_RWLOCK_WRLOCK
736REPLACE_PTHREAD_RWLOCK_RDLOCK
737REPLACE_PTHREAD_RWLOCKATTR_DESTROY
738REPLACE_PTHREAD_RWLOCKATTR_INIT
739REPLACE_PTHREAD_RWLOCK_INIT
740REPLACE_PTHREAD_MUTEX_DESTROY
741REPLACE_PTHREAD_MUTEX_UNLOCK
742REPLACE_PTHREAD_MUTEX_TIMEDLOCK
743REPLACE_PTHREAD_MUTEX_TRYLOCK
744REPLACE_PTHREAD_MUTEX_LOCK
745REPLACE_PTHREAD_MUTEXATTR_DESTROY
746REPLACE_PTHREAD_MUTEXATTR_SETROBUST
747REPLACE_PTHREAD_MUTEXATTR_GETROBUST
748REPLACE_PTHREAD_MUTEXATTR_SETTYPE
749REPLACE_PTHREAD_MUTEXATTR_GETTYPE
750REPLACE_PTHREAD_MUTEXATTR_INIT
751REPLACE_PTHREAD_MUTEX_INIT
752REPLACE_PTHREAD_ONCE
753REPLACE_PTHREAD_EXIT
754REPLACE_PTHREAD_JOIN
755REPLACE_PTHREAD_DETACH
756REPLACE_PTHREAD_EQUAL
757REPLACE_PTHREAD_SELF
758REPLACE_PTHREAD_ATTR_DESTROY
759REPLACE_PTHREAD_ATTR_SETDETACHSTATE
760REPLACE_PTHREAD_ATTR_GETDETACHSTATE
761REPLACE_PTHREAD_ATTR_INIT
762REPLACE_PTHREAD_CREATE
763HAVE_PTHREAD_SPIN_DESTROY
764HAVE_PTHREAD_SPIN_UNLOCK
765HAVE_PTHREAD_SPIN_TRYLOCK
766HAVE_PTHREAD_SPIN_LOCK
767HAVE_PTHREAD_SPIN_INIT
768HAVE_PTHREAD_KEY_DELETE
769HAVE_PTHREAD_GETSPECIFIC
770HAVE_PTHREAD_SETSPECIFIC
771HAVE_PTHREAD_KEY_CREATE
772HAVE_PTHREAD_COND_DESTROY
773HAVE_PTHREAD_COND_BROADCAST
774HAVE_PTHREAD_COND_SIGNAL
775HAVE_PTHREAD_COND_TIMEDWAIT
776HAVE_PTHREAD_COND_WAIT
777HAVE_PTHREAD_CONDATTR_DESTROY
778HAVE_PTHREAD_CONDATTR_INIT
779HAVE_PTHREAD_COND_INIT
780HAVE_PTHREAD_RWLOCK_DESTROY
781HAVE_PTHREAD_RWLOCK_UNLOCK
782HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
783HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK
784HAVE_PTHREAD_RWLOCK_TRYWRLOCK
785HAVE_PTHREAD_RWLOCK_TRYRDLOCK
786HAVE_PTHREAD_RWLOCK_WRLOCK
787HAVE_PTHREAD_RWLOCK_RDLOCK
788HAVE_PTHREAD_RWLOCKATTR_DESTROY
789HAVE_PTHREAD_RWLOCKATTR_INIT
790HAVE_PTHREAD_RWLOCK_INIT
791HAVE_PTHREAD_MUTEX_DESTROY
792HAVE_PTHREAD_MUTEX_UNLOCK
793HAVE_PTHREAD_MUTEX_TIMEDLOCK
794HAVE_PTHREAD_MUTEX_TRYLOCK
795HAVE_PTHREAD_MUTEX_LOCK
796HAVE_PTHREAD_MUTEXATTR_DESTROY
797HAVE_PTHREAD_MUTEXATTR_SETROBUST
798HAVE_PTHREAD_MUTEXATTR_GETROBUST
799HAVE_PTHREAD_MUTEXATTR_SETTYPE
800HAVE_PTHREAD_MUTEXATTR_GETTYPE
801HAVE_PTHREAD_MUTEXATTR_INIT
802HAVE_PTHREAD_MUTEX_INIT
803HAVE_PTHREAD_ONCE
804HAVE_PTHREAD_EXIT
805HAVE_PTHREAD_JOIN
806HAVE_PTHREAD_DETACH
807HAVE_PTHREAD_EQUAL
808HAVE_PTHREAD_SELF
809HAVE_PTHREAD_ATTR_DESTROY
810HAVE_PTHREAD_ATTR_SETDETACHSTATE
811HAVE_PTHREAD_ATTR_GETDETACHSTATE
812HAVE_PTHREAD_ATTR_INIT
813HAVE_PTHREAD_CREATE
814HAVE_PTHREAD_PROCESS_SHARED
815HAVE_PTHREAD_MUTEX_ROBUST
816HAVE_PTHREAD_MUTEX_RECURSIVE
817HAVE_PTHREAD_CREATE_DETACHED
818HAVE_PTHREAD_SPINLOCK_T
819HAVE_PTHREAD_T
820GNULIB_PTHREAD_MUTEX_TIMEDLOCK
821GNULIB_PTHREAD_SPIN
822GNULIB_PTHREAD_TSS
823GNULIB_PTHREAD_COND
824GNULIB_PTHREAD_RWLOCK
825GNULIB_PTHREAD_MUTEX
826GNULIB_PTHREAD_ONCE
827GNULIB_PTHREAD_THREAD
828POSIX_SPAWN_PORTED_FALSE
829POSIX_SPAWN_PORTED_TRUE
830GL_GENERATE_NETINET_IN_H_FALSE
831GL_GENERATE_NETINET_IN_H_TRUE
832NETINET_IN_H
833HAVE_NETINET_IN_H
834NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
835NEXT_NETINET_IN_H
836LIB_NANOSLEEP
837LIB_SELECT
838LIBSOCKET
839INET_PTON_LIB
840LIB_HAS_ACL
841LOCALE_TR_UTF8
842LIB_SEMAPHORE
843NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
844NEXT_ARPA_INET_H
845HAVE_ARPA_INET_H
846REPLACE_INET_PTON
847REPLACE_INET_NTOP
848HAVE_DECL_INET_PTON
849HAVE_DECL_INET_NTOP
850GNULIB_INET_PTON
851GNULIB_INET_NTOP
852HAVE_WS2TCPIP_H
853HAVE_SYS_SOCKET_H
854NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
855NEXT_SYS_SOCKET_H
856HAVE_ACCEPT4
857HAVE_SA_FAMILY_T
858HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
859HAVE_STRUCT_SOCKADDR_STORAGE
860GNULIB_ACCEPT4
861GNULIB_SHUTDOWN
862GNULIB_SETSOCKOPT
863GNULIB_SENDTO
864GNULIB_RECVFROM
865GNULIB_SEND
866GNULIB_RECV
867GNULIB_LISTEN
868GNULIB_GETSOCKOPT
869GNULIB_GETSOCKNAME
870GNULIB_GETPEERNAME
871GNULIB_BIND
872GNULIB_ACCEPT
873GNULIB_CONNECT
874GNULIB_SOCKET
875gltests_WITNESS
876NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
877NEXT_WCHAR_H
878HAVE_FEATURES_H
879GL_GENERATE_UTIME_H_FALSE
880GL_GENERATE_UTIME_H_TRUE
881UTIME_H
882HAVE_UTIME_H
883NEXT_AS_FIRST_DIRECTIVE_UTIME_H
884NEXT_UTIME_H
885REPLACE_UTIME
886HAVE_UTIME
887GNULIB_UTIME
888LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
889LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
890LIBUNISTRING_UNIWIDTH_H
891LIBUNISTRING_UNITYPES_H
892LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
893LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
894LIBUNISTRING_COMPILE_UNISTR_U8_PREV_FALSE
895LIBUNISTRING_COMPILE_UNISTR_U8_PREV_TRUE
896LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
897LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
898LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE
899LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE
900LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_FALSE
901LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_TRUE
902LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_FALSE
903LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_TRUE
904LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_FALSE
905LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_TRUE
906LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_FALSE
907LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_TRUE
908LIBUNISTRING_UNISTR_H
909HAVE_UNISTD_H
910NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
911NEXT_UNISTD_H
912LIBUNISTRING_COMPILE_UNINAME_UNINAME_FALSE
913LIBUNISTRING_COMPILE_UNINAME_UNINAME_TRUE
914LIBUNISTRING_UNINAME_H
915LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_FALSE
916LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_TRUE
917LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_FALSE
918LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_TRUE
919LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_FALSE
920LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_TRUE
921LIBUNISTRING_UNILBRK_H
922LIBUNISTRING_COMPILE_UNICTYPE_SYNTAX_JAVA_WHITESPACE_FALSE
923LIBUNISTRING_COMPILE_UNICTYPE_SYNTAX_JAVA_WHITESPACE_TRUE
924LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_FALSE
925LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_TRUE
926LIBUNISTRING_UNICTYPE_H
927LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_FALSE
928LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_TRUE
929LIBUNISTRING_UNICONV_H
930UNISTD_H_DEFINES_STRUCT_TIMESPEC
931PTHREAD_H_DEFINES_STRUCT_TIMESPEC
932SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
933TIME_H_DEFINES_STRUCT_TIMESPEC
934NEXT_AS_FIRST_DIRECTIVE_TIME_H
935NEXT_TIME_H
936NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
937NEXT_SYS_WAIT_H
938GNULIB_WAITPID
939HAVE_SYS_SELECT_H
940NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
941NEXT_SYS_SELECT_H
942REPLACE_SELECT
943REPLACE_PSELECT
944HAVE_PSELECT
945GNULIB_SELECT
946GNULIB_PSELECT
947HAVE_SYS_RANDOM_H
948NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
949NEXT_SYS_RANDOM_H
950NEXT_AS_FIRST_DIRECTIVE_STRING_H
951NEXT_STRING_H
952NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
953NEXT_STDLIB_H
954NEXT_AS_FIRST_DIRECTIVE_STDIO_H
955NEXT_STDIO_H
956HAVE__BOOL
957GL_GENERATE_STDBOOL_H_FALSE
958GL_GENERATE_STDBOOL_H_TRUE
959STDBOOL_H
960GL_GENERATE_STDARG_H_FALSE
961GL_GENERATE_STDARG_H_TRUE
962STDARG_H
963NEXT_AS_FIRST_DIRECTIVE_STDARG_H
964NEXT_STDARG_H
965HAVE_SPAWN_H
966NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
967NEXT_SPAWN_H
968ASM_SYMBOL_PREFIX
969NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
970NEXT_SIGNAL_H
971LIB_SETLOCALE
972HAVE_STRUCT_SCHED_PARAM
973HAVE_SCHED_H
974NEXT_AS_FIRST_DIRECTIVE_SCHED_H
975NEXT_SCHED_H
976REPLACE_SCHED_YIELD
977HAVE_SCHED_YIELD
978GNULIB_SCHED_YIELD
979RELOCATABLE_STRIP
980RELOCATABLE_BUILD_DIR
981RELOCATABLE_SRC_DIR
982RELOCATABLE_CONFIG_H_DIR
983RELOCATABLE_LIBRARY_PATH
984RELOCATABLE_VIA_WRAPPER_FALSE
985RELOCATABLE_VIA_WRAPPER_TRUE
986RELOCATABLE_VIA_LD_FALSE
987RELOCATABLE_VIA_LD_TRUE
988INSTALL_PROGRAM_ENV
989RELOCATABLE_LDFLAGS
990RELOCATABLE
991REPLACE_RAISE
992REPLACE_PTHREAD_SIGMASK
993HAVE_SIGHANDLER_T
994HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
995HAVE_STRUCT_SIGACTION_SA_SIGACTION
996HAVE_SIGACTION
997HAVE_SIGINFO_T
998HAVE_SIGSET_T
999HAVE_RAISE
1000HAVE_PTHREAD_SIGMASK
1001HAVE_POSIX_SIGNALBLOCKING
1002GNULIB_SIGACTION
1003GNULIB_SIGPROCMASK
1004GNULIB_SIGNAL_H_SIGPIPE
1005GNULIB_RAISE
1006GNULIB_PTHREAD_SIGMASK
1007LIB_POSIX_SPAWN
1008REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
1009REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
1010REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
1011REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
1012REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
1013REPLACE_POSIX_SPAWN
1014HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
1015HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
1016HAVE_POSIX_SPAWN_FILE_ACTIONS_T
1017HAVE_POSIX_SPAWNATTR_T
1018HAVE_POSIX_SPAWN
1019GNULIB_POSIX_SPAWNATTR_DESTROY
1020GNULIB_POSIX_SPAWNATTR_SETSIGMASK
1021GNULIB_POSIX_SPAWNATTR_GETSIGMASK
1022GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
1023GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
1024GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
1025GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
1026GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
1027GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
1028GNULIB_POSIX_SPAWNATTR_SETPGROUP
1029GNULIB_POSIX_SPAWNATTR_GETPGROUP
1030GNULIB_POSIX_SPAWNATTR_SETFLAGS
1031GNULIB_POSIX_SPAWNATTR_GETFLAGS
1032GNULIB_POSIX_SPAWNATTR_INIT
1033GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
1034GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
1035GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
1036GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
1037GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
1038GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
1039GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
1040GNULIB_POSIX_SPAWNP
1041GNULIB_POSIX_SPAWN
1042NEXT_AS_FIRST_DIRECTIVE_OMP_H
1043NEXT_OMP_H
1044NO_CXX
1045LIB_MBRTOWC
1046NEXT_AS_FIRST_DIRECTIVE_MATH_H
1047NEXT_MATH_H
1048LOG10_LIBM
1049POW_LIBM
1050REPLACE_LOCALTIME
1051REPLACE_GMTIME
1052REPLACE_TZSET
1053REPLACE_TIMEGM
1054REPLACE_STRFTIME
1055REPLACE_NANOSLEEP
1056REPLACE_MKTIME
1057REPLACE_LOCALTIME_R
1058REPLACE_CTIME
1059HAVE_TIMEZONE_T
1060HAVE_TZSET
1061HAVE_TIMEGM
1062HAVE_STRPTIME
1063HAVE_NANOSLEEP
1064HAVE_DECL_LOCALTIME_R
1065GNULIB_TZSET
1066GNULIB_TIME_RZ
1067GNULIB_TIME_R
1068GNULIB_TIMEGM
1069GNULIB_STRPTIME
1070GNULIB_STRFTIME
1071GNULIB_NANOSLEEP
1072GNULIB_LOCALTIME
1073GNULIB_MKTIME
1074GNULIB_CTIME
1075NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1076NEXT_LOCALE_H
1077HAVE_XLOCALE_H
1078NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1079NEXT_STDDEF_H
1080GL_GENERATE_STDDEF_H_FALSE
1081GL_GENERATE_STDDEF_H_TRUE
1082STDDEF_H
1083HAVE_WCHAR_T
1084HAVE_MAX_ALIGN_T
1085REPLACE_NULL
1086REPLACE_STRUCT_LCONV
1087REPLACE_FREELOCALE
1088REPLACE_DUPLOCALE
1089REPLACE_NEWLOCALE
1090REPLACE_SETLOCALE
1091REPLACE_LOCALECONV
1092HAVE_FREELOCALE
1093HAVE_DUPLOCALE
1094GNULIB_LOCALENAME
1095GNULIB_DUPLOCALE
1096GNULIB_SETLOCALE_NULL
1097GNULIB_SETLOCALE
1098GNULIB_LOCALECONV
1099LOCALCHARSET_TESTS_ENVIRONMENT
1100INCLUDED_LIBXML_FALSE
1101INCLUDED_LIBXML_TRUE
1102LIBXML_H
1103INCXML
1104LTLIBXML
1105LIBXML
1106LIBUNISTRING_PREFIX
1107LTLIBUNISTRING
1108LIBUNISTRING
1109HAVE_LIBUNISTRING
1110HAVE_LANGINFO_YESEXPR
1111HAVE_LANGINFO_ERA
1112HAVE_LANGINFO_ALTMON
1113HAVE_LANGINFO_T_FMT_AMPM
1114HAVE_LANGINFO_CODESET
1115HAVE_LANGINFO_H
1116NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1117NEXT_LANGINFO_H
1118REPLACE_NL_LANGINFO
1119HAVE_NL_LANGINFO
1120GNULIB_NL_LANGINFO
1121LOCALE_ZH_CN
1122LOCALE_FR_UTF8
1123LOCALE_JA
1124REPLACE_TOWLOWER
1125REPLACE_ISWCNTRL
1126HAVE_WCTYPE_H
1127NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
1128NEXT_WCTYPE_H
1129HAVE_CRTDEFS_H
1130HAVE_WINT_T
1131HAVE_ISWCNTRL
1132REPLACE_ISWXDIGIT
1133REPLACE_ISWDIGIT
1134REPLACE_ISWBLANK
1135HAVE_WCTRANS_T
1136HAVE_WCTYPE_T
1137HAVE_ISWBLANK
1138GNULIB_TOWCTRANS
1139GNULIB_WCTRANS
1140GNULIB_ISWCTYPE
1141GNULIB_WCTYPE
1142GNULIB_ISWXDIGIT
1143GNULIB_ISWDIGIT
1144GNULIB_ISWBLANK
1145ISNAN_LIBM
1146ISNANL_LIBM
1147ISNAND_LIBM
1148ISNANF_LIBM
1149ISINF_LIBM
1150HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1151REPLACE_TRUNCL
1152REPLACE_TRUNCF
1153REPLACE_TRUNC
1154REPLACE_TANHF
1155REPLACE_TANF
1156REPLACE_SQRTL
1157REPLACE_SQRTF
1158REPLACE_SINHF
1159REPLACE_SINF
1160REPLACE_SIGNBIT_USING_GCC
1161REPLACE_SIGNBIT
1162REPLACE_ROUNDL
1163REPLACE_ROUNDF
1164REPLACE_ROUND
1165REPLACE_RINTL
1166REPLACE_REMAINDERL
1167REPLACE_REMAINDERF
1168REPLACE_REMAINDER
1169REPLACE_NAN
1170REPLACE_MODFL
1171REPLACE_MODFF
1172REPLACE_MODF
1173REPLACE_LOGBL
1174REPLACE_LOGBF
1175REPLACE_LOGB
1176REPLACE_LOG2L
1177REPLACE_LOG2F
1178REPLACE_LOG2
1179REPLACE_LOG1PL
1180REPLACE_LOG1PF
1181REPLACE_LOG1P
1182REPLACE_LOG10L
1183REPLACE_LOG10F
1184REPLACE_LOG10
1185REPLACE_LOGL
1186REPLACE_LOGF
1187REPLACE_LOG
1188REPLACE_LDEXPL
1189REPLACE_ISNAN
1190REPLACE_ISINF
1191REPLACE_ISFINITE
1192REPLACE_ILOGBL
1193REPLACE_ILOGBF
1194REPLACE_ILOGB
1195REPLACE_HYPOTL
1196REPLACE_HYPOTF
1197REPLACE_HYPOT
1198REPLACE_HUGE_VAL
1199REPLACE_FREXPL
1200REPLACE_FREXP
1201REPLACE_FREXPF
1202REPLACE_FMODL
1203REPLACE_FMODF
1204REPLACE_FMOD
1205REPLACE_FMAL
1206REPLACE_FMAF
1207REPLACE_FMA
1208REPLACE_FLOORL
1209REPLACE_FLOORF
1210REPLACE_FLOOR
1211REPLACE_FABSL
1212REPLACE_EXP2L
1213REPLACE_EXP2
1214REPLACE_EXPM1L
1215REPLACE_EXPM1F
1216REPLACE_EXPM1
1217REPLACE_EXPL
1218REPLACE_EXPF
1219REPLACE_COSHF
1220REPLACE_COSF
1221REPLACE_CEILL
1222REPLACE_CEILF
1223REPLACE_CEIL
1224REPLACE_CBRTL
1225REPLACE_CBRTF
1226REPLACE_ATAN2F
1227REPLACE_ATANF
1228REPLACE_ASINF
1229REPLACE_ACOSF
1230HAVE_DECL_TRUNCL
1231HAVE_DECL_TRUNCF
1232HAVE_DECL_TRUNC
1233HAVE_DECL_TANL
1234HAVE_DECL_SQRTL
1235HAVE_DECL_SINL
1236HAVE_DECL_ROUNDL
1237HAVE_DECL_ROUNDF
1238HAVE_DECL_ROUND
1239HAVE_DECL_RINTF
1240HAVE_DECL_REMAINDERL
1241HAVE_DECL_REMAINDER
1242HAVE_DECL_LOGB
1243HAVE_DECL_LOG2L
1244HAVE_DECL_LOG2F
1245HAVE_DECL_LOG2
1246HAVE_DECL_LOG10L
1247HAVE_DECL_LOGL
1248HAVE_DECL_LDEXPL
1249HAVE_DECL_FREXPL
1250HAVE_DECL_FLOORL
1251HAVE_DECL_FLOORF
1252HAVE_DECL_EXPM1L
1253HAVE_DECL_EXP2L
1254HAVE_DECL_EXP2F
1255HAVE_DECL_EXP2
1256HAVE_DECL_EXPL
1257HAVE_DECL_COSL
1258HAVE_DECL_COPYSIGNF
1259HAVE_DECL_CEILL
1260HAVE_DECL_CEILF
1261HAVE_DECL_CBRTL
1262HAVE_DECL_CBRTF
1263HAVE_DECL_ATANL
1264HAVE_DECL_ASINL
1265HAVE_DECL_ACOSL
1266HAVE_TANHF
1267HAVE_TANL
1268HAVE_TANF
1269HAVE_SQRTL
1270HAVE_SQRTF
1271HAVE_SINHF
1272HAVE_SINL
1273HAVE_SINF
1274HAVE_RINTL
1275HAVE_RINT
1276HAVE_REMAINDERF
1277HAVE_REMAINDER
1278HAVE_POWF
1279HAVE_MODFL
1280HAVE_MODFF
1281HAVE_LOGBL
1282HAVE_LOGBF
1283HAVE_LOG1PL
1284HAVE_LOG1PF
1285HAVE_LOG1P
1286HAVE_LOG10L
1287HAVE_LOG10F
1288HAVE_LOGL
1289HAVE_LOGF
1290HAVE_LDEXPF
1291HAVE_ISNANL
1292HAVE_ISNAND
1293HAVE_ISNANF
1294HAVE_ILOGBL
1295HAVE_ILOGBF
1296HAVE_ILOGB
1297HAVE_HYPOTL
1298HAVE_HYPOTF
1299HAVE_FREXPF
1300HAVE_FMODL
1301HAVE_FMODF
1302HAVE_FMAL
1303HAVE_FMAF
1304HAVE_FMA
1305HAVE_FABSL
1306HAVE_FABSF
1307HAVE_EXPM1F
1308HAVE_EXPM1
1309HAVE_EXPL
1310HAVE_EXPF
1311HAVE_COSHF
1312HAVE_COSL
1313HAVE_COSF
1314HAVE_COPYSIGNL
1315HAVE_COPYSIGN
1316HAVE_CBRTL
1317HAVE_CBRTF
1318HAVE_CBRT
1319HAVE_ATAN2F
1320HAVE_ATANL
1321HAVE_ATANF
1322HAVE_ASINL
1323HAVE_ASINF
1324HAVE_ACOSL
1325HAVE_ACOSF
1326GNULIB_TRUNCL
1327GNULIB_TRUNCF
1328GNULIB_TRUNC
1329GNULIB_TANHF
1330GNULIB_TANL
1331GNULIB_TANF
1332GNULIB_SQRTL
1333GNULIB_SQRTF
1334GNULIB_SINHF
1335GNULIB_SINL
1336GNULIB_SINF
1337GNULIB_SIGNBIT
1338GNULIB_ROUNDL
1339GNULIB_ROUNDF
1340GNULIB_ROUND
1341GNULIB_RINTL
1342GNULIB_RINTF
1343GNULIB_RINT
1344GNULIB_REMAINDERL
1345GNULIB_REMAINDERF
1346GNULIB_REMAINDER
1347GNULIB_POWF
1348GNULIB_MODFL
1349GNULIB_MODFF
1350GNULIB_MODF
1351GNULIB_LOGBL
1352GNULIB_LOGBF
1353GNULIB_LOGB
1354GNULIB_LOG2L
1355GNULIB_LOG2F
1356GNULIB_LOG2
1357GNULIB_LOG1PL
1358GNULIB_LOG1PF
1359GNULIB_LOG1P
1360GNULIB_LOG10L
1361GNULIB_LOG10F
1362GNULIB_LOG10
1363GNULIB_LOGL
1364GNULIB_LOGF
1365GNULIB_LOG
1366GNULIB_LDEXPL
1367GNULIB_LDEXPF
1368GNULIB_ISNANL
1369GNULIB_ISNAND
1370GNULIB_ISNANF
1371GNULIB_ISNAN
1372GNULIB_ISINF
1373GNULIB_ISFINITE
1374GNULIB_ILOGBL
1375GNULIB_ILOGBF
1376GNULIB_ILOGB
1377GNULIB_HYPOTL
1378GNULIB_HYPOTF
1379GNULIB_HYPOT
1380GNULIB_FREXPL
1381GNULIB_FREXP
1382GNULIB_FREXPF
1383GNULIB_FMODL
1384GNULIB_FMODF
1385GNULIB_FMOD
1386GNULIB_FMAL
1387GNULIB_FMAF
1388GNULIB_FMA
1389GNULIB_FLOORL
1390GNULIB_FLOORF
1391GNULIB_FLOOR
1392GNULIB_FABSL
1393GNULIB_FABSF
1394GNULIB_EXPM1L
1395GNULIB_EXPM1F
1396GNULIB_EXPM1
1397GNULIB_EXP2L
1398GNULIB_EXP2F
1399GNULIB_EXP2
1400GNULIB_EXPL
1401GNULIB_EXPF
1402GNULIB_COSHF
1403GNULIB_COSL
1404GNULIB_COSF
1405GNULIB_COPYSIGNL
1406GNULIB_COPYSIGNF
1407GNULIB_COPYSIGN
1408GNULIB_CEILL
1409GNULIB_CEILF
1410GNULIB_CEIL
1411GNULIB_CBRTL
1412GNULIB_CBRTF
1413GNULIB_CBRT
1414GNULIB_ATAN2F
1415GNULIB_ATANL
1416GNULIB_ATANF
1417GNULIB_ASINL
1418GNULIB_ASINF
1419GNULIB_ACOSL
1420GNULIB_ACOSF
1421NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1422NEXT_INTTYPES_H
1423UINT64_MAX_EQ_ULONG_MAX
1424UINT32_MAX_LT_UINTMAX_MAX
1425PRIPTR_PREFIX
1426INT64_MAX_EQ_LONG_MAX
1427INT32_MAX_LT_INTMAX_MAX
1428REPLACE_STRTOUMAX
1429REPLACE_STRTOIMAX
1430HAVE_IMAXDIV_T
1431HAVE_DECL_STRTOUMAX
1432HAVE_DECL_STRTOIMAX
1433HAVE_DECL_IMAXDIV
1434HAVE_DECL_IMAXABS
1435GNULIB_STRTOUMAX
1436GNULIB_STRTOIMAX
1437GNULIB_IMAXDIV
1438GNULIB_IMAXABS
1439GL_GENERATE_STDINT_H_FALSE
1440GL_GENERATE_STDINT_H_TRUE
1441STDINT_H
1442HAVE_SYS_INTTYPES_H
1443HAVE_SYS_BITYPES_H
1444HAVE_C99_STDINT_H
1445WINT_T_SUFFIX
1446WCHAR_T_SUFFIX
1447SIG_ATOMIC_T_SUFFIX
1448SIZE_T_SUFFIX
1449PTRDIFF_T_SUFFIX
1450HAVE_SIGNED_WINT_T
1451HAVE_SIGNED_WCHAR_T
1452HAVE_SIGNED_SIG_ATOMIC_T
1453BITSIZEOF_WINT_T
1454BITSIZEOF_WCHAR_T
1455BITSIZEOF_SIG_ATOMIC_T
1456BITSIZEOF_SIZE_T
1457BITSIZEOF_PTRDIFF_T
1458APPLE_UNIVERSAL_BUILD
1459HAVE_STDINT_H
1460NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1461NEXT_STDINT_H
1462HAVE_SYS_TYPES_H
1463HAVE_INTTYPES_H
1464HAVE_WCHAR_H
1465GL_GENERATE_LIMITS_H_FALSE
1466GL_GENERATE_LIMITS_H_TRUE
1467LIMITS_H
1468NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1469NEXT_LIMITS_H
1470NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1471NEXT_ICONV_H
1472LIB_HARD_LOCALE
1473LIB_SETLOCALE_NULL
1474NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1475NEXT_SYS_TIME_H
1476REPLACE_STRUCT_TIMEVAL
1477REPLACE_GETTIMEOFDAY
1478HAVE_SYS_TIME_H
1479HAVE_STRUCT_TIMEVAL
1480HAVE_GETTIMEOFDAY
1481GNULIB_GETTIMEOFDAY
1482LIB_GETRANDOM
1483REPLACE_GETRANDOM
1484HAVE_GETRANDOM
1485GNULIB_GETRANDOM
1486GNULIB_GL_UNISTD_H_GETOPT
1487GETOPT_CDEFS_H
1488GETOPT_H
1489HAVE_SYS_CDEFS_H
1490HAVE_GETOPT_H
1491NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1492NEXT_GETOPT_H
1493WINDOWS_STAT_INODES
1494WINDOWS_64_BIT_OFF_T
1495NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1496NEXT_SYS_TYPES_H
1497WINDOWS_64_BIT_ST_SIZE
1498WINDOWS_STAT_TIMESPEC
1499NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1500NEXT_SYS_STAT_H
1501REPLACE_UTIMENSAT
1502REPLACE_STAT
1503REPLACE_MKNOD
1504REPLACE_MKFIFO
1505REPLACE_MKDIR
1506REPLACE_LSTAT
1507REPLACE_FUTIMENS
1508REPLACE_FSTATAT
1509REPLACE_FSTAT
1510REPLACE_FCHMODAT
1511HAVE_UTIMENSAT
1512HAVE_MKNODAT
1513HAVE_MKNOD
1514HAVE_MKFIFOAT
1515HAVE_MKFIFO
1516HAVE_MKDIRAT
1517HAVE_LSTAT
1518HAVE_LCHMOD
1519HAVE_GETUMASK
1520HAVE_FUTIMENS
1521HAVE_FSTATAT
1522HAVE_FCHMODAT
1523GNULIB_OVERRIDES_STRUCT_STAT
1524GNULIB_UTIMENSAT
1525GNULIB_STAT
1526GNULIB_MKNODAT
1527GNULIB_MKNOD
1528GNULIB_MKFIFOAT
1529GNULIB_MKFIFO
1530GNULIB_MKDIRAT
1531GNULIB_LSTAT
1532GNULIB_LCHMOD
1533GNULIB_GETUMASK
1534GNULIB_FUTIMENS
1535GNULIB_FSTATAT
1536GNULIB_FSTAT
1537GNULIB_FCHMODAT
1538GL_GENERATE_FNMATCH_H_FALSE
1539GL_GENERATE_FNMATCH_H_TRUE
1540FNMATCH_H
1541HAVE_FNMATCH_H
1542NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1543NEXT_FNMATCH_H
1544REPLACE_FNMATCH
1545HAVE_FNMATCH
1546GNULIB_FNMATCH
1547REPLACE_ITOLD
1548GL_GENERATE_FLOAT_H_FALSE
1549GL_GENERATE_FLOAT_H_TRUE
1550FLOAT_H
1551NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1552NEXT_FLOAT_H
1553REPLACE_VSPRINTF
1554REPLACE_VSNPRINTF
1555REPLACE_VPRINTF
1556REPLACE_VFPRINTF
1557REPLACE_VDPRINTF
1558REPLACE_VASPRINTF
1559REPLACE_TMPFILE
1560REPLACE_STDIO_WRITE_FUNCS
1561REPLACE_STDIO_READ_FUNCS
1562REPLACE_SPRINTF
1563REPLACE_SNPRINTF
1564REPLACE_RENAMEAT
1565REPLACE_RENAME
1566REPLACE_REMOVE
1567REPLACE_PRINTF
1568REPLACE_POPEN
1569REPLACE_PERROR
1570REPLACE_OBSTACK_PRINTF
1571REPLACE_GETLINE
1572REPLACE_GETDELIM
1573REPLACE_FTELLO
1574REPLACE_FTELL
1575REPLACE_FSEEKO
1576REPLACE_FSEEK
1577REPLACE_FREOPEN
1578REPLACE_FPURGE
1579REPLACE_FPRINTF
1580REPLACE_FOPEN
1581REPLACE_FFLUSH
1582REPLACE_FDOPEN
1583REPLACE_FCLOSE
1584REPLACE_DPRINTF
1585HAVE_VDPRINTF
1586HAVE_VASPRINTF
1587HAVE_RENAMEAT
1588HAVE_POPEN
1589HAVE_PCLOSE
1590HAVE_FTELLO
1591HAVE_FSEEKO
1592HAVE_DPRINTF
1593HAVE_DECL_VSNPRINTF
1594HAVE_DECL_SNPRINTF
1595HAVE_DECL_OBSTACK_PRINTF
1596HAVE_DECL_GETLINE
1597HAVE_DECL_GETDELIM
1598HAVE_DECL_FTELLO
1599HAVE_DECL_FSEEKO
1600HAVE_DECL_FPURGE
1601GNULIB_VSPRINTF_POSIX
1602GNULIB_VSNPRINTF
1603GNULIB_VPRINTF_POSIX
1604GNULIB_VPRINTF
1605GNULIB_VFPRINTF_POSIX
1606GNULIB_VFPRINTF
1607GNULIB_VDPRINTF
1608GNULIB_VSCANF
1609GNULIB_VFSCANF
1610GNULIB_VASPRINTF
1611GNULIB_TMPFILE
1612GNULIB_STDIO_H_SIGPIPE
1613GNULIB_STDIO_H_NONBLOCKING
1614GNULIB_SPRINTF_POSIX
1615GNULIB_SNPRINTF
1616GNULIB_SCANF
1617GNULIB_RENAMEAT
1618GNULIB_RENAME
1619GNULIB_REMOVE
1620GNULIB_PUTS
1621GNULIB_PUTCHAR
1622GNULIB_PUTC
1623GNULIB_PRINTF_POSIX
1624GNULIB_PRINTF
1625GNULIB_POPEN
1626GNULIB_PERROR
1627GNULIB_PCLOSE
1628GNULIB_OBSTACK_PRINTF_POSIX
1629GNULIB_OBSTACK_PRINTF
1630GNULIB_GETLINE
1631GNULIB_GETDELIM
1632GNULIB_GETCHAR
1633GNULIB_GETC
1634GNULIB_FWRITE
1635GNULIB_FTELLO
1636GNULIB_FTELL
1637GNULIB_FSEEKO
1638GNULIB_FSEEK
1639GNULIB_FSCANF
1640GNULIB_FREOPEN
1641GNULIB_FREAD
1642GNULIB_FPUTS
1643GNULIB_FPUTC
1644GNULIB_FPURGE
1645GNULIB_FPRINTF_POSIX
1646GNULIB_FPRINTF
1647GNULIB_FOPEN
1648GNULIB_FGETS
1649GNULIB_FGETC
1650GNULIB_FFLUSH
1651GNULIB_FDOPEN
1652GNULIB_FCLOSE
1653GNULIB_DPRINTF
1654NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1655NEXT_FCNTL_H
1656REPLACE_OPENAT
1657REPLACE_OPEN
1658REPLACE_FCNTL
1659REPLACE_CREAT
1660HAVE_OPENAT
1661HAVE_FCNTL
1662GNULIB_OPENAT
1663GNULIB_OPEN
1664GNULIB_NONBLOCKING
1665GNULIB_FCNTL
1666GNULIB_CREAT
1667FABS_LIBM
1668UNDEFINE_STRTOK_R
1669REPLACE_STRSIGNAL
1670REPLACE_STRERROR_R
1671REPLACE_STRERROR
1672REPLACE_STRTOK_R
1673REPLACE_STRCASESTR
1674REPLACE_STRSTR
1675REPLACE_STRNLEN
1676REPLACE_STRNDUP
1677REPLACE_STRNCAT
1678REPLACE_STRDUP
1679REPLACE_STRCHRNUL
1680REPLACE_STPNCPY
1681REPLACE_MEMMEM
1682REPLACE_MEMCHR
1683HAVE_STRVERSCMP
1684HAVE_DECL_STRSIGNAL
1685HAVE_DECL_STRERROR_R
1686HAVE_DECL_STRTOK_R
1687HAVE_STRCASESTR
1688HAVE_STRSEP
1689HAVE_STRPBRK
1690HAVE_DECL_STRNLEN
1691HAVE_DECL_STRNDUP
1692HAVE_DECL_STRDUP
1693HAVE_STRCHRNUL
1694HAVE_STPNCPY
1695HAVE_STPCPY
1696HAVE_RAWMEMCHR
1697HAVE_DECL_MEMRCHR
1698HAVE_MEMPCPY
1699HAVE_DECL_MEMMEM
1700HAVE_FFSLL
1701HAVE_FFSL
1702HAVE_EXPLICIT_BZERO
1703HAVE_MBSLEN
1704GNULIB_STRVERSCMP
1705GNULIB_STRSIGNAL
1706GNULIB_STRERROR_R
1707GNULIB_STRERROR
1708GNULIB_MBSTOK_R
1709GNULIB_MBSSEP
1710GNULIB_MBSSPN
1711GNULIB_MBSPBRK
1712GNULIB_MBSCSPN
1713GNULIB_MBSCASESTR
1714GNULIB_MBSPCASECMP
1715GNULIB_MBSNCASECMP
1716GNULIB_MBSCASECMP
1717GNULIB_MBSSTR
1718GNULIB_MBSRCHR
1719GNULIB_MBSCHR
1720GNULIB_MBSNLEN
1721GNULIB_MBSLEN
1722GNULIB_STRTOK_R
1723GNULIB_STRCASESTR
1724GNULIB_STRSTR
1725GNULIB_STRSEP
1726GNULIB_STRPBRK
1727GNULIB_STRNLEN
1728GNULIB_STRNDUP
1729GNULIB_STRNCAT
1730GNULIB_STRDUP
1731GNULIB_STRCHRNUL
1732GNULIB_STPNCPY
1733GNULIB_STPCPY
1734GNULIB_RAWMEMCHR
1735GNULIB_MEMRCHR
1736GNULIB_MEMPCPY
1737GNULIB_MEMMEM
1738GNULIB_MEMCHR
1739GNULIB_FFSLL
1740GNULIB_FFSL
1741GNULIB_EXPLICIT_BZERO
1742EOVERFLOW_VALUE
1743EOVERFLOW_HIDDEN
1744ENOLINK_VALUE
1745ENOLINK_HIDDEN
1746EMULTIHOP_VALUE
1747EMULTIHOP_HIDDEN
1748GL_GENERATE_ERRNO_H_FALSE
1749GL_GENERATE_ERRNO_H_TRUE
1750ERRNO_H
1751NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1752NEXT_ERRNO_H
1753HAVE_DIRENT_H
1754NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1755NEXT_DIRENT_H
1756NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1757NEXT_CTYPE_H
1758PRAGMA_COLUMNS
1759PRAGMA_SYSTEM_HEADER
1760INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1761INCLUDE_NEXT
1762HAVE_ISBLANK
1763GNULIB_ISBLANK
1764pkglibexecdir
1765runstatedir
1766lispdir
1767REPLACE_FDOPENDIR
1768REPLACE_DIRFD
1769REPLACE_CLOSEDIR
1770REPLACE_OPENDIR
1771HAVE_ALPHASORT
1772HAVE_SCANDIR
1773HAVE_FDOPENDIR
1774HAVE_DECL_FDOPENDIR
1775HAVE_DECL_DIRFD
1776HAVE_CLOSEDIR
1777HAVE_REWINDDIR
1778HAVE_READDIR
1779HAVE_OPENDIR
1780GNULIB_ALPHASORT
1781GNULIB_SCANDIR
1782GNULIB_FDOPENDIR
1783GNULIB_DIRFD
1784GNULIB_CLOSEDIR
1785GNULIB_REWINDDIR
1786GNULIB_READDIR
1787GNULIB_OPENDIR
1788HAVE_WINSOCK2_H
1789REPLACE_IOCTL
1790SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1791SYS_IOCTL_H_HAVE_WINSOCK2_H
1792GNULIB_IOCTL
1793HAVE_MSVC_INVALID_PARAMETER_HANDLER
1794LIB_CLOCK_GETTIME
1795REPLACE_WCTOMB
1796REPLACE_UNSETENV
1797REPLACE_STRTOLD
1798REPLACE_STRTOD
1799REPLACE_SETSTATE
1800REPLACE_SETENV
1801REPLACE_REALPATH
1802REPLACE_REALLOC
1803REPLACE_RANDOM_R
1804REPLACE_RANDOM
1805REPLACE_QSORT_R
1806REPLACE_PUTENV
1807REPLACE_PTSNAME_R
1808REPLACE_PTSNAME
1809REPLACE_MKSTEMP
1810REPLACE_MBTOWC
1811REPLACE_MALLOC
1812REPLACE_INITSTATE
1813REPLACE_CANONICALIZE_FILE_NAME
1814REPLACE_CALLOC
1815HAVE_DECL_UNSETENV
1816HAVE_UNLOCKPT
1817HAVE_SYS_LOADAVG_H
1818HAVE_STRUCT_RANDOM_DATA
1819HAVE_STRTOULL
1820HAVE_STRTOLL
1821HAVE_STRTOLD
1822HAVE_STRTOD
1823HAVE_DECL_SETSTATE
1824HAVE_SETSTATE
1825HAVE_DECL_SETENV
1826HAVE_SETENV
1827HAVE_SECURE_GETENV
1828HAVE_RPMATCH
1829HAVE_REALPATH
1830HAVE_REALLOCARRAY
1831HAVE_RANDOM_R
1832HAVE_RANDOM_H
1833HAVE_RANDOM
1834HAVE_QSORT_R
1835HAVE_PTSNAME_R
1836HAVE_PTSNAME
1837HAVE_POSIX_OPENPT
1838HAVE_MKSTEMPS
1839HAVE_MKSTEMP
1840HAVE_MKOSTEMPS
1841HAVE_MKOSTEMP
1842HAVE_MKDTEMP
1843HAVE_MBTOWC
1844HAVE_DECL_INITSTATE
1845HAVE_INITSTATE
1846HAVE_GRANTPT
1847HAVE_GETSUBOPT
1848HAVE_DECL_GETLOADAVG
1849HAVE_CANONICALIZE_FILE_NAME
1850HAVE_ATOLL
1851HAVE__EXIT
1852GNULIB_WCTOMB
1853GNULIB_UNSETENV
1854GNULIB_UNLOCKPT
1855GNULIB_SYSTEM_POSIX
1856GNULIB_STRTOULL
1857GNULIB_STRTOLL
1858GNULIB_STRTOLD
1859GNULIB_STRTOD
1860GNULIB_SETENV
1861GNULIB_SECURE_GETENV
1862GNULIB_RPMATCH
1863GNULIB_REALPATH
1864GNULIB_REALLOC_POSIX
1865GNULIB_REALLOCARRAY
1866GNULIB_RANDOM_R
1867GNULIB_RANDOM
1868GNULIB_QSORT_R
1869GNULIB_PUTENV
1870GNULIB_PTSNAME_R
1871GNULIB_PTSNAME
1872GNULIB_POSIX_OPENPT
1873GNULIB_MKSTEMPS
1874GNULIB_MKSTEMP
1875GNULIB_MKOSTEMPS
1876GNULIB_MKOSTEMP
1877GNULIB_MKDTEMP
1878GNULIB_MBTOWC
1879GNULIB_MALLOC_POSIX
1880GNULIB_GRANTPT
1881GNULIB_GETSUBOPT
1882GNULIB_GETLOADAVG
1883GNULIB_CANONICALIZE_FILE_NAME
1884GNULIB_CALLOC_POSIX
1885GNULIB_ATOLL
1886GNULIB__EXIT
1887GL_GENERATE_BYTESWAP_H_FALSE
1888GL_GENERATE_BYTESWAP_H_TRUE
1889BYTESWAP_H
1890LOCALE_FR
1891REPLACE_WCSTOK
1892REPLACE_WCSFTIME
1893REPLACE_WCSWIDTH
1894REPLACE_WCWIDTH
1895REPLACE_WCSNRTOMBS
1896REPLACE_WCSRTOMBS
1897REPLACE_WCRTOMB
1898REPLACE_MBSNRTOWCS
1899REPLACE_MBSRTOWCS
1900REPLACE_MBRLEN
1901REPLACE_MBRTOWC
1902REPLACE_MBSINIT
1903REPLACE_WCTOB
1904REPLACE_BTOWC
1905REPLACE_MBSTATE_T
1906HAVE_DECL_WCWIDTH
1907HAVE_DECL_WCTOB
1908HAVE_WCSFTIME
1909HAVE_WCSWIDTH
1910HAVE_WCSTOK
1911HAVE_WCSSTR
1912HAVE_WCSPBRK
1913HAVE_WCSSPN
1914HAVE_WCSCSPN
1915HAVE_WCSRCHR
1916HAVE_WCSCHR
1917HAVE_WCSDUP
1918HAVE_WCSXFRM
1919HAVE_WCSCOLL
1920HAVE_WCSNCASECMP
1921HAVE_WCSCASECMP
1922HAVE_WCSNCMP
1923HAVE_WCSCMP
1924HAVE_WCSNCAT
1925HAVE_WCSCAT
1926HAVE_WCPNCPY
1927HAVE_WCSNCPY
1928HAVE_WCPCPY
1929HAVE_WCSCPY
1930HAVE_WCSNLEN
1931HAVE_WCSLEN
1932HAVE_WMEMSET
1933HAVE_WMEMPCPY
1934HAVE_WMEMMOVE
1935HAVE_WMEMCPY
1936HAVE_WMEMCMP
1937HAVE_WMEMCHR
1938HAVE_WCSNRTOMBS
1939HAVE_WCSRTOMBS
1940HAVE_WCRTOMB
1941HAVE_MBSNRTOWCS
1942HAVE_MBSRTOWCS
1943HAVE_MBRLEN
1944HAVE_MBRTOWC
1945HAVE_MBSINIT
1946HAVE_BTOWC
1947GNULIB_WCSFTIME
1948GNULIB_WCSWIDTH
1949GNULIB_WCSTOK
1950GNULIB_WCSSTR
1951GNULIB_WCSPBRK
1952GNULIB_WCSSPN
1953GNULIB_WCSCSPN
1954GNULIB_WCSRCHR
1955GNULIB_WCSCHR
1956GNULIB_WCSDUP
1957GNULIB_WCSXFRM
1958GNULIB_WCSCOLL
1959GNULIB_WCSNCASECMP
1960GNULIB_WCSCASECMP
1961GNULIB_WCSNCMP
1962GNULIB_WCSCMP
1963GNULIB_WCSNCAT
1964GNULIB_WCSCAT
1965GNULIB_WCPNCPY
1966GNULIB_WCSNCPY
1967GNULIB_WCPCPY
1968GNULIB_WCSCPY
1969GNULIB_WCSNLEN
1970GNULIB_WCSLEN
1971GNULIB_WMEMSET
1972GNULIB_WMEMPCPY
1973GNULIB_WMEMMOVE
1974GNULIB_WMEMCPY
1975GNULIB_WMEMCMP
1976GNULIB_WMEMCHR
1977GNULIB_WCWIDTH
1978GNULIB_WCSNRTOMBS
1979GNULIB_WCSRTOMBS
1980GNULIB_WCRTOMB
1981GNULIB_MBSNRTOWCS
1982GNULIB_MBSRTOWCS
1983GNULIB_MBRLEN
1984GNULIB_MBRTOWC
1985GNULIB_MBSINIT
1986GNULIB_WCTOB
1987GNULIB_BTOWC
1988HAVE_ALLOCA_H
1989GL_GENERATE_ALLOCA_H_FALSE
1990GL_GENERATE_ALLOCA_H_TRUE
1991ALLOCA_H
1992USE_ACL
1993LIB_ACL
1994UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1995UNISTD_H_HAVE_WINSOCK2_H
1996UNISTD_H_HAVE_SYS_RANDOM_H
1997REPLACE_WRITE
1998REPLACE_USLEEP
1999REPLACE_UNLINKAT
2000REPLACE_UNLINK
2001REPLACE_TTYNAME_R
2002REPLACE_TRUNCATE
2003REPLACE_SYMLINKAT
2004REPLACE_SYMLINK
2005REPLACE_SLEEP
2006REPLACE_RMDIR
2007REPLACE_READLINKAT
2008REPLACE_READLINK
2009REPLACE_READ
2010REPLACE_PWRITE
2011REPLACE_PREAD
2012REPLACE_LSEEK
2013REPLACE_LINKAT
2014REPLACE_LINK
2015REPLACE_LCHOWN
2016REPLACE_ISATTY
2017REPLACE_GETPASS
2018REPLACE_GETPAGESIZE
2019REPLACE_GETGROUPS
2020REPLACE_GETLOGIN_R
2021REPLACE_GETDTABLESIZE
2022REPLACE_GETDOMAINNAME
2023REPLACE_GETCWD
2024REPLACE_FTRUNCATE
2025REPLACE_FCHOWNAT
2026REPLACE_FACCESSAT
2027REPLACE_DUP2
2028REPLACE_DUP
2029REPLACE_CLOSE
2030REPLACE_CHOWN
2031REPLACE_ACCESS
2032HAVE_SYS_PARAM_H
2033HAVE_OS_H
2034HAVE_DECL_TTYNAME_R
2035HAVE_DECL_TRUNCATE
2036HAVE_DECL_SETHOSTNAME
2037HAVE_DECL_GETUSERSHELL
2038HAVE_DECL_GETPAGESIZE
2039HAVE_DECL_GETLOGIN_R
2040HAVE_DECL_GETLOGIN
2041HAVE_DECL_GETDOMAINNAME
2042HAVE_DECL_FDATASYNC
2043HAVE_DECL_FCHDIR
2044HAVE_DECL_ENVIRON
2045HAVE_USLEEP
2046HAVE_UNLINKAT
2047HAVE_SYMLINKAT
2048HAVE_SYMLINK
2049HAVE_SLEEP
2050HAVE_SETHOSTNAME
2051HAVE_READLINKAT
2052HAVE_READLINK
2053HAVE_PWRITE
2054HAVE_PREAD
2055HAVE_PIPE2
2056HAVE_PIPE
2057HAVE_LINKAT
2058HAVE_LINK
2059HAVE_LCHOWN
2060HAVE_GROUP_MEMBER
2061HAVE_GETPASS
2062HAVE_GETPAGESIZE
2063HAVE_GETLOGIN
2064HAVE_GETHOSTNAME
2065HAVE_GETGROUPS
2066HAVE_GETENTROPY
2067HAVE_GETDTABLESIZE
2068HAVE_FTRUNCATE
2069HAVE_FSYNC
2070HAVE_FDATASYNC
2071HAVE_FCHOWNAT
2072HAVE_FCHDIR
2073HAVE_FACCESSAT
2074HAVE_EUIDACCESS
2075HAVE_DUP3
2076HAVE_COPY_FILE_RANGE
2077HAVE_CHOWN
2078GNULIB_WRITE
2079GNULIB_USLEEP
2080GNULIB_UNLINKAT
2081GNULIB_UNLINK
2082GNULIB_UNISTD_H_SIGPIPE
2083GNULIB_UNISTD_H_NONBLOCKING
2084GNULIB_TTYNAME_R
2085GNULIB_TRUNCATE
2086GNULIB_SYMLINKAT
2087GNULIB_SYMLINK
2088GNULIB_SLEEP
2089GNULIB_SETHOSTNAME
2090GNULIB_RMDIR
2091GNULIB_READLINKAT
2092GNULIB_READLINK
2093GNULIB_READ
2094GNULIB_PWRITE
2095GNULIB_PREAD
2096GNULIB_PIPE2
2097GNULIB_PIPE
2098GNULIB_LSEEK
2099GNULIB_LINKAT
2100GNULIB_LINK
2101GNULIB_LCHOWN
2102GNULIB_ISATTY
2103GNULIB_GROUP_MEMBER
2104GNULIB_GETUSERSHELL
2105GNULIB_GETPASS
2106GNULIB_GETPAGESIZE
2107GNULIB_GETOPT_POSIX
2108GNULIB_GETLOGIN_R
2109GNULIB_GETLOGIN
2110GNULIB_GETHOSTNAME
2111GNULIB_GETGROUPS
2112GNULIB_GETENTROPY
2113GNULIB_GETDTABLESIZE
2114GNULIB_GETDOMAINNAME
2115GNULIB_GETCWD
2116GNULIB_FTRUNCATE
2117GNULIB_FSYNC
2118GNULIB_FDATASYNC
2119GNULIB_FCHOWNAT
2120GNULIB_FCHDIR
2121GNULIB_FACCESSAT
2122GNULIB_EUIDACCESS
2123GNULIB_ENVIRON
2124GNULIB_DUP3
2125GNULIB_DUP2
2126GNULIB_DUP
2127GNULIB_COPY_FILE_RANGE
2128GNULIB_CLOSE
2129GNULIB_CHOWN
2130GNULIB_CHDIR
2131GNULIB_ACCESS
2132GL_COND_LIBTOOL_FALSE
2133GL_COND_LIBTOOL_TRUE
2134OPENMP_CFLAGS
2135MSGMERGE_LIBM
2136BISON_LOCALEDIR
2137YFLAGS
2138YACC
2139TOOLS_BISON
2140USE_INSTALLED_CSHARP_DLL_FALSE
2141USE_INSTALLED_CSHARP_DLL_TRUE
2142USE_INSTALLED_LIBTEXTSTYLE_FALSE
2143USE_INSTALLED_LIBTEXTSTYLE_TRUE
2144LIBTEXTSTYLE_PREFIX
2145LTLIBTEXTSTYLE
2146LIBTEXTSTYLE
2147HAVE_LIBTEXTSTYLE
2148PRELOADABLE_LIBINTL_FALSE
2149PRELOADABLE_LIBINTL_TRUE
2150PACKAGE_IS_GETTEXT_TOOLS_FALSE
2151PACKAGE_IS_GETTEXT_TOOLS_TRUE
2152BUILD_INCLUDED_LIBINTL_FALSE
2153BUILD_INCLUDED_LIBINTL_TRUE
2154USE_INCLUDED_LIBINTL_FALSE
2155USE_INCLUDED_LIBINTL_TRUE
2156POSUB
2157LTLIBINTL
2158LIBINTL
2159INTLLIBS
2160CATOBJEXT
2161USE_INCLUDED_LIBINTL
2162BUILD_INCLUDED_LIBINTL
2163WINDRES
2164WOE32
2165WOE32DLL
2166HAVE_NAMELESS_LOCALES
2167HAVE_WPRINTF
2168HAVE_NEWLOCALE
2169HAVE_SNPRINTF
2170HAVE_ASPRINTF
2171HAVE_POSIX_PRINTF
2172INTL_DEFAULT_VERBOSITY
2173INTL_MACOSX_LIBS
2174GLIBC21
2175GNULIB_OVERRIDES_WINT_T
2176INTLBISON
2177GL_GENERATE_ICONV_H_FALSE
2178GL_GENERATE_ICONV_H_TRUE
2179ICONV_H
2180REPLACE_ICONV_UTF
2181REPLACE_ICONV_OPEN
2182REPLACE_ICONV
2183ICONV_CONST
2184GNULIB_ICONV
2185am__fastdepCXX_FALSE
2186am__fastdepCXX_TRUE
2187CXXDEPMODE
2188ANSICXX_FALSE
2189ANSICXX_TRUE
2190CXXFLAGS
2191ac_ct_CXX
2192CXX
2193CXX_CHOICE
2194LTLIBICONV
2195LIBICONV
2196LTLIBMULTITHREAD
2197LIBMULTITHREAD
2198LTLIBTHREAD
2199LIBTHREAD
2200LIBSTDTHREAD
2201LIB_SCHED_YIELD
2202LIBPMULTITHREAD
2203LIBPTHREAD
2204ALLOCA
2205HAVE_VISIBILITY
2206CFLAG_VISIBILITY
2207GLIBC2
2208XGETTEXT_EXTRA_OPTIONS
2209MSGMERGE_FOR_MSGFMT_OPTION
2210MSGMERGE
2211XGETTEXT_015
2212XGETTEXT
2213GMSGFMT_015
2214GMSGFMT
2215MSGFMT
2216GETTEXT_MACRO_VERSION
2217USE_NLS
2218WINDOWS_NATIVE_FALSE
2219WINDOWS_NATIVE_TRUE
2220OS2_FALSE
2221OS2_TRUE
2222WOE32_FALSE
2223WOE32_TRUE
2224RC
2225LT_SYS_LIBRARY_PATH
2226OTOOL64
2227OTOOL
2228LIPO
2229NMEDIT
2230DSYMUTIL
2231MANIFEST_TOOL
2232ac_ct_AR
2233LN_S
2234NM
2235ac_ct_DUMPBIN
2236DUMPBIN
2237LD
2238FGREP
2239SED
2240LIBTOOL
2241OBJDUMP
2242DLLTOOL
2243AS
2244RANLIB
2245ARFLAGS
2246AR
2247TESTCSHARP
2248HAVE_CLIX
2249HAVE_MONO
2250CLIX_PATH
2251CLIX_PATH_VAR
2252MONO_PATH_SEPARATOR
2253MONO_PATH
2254HAVE_CLIX_IN_PATH
2255HAVE_MONO_IN_PATH
2256host_os
2257host_vendor
2258host_cpu
2259host
2260build_os
2261build_vendor
2262build_cpu
2263build
2264BUILDCSHARP
2265CSHARPCOMPFLAGS
2266HAVE_CSC
2267HAVE_MCS
2268HAVE_CSC_IN_PATH
2269HAVE_MCS_IN_PATH
2270CSHARP_CHOICE
2271TESTJAVA
2272BUILDJAVA
2273JAR
2274HAVE_JIKES
2275HAVE_JAVAC
2276HAVE_GCJ_C
2277HAVE_JAVAC_ENVVAR
2278CONF_JAVAC
2279HAVE_JIKES_IN_PATH
2280HAVE_JAVAC_IN_PATH
2281HAVE_GCJ_IN_PATH
2282HAVE_JVIEW
2283HAVE_JRE
2284HAVE_JAVA
2285HAVE_GIJ
2286HAVE_JAVA_ENVVAR
2287CLASSPATH_SEPARATOR
2288CLASSPATH
2289CONF_JAVA
2290HAVE_JVIEW_IN_PATH
2291HAVE_JRE_IN_PATH
2292HAVE_JAVA_IN_PATH
2293HAVE_GIJ_IN_PATH
2294EGREP
2295GREP
2296CPP
2297JAVA_CHOICE
2298am__fastdepCC_FALSE
2299am__fastdepCC_TRUE
2300CCDEPMODE
2301am__nodep
2302AMDEPBACKSLASH
2303AMDEP_FALSE
2304AMDEP_TRUE
2305am__include
2306DEPDIR
2307OBJEXT
2308EXEEXT
2309ac_ct_CC
2310CPPFLAGS
2311LDFLAGS
2312CFLAGS
2313CC
2314AM_BACKSLASH
2315AM_DEFAULT_VERBOSITY
2316AM_DEFAULT_V
2317AM_V
2318am__untar
2319am__tar
2320AMTAR
2321am__leading_dot
2322SET_MAKE
2323AWK
2324mkdir_p
2325MKDIR_P
2326INSTALL_STRIP_PROGRAM
2327STRIP
2328install_sh
2329MAKEINFO
2330AUTOHEADER
2331AUTOMAKE
2332AUTOCONF
2333ACLOCAL
2334VERSION
2335PACKAGE
2336CYGPATH_W
2337am__isrc
2338INSTALL_DATA
2339INSTALL_SCRIPT
2340INSTALL_PROGRAM
2341target_alias
2342host_alias
2343build_alias
2344LIBS
2345ECHO_T
2346ECHO_N
2347ECHO_C
2348DEFS
2349mandir
2350localedir
2351libdir
2352psdir
2353pdfdir
2354dvidir
2355htmldir
2356infodir
2357docdir
2358oldincludedir
2359includedir
2360localstatedir
2361sharedstatedir
2362sysconfdir
2363datadir
2364datarootdir
2365libexecdir
2366sbindir
2367bindir
2368program_transform_name
2369prefix
2370exec_prefix
2371PACKAGE_URL
2372PACKAGE_BUGREPORT
2373PACKAGE_STRING
2374PACKAGE_VERSION
2375PACKAGE_TARNAME
2376PACKAGE_NAME
2377PATH_SEPARATOR
2378SHELL
2379am__quote'
2380ac_subst_files='relocatable_sh'
2381ac_user_opts='
2382enable_option_checking
2383enable_silent_rules
2384enable_dependency_tracking
2385enable_java
2386enable_csharp
2387enable_largefile
2388enable_threads
2389enable_shared
2390enable_static
2391with_pic
2392enable_fast_install
2393with_aix_soname
2394with_gnu_ld
2395with_sysroot
2396enable_libtool_lock
2397enable_nls
2398enable_rpath
2399with_libiconv_prefix
2400enable_c__
2401with_included_gettext
2402with_libintl_prefix
2403with_installed_libtextstyle
2404with_libtextstyle_prefix
2405with_installed_csharp_dll
2406with_bison_prefix
2407enable_openmp
2408enable_cross_guesses
2409enable_acl
2410with_included_libunistring
2411with_libunistring_prefix
2412with_included_libxml
2413with_libxml2_prefix
2414enable_relocatable
2415with_included_regex
2416with_emacs
2417with_lispdir
2418with_git
2419with_cvs
2420with_bzip2
2421with_xz
2422'
2423      ac_precious_vars='build_alias
2424host_alias
2425target_alias
2426CC
2427CFLAGS
2428LDFLAGS
2429LIBS
2430CPPFLAGS
2431CPP
2432LT_SYS_LIBRARY_PATH
2433CXX
2434CXXFLAGS
2435YACC
2436YFLAGS
2437EMACS
2438EMACSLOADPATH
2439CCC
2440CXXCPP'
2441ac_subdirs_all='examples'
2442
2443# Initialize some variables set by options.
2444ac_init_help=
2445ac_init_version=false
2446ac_unrecognized_opts=
2447ac_unrecognized_sep=
2448# The variables have the same names as the options, with
2449# dashes changed to underlines.
2450cache_file=/dev/null
2451exec_prefix=NONE
2452no_create=
2453no_recursion=
2454prefix=NONE
2455program_prefix=NONE
2456program_suffix=NONE
2457program_transform_name=s,x,x,
2458silent=
2459site=
2460srcdir=
2461verbose=
2462x_includes=NONE
2463x_libraries=NONE
2464
2465# Installation directory options.
2466# These are left unexpanded so users can "make install exec_prefix=/foo"
2467# and all the variables that are supposed to be based on exec_prefix
2468# by default will actually change.
2469# Use braces instead of parens because sh, perl, etc. also accept them.
2470# (The list follows the same order as the GNU Coding Standards.)
2471bindir='${exec_prefix}/bin'
2472sbindir='${exec_prefix}/sbin'
2473libexecdir='${exec_prefix}/libexec'
2474datarootdir='${prefix}/share'
2475datadir='${datarootdir}'
2476sysconfdir='${prefix}/etc'
2477sharedstatedir='${prefix}/com'
2478localstatedir='${prefix}/var'
2479includedir='${prefix}/include'
2480oldincludedir='/usr/include'
2481docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2482infodir='${datarootdir}/info'
2483htmldir='${docdir}'
2484dvidir='${docdir}'
2485pdfdir='${docdir}'
2486psdir='${docdir}'
2487libdir='${exec_prefix}/lib'
2488localedir='${datarootdir}/locale'
2489mandir='${datarootdir}/man'
2490
2491ac_prev=
2492ac_dashdash=
2493for ac_option
2494do
2495  # If the previous option needs an argument, assign it.
2496  if test -n "$ac_prev"; then
2497    eval $ac_prev=\$ac_option
2498    ac_prev=
2499    continue
2500  fi
2501
2502  case $ac_option in
2503  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2504  *=)   ac_optarg= ;;
2505  *)    ac_optarg=yes ;;
2506  esac
2507
2508  # Accept the important Cygnus configure options, so we can diagnose typos.
2509
2510  case $ac_dashdash$ac_option in
2511  --)
2512    ac_dashdash=yes ;;
2513
2514  -bindir | --bindir | --bindi | --bind | --bin | --bi)
2515    ac_prev=bindir ;;
2516  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2517    bindir=$ac_optarg ;;
2518
2519  -build | --build | --buil | --bui | --bu)
2520    ac_prev=build_alias ;;
2521  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2522    build_alias=$ac_optarg ;;
2523
2524  -cache-file | --cache-file | --cache-fil | --cache-fi \
2525  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2526    ac_prev=cache_file ;;
2527  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2528  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2529    cache_file=$ac_optarg ;;
2530
2531  --config-cache | -C)
2532    cache_file=config.cache ;;
2533
2534  -datadir | --datadir | --datadi | --datad)
2535    ac_prev=datadir ;;
2536  -datadir=* | --datadir=* | --datadi=* | --datad=*)
2537    datadir=$ac_optarg ;;
2538
2539  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2540  | --dataroo | --dataro | --datar)
2541    ac_prev=datarootdir ;;
2542  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2543  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2544    datarootdir=$ac_optarg ;;
2545
2546  -disable-* | --disable-*)
2547    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2548    # Reject names that are not valid shell variable names.
2549    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2550      as_fn_error $? "invalid feature name: $ac_useropt"
2551    ac_useropt_orig=$ac_useropt
2552    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2553    case $ac_user_opts in
2554      *"
2555"enable_$ac_useropt"
2556"*) ;;
2557      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2558	 ac_unrecognized_sep=', ';;
2559    esac
2560    eval enable_$ac_useropt=no ;;
2561
2562  -docdir | --docdir | --docdi | --doc | --do)
2563    ac_prev=docdir ;;
2564  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2565    docdir=$ac_optarg ;;
2566
2567  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2568    ac_prev=dvidir ;;
2569  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2570    dvidir=$ac_optarg ;;
2571
2572  -enable-* | --enable-*)
2573    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2574    # Reject names that are not valid shell variable names.
2575    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2576      as_fn_error $? "invalid feature name: $ac_useropt"
2577    ac_useropt_orig=$ac_useropt
2578    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2579    case $ac_user_opts in
2580      *"
2581"enable_$ac_useropt"
2582"*) ;;
2583      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2584	 ac_unrecognized_sep=', ';;
2585    esac
2586    eval enable_$ac_useropt=\$ac_optarg ;;
2587
2588  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2589  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2590  | --exec | --exe | --ex)
2591    ac_prev=exec_prefix ;;
2592  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2593  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2594  | --exec=* | --exe=* | --ex=*)
2595    exec_prefix=$ac_optarg ;;
2596
2597  -gas | --gas | --ga | --g)
2598    # Obsolete; use --with-gas.
2599    with_gas=yes ;;
2600
2601  -help | --help | --hel | --he | -h)
2602    ac_init_help=long ;;
2603  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2604    ac_init_help=recursive ;;
2605  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2606    ac_init_help=short ;;
2607
2608  -host | --host | --hos | --ho)
2609    ac_prev=host_alias ;;
2610  -host=* | --host=* | --hos=* | --ho=*)
2611    host_alias=$ac_optarg ;;
2612
2613  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2614    ac_prev=htmldir ;;
2615  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2616  | --ht=*)
2617    htmldir=$ac_optarg ;;
2618
2619  -includedir | --includedir | --includedi | --included | --include \
2620  | --includ | --inclu | --incl | --inc)
2621    ac_prev=includedir ;;
2622  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2623  | --includ=* | --inclu=* | --incl=* | --inc=*)
2624    includedir=$ac_optarg ;;
2625
2626  -infodir | --infodir | --infodi | --infod | --info | --inf)
2627    ac_prev=infodir ;;
2628  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2629    infodir=$ac_optarg ;;
2630
2631  -libdir | --libdir | --libdi | --libd)
2632    ac_prev=libdir ;;
2633  -libdir=* | --libdir=* | --libdi=* | --libd=*)
2634    libdir=$ac_optarg ;;
2635
2636  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2637  | --libexe | --libex | --libe)
2638    ac_prev=libexecdir ;;
2639  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2640  | --libexe=* | --libex=* | --libe=*)
2641    libexecdir=$ac_optarg ;;
2642
2643  -localedir | --localedir | --localedi | --localed | --locale)
2644    ac_prev=localedir ;;
2645  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2646    localedir=$ac_optarg ;;
2647
2648  -localstatedir | --localstatedir | --localstatedi | --localstated \
2649  | --localstate | --localstat | --localsta | --localst | --locals)
2650    ac_prev=localstatedir ;;
2651  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2652  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2653    localstatedir=$ac_optarg ;;
2654
2655  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2656    ac_prev=mandir ;;
2657  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2658    mandir=$ac_optarg ;;
2659
2660  -nfp | --nfp | --nf)
2661    # Obsolete; use --without-fp.
2662    with_fp=no ;;
2663
2664  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2665  | --no-cr | --no-c | -n)
2666    no_create=yes ;;
2667
2668  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2669  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2670    no_recursion=yes ;;
2671
2672  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2673  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2674  | --oldin | --oldi | --old | --ol | --o)
2675    ac_prev=oldincludedir ;;
2676  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2677  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2678  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2679    oldincludedir=$ac_optarg ;;
2680
2681  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2682    ac_prev=prefix ;;
2683  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2684    prefix=$ac_optarg ;;
2685
2686  -program-prefix | --program-prefix | --program-prefi | --program-pref \
2687  | --program-pre | --program-pr | --program-p)
2688    ac_prev=program_prefix ;;
2689  -program-prefix=* | --program-prefix=* | --program-prefi=* \
2690  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2691    program_prefix=$ac_optarg ;;
2692
2693  -program-suffix | --program-suffix | --program-suffi | --program-suff \
2694  | --program-suf | --program-su | --program-s)
2695    ac_prev=program_suffix ;;
2696  -program-suffix=* | --program-suffix=* | --program-suffi=* \
2697  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2698    program_suffix=$ac_optarg ;;
2699
2700  -program-transform-name | --program-transform-name \
2701  | --program-transform-nam | --program-transform-na \
2702  | --program-transform-n | --program-transform- \
2703  | --program-transform | --program-transfor \
2704  | --program-transfo | --program-transf \
2705  | --program-trans | --program-tran \
2706  | --progr-tra | --program-tr | --program-t)
2707    ac_prev=program_transform_name ;;
2708  -program-transform-name=* | --program-transform-name=* \
2709  | --program-transform-nam=* | --program-transform-na=* \
2710  | --program-transform-n=* | --program-transform-=* \
2711  | --program-transform=* | --program-transfor=* \
2712  | --program-transfo=* | --program-transf=* \
2713  | --program-trans=* | --program-tran=* \
2714  | --progr-tra=* | --program-tr=* | --program-t=*)
2715    program_transform_name=$ac_optarg ;;
2716
2717  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2718    ac_prev=pdfdir ;;
2719  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2720    pdfdir=$ac_optarg ;;
2721
2722  -psdir | --psdir | --psdi | --psd | --ps)
2723    ac_prev=psdir ;;
2724  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2725    psdir=$ac_optarg ;;
2726
2727  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2728  | -silent | --silent | --silen | --sile | --sil)
2729    silent=yes ;;
2730
2731  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2732    ac_prev=sbindir ;;
2733  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2734  | --sbi=* | --sb=*)
2735    sbindir=$ac_optarg ;;
2736
2737  -sharedstatedir | --sharedstatedir | --sharedstatedi \
2738  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2739  | --sharedst | --shareds | --shared | --share | --shar \
2740  | --sha | --sh)
2741    ac_prev=sharedstatedir ;;
2742  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2743  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2744  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2745  | --sha=* | --sh=*)
2746    sharedstatedir=$ac_optarg ;;
2747
2748  -site | --site | --sit)
2749    ac_prev=site ;;
2750  -site=* | --site=* | --sit=*)
2751    site=$ac_optarg ;;
2752
2753  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2754    ac_prev=srcdir ;;
2755  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2756    srcdir=$ac_optarg ;;
2757
2758  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2759  | --syscon | --sysco | --sysc | --sys | --sy)
2760    ac_prev=sysconfdir ;;
2761  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2762  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2763    sysconfdir=$ac_optarg ;;
2764
2765  -target | --target | --targe | --targ | --tar | --ta | --t)
2766    ac_prev=target_alias ;;
2767  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2768    target_alias=$ac_optarg ;;
2769
2770  -v | -verbose | --verbose | --verbos | --verbo | --verb)
2771    verbose=yes ;;
2772
2773  -version | --version | --versio | --versi | --vers | -V)
2774    ac_init_version=: ;;
2775
2776  -with-* | --with-*)
2777    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2778    # Reject names that are not valid shell variable names.
2779    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2780      as_fn_error $? "invalid package name: $ac_useropt"
2781    ac_useropt_orig=$ac_useropt
2782    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2783    case $ac_user_opts in
2784      *"
2785"with_$ac_useropt"
2786"*) ;;
2787      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2788	 ac_unrecognized_sep=', ';;
2789    esac
2790    eval with_$ac_useropt=\$ac_optarg ;;
2791
2792  -without-* | --without-*)
2793    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2794    # Reject names that are not valid shell variable names.
2795    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2796      as_fn_error $? "invalid package name: $ac_useropt"
2797    ac_useropt_orig=$ac_useropt
2798    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2799    case $ac_user_opts in
2800      *"
2801"with_$ac_useropt"
2802"*) ;;
2803      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2804	 ac_unrecognized_sep=', ';;
2805    esac
2806    eval with_$ac_useropt=no ;;
2807
2808  --x)
2809    # Obsolete; use --with-x.
2810    with_x=yes ;;
2811
2812  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2813  | --x-incl | --x-inc | --x-in | --x-i)
2814    ac_prev=x_includes ;;
2815  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2816  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2817    x_includes=$ac_optarg ;;
2818
2819  -x-libraries | --x-libraries | --x-librarie | --x-librari \
2820  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2821    ac_prev=x_libraries ;;
2822  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2823  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2824    x_libraries=$ac_optarg ;;
2825
2826  -*) as_fn_error $? "unrecognized option: \`$ac_option'
2827Try \`$0 --help' for more information"
2828    ;;
2829
2830  *=*)
2831    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2832    # Reject names that are not valid shell variable names.
2833    case $ac_envvar in #(
2834      '' | [0-9]* | *[!_$as_cr_alnum]* )
2835      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2836    esac
2837    eval $ac_envvar=\$ac_optarg
2838    export $ac_envvar ;;
2839
2840  *)
2841    # FIXME: should be removed in autoconf 3.0.
2842    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2843    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2844      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2845    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2846    ;;
2847
2848  esac
2849done
2850
2851if test -n "$ac_prev"; then
2852  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2853  as_fn_error $? "missing argument to $ac_option"
2854fi
2855
2856if test -n "$ac_unrecognized_opts"; then
2857  case $enable_option_checking in
2858    no) ;;
2859    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2860    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2861  esac
2862fi
2863
2864# Check all directory arguments for consistency.
2865for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
2866		datadir sysconfdir sharedstatedir localstatedir includedir \
2867		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2868		libdir localedir mandir
2869do
2870  eval ac_val=\$$ac_var
2871  # Remove trailing slashes.
2872  case $ac_val in
2873    */ )
2874      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2875      eval $ac_var=\$ac_val;;
2876  esac
2877  # Be sure to have absolute directory names.
2878  case $ac_val in
2879    [\\/$]* | ?:[\\/]* )  continue;;
2880    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2881  esac
2882  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2883done
2884
2885# There might be people who depend on the old broken behavior: `$host'
2886# used to hold the argument of --host etc.
2887# FIXME: To remove some day.
2888build=$build_alias
2889host=$host_alias
2890target=$target_alias
2891
2892# FIXME: To remove some day.
2893if test "x$host_alias" != x; then
2894  if test "x$build_alias" = x; then
2895    cross_compiling=maybe
2896  elif test "x$build_alias" != "x$host_alias"; then
2897    cross_compiling=yes
2898  fi
2899fi
2900
2901ac_tool_prefix=
2902test -n "$host_alias" && ac_tool_prefix=$host_alias-
2903
2904test "$silent" = yes && exec 6>/dev/null
2905
2906
2907ac_pwd=`pwd` && test -n "$ac_pwd" &&
2908ac_ls_di=`ls -di .` &&
2909ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2910  as_fn_error $? "working directory cannot be determined"
2911test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2912  as_fn_error $? "pwd does not report name of working directory"
2913
2914
2915# Find the source files, if location was not specified.
2916if test -z "$srcdir"; then
2917  ac_srcdir_defaulted=yes
2918  # Try the directory containing this script, then the parent directory.
2919  ac_confdir=`$as_dirname -- "$as_myself" ||
2920$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2921	 X"$as_myself" : 'X\(//\)[^/]' \| \
2922	 X"$as_myself" : 'X\(//\)$' \| \
2923	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2924$as_echo X"$as_myself" |
2925    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2926	    s//\1/
2927	    q
2928	  }
2929	  /^X\(\/\/\)[^/].*/{
2930	    s//\1/
2931	    q
2932	  }
2933	  /^X\(\/\/\)$/{
2934	    s//\1/
2935	    q
2936	  }
2937	  /^X\(\/\).*/{
2938	    s//\1/
2939	    q
2940	  }
2941	  s/.*/./; q'`
2942  srcdir=$ac_confdir
2943  if test ! -r "$srcdir/$ac_unique_file"; then
2944    srcdir=..
2945  fi
2946else
2947  ac_srcdir_defaulted=no
2948fi
2949if test ! -r "$srcdir/$ac_unique_file"; then
2950  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2951  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2952fi
2953ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2954ac_abs_confdir=`(
2955	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2956	pwd)`
2957# When building in place, set srcdir=.
2958if test "$ac_abs_confdir" = "$ac_pwd"; then
2959  srcdir=.
2960fi
2961# Remove unnecessary trailing slashes from srcdir.
2962# Double slashes in file names in object file debugging info
2963# mess up M-x gdb in Emacs.
2964case $srcdir in
2965*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2966esac
2967for ac_var in $ac_precious_vars; do
2968  eval ac_env_${ac_var}_set=\${${ac_var}+set}
2969  eval ac_env_${ac_var}_value=\$${ac_var}
2970  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2971  eval ac_cv_env_${ac_var}_value=\$${ac_var}
2972done
2973
2974#
2975# Report the --help message.
2976#
2977if test "$ac_init_help" = "long"; then
2978  # Omit some internal or obsolete options to make the list less imposing.
2979  # This message is too long to be a string in the A/UX 3.1 sh.
2980  cat <<_ACEOF
2981\`configure' configures gettext-tools 0.21 to adapt to many kinds of systems.
2982
2983Usage: $0 [OPTION]... [VAR=VALUE]...
2984
2985To assign environment variables (e.g., CC, CFLAGS...), specify them as
2986VAR=VALUE.  See below for descriptions of some of the useful variables.
2987
2988Defaults for the options are specified in brackets.
2989
2990Configuration:
2991  -h, --help              display this help and exit
2992      --help=short        display options specific to this package
2993      --help=recursive    display the short help of all the included packages
2994  -V, --version           display version information and exit
2995  -q, --quiet, --silent   do not print \`checking ...' messages
2996      --cache-file=FILE   cache test results in FILE [disabled]
2997  -C, --config-cache      alias for \`--cache-file=config.cache'
2998  -n, --no-create         do not create output files
2999      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
3000
3001Installation directories:
3002  --prefix=PREFIX         install architecture-independent files in PREFIX
3003                          [$ac_default_prefix]
3004  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
3005                          [PREFIX]
3006
3007By default, \`make install' will install all the files in
3008\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
3009an installation prefix other than \`$ac_default_prefix' using \`--prefix',
3010for instance \`--prefix=\$HOME'.
3011
3012For better control, use the options below.
3013
3014Fine tuning of the installation directories:
3015  --bindir=DIR            user executables [EPREFIX/bin]
3016  --sbindir=DIR           system admin executables [EPREFIX/sbin]
3017  --libexecdir=DIR        program executables [EPREFIX/libexec]
3018  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
3019  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
3020  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
3021  --libdir=DIR            object code libraries [EPREFIX/lib]
3022  --includedir=DIR        C header files [PREFIX/include]
3023  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
3024  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
3025  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
3026  --infodir=DIR           info documentation [DATAROOTDIR/info]
3027  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
3028  --mandir=DIR            man documentation [DATAROOTDIR/man]
3029  --docdir=DIR            documentation root [DATAROOTDIR/doc/gettext-tools]
3030  --htmldir=DIR           html documentation [DOCDIR]
3031  --dvidir=DIR            dvi documentation [DOCDIR]
3032  --pdfdir=DIR            pdf documentation [DOCDIR]
3033  --psdir=DIR             ps documentation [DOCDIR]
3034_ACEOF
3035
3036  cat <<\_ACEOF
3037
3038Program names:
3039  --program-prefix=PREFIX            prepend PREFIX to installed program names
3040  --program-suffix=SUFFIX            append SUFFIX to installed program names
3041  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
3042
3043System types:
3044  --build=BUILD     configure for building on BUILD [guessed]
3045  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
3046_ACEOF
3047fi
3048
3049if test -n "$ac_init_help"; then
3050  case $ac_init_help in
3051     short | recursive ) echo "Configuration of gettext-tools 0.21:";;
3052   esac
3053  cat <<\_ACEOF
3054
3055Optional Features:
3056  --disable-option-checking  ignore unrecognized --enable/--with options
3057  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
3058  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
3059  --enable-silent-rules   less verbose build output (undo: "make V=1")
3060  --disable-silent-rules  verbose build output (undo: "make V=0")
3061  --enable-dependency-tracking
3062                          do not reject slow dependency extractors
3063  --disable-dependency-tracking
3064                          speeds up one-time build
3065  --disable-java          do not build Java sources
3066  --enable-csharp[=IMPL]  choose preferred C# implementation (mono)
3067  --disable-largefile     omit support for large files
3068  --enable-threads={isoc|posix|isoc+posix|windows}
3069                          specify multithreading API
3070  --disable-threads       build without multithread safety
3071  --enable-shared[=PKGS]  build shared libraries [default=yes]
3072  --enable-static[=PKGS]  build static libraries [default=yes]
3073  --enable-fast-install[=PKGS]
3074                          optimize for fast installation [default=yes]
3075  --disable-libtool-lock  avoid locking (might break parallel builds)
3076  --disable-nls           do not use Native Language Support
3077  --disable-rpath         do not hardcode runtime library paths
3078  --disable-c++           do not build C++ sources
3079  --disable-openmp        do not use OpenMP
3080  --enable-cross-guesses={conservative|risky}
3081                          specify policy for cross-compilation guesses
3082  --disable-acl           do not support ACLs
3083  --enable-relocatable    install a package that can be moved in the file
3084                          system
3085
3086Optional Packages:
3087  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
3088  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
3089  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
3090                          both]
3091  --with-aix-soname=aix|svr4|both
3092                          shared library versioning (aka "SONAME") variant to
3093                          provide on AIX, [default=aix].
3094  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
3095  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
3096                          compiler's sysroot if not specified).
3097  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
3098  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
3099  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
3100  --with-included-gettext use the GNU gettext library included here
3101  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
3102  --without-libintl-prefix     don't search for libintl in includedir and libdir
3103  --with-installed-libtextstyle
3104                          Use an already installed libtextstyle.
3105  --with-libtextstyle-prefix[=DIR]  search for libtextstyle in DIR/include and DIR/lib
3106  --without-libtextstyle-prefix     don't search for libtextstyle in includedir and libdir
3107  --with-installed-csharp-dll
3108                          Use an already installed C# DLL.
3109  --with-bison-prefix=DIR  search for bison's runtime data in DIR/share
3110  --with-included-libunistring  use the libunistring parts included here
3111  --with-libunistring-prefix[=DIR]  search for libunistring in DIR/include and DIR/lib
3112  --without-libunistring-prefix     don't search for libunistring in includedir and libdir
3113  --with-included-libxml  use the libxml2 included here
3114  --with-libxml2-prefix[=DIR]  search for libxml2 in DIR/include and DIR/lib
3115  --without-libxml2-prefix     don't search for libxml2 in includedir and libdir
3116  --without-included-regex
3117                          don't compile regex; this is the default on systems
3118                          with recent-enough versions of the GNU C Library
3119                          (use with caution on other systems).
3120  --without-emacs         do not use Emacs, don't install po-mode
3121  --with-lispdir          override the default lisp directory
3122  --without-git           don't use git to compress the infrastructure archive
3123  --with-cvs              use cvs to compress the infrastructure archive
3124                          (deprecated)
3125  --without-bzip2         don't use bzip2 to compress the infrastructure archive
3126  --without-xz            don't use xz to compress the infrastructure archive
3127
3128Some influential environment variables:
3129  CC          C compiler command
3130  CFLAGS      C compiler flags
3131  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
3132              nonstandard directory <lib dir>
3133  LIBS        libraries to pass to the linker, e.g. -l<library>
3134  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
3135              you have headers in a nonstandard directory <include dir>
3136  CPP         C preprocessor
3137  LT_SYS_LIBRARY_PATH
3138              User-defined run-time library search path.
3139  CXX         C++ compiler command
3140  CXXFLAGS    C++ compiler flags
3141  YACC        The "Yet Another C Compiler" implementation to use. Defaults to
3142              'bison -o y.tab.c'. Values other than 'bison -o y.tab.c' will
3143              most likely break on most systems.
3144  YFLAGS      YFLAGS contains the list arguments that will be passed by
3145              default to Bison. This script will default YFLAGS to the empty
3146              string to avoid a default value of '-d' given by some make
3147              applications.
3148  EMACS       the Emacs editor command
3149  EMACSLOADPATH
3150              the Emacs library search path
3151  CXXCPP      C++ preprocessor
3152
3153Use these variables to override the choices made by `configure' or to help
3154it to find libraries and programs with nonstandard names/locations.
3155
3156Report bugs to <bug-gettext@gnu.org>.
3157_ACEOF
3158ac_status=$?
3159fi
3160
3161if test "$ac_init_help" = "recursive"; then
3162  # If there are subdirs, report their specific --help.
3163  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
3164    test -d "$ac_dir" ||
3165      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
3166      continue
3167    ac_builddir=.
3168
3169case "$ac_dir" in
3170.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
3171*)
3172  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
3173  # A ".." for each directory in $ac_dir_suffix.
3174  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
3175  case $ac_top_builddir_sub in
3176  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
3177  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
3178  esac ;;
3179esac
3180ac_abs_top_builddir=$ac_pwd
3181ac_abs_builddir=$ac_pwd$ac_dir_suffix
3182# for backward compatibility:
3183ac_top_builddir=$ac_top_build_prefix
3184
3185case $srcdir in
3186  .)  # We are building in place.
3187    ac_srcdir=.
3188    ac_top_srcdir=$ac_top_builddir_sub
3189    ac_abs_top_srcdir=$ac_pwd ;;
3190  [\\/]* | ?:[\\/]* )  # Absolute name.
3191    ac_srcdir=$srcdir$ac_dir_suffix;
3192    ac_top_srcdir=$srcdir
3193    ac_abs_top_srcdir=$srcdir ;;
3194  *) # Relative name.
3195    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
3196    ac_top_srcdir=$ac_top_build_prefix$srcdir
3197    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
3198esac
3199ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
3200
3201    cd "$ac_dir" || { ac_status=$?; continue; }
3202    # Check for guested configure.
3203    if test -f "$ac_srcdir/configure.gnu"; then
3204      echo &&
3205      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
3206    elif test -f "$ac_srcdir/configure"; then
3207      echo &&
3208      $SHELL "$ac_srcdir/configure" --help=recursive
3209    else
3210      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
3211    fi || ac_status=$?
3212    cd "$ac_pwd" || { ac_status=$?; break; }
3213  done
3214fi
3215
3216test -n "$ac_init_help" && exit $ac_status
3217if $ac_init_version; then
3218  cat <<\_ACEOF
3219gettext-tools configure 0.21
3220generated by GNU Autoconf 2.69
3221
3222Copyright (C) 2012 Free Software Foundation, Inc.
3223This configure script is free software; the Free Software Foundation
3224gives unlimited permission to copy, distribute and modify it.
3225_ACEOF
3226  exit
3227fi
3228
3229## ------------------------ ##
3230## Autoconf initialization. ##
3231## ------------------------ ##
3232
3233# ac_fn_c_try_compile LINENO
3234# --------------------------
3235# Try to compile conftest.$ac_ext, and return whether this succeeded.
3236ac_fn_c_try_compile ()
3237{
3238  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3239  rm -f conftest.$ac_objext
3240  if { { ac_try="$ac_compile"
3241case "(($ac_try" in
3242  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3243  *) ac_try_echo=$ac_try;;
3244esac
3245eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3246$as_echo "$ac_try_echo"; } >&5
3247  (eval "$ac_compile") 2>conftest.err
3248  ac_status=$?
3249  if test -s conftest.err; then
3250    grep -v '^ *+' conftest.err >conftest.er1
3251    cat conftest.er1 >&5
3252    mv -f conftest.er1 conftest.err
3253  fi
3254  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3255  test $ac_status = 0; } && {
3256	 test -z "$ac_c_werror_flag" ||
3257	 test ! -s conftest.err
3258       } && test -s conftest.$ac_objext; then :
3259  ac_retval=0
3260else
3261  $as_echo "$as_me: failed program was:" >&5
3262sed 's/^/| /' conftest.$ac_ext >&5
3263
3264	ac_retval=1
3265fi
3266  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3267  as_fn_set_status $ac_retval
3268
3269} # ac_fn_c_try_compile
3270
3271# ac_fn_c_try_cpp LINENO
3272# ----------------------
3273# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3274ac_fn_c_try_cpp ()
3275{
3276  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3277  if { { ac_try="$ac_cpp conftest.$ac_ext"
3278case "(($ac_try" in
3279  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3280  *) ac_try_echo=$ac_try;;
3281esac
3282eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3283$as_echo "$ac_try_echo"; } >&5
3284  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3285  ac_status=$?
3286  if test -s conftest.err; then
3287    grep -v '^ *+' conftest.err >conftest.er1
3288    cat conftest.er1 >&5
3289    mv -f conftest.er1 conftest.err
3290  fi
3291  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3292  test $ac_status = 0; } > conftest.i && {
3293	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3294	 test ! -s conftest.err
3295       }; then :
3296  ac_retval=0
3297else
3298  $as_echo "$as_me: failed program was:" >&5
3299sed 's/^/| /' conftest.$ac_ext >&5
3300
3301    ac_retval=1
3302fi
3303  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3304  as_fn_set_status $ac_retval
3305
3306} # ac_fn_c_try_cpp
3307
3308# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
3309# -------------------------------------------------------
3310# Tests whether HEADER exists, giving a warning if it cannot be compiled using
3311# the include files in INCLUDES and setting the cache variable VAR
3312# accordingly.
3313ac_fn_c_check_header_mongrel ()
3314{
3315  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3316  if eval \${$3+:} false; then :
3317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3318$as_echo_n "checking for $2... " >&6; }
3319if eval \${$3+:} false; then :
3320  $as_echo_n "(cached) " >&6
3321fi
3322eval ac_res=\$$3
3323	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3324$as_echo "$ac_res" >&6; }
3325else
3326  # Is the header compilable?
3327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
3328$as_echo_n "checking $2 usability... " >&6; }
3329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3330/* end confdefs.h.  */
3331$4
3332#include <$2>
3333_ACEOF
3334if ac_fn_c_try_compile "$LINENO"; then :
3335  ac_header_compiler=yes
3336else
3337  ac_header_compiler=no
3338fi
3339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
3341$as_echo "$ac_header_compiler" >&6; }
3342
3343# Is the header present?
3344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
3345$as_echo_n "checking $2 presence... " >&6; }
3346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3347/* end confdefs.h.  */
3348#include <$2>
3349_ACEOF
3350if ac_fn_c_try_cpp "$LINENO"; then :
3351  ac_header_preproc=yes
3352else
3353  ac_header_preproc=no
3354fi
3355rm -f conftest.err conftest.i conftest.$ac_ext
3356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
3357$as_echo "$ac_header_preproc" >&6; }
3358
3359# So?  What about this header?
3360case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
3361  yes:no: )
3362    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
3363$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
3364    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3365$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3366    ;;
3367  no:yes:* )
3368    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
3369$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
3370    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
3371$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
3372    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
3373$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
3374    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
3375$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
3376    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3377$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3378( $as_echo "## ---------------------------------- ##
3379## Report this to bug-gettext@gnu.org ##
3380## ---------------------------------- ##"
3381     ) | sed "s/^/$as_me: WARNING:     /" >&2
3382    ;;
3383esac
3384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3385$as_echo_n "checking for $2... " >&6; }
3386if eval \${$3+:} false; then :
3387  $as_echo_n "(cached) " >&6
3388else
3389  eval "$3=\$ac_header_compiler"
3390fi
3391eval ac_res=\$$3
3392	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3393$as_echo "$ac_res" >&6; }
3394fi
3395  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3396
3397} # ac_fn_c_check_header_mongrel
3398
3399# ac_fn_c_try_run LINENO
3400# ----------------------
3401# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
3402# that executables *can* be run.
3403ac_fn_c_try_run ()
3404{
3405  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3406  if { { ac_try="$ac_link"
3407case "(($ac_try" in
3408  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3409  *) ac_try_echo=$ac_try;;
3410esac
3411eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3412$as_echo "$ac_try_echo"; } >&5
3413  (eval "$ac_link") 2>&5
3414  ac_status=$?
3415  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3416  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3417  { { case "(($ac_try" in
3418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3419  *) ac_try_echo=$ac_try;;
3420esac
3421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3422$as_echo "$ac_try_echo"; } >&5
3423  (eval "$ac_try") 2>&5
3424  ac_status=$?
3425  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3426  test $ac_status = 0; }; }; then :
3427  ac_retval=0
3428else
3429  $as_echo "$as_me: program exited with status $ac_status" >&5
3430       $as_echo "$as_me: failed program was:" >&5
3431sed 's/^/| /' conftest.$ac_ext >&5
3432
3433       ac_retval=$ac_status
3434fi
3435  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3436  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3437  as_fn_set_status $ac_retval
3438
3439} # ac_fn_c_try_run
3440
3441# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3442# -------------------------------------------------------
3443# Tests whether HEADER exists and can be compiled using the include files in
3444# INCLUDES, setting the cache variable VAR accordingly.
3445ac_fn_c_check_header_compile ()
3446{
3447  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3449$as_echo_n "checking for $2... " >&6; }
3450if eval \${$3+:} false; then :
3451  $as_echo_n "(cached) " >&6
3452else
3453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3454/* end confdefs.h.  */
3455$4
3456#include <$2>
3457_ACEOF
3458if ac_fn_c_try_compile "$LINENO"; then :
3459  eval "$3=yes"
3460else
3461  eval "$3=no"
3462fi
3463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3464fi
3465eval ac_res=\$$3
3466	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3467$as_echo "$ac_res" >&6; }
3468  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3469
3470} # ac_fn_c_check_header_compile
3471
3472# ac_fn_c_try_link LINENO
3473# -----------------------
3474# Try to link conftest.$ac_ext, and return whether this succeeded.
3475ac_fn_c_try_link ()
3476{
3477  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3478  rm -f conftest.$ac_objext conftest$ac_exeext
3479  if { { ac_try="$ac_link"
3480case "(($ac_try" in
3481  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3482  *) ac_try_echo=$ac_try;;
3483esac
3484eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3485$as_echo "$ac_try_echo"; } >&5
3486  (eval "$ac_link") 2>conftest.err
3487  ac_status=$?
3488  if test -s conftest.err; then
3489    grep -v '^ *+' conftest.err >conftest.er1
3490    cat conftest.er1 >&5
3491    mv -f conftest.er1 conftest.err
3492  fi
3493  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3494  test $ac_status = 0; } && {
3495	 test -z "$ac_c_werror_flag" ||
3496	 test ! -s conftest.err
3497       } && test -s conftest$ac_exeext && {
3498	 test "$cross_compiling" = yes ||
3499	 test -x conftest$ac_exeext
3500       }; then :
3501  ac_retval=0
3502else
3503  $as_echo "$as_me: failed program was:" >&5
3504sed 's/^/| /' conftest.$ac_ext >&5
3505
3506	ac_retval=1
3507fi
3508  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3509  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3510  # interfere with the next link command; also delete a directory that is
3511  # left behind by Apple's compiler.  We do this before executing the actions.
3512  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3513  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3514  as_fn_set_status $ac_retval
3515
3516} # ac_fn_c_try_link
3517
3518# ac_fn_c_check_func LINENO FUNC VAR
3519# ----------------------------------
3520# Tests whether FUNC exists, setting the cache variable VAR accordingly
3521ac_fn_c_check_func ()
3522{
3523  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3525$as_echo_n "checking for $2... " >&6; }
3526if eval \${$3+:} false; then :
3527  $as_echo_n "(cached) " >&6
3528else
3529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3530/* end confdefs.h.  */
3531/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3532   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3533#define $2 innocuous_$2
3534
3535/* System header to define __stub macros and hopefully few prototypes,
3536    which can conflict with char $2 (); below.
3537    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3538    <limits.h> exists even on freestanding compilers.  */
3539
3540#ifdef __STDC__
3541# include <limits.h>
3542#else
3543# include <assert.h>
3544#endif
3545
3546#undef $2
3547
3548/* Override any GCC internal prototype to avoid an error.
3549   Use char because int might match the return type of a GCC
3550   builtin and then its argument prototype would still apply.  */
3551#ifdef __cplusplus
3552extern "C"
3553#endif
3554char $2 ();
3555/* The GNU C library defines this for functions which it implements
3556    to always fail with ENOSYS.  Some functions are actually named
3557    something starting with __ and the normal name is an alias.  */
3558#if defined __stub_$2 || defined __stub___$2
3559choke me
3560#endif
3561
3562int
3563main ()
3564{
3565return $2 ();
3566  ;
3567  return 0;
3568}
3569_ACEOF
3570if ac_fn_c_try_link "$LINENO"; then :
3571  eval "$3=yes"
3572else
3573  eval "$3=no"
3574fi
3575rm -f core conftest.err conftest.$ac_objext \
3576    conftest$ac_exeext conftest.$ac_ext
3577fi
3578eval ac_res=\$$3
3579	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3580$as_echo "$ac_res" >&6; }
3581  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3582
3583} # ac_fn_c_check_func
3584
3585# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3586# -------------------------------------------
3587# Tests whether TYPE exists after having included INCLUDES, setting cache
3588# variable VAR accordingly.
3589ac_fn_c_check_type ()
3590{
3591  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3593$as_echo_n "checking for $2... " >&6; }
3594if eval \${$3+:} false; then :
3595  $as_echo_n "(cached) " >&6
3596else
3597  eval "$3=no"
3598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3599/* end confdefs.h.  */
3600$4
3601int
3602main ()
3603{
3604if (sizeof ($2))
3605	 return 0;
3606  ;
3607  return 0;
3608}
3609_ACEOF
3610if ac_fn_c_try_compile "$LINENO"; then :
3611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3612/* end confdefs.h.  */
3613$4
3614int
3615main ()
3616{
3617if (sizeof (($2)))
3618	    return 0;
3619  ;
3620  return 0;
3621}
3622_ACEOF
3623if ac_fn_c_try_compile "$LINENO"; then :
3624
3625else
3626  eval "$3=yes"
3627fi
3628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3629fi
3630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3631fi
3632eval ac_res=\$$3
3633	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3634$as_echo "$ac_res" >&6; }
3635  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3636
3637} # ac_fn_c_check_type
3638
3639# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3640# ---------------------------------------------
3641# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3642# accordingly.
3643ac_fn_c_check_decl ()
3644{
3645  ac_save_ac_compile="$ac_compile"
3646  if test -n "$ac_compile_for_check_decl"; then
3647    ac_compile="$ac_compile_for_check_decl"
3648  fi
3649  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3650  as_decl_name=`echo $2|sed 's/ *(.*//'`
3651  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3653$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3654if eval \${$3+:} false; then :
3655  $as_echo_n "(cached) " >&6
3656else
3657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3658/* end confdefs.h.  */
3659$4
3660int
3661main ()
3662{
3663#ifndef $as_decl_name
3664#ifdef __cplusplus
3665  (void) $as_decl_use;
3666#else
3667  (void) $as_decl_name;
3668#endif
3669#endif
3670
3671  ;
3672  return 0;
3673}
3674_ACEOF
3675if ac_fn_c_try_compile "$LINENO"; then :
3676  eval "$3=yes"
3677else
3678  eval "$3=no"
3679fi
3680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3681fi
3682eval ac_res=\$$3
3683	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3684$as_echo "$ac_res" >&6; }
3685  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3686  ac_compile="$ac_save_ac_compile"
3687
3688} # ac_fn_c_check_decl
3689
3690# ac_fn_cxx_try_compile LINENO
3691# ----------------------------
3692# Try to compile conftest.$ac_ext, and return whether this succeeded.
3693ac_fn_cxx_try_compile ()
3694{
3695  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3696  rm -f conftest.$ac_objext
3697  if { { ac_try="$ac_compile"
3698case "(($ac_try" in
3699  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3700  *) ac_try_echo=$ac_try;;
3701esac
3702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3703$as_echo "$ac_try_echo"; } >&5
3704  (eval "$ac_compile") 2>conftest.err
3705  ac_status=$?
3706  if test -s conftest.err; then
3707    grep -v '^ *+' conftest.err >conftest.er1
3708    cat conftest.er1 >&5
3709    mv -f conftest.er1 conftest.err
3710  fi
3711  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3712  test $ac_status = 0; } && {
3713	 test -z "$ac_cxx_werror_flag" ||
3714	 test ! -s conftest.err
3715       } && test -s conftest.$ac_objext; then :
3716  ac_retval=0
3717else
3718  $as_echo "$as_me: failed program was:" >&5
3719sed 's/^/| /' conftest.$ac_ext >&5
3720
3721	ac_retval=1
3722fi
3723  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3724  as_fn_set_status $ac_retval
3725
3726} # ac_fn_cxx_try_compile
3727
3728# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3729# --------------------------------------------
3730# Tries to find the compile-time value of EXPR in a program that includes
3731# INCLUDES, setting VAR accordingly. Returns whether the value could be
3732# computed
3733ac_fn_c_compute_int ()
3734{
3735  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3736  if test "$cross_compiling" = yes; then
3737    # Depending upon the size, compute the lo and hi bounds.
3738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3739/* end confdefs.h.  */
3740$4
3741int
3742main ()
3743{
3744static int test_array [1 - 2 * !(($2) >= 0)];
3745test_array [0] = 0;
3746return test_array [0];
3747
3748  ;
3749  return 0;
3750}
3751_ACEOF
3752if ac_fn_c_try_compile "$LINENO"; then :
3753  ac_lo=0 ac_mid=0
3754  while :; do
3755    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3756/* end confdefs.h.  */
3757$4
3758int
3759main ()
3760{
3761static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3762test_array [0] = 0;
3763return test_array [0];
3764
3765  ;
3766  return 0;
3767}
3768_ACEOF
3769if ac_fn_c_try_compile "$LINENO"; then :
3770  ac_hi=$ac_mid; break
3771else
3772  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3773			if test $ac_lo -le $ac_mid; then
3774			  ac_lo= ac_hi=
3775			  break
3776			fi
3777			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3778fi
3779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3780  done
3781else
3782  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3783/* end confdefs.h.  */
3784$4
3785int
3786main ()
3787{
3788static int test_array [1 - 2 * !(($2) < 0)];
3789test_array [0] = 0;
3790return test_array [0];
3791
3792  ;
3793  return 0;
3794}
3795_ACEOF
3796if ac_fn_c_try_compile "$LINENO"; then :
3797  ac_hi=-1 ac_mid=-1
3798  while :; do
3799    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3800/* end confdefs.h.  */
3801$4
3802int
3803main ()
3804{
3805static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3806test_array [0] = 0;
3807return test_array [0];
3808
3809  ;
3810  return 0;
3811}
3812_ACEOF
3813if ac_fn_c_try_compile "$LINENO"; then :
3814  ac_lo=$ac_mid; break
3815else
3816  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3817			if test $ac_mid -le $ac_hi; then
3818			  ac_lo= ac_hi=
3819			  break
3820			fi
3821			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3822fi
3823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3824  done
3825else
3826  ac_lo= ac_hi=
3827fi
3828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3829fi
3830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3831# Binary search between lo and hi bounds.
3832while test "x$ac_lo" != "x$ac_hi"; do
3833  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3835/* end confdefs.h.  */
3836$4
3837int
3838main ()
3839{
3840static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3841test_array [0] = 0;
3842return test_array [0];
3843
3844  ;
3845  return 0;
3846}
3847_ACEOF
3848if ac_fn_c_try_compile "$LINENO"; then :
3849  ac_hi=$ac_mid
3850else
3851  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3852fi
3853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3854done
3855case $ac_lo in #((
3856?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3857'') ac_retval=1 ;;
3858esac
3859  else
3860    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3861/* end confdefs.h.  */
3862$4
3863static long int longval () { return $2; }
3864static unsigned long int ulongval () { return $2; }
3865#include <stdio.h>
3866#include <stdlib.h>
3867int
3868main ()
3869{
3870
3871  FILE *f = fopen ("conftest.val", "w");
3872  if (! f)
3873    return 1;
3874  if (($2) < 0)
3875    {
3876      long int i = longval ();
3877      if (i != ($2))
3878	return 1;
3879      fprintf (f, "%ld", i);
3880    }
3881  else
3882    {
3883      unsigned long int i = ulongval ();
3884      if (i != ($2))
3885	return 1;
3886      fprintf (f, "%lu", i);
3887    }
3888  /* Do not output a trailing newline, as this causes \r\n confusion
3889     on some platforms.  */
3890  return ferror (f) || fclose (f) != 0;
3891
3892  ;
3893  return 0;
3894}
3895_ACEOF
3896if ac_fn_c_try_run "$LINENO"; then :
3897  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3898else
3899  ac_retval=1
3900fi
3901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3902  conftest.$ac_objext conftest.beam conftest.$ac_ext
3903rm -f conftest.val
3904
3905  fi
3906  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3907  as_fn_set_status $ac_retval
3908
3909} # ac_fn_c_compute_int
3910
3911# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3912# ----------------------------------------------------
3913# Tries to find if the field MEMBER exists in type AGGR, after including
3914# INCLUDES, setting cache variable VAR accordingly.
3915ac_fn_c_check_member ()
3916{
3917  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3919$as_echo_n "checking for $2.$3... " >&6; }
3920if eval \${$4+:} false; then :
3921  $as_echo_n "(cached) " >&6
3922else
3923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3924/* end confdefs.h.  */
3925$5
3926int
3927main ()
3928{
3929static $2 ac_aggr;
3930if (ac_aggr.$3)
3931return 0;
3932  ;
3933  return 0;
3934}
3935_ACEOF
3936if ac_fn_c_try_compile "$LINENO"; then :
3937  eval "$4=yes"
3938else
3939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3940/* end confdefs.h.  */
3941$5
3942int
3943main ()
3944{
3945static $2 ac_aggr;
3946if (sizeof ac_aggr.$3)
3947return 0;
3948  ;
3949  return 0;
3950}
3951_ACEOF
3952if ac_fn_c_try_compile "$LINENO"; then :
3953  eval "$4=yes"
3954else
3955  eval "$4=no"
3956fi
3957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3958fi
3959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3960fi
3961eval ac_res=\$$4
3962	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3963$as_echo "$ac_res" >&6; }
3964  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3965
3966} # ac_fn_c_check_member
3967
3968# ac_fn_cxx_try_cpp LINENO
3969# ------------------------
3970# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3971ac_fn_cxx_try_cpp ()
3972{
3973  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3974  if { { ac_try="$ac_cpp conftest.$ac_ext"
3975case "(($ac_try" in
3976  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3977  *) ac_try_echo=$ac_try;;
3978esac
3979eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3980$as_echo "$ac_try_echo"; } >&5
3981  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3982  ac_status=$?
3983  if test -s conftest.err; then
3984    grep -v '^ *+' conftest.err >conftest.er1
3985    cat conftest.er1 >&5
3986    mv -f conftest.er1 conftest.err
3987  fi
3988  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3989  test $ac_status = 0; } > conftest.i && {
3990	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
3991	 test ! -s conftest.err
3992       }; then :
3993  ac_retval=0
3994else
3995  $as_echo "$as_me: failed program was:" >&5
3996sed 's/^/| /' conftest.$ac_ext >&5
3997
3998    ac_retval=1
3999fi
4000  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
4001  as_fn_set_status $ac_retval
4002
4003} # ac_fn_cxx_try_cpp
4004
4005# ac_fn_cxx_try_link LINENO
4006# -------------------------
4007# Try to link conftest.$ac_ext, and return whether this succeeded.
4008ac_fn_cxx_try_link ()
4009{
4010  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
4011  rm -f conftest.$ac_objext conftest$ac_exeext
4012  if { { ac_try="$ac_link"
4013case "(($ac_try" in
4014  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015  *) ac_try_echo=$ac_try;;
4016esac
4017eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4018$as_echo "$ac_try_echo"; } >&5
4019  (eval "$ac_link") 2>conftest.err
4020  ac_status=$?
4021  if test -s conftest.err; then
4022    grep -v '^ *+' conftest.err >conftest.er1
4023    cat conftest.er1 >&5
4024    mv -f conftest.er1 conftest.err
4025  fi
4026  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4027  test $ac_status = 0; } && {
4028	 test -z "$ac_cxx_werror_flag" ||
4029	 test ! -s conftest.err
4030       } && test -s conftest$ac_exeext && {
4031	 test "$cross_compiling" = yes ||
4032	 test -x conftest$ac_exeext
4033       }; then :
4034  ac_retval=0
4035else
4036  $as_echo "$as_me: failed program was:" >&5
4037sed 's/^/| /' conftest.$ac_ext >&5
4038
4039	ac_retval=1
4040fi
4041  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
4042  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
4043  # interfere with the next link command; also delete a directory that is
4044  # left behind by Apple's compiler.  We do this before executing the actions.
4045  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
4046  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
4047  as_fn_set_status $ac_retval
4048
4049} # ac_fn_cxx_try_link
4050cat >config.log <<_ACEOF
4051This file contains any messages produced by compilers while
4052running configure, to aid debugging if configure makes a mistake.
4053
4054It was created by gettext-tools $as_me 0.21, which was
4055generated by GNU Autoconf 2.69.  Invocation command line was
4056
4057  $ $0 $@
4058
4059_ACEOF
4060exec 5>>config.log
4061{
4062cat <<_ASUNAME
4063## --------- ##
4064## Platform. ##
4065## --------- ##
4066
4067hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
4068uname -m = `(uname -m) 2>/dev/null || echo unknown`
4069uname -r = `(uname -r) 2>/dev/null || echo unknown`
4070uname -s = `(uname -s) 2>/dev/null || echo unknown`
4071uname -v = `(uname -v) 2>/dev/null || echo unknown`
4072
4073/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
4074/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
4075
4076/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
4077/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
4078/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
4079/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
4080/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
4081/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
4082/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
4083
4084_ASUNAME
4085
4086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4087for as_dir in $PATH
4088do
4089  IFS=$as_save_IFS
4090  test -z "$as_dir" && as_dir=.
4091    $as_echo "PATH: $as_dir"
4092  done
4093IFS=$as_save_IFS
4094
4095} >&5
4096
4097cat >&5 <<_ACEOF
4098
4099
4100## ----------- ##
4101## Core tests. ##
4102## ----------- ##
4103
4104_ACEOF
4105
4106
4107# Keep a trace of the command line.
4108# Strip out --no-create and --no-recursion so they do not pile up.
4109# Strip out --silent because we don't want to record it for future runs.
4110# Also quote any args containing shell meta-characters.
4111# Make two passes to allow for proper duplicate-argument suppression.
4112ac_configure_args=
4113ac_configure_args0=
4114ac_configure_args1=
4115ac_must_keep_next=false
4116for ac_pass in 1 2
4117do
4118  for ac_arg
4119  do
4120    case $ac_arg in
4121    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
4122    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
4123    | -silent | --silent | --silen | --sile | --sil)
4124      continue ;;
4125    *\'*)
4126      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
4127    esac
4128    case $ac_pass in
4129    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
4130    2)
4131      as_fn_append ac_configure_args1 " '$ac_arg'"
4132      if test $ac_must_keep_next = true; then
4133	ac_must_keep_next=false # Got value, back to normal.
4134      else
4135	case $ac_arg in
4136	  *=* | --config-cache | -C | -disable-* | --disable-* \
4137	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
4138	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
4139	  | -with-* | --with-* | -without-* | --without-* | --x)
4140	    case "$ac_configure_args0 " in
4141	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
4142	    esac
4143	    ;;
4144	  -* ) ac_must_keep_next=true ;;
4145	esac
4146      fi
4147      as_fn_append ac_configure_args " '$ac_arg'"
4148      ;;
4149    esac
4150  done
4151done
4152{ ac_configure_args0=; unset ac_configure_args0;}
4153{ ac_configure_args1=; unset ac_configure_args1;}
4154
4155# When interrupted or exit'd, cleanup temporary files, and complete
4156# config.log.  We remove comments because anyway the quotes in there
4157# would cause problems or look ugly.
4158# WARNING: Use '\'' to represent an apostrophe within the trap.
4159# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
4160trap 'exit_status=$?
4161  # Save into config.log some information that might help in debugging.
4162  {
4163    echo
4164
4165    $as_echo "## ---------------- ##
4166## Cache variables. ##
4167## ---------------- ##"
4168    echo
4169    # The following way of writing the cache mishandles newlines in values,
4170(
4171  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
4172    eval ac_val=\$$ac_var
4173    case $ac_val in #(
4174    *${as_nl}*)
4175      case $ac_var in #(
4176      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
4177$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
4178      esac
4179      case $ac_var in #(
4180      _ | IFS | as_nl) ;; #(
4181      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
4182      *) { eval $ac_var=; unset $ac_var;} ;;
4183      esac ;;
4184    esac
4185  done
4186  (set) 2>&1 |
4187    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
4188    *${as_nl}ac_space=\ *)
4189      sed -n \
4190	"s/'\''/'\''\\\\'\'''\''/g;
4191	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
4192      ;; #(
4193    *)
4194      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
4195      ;;
4196    esac |
4197    sort
4198)
4199    echo
4200
4201    $as_echo "## ----------------- ##
4202## Output variables. ##
4203## ----------------- ##"
4204    echo
4205    for ac_var in $ac_subst_vars
4206    do
4207      eval ac_val=\$$ac_var
4208      case $ac_val in
4209      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
4210      esac
4211      $as_echo "$ac_var='\''$ac_val'\''"
4212    done | sort
4213    echo
4214
4215    if test -n "$ac_subst_files"; then
4216      $as_echo "## ------------------- ##
4217## File substitutions. ##
4218## ------------------- ##"
4219      echo
4220      for ac_var in $ac_subst_files
4221      do
4222	eval ac_val=\$$ac_var
4223	case $ac_val in
4224	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
4225	esac
4226	$as_echo "$ac_var='\''$ac_val'\''"
4227      done | sort
4228      echo
4229    fi
4230
4231    if test -s confdefs.h; then
4232      $as_echo "## ----------- ##
4233## confdefs.h. ##
4234## ----------- ##"
4235      echo
4236      cat confdefs.h
4237      echo
4238    fi
4239    test "$ac_signal" != 0 &&
4240      $as_echo "$as_me: caught signal $ac_signal"
4241    $as_echo "$as_me: exit $exit_status"
4242  } >&5
4243  rm -f core *.core core.conftest.* &&
4244    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
4245    exit $exit_status
4246' 0
4247for ac_signal in 1 2 13 15; do
4248  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
4249done
4250ac_signal=0
4251
4252# confdefs.h avoids OS command line length limits that DEFS can exceed.
4253rm -f -r conftest* confdefs.h
4254
4255$as_echo "/* confdefs.h */" > confdefs.h
4256
4257# Predefined preprocessor variables.
4258
4259cat >>confdefs.h <<_ACEOF
4260#define PACKAGE_NAME "$PACKAGE_NAME"
4261_ACEOF
4262
4263cat >>confdefs.h <<_ACEOF
4264#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
4265_ACEOF
4266
4267cat >>confdefs.h <<_ACEOF
4268#define PACKAGE_VERSION "$PACKAGE_VERSION"
4269_ACEOF
4270
4271cat >>confdefs.h <<_ACEOF
4272#define PACKAGE_STRING "$PACKAGE_STRING"
4273_ACEOF
4274
4275cat >>confdefs.h <<_ACEOF
4276#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
4277_ACEOF
4278
4279cat >>confdefs.h <<_ACEOF
4280#define PACKAGE_URL "$PACKAGE_URL"
4281_ACEOF
4282
4283
4284# Let the site file select an alternate cache file if it wants to.
4285# Prefer an explicitly selected file to automatically selected ones.
4286ac_site_file1=NONE
4287ac_site_file2=NONE
4288if test -n "$CONFIG_SITE"; then
4289  # We do not want a PATH search for config.site.
4290  case $CONFIG_SITE in #((
4291    -*)  ac_site_file1=./$CONFIG_SITE;;
4292    */*) ac_site_file1=$CONFIG_SITE;;
4293    *)   ac_site_file1=./$CONFIG_SITE;;
4294  esac
4295elif test "x$prefix" != xNONE; then
4296  ac_site_file1=$prefix/share/config.site
4297  ac_site_file2=$prefix/etc/config.site
4298else
4299  ac_site_file1=$ac_default_prefix/share/config.site
4300  ac_site_file2=$ac_default_prefix/etc/config.site
4301fi
4302for ac_site_file in "$ac_site_file1" "$ac_site_file2"
4303do
4304  test "x$ac_site_file" = xNONE && continue
4305  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
4306    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
4307$as_echo "$as_me: loading site script $ac_site_file" >&6;}
4308    sed 's/^/| /' "$ac_site_file" >&5
4309    . "$ac_site_file" \
4310      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4312as_fn_error $? "failed to load site script $ac_site_file
4313See \`config.log' for more details" "$LINENO" 5; }
4314  fi
4315done
4316
4317if test -r "$cache_file"; then
4318  # Some versions of bash will fail to source /dev/null (special files
4319  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
4320  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
4321    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
4322$as_echo "$as_me: loading cache $cache_file" >&6;}
4323    case $cache_file in
4324      [\\/]* | ?:[\\/]* ) . "$cache_file";;
4325      *)                      . "./$cache_file";;
4326    esac
4327  fi
4328else
4329  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
4330$as_echo "$as_me: creating cache $cache_file" >&6;}
4331  >$cache_file
4332fi
4333
4334gl_use_winpthreads_default=no
4335gt_needs="$gt_needs need-ngettext"
4336as_fn_append ac_header_list " stdlib.h"
4337as_fn_append ac_header_list " unistd.h"
4338as_fn_append ac_header_list " sys/param.h"
4339as_fn_append ac_header_list " threads.h"
4340as_fn_append ac_func_list " symlink"
4341as_fn_append ac_func_list " uselocale"
4342as_fn_append ac_header_list " xlocale.h"
4343as_fn_append ac_func_list " fchmod"
4344as_fn_append ac_header_list " pthread.h"
4345as_fn_append ac_func_list " btowc"
4346as_fn_append ac_func_list " canonicalize_file_name"
4347as_fn_append ac_func_list " realpath"
4348as_fn_append ac_func_list " getcwd"
4349as_fn_append ac_func_list " readlink"
4350as_fn_append ac_func_list " readlinkat"
4351as_fn_append ac_func_list " _set_invalid_parameter_handler"
4352as_fn_append ac_header_list " sys/socket.h"
4353as_fn_append ac_header_list " dirent.h"
4354as_fn_append ac_func_list " explicit_bzero"
4355as_fn_append ac_func_list " memset_s"
4356as_fn_append ac_func_list " fcntl"
4357as_fn_append ac_header_list " fnmatch.h"
4358as_fn_append ac_func_list " fnmatch"
4359as_fn_append ac_func_list " mbsrtowcs"
4360as_fn_append ac_header_list " sys/stat.h"
4361as_fn_append ac_func_list " getdelim"
4362as_fn_append ac_func_list " getdtablesize"
4363gl_getopt_required=GNU
4364as_fn_append ac_header_list " getopt.h"
4365as_fn_append ac_header_list " sys/cdefs.h"
4366as_fn_append ac_func_list " getprogname"
4367as_fn_append ac_func_list " getexecname"
4368as_fn_append ac_func_list " getrandom"
4369as_fn_append ac_func_list " gettimeofday"
4370as_fn_append ac_header_list " sys/time.h"
4371as_fn_append ac_header_list " iconv.h"
4372as_fn_append ac_header_list " limits.h"
4373as_fn_append ac_header_list " wchar.h"
4374as_fn_append ac_header_list " stdint.h"
4375as_fn_append ac_header_list " inttypes.h"
4376as_fn_append ac_func_list " isblank"
4377as_fn_append ac_func_list " iswcntrl"
4378as_fn_append ac_header_list " crtdefs.h"
4379as_fn_append ac_header_list " wctype.h"
4380as_fn_append ac_func_list " iswblank"
4381as_fn_append ac_header_list " langinfo.h"
4382as_fn_append ac_header_list " libxml2/libxml/xmlexports.h"
4383as_fn_append ac_header_list " libxml2/libxml/xmlversion.h"
4384as_fn_append ac_func_list " newlocale"
4385as_fn_append ac_func_list " duplocale"
4386as_fn_append ac_func_list " freelocale"
4387as_fn_append ac_func_list " lstat"
4388as_fn_append ac_header_list " math.h"
4389as_fn_append ac_func_list " mbsinit"
4390as_fn_append ac_func_list " mbrtowc"
4391as_fn_append ac_func_list " mbslen"
4392as_fn_append ac_func_list " isascii"
4393as_fn_append ac_header_list " sys/mman.h"
4394as_fn_append ac_func_list " mprotect"
4395as_fn_append ac_func_list " select"
4396as_fn_append ac_func_list " pipe2"
4397as_fn_append ac_func_list " setenv"
4398as_fn_append ac_func_list " secure_getenv"
4399as_fn_append ac_func_list " getuid"
4400as_fn_append ac_func_list " geteuid"
4401as_fn_append ac_func_list " getgid"
4402as_fn_append ac_func_list " getegid"
4403as_fn_append ac_func_list " sigaction"
4404as_fn_append ac_func_list " sigaltstack"
4405as_fn_append ac_func_list " siginterrupt"
4406as_fn_append ac_func_list " snprintf"
4407as_fn_append ac_header_list " spawn.h"
4408as_fn_append ac_func_list " stpncpy"
4409as_fn_append ac_func_list " strerror_r"
4410as_fn_append ac_func_list " __xpg_strerror_r"
4411as_fn_append ac_header_list " sys/random.h"
4412as_fn_append ac_header_list " sys/select.h"
4413as_fn_append ac_header_list " sys/wait.h"
4414as_fn_append ac_func_list " pipe"
4415as_fn_append ac_func_list " utime"
4416as_fn_append ac_header_list " utime.h"
4417as_fn_append ac_func_list " futimes"
4418as_fn_append ac_func_list " futimesat"
4419as_fn_append ac_func_list " futimens"
4420as_fn_append ac_func_list " utimensat"
4421as_fn_append ac_func_list " lutimes"
4422as_fn_append ac_func_list " vasnprintf"
4423as_fn_append ac_header_list " features.h"
4424as_fn_append ac_func_list " wcwidth"
4425as_fn_append ac_func_list " wmempcpy"
4426as_fn_append ac_header_list " arpa/inet.h"
4427as_fn_append ac_header_list " semaphore.h"
4428as_fn_append ac_func_list " mempcpy"
4429as_fn_append ac_func_list " ftruncate"
4430as_fn_append ac_header_list " netdb.h"
4431as_fn_append ac_header_list " netinet/in.h"
4432as_fn_append ac_header_list " priv.h"
4433as_fn_append ac_func_list " pthread_sigmask"
4434as_fn_append ac_func_list " sleep"
4435as_fn_append ac_func_list " catgets"
4436as_fn_append ac_header_list " sys/ioctl.h"
4437as_fn_append ac_func_list " shutdown"
4438as_fn_append ac_header_list " sys/uio.h"
4439as_fn_append ac_func_list " usleep"
4440as_fn_append ac_func_list " mquery"
4441as_fn_append ac_func_list " pstat_getprocvm"
4442as_fn_append ac_func_list " wcrtomb"
4443as_fn_append ac_func_list " wctob"
4444as_fn_append ac_func_list " mbrlen"
4445as_fn_append ac_func_list " nl_langinfo"
4446as_fn_append ac_header_list " malloc.h"
4447as_fn_append ac_func_list " iswctype"
4448as_fn_append ac_func_list " fsync"
4449as_fn_append ac_func_list " tcdrain"
4450as_fn_append ac_func_list " getrlimit"
4451as_fn_append ac_func_list " setrlimit"
4452# Check that the precious variables saved in the cache have kept the same
4453# value.
4454ac_cache_corrupted=false
4455for ac_var in $ac_precious_vars; do
4456  eval ac_old_set=\$ac_cv_env_${ac_var}_set
4457  eval ac_new_set=\$ac_env_${ac_var}_set
4458  eval ac_old_val=\$ac_cv_env_${ac_var}_value
4459  eval ac_new_val=\$ac_env_${ac_var}_value
4460  case $ac_old_set,$ac_new_set in
4461    set,)
4462      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
4463$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
4464      ac_cache_corrupted=: ;;
4465    ,set)
4466      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
4467$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
4468      ac_cache_corrupted=: ;;
4469    ,);;
4470    *)
4471      if test "x$ac_old_val" != "x$ac_new_val"; then
4472	# differences in whitespace do not lead to failure.
4473	ac_old_val_w=`echo x $ac_old_val`
4474	ac_new_val_w=`echo x $ac_new_val`
4475	if test "$ac_old_val_w" != "$ac_new_val_w"; then
4476	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
4477$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
4478	  ac_cache_corrupted=:
4479	else
4480	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
4481$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
4482	  eval $ac_var=\$ac_old_val
4483	fi
4484	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
4485$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
4486	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
4487$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
4488      fi;;
4489  esac
4490  # Pass precious variables to config.status.
4491  if test "$ac_new_set" = set; then
4492    case $ac_new_val in
4493    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4494    *) ac_arg=$ac_var=$ac_new_val ;;
4495    esac
4496    case " $ac_configure_args " in
4497      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
4498      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4499    esac
4500  fi
4501done
4502if $ac_cache_corrupted; then
4503  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4505  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4506$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
4507  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
4508fi
4509## -------------------- ##
4510## Main body of script. ##
4511## -------------------- ##
4512
4513ac_ext=c
4514ac_cpp='$CPP $CPPFLAGS'
4515ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4516ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4517ac_compiler_gnu=$ac_cv_c_compiler_gnu
4518
4519
4520
4521ac_aux_dir=
4522for ac_dir in ../build-aux "$srcdir"/../build-aux; do
4523  if test -f "$ac_dir/install-sh"; then
4524    ac_aux_dir=$ac_dir
4525    ac_install_sh="$ac_aux_dir/install-sh -c"
4526    break
4527  elif test -f "$ac_dir/install.sh"; then
4528    ac_aux_dir=$ac_dir
4529    ac_install_sh="$ac_aux_dir/install.sh -c"
4530    break
4531  elif test -f "$ac_dir/shtool"; then
4532    ac_aux_dir=$ac_dir
4533    ac_install_sh="$ac_aux_dir/shtool install -c"
4534    break
4535  fi
4536done
4537if test -z "$ac_aux_dir"; then
4538  as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../build-aux \"$srcdir\"/../build-aux" "$LINENO" 5
4539fi
4540
4541# These three variables are undocumented and unsupported,
4542# and are intended to be withdrawn in a future Autoconf release.
4543# They can cause serious problems if a builder's source tree is in a directory
4544# whose full name contains unusual characters.
4545ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
4546ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
4547ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
4548
4549
4550am__api_version='1.16'
4551
4552# Find a good install program.  We prefer a C program (faster),
4553# so one script is as good as another.  But avoid the broken or
4554# incompatible versions:
4555# SysV /etc/install, /usr/sbin/install
4556# SunOS /usr/etc/install
4557# IRIX /sbin/install
4558# AIX /bin/install
4559# AmigaOS /C/install, which installs bootblocks on floppy discs
4560# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4561# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4562# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4563# OS/2's system install, which has a completely different semantic
4564# ./install, which can be erroneously created by make from ./install.sh.
4565# Reject install programs that cannot install multiple files.
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4567$as_echo_n "checking for a BSD-compatible install... " >&6; }
4568if test -z "$INSTALL"; then
4569if ${ac_cv_path_install+:} false; then :
4570  $as_echo_n "(cached) " >&6
4571else
4572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573for as_dir in $PATH
4574do
4575  IFS=$as_save_IFS
4576  test -z "$as_dir" && as_dir=.
4577    # Account for people who put trailing slashes in PATH elements.
4578case $as_dir/ in #((
4579  ./ | .// | /[cC]/* | \
4580  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4581  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4582  /usr/ucb/* ) ;;
4583  *)
4584    # OSF1 and SCO ODT 3.0 have their own names for install.
4585    # Don't use installbsd from OSF since it installs stuff as root
4586    # by default.
4587    for ac_prog in ginstall scoinst install; do
4588      for ac_exec_ext in '' $ac_executable_extensions; do
4589	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4590	  if test $ac_prog = install &&
4591	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4592	    # AIX install.  It has an incompatible calling convention.
4593	    :
4594	  elif test $ac_prog = install &&
4595	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4596	    # program-specific install script used by HP pwplus--don't use.
4597	    :
4598	  else
4599	    rm -rf conftest.one conftest.two conftest.dir
4600	    echo one > conftest.one
4601	    echo two > conftest.two
4602	    mkdir conftest.dir
4603	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4604	      test -s conftest.one && test -s conftest.two &&
4605	      test -s conftest.dir/conftest.one &&
4606	      test -s conftest.dir/conftest.two
4607	    then
4608	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4609	      break 3
4610	    fi
4611	  fi
4612	fi
4613      done
4614    done
4615    ;;
4616esac
4617
4618  done
4619IFS=$as_save_IFS
4620
4621rm -rf conftest.one conftest.two conftest.dir
4622
4623fi
4624  if test "${ac_cv_path_install+set}" = set; then
4625    INSTALL=$ac_cv_path_install
4626  else
4627    # As a last resort, use the slow shell script.  Don't cache a
4628    # value for INSTALL within a source directory, because that will
4629    # break other packages using the cache if that directory is
4630    # removed, or if the value is a relative name.
4631    INSTALL=$ac_install_sh
4632  fi
4633fi
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4635$as_echo "$INSTALL" >&6; }
4636
4637# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4638# It thinks the first close brace ends the variable substitution.
4639test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4640
4641test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4642
4643test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4644
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4646$as_echo_n "checking whether build environment is sane... " >&6; }
4647# Reject unsafe characters in $srcdir or the absolute working directory
4648# name.  Accept space and tab only in the latter.
4649am_lf='
4650'
4651case `pwd` in
4652  *[\\\"\#\$\&\'\`$am_lf]*)
4653    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4654esac
4655case $srcdir in
4656  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
4657    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4658esac
4659
4660# Do 'set' in a subshell so we don't clobber the current shell's
4661# arguments.  Must try -L first in case configure is actually a
4662# symlink; some systems play weird games with the mod time of symlinks
4663# (eg FreeBSD returns the mod time of the symlink's containing
4664# directory).
4665if (
4666   am_has_slept=no
4667   for am_try in 1 2; do
4668     echo "timestamp, slept: $am_has_slept" > conftest.file
4669     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4670     if test "$*" = "X"; then
4671	# -L didn't work.
4672	set X `ls -t "$srcdir/configure" conftest.file`
4673     fi
4674     if test "$*" != "X $srcdir/configure conftest.file" \
4675	&& test "$*" != "X conftest.file $srcdir/configure"; then
4676
4677	# If neither matched, then we have a broken ls.  This can happen
4678	# if, for instance, CONFIG_SHELL is bash and it inherits a
4679	# broken ls alias from the environment.  This has actually
4680	# happened.  Such a system could not be considered "sane".
4681	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
4682  alias in your environment" "$LINENO" 5
4683     fi
4684     if test "$2" = conftest.file || test $am_try -eq 2; then
4685       break
4686     fi
4687     # Just in case.
4688     sleep 1
4689     am_has_slept=yes
4690   done
4691   test "$2" = conftest.file
4692   )
4693then
4694   # Ok.
4695   :
4696else
4697   as_fn_error $? "newly created file is older than distributed files!
4698Check your system clock" "$LINENO" 5
4699fi
4700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4701$as_echo "yes" >&6; }
4702# If we didn't sleep, we still need to ensure time stamps of config.status and
4703# generated files are strictly newer.
4704am_sleep_pid=
4705if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4706  ( sleep 1 ) &
4707  am_sleep_pid=$!
4708fi
4709
4710rm -f conftest.file
4711
4712test "$program_prefix" != NONE &&
4713  program_transform_name="s&^&$program_prefix&;$program_transform_name"
4714# Use a double $ so make ignores it.
4715test "$program_suffix" != NONE &&
4716  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4717# Double any \ or $.
4718# By default was `s,x,x', remove it if useless.
4719ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4720program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4721
4722# Expand $ac_aux_dir to an absolute path.
4723am_aux_dir=`cd "$ac_aux_dir" && pwd`
4724
4725if test x"${MISSING+set}" != xset; then
4726  case $am_aux_dir in
4727  *\ * | *\	*)
4728    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
4729  *)
4730    MISSING="\${SHELL} $am_aux_dir/missing" ;;
4731  esac
4732fi
4733# Use eval to expand $SHELL
4734if eval "$MISSING --is-lightweight"; then
4735  am_missing_run="$MISSING "
4736else
4737  am_missing_run=
4738  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4739$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4740fi
4741
4742if test x"${install_sh+set}" != xset; then
4743  case $am_aux_dir in
4744  *\ * | *\	*)
4745    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4746  *)
4747    install_sh="\${SHELL} $am_aux_dir/install-sh"
4748  esac
4749fi
4750
4751# Installed binaries are usually stripped using 'strip' when the user
4752# run "make install-strip".  However 'strip' might not be the right
4753# tool to use in cross-compilation environments, therefore Automake
4754# will honor the 'STRIP' environment variable to overrule this program.
4755if test "$cross_compiling" != no; then
4756  if test -n "$ac_tool_prefix"; then
4757  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4758set dummy ${ac_tool_prefix}strip; ac_word=$2
4759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4760$as_echo_n "checking for $ac_word... " >&6; }
4761if ${ac_cv_prog_STRIP+:} false; then :
4762  $as_echo_n "(cached) " >&6
4763else
4764  if test -n "$STRIP"; then
4765  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4766else
4767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4768for as_dir in $PATH
4769do
4770  IFS=$as_save_IFS
4771  test -z "$as_dir" && as_dir=.
4772    for ac_exec_ext in '' $ac_executable_extensions; do
4773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4774    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4776    break 2
4777  fi
4778done
4779  done
4780IFS=$as_save_IFS
4781
4782fi
4783fi
4784STRIP=$ac_cv_prog_STRIP
4785if test -n "$STRIP"; then
4786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4787$as_echo "$STRIP" >&6; }
4788else
4789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4790$as_echo "no" >&6; }
4791fi
4792
4793
4794fi
4795if test -z "$ac_cv_prog_STRIP"; then
4796  ac_ct_STRIP=$STRIP
4797  # Extract the first word of "strip", so it can be a program name with args.
4798set dummy strip; ac_word=$2
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4800$as_echo_n "checking for $ac_word... " >&6; }
4801if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4802  $as_echo_n "(cached) " >&6
4803else
4804  if test -n "$ac_ct_STRIP"; then
4805  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4806else
4807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4808for as_dir in $PATH
4809do
4810  IFS=$as_save_IFS
4811  test -z "$as_dir" && as_dir=.
4812    for ac_exec_ext in '' $ac_executable_extensions; do
4813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4814    ac_cv_prog_ac_ct_STRIP="strip"
4815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4816    break 2
4817  fi
4818done
4819  done
4820IFS=$as_save_IFS
4821
4822fi
4823fi
4824ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4825if test -n "$ac_ct_STRIP"; then
4826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4827$as_echo "$ac_ct_STRIP" >&6; }
4828else
4829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4830$as_echo "no" >&6; }
4831fi
4832
4833  if test "x$ac_ct_STRIP" = x; then
4834    STRIP=":"
4835  else
4836    case $cross_compiling:$ac_tool_warned in
4837yes:)
4838{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4839$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4840ac_tool_warned=yes ;;
4841esac
4842    STRIP=$ac_ct_STRIP
4843  fi
4844else
4845  STRIP="$ac_cv_prog_STRIP"
4846fi
4847
4848fi
4849INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4850
4851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4852$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4853if test -z "$MKDIR_P"; then
4854  if ${ac_cv_path_mkdir+:} false; then :
4855  $as_echo_n "(cached) " >&6
4856else
4857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4858for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4859do
4860  IFS=$as_save_IFS
4861  test -z "$as_dir" && as_dir=.
4862    for ac_prog in mkdir gmkdir; do
4863	 for ac_exec_ext in '' $ac_executable_extensions; do
4864	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4865	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4866	     'mkdir (GNU coreutils) '* | \
4867	     'mkdir (coreutils) '* | \
4868	     'mkdir (fileutils) '4.1*)
4869	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4870	       break 3;;
4871	   esac
4872	 done
4873       done
4874  done
4875IFS=$as_save_IFS
4876
4877fi
4878
4879  test -d ./--version && rmdir ./--version
4880  if test "${ac_cv_path_mkdir+set}" = set; then
4881    MKDIR_P="$ac_cv_path_mkdir -p"
4882  else
4883    # As a last resort, use the slow shell script.  Don't cache a
4884    # value for MKDIR_P within a source directory, because that will
4885    # break other packages using the cache if that directory is
4886    # removed, or if the value is a relative name.
4887    MKDIR_P="$ac_install_sh -d"
4888  fi
4889fi
4890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4891$as_echo "$MKDIR_P" >&6; }
4892
4893for ac_prog in gawk mawk nawk awk
4894do
4895  # Extract the first word of "$ac_prog", so it can be a program name with args.
4896set dummy $ac_prog; ac_word=$2
4897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4898$as_echo_n "checking for $ac_word... " >&6; }
4899if ${ac_cv_prog_AWK+:} false; then :
4900  $as_echo_n "(cached) " >&6
4901else
4902  if test -n "$AWK"; then
4903  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4904else
4905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4906for as_dir in $PATH
4907do
4908  IFS=$as_save_IFS
4909  test -z "$as_dir" && as_dir=.
4910    for ac_exec_ext in '' $ac_executable_extensions; do
4911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4912    ac_cv_prog_AWK="$ac_prog"
4913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4914    break 2
4915  fi
4916done
4917  done
4918IFS=$as_save_IFS
4919
4920fi
4921fi
4922AWK=$ac_cv_prog_AWK
4923if test -n "$AWK"; then
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4925$as_echo "$AWK" >&6; }
4926else
4927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4928$as_echo "no" >&6; }
4929fi
4930
4931
4932  test -n "$AWK" && break
4933done
4934
4935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4936$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4937set x ${MAKE-make}
4938ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4939if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4940  $as_echo_n "(cached) " >&6
4941else
4942  cat >conftest.make <<\_ACEOF
4943SHELL = /bin/sh
4944all:
4945	@echo '@@@%%%=$(MAKE)=@@@%%%'
4946_ACEOF
4947# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4948case `${MAKE-make} -f conftest.make 2>/dev/null` in
4949  *@@@%%%=?*=@@@%%%*)
4950    eval ac_cv_prog_make_${ac_make}_set=yes;;
4951  *)
4952    eval ac_cv_prog_make_${ac_make}_set=no;;
4953esac
4954rm -f conftest.make
4955fi
4956if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4958$as_echo "yes" >&6; }
4959  SET_MAKE=
4960else
4961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4962$as_echo "no" >&6; }
4963  SET_MAKE="MAKE=${MAKE-make}"
4964fi
4965
4966rm -rf .tst 2>/dev/null
4967mkdir .tst 2>/dev/null
4968if test -d .tst; then
4969  am__leading_dot=.
4970else
4971  am__leading_dot=_
4972fi
4973rmdir .tst 2>/dev/null
4974
4975# Check whether --enable-silent-rules was given.
4976if test "${enable_silent_rules+set}" = set; then :
4977  enableval=$enable_silent_rules;
4978fi
4979
4980case $enable_silent_rules in # (((
4981  yes) AM_DEFAULT_VERBOSITY=0;;
4982   no) AM_DEFAULT_VERBOSITY=1;;
4983    *) AM_DEFAULT_VERBOSITY=1;;
4984esac
4985am_make=${MAKE-make}
4986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4987$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4988if ${am_cv_make_support_nested_variables+:} false; then :
4989  $as_echo_n "(cached) " >&6
4990else
4991  if $as_echo 'TRUE=$(BAR$(V))
4992BAR0=false
4993BAR1=true
4994V=1
4995am__doit:
4996	@$(TRUE)
4997.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4998  am_cv_make_support_nested_variables=yes
4999else
5000  am_cv_make_support_nested_variables=no
5001fi
5002fi
5003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
5004$as_echo "$am_cv_make_support_nested_variables" >&6; }
5005if test $am_cv_make_support_nested_variables = yes; then
5006    AM_V='$(V)'
5007  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
5008else
5009  AM_V=$AM_DEFAULT_VERBOSITY
5010  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
5011fi
5012AM_BACKSLASH='\'
5013
5014if test "`cd $srcdir && pwd`" != "`pwd`"; then
5015  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
5016  # is not polluted with repeated "-I."
5017  am__isrc=' -I$(srcdir)'
5018  # test to see if srcdir already configured
5019  if test -f $srcdir/config.status; then
5020    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
5021  fi
5022fi
5023
5024# test whether we have cygpath
5025if test -z "$CYGPATH_W"; then
5026  if (cygpath --version) >/dev/null 2>/dev/null; then
5027    CYGPATH_W='cygpath -w'
5028  else
5029    CYGPATH_W=echo
5030  fi
5031fi
5032
5033
5034# Define the identity of the package.
5035 PACKAGE='gettext-tools'
5036 VERSION='0.21'
5037
5038
5039cat >>confdefs.h <<_ACEOF
5040#define PACKAGE "$PACKAGE"
5041_ACEOF
5042
5043
5044cat >>confdefs.h <<_ACEOF
5045#define VERSION "$VERSION"
5046_ACEOF
5047
5048# Some tools Automake needs.
5049
5050ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
5051
5052
5053AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5054
5055
5056AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
5057
5058
5059AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5060
5061
5062MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
5063
5064# For better backward compatibility.  To be removed once Automake 1.9.x
5065# dies out for good.  For more background, see:
5066# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
5067# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
5068mkdir_p='$(MKDIR_P)'
5069
5070# We need awk for the "check" target (and possibly the TAP driver).  The
5071# system "awk" is bad on some platforms.
5072# Always define AMTAR for backward compatibility.  Yes, it's still used
5073# in the wild :-(  We should find a proper way to deprecate it ...
5074AMTAR='$${TAR-tar}'
5075
5076
5077# We'll loop over all known methods to create a tar archive until one works.
5078_am_tools='gnutar  pax cpio none'
5079
5080am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
5081
5082
5083
5084
5085
5086
5087# POSIX will say in a future version that running "rm -f" with no argument
5088# is OK; and we want to be able to make that assumption in our Makefile
5089# recipes.  So use an aggressive probe to check that the usage we want is
5090# actually supported "in the wild" to an acceptable degree.
5091# See automake bug#10828.
5092# To make any issue more visible, cause the running configure to be aborted
5093# by default if the 'rm' program in use doesn't match our expectations; the
5094# user can still override this though.
5095if rm -f && rm -fr && rm -rf; then : OK; else
5096  cat >&2 <<'END'
5097Oops!
5098
5099Your 'rm' program seems unable to run without file operands specified
5100on the command line, even when the '-f' option is present.  This is contrary
5101to the behaviour of most rm programs out there, and not conforming with
5102the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
5103
5104Please tell bug-automake@gnu.org about your system, including the value
5105of your $PATH and any error possibly output before this message.  This
5106can help us improve future automake versions.
5107
5108END
5109  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
5110    echo 'Configuration will proceed anyway, since you have set the' >&2
5111    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
5112    echo >&2
5113  else
5114    cat >&2 <<'END'
5115Aborting the configuration process, to ensure you take notice of the issue.
5116
5117You can download and install GNU coreutils to get an 'rm' implementation
5118that behaves properly: <https://www.gnu.org/software/coreutils/>.
5119
5120If you want to complete the configuration process using your problematic
5121'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
5122to "yes", and re-run configure.
5123
5124END
5125    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
5126  fi
5127fi
5128
5129ac_config_headers="$ac_config_headers config.h"
5130
5131
5132test "$docdir" != '${datarootdir}/doc/${PACKAGE_TARNAME}' || docdir='${datarootdir}/doc/gettext'
5133
5134ac_ext=c
5135ac_cpp='$CPP $CPPFLAGS'
5136ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5137ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5138ac_compiler_gnu=$ac_cv_c_compiler_gnu
5139if test -n "$ac_tool_prefix"; then
5140  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5141set dummy ${ac_tool_prefix}gcc; ac_word=$2
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143$as_echo_n "checking for $ac_word... " >&6; }
5144if ${ac_cv_prog_CC+:} false; then :
5145  $as_echo_n "(cached) " >&6
5146else
5147  if test -n "$CC"; then
5148  ac_cv_prog_CC="$CC" # Let the user override the test.
5149else
5150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151for as_dir in $PATH
5152do
5153  IFS=$as_save_IFS
5154  test -z "$as_dir" && as_dir=.
5155    for ac_exec_ext in '' $ac_executable_extensions; do
5156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5157    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5159    break 2
5160  fi
5161done
5162  done
5163IFS=$as_save_IFS
5164
5165fi
5166fi
5167CC=$ac_cv_prog_CC
5168if test -n "$CC"; then
5169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5170$as_echo "$CC" >&6; }
5171else
5172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173$as_echo "no" >&6; }
5174fi
5175
5176
5177fi
5178if test -z "$ac_cv_prog_CC"; then
5179  ac_ct_CC=$CC
5180  # Extract the first word of "gcc", so it can be a program name with args.
5181set dummy gcc; ac_word=$2
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5183$as_echo_n "checking for $ac_word... " >&6; }
5184if ${ac_cv_prog_ac_ct_CC+:} false; then :
5185  $as_echo_n "(cached) " >&6
5186else
5187  if test -n "$ac_ct_CC"; then
5188  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5189else
5190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191for as_dir in $PATH
5192do
5193  IFS=$as_save_IFS
5194  test -z "$as_dir" && as_dir=.
5195    for ac_exec_ext in '' $ac_executable_extensions; do
5196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5197    ac_cv_prog_ac_ct_CC="gcc"
5198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5199    break 2
5200  fi
5201done
5202  done
5203IFS=$as_save_IFS
5204
5205fi
5206fi
5207ac_ct_CC=$ac_cv_prog_ac_ct_CC
5208if test -n "$ac_ct_CC"; then
5209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5210$as_echo "$ac_ct_CC" >&6; }
5211else
5212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
5214fi
5215
5216  if test "x$ac_ct_CC" = x; then
5217    CC=""
5218  else
5219    case $cross_compiling:$ac_tool_warned in
5220yes:)
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5222$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5223ac_tool_warned=yes ;;
5224esac
5225    CC=$ac_ct_CC
5226  fi
5227else
5228  CC="$ac_cv_prog_CC"
5229fi
5230
5231if test -z "$CC"; then
5232          if test -n "$ac_tool_prefix"; then
5233    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5234set dummy ${ac_tool_prefix}cc; ac_word=$2
5235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5236$as_echo_n "checking for $ac_word... " >&6; }
5237if ${ac_cv_prog_CC+:} false; then :
5238  $as_echo_n "(cached) " >&6
5239else
5240  if test -n "$CC"; then
5241  ac_cv_prog_CC="$CC" # Let the user override the test.
5242else
5243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5244for as_dir in $PATH
5245do
5246  IFS=$as_save_IFS
5247  test -z "$as_dir" && as_dir=.
5248    for ac_exec_ext in '' $ac_executable_extensions; do
5249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5250    ac_cv_prog_CC="${ac_tool_prefix}cc"
5251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5252    break 2
5253  fi
5254done
5255  done
5256IFS=$as_save_IFS
5257
5258fi
5259fi
5260CC=$ac_cv_prog_CC
5261if test -n "$CC"; then
5262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5263$as_echo "$CC" >&6; }
5264else
5265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5266$as_echo "no" >&6; }
5267fi
5268
5269
5270  fi
5271fi
5272if test -z "$CC"; then
5273  # Extract the first word of "cc", so it can be a program name with args.
5274set dummy cc; ac_word=$2
5275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5276$as_echo_n "checking for $ac_word... " >&6; }
5277if ${ac_cv_prog_CC+:} false; then :
5278  $as_echo_n "(cached) " >&6
5279else
5280  if test -n "$CC"; then
5281  ac_cv_prog_CC="$CC" # Let the user override the test.
5282else
5283  ac_prog_rejected=no
5284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5285for as_dir in $PATH
5286do
5287  IFS=$as_save_IFS
5288  test -z "$as_dir" && as_dir=.
5289    for ac_exec_ext in '' $ac_executable_extensions; do
5290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5291    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5292       ac_prog_rejected=yes
5293       continue
5294     fi
5295    ac_cv_prog_CC="cc"
5296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5297    break 2
5298  fi
5299done
5300  done
5301IFS=$as_save_IFS
5302
5303if test $ac_prog_rejected = yes; then
5304  # We found a bogon in the path, so make sure we never use it.
5305  set dummy $ac_cv_prog_CC
5306  shift
5307  if test $# != 0; then
5308    # We chose a different compiler from the bogus one.
5309    # However, it has the same basename, so the bogon will be chosen
5310    # first if we set CC to just the basename; use the full file name.
5311    shift
5312    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5313  fi
5314fi
5315fi
5316fi
5317CC=$ac_cv_prog_CC
5318if test -n "$CC"; then
5319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5320$as_echo "$CC" >&6; }
5321else
5322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323$as_echo "no" >&6; }
5324fi
5325
5326
5327fi
5328if test -z "$CC"; then
5329  if test -n "$ac_tool_prefix"; then
5330  for ac_prog in cl.exe
5331  do
5332    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5333set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5335$as_echo_n "checking for $ac_word... " >&6; }
5336if ${ac_cv_prog_CC+:} false; then :
5337  $as_echo_n "(cached) " >&6
5338else
5339  if test -n "$CC"; then
5340  ac_cv_prog_CC="$CC" # Let the user override the test.
5341else
5342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5343for as_dir in $PATH
5344do
5345  IFS=$as_save_IFS
5346  test -z "$as_dir" && as_dir=.
5347    for ac_exec_ext in '' $ac_executable_extensions; do
5348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5349    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5351    break 2
5352  fi
5353done
5354  done
5355IFS=$as_save_IFS
5356
5357fi
5358fi
5359CC=$ac_cv_prog_CC
5360if test -n "$CC"; then
5361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5362$as_echo "$CC" >&6; }
5363else
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5365$as_echo "no" >&6; }
5366fi
5367
5368
5369    test -n "$CC" && break
5370  done
5371fi
5372if test -z "$CC"; then
5373  ac_ct_CC=$CC
5374  for ac_prog in cl.exe
5375do
5376  # Extract the first word of "$ac_prog", so it can be a program name with args.
5377set dummy $ac_prog; ac_word=$2
5378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5379$as_echo_n "checking for $ac_word... " >&6; }
5380if ${ac_cv_prog_ac_ct_CC+:} false; then :
5381  $as_echo_n "(cached) " >&6
5382else
5383  if test -n "$ac_ct_CC"; then
5384  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5385else
5386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5387for as_dir in $PATH
5388do
5389  IFS=$as_save_IFS
5390  test -z "$as_dir" && as_dir=.
5391    for ac_exec_ext in '' $ac_executable_extensions; do
5392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5393    ac_cv_prog_ac_ct_CC="$ac_prog"
5394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5395    break 2
5396  fi
5397done
5398  done
5399IFS=$as_save_IFS
5400
5401fi
5402fi
5403ac_ct_CC=$ac_cv_prog_ac_ct_CC
5404if test -n "$ac_ct_CC"; then
5405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5406$as_echo "$ac_ct_CC" >&6; }
5407else
5408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5409$as_echo "no" >&6; }
5410fi
5411
5412
5413  test -n "$ac_ct_CC" && break
5414done
5415
5416  if test "x$ac_ct_CC" = x; then
5417    CC=""
5418  else
5419    case $cross_compiling:$ac_tool_warned in
5420yes:)
5421{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5422$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5423ac_tool_warned=yes ;;
5424esac
5425    CC=$ac_ct_CC
5426  fi
5427fi
5428
5429fi
5430if test -z "$CC"; then
5431  if test -n "$ac_tool_prefix"; then
5432  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5433set dummy ${ac_tool_prefix}clang; ac_word=$2
5434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5435$as_echo_n "checking for $ac_word... " >&6; }
5436if ${ac_cv_prog_CC+:} false; then :
5437  $as_echo_n "(cached) " >&6
5438else
5439  if test -n "$CC"; then
5440  ac_cv_prog_CC="$CC" # Let the user override the test.
5441else
5442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5443for as_dir in $PATH
5444do
5445  IFS=$as_save_IFS
5446  test -z "$as_dir" && as_dir=.
5447    for ac_exec_ext in '' $ac_executable_extensions; do
5448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5449    ac_cv_prog_CC="${ac_tool_prefix}clang"
5450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5451    break 2
5452  fi
5453done
5454  done
5455IFS=$as_save_IFS
5456
5457fi
5458fi
5459CC=$ac_cv_prog_CC
5460if test -n "$CC"; then
5461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5462$as_echo "$CC" >&6; }
5463else
5464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5465$as_echo "no" >&6; }
5466fi
5467
5468
5469fi
5470if test -z "$ac_cv_prog_CC"; then
5471  ac_ct_CC=$CC
5472  # Extract the first word of "clang", so it can be a program name with args.
5473set dummy clang; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
5476if ${ac_cv_prog_ac_ct_CC+:} false; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479  if test -n "$ac_ct_CC"; then
5480  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5481else
5482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5483for as_dir in $PATH
5484do
5485  IFS=$as_save_IFS
5486  test -z "$as_dir" && as_dir=.
5487    for ac_exec_ext in '' $ac_executable_extensions; do
5488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5489    ac_cv_prog_ac_ct_CC="clang"
5490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5491    break 2
5492  fi
5493done
5494  done
5495IFS=$as_save_IFS
5496
5497fi
5498fi
5499ac_ct_CC=$ac_cv_prog_ac_ct_CC
5500if test -n "$ac_ct_CC"; then
5501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5502$as_echo "$ac_ct_CC" >&6; }
5503else
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505$as_echo "no" >&6; }
5506fi
5507
5508  if test "x$ac_ct_CC" = x; then
5509    CC=""
5510  else
5511    case $cross_compiling:$ac_tool_warned in
5512yes:)
5513{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5514$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5515ac_tool_warned=yes ;;
5516esac
5517    CC=$ac_ct_CC
5518  fi
5519else
5520  CC="$ac_cv_prog_CC"
5521fi
5522
5523fi
5524
5525
5526test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5528as_fn_error $? "no acceptable C compiler found in \$PATH
5529See \`config.log' for more details" "$LINENO" 5; }
5530
5531# Provide some information about the compiler.
5532$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5533set X $ac_compile
5534ac_compiler=$2
5535for ac_option in --version -v -V -qversion -version; do
5536  { { ac_try="$ac_compiler $ac_option >&5"
5537case "(($ac_try" in
5538  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5539  *) ac_try_echo=$ac_try;;
5540esac
5541eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5542$as_echo "$ac_try_echo"; } >&5
5543  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5544  ac_status=$?
5545  if test -s conftest.err; then
5546    sed '10a\
5547... rest of stderr output deleted ...
5548         10q' conftest.err >conftest.er1
5549    cat conftest.er1 >&5
5550  fi
5551  rm -f conftest.er1 conftest.err
5552  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5553  test $ac_status = 0; }
5554done
5555
5556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5557/* end confdefs.h.  */
5558
5559int
5560main ()
5561{
5562
5563  ;
5564  return 0;
5565}
5566_ACEOF
5567ac_clean_files_save=$ac_clean_files
5568ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5569# Try to create an executable without -o first, disregard a.out.
5570# It will help us diagnose broken compilers, and finding out an intuition
5571# of exeext.
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5573$as_echo_n "checking whether the C compiler works... " >&6; }
5574ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5575
5576# The possible output files:
5577ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5578
5579ac_rmfiles=
5580for ac_file in $ac_files
5581do
5582  case $ac_file in
5583    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5584    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5585  esac
5586done
5587rm -f $ac_rmfiles
5588
5589if { { ac_try="$ac_link_default"
5590case "(($ac_try" in
5591  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5592  *) ac_try_echo=$ac_try;;
5593esac
5594eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5595$as_echo "$ac_try_echo"; } >&5
5596  (eval "$ac_link_default") 2>&5
5597  ac_status=$?
5598  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5599  test $ac_status = 0; }; then :
5600  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5601# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5602# in a Makefile.  We should not override ac_cv_exeext if it was cached,
5603# so that the user can short-circuit this test for compilers unknown to
5604# Autoconf.
5605for ac_file in $ac_files ''
5606do
5607  test -f "$ac_file" || continue
5608  case $ac_file in
5609    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5610	;;
5611    [ab].out )
5612	# We found the default executable, but exeext='' is most
5613	# certainly right.
5614	break;;
5615    *.* )
5616	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5617	then :; else
5618	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5619	fi
5620	# We set ac_cv_exeext here because the later test for it is not
5621	# safe: cross compilers may not add the suffix if given an `-o'
5622	# argument, so we may need to know it at that point already.
5623	# Even if this section looks crufty: it has the advantage of
5624	# actually working.
5625	break;;
5626    * )
5627	break;;
5628  esac
5629done
5630test "$ac_cv_exeext" = no && ac_cv_exeext=
5631
5632else
5633  ac_file=''
5634fi
5635if test -z "$ac_file"; then :
5636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5637$as_echo "no" >&6; }
5638$as_echo "$as_me: failed program was:" >&5
5639sed 's/^/| /' conftest.$ac_ext >&5
5640
5641{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5643as_fn_error 77 "C compiler cannot create executables
5644See \`config.log' for more details" "$LINENO" 5; }
5645else
5646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5647$as_echo "yes" >&6; }
5648fi
5649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5650$as_echo_n "checking for C compiler default output file name... " >&6; }
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5652$as_echo "$ac_file" >&6; }
5653ac_exeext=$ac_cv_exeext
5654
5655rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5656ac_clean_files=$ac_clean_files_save
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5658$as_echo_n "checking for suffix of executables... " >&6; }
5659if { { ac_try="$ac_link"
5660case "(($ac_try" in
5661  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5662  *) ac_try_echo=$ac_try;;
5663esac
5664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5665$as_echo "$ac_try_echo"; } >&5
5666  (eval "$ac_link") 2>&5
5667  ac_status=$?
5668  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5669  test $ac_status = 0; }; then :
5670  # If both `conftest.exe' and `conftest' are `present' (well, observable)
5671# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5672# work properly (i.e., refer to `conftest.exe'), while it won't with
5673# `rm'.
5674for ac_file in conftest.exe conftest conftest.*; do
5675  test -f "$ac_file" || continue
5676  case $ac_file in
5677    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5678    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5679	  break;;
5680    * ) break;;
5681  esac
5682done
5683else
5684  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5686as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5687See \`config.log' for more details" "$LINENO" 5; }
5688fi
5689rm -f conftest conftest$ac_cv_exeext
5690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5691$as_echo "$ac_cv_exeext" >&6; }
5692
5693rm -f conftest.$ac_ext
5694EXEEXT=$ac_cv_exeext
5695ac_exeext=$EXEEXT
5696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5697/* end confdefs.h.  */
5698#include <stdio.h>
5699int
5700main ()
5701{
5702FILE *f = fopen ("conftest.out", "w");
5703 return ferror (f) || fclose (f) != 0;
5704
5705  ;
5706  return 0;
5707}
5708_ACEOF
5709ac_clean_files="$ac_clean_files conftest.out"
5710# Check that the compiler produces executables we can run.  If not, either
5711# the compiler is broken, or we cross compile.
5712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5713$as_echo_n "checking whether we are cross compiling... " >&6; }
5714if test "$cross_compiling" != yes; then
5715  { { ac_try="$ac_link"
5716case "(($ac_try" in
5717  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5718  *) ac_try_echo=$ac_try;;
5719esac
5720eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5721$as_echo "$ac_try_echo"; } >&5
5722  (eval "$ac_link") 2>&5
5723  ac_status=$?
5724  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5725  test $ac_status = 0; }
5726  if { ac_try='./conftest$ac_cv_exeext'
5727  { { case "(($ac_try" in
5728  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5729  *) ac_try_echo=$ac_try;;
5730esac
5731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5732$as_echo "$ac_try_echo"; } >&5
5733  (eval "$ac_try") 2>&5
5734  ac_status=$?
5735  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5736  test $ac_status = 0; }; }; then
5737    cross_compiling=no
5738  else
5739    if test "$cross_compiling" = maybe; then
5740	cross_compiling=yes
5741    else
5742	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5744as_fn_error $? "cannot run C compiled programs.
5745If you meant to cross compile, use \`--host'.
5746See \`config.log' for more details" "$LINENO" 5; }
5747    fi
5748  fi
5749fi
5750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5751$as_echo "$cross_compiling" >&6; }
5752
5753rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5754ac_clean_files=$ac_clean_files_save
5755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5756$as_echo_n "checking for suffix of object files... " >&6; }
5757if ${ac_cv_objext+:} false; then :
5758  $as_echo_n "(cached) " >&6
5759else
5760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5761/* end confdefs.h.  */
5762
5763int
5764main ()
5765{
5766
5767  ;
5768  return 0;
5769}
5770_ACEOF
5771rm -f conftest.o conftest.obj
5772if { { ac_try="$ac_compile"
5773case "(($ac_try" in
5774  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5775  *) ac_try_echo=$ac_try;;
5776esac
5777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5778$as_echo "$ac_try_echo"; } >&5
5779  (eval "$ac_compile") 2>&5
5780  ac_status=$?
5781  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5782  test $ac_status = 0; }; then :
5783  for ac_file in conftest.o conftest.obj conftest.*; do
5784  test -f "$ac_file" || continue;
5785  case $ac_file in
5786    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5787    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5788       break;;
5789  esac
5790done
5791else
5792  $as_echo "$as_me: failed program was:" >&5
5793sed 's/^/| /' conftest.$ac_ext >&5
5794
5795{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5797as_fn_error $? "cannot compute suffix of object files: cannot compile
5798See \`config.log' for more details" "$LINENO" 5; }
5799fi
5800rm -f conftest.$ac_cv_objext conftest.$ac_ext
5801fi
5802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5803$as_echo "$ac_cv_objext" >&6; }
5804OBJEXT=$ac_cv_objext
5805ac_objext=$OBJEXT
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5807$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5808if ${ac_cv_c_compiler_gnu+:} false; then :
5809  $as_echo_n "(cached) " >&6
5810else
5811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5812/* end confdefs.h.  */
5813
5814int
5815main ()
5816{
5817#ifndef __GNUC__
5818       choke me
5819#endif
5820
5821  ;
5822  return 0;
5823}
5824_ACEOF
5825if ac_fn_c_try_compile "$LINENO"; then :
5826  ac_compiler_gnu=yes
5827else
5828  ac_compiler_gnu=no
5829fi
5830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5831ac_cv_c_compiler_gnu=$ac_compiler_gnu
5832
5833fi
5834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5835$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5836if test $ac_compiler_gnu = yes; then
5837  GCC=yes
5838else
5839  GCC=
5840fi
5841ac_test_CFLAGS=${CFLAGS+set}
5842ac_save_CFLAGS=$CFLAGS
5843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5844$as_echo_n "checking whether $CC accepts -g... " >&6; }
5845if ${ac_cv_prog_cc_g+:} false; then :
5846  $as_echo_n "(cached) " >&6
5847else
5848  ac_save_c_werror_flag=$ac_c_werror_flag
5849   ac_c_werror_flag=yes
5850   ac_cv_prog_cc_g=no
5851   CFLAGS="-g"
5852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5853/* end confdefs.h.  */
5854
5855int
5856main ()
5857{
5858
5859  ;
5860  return 0;
5861}
5862_ACEOF
5863if ac_fn_c_try_compile "$LINENO"; then :
5864  ac_cv_prog_cc_g=yes
5865else
5866  CFLAGS=""
5867      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5868/* end confdefs.h.  */
5869
5870int
5871main ()
5872{
5873
5874  ;
5875  return 0;
5876}
5877_ACEOF
5878if ac_fn_c_try_compile "$LINENO"; then :
5879
5880else
5881  ac_c_werror_flag=$ac_save_c_werror_flag
5882	 CFLAGS="-g"
5883	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5884/* end confdefs.h.  */
5885
5886int
5887main ()
5888{
5889
5890  ;
5891  return 0;
5892}
5893_ACEOF
5894if ac_fn_c_try_compile "$LINENO"; then :
5895  ac_cv_prog_cc_g=yes
5896fi
5897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5898fi
5899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5900fi
5901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5902   ac_c_werror_flag=$ac_save_c_werror_flag
5903fi
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5905$as_echo "$ac_cv_prog_cc_g" >&6; }
5906if test "$ac_test_CFLAGS" = set; then
5907  CFLAGS=$ac_save_CFLAGS
5908elif test $ac_cv_prog_cc_g = yes; then
5909  if test "$GCC" = yes; then
5910    CFLAGS="-g -O2"
5911  else
5912    CFLAGS="-g"
5913  fi
5914else
5915  if test "$GCC" = yes; then
5916    CFLAGS="-O2"
5917  else
5918    CFLAGS=
5919  fi
5920fi
5921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5922$as_echo_n "checking for $CC option to enable C11 features... " >&6; }
5923if ${ac_cv_prog_cc_c11+:} false; then :
5924  $as_echo_n "(cached) " >&6
5925else
5926  ac_cv_prog_cc_c11=no
5927ac_save_CC=$CC
5928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929/* end confdefs.h.  */
5930#include <stdarg.h>
5931#include <stdbool.h>
5932#include <stddef.h>
5933#include <stdlib.h>
5934#include <wchar.h>
5935#include <stdio.h>
5936
5937// Check varargs macros.  These examples are taken from C99 6.10.3.5.
5938#define debug(...) fprintf (stderr, __VA_ARGS__)
5939#define showlist(...) puts (#__VA_ARGS__)
5940#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5941static void
5942test_varargs_macros (void)
5943{
5944  int x = 1234;
5945  int y = 5678;
5946  debug ("Flag");
5947  debug ("X = %d\n", x);
5948  showlist (The first, second, and third items.);
5949  report (x>y, "x is %d but y is %d", x, y);
5950}
5951
5952// Check long long types.
5953#define BIG64 18446744073709551615ull
5954#define BIG32 4294967295ul
5955#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5956#if !BIG_OK
5957  your preprocessor is broken;
5958#endif
5959#if BIG_OK
5960#else
5961  your preprocessor is broken;
5962#endif
5963static long long int bignum = -9223372036854775807LL;
5964static unsigned long long int ubignum = BIG64;
5965
5966struct incomplete_array
5967{
5968  int datasize;
5969  double data[];
5970};
5971
5972struct named_init {
5973  int number;
5974  const wchar_t *name;
5975  double average;
5976};
5977
5978typedef const char *ccp;
5979
5980static inline int
5981test_restrict (ccp restrict text)
5982{
5983  // See if C++-style comments work.
5984  // Iterate through items via the restricted pointer.
5985  // Also check for declarations in for loops.
5986  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5987    continue;
5988  return 0;
5989}
5990
5991// Check varargs and va_copy.
5992static bool
5993test_varargs (const char *format, ...)
5994{
5995  va_list args;
5996  va_start (args, format);
5997  va_list args_copy;
5998  va_copy (args_copy, args);
5999
6000  const char *str = "";
6001  int number = 0;
6002  float fnumber = 0;
6003
6004  while (*format)
6005    {
6006      switch (*format++)
6007	{
6008	case 's': // string
6009	  str = va_arg (args_copy, const char *);
6010	  break;
6011	case 'd': // int
6012	  number = va_arg (args_copy, int);
6013	  break;
6014	case 'f': // float
6015	  fnumber = va_arg (args_copy, double);
6016	  break;
6017	default:
6018	  break;
6019	}
6020    }
6021  va_end (args_copy);
6022  va_end (args);
6023
6024  return *str && number && fnumber;
6025}
6026// Check _Alignas.
6027char _Alignas (double) aligned_as_double;
6028char _Alignas (0) no_special_alignment;
6029extern char aligned_as_int;
6030char _Alignas (0) _Alignas (int) aligned_as_int;
6031
6032// Check _Alignof.
6033enum
6034{
6035  int_alignment = _Alignof (int),
6036  int_array_alignment = _Alignof (int[100]),
6037  char_alignment = _Alignof (char)
6038};
6039_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
6040
6041// Check _Noreturn.
6042int _Noreturn does_not_return (void) { for (;;) continue; }
6043
6044// Check _Static_assert.
6045struct test_static_assert
6046{
6047  int x;
6048  _Static_assert (sizeof (int) <= sizeof (long int),
6049                  "_Static_assert does not work in struct");
6050  long int y;
6051};
6052
6053// Check UTF-8 literals.
6054#define u8 syntax error!
6055char const utf8_literal[] = u8"happens to be ASCII" "another string";
6056
6057// Check duplicate typedefs.
6058typedef long *long_ptr;
6059typedef long int *long_ptr;
6060typedef long_ptr long_ptr;
6061
6062// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
6063struct anonymous
6064{
6065  union {
6066    struct { int i; int j; };
6067    struct { int k; long int l; } w;
6068  };
6069  int m;
6070} v1;
6071
6072int
6073main ()
6074{
6075
6076  // Check bool.
6077  _Bool success = false;
6078
6079  // Check restrict.
6080  if (test_restrict ("String literal") == 0)
6081    success = true;
6082  char *restrict newvar = "Another string";
6083
6084  // Check varargs.
6085  success &= test_varargs ("s, d' f .", "string", 65, 34.234);
6086  test_varargs_macros ();
6087
6088  // Check flexible array members.
6089  struct incomplete_array *ia =
6090    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6091  ia->datasize = 10;
6092  for (int i = 0; i < ia->datasize; ++i)
6093    ia->data[i] = i * 1.234;
6094
6095  // Check named initializers.
6096  struct named_init ni = {
6097    .number = 34,
6098    .name = L"Test wide string",
6099    .average = 543.34343,
6100  };
6101
6102  ni.number = 58;
6103
6104  int dynamic_array[ni.number];
6105  dynamic_array[ni.number - 1] = 543;
6106
6107  // work around unused variable warnings
6108  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6109	  || dynamic_array[ni.number - 1] != 543);
6110
6111  v1.i = 2;
6112  v1.w.k = 5;
6113  _Static_assert ((offsetof (struct anonymous, i)
6114		   == offsetof (struct anonymous, w.k)),
6115		  "Anonymous union alignment botch");
6116
6117  ;
6118  return 0;
6119}
6120_ACEOF
6121for ac_arg in '' -std=gnu11
6122do
6123  CC="$ac_save_CC $ac_arg"
6124  if ac_fn_c_try_compile "$LINENO"; then :
6125  ac_cv_prog_cc_c11=$ac_arg
6126fi
6127rm -f core conftest.err conftest.$ac_objext
6128  test "x$ac_cv_prog_cc_c11" != "xno" && break
6129done
6130rm -f conftest.$ac_ext
6131CC=$ac_save_CC
6132
6133fi
6134# AC_CACHE_VAL
6135ac_prog_cc_stdc_options=
6136case "x$ac_cv_prog_cc_c11" in
6137  x)
6138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6139$as_echo "none needed" >&6; } ;;
6140  xno)
6141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6142$as_echo "unsupported" >&6; } ;;
6143  *)
6144    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
6145    CC=$CC$ac_prog_cc_stdc_options
6146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
6147$as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
6148esac
6149if test "x$ac_cv_prog_cc_c11" != xno; then :
6150  ac_prog_cc_stdc=c11
6151		 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
6152else
6153  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
6154$as_echo_n "checking for $CC option to enable C99 features... " >&6; }
6155if ${ac_cv_prog_cc_c99+:} false; then :
6156  $as_echo_n "(cached) " >&6
6157else
6158  ac_cv_prog_cc_c99=no
6159ac_save_CC=$CC
6160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6161/* end confdefs.h.  */
6162#include <stdarg.h>
6163#include <stdbool.h>
6164#include <stddef.h>
6165#include <stdlib.h>
6166#include <wchar.h>
6167#include <stdio.h>
6168
6169// Check varargs macros.  These examples are taken from C99 6.10.3.5.
6170#define debug(...) fprintf (stderr, __VA_ARGS__)
6171#define showlist(...) puts (#__VA_ARGS__)
6172#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6173static void
6174test_varargs_macros (void)
6175{
6176  int x = 1234;
6177  int y = 5678;
6178  debug ("Flag");
6179  debug ("X = %d\n", x);
6180  showlist (The first, second, and third items.);
6181  report (x>y, "x is %d but y is %d", x, y);
6182}
6183
6184// Check long long types.
6185#define BIG64 18446744073709551615ull
6186#define BIG32 4294967295ul
6187#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6188#if !BIG_OK
6189  your preprocessor is broken;
6190#endif
6191#if BIG_OK
6192#else
6193  your preprocessor is broken;
6194#endif
6195static long long int bignum = -9223372036854775807LL;
6196static unsigned long long int ubignum = BIG64;
6197
6198struct incomplete_array
6199{
6200  int datasize;
6201  double data[];
6202};
6203
6204struct named_init {
6205  int number;
6206  const wchar_t *name;
6207  double average;
6208};
6209
6210typedef const char *ccp;
6211
6212static inline int
6213test_restrict (ccp restrict text)
6214{
6215  // See if C++-style comments work.
6216  // Iterate through items via the restricted pointer.
6217  // Also check for declarations in for loops.
6218  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6219    continue;
6220  return 0;
6221}
6222
6223// Check varargs and va_copy.
6224static bool
6225test_varargs (const char *format, ...)
6226{
6227  va_list args;
6228  va_start (args, format);
6229  va_list args_copy;
6230  va_copy (args_copy, args);
6231
6232  const char *str = "";
6233  int number = 0;
6234  float fnumber = 0;
6235
6236  while (*format)
6237    {
6238      switch (*format++)
6239	{
6240	case 's': // string
6241	  str = va_arg (args_copy, const char *);
6242	  break;
6243	case 'd': // int
6244	  number = va_arg (args_copy, int);
6245	  break;
6246	case 'f': // float
6247	  fnumber = va_arg (args_copy, double);
6248	  break;
6249	default:
6250	  break;
6251	}
6252    }
6253  va_end (args_copy);
6254  va_end (args);
6255
6256  return *str && number && fnumber;
6257}
6258int
6259main ()
6260{
6261
6262  // Check bool.
6263  _Bool success = false;
6264
6265  // Check restrict.
6266  if (test_restrict ("String literal") == 0)
6267    success = true;
6268  char *restrict newvar = "Another string";
6269
6270  // Check varargs.
6271  success &= test_varargs ("s, d' f .", "string", 65, 34.234);
6272  test_varargs_macros ();
6273
6274  // Check flexible array members.
6275  struct incomplete_array *ia =
6276    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6277  ia->datasize = 10;
6278  for (int i = 0; i < ia->datasize; ++i)
6279    ia->data[i] = i * 1.234;
6280
6281  // Check named initializers.
6282  struct named_init ni = {
6283    .number = 34,
6284    .name = L"Test wide string",
6285    .average = 543.34343,
6286  };
6287
6288  ni.number = 58;
6289
6290  int dynamic_array[ni.number];
6291  dynamic_array[ni.number - 1] = 543;
6292
6293  // work around unused variable warnings
6294  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6295	  || dynamic_array[ni.number - 1] != 543);
6296
6297  ;
6298  return 0;
6299}
6300_ACEOF
6301for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
6302do
6303  CC="$ac_save_CC $ac_arg"
6304  if ac_fn_c_try_compile "$LINENO"; then :
6305  ac_cv_prog_cc_c99=$ac_arg
6306fi
6307rm -f core conftest.err conftest.$ac_objext
6308  test "x$ac_cv_prog_cc_c99" != "xno" && break
6309done
6310rm -f conftest.$ac_ext
6311CC=$ac_save_CC
6312
6313fi
6314# AC_CACHE_VAL
6315ac_prog_cc_stdc_options=
6316case "x$ac_cv_prog_cc_c99" in
6317  x)
6318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6319$as_echo "none needed" >&6; } ;;
6320  xno)
6321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6322$as_echo "unsupported" >&6; } ;;
6323  *)
6324    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
6325    CC=$CC$ac_prog_cc_stdc_options
6326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6327$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6328esac
6329if test "x$ac_cv_prog_cc_c99" != xno; then :
6330  ac_prog_cc_stdc=c99
6331		    ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6332else
6333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
6334$as_echo_n "checking for $CC option to enable C89 features... " >&6; }
6335if ${ac_cv_prog_cc_c89+:} false; then :
6336  $as_echo_n "(cached) " >&6
6337else
6338  ac_cv_prog_cc_c89=no
6339ac_save_CC=$CC
6340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6341/* end confdefs.h.  */
6342#include <stdarg.h>
6343#include <stdio.h>
6344struct stat;
6345/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6346struct buf { int x; };
6347FILE * (*rcsopen) (struct buf *, struct stat *, int);
6348static char *e (p, i)
6349     char **p;
6350     int i;
6351{
6352  return p[i];
6353}
6354static char *f (char * (*g) (char **, int), char **p, ...)
6355{
6356  char *s;
6357  va_list v;
6358  va_start (v,p);
6359  s = g (p, va_arg (v,int));
6360  va_end (v);
6361  return s;
6362}
6363
6364/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6365   function prototypes and stuff, but not '\xHH' hex character constants.
6366   These don't provoke an error unfortunately, instead are silently treated
6367   as 'x'.  The following induces an error, until -std is added to get
6368   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6369   array size at least.  It's necessary to write '\x00'==0 to get something
6370   that's true only with -std.  */
6371int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6372
6373/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6374   inside strings and character constants.  */
6375#define FOO(x) 'x'
6376int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6377
6378int test (int i, double x);
6379struct s1 {int (*f) (int a);};
6380struct s2 {int (*f) (double a);};
6381int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6382int argc;
6383char **argv;
6384int
6385main ()
6386{
6387return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6388  ;
6389  return 0;
6390}
6391_ACEOF
6392for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6393	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6394do
6395  CC="$ac_save_CC $ac_arg"
6396  if ac_fn_c_try_compile "$LINENO"; then :
6397  ac_cv_prog_cc_c89=$ac_arg
6398fi
6399rm -f core conftest.err conftest.$ac_objext
6400  test "x$ac_cv_prog_cc_c89" != "xno" && break
6401done
6402rm -f conftest.$ac_ext
6403CC=$ac_save_CC
6404
6405fi
6406# AC_CACHE_VAL
6407ac_prog_cc_stdc_options=
6408case "x$ac_cv_prog_cc_c89" in
6409  x)
6410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6411$as_echo "none needed" >&6; } ;;
6412  xno)
6413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6414$as_echo "unsupported" >&6; } ;;
6415  *)
6416    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
6417    CC=$CC$ac_prog_cc_stdc_options
6418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6419$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6420esac
6421if test "x$ac_cv_prog_cc_c89" != xno; then :
6422  ac_prog_cc_stdc=c89
6423		       ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6424else
6425  ac_prog_cc_stdc=no
6426		       ac_cv_prog_cc_stdc=no
6427fi
6428
6429fi
6430
6431fi
6432
6433ac_ext=c
6434ac_cpp='$CPP $CPPFLAGS'
6435ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6436ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6437ac_compiler_gnu=$ac_cv_c_compiler_gnu
6438
6439
6440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
6441$as_echo_n "checking whether the compiler is clang... " >&6; }
6442if ${gl_cv_compiler_clang+:} false; then :
6443  $as_echo_n "(cached) " >&6
6444else
6445                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6446/* end confdefs.h.  */
6447
6448           #ifdef __clang__
6449           barfbarf
6450           #endif
6451
6452int
6453main ()
6454{
6455
6456  ;
6457  return 0;
6458}
6459
6460_ACEOF
6461if ac_fn_c_try_compile "$LINENO"; then :
6462  gl_cv_compiler_clang=no
6463else
6464  gl_cv_compiler_clang=yes
6465fi
6466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6467
6468fi
6469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
6470$as_echo "$gl_cv_compiler_clang" >&6; }
6471
6472
6473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
6474$as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
6475if ${gl_cv_compiler_check_decl_option+:} false; then :
6476  $as_echo_n "(cached) " >&6
6477else
6478  if test $gl_cv_compiler_clang = yes; then
6479                     save_ac_compile="$ac_compile"
6480       ac_compile="$ac_compile -Werror=implicit-function-declaration"
6481                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6482/* end confdefs.h.  */
6483
6484int
6485main ()
6486{
6487
6488  ;
6489  return 0;
6490}
6491_ACEOF
6492if ac_fn_c_try_compile "$LINENO"; then :
6493  gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
6494else
6495  gl_cv_compiler_check_decl_option=none
6496fi
6497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6498       ac_compile="$save_ac_compile"
6499     else
6500       gl_cv_compiler_check_decl_option=none
6501     fi
6502
6503fi
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
6505$as_echo "$gl_cv_compiler_check_decl_option" >&6; }
6506  if test "x$gl_cv_compiler_check_decl_option" != xnone; then
6507    ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
6508  else
6509    ac_compile_for_check_decl="$ac_compile"
6510  fi
6511
6512DEPDIR="${am__leading_dot}deps"
6513
6514ac_config_commands="$ac_config_commands depfiles"
6515
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
6517$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
6518cat > confinc.mk << 'END'
6519am__doit:
6520	@echo this is the am__doit target >confinc.out
6521.PHONY: am__doit
6522END
6523am__include="#"
6524am__quote=
6525# BSD make does it like this.
6526echo '.include "confinc.mk" # ignored' > confmf.BSD
6527# Other make implementations (GNU, Solaris 10, AIX) do it like this.
6528echo 'include confinc.mk # ignored' > confmf.GNU
6529_am_result=no
6530for s in GNU BSD; do
6531  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
6532   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
6533   ac_status=$?
6534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6535   (exit $ac_status); }
6536  case $?:`cat confinc.out 2>/dev/null` in #(
6537  '0:this is the am__doit target') :
6538    case $s in #(
6539  BSD) :
6540    am__include='.include' am__quote='"' ;; #(
6541  *) :
6542    am__include='include' am__quote='' ;;
6543esac ;; #(
6544  *) :
6545     ;;
6546esac
6547  if test "$am__include" != "#"; then
6548    _am_result="yes ($s style)"
6549    break
6550  fi
6551done
6552rm -f confinc.* confmf.*
6553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
6554$as_echo "${_am_result}" >&6; }
6555
6556# Check whether --enable-dependency-tracking was given.
6557if test "${enable_dependency_tracking+set}" = set; then :
6558  enableval=$enable_dependency_tracking;
6559fi
6560
6561if test "x$enable_dependency_tracking" != xno; then
6562  am_depcomp="$ac_aux_dir/depcomp"
6563  AMDEPBACKSLASH='\'
6564  am__nodep='_no'
6565fi
6566 if test "x$enable_dependency_tracking" != xno; then
6567  AMDEP_TRUE=
6568  AMDEP_FALSE='#'
6569else
6570  AMDEP_TRUE='#'
6571  AMDEP_FALSE=
6572fi
6573
6574
6575
6576depcc="$CC"   am_compiler_list=
6577
6578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6579$as_echo_n "checking dependency style of $depcc... " >&6; }
6580if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6581  $as_echo_n "(cached) " >&6
6582else
6583  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6584  # We make a subdir and do the tests there.  Otherwise we can end up
6585  # making bogus files that we don't know about and never remove.  For
6586  # instance it was reported that on HP-UX the gcc test will end up
6587  # making a dummy file named 'D' -- because '-MD' means "put the output
6588  # in D".
6589  rm -rf conftest.dir
6590  mkdir conftest.dir
6591  # Copy depcomp to subdir because otherwise we won't find it if we're
6592  # using a relative directory.
6593  cp "$am_depcomp" conftest.dir
6594  cd conftest.dir
6595  # We will build objects and dependencies in a subdirectory because
6596  # it helps to detect inapplicable dependency modes.  For instance
6597  # both Tru64's cc and ICC support -MD to output dependencies as a
6598  # side effect of compilation, but ICC will put the dependencies in
6599  # the current directory while Tru64 will put them in the object
6600  # directory.
6601  mkdir sub
6602
6603  am_cv_CC_dependencies_compiler_type=none
6604  if test "$am_compiler_list" = ""; then
6605     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6606  fi
6607  am__universal=false
6608  case " $depcc " in #(
6609     *\ -arch\ *\ -arch\ *) am__universal=true ;;
6610     esac
6611
6612  for depmode in $am_compiler_list; do
6613    # Setup a source with many dependencies, because some compilers
6614    # like to wrap large dependency lists on column 80 (with \), and
6615    # we should not choose a depcomp mode which is confused by this.
6616    #
6617    # We need to recreate these files for each test, as the compiler may
6618    # overwrite some of them when testing with obscure command lines.
6619    # This happens at least with the AIX C compiler.
6620    : > sub/conftest.c
6621    for i in 1 2 3 4 5 6; do
6622      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6623      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6624      # Solaris 10 /bin/sh.
6625      echo '/* dummy */' > sub/conftst$i.h
6626    done
6627    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6628
6629    # We check with '-c' and '-o' for the sake of the "dashmstdout"
6630    # mode.  It turns out that the SunPro C++ compiler does not properly
6631    # handle '-M -o', and we need to detect this.  Also, some Intel
6632    # versions had trouble with output in subdirs.
6633    am__obj=sub/conftest.${OBJEXT-o}
6634    am__minus_obj="-o $am__obj"
6635    case $depmode in
6636    gcc)
6637      # This depmode causes a compiler race in universal mode.
6638      test "$am__universal" = false || continue
6639      ;;
6640    nosideeffect)
6641      # After this tag, mechanisms are not by side-effect, so they'll
6642      # only be used when explicitly requested.
6643      if test "x$enable_dependency_tracking" = xyes; then
6644	continue
6645      else
6646	break
6647      fi
6648      ;;
6649    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6650      # This compiler won't grok '-c -o', but also, the minuso test has
6651      # not run yet.  These depmodes are late enough in the game, and
6652      # so weak that their functioning should not be impacted.
6653      am__obj=conftest.${OBJEXT-o}
6654      am__minus_obj=
6655      ;;
6656    none) break ;;
6657    esac
6658    if depmode=$depmode \
6659       source=sub/conftest.c object=$am__obj \
6660       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6661       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6662         >/dev/null 2>conftest.err &&
6663       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6664       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6665       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6666       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6667      # icc doesn't choke on unknown options, it will just issue warnings
6668      # or remarks (even with -Werror).  So we grep stderr for any message
6669      # that says an option was ignored or not supported.
6670      # When given -MP, icc 7.0 and 7.1 complain thusly:
6671      #   icc: Command line warning: ignoring option '-M'; no argument required
6672      # The diagnosis changed in icc 8.0:
6673      #   icc: Command line remark: option '-MP' not supported
6674      if (grep 'ignoring option' conftest.err ||
6675          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6676        am_cv_CC_dependencies_compiler_type=$depmode
6677        break
6678      fi
6679    fi
6680  done
6681
6682  cd ..
6683  rm -rf conftest.dir
6684else
6685  am_cv_CC_dependencies_compiler_type=none
6686fi
6687
6688fi
6689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6690$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6691CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6692
6693 if
6694  test "x$enable_dependency_tracking" != xno \
6695  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6696  am__fastdepCC_TRUE=
6697  am__fastdepCC_FALSE='#'
6698else
6699  am__fastdepCC_TRUE='#'
6700  am__fastdepCC_FALSE=
6701fi
6702
6703
6704
6705
6706
6707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use Java" >&5
6708$as_echo_n "checking whether to use Java... " >&6; }
6709  # Check whether --enable-java was given.
6710if test "${enable_java+set}" = set; then :
6711  enableval=$enable_java; JAVA_CHOICE="$enableval"
6712else
6713  JAVA_CHOICE=yes
6714fi
6715
6716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHOICE" >&5
6717$as_echo "$JAVA_CHOICE" >&6; }
6718
6719
6720
6721
6722ac_ext=c
6723ac_cpp='$CPP $CPPFLAGS'
6724ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6725ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6726ac_compiler_gnu=$ac_cv_c_compiler_gnu
6727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6728$as_echo_n "checking how to run the C preprocessor... " >&6; }
6729# On Suns, sometimes $CPP names a directory.
6730if test -n "$CPP" && test -d "$CPP"; then
6731  CPP=
6732fi
6733if test -z "$CPP"; then
6734  if ${ac_cv_prog_CPP+:} false; then :
6735  $as_echo_n "(cached) " >&6
6736else
6737      # Double quotes because CPP needs to be expanded
6738    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6739    do
6740      ac_preproc_ok=false
6741for ac_c_preproc_warn_flag in '' yes
6742do
6743  # Use a header file that comes with gcc, so configuring glibc
6744  # with a fresh cross-compiler works.
6745  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6746  # <limits.h> exists even on freestanding compilers.
6747  # On the NeXT, cc -E runs the code through the compiler's parser,
6748  # not just through cpp. "Syntax error" is here to catch this case.
6749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6750/* end confdefs.h.  */
6751#ifdef __STDC__
6752# include <limits.h>
6753#else
6754# include <assert.h>
6755#endif
6756		     Syntax error
6757_ACEOF
6758if ac_fn_c_try_cpp "$LINENO"; then :
6759
6760else
6761  # Broken: fails on valid input.
6762continue
6763fi
6764rm -f conftest.err conftest.i conftest.$ac_ext
6765
6766  # OK, works on sane cases.  Now check whether nonexistent headers
6767  # can be detected and how.
6768  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6769/* end confdefs.h.  */
6770#include <ac_nonexistent.h>
6771_ACEOF
6772if ac_fn_c_try_cpp "$LINENO"; then :
6773  # Broken: success on invalid input.
6774continue
6775else
6776  # Passes both tests.
6777ac_preproc_ok=:
6778break
6779fi
6780rm -f conftest.err conftest.i conftest.$ac_ext
6781
6782done
6783# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6784rm -f conftest.i conftest.err conftest.$ac_ext
6785if $ac_preproc_ok; then :
6786  break
6787fi
6788
6789    done
6790    ac_cv_prog_CPP=$CPP
6791
6792fi
6793  CPP=$ac_cv_prog_CPP
6794else
6795  ac_cv_prog_CPP=$CPP
6796fi
6797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6798$as_echo "$CPP" >&6; }
6799ac_preproc_ok=false
6800for ac_c_preproc_warn_flag in '' yes
6801do
6802  # Use a header file that comes with gcc, so configuring glibc
6803  # with a fresh cross-compiler works.
6804  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6805  # <limits.h> exists even on freestanding compilers.
6806  # On the NeXT, cc -E runs the code through the compiler's parser,
6807  # not just through cpp. "Syntax error" is here to catch this case.
6808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6809/* end confdefs.h.  */
6810#ifdef __STDC__
6811# include <limits.h>
6812#else
6813# include <assert.h>
6814#endif
6815		     Syntax error
6816_ACEOF
6817if ac_fn_c_try_cpp "$LINENO"; then :
6818
6819else
6820  # Broken: fails on valid input.
6821continue
6822fi
6823rm -f conftest.err conftest.i conftest.$ac_ext
6824
6825  # OK, works on sane cases.  Now check whether nonexistent headers
6826  # can be detected and how.
6827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6828/* end confdefs.h.  */
6829#include <ac_nonexistent.h>
6830_ACEOF
6831if ac_fn_c_try_cpp "$LINENO"; then :
6832  # Broken: success on invalid input.
6833continue
6834else
6835  # Passes both tests.
6836ac_preproc_ok=:
6837break
6838fi
6839rm -f conftest.err conftest.i conftest.$ac_ext
6840
6841done
6842# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6843rm -f conftest.i conftest.err conftest.$ac_ext
6844if $ac_preproc_ok; then :
6845
6846else
6847  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6849as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6850See \`config.log' for more details" "$LINENO" 5; }
6851fi
6852
6853ac_ext=c
6854ac_cpp='$CPP $CPPFLAGS'
6855ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6856ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6857ac_compiler_gnu=$ac_cv_c_compiler_gnu
6858
6859
6860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6861$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6862if ${ac_cv_path_GREP+:} false; then :
6863  $as_echo_n "(cached) " >&6
6864else
6865  if test -z "$GREP"; then
6866  ac_path_GREP_found=false
6867  # Loop through the user's path and test for each of PROGNAME-LIST
6868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6869for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6870do
6871  IFS=$as_save_IFS
6872  test -z "$as_dir" && as_dir=.
6873    for ac_prog in grep ggrep; do
6874    for ac_exec_ext in '' $ac_executable_extensions; do
6875      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6876      as_fn_executable_p "$ac_path_GREP" || continue
6877# Check for GNU ac_path_GREP and select it if it is found.
6878  # Check for GNU $ac_path_GREP
6879case `"$ac_path_GREP" --version 2>&1` in
6880*GNU*)
6881  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6882*)
6883  ac_count=0
6884  $as_echo_n 0123456789 >"conftest.in"
6885  while :
6886  do
6887    cat "conftest.in" "conftest.in" >"conftest.tmp"
6888    mv "conftest.tmp" "conftest.in"
6889    cp "conftest.in" "conftest.nl"
6890    $as_echo 'GREP' >> "conftest.nl"
6891    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6892    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6893    as_fn_arith $ac_count + 1 && ac_count=$as_val
6894    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6895      # Best one so far, save it but keep looking for a better one
6896      ac_cv_path_GREP="$ac_path_GREP"
6897      ac_path_GREP_max=$ac_count
6898    fi
6899    # 10*(2^10) chars as input seems more than enough
6900    test $ac_count -gt 10 && break
6901  done
6902  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6903esac
6904
6905      $ac_path_GREP_found && break 3
6906    done
6907  done
6908  done
6909IFS=$as_save_IFS
6910  if test -z "$ac_cv_path_GREP"; then
6911    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6912  fi
6913else
6914  ac_cv_path_GREP=$GREP
6915fi
6916
6917fi
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6919$as_echo "$ac_cv_path_GREP" >&6; }
6920 GREP="$ac_cv_path_GREP"
6921
6922
6923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6924$as_echo_n "checking for egrep... " >&6; }
6925if ${ac_cv_path_EGREP+:} false; then :
6926  $as_echo_n "(cached) " >&6
6927else
6928  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6929   then ac_cv_path_EGREP="$GREP -E"
6930   else
6931     if test -z "$EGREP"; then
6932  ac_path_EGREP_found=false
6933  # Loop through the user's path and test for each of PROGNAME-LIST
6934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6935for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6936do
6937  IFS=$as_save_IFS
6938  test -z "$as_dir" && as_dir=.
6939    for ac_prog in egrep; do
6940    for ac_exec_ext in '' $ac_executable_extensions; do
6941      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6942      as_fn_executable_p "$ac_path_EGREP" || continue
6943# Check for GNU ac_path_EGREP and select it if it is found.
6944  # Check for GNU $ac_path_EGREP
6945case `"$ac_path_EGREP" --version 2>&1` in
6946*GNU*)
6947  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6948*)
6949  ac_count=0
6950  $as_echo_n 0123456789 >"conftest.in"
6951  while :
6952  do
6953    cat "conftest.in" "conftest.in" >"conftest.tmp"
6954    mv "conftest.tmp" "conftest.in"
6955    cp "conftest.in" "conftest.nl"
6956    $as_echo 'EGREP' >> "conftest.nl"
6957    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6958    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6959    as_fn_arith $ac_count + 1 && ac_count=$as_val
6960    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6961      # Best one so far, save it but keep looking for a better one
6962      ac_cv_path_EGREP="$ac_path_EGREP"
6963      ac_path_EGREP_max=$ac_count
6964    fi
6965    # 10*(2^10) chars as input seems more than enough
6966    test $ac_count -gt 10 && break
6967  done
6968  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6969esac
6970
6971      $ac_path_EGREP_found && break 3
6972    done
6973  done
6974  done
6975IFS=$as_save_IFS
6976  if test -z "$ac_cv_path_EGREP"; then
6977    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6978  fi
6979else
6980  ac_cv_path_EGREP=$EGREP
6981fi
6982
6983   fi
6984fi
6985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6986$as_echo "$ac_cv_path_EGREP" >&6; }
6987 EGREP="$ac_cv_path_EGREP"
6988
6989
6990
6991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java virtual machine" >&5
6992$as_echo_n "checking for Java virtual machine... " >&6; }
6993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6994/* end confdefs.h.  */
6995
6996#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
6997  yes
6998#endif
6999
7000_ACEOF
7001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7002  $EGREP "yes" >/dev/null 2>&1; then :
7003  CLASSPATH_SEPARATOR=';'
7004else
7005  CLASSPATH_SEPARATOR=':'
7006fi
7007rm -f conftest*
7008
7009  CONF_JAVA=
7010  HAVE_JAVA_ENVVAR=
7011  HAVE_GIJ=
7012  HAVE_JAVA=
7013  HAVE_JRE=
7014  HAVE_JVIEW=
7015  HAVE_JAVAEXEC=1
7016  if test -n "$JAVA"; then
7017    HAVE_JAVA_ENVVAR=1
7018    CONF_JAVA="$JAVA"
7019  else
7020                # Extract the first word of "gij", so it can be a program name with args.
7021set dummy gij; ac_word=$2
7022:
7023if ${ac_cv_prog_HAVE_GIJ_IN_PATH+:} false; then :
7024  $as_echo_n "(cached) " >&6
7025else
7026  if test -n "$HAVE_GIJ_IN_PATH"; then
7027  ac_cv_prog_HAVE_GIJ_IN_PATH="$HAVE_GIJ_IN_PATH" # Let the user override the test.
7028else
7029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7030for as_dir in $PATH
7031do
7032  IFS=$as_save_IFS
7033  test -z "$as_dir" && as_dir=.
7034    for ac_exec_ext in '' $ac_executable_extensions; do
7035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7036    ac_cv_prog_HAVE_GIJ_IN_PATH="yes"
7037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7038    break 2
7039  fi
7040done
7041  done
7042IFS=$as_save_IFS
7043
7044fi
7045fi
7046HAVE_GIJ_IN_PATH=$ac_cv_prog_HAVE_GIJ_IN_PATH
7047if test -n "$HAVE_GIJ_IN_PATH"; then
7048  :
7049else
7050  :
7051fi
7052
7053
7054    # Extract the first word of "java", so it can be a program name with args.
7055set dummy java; ac_word=$2
7056:
7057if ${ac_cv_prog_HAVE_JAVA_IN_PATH+:} false; then :
7058  $as_echo_n "(cached) " >&6
7059else
7060  if test -n "$HAVE_JAVA_IN_PATH"; then
7061  ac_cv_prog_HAVE_JAVA_IN_PATH="$HAVE_JAVA_IN_PATH" # Let the user override the test.
7062else
7063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7064for as_dir in $PATH
7065do
7066  IFS=$as_save_IFS
7067  test -z "$as_dir" && as_dir=.
7068    for ac_exec_ext in '' $ac_executable_extensions; do
7069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7070    ac_cv_prog_HAVE_JAVA_IN_PATH="yes"
7071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7072    break 2
7073  fi
7074done
7075  done
7076IFS=$as_save_IFS
7077
7078fi
7079fi
7080HAVE_JAVA_IN_PATH=$ac_cv_prog_HAVE_JAVA_IN_PATH
7081if test -n "$HAVE_JAVA_IN_PATH"; then
7082  :
7083else
7084  :
7085fi
7086
7087
7088    # Extract the first word of "jre", so it can be a program name with args.
7089set dummy jre; ac_word=$2
7090:
7091if ${ac_cv_prog_HAVE_JRE_IN_PATH+:} false; then :
7092  $as_echo_n "(cached) " >&6
7093else
7094  if test -n "$HAVE_JRE_IN_PATH"; then
7095  ac_cv_prog_HAVE_JRE_IN_PATH="$HAVE_JRE_IN_PATH" # Let the user override the test.
7096else
7097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7098for as_dir in $PATH
7099do
7100  IFS=$as_save_IFS
7101  test -z "$as_dir" && as_dir=.
7102    for ac_exec_ext in '' $ac_executable_extensions; do
7103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7104    ac_cv_prog_HAVE_JRE_IN_PATH="yes"
7105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7106    break 2
7107  fi
7108done
7109  done
7110IFS=$as_save_IFS
7111
7112fi
7113fi
7114HAVE_JRE_IN_PATH=$ac_cv_prog_HAVE_JRE_IN_PATH
7115if test -n "$HAVE_JRE_IN_PATH"; then
7116  :
7117else
7118  :
7119fi
7120
7121
7122    # Extract the first word of "jview", so it can be a program name with args.
7123set dummy jview; ac_word=$2
7124:
7125if ${ac_cv_prog_HAVE_JVIEW_IN_PATH+:} false; then :
7126  $as_echo_n "(cached) " >&6
7127else
7128  if test -n "$HAVE_JVIEW_IN_PATH"; then
7129  ac_cv_prog_HAVE_JVIEW_IN_PATH="$HAVE_JVIEW_IN_PATH" # Let the user override the test.
7130else
7131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7132for as_dir in $PATH
7133do
7134  IFS=$as_save_IFS
7135  test -z "$as_dir" && as_dir=.
7136    for ac_exec_ext in '' $ac_executable_extensions; do
7137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7138    ac_cv_prog_HAVE_JVIEW_IN_PATH="yes"
7139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7140    break 2
7141  fi
7142done
7143  done
7144IFS=$as_save_IFS
7145
7146fi
7147fi
7148HAVE_JVIEW_IN_PATH=$ac_cv_prog_HAVE_JVIEW_IN_PATH
7149if test -n "$HAVE_JVIEW_IN_PATH"; then
7150  :
7151else
7152  :
7153fi
7154
7155
7156
7157    export CLASSPATH
7158    if test -n "$HAVE_GIJ_IN_PATH" \
7159       && gij --version >/dev/null 2>/dev/null \
7160       ; then
7161      HAVE_GIJ=1
7162      CONF_JAVA="gij"
7163    else
7164      if test -n "$HAVE_JAVA_IN_PATH" \
7165         && java -version >/dev/null 2>/dev/null \
7166         ; then
7167        HAVE_JAVA=1
7168        CONF_JAVA="java"
7169      else
7170        if test -n "$HAVE_JRE_IN_PATH" \
7171           && (jre >/dev/null 2>/dev/null || test $? = 1) \
7172           ; then
7173          HAVE_JRE=1
7174          CONF_JAVA="jre"
7175        else
7176          if test -n "$HAVE_JVIEW_IN_PATH" \
7177             && (jview -? >/dev/null 2>/dev/null || test $? = 1) \
7178             ; then
7179            HAVE_JVIEW=1
7180            CONF_JAVA="jview"
7181          else
7182            HAVE_JAVAEXEC=
7183          fi
7184        fi
7185      fi
7186    fi
7187
7188  fi
7189  if test -n "$HAVE_JAVAEXEC"; then
7190    ac_result="$CONF_JAVA"
7191  else
7192    ac_result="no"
7193  fi
7194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5
7195$as_echo "$ac_result" >&6; }
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7208/* end confdefs.h.  */
7209
7210#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
7211  yes
7212#endif
7213
7214_ACEOF
7215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7216  $EGREP "yes" >/dev/null 2>&1; then :
7217  CLASSPATH_SEPARATOR=';'
7218else
7219  CLASSPATH_SEPARATOR=':'
7220fi
7221rm -f conftest*
7222
7223  source_version=1.5
7224  test -n "$source_version" || {
7225    as_fn_error $? "missing source-version argument to gt_JAVACOMP" "$LINENO" 5
7226  }
7227  if test -n "$HAVE_JAVAEXEC"; then
7228              cat > conftestver.java <<EOF
7229public class conftestver {
7230  public static void main (String[] args) {
7231    System.out.println(System.getProperty("java.specification.version"));
7232  }
7233}
7234EOF
7235                                                                      echo 'yzwx!$!I!D,!)!3+!4!5*!6,!4!7,!8!9)!:)!;"!(MeienN"!$FGW"!%Ojab"!2QeibRohZblVYZgb"!%hYei"!9FXQfYpYKgYidKUnleidLGW"!,Ujol_bPegb"!3_jicnbmnpblJfYpY/!*!+)!</!=!>"!=fYpYJmkb_ece_YnejiJpblmeji/!?!@)!A/!B!C"!._jicnbmnpbl"!3fYpYKgYidKSZfb_n"!3fYpYKgYidKUqmnbh"!$jon"!8QfYpYKejKTleinUnlbYhL"!.dbnTljkblnq"!EFQfYpYKgYidKUnleidLGQfYpYKgYidKUnleidL"!6fYpYKejKTleinUnlbYh"!)kleingi"!8FQfYpYKgYidKUnleidLGW!D!(!)!!!!!#!"!*!+!"!,!!!@!"!"!!!&Hu!"r!!!"!.!!!(!"!!!"!+!/!0!"!,!!!F!#!"!!!/s!#5$v!%t!&r!!!"!.!!!,!#!!!$!.!%!"!1!!!#!2' \
7236         | tr -d '\012\015' \
7237         | tr '!"#$%&()*+,./0123456789:;<=>?@ABCDEFGHJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzI' '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\046\050\051\052\056\057\073\074\076\103\106\114\116\117\120\123\124\126\133\141\142\143\144\145\146\147\151\152\154\155\156\157\160\162\163\164\165\166\171\261\262\266\267\270\272\276\312\376\055' \
7238         > conftestver.class
7239       target_version=`{
7240         unset JAVA_HOME
7241         echo "$as_me:7241: CLASSPATH=.${CLASSPATH:+$CLASSPATH_SEPARATOR$CLASSPATH} $CONF_JAVA conftestver" >&5
7242         CLASSPATH=.${CLASSPATH:+$CLASSPATH_SEPARATOR$CLASSPATH} $CONF_JAVA conftestver 2>&5
7243       }`
7244       case "$target_version" in
7245         1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 9 | 10 | 11) ;;
7246         12 | 13 | 14 | 15 | 16 | 17)
7247                                 target_version=11 ;;
7248         null)
7249                      target_version=1.1 ;;
7250         *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown target-version $target_version, please update gt_JAVACOMP macro" >&5
7251$as_echo "$as_me: WARNING: unknown target-version $target_version, please update gt_JAVACOMP macro" >&2;}
7252            target_version=1.1 ;;
7253       esac
7254     else
7255       target_version="1.1"
7256     fi
7257
7258  case "$source_version" in
7259    1.3) goodcode='class conftest {}'
7260         failcode='class conftestfail { static { assert(true); } }' ;;
7261    1.4) goodcode='class conftest     { static { assert(true); } }'
7262         failcode='class conftestfail<T> { T foo() { return null; } }' ;;
7263    1.5) goodcode='class conftest<T>     { T foo() { return null; } }'
7264         failcode='class conftestfail { void foo () { switch ("A") {} } }' ;;
7265    1.7) goodcode='class conftest     { void foo () { switch ("A") {} } }'
7266         failcode='class conftestfail { void foo () { Runnable r = () -> {}; } }' ;;
7267    1.8) goodcode='class conftest     { void foo () { Runnable r = () -> {}; } }'
7268         failcode='interface conftestfail { private void foo () {} }' ;;
7269    9)   goodcode='interface conftest     { private void foo () {} }'
7270         failcode='class conftestfail { public void m() { var i = new Integer(0); } }' ;;
7271    10)  goodcode='class conftest     { public void m() { var i = new Integer(0); } }'
7272         failcode='class conftestfail { Readable r = (var b) -> 0; }' ;;
7273    11)  goodcode='class conftest     { Readable r = (var b) -> 0; }'
7274         failcode='class conftestfail syntax error' ;;
7275    *) as_fn_error $? "invalid source-version argument to gt_JAVACOMP: $source_version" "$LINENO" 5 ;;
7276  esac
7277  case "$target_version" in
7278    1.1) cfversion=45 ;;
7279    1.2) cfversion=46 ;;
7280    1.3) cfversion=47 ;;
7281    1.4) cfversion=48 ;;
7282    1.5) cfversion=49 ;;
7283    1.6) cfversion=50 ;;
7284    1.7) cfversion=51 ;;
7285    1.8) cfversion=52 ;;
7286    9)   cfversion=53 ;;
7287    10)  cfversion=54 ;;
7288    11)  cfversion=55 ;;
7289    *) as_fn_error $? "invalid target-version argument to gt_JAVACOMP: $target_version" "$LINENO" 5 ;;
7290  esac
7291  # Function to output the classfile version of a file (8th byte) in decimal.
7292  if od -A x < /dev/null >/dev/null 2>/dev/null; then
7293    # Use POSIX od.
7294    func_classfile_version ()
7295    {
7296      od -A n -t d1 -j 7 -N 1 "$1"
7297    }
7298  else
7299    # Use BSD hexdump.
7300    func_classfile_version ()
7301    {
7302      dd if="$1" bs=1 count=1 skip=7 2>/dev/null | hexdump -e '1/1 "%3d "'
7303      echo
7304    }
7305  fi
7306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java compiler" >&5
7307$as_echo_n "checking for Java compiler... " >&6; }
7308                                                                                                                                                                  CONF_JAVAC=
7309  HAVE_JAVAC_ENVVAR=
7310  HAVE_GCJ_C=
7311  HAVE_JAVAC=
7312  HAVE_JIKES=
7313  HAVE_JAVACOMP=
7314  cat > conftestlib.java <<EOF
7315public class conftestlib {
7316  public static void main (String[] args) {
7317  }
7318}
7319EOF
7320  echo "$goodcode" > conftest.java
7321  echo "$failcode" > conftestfail.java
7322        if test -n "$JAVAC"; then
7323        if $JAVAC --version 2>/dev/null | sed -e 1q | grep gcj > /dev/null; then
7324            if $JAVAC --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^4\.[012]/d' | grep '^[4-9]' >/dev/null; then
7325                        rm -f conftest.class
7326        if { echo "$as_me:7326: $JAVAC -d . conftest.java" >&5
7327             $JAVAC -d . conftest.java >&5 2>&1
7328           } \
7329           && test -f conftest.class \
7330           && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
7331                    rm -f conftest.class
7332          rm -f conftestfail.class
7333          if { echo "$as_me:7333: $JAVAC -fsource=$source_version -d . conftest.java" >&5
7334               $JAVAC -fsource="$source_version" -d . conftest.java >&5 2>&1
7335             } \
7336             && test -f conftest.class \
7337             && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
7338             && { echo "$as_me:7338: $JAVAC -d . conftestfail.java" >&5
7339                  $JAVAC -d . conftestfail.java >&5 2>&1
7340                } \
7341             && test -f conftestfail.class \
7342             && ! { echo "$as_me:7342: $JAVAC -fsource=$source_version -d . conftestfail.java" >&5
7343                    $JAVAC -fsource="$source_version" -d . conftestfail.java >&5 2>&1
7344                  }; then
7345            CONF_JAVAC="$JAVAC -fsource=$source_version"
7346            HAVE_JAVAC_ENVVAR=1
7347            HAVE_JAVACOMP=1
7348          else
7349            CONF_JAVAC="$JAVAC"
7350            HAVE_JAVAC_ENVVAR=1
7351            HAVE_JAVACOMP=1
7352          fi
7353        else
7354                    rm -f conftest.class
7355          rm -f conftestfail.class
7356          if { echo "$as_me:7356: $JAVAC -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5
7357               $JAVAC -fsource="$source_version" -ftarget="$target_version" -d . conftest.java >&5 2>&1
7358             } \
7359             && test -f conftest.class \
7360             && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
7361            CONF_JAVAC="$JAVAC -fsource=$source_version -ftarget=$target_version"
7362            HAVE_JAVAC_ENVVAR=1
7363            HAVE_JAVACOMP=1
7364          fi
7365        fi
7366      else
7367                if test "$target_version" = 1.4 && test "$source_version" = 1.4; then
7368                    rm -f conftest.class
7369          if { echo "$as_me:7369: $JAVAC -d . conftest.java" >&5
7370               $JAVAC -d . conftest.java >&5 2>&1
7371             } \
7372             && test -f conftest.class; then
7373            CONF_JAVAC="$JAVAC"
7374            HAVE_JAVAC_ENVVAR=1
7375            HAVE_JAVACOMP=1
7376          fi
7377        else
7378          if test "$target_version" = 1.4 && test "$source_version" = 1.3; then
7379                                    javac_works=
7380            rm -f conftest.class
7381            if { echo "$as_me:7381: $JAVAC -d . conftest.java" >&5
7382                 $JAVAC -d . conftest.java >&5 2>&1
7383               } \
7384               && test -f conftest.class; then
7385              javac_works=1
7386            fi
7387            javac_noassert_works=
7388            rm -f conftest.class
7389            if { echo "$as_me:7389: $JAVAC -fno-assert -d . conftest.java" >&5
7390                 $JAVAC -fno-assert -d . conftest.java >&5 2>&1
7391               } \
7392               && test -f conftest.class; then
7393              javac_noassert_works=1
7394            fi
7395            if test -n "$javac_works" && test -n "$javac_noassert_works"; then
7396              rm -f conftestfail.class
7397              if { echo "$as_me:7397: $JAVAC -d . conftestfail.java" >&5
7398                   $JAVAC -d . conftestfail.java >&5 2>&1
7399                 } \
7400                 && test -f conftestfail.class \
7401                 && ! { echo "$as_me:7401: $JAVAC -fno-assert -d . conftestfail.java" >&5
7402                        $JAVAC -fno-assert -d . conftestfail.java >&5 2>&1
7403                      }; then
7404                                javac_works=
7405              fi
7406            fi
7407            if test -n "$javac_works"; then
7408              CONF_JAVAC="$JAVAC"
7409              HAVE_JAVAC_ENVVAR=1
7410              HAVE_JAVACOMP=1
7411            else
7412              if test -n "$javac_noassert_works"; then
7413                CONF_JAVAC="$JAVAC -fno-assert"
7414                HAVE_JAVAC_ENVVAR=1
7415                HAVE_JAVACOMP=1
7416              fi
7417            fi
7418          fi
7419        fi
7420      fi
7421    else
7422                                    if test "$source_version" = 1.5; then
7423        case "$target_version" in
7424          1.1 | 1.2 | 1.3 | 1.4 | 1.5) ;;
7425          *) source_version='1.6' ;;
7426        esac
7427      fi
7428      rm -f conftest.class
7429      if { echo "$as_me:7429: $JAVAC -d . conftest.java" >&5
7430           $JAVAC -d . conftest.java >&5 2>&1
7431         } \
7432         && test -f conftest.class \
7433         && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
7434                rm -f conftest.class
7435        rm -f conftestfail.class
7436        if { echo "$as_me:7436: $JAVAC -source $source_version -d . conftest.java" >&5
7437             $JAVAC -source "$source_version" -d . conftest.java >&5 2>&1
7438           } \
7439           && test -f conftest.class \
7440           && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
7441           && { echo "$as_me:7441: $JAVAC -d . conftestfail.java" >&5
7442                $JAVAC -d . conftestfail.java >&5 2>&1
7443              } \
7444           && test -f conftestfail.class \
7445           && ! { echo "$as_me:7445: $JAVAC -source $source_version -d . conftestfail.java" >&5
7446                  $JAVAC -source "$source_version" -d . conftestfail.java >&5 2>&1
7447                }; then
7448          CONF_JAVAC="$JAVAC -source $source_version"
7449          HAVE_JAVAC_ENVVAR=1
7450          HAVE_JAVACOMP=1
7451        else
7452          CONF_JAVAC="$JAVAC"
7453          HAVE_JAVAC_ENVVAR=1
7454          HAVE_JAVACOMP=1
7455        fi
7456      else
7457                        rm -f conftest.class
7458        if { echo "$as_me:7458: $JAVAC -target $target_version -d . conftest.java" >&5
7459             $JAVAC -target "$target_version" -d . conftest.java >&5 2>&1
7460           } \
7461           && test -f conftest.class \
7462           && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
7463                    rm -f conftest.class
7464          rm -f conftestfail.class
7465          if { echo "$as_me:7465: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5
7466               $JAVAC -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
7467             } \
7468             && test -f conftest.class \
7469             && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
7470             && { echo "$as_me:7470: $JAVAC -target $target_version -d . conftestfail.java" >&5
7471                  $JAVAC -target "$target_version" -d . conftestfail.java >&5 2>&1
7472                } \
7473             && test -f conftestfail.class \
7474             && ! { echo "$as_me:7474: $JAVAC -target $target_version -source $source_version -d . conftestfail.java" >&5
7475                    $JAVAC -target "$target_version" -source "$source_version" -d . conftestfail.java >&5 2>&1
7476                  }; then
7477            CONF_JAVAC="$JAVAC -target $target_version -source $source_version"
7478            HAVE_JAVAC_ENVVAR=1
7479            HAVE_JAVACOMP=1
7480          else
7481            CONF_JAVAC="$JAVAC -target $target_version"
7482            HAVE_JAVAC_ENVVAR=1
7483            HAVE_JAVACOMP=1
7484          fi
7485        else
7486                                        rm -f conftest.class
7487          if { echo "$as_me:7487: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5
7488               $JAVAC -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
7489             } \
7490             && test -f conftest.class \
7491             && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
7492            CONF_JAVAC="$JAVAC -target $target_version -source $source_version"
7493            HAVE_JAVAC_ENVVAR=1
7494            HAVE_JAVACOMP=1
7495          fi
7496        fi
7497      fi
7498    fi
7499  fi
7500  if test -z "$HAVE_JAVACOMP"; then
7501                # Extract the first word of "gcj", so it can be a program name with args.
7502set dummy gcj; ac_word=$2
7503:
7504if ${ac_cv_prog_HAVE_GCJ_IN_PATH+:} false; then :
7505  $as_echo_n "(cached) " >&6
7506else
7507  if test -n "$HAVE_GCJ_IN_PATH"; then
7508  ac_cv_prog_HAVE_GCJ_IN_PATH="$HAVE_GCJ_IN_PATH" # Let the user override the test.
7509else
7510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7511for as_dir in $PATH
7512do
7513  IFS=$as_save_IFS
7514  test -z "$as_dir" && as_dir=.
7515    for ac_exec_ext in '' $ac_executable_extensions; do
7516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7517    ac_cv_prog_HAVE_GCJ_IN_PATH="yes"
7518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7519    break 2
7520  fi
7521done
7522  done
7523IFS=$as_save_IFS
7524
7525fi
7526fi
7527HAVE_GCJ_IN_PATH=$ac_cv_prog_HAVE_GCJ_IN_PATH
7528if test -n "$HAVE_GCJ_IN_PATH"; then
7529  :
7530else
7531  :
7532fi
7533
7534
7535    # Extract the first word of "javac", so it can be a program name with args.
7536set dummy javac; ac_word=$2
7537:
7538if ${ac_cv_prog_HAVE_JAVAC_IN_PATH+:} false; then :
7539  $as_echo_n "(cached) " >&6
7540else
7541  if test -n "$HAVE_JAVAC_IN_PATH"; then
7542  ac_cv_prog_HAVE_JAVAC_IN_PATH="$HAVE_JAVAC_IN_PATH" # Let the user override the test.
7543else
7544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7545for as_dir in $PATH
7546do
7547  IFS=$as_save_IFS
7548  test -z "$as_dir" && as_dir=.
7549    for ac_exec_ext in '' $ac_executable_extensions; do
7550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7551    ac_cv_prog_HAVE_JAVAC_IN_PATH="yes"
7552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7553    break 2
7554  fi
7555done
7556  done
7557IFS=$as_save_IFS
7558
7559fi
7560fi
7561HAVE_JAVAC_IN_PATH=$ac_cv_prog_HAVE_JAVAC_IN_PATH
7562if test -n "$HAVE_JAVAC_IN_PATH"; then
7563  :
7564else
7565  :
7566fi
7567
7568
7569    # Extract the first word of "jikes", so it can be a program name with args.
7570set dummy jikes; ac_word=$2
7571:
7572if ${ac_cv_prog_HAVE_JIKES_IN_PATH+:} false; then :
7573  $as_echo_n "(cached) " >&6
7574else
7575  if test -n "$HAVE_JIKES_IN_PATH"; then
7576  ac_cv_prog_HAVE_JIKES_IN_PATH="$HAVE_JIKES_IN_PATH" # Let the user override the test.
7577else
7578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7579for as_dir in $PATH
7580do
7581  IFS=$as_save_IFS
7582  test -z "$as_dir" && as_dir=.
7583    for ac_exec_ext in '' $ac_executable_extensions; do
7584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7585    ac_cv_prog_HAVE_JIKES_IN_PATH="yes"
7586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7587    break 2
7588  fi
7589done
7590  done
7591IFS=$as_save_IFS
7592
7593fi
7594fi
7595HAVE_JIKES_IN_PATH=$ac_cv_prog_HAVE_JIKES_IN_PATH
7596if test -n "$HAVE_JIKES_IN_PATH"; then
7597  :
7598else
7599  :
7600fi
7601
7602
7603                if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_GCJ_IN_PATH"; then
7604            if gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^3\.[01]/d' | grep '^[3-9]' >/dev/null; then
7605                if { echo "$as_me:7605: gcj -C -d . conftestlib.java" >&5
7606             gcj -C -d . conftestlib.java >&5 2>&1
7607           }; then
7608                    if gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^4\.[012]/d' | grep '^[4-9]' >/dev/null; then
7609                                    rm -f conftest.class
7610            if { echo "$as_me:7610: gcj -C -d . conftest.java" >&5
7611                 gcj -C -d . conftest.java >&5 2>&1
7612               } \
7613               && test -f conftest.class \
7614               && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
7615                            rm -f conftest.class
7616              rm -f conftestfail.class
7617              if { echo "$as_me:7617: gcj -C -fsource=$source_version -d . conftest.java" >&5
7618                   gcj -C -fsource="$source_version" -d . conftest.java >&5 2>&1
7619                 } \
7620                 && test -f conftest.class \
7621                 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
7622                 && { echo "$as_me:7622: gcj -C -d . conftestfail.java" >&5
7623                      gcj -C -d . conftestfail.java >&5 2>&1
7624                    } \
7625                 && test -f conftestfail.class \
7626                 && ! { echo "$as_me:7626: gcj -C -fsource=$source_version -d . conftestfail.java" >&5
7627                        gcj -C -fsource="$source_version" -d . conftestfail.java >&5 2>&1
7628                      }; then
7629                CONF_JAVAC="gcj -C -fsource=$source_version"
7630                HAVE_JAVAC_ENVVAR=1
7631                HAVE_JAVACOMP=1
7632              else
7633                CONF_JAVAC="gcj -C"
7634                HAVE_JAVAC_ENVVAR=1
7635                HAVE_JAVACOMP=1
7636              fi
7637            else
7638                            rm -f conftest.class
7639              rm -f conftestfail.class
7640              if { echo "$as_me:7640: gcj -C -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5
7641                   gcj -C -fsource="$source_version" -ftarget="$target_version" -d . conftest.java >&5 2>&1
7642                 } \
7643                 && test -f conftest.class \
7644                 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
7645                CONF_JAVAC="gcj -C -fsource=$source_version -ftarget=$target_version"
7646                HAVE_JAVAC_ENVVAR=1
7647                HAVE_JAVACOMP=1
7648              fi
7649            fi
7650          else
7651                                                if test "$target_version" = 1.4 && test "$source_version" = 1.4; then
7652              rm -f conftest.class
7653              if { echo "$as_me:7653: gcj -C -d . conftest.java" >&5
7654                   gcj -C -d . conftest.java >&5 2>&1
7655                 } \
7656                 && test -f conftest.class; then
7657                CONF_JAVAC="gcj -C"
7658                HAVE_GCJ_C=1
7659                HAVE_JAVACOMP=1
7660              fi
7661            else
7662              if test "$target_version" = 1.4 && test "$source_version" = 1.3; then
7663                                                rm -f conftest.class
7664                if { echo "$as_me:7664: gcj -C -fno-assert -d . conftest.java" >&5
7665                     gcj -C -fno-assert -d . conftest.java >&5 2>&1
7666                   } \
7667                   && test -f conftest.class; then
7668                  CONF_JAVAC="gcj -C -fno-assert"
7669                  HAVE_GCJ_C=1
7670                  HAVE_JAVACOMP=1
7671                else
7672                  rm -f conftest.class
7673                  if { echo "$as_me:7673: gcj -C -d . conftest.java" >&5
7674                       gcj -C -d . conftest.java >&5 2>&1
7675                     } \
7676                     && test -f conftest.class; then
7677                    CONF_JAVAC="gcj -C"
7678                    HAVE_GCJ_C=1
7679                    HAVE_JAVACOMP=1
7680                  fi
7681                fi
7682              fi
7683            fi
7684          fi
7685        fi
7686      fi
7687    fi
7688    if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_JAVAC_IN_PATH"; then
7689            if { javac -version >/dev/null 2>/dev/null || test $? -le 2; } \
7690         && ( if javac -help 2>&1 >/dev/null | grep at.dms.kjc.Main >/dev/null && javac -help 2>/dev/null | grep 'released.*2000' >/dev/null ; then exit 1; else exit 0; fi ); then
7691                                        if test "$source_version" = 1.5; then
7692          case "$target_version" in
7693            1.1 | 1.2 | 1.3 | 1.4 | 1.5) ;;
7694            *) source_version='1.6' ;;
7695          esac
7696        fi
7697                        rm -f conftest.class
7698        if { echo "$as_me:7698: javac -d . conftest.java" >&5
7699             javac -d . conftest.java >&5 2>&1
7700           } \
7701           && test -f conftest.class \
7702           && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
7703                    rm -f conftest.class
7704          rm -f conftestfail.class
7705          if { echo "$as_me:7705: javac -source $source_version -d . conftest.java" >&5
7706               javac -source "$source_version" -d . conftest.java >&5 2>&1
7707             } \
7708             && test -f conftest.class \
7709             && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
7710             && { echo "$as_me:7710: javac -d . conftestfail.java" >&5
7711                  javac -d . conftestfail.java >&5 2>&1
7712                } \
7713             && test -f conftestfail.class \
7714             && ! { echo "$as_me:7714: javac -source $source_version -d . conftestfail.java" >&5
7715                    javac -source "$source_version" -d . conftestfail.java >&5 2>&1
7716                  }; then
7717            CONF_JAVAC="javac -source $source_version"
7718            HAVE_JAVAC=1
7719            HAVE_JAVACOMP=1
7720          else
7721            CONF_JAVAC="javac"
7722            HAVE_JAVAC=1
7723            HAVE_JAVACOMP=1
7724          fi
7725        else
7726                              rm -f conftest.class
7727          if { echo "$as_me:7727: javac -target $target_version -d . conftest.java" >&5
7728               javac -target "$target_version" -d . conftest.java >&5 2>&1
7729             } \
7730             && test -f conftest.class \
7731             && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
7732                        rm -f conftest.class
7733            rm -f conftestfail.class
7734            if { echo "$as_me:7734: javac -target $target_version -source $source_version -d . conftest.java" >&5
7735                 javac -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
7736               } \
7737               && test -f conftest.class \
7738               && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \
7739               && { echo "$as_me:7739: javac -target $target_version -d . conftestfail.java" >&5
7740                    javac -target "$target_version" -d . conftestfail.java >&5 2>&1
7741                  } \
7742               && test -f conftestfail.class \
7743               && ! { echo "$as_me:7743: javac -target $target_version -source $source_version -d . conftestfail.java" >&5
7744                      javac -target "$target_version" -source "$source_version" -d . conftestfail.java >&5 2>&1
7745                    }; then
7746              CONF_JAVAC="javac -target $target_version -source $source_version"
7747              HAVE_JAVAC=1
7748              HAVE_JAVACOMP=1
7749            else
7750              CONF_JAVAC="javac -target $target_version"
7751              HAVE_JAVAC=1
7752              HAVE_JAVACOMP=1
7753            fi
7754          else
7755                                                rm -f conftest.class
7756            if { echo "$as_me:7756: javac -target $target_version -source $source_version -d . conftest.java" >&5
7757                 javac -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1
7758               } \
7759               && test -f conftest.class \
7760               && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then
7761              CONF_JAVAC="javac -target $target_version -source $source_version"
7762              HAVE_JAVAC=1
7763              HAVE_JAVACOMP=1
7764            fi
7765          fi
7766        fi
7767      fi
7768    fi
7769    if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_JIKES_IN_PATH"; then
7770            if { jikes >/dev/null 2>/dev/null || test $? = 1; } \
7771         && (
7772              # See if the existing CLASSPATH is sufficient to make jikes work.
7773              unset JAVA_HOME
7774              jikes conftestlib.java >&5 2>&1
7775              error=$?
7776              rm -f conftestlib.class
7777              exit $error
7778            ); then
7779                                if test "$source_version" = 1.3; then
7780          CONF_JAVAC="jikes"
7781          HAVE_JIKES=1
7782          HAVE_JAVACOMP=1
7783        fi
7784      fi
7785    fi
7786  fi
7787  rm -f conftest*.java conftest*.class
7788  if test -n "$HAVE_JAVACOMP"; then
7789    ac_result="$CONF_JAVAC"
7790  else
7791    ac_result="no"
7792  fi
7793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5
7794$as_echo "$ac_result" >&6; }
7795
7796
7797
7798
7799
7800
7801
7802
7803# Extract the first word of "jar", so it can be a program name with args.
7804set dummy jar; ac_word=$2
7805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7806$as_echo_n "checking for $ac_word... " >&6; }
7807if ${ac_cv_prog_JAR+:} false; then :
7808  $as_echo_n "(cached) " >&6
7809else
7810  if test -n "$JAR"; then
7811  ac_cv_prog_JAR="$JAR" # Let the user override the test.
7812else
7813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7814for as_dir in $PATH
7815do
7816  IFS=$as_save_IFS
7817  test -z "$as_dir" && as_dir=.
7818    for ac_exec_ext in '' $ac_executable_extensions; do
7819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7820    ac_cv_prog_JAR="jar"
7821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7822    break 2
7823  fi
7824done
7825  done
7826IFS=$as_save_IFS
7827
7828fi
7829fi
7830JAR=$ac_cv_prog_JAR
7831if test -n "$JAR"; then
7832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
7833$as_echo "$JAR" >&6; }
7834else
7835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7836$as_echo "no" >&6; }
7837fi
7838
7839
7840if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
7841  BUILDJAVA=yes
7842else
7843  BUILDJAVA=no
7844fi
7845
7846if test -n "$HAVE_JAVAEXEC" && test $BUILDJAVA = yes; then
7847  TESTJAVA=yes
7848else
7849  TESTJAVA=no
7850fi
7851
7852
7853
7854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preferred C# implementation" >&5
7855$as_echo_n "checking for preferred C# implementation... " >&6; }
7856  # Check whether --enable-csharp was given.
7857if test "${enable_csharp+set}" = set; then :
7858  enableval=$enable_csharp; CSHARP_CHOICE="$enableval"
7859else
7860  CSHARP_CHOICE=any
7861fi
7862
7863
7864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CSHARP_CHOICE" >&5
7865$as_echo "$CSHARP_CHOICE" >&6; }
7866  case "$CSHARP_CHOICE" in
7867    mono)
7868
7869$as_echo "#define CSHARP_CHOICE_MONO 1" >>confdefs.h
7870
7871      ;;
7872  esac
7873
7874
7875
7876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C# compiler" >&5
7877$as_echo_n "checking for C# compiler... " >&6; }
7878  HAVE_CSHARPCOMP=1
7879        # Extract the first word of "mcs", so it can be a program name with args.
7880set dummy mcs; ac_word=$2
7881:
7882if ${ac_cv_prog_HAVE_MCS_IN_PATH+:} false; then :
7883  $as_echo_n "(cached) " >&6
7884else
7885  if test -n "$HAVE_MCS_IN_PATH"; then
7886  ac_cv_prog_HAVE_MCS_IN_PATH="$HAVE_MCS_IN_PATH" # Let the user override the test.
7887else
7888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7889for as_dir in $PATH
7890do
7891  IFS=$as_save_IFS
7892  test -z "$as_dir" && as_dir=.
7893    for ac_exec_ext in '' $ac_executable_extensions; do
7894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7895    ac_cv_prog_HAVE_MCS_IN_PATH="yes"
7896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7897    break 2
7898  fi
7899done
7900  done
7901IFS=$as_save_IFS
7902
7903fi
7904fi
7905HAVE_MCS_IN_PATH=$ac_cv_prog_HAVE_MCS_IN_PATH
7906if test -n "$HAVE_MCS_IN_PATH"; then
7907  :
7908else
7909  :
7910fi
7911
7912
7913  # Extract the first word of "csc", so it can be a program name with args.
7914set dummy csc; ac_word=$2
7915:
7916if ${ac_cv_prog_HAVE_CSC_IN_PATH+:} false; then :
7917  $as_echo_n "(cached) " >&6
7918else
7919  if test -n "$HAVE_CSC_IN_PATH"; then
7920  ac_cv_prog_HAVE_CSC_IN_PATH="$HAVE_CSC_IN_PATH" # Let the user override the test.
7921else
7922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7923for as_dir in $PATH
7924do
7925  IFS=$as_save_IFS
7926  test -z "$as_dir" && as_dir=.
7927    for ac_exec_ext in '' $ac_executable_extensions; do
7928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7929    ac_cv_prog_HAVE_CSC_IN_PATH="yes"
7930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7931    break 2
7932  fi
7933done
7934  done
7935IFS=$as_save_IFS
7936
7937fi
7938fi
7939HAVE_CSC_IN_PATH=$ac_cv_prog_HAVE_CSC_IN_PATH
7940if test -n "$HAVE_CSC_IN_PATH"; then
7941  :
7942else
7943  :
7944fi
7945
7946
7947        for impl in "$CSHARP_CHOICE" mono sscli no; do
7948    case "$impl" in
7949      mono)
7950        if test -n "$HAVE_MCS_IN_PATH" \
7951           && mcs --version >/dev/null 2>/dev/null \
7952           && mcs --version 2>/dev/null | grep Mono >/dev/null; then
7953          HAVE_MCS=1
7954          ac_result="mcs"
7955          break
7956        fi
7957        ;;
7958      sscli)
7959        if test -n "$HAVE_CSC_IN_PATH" \
7960           && csc -help >/dev/null 2>/dev/null \
7961           && { if csc -help 2>/dev/null | grep -i chicken > /dev/null; then false; else true; fi; }; then
7962          HAVE_CSC=1
7963          ac_result="csc"
7964          break
7965        fi
7966        ;;
7967      no)
7968        HAVE_CSHARPCOMP=
7969        ac_result="no"
7970        break
7971        ;;
7972    esac
7973  done
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5
7975$as_echo "$ac_result" >&6; }
7976
7977
7978    if test -z "${CSHARPCOMPFLAGS+set}"; then
7979    CSHARPCOMPFLAGS="-O -g"
7980  fi
7981
7982
7983if test -n "$HAVE_CSHARPCOMP" && test "$CSHARP_CHOICE" != no; then
7984  BUILDCSHARP=yes
7985else
7986  BUILDCSHARP=no
7987fi
7988
7989
7990# Make sure we can run config.sub.
7991$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
7992  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
7993
7994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7995$as_echo_n "checking build system type... " >&6; }
7996if ${ac_cv_build+:} false; then :
7997  $as_echo_n "(cached) " >&6
7998else
7999  ac_build_alias=$build_alias
8000test "x$ac_build_alias" = x &&
8001  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
8002test "x$ac_build_alias" = x &&
8003  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
8004ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
8005  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
8006
8007fi
8008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
8009$as_echo "$ac_cv_build" >&6; }
8010case $ac_cv_build in
8011*-*-*) ;;
8012*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
8013esac
8014build=$ac_cv_build
8015ac_save_IFS=$IFS; IFS='-'
8016set x $ac_cv_build
8017shift
8018build_cpu=$1
8019build_vendor=$2
8020shift; shift
8021# Remember, the first character of IFS is used to create $*,
8022# except with old shells:
8023build_os=$*
8024IFS=$ac_save_IFS
8025case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
8026
8027
8028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
8029$as_echo_n "checking host system type... " >&6; }
8030if ${ac_cv_host+:} false; then :
8031  $as_echo_n "(cached) " >&6
8032else
8033  if test "x$host_alias" = x; then
8034  ac_cv_host=$ac_cv_build
8035else
8036  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
8037    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
8038fi
8039
8040fi
8041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
8042$as_echo "$ac_cv_host" >&6; }
8043case $ac_cv_host in
8044*-*-*) ;;
8045*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
8046esac
8047host=$ac_cv_host
8048ac_save_IFS=$IFS; IFS='-'
8049set x $ac_cv_host
8050shift
8051host_cpu=$1
8052host_vendor=$2
8053shift; shift
8054# Remember, the first character of IFS is used to create $*,
8055# except with old shells:
8056host_os=$*
8057IFS=$ac_save_IFS
8058case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
8059
8060
8061
8062
8063     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C# program execution engine" >&5
8064$as_echo_n "checking for C# program execution engine... " >&6; }
8065  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8066/* end confdefs.h.  */
8067
8068#if defined _WIN32 || defined __EMX__ || defined __DJGPP__
8069  yes
8070#endif
8071
8072_ACEOF
8073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8074  $EGREP "yes" >/dev/null 2>&1; then :
8075  MONO_PATH_SEPARATOR=';'
8076else
8077  MONO_PATH_SEPARATOR=':'
8078fi
8079rm -f conftest*
8080
8081  HAVE_CSHARPEXEC=1
8082        # Extract the first word of "mono", so it can be a program name with args.
8083set dummy mono; ac_word=$2
8084:
8085if ${ac_cv_prog_HAVE_MONO_IN_PATH+:} false; then :
8086  $as_echo_n "(cached) " >&6
8087else
8088  if test -n "$HAVE_MONO_IN_PATH"; then
8089  ac_cv_prog_HAVE_MONO_IN_PATH="$HAVE_MONO_IN_PATH" # Let the user override the test.
8090else
8091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8092for as_dir in $PATH
8093do
8094  IFS=$as_save_IFS
8095  test -z "$as_dir" && as_dir=.
8096    for ac_exec_ext in '' $ac_executable_extensions; do
8097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8098    ac_cv_prog_HAVE_MONO_IN_PATH="yes"
8099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8100    break 2
8101  fi
8102done
8103  done
8104IFS=$as_save_IFS
8105
8106fi
8107fi
8108HAVE_MONO_IN_PATH=$ac_cv_prog_HAVE_MONO_IN_PATH
8109if test -n "$HAVE_MONO_IN_PATH"; then
8110  :
8111else
8112  :
8113fi
8114
8115
8116  # Extract the first word of "clix", so it can be a program name with args.
8117set dummy clix; ac_word=$2
8118:
8119if ${ac_cv_prog_HAVE_CLIX_IN_PATH+:} false; then :
8120  $as_echo_n "(cached) " >&6
8121else
8122  if test -n "$HAVE_CLIX_IN_PATH"; then
8123  ac_cv_prog_HAVE_CLIX_IN_PATH="$HAVE_CLIX_IN_PATH" # Let the user override the test.
8124else
8125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8126for as_dir in $PATH
8127do
8128  IFS=$as_save_IFS
8129  test -z "$as_dir" && as_dir=.
8130    for ac_exec_ext in '' $ac_executable_extensions; do
8131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8132    ac_cv_prog_HAVE_CLIX_IN_PATH="yes"
8133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8134    break 2
8135  fi
8136done
8137  done
8138IFS=$as_save_IFS
8139
8140fi
8141fi
8142HAVE_CLIX_IN_PATH=$ac_cv_prog_HAVE_CLIX_IN_PATH
8143if test -n "$HAVE_CLIX_IN_PATH"; then
8144  :
8145else
8146  :
8147fi
8148
8149
8150        for impl in "$CSHARP_CHOICE" mono no; do
8151    case "$impl" in
8152      mono)
8153        if test -n "$HAVE_MONO_IN_PATH" \
8154           && mono --version >/dev/null 2>/dev/null \
8155           && mono $srcdir/m4/csharpexec-test.exe >/dev/null 2>/dev/null; then
8156          HAVE_MONO=1
8157          ac_result="mono"
8158          break
8159        fi
8160        ;;
8161      sscli)
8162        if test -n "$HAVE_CLIX_IN_PATH" \
8163           && clix $srcdir/m4/csharpexec-test.exe >/dev/null 2>/dev/null; then
8164          HAVE_CLIX=1
8165          case $host_os in
8166            cygwin* | mingw* | pw32*)
8167              CLIX_PATH_VAR=PATH
8168              ;;
8169            darwin* | rhapsody*)
8170              CLIX_PATH_VAR=DYLD_LIBRARY_PATH
8171              ;;
8172            *)
8173              CLIX_PATH_VAR=LD_LIBRARY_PATH
8174              ;;
8175          esac
8176          eval CLIX_PATH=\"\$CLIX_PATH_VAR\"
8177          ac_result="clix"
8178          break
8179        fi
8180        ;;
8181      no)
8182        HAVE_CSHARPEXEC=
8183        ac_result="no"
8184        break
8185        ;;
8186    esac
8187  done
8188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5
8189$as_echo "$ac_result" >&6; }
8190
8191
8192
8193
8194
8195
8196
8197if test -n "$HAVE_CSHARPEXEC" && test $BUILDCSHARP = yes; then
8198  TESTCSHARP=yes
8199else
8200  TESTCSHARP=no
8201fi
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
8213$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
8214if ${gl_cv_c_amsterdam_compiler+:} false; then :
8215  $as_echo_n "(cached) " >&6
8216else
8217
8218      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8219/* end confdefs.h.  */
8220
8221#ifdef __ACK__
8222Amsterdam
8223#endif
8224
8225_ACEOF
8226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8227  $EGREP "Amsterdam" >/dev/null 2>&1; then :
8228  gl_cv_c_amsterdam_compiler=yes
8229else
8230  gl_cv_c_amsterdam_compiler=no
8231fi
8232rm -f conftest*
8233
8234
8235fi
8236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
8237$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
8238
8239      if test $gl_cv_c_amsterdam_compiler = yes; then
8240    if test -z "$AR"; then
8241      AR='cc -c.a'
8242    fi
8243    if test -z "$ARFLAGS"; then
8244      ARFLAGS='-o'
8245    fi
8246  else
8247                                                :
8248  fi
8249
8250        if test -n "$ac_tool_prefix"; then
8251  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8252set dummy ${ac_tool_prefix}ar; ac_word=$2
8253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8254$as_echo_n "checking for $ac_word... " >&6; }
8255if ${ac_cv_prog_AR+:} false; then :
8256  $as_echo_n "(cached) " >&6
8257else
8258  if test -n "$AR"; then
8259  ac_cv_prog_AR="$AR" # Let the user override the test.
8260else
8261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8262for as_dir in $PATH
8263do
8264  IFS=$as_save_IFS
8265  test -z "$as_dir" && as_dir=.
8266    for ac_exec_ext in '' $ac_executable_extensions; do
8267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8268    ac_cv_prog_AR="${ac_tool_prefix}ar"
8269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8270    break 2
8271  fi
8272done
8273  done
8274IFS=$as_save_IFS
8275
8276fi
8277fi
8278AR=$ac_cv_prog_AR
8279if test -n "$AR"; then
8280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8281$as_echo "$AR" >&6; }
8282else
8283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8284$as_echo "no" >&6; }
8285fi
8286
8287
8288fi
8289if test -z "$ac_cv_prog_AR"; then
8290  ac_ct_AR=$AR
8291  # Extract the first word of "ar", so it can be a program name with args.
8292set dummy ar; ac_word=$2
8293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8294$as_echo_n "checking for $ac_word... " >&6; }
8295if ${ac_cv_prog_ac_ct_AR+:} false; then :
8296  $as_echo_n "(cached) " >&6
8297else
8298  if test -n "$ac_ct_AR"; then
8299  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8300else
8301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8302for as_dir in $PATH
8303do
8304  IFS=$as_save_IFS
8305  test -z "$as_dir" && as_dir=.
8306    for ac_exec_ext in '' $ac_executable_extensions; do
8307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8308    ac_cv_prog_ac_ct_AR="ar"
8309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8310    break 2
8311  fi
8312done
8313  done
8314IFS=$as_save_IFS
8315
8316fi
8317fi
8318ac_ct_AR=$ac_cv_prog_ac_ct_AR
8319if test -n "$ac_ct_AR"; then
8320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8321$as_echo "$ac_ct_AR" >&6; }
8322else
8323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8324$as_echo "no" >&6; }
8325fi
8326
8327  if test "x$ac_ct_AR" = x; then
8328    AR="ar"
8329  else
8330    case $cross_compiling:$ac_tool_warned in
8331yes:)
8332{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8333$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8334ac_tool_warned=yes ;;
8335esac
8336    AR=$ac_ct_AR
8337  fi
8338else
8339  AR="$ac_cv_prog_AR"
8340fi
8341
8342  if test -z "$ARFLAGS"; then
8343    ARFLAGS='cr'
8344  fi
8345
8346
8347
8348  if test -z "$RANLIB"; then
8349    if test $gl_cv_c_amsterdam_compiler = yes; then
8350      RANLIB=':'
8351    else
8352            if test -n "$ac_tool_prefix"; then
8353  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8354set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8356$as_echo_n "checking for $ac_word... " >&6; }
8357if ${ac_cv_prog_RANLIB+:} false; then :
8358  $as_echo_n "(cached) " >&6
8359else
8360  if test -n "$RANLIB"; then
8361  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8362else
8363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8364for as_dir in $PATH
8365do
8366  IFS=$as_save_IFS
8367  test -z "$as_dir" && as_dir=.
8368    for ac_exec_ext in '' $ac_executable_extensions; do
8369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8370    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8372    break 2
8373  fi
8374done
8375  done
8376IFS=$as_save_IFS
8377
8378fi
8379fi
8380RANLIB=$ac_cv_prog_RANLIB
8381if test -n "$RANLIB"; then
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8383$as_echo "$RANLIB" >&6; }
8384else
8385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388
8389
8390fi
8391if test -z "$ac_cv_prog_RANLIB"; then
8392  ac_ct_RANLIB=$RANLIB
8393  # Extract the first word of "ranlib", so it can be a program name with args.
8394set dummy ranlib; ac_word=$2
8395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8396$as_echo_n "checking for $ac_word... " >&6; }
8397if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8398  $as_echo_n "(cached) " >&6
8399else
8400  if test -n "$ac_ct_RANLIB"; then
8401  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8402else
8403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8404for as_dir in $PATH
8405do
8406  IFS=$as_save_IFS
8407  test -z "$as_dir" && as_dir=.
8408    for ac_exec_ext in '' $ac_executable_extensions; do
8409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8410    ac_cv_prog_ac_ct_RANLIB="ranlib"
8411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8412    break 2
8413  fi
8414done
8415  done
8416IFS=$as_save_IFS
8417
8418fi
8419fi
8420ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8421if test -n "$ac_ct_RANLIB"; then
8422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8423$as_echo "$ac_ct_RANLIB" >&6; }
8424else
8425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8426$as_echo "no" >&6; }
8427fi
8428
8429  if test "x$ac_ct_RANLIB" = x; then
8430    RANLIB=":"
8431  else
8432    case $cross_compiling:$ac_tool_warned in
8433yes:)
8434{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8435$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8436ac_tool_warned=yes ;;
8437esac
8438    RANLIB=$ac_ct_RANLIB
8439  fi
8440else
8441  RANLIB="$ac_cv_prog_RANLIB"
8442fi
8443
8444    fi
8445  fi
8446
8447
8448
8449
8450
8451
8452
8453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8454$as_echo_n "checking for ANSI C header files... " >&6; }
8455if ${ac_cv_header_stdc+:} false; then :
8456  $as_echo_n "(cached) " >&6
8457else
8458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8459/* end confdefs.h.  */
8460#include <stdlib.h>
8461#include <stdarg.h>
8462#include <string.h>
8463#include <float.h>
8464
8465int
8466main ()
8467{
8468
8469  ;
8470  return 0;
8471}
8472_ACEOF
8473if ac_fn_c_try_compile "$LINENO"; then :
8474  ac_cv_header_stdc=yes
8475else
8476  ac_cv_header_stdc=no
8477fi
8478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8479
8480if test $ac_cv_header_stdc = yes; then
8481  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8483/* end confdefs.h.  */
8484#include <string.h>
8485
8486_ACEOF
8487if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8488  $EGREP "memchr" >/dev/null 2>&1; then :
8489
8490else
8491  ac_cv_header_stdc=no
8492fi
8493rm -f conftest*
8494
8495fi
8496
8497if test $ac_cv_header_stdc = yes; then
8498  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8500/* end confdefs.h.  */
8501#include <stdlib.h>
8502
8503_ACEOF
8504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8505  $EGREP "free" >/dev/null 2>&1; then :
8506
8507else
8508  ac_cv_header_stdc=no
8509fi
8510rm -f conftest*
8511
8512fi
8513
8514if test $ac_cv_header_stdc = yes; then
8515  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8516  if test "$cross_compiling" = yes; then :
8517  :
8518else
8519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8520/* end confdefs.h.  */
8521#include <ctype.h>
8522#include <stdlib.h>
8523#if ((' ' & 0x0FF) == 0x020)
8524# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8525# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8526#else
8527# define ISLOWER(c) \
8528		   (('a' <= (c) && (c) <= 'i') \
8529		     || ('j' <= (c) && (c) <= 'r') \
8530		     || ('s' <= (c) && (c) <= 'z'))
8531# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8532#endif
8533
8534#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8535int
8536main ()
8537{
8538  int i;
8539  for (i = 0; i < 256; i++)
8540    if (XOR (islower (i), ISLOWER (i))
8541	|| toupper (i) != TOUPPER (i))
8542      return 2;
8543  return 0;
8544}
8545_ACEOF
8546if ac_fn_c_try_run "$LINENO"; then :
8547
8548else
8549  ac_cv_header_stdc=no
8550fi
8551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8552  conftest.$ac_objext conftest.beam conftest.$ac_ext
8553fi
8554
8555fi
8556fi
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8558$as_echo "$ac_cv_header_stdc" >&6; }
8559if test $ac_cv_header_stdc = yes; then
8560
8561$as_echo "#define STDC_HEADERS 1" >>confdefs.h
8562
8563fi
8564
8565# On IRIX 5.3, sys/types and inttypes.h are conflicting.
8566for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8567		  inttypes.h stdint.h unistd.h
8568do :
8569  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8570ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8571"
8572if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8573  cat >>confdefs.h <<_ACEOF
8574#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8575_ACEOF
8576
8577fi
8578
8579done
8580
8581
8582
8583  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
8584if test "x$ac_cv_header_minix_config_h" = xyes; then :
8585  MINIX=yes
8586else
8587  MINIX=
8588fi
8589
8590
8591  if test "$MINIX" = yes; then
8592
8593$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
8594
8595
8596$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
8597
8598
8599$as_echo "#define _MINIX 1" >>confdefs.h
8600
8601
8602$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
8603
8604  fi
8605
8606
8607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
8608$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
8609if ${ac_cv_safe_to_define___extensions__+:} false; then :
8610  $as_echo_n "(cached) " >&6
8611else
8612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8613/* end confdefs.h.  */
8614
8615#         define __EXTENSIONS__ 1
8616          $ac_includes_default
8617int
8618main ()
8619{
8620
8621  ;
8622  return 0;
8623}
8624_ACEOF
8625if ac_fn_c_try_compile "$LINENO"; then :
8626  ac_cv_safe_to_define___extensions__=yes
8627else
8628  ac_cv_safe_to_define___extensions__=no
8629fi
8630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8631fi
8632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
8633$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
8634  test $ac_cv_safe_to_define___extensions__ = yes &&
8635    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
8636
8637  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
8638
8639  $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
8640
8641  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
8642
8643  $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
8644
8645  $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
8646
8647  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
8648
8649  $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
8650
8651  $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
8652
8653  $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
8654
8655  $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
8656
8657  $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
8658
8659  $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
8660
8661  $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
8662
8663  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
8664
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
8666$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
8667if ${ac_cv_should_define__xopen_source+:} false; then :
8668  $as_echo_n "(cached) " >&6
8669else
8670  ac_cv_should_define__xopen_source=no
8671     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8672/* end confdefs.h.  */
8673
8674          #include <wchar.h>
8675          mbstate_t x;
8676int
8677main ()
8678{
8679
8680  ;
8681  return 0;
8682}
8683_ACEOF
8684if ac_fn_c_try_compile "$LINENO"; then :
8685
8686else
8687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8688/* end confdefs.h.  */
8689
8690             #define _XOPEN_SOURCE 500
8691             #include <wchar.h>
8692             mbstate_t x;
8693int
8694main ()
8695{
8696
8697  ;
8698  return 0;
8699}
8700_ACEOF
8701if ac_fn_c_try_compile "$LINENO"; then :
8702  ac_cv_should_define__xopen_source=yes
8703fi
8704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8705fi
8706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8707fi
8708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
8709$as_echo "$ac_cv_should_define__xopen_source" >&6; }
8710  test $ac_cv_should_define__xopen_source = yes &&
8711    $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
8712
8713  $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726  # IEEE behaviour is the default on all CPUs except Alpha and SH
8727  # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
8728  # and the GCC 4.1.2 manual).
8729  case "$host_cpu" in
8730    alpha*)
8731      # On Alpha systems, a compiler option provides the behaviour.
8732      # See the ieee(3) manual page, also available at
8733      # <https://backdrift.org/man/tru64/man3/ieee.3.html>
8734      if test -n "$GCC"; then
8735        # GCC has the option -mieee.
8736        # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
8737        CPPFLAGS="$CPPFLAGS -mieee"
8738      else
8739        # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
8740        # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
8741        CPPFLAGS="$CPPFLAGS -ieee"
8742      fi
8743      ;;
8744    sh*)
8745      if test -n "$GCC"; then
8746        # GCC has the option -mieee.
8747        CPPFLAGS="$CPPFLAGS -mieee"
8748      fi
8749      ;;
8750  esac
8751
8752
8753
8754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8755$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
8756if ${ac_cv_sys_largefile_source+:} false; then :
8757  $as_echo_n "(cached) " >&6
8758else
8759  while :; do
8760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8761/* end confdefs.h.  */
8762#include <sys/types.h> /* for off_t */
8763     #include <stdio.h>
8764int
8765main ()
8766{
8767int (*fp) (FILE *, off_t, int) = fseeko;
8768     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
8769  ;
8770  return 0;
8771}
8772_ACEOF
8773if ac_fn_c_try_link "$LINENO"; then :
8774  ac_cv_sys_largefile_source=no; break
8775fi
8776rm -f core conftest.err conftest.$ac_objext \
8777    conftest$ac_exeext conftest.$ac_ext
8778  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8779/* end confdefs.h.  */
8780#define _LARGEFILE_SOURCE 1
8781#include <sys/types.h> /* for off_t */
8782     #include <stdio.h>
8783int
8784main ()
8785{
8786int (*fp) (FILE *, off_t, int) = fseeko;
8787     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
8788  ;
8789  return 0;
8790}
8791_ACEOF
8792if ac_fn_c_try_link "$LINENO"; then :
8793  ac_cv_sys_largefile_source=1; break
8794fi
8795rm -f core conftest.err conftest.$ac_objext \
8796    conftest$ac_exeext conftest.$ac_ext
8797  ac_cv_sys_largefile_source=unknown
8798  break
8799done
8800fi
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
8802$as_echo "$ac_cv_sys_largefile_source" >&6; }
8803case $ac_cv_sys_largefile_source in #(
8804  no | unknown) ;;
8805  *)
8806cat >>confdefs.h <<_ACEOF
8807#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8808_ACEOF
8809;;
8810esac
8811rm -rf conftest*
8812
8813# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8814# in glibc 2.1.3, but that breaks too many other things.
8815# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8816if test $ac_cv_sys_largefile_source != unknown; then
8817
8818$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
8819
8820fi
8821
8822  case "$host_os" in
8823    hpux*)
8824
8825$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
8826
8827      ;;
8828  esac
8829
8830# Check whether --enable-largefile was given.
8831if test "${enable_largefile+set}" = set; then :
8832  enableval=$enable_largefile;
8833fi
8834
8835if test "$enable_largefile" != no; then
8836
8837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
8838$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
8839if ${ac_cv_sys_largefile_CC+:} false; then :
8840  $as_echo_n "(cached) " >&6
8841else
8842  ac_cv_sys_largefile_CC=no
8843     if test "$GCC" != yes; then
8844       ac_save_CC=$CC
8845       while :; do
8846         # IRIX 6.2 and later do not support large files by default,
8847         # so use the C compiler's -n32 option if that helps.
8848         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8849/* end confdefs.h.  */
8850#include <sys/types.h>
8851 /* Check that off_t can represent 2**63 - 1 correctly.
8852    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8853    since some C++ compilers masquerading as C compilers
8854    incorrectly reject 9223372036854775807.  */
8855#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8856  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8857                       && LARGE_OFF_T % 2147483647 == 1)
8858                      ? 1 : -1];
8859int
8860main ()
8861{
8862
8863  ;
8864  return 0;
8865}
8866_ACEOF
8867         if ac_fn_c_try_compile "$LINENO"; then :
8868  break
8869fi
8870rm -f core conftest.err conftest.$ac_objext
8871         CC="$CC -n32"
8872         if ac_fn_c_try_compile "$LINENO"; then :
8873  ac_cv_sys_largefile_CC=' -n32'; break
8874fi
8875rm -f core conftest.err conftest.$ac_objext
8876         break
8877       done
8878       CC=$ac_save_CC
8879       rm -f conftest.$ac_ext
8880    fi
8881fi
8882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
8883$as_echo "$ac_cv_sys_largefile_CC" >&6; }
8884  if test "$ac_cv_sys_largefile_CC" != no; then
8885    CC=$CC$ac_cv_sys_largefile_CC
8886  fi
8887
8888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8889$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
8890if ${ac_cv_sys_file_offset_bits+:} false; then :
8891  $as_echo_n "(cached) " >&6
8892else
8893  while :; do
8894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8895/* end confdefs.h.  */
8896#include <sys/types.h>
8897 /* Check that off_t can represent 2**63 - 1 correctly.
8898    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8899    since some C++ compilers masquerading as C compilers
8900    incorrectly reject 9223372036854775807.  */
8901#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8902  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8903                       && LARGE_OFF_T % 2147483647 == 1)
8904                      ? 1 : -1];
8905int
8906main ()
8907{
8908
8909  ;
8910  return 0;
8911}
8912_ACEOF
8913if ac_fn_c_try_compile "$LINENO"; then :
8914  ac_cv_sys_file_offset_bits=no; break
8915fi
8916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8917  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8918/* end confdefs.h.  */
8919#define _FILE_OFFSET_BITS 64
8920#include <sys/types.h>
8921 /* Check that off_t can represent 2**63 - 1 correctly.
8922    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8923    since some C++ compilers masquerading as C compilers
8924    incorrectly reject 9223372036854775807.  */
8925#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8926  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8927                       && LARGE_OFF_T % 2147483647 == 1)
8928                      ? 1 : -1];
8929int
8930main ()
8931{
8932
8933  ;
8934  return 0;
8935}
8936_ACEOF
8937if ac_fn_c_try_compile "$LINENO"; then :
8938  ac_cv_sys_file_offset_bits=64; break
8939fi
8940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8941  ac_cv_sys_file_offset_bits=unknown
8942  break
8943done
8944fi
8945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
8946$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
8947case $ac_cv_sys_file_offset_bits in #(
8948  no | unknown) ;;
8949  *)
8950cat >>confdefs.h <<_ACEOF
8951#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8952_ACEOF
8953;;
8954esac
8955rm -rf conftest*
8956  if test $ac_cv_sys_file_offset_bits = unknown; then
8957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
8958$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
8959if ${ac_cv_sys_large_files+:} false; then :
8960  $as_echo_n "(cached) " >&6
8961else
8962  while :; do
8963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8964/* end confdefs.h.  */
8965#include <sys/types.h>
8966 /* Check that off_t can represent 2**63 - 1 correctly.
8967    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8968    since some C++ compilers masquerading as C compilers
8969    incorrectly reject 9223372036854775807.  */
8970#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8971  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8972                       && LARGE_OFF_T % 2147483647 == 1)
8973                      ? 1 : -1];
8974int
8975main ()
8976{
8977
8978  ;
8979  return 0;
8980}
8981_ACEOF
8982if ac_fn_c_try_compile "$LINENO"; then :
8983  ac_cv_sys_large_files=no; break
8984fi
8985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8987/* end confdefs.h.  */
8988#define _LARGE_FILES 1
8989#include <sys/types.h>
8990 /* Check that off_t can represent 2**63 - 1 correctly.
8991    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8992    since some C++ compilers masquerading as C compilers
8993    incorrectly reject 9223372036854775807.  */
8994#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8995  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8996                       && LARGE_OFF_T % 2147483647 == 1)
8997                      ? 1 : -1];
8998int
8999main ()
9000{
9001
9002  ;
9003  return 0;
9004}
9005_ACEOF
9006if ac_fn_c_try_compile "$LINENO"; then :
9007  ac_cv_sys_large_files=1; break
9008fi
9009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9010  ac_cv_sys_large_files=unknown
9011  break
9012done
9013fi
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
9015$as_echo "$ac_cv_sys_large_files" >&6; }
9016case $ac_cv_sys_large_files in #(
9017  no | unknown) ;;
9018  *)
9019cat >>confdefs.h <<_ACEOF
9020#define _LARGE_FILES $ac_cv_sys_large_files
9021_ACEOF
9022;;
9023esac
9024rm -rf conftest*
9025  fi
9026fi
9027
9028
9029
9030
9031
9032
9033
9034
9035  # Check whether --enable-threads was given.
9036if test "${enable_threads+set}" = set; then :
9037  enableval=$enable_threads; gl_use_threads=$enableval
9038else
9039  if test -n "$gl_use_threads_default"; then
9040       gl_use_threads="$gl_use_threads_default"
9041     else
9042       case "$host_os" in
9043                                    osf*) gl_use_threads=no ;;
9044                                    cygwin*)
9045               case `uname -r` in
9046                 1.[0-5].*) gl_use_threads=no ;;
9047                 *)         gl_use_threads=yes ;;
9048               esac
9049               ;;
9050                  mingw*)
9051               case "$gl_use_winpthreads_default" in
9052                 yes) gl_use_threads=posix ;;
9053                 no)  gl_use_threads=windows ;;
9054                 *)   gl_use_threads=yes ;;
9055               esac
9056               ;;
9057         *)    gl_use_threads=yes ;;
9058       esac
9059     fi
9060
9061fi
9062
9063  if test "$gl_use_threads" = yes \
9064     || test "$gl_use_threads" = isoc \
9065     || test "$gl_use_threads" = posix \
9066     || test "$gl_use_threads" = isoc+posix; then
9067    # For using <threads.h> or <pthread.h>:
9068
9069
9070  if test -z "$gl_anythreadlib_early_done"; then
9071    case "$host_os" in
9072      osf*)
9073        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
9074        # groks <pthread.h>. cc also understands the flag -pthread, but
9075        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
9076        # 2. putting a flag into CPPFLAGS that has an effect on the linker
9077        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
9078        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
9079        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
9080        ;;
9081    esac
9082    # Some systems optimize for single-threaded programs by default, and
9083    # need special flags to disable these optimizations. For example, the
9084    # definition of 'errno' in <errno.h>.
9085    case "$host_os" in
9086      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
9087      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
9088    esac
9089    gl_anythreadlib_early_done=done
9090  fi
9091
9092  fi
9093
9094
9095
9096  # Pre-early section.
9097
9098
9099
9100
9101  # Code from module absolute-header:
9102  # Code from module accept:
9103  # Code from module accept-tests:
9104  # Code from module access:
9105  # Code from module access-tests:
9106  # Code from module acl:
9107  # Code from module acl-permissions:
9108  # Code from module acl-tests:
9109  # Code from module alignof:
9110  # Code from module alignof-tests:
9111  # Code from module alloca:
9112  # Code from module alloca-opt:
9113  # Code from module alloca-opt-tests:
9114  # Code from module allocator:
9115  # Code from module ansi-c++-opt:
9116  # Code from module areadlink:
9117  # Code from module areadlink-tests:
9118  # Code from module areadlink-with-size:
9119  # Code from module areadlink-with-size-tests:
9120  # Code from module argmatch:
9121  # Code from module argmatch-tests:
9122  # Code from module arpa_inet:
9123  # Code from module arpa_inet-tests:
9124  # Code from module array-list:
9125  # Code from module array-list-tests:
9126  # Code from module asyncsafe-spin:
9127  # Code from module asyncsafe-spin-tests:
9128  # Code from module atexit:
9129  # Code from module atexit-tests:
9130  # Code from module attribute:
9131  # Code from module backupfile:
9132  # Code from module basename-lgpl:
9133  # Code from module binary-io:
9134  # Code from module binary-io-tests:
9135  # Code from module bind:
9136  # Code from module bind-tests:
9137  # Code from module bison:
9138  # Code from module bison-i18n:
9139  # Code from module bitrotate:
9140  # Code from module bitrotate-tests:
9141  # Code from module btowc:
9142  # Code from module btowc-tests:
9143  # Code from module builtin-expect:
9144  # Code from module byteswap:
9145  # Code from module byteswap-tests:
9146  # Code from module c-ctype:
9147  # Code from module c-ctype-tests:
9148  # Code from module c-strcase:
9149  # Code from module c-strcase-tests:
9150  # Code from module c-strcaseeq:
9151  # Code from module c-strcasestr:
9152  # Code from module c-strcasestr-tests:
9153  # Code from module c-strstr:
9154  # Code from module c-strstr-tests:
9155  # Code from module c99:
9156  # Code from module canonicalize:
9157  # Code from module canonicalize-lgpl:
9158  # Code from module canonicalize-lgpl-tests:
9159  # Code from module canonicalize-tests:
9160  # Code from module careadlinkat:
9161  # Code from module classpath:
9162  # Code from module clean-temp:
9163  # Code from module clock-time:
9164  # Code from module cloexec:
9165  # Code from module cloexec-tests:
9166  # Code from module close:
9167  # Code from module close-tests:
9168  # Code from module closedir:
9169  # Code from module closeout:
9170  # Code from module concat-filename:
9171  # Code from module configmake:
9172  # Code from module connect:
9173  # Code from module connect-tests:
9174  # Code from module copy-file:
9175  # Code from module copy-file-range:
9176  # Code from module copy-file-tests:
9177  # Code from module creat:
9178  # Code from module creat-tests:
9179  # Code from module csharpcomp:
9180  # Code from module csharpcomp-script:
9181  # Code from module csharpexec:
9182  # Code from module csharpexec-script:
9183  # Code from module ctype:
9184  # Code from module ctype-tests:
9185  # Code from module diffseq:
9186  # Code from module dirent:
9187  # Code from module dirent-tests:
9188  # Code from module dirfd:
9189  # Code from module dirname-lgpl:
9190  # Code from module double-slash-root:
9191  # Code from module dtotimespec:
9192  # Code from module dup:
9193  # Code from module dup-tests:
9194  # Code from module dup2:
9195  # Code from module dup2-tests:
9196  # Code from module environ:
9197  # Code from module environ-tests:
9198  # Code from module errno:
9199  # Code from module errno-tests:
9200  # Code from module error:
9201  # Code from module error-progname:
9202  # Code from module execute:
9203  # Code from module exitfail:
9204  # Code from module explicit_bzero:
9205  # Code from module explicit_bzero-tests:
9206  # Code from module extensions:
9207  # Code from module extern-inline:
9208  # Code from module fabs:
9209  # Code from module fabs-tests:
9210  # Code from module fatal-signal:
9211  # Code from module fcntl:
9212  # Code from module fcntl-h:
9213  # Code from module fcntl-h-tests:
9214  # Code from module fcntl-tests:
9215  # Code from module fd-hook:
9216  # Code from module fd-safer-flag:
9217  # Code from module fdopen:
9218  # Code from module fdopen-tests:
9219  # Code from module fgetc-tests:
9220  # Code from module file-has-acl:
9221  # Code from module file-has-acl-tests:
9222  # Code from module file-set:
9223  # Code from module filename:
9224  # Code from module filenamecat:
9225  # Code from module filenamecat-lgpl:
9226  # Code from module filenamecat-tests:
9227  # Code from module findprog:
9228  # Code from module flexmember:
9229  # Code from module float:
9230  # Code from module float-tests:
9231  # Code from module fnmatch:
9232  # Code from module fnmatch-h:
9233  # Code from module fnmatch-h-tests:
9234  # Code from module fnmatch-tests:
9235  # Code from module fopen:
9236  # Code from module fopen-gnu:
9237  # Code from module fopen-gnu-tests:
9238  # Code from module fopen-tests:
9239  # Code from module fpieee:
9240
9241  # Code from module fpucw:
9242  # Code from module fputc-tests:
9243  # Code from module fread-tests:
9244  # Code from module fstat:
9245  # Code from module fstat-tests:
9246  # Code from module fstrcmp:
9247  # Code from module fstrcmp-tests:
9248  # Code from module ftell:
9249  # Code from module ftell-tests:
9250  # Code from module ftello:
9251
9252  # Code from module ftello-tests:
9253  # Code from module ftruncate:
9254  # Code from module ftruncate-tests:
9255  # Code from module full-write:
9256  # Code from module fwrite-tests:
9257  # Code from module fwriteerror:
9258  # Code from module gcd:
9259  # Code from module getcwd-lgpl:
9260  # Code from module getcwd-lgpl-tests:
9261  # Code from module getdelim:
9262  # Code from module getdelim-tests:
9263  # Code from module getdtablesize:
9264  # Code from module getdtablesize-tests:
9265  # Code from module getline:
9266  # Code from module getline-tests:
9267  # Code from module getopt-gnu:
9268  # Code from module getopt-gnu-tests:
9269  # Code from module getopt-posix:
9270  # Code from module getopt-posix-tests:
9271  # Code from module getpagesize:
9272  # Code from module getprogname:
9273  # Code from module getprogname-tests:
9274  # Code from module getrandom:
9275  # Code from module getrandom-tests:
9276  # Code from module gettext:
9277  # Code from module gettext-h:
9278  # Code from module gettext-tools-misc:
9279  # Code from module gettime:
9280  # Code from module gettimeofday:
9281  # Code from module gettimeofday-tests:
9282  # Code from module gperf:
9283  # Code from module hard-locale:
9284  # Code from module hard-locale-tests:
9285  # Code from module hash:
9286  # Code from module hash-pjw:
9287  # Code from module hash-tests:
9288  # Code from module hash-triple-simple:
9289  # Code from module havelib:
9290  # Code from module iconv:
9291  # Code from module iconv-h:
9292  # Code from module iconv-h-tests:
9293  # Code from module iconv-tests:
9294  # Code from module iconv_open:
9295  # Code from module ignore-value:
9296  # Code from module ignore-value-tests:
9297  # Code from module include_next:
9298  # Code from module inet_pton:
9299  # Code from module inet_pton-tests:
9300  # Code from module inline:
9301  # Code from module intprops:
9302  # Code from module intprops-tests:
9303  # Code from module inttostr:
9304  # Code from module inttostr-tests:
9305  # Code from module inttypes:
9306  # Code from module inttypes-incomplete:
9307  # Code from module inttypes-tests:
9308  # Code from module ioctl:
9309  # Code from module ioctl-tests:
9310  # Code from module isblank:
9311  # Code from module isblank-tests:
9312  # Code from module isinf:
9313  # Code from module isinf-tests:
9314  # Code from module isnan:
9315  # Code from module isnan-tests:
9316  # Code from module isnand:
9317  # Code from module isnand-nolibm:
9318  # Code from module isnand-nolibm-tests:
9319  # Code from module isnand-tests:
9320  # Code from module isnanf:
9321  # Code from module isnanf-nolibm:
9322  # Code from module isnanf-nolibm-tests:
9323  # Code from module isnanf-tests:
9324  # Code from module isnanl:
9325  # Code from module isnanl-nolibm:
9326  # Code from module isnanl-nolibm-tests:
9327  # Code from module isnanl-tests:
9328  # Code from module iswblank:
9329  # Code from module iswblank-tests:
9330  # Code from module iswdigit:
9331  # Code from module iswdigit-tests:
9332  # Code from module iswxdigit:
9333  # Code from module iswxdigit-tests:
9334  # Code from module java:
9335  # Code from module javacomp:
9336  # Code from module javacomp-script:
9337  # Code from module javaexec:
9338  # Code from module javaexec-script:
9339  # Code from module javaversion:
9340  # Code from module langinfo:
9341  # Code from module langinfo-tests:
9342  # Code from module largefile:
9343
9344  # Code from module libc-config:
9345  # Code from module libunistring-optional:
9346  # Code from module libxml:
9347  # Code from module limits-h:
9348  # Code from module limits-h-tests:
9349  # Code from module linked-list:
9350  # Code from module linked-list-tests:
9351  # Code from module linkedhash-list:
9352  # Code from module linkedhash-list-tests:
9353  # Code from module list:
9354  # Code from module listen:
9355  # Code from module listen-tests:
9356  # Code from module localcharset:
9357  # Code from module localcharset-tests:
9358  # Code from module locale:
9359  # Code from module locale-tests:
9360  # Code from module localename:
9361  # Code from module localename-tests:
9362  # Code from module localtime:
9363  # Code from module lock:
9364  # Code from module lock-tests:
9365  # Code from module log10:
9366  # Code from module log10-tests:
9367  # Code from module lseek:
9368  # Code from module lseek-tests:
9369  # Code from module lstat:
9370  # Code from module lstat-tests:
9371  # Code from module malloc-posix:
9372  # Code from module malloca:
9373  # Code from module malloca-tests:
9374  # Code from module math:
9375  # Code from module math-tests:
9376  # Code from module mbchar:
9377  # Code from module mbiter:
9378  # Code from module mbrtowc:
9379  # Code from module mbrtowc-tests:
9380  # Code from module mbsinit:
9381  # Code from module mbsinit-tests:
9382  # Code from module mbslen:
9383  # Code from module mbsrtowcs:
9384  # Code from module mbsrtowcs-tests:
9385  # Code from module mbsstr:
9386  # Code from module mbsstr-tests:
9387  # Code from module mbswidth:
9388  # Code from module mbtowc:
9389  # Code from module mbuiter:
9390  # Code from module mem-hash-map:
9391  # Code from module memchr:
9392  # Code from module memchr-tests:
9393  # Code from module memmove:
9394  # Code from module mempcpy:
9395  # Code from module memset:
9396  # Code from module minmax:
9397  # Code from module mkdir:
9398  # Code from module mkdir-tests:
9399  # Code from module mkdtemp:
9400  # Code from module msvc-inval:
9401  # Code from module msvc-nothrow:
9402  # Code from module multiarch:
9403  # Code from module nanosleep:
9404  # Code from module nanosleep-tests:
9405  # Code from module netinet_in:
9406  # Code from module netinet_in-tests:
9407  # Code from module no-c++:
9408  # Code from module nocrash:
9409  # Code from module noreturn:
9410  # Code from module noreturn-tests:
9411  # Code from module obstack:
9412  # Code from module open:
9413  # Code from module open-tests:
9414  # Code from module opendir:
9415  # Code from module openmp-init:
9416  # Code from module pathmax:
9417  # Code from module pathmax-tests:
9418  # Code from module perror:
9419  # Code from module perror-tests:
9420  # Code from module pipe-filter-ii:
9421  # Code from module pipe-filter-ii-tests:
9422  # Code from module pipe-posix:
9423  # Code from module pipe-posix-tests:
9424  # Code from module pipe2:
9425  # Code from module pipe2-safer:
9426  # Code from module pipe2-tests:
9427  # Code from module posix_spawn-internal:
9428  # Code from module posix_spawn_file_actions_addclose:
9429  # Code from module posix_spawn_file_actions_addclose-tests:
9430  # Code from module posix_spawn_file_actions_adddup2:
9431  # Code from module posix_spawn_file_actions_adddup2-tests:
9432  # Code from module posix_spawn_file_actions_addopen:
9433  # Code from module posix_spawn_file_actions_addopen-tests:
9434  # Code from module posix_spawn_file_actions_destroy:
9435  # Code from module posix_spawn_file_actions_init:
9436  # Code from module posix_spawnattr_destroy:
9437  # Code from module posix_spawnattr_init:
9438  # Code from module posix_spawnattr_setflags:
9439  # Code from module posix_spawnattr_setsigmask:
9440  # Code from module posix_spawnp:
9441  # Code from module posix_spawnp-tests:
9442  # Code from module pow:
9443  # Code from module pow-tests:
9444  # Code from module priv-set:
9445  # Code from module priv-set-tests:
9446  # Code from module progname:
9447  # Code from module propername:
9448  # Code from module pthread-h:
9449
9450
9451  if test -z "$gl_anythreadlib_early_done"; then
9452    case "$host_os" in
9453      osf*)
9454        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
9455        # groks <pthread.h>. cc also understands the flag -pthread, but
9456        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
9457        # 2. putting a flag into CPPFLAGS that has an effect on the linker
9458        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
9459        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
9460        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
9461        ;;
9462    esac
9463    # Some systems optimize for single-threaded programs by default, and
9464    # need special flags to disable these optimizations. For example, the
9465    # definition of 'errno' in <errno.h>.
9466    case "$host_os" in
9467      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
9468      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
9469    esac
9470    gl_anythreadlib_early_done=done
9471  fi
9472
9473  # Code from module pthread-h-tests:
9474  # Code from module pthread-thread:
9475  # Code from module pthread-thread-tests:
9476  # Code from module pthread_sigmask:
9477  # Code from module pthread_sigmask-tests:
9478  # Code from module putenv:
9479  # Code from module qcopy-acl:
9480  # Code from module qset-acl:
9481  # Code from module quote:
9482  # Code from module quotearg:
9483  # Code from module quotearg-simple:
9484  # Code from module quotearg-simple-tests:
9485  # Code from module raise:
9486  # Code from module raise-tests:
9487  # Code from module rawmemchr:
9488  # Code from module rawmemchr-tests:
9489  # Code from module read:
9490  # Code from module read-file:
9491  # Code from module read-file-tests:
9492  # Code from module read-tests:
9493  # Code from module readdir:
9494  # Code from module readlink:
9495  # Code from module readlink-tests:
9496  # Code from module realloc-posix:
9497  # Code from module relocatable-prog:
9498  # Code from module relocatable-prog-wrapper:
9499
9500  # Code from module relocatable-script:
9501  # Code from module rmdir:
9502  # Code from module rmdir-tests:
9503  # Code from module root-uid:
9504  # Code from module safe-read:
9505  # Code from module safe-write:
9506  # Code from module same-inode:
9507  # Code from module sched:
9508  # Code from module sched-tests:
9509  # Code from module secure_getenv:
9510  # Code from module select:
9511  # Code from module select-tests:
9512  # Code from module setenv:
9513  # Code from module setenv-tests:
9514  # Code from module setlocale:
9515  # Code from module setlocale-null:
9516  # Code from module setlocale-null-tests:
9517  # Code from module setlocale-tests:
9518  # Code from module setsockopt:
9519  # Code from module setsockopt-tests:
9520  # Code from module sh-filename:
9521  # Code from module sh-quote:
9522  # Code from module sh-quote-tests:
9523  # Code from module sigaction:
9524  # Code from module sigaction-tests:
9525  # Code from module signal-h:
9526  # Code from module signal-h-tests:
9527  # Code from module signbit:
9528  # Code from module signbit-tests:
9529  # Code from module sigpipe:
9530  # Code from module sigpipe-tests:
9531  # Code from module sigprocmask:
9532  # Code from module sigprocmask-tests:
9533  # Code from module size_max:
9534  # Code from module sleep:
9535  # Code from module sleep-tests:
9536  # Code from module snippet/_Noreturn:
9537  # Code from module snippet/arg-nonnull:
9538  # Code from module snippet/c++defs:
9539  # Code from module snippet/unused-parameter:
9540  # Code from module snippet/warn-on-use:
9541  # Code from module snprintf:
9542  # Code from module snprintf-tests:
9543  # Code from module socket:
9544  # Code from module socketlib:
9545  # Code from module sockets:
9546  # Code from module sockets-tests:
9547  # Code from module socklen:
9548  # Code from module spawn:
9549  # Code from module spawn-pipe:
9550  # Code from module spawn-pipe-tests:
9551  # Code from module spawn-tests:
9552  # Code from module ssize_t:
9553  # Code from module stat:
9554  # Code from module stat-tests:
9555  # Code from module stat-time:
9556  # Code from module stat-time-tests:
9557  # Code from module std-gnu11:
9558  # Code from module stdalign:
9559  # Code from module stdalign-tests:
9560  # Code from module stdarg:
9561
9562
9563
9564  # Code from module stdarg-tests:
9565  # Code from module stdbool:
9566  # Code from module stdbool-tests:
9567  # Code from module stddef:
9568  # Code from module stddef-tests:
9569  # Code from module stdint:
9570  # Code from module stdint-tests:
9571  # Code from module stdio:
9572  # Code from module stdio-tests:
9573  # Code from module stdlib:
9574  # Code from module stdlib-tests:
9575  # Code from module stpcpy:
9576  # Code from module stpncpy:
9577  # Code from module strchrnul:
9578  # Code from module strchrnul-tests:
9579  # Code from module strcspn:
9580  # Code from module streq:
9581  # Code from module strerror:
9582  # Code from module strerror-override:
9583  # Code from module strerror-tests:
9584  # Code from module strerror_r-posix:
9585  # Code from module strerror_r-posix-tests:
9586  # Code from module striconv:
9587  # Code from module striconv-tests:
9588  # Code from module striconveh:
9589  # Code from module striconveh-tests:
9590  # Code from module striconveha:
9591  # Code from module striconveha-tests:
9592  # Code from module string:
9593  # Code from module string-tests:
9594  # Code from module strnlen:
9595  # Code from module strnlen-tests:
9596  # Code from module strnlen1:
9597  # Code from module strpbrk:
9598  # Code from module strstr:
9599  # Code from module strstr-simple:
9600  # Code from module strstr-tests:
9601  # Code from module strtol:
9602  # Code from module strtol-tests:
9603  # Code from module strtoul:
9604  # Code from module strtoul-tests:
9605  # Code from module supersede:
9606  # Code from module supersede-tests:
9607  # Code from module symlink:
9608  # Code from module symlink-tests:
9609  # Code from module sys_ioctl:
9610  # Code from module sys_ioctl-tests:
9611  # Code from module sys_random:
9612  # Code from module sys_random-tests:
9613  # Code from module sys_select:
9614  # Code from module sys_select-tests:
9615  # Code from module sys_socket:
9616  # Code from module sys_socket-tests:
9617  # Code from module sys_stat:
9618  # Code from module sys_stat-tests:
9619  # Code from module sys_time:
9620  # Code from module sys_time-tests:
9621  # Code from module sys_types:
9622  # Code from module sys_types-tests:
9623  # Code from module sys_uio:
9624  # Code from module sys_uio-tests:
9625  # Code from module sys_wait:
9626  # Code from module sys_wait-tests:
9627  # Code from module tempname:
9628  # Code from module test-framework-sh:
9629  # Code from module test-framework-sh-tests:
9630  # Code from module thread:
9631  # Code from module thread-tests:
9632  # Code from module threadlib:
9633
9634
9635
9636  # Code from module time:
9637  # Code from module time-tests:
9638  # Code from module timespec:
9639  # Code from module timespec-add:
9640  # Code from module timespec-sub:
9641  # Code from module timespec-tests:
9642  # Code from module tls:
9643  # Code from module tls-tests:
9644  # Code from module tmpdir:
9645  # Code from module trim:
9646  # Code from module uniconv/base:
9647  # Code from module uniconv/u8-conv-from-enc:
9648  # Code from module uniconv/u8-conv-from-enc-tests:
9649  # Code from module unictype/base:
9650  # Code from module unictype/ctype-space:
9651  # Code from module unictype/ctype-space-tests:
9652  # Code from module unictype/syntax-java-whitespace:
9653  # Code from module unictype/syntax-java-whitespace-tests:
9654  # Code from module unilbrk/base:
9655  # Code from module unilbrk/tables:
9656  # Code from module unilbrk/u8-possible-linebreaks:
9657  # Code from module unilbrk/u8-width-linebreaks:
9658  # Code from module unilbrk/u8-width-linebreaks-tests:
9659  # Code from module unilbrk/ulc-common:
9660  # Code from module unilbrk/ulc-width-linebreaks:
9661  # Code from module uniname/base:
9662  # Code from module uniname/uniname:
9663  # Code from module uniname/uniname-tests:
9664  # Code from module unistd:
9665  # Code from module unistd-safer:
9666  # Code from module unistd-safer-tests:
9667  # Code from module unistd-tests:
9668  # Code from module unistr/base:
9669  # Code from module unistr/u16-mbtouc:
9670  # Code from module unistr/u16-mbtouc-tests:
9671  # Code from module unistr/u8-check:
9672  # Code from module unistr/u8-check-tests:
9673  # Code from module unistr/u8-cmp:
9674  # Code from module unistr/u8-cmp-tests:
9675  # Code from module unistr/u8-mblen:
9676  # Code from module unistr/u8-mblen-tests:
9677  # Code from module unistr/u8-mbtouc:
9678  # Code from module unistr/u8-mbtouc-unsafe:
9679  # Code from module unistr/u8-mbtoucr:
9680  # Code from module unistr/u8-mbtoucr-tests:
9681  # Code from module unistr/u8-prev:
9682  # Code from module unistr/u8-prev-tests:
9683  # Code from module unistr/u8-strlen:
9684  # Code from module unistr/u8-strlen-tests:
9685  # Code from module unistr/u8-uctomb:
9686  # Code from module unistr/u8-uctomb-tests:
9687  # Code from module unitypes:
9688  # Code from module uniwidth/base:
9689  # Code from module uniwidth/width:
9690  # Code from module unlink:
9691  # Code from module unlink-tests:
9692  # Code from module unlinkdir:
9693  # Code from module unlocked-io:
9694  # Code from module unsetenv:
9695  # Code from module unsetenv-tests:
9696  # Code from module usleep:
9697  # Code from module usleep-tests:
9698  # Code from module utime:
9699  # Code from module utime-h:
9700  # Code from module utime-h-tests:
9701  # Code from module utimens:
9702  # Code from module vasnprintf:
9703  # Code from module vasnprintf-tests:
9704  # Code from module vasprintf:
9705  # Code from module vasprintf-tests:
9706  # Code from module verify:
9707  # Code from module verify-tests:
9708  # Code from module vma-iter:
9709  # Code from module vsnprintf:
9710  # Code from module vsnprintf-tests:
9711  # Code from module wait-process:
9712  # Code from module waitpid:
9713  # Code from module wchar:
9714  # Code from module wchar-tests:
9715  # Code from module wcrtomb:
9716  # Code from module wcrtomb-tests:
9717  # Code from module wctob:
9718  # Code from module wctomb:
9719  # Code from module wctype-h:
9720  # Code from module wctype-h-tests:
9721  # Code from module wcwidth:
9722  # Code from module wcwidth-tests:
9723  # Code from module windows-mutex:
9724  # Code from module windows-once:
9725  # Code from module windows-recmutex:
9726  # Code from module windows-rwlock:
9727  # Code from module windows-spin:
9728  # Code from module windows-thread:
9729  # Code from module windows-tls:
9730  # Code from module wmemchr:
9731  # Code from module wmempcpy:
9732  # Code from module write:
9733  # Code from module write-tests:
9734  # Code from module xalloc:
9735  # Code from module xalloc-die:
9736  # Code from module xalloc-die-tests:
9737  # Code from module xalloc-oversized:
9738  # Code from module xconcat-filename:
9739  # Code from module xerror:
9740  # Code from module xgetcwd:
9741  # Code from module xlist:
9742  # Code from module xmalloca:
9743  # Code from module xmemdup0:
9744  # Code from module xmemdup0-tests:
9745  # Code from module xreadlink:
9746  # Code from module xsetenv:
9747  # Code from module xsize:
9748  # Code from module xstriconv:
9749  # Code from module xstriconveh:
9750  # Code from module xvasprintf:
9751  # Code from module xvasprintf-tests:
9752  # Code from module yield:
9753
9754
9755
9756  # Pre-early section.
9757
9758
9759
9760  # Code from module btowc:
9761  # Code from module builtin-expect:
9762  # Code from module c99:
9763  # Code from module intprops:
9764  # Code from module langinfo:
9765  # Code from module libc-config:
9766  # Code from module localeconv:
9767  # Code from module lock:
9768  # Code from module mbrlen:
9769  # Code from module mbtowc:
9770  # Code from module nl_langinfo:
9771  # Code from module regex:
9772  # Code from module snippet/c++defs:
9773  # Code from module snippet/warn-on-use:
9774  # Code from module std-gnu11:
9775  # Code from module threadlib:
9776
9777
9778
9779  # Code from module wcrtomb:
9780
9781
9782
9783  # Pre-early section.
9784
9785
9786
9787
9788  # Code from module absolute-header:
9789  # Code from module alignof:
9790  # Code from module alloca-opt:
9791  # Code from module attribute:
9792  # Code from module basename-lgpl:
9793  # Code from module builtin-expect:
9794  # Code from module c-ctype:
9795  # Code from module c-strcase:
9796  # Code from module c-strcaseeq:
9797  # Code from module c-strstr:
9798  # Code from module c99:
9799  # Code from module cloexec:
9800  # Code from module close:
9801  # Code from module concat-filename:
9802  # Code from module diffseq:
9803  # Code from module double-slash-root:
9804  # Code from module dup2:
9805  # Code from module errno:
9806  # Code from module error:
9807  # Code from module error-progname:
9808  # Code from module exitfail:
9809  # Code from module extensions:
9810  # Code from module extern-inline:
9811  # Code from module fcntl:
9812  # Code from module fcntl-h:
9813  # Code from module fd-hook:
9814  # Code from module fdopen:
9815  # Code from module filename:
9816  # Code from module float:
9817  # Code from module fopen:
9818  # Code from module fstat:
9819  # Code from module fstrcmp:
9820  # Code from module fsync:
9821  # Code from module fwriteerror:
9822  # Code from module gcd:
9823  # Code from module getdelim:
9824  # Code from module getdtablesize:
9825  # Code from module getline:
9826  # Code from module getprogname:
9827  # Code from module gettext-h:
9828  # Code from module gperf:
9829  # Code from module hard-locale:
9830  # Code from module havelib:
9831  # Code from module iconv:
9832  # Code from module iconv-h:
9833  # Code from module iconv_open:
9834  # Code from module include_next:
9835  # Code from module inline:
9836  # Code from module intprops:
9837  # Code from module inttypes-incomplete:
9838  # Code from module largefile:
9839
9840  # Code from module libtextstyle-dummy:
9841  # Code from module libunistring-optional:
9842  # Code from module limits-h:
9843  # Code from module linked-list:
9844  # Code from module list:
9845  # Code from module localcharset:
9846  # Code from module locale:
9847  # Code from module lock:
9848  # Code from module malloc-posix:
9849  # Code from module malloca:
9850  # Code from module markup:
9851  # Code from module mbrtowc:
9852  # Code from module mbsinit:
9853  # Code from module mbswidth:
9854  # Code from module mem-hash-map:
9855  # Code from module memchr:
9856  # Code from module minmax:
9857  # Code from module msvc-inval:
9858  # Code from module msvc-nothrow:
9859  # Code from module multiarch:
9860  # Code from module noreturn:
9861  # Code from module obstack:
9862  # Code from module open:
9863  # Code from module pathmax:
9864  # Code from module raise:
9865  # Code from module rawmemchr:
9866  # Code from module realloc-posix:
9867  # Code from module relocatable-lib:
9868  # Code from module setlocale-null:
9869  # Code from module signal-h:
9870  # Code from module sigpipe:
9871  # Code from module sigprocmask:
9872  # Code from module size_max:
9873  # Code from module snippet/_Noreturn:
9874  # Code from module snippet/arg-nonnull:
9875  # Code from module snippet/c++defs:
9876  # Code from module snippet/unused-parameter:
9877  # Code from module snippet/warn-on-use:
9878  # Code from module ssize_t:
9879  # Code from module stat:
9880  # Code from module stat-time:
9881  # Code from module std-gnu11:
9882  # Code from module stdarg:
9883
9884
9885
9886  # Code from module stdbool:
9887  # Code from module stddef:
9888  # Code from module stdint:
9889  # Code from module stdio:
9890  # Code from module stdlib:
9891  # Code from module stpcpy:
9892  # Code from module stpncpy:
9893  # Code from module strchrnul:
9894  # Code from module streq:
9895  # Code from module strerror:
9896  # Code from module strerror-override:
9897  # Code from module striconv:
9898  # Code from module striconveh:
9899  # Code from module striconveha:
9900  # Code from module string:
9901  # Code from module strstr:
9902  # Code from module strstr-simple:
9903  # Code from module sys_stat:
9904  # Code from module sys_types:
9905  # Code from module threadlib:
9906
9907
9908
9909  # Code from module time:
9910  # Code from module tls:
9911  # Code from module uniconv/base:
9912  # Code from module uniconv/u8-conv-from-enc:
9913  # Code from module unictype/base:
9914  # Code from module unictype/ctype-alpha:
9915  # Code from module unictype/ctype-space:
9916  # Code from module unilbrk/base:
9917  # Code from module unilbrk/tables:
9918  # Code from module unilbrk/u8-possible-linebreaks:
9919  # Code from module unilbrk/u8-width-linebreaks:
9920  # Code from module unilbrk/ulc-common:
9921  # Code from module unilbrk/ulc-width-linebreaks:
9922  # Code from module unistd:
9923  # Code from module unistr/base:
9924  # Code from module unistr/u16-mbtouc:
9925  # Code from module unistr/u8-check:
9926  # Code from module unistr/u8-mblen:
9927  # Code from module unistr/u8-mbtouc:
9928  # Code from module unistr/u8-mbtouc-unsafe:
9929  # Code from module unistr/u8-mbtoucr:
9930  # Code from module unistr/u8-next:
9931  # Code from module unistr/u8-prev:
9932  # Code from module unistr/u8-strmbtouc:
9933  # Code from module unistr/u8-uctomb:
9934  # Code from module unitypes:
9935  # Code from module uniwidth/base:
9936  # Code from module uniwidth/width:
9937  # Code from module unlocked-io:
9938  # Code from module vasnprintf:
9939  # Code from module vasprintf:
9940  # Code from module verify:
9941  # Code from module wchar:
9942  # Code from module wctype-h:
9943  # Code from module wcwidth:
9944  # Code from module windows-mutex:
9945  # Code from module windows-once:
9946  # Code from module windows-recmutex:
9947  # Code from module windows-rwlock:
9948  # Code from module windows-tls:
9949  # Code from module xalloc:
9950  # Code from module xalloc-die:
9951  # Code from module xalloc-oversized:
9952  # Code from module xconcat-filename:
9953  # Code from module xerror:
9954  # Code from module xlist:
9955  # Code from module xmalloca:
9956  # Code from module xsize:
9957  # Code from module xstriconv:
9958  # Code from module xvasprintf:
9959
9960
9961
9962
9963
9964  case "$host_os" in
9965    mingw* | cygwin*)
9966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for auto-import of symbols" >&5
9967$as_echo_n "checking for auto-import of symbols... " >&6; }
9968      if ${gl_cv_ld_autoimport+:} false; then :
9969  $as_echo_n "(cached) " >&6
9970else
9971
9972        gl_save_LDFLAGS="$LDFLAGS"
9973        LDFLAGS="$LDFLAGS -Wl,--disable-auto-import"
9974        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9975/* end confdefs.h.  */
9976
9977int
9978main ()
9979{
9980
9981  ;
9982  return 0;
9983}
9984_ACEOF
9985if ac_fn_c_try_link "$LINENO"; then :
9986  gl_cv_ld_autoimport=yes
9987else
9988  gl_cv_ld_autoimport=no
9989fi
9990rm -f core conftest.err conftest.$ac_objext \
9991    conftest$ac_exeext conftest.$ac_ext
9992        LDFLAGS="$gl_save_LDFLAGS"
9993fi
9994
9995      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_ld_autoimport" >&5
9996$as_echo "$gl_cv_ld_autoimport" >&6; }
9997      if test $gl_cv_ld_autoimport = yes; then
9998        LDFLAGS="$LDFLAGS -Wl,--disable-auto-import"
9999      fi
10000      ;;
10001  esac
10002
10003
10004case `pwd` in
10005  *\ * | *\	*)
10006    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
10007$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
10008esac
10009
10010
10011
10012macro_version='2.4.6'
10013macro_revision='2.4.6'
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027ltmain=$ac_aux_dir/ltmain.sh
10028
10029# Backslashify metacharacters that are still active within
10030# double-quoted strings.
10031sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
10032
10033# Same as above, but do not quote variable references.
10034double_quote_subst='s/\(["`\\]\)/\\\1/g'
10035
10036# Sed substitution to delay expansion of an escaped shell variable in a
10037# double_quote_subst'ed string.
10038delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
10039
10040# Sed substitution to delay expansion of an escaped single quote.
10041delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
10042
10043# Sed substitution to avoid accidental globbing in evaled expressions
10044no_glob_subst='s/\*/\\\*/g'
10045
10046ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
10047ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
10048ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
10049
10050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
10051$as_echo_n "checking how to print strings... " >&6; }
10052# Test print first, because it will be a builtin if present.
10053if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
10054   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
10055  ECHO='print -r --'
10056elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
10057  ECHO='printf %s\n'
10058else
10059  # Use this function as a fallback that always works.
10060  func_fallback_echo ()
10061  {
10062    eval 'cat <<_LTECHO_EOF
10063$1
10064_LTECHO_EOF'
10065  }
10066  ECHO='func_fallback_echo'
10067fi
10068
10069# func_echo_all arg...
10070# Invoke $ECHO with all args, space-separated.
10071func_echo_all ()
10072{
10073    $ECHO ""
10074}
10075
10076case $ECHO in
10077  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
10078$as_echo "printf" >&6; } ;;
10079  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
10080$as_echo "print -r" >&6; } ;;
10081  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
10082$as_echo "cat" >&6; } ;;
10083esac
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10099$as_echo_n "checking for a sed that does not truncate output... " >&6; }
10100if ${ac_cv_path_SED+:} false; then :
10101  $as_echo_n "(cached) " >&6
10102else
10103            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10104     for ac_i in 1 2 3 4 5 6 7; do
10105       ac_script="$ac_script$as_nl$ac_script"
10106     done
10107     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10108     { ac_script=; unset ac_script;}
10109     if test -z "$SED"; then
10110  ac_path_SED_found=false
10111  # Loop through the user's path and test for each of PROGNAME-LIST
10112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10113for as_dir in $PATH
10114do
10115  IFS=$as_save_IFS
10116  test -z "$as_dir" && as_dir=.
10117    for ac_prog in sed gsed; do
10118    for ac_exec_ext in '' $ac_executable_extensions; do
10119      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10120      as_fn_executable_p "$ac_path_SED" || continue
10121# Check for GNU ac_path_SED and select it if it is found.
10122  # Check for GNU $ac_path_SED
10123case `"$ac_path_SED" --version 2>&1` in
10124*GNU*)
10125  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10126*)
10127  ac_count=0
10128  $as_echo_n 0123456789 >"conftest.in"
10129  while :
10130  do
10131    cat "conftest.in" "conftest.in" >"conftest.tmp"
10132    mv "conftest.tmp" "conftest.in"
10133    cp "conftest.in" "conftest.nl"
10134    $as_echo '' >> "conftest.nl"
10135    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10136    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10137    as_fn_arith $ac_count + 1 && ac_count=$as_val
10138    if test $ac_count -gt ${ac_path_SED_max-0}; then
10139      # Best one so far, save it but keep looking for a better one
10140      ac_cv_path_SED="$ac_path_SED"
10141      ac_path_SED_max=$ac_count
10142    fi
10143    # 10*(2^10) chars as input seems more than enough
10144    test $ac_count -gt 10 && break
10145  done
10146  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10147esac
10148
10149      $ac_path_SED_found && break 3
10150    done
10151  done
10152  done
10153IFS=$as_save_IFS
10154  if test -z "$ac_cv_path_SED"; then
10155    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10156  fi
10157else
10158  ac_cv_path_SED=$SED
10159fi
10160
10161fi
10162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10163$as_echo "$ac_cv_path_SED" >&6; }
10164 SED="$ac_cv_path_SED"
10165  rm -f conftest.sed
10166
10167test -z "$SED" && SED=sed
10168Xsed="$SED -e 1s/^X//"
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
10181$as_echo_n "checking for fgrep... " >&6; }
10182if ${ac_cv_path_FGREP+:} false; then :
10183  $as_echo_n "(cached) " >&6
10184else
10185  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
10186   then ac_cv_path_FGREP="$GREP -F"
10187   else
10188     if test -z "$FGREP"; then
10189  ac_path_FGREP_found=false
10190  # Loop through the user's path and test for each of PROGNAME-LIST
10191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10192for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10193do
10194  IFS=$as_save_IFS
10195  test -z "$as_dir" && as_dir=.
10196    for ac_prog in fgrep; do
10197    for ac_exec_ext in '' $ac_executable_extensions; do
10198      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
10199      as_fn_executable_p "$ac_path_FGREP" || continue
10200# Check for GNU ac_path_FGREP and select it if it is found.
10201  # Check for GNU $ac_path_FGREP
10202case `"$ac_path_FGREP" --version 2>&1` in
10203*GNU*)
10204  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
10205*)
10206  ac_count=0
10207  $as_echo_n 0123456789 >"conftest.in"
10208  while :
10209  do
10210    cat "conftest.in" "conftest.in" >"conftest.tmp"
10211    mv "conftest.tmp" "conftest.in"
10212    cp "conftest.in" "conftest.nl"
10213    $as_echo 'FGREP' >> "conftest.nl"
10214    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
10215    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10216    as_fn_arith $ac_count + 1 && ac_count=$as_val
10217    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
10218      # Best one so far, save it but keep looking for a better one
10219      ac_cv_path_FGREP="$ac_path_FGREP"
10220      ac_path_FGREP_max=$ac_count
10221    fi
10222    # 10*(2^10) chars as input seems more than enough
10223    test $ac_count -gt 10 && break
10224  done
10225  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10226esac
10227
10228      $ac_path_FGREP_found && break 3
10229    done
10230  done
10231  done
10232IFS=$as_save_IFS
10233  if test -z "$ac_cv_path_FGREP"; then
10234    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10235  fi
10236else
10237  ac_cv_path_FGREP=$FGREP
10238fi
10239
10240   fi
10241fi
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
10243$as_echo "$ac_cv_path_FGREP" >&6; }
10244 FGREP="$ac_cv_path_FGREP"
10245
10246
10247test -z "$GREP" && GREP=grep
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267# Check whether --with-gnu-ld was given.
10268if test "${with_gnu_ld+set}" = set; then :
10269  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
10270else
10271  with_gnu_ld=no
10272fi
10273
10274ac_prog=ld
10275if test yes = "$GCC"; then
10276  # Check if gcc -print-prog-name=ld gives a path.
10277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
10278$as_echo_n "checking for ld used by $CC... " >&6; }
10279  case $host in
10280  *-*-mingw*)
10281    # gcc leaves a trailing carriage return, which upsets mingw
10282    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10283  *)
10284    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10285  esac
10286  case $ac_prog in
10287    # Accept absolute paths.
10288    [\\/]* | ?:[\\/]*)
10289      re_direlt='/[^/][^/]*/\.\./'
10290      # Canonicalize the pathname of ld
10291      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
10292      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
10293	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
10294      done
10295      test -z "$LD" && LD=$ac_prog
10296      ;;
10297  "")
10298    # If it fails, then pretend we aren't using GCC.
10299    ac_prog=ld
10300    ;;
10301  *)
10302    # If it is relative, then search for the first ld in PATH.
10303    with_gnu_ld=unknown
10304    ;;
10305  esac
10306elif test yes = "$with_gnu_ld"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
10308$as_echo_n "checking for GNU ld... " >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
10311$as_echo_n "checking for non-GNU ld... " >&6; }
10312fi
10313if ${lt_cv_path_LD+:} false; then :
10314  $as_echo_n "(cached) " >&6
10315else
10316  if test -z "$LD"; then
10317  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10318  for ac_dir in $PATH; do
10319    IFS=$lt_save_ifs
10320    test -z "$ac_dir" && ac_dir=.
10321    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10322      lt_cv_path_LD=$ac_dir/$ac_prog
10323      # Check to see if the program is GNU ld.  I'd rather use --version,
10324      # but apparently some variants of GNU ld only accept -v.
10325      # Break only if it was the GNU/non-GNU ld that we prefer.
10326      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
10327      *GNU* | *'with BFD'*)
10328	test no != "$with_gnu_ld" && break
10329	;;
10330      *)
10331	test yes != "$with_gnu_ld" && break
10332	;;
10333      esac
10334    fi
10335  done
10336  IFS=$lt_save_ifs
10337else
10338  lt_cv_path_LD=$LD # Let the user override the test with a path.
10339fi
10340fi
10341
10342LD=$lt_cv_path_LD
10343if test -n "$LD"; then
10344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
10345$as_echo "$LD" >&6; }
10346else
10347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10348$as_echo "no" >&6; }
10349fi
10350test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
10351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
10352$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
10353if ${lt_cv_prog_gnu_ld+:} false; then :
10354  $as_echo_n "(cached) " >&6
10355else
10356  # I'd rather use --version here, but apparently some GNU lds only accept -v.
10357case `$LD -v 2>&1 </dev/null` in
10358*GNU* | *'with BFD'*)
10359  lt_cv_prog_gnu_ld=yes
10360  ;;
10361*)
10362  lt_cv_prog_gnu_ld=no
10363  ;;
10364esac
10365fi
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
10367$as_echo "$lt_cv_prog_gnu_ld" >&6; }
10368with_gnu_ld=$lt_cv_prog_gnu_ld
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
10379$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
10380if ${lt_cv_path_NM+:} false; then :
10381  $as_echo_n "(cached) " >&6
10382else
10383  if test -n "$NM"; then
10384  # Let the user override the test.
10385  lt_cv_path_NM=$NM
10386else
10387  lt_nm_to_check=${ac_tool_prefix}nm
10388  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
10389    lt_nm_to_check="$lt_nm_to_check nm"
10390  fi
10391  for lt_tmp_nm in $lt_nm_to_check; do
10392    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10393    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
10394      IFS=$lt_save_ifs
10395      test -z "$ac_dir" && ac_dir=.
10396      tmp_nm=$ac_dir/$lt_tmp_nm
10397      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
10398	# Check to see if the nm accepts a BSD-compat flag.
10399	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
10400	#   nm: unknown option "B" ignored
10401	# Tru64's nm complains that /dev/null is an invalid object file
10402	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
10403	case $build_os in
10404	mingw*) lt_bad_file=conftest.nm/nofile ;;
10405	*) lt_bad_file=/dev/null ;;
10406	esac
10407	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
10408	*$lt_bad_file* | *'Invalid file or object type'*)
10409	  lt_cv_path_NM="$tmp_nm -B"
10410	  break 2
10411	  ;;
10412	*)
10413	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
10414	  */dev/null*)
10415	    lt_cv_path_NM="$tmp_nm -p"
10416	    break 2
10417	    ;;
10418	  *)
10419	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
10420	    continue # so that we can try to find one that supports BSD flags
10421	    ;;
10422	  esac
10423	  ;;
10424	esac
10425      fi
10426    done
10427    IFS=$lt_save_ifs
10428  done
10429  : ${lt_cv_path_NM=no}
10430fi
10431fi
10432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
10433$as_echo "$lt_cv_path_NM" >&6; }
10434if test no != "$lt_cv_path_NM"; then
10435  NM=$lt_cv_path_NM
10436else
10437  # Didn't find any BSD compatible name lister, look for dumpbin.
10438  if test -n "$DUMPBIN"; then :
10439    # Let the user override the test.
10440  else
10441    if test -n "$ac_tool_prefix"; then
10442  for ac_prog in dumpbin "link -dump"
10443  do
10444    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10445set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10447$as_echo_n "checking for $ac_word... " >&6; }
10448if ${ac_cv_prog_DUMPBIN+:} false; then :
10449  $as_echo_n "(cached) " >&6
10450else
10451  if test -n "$DUMPBIN"; then
10452  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
10453else
10454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10455for as_dir in $PATH
10456do
10457  IFS=$as_save_IFS
10458  test -z "$as_dir" && as_dir=.
10459    for ac_exec_ext in '' $ac_executable_extensions; do
10460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10461    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
10462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10463    break 2
10464  fi
10465done
10466  done
10467IFS=$as_save_IFS
10468
10469fi
10470fi
10471DUMPBIN=$ac_cv_prog_DUMPBIN
10472if test -n "$DUMPBIN"; then
10473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
10474$as_echo "$DUMPBIN" >&6; }
10475else
10476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10477$as_echo "no" >&6; }
10478fi
10479
10480
10481    test -n "$DUMPBIN" && break
10482  done
10483fi
10484if test -z "$DUMPBIN"; then
10485  ac_ct_DUMPBIN=$DUMPBIN
10486  for ac_prog in dumpbin "link -dump"
10487do
10488  # Extract the first word of "$ac_prog", so it can be a program name with args.
10489set dummy $ac_prog; ac_word=$2
10490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10491$as_echo_n "checking for $ac_word... " >&6; }
10492if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
10493  $as_echo_n "(cached) " >&6
10494else
10495  if test -n "$ac_ct_DUMPBIN"; then
10496  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
10497else
10498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10499for as_dir in $PATH
10500do
10501  IFS=$as_save_IFS
10502  test -z "$as_dir" && as_dir=.
10503    for ac_exec_ext in '' $ac_executable_extensions; do
10504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10505    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
10506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10507    break 2
10508  fi
10509done
10510  done
10511IFS=$as_save_IFS
10512
10513fi
10514fi
10515ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
10516if test -n "$ac_ct_DUMPBIN"; then
10517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
10518$as_echo "$ac_ct_DUMPBIN" >&6; }
10519else
10520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
10522fi
10523
10524
10525  test -n "$ac_ct_DUMPBIN" && break
10526done
10527
10528  if test "x$ac_ct_DUMPBIN" = x; then
10529    DUMPBIN=":"
10530  else
10531    case $cross_compiling:$ac_tool_warned in
10532yes:)
10533{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10534$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10535ac_tool_warned=yes ;;
10536esac
10537    DUMPBIN=$ac_ct_DUMPBIN
10538  fi
10539fi
10540
10541    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
10542    *COFF*)
10543      DUMPBIN="$DUMPBIN -symbols -headers"
10544      ;;
10545    *)
10546      DUMPBIN=:
10547      ;;
10548    esac
10549  fi
10550
10551  if test : != "$DUMPBIN"; then
10552    NM=$DUMPBIN
10553  fi
10554fi
10555test -z "$NM" && NM=nm
10556
10557
10558
10559
10560
10561
10562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
10563$as_echo_n "checking the name lister ($NM) interface... " >&6; }
10564if ${lt_cv_nm_interface+:} false; then :
10565  $as_echo_n "(cached) " >&6
10566else
10567  lt_cv_nm_interface="BSD nm"
10568  echo "int some_variable = 0;" > conftest.$ac_ext
10569  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
10570  (eval "$ac_compile" 2>conftest.err)
10571  cat conftest.err >&5
10572  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
10573  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
10574  cat conftest.err >&5
10575  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
10576  cat conftest.out >&5
10577  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
10578    lt_cv_nm_interface="MS dumpbin"
10579  fi
10580  rm -f conftest*
10581fi
10582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
10583$as_echo "$lt_cv_nm_interface" >&6; }
10584
10585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10586$as_echo_n "checking whether ln -s works... " >&6; }
10587LN_S=$as_ln_s
10588if test "$LN_S" = "ln -s"; then
10589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10590$as_echo "yes" >&6; }
10591else
10592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10593$as_echo "no, using $LN_S" >&6; }
10594fi
10595
10596# find the maximum length of command line arguments
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
10598$as_echo_n "checking the maximum length of command line arguments... " >&6; }
10599if ${lt_cv_sys_max_cmd_len+:} false; then :
10600  $as_echo_n "(cached) " >&6
10601else
10602    i=0
10603  teststring=ABCD
10604
10605  case $build_os in
10606  msdosdjgpp*)
10607    # On DJGPP, this test can blow up pretty badly due to problems in libc
10608    # (any single argument exceeding 2000 bytes causes a buffer overrun
10609    # during glob expansion).  Even if it were fixed, the result of this
10610    # check would be larger than it should be.
10611    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
10612    ;;
10613
10614  gnu*)
10615    # Under GNU Hurd, this test is not required because there is
10616    # no limit to the length of command line arguments.
10617    # Libtool will interpret -1 as no limit whatsoever
10618    lt_cv_sys_max_cmd_len=-1;
10619    ;;
10620
10621  cygwin* | mingw* | cegcc*)
10622    # On Win9x/ME, this test blows up -- it succeeds, but takes
10623    # about 5 minutes as the teststring grows exponentially.
10624    # Worse, since 9x/ME are not pre-emptively multitasking,
10625    # you end up with a "frozen" computer, even though with patience
10626    # the test eventually succeeds (with a max line length of 256k).
10627    # Instead, let's just punt: use the minimum linelength reported by
10628    # all of the supported platforms: 8192 (on NT/2K/XP).
10629    lt_cv_sys_max_cmd_len=8192;
10630    ;;
10631
10632  mint*)
10633    # On MiNT this can take a long time and run out of memory.
10634    lt_cv_sys_max_cmd_len=8192;
10635    ;;
10636
10637  amigaos*)
10638    # On AmigaOS with pdksh, this test takes hours, literally.
10639    # So we just punt and use a minimum line length of 8192.
10640    lt_cv_sys_max_cmd_len=8192;
10641    ;;
10642
10643  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
10644    # This has been around since 386BSD, at least.  Likely further.
10645    if test -x /sbin/sysctl; then
10646      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
10647    elif test -x /usr/sbin/sysctl; then
10648      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
10649    else
10650      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
10651    fi
10652    # And add a safety zone
10653    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
10654    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
10655    ;;
10656
10657  interix*)
10658    # We know the value 262144 and hardcode it with a safety zone (like BSD)
10659    lt_cv_sys_max_cmd_len=196608
10660    ;;
10661
10662  os2*)
10663    # The test takes a long time on OS/2.
10664    lt_cv_sys_max_cmd_len=8192
10665    ;;
10666
10667  osf*)
10668    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
10669    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
10670    # nice to cause kernel panics so lets avoid the loop below.
10671    # First set a reasonable default.
10672    lt_cv_sys_max_cmd_len=16384
10673    #
10674    if test -x /sbin/sysconfig; then
10675      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
10676        *1*) lt_cv_sys_max_cmd_len=-1 ;;
10677      esac
10678    fi
10679    ;;
10680  sco3.2v5*)
10681    lt_cv_sys_max_cmd_len=102400
10682    ;;
10683  sysv5* | sco5v6* | sysv4.2uw2*)
10684    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
10685    if test -n "$kargmax"; then
10686      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
10687    else
10688      lt_cv_sys_max_cmd_len=32768
10689    fi
10690    ;;
10691  *)
10692    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
10693    if test -n "$lt_cv_sys_max_cmd_len" && \
10694       test undefined != "$lt_cv_sys_max_cmd_len"; then
10695      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
10696      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
10697    else
10698      # Make teststring a little bigger before we do anything with it.
10699      # a 1K string should be a reasonable start.
10700      for i in 1 2 3 4 5 6 7 8; do
10701        teststring=$teststring$teststring
10702      done
10703      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
10704      # If test is not a shell built-in, we'll probably end up computing a
10705      # maximum length that is only half of the actual maximum length, but
10706      # we can't tell.
10707      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
10708	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
10709	      test 17 != "$i" # 1/2 MB should be enough
10710      do
10711        i=`expr $i + 1`
10712        teststring=$teststring$teststring
10713      done
10714      # Only check the string length outside the loop.
10715      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
10716      teststring=
10717      # Add a significant safety factor because C++ compilers can tack on
10718      # massive amounts of additional arguments before passing them to the
10719      # linker.  It appears as though 1/2 is a usable value.
10720      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
10721    fi
10722    ;;
10723  esac
10724
10725fi
10726
10727if test -n "$lt_cv_sys_max_cmd_len"; then
10728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
10729$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
10730else
10731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10732$as_echo "none" >&6; }
10733fi
10734max_cmd_len=$lt_cv_sys_max_cmd_len
10735
10736
10737
10738
10739
10740
10741: ${CP="cp -f"}
10742: ${MV="mv -f"}
10743: ${RM="rm -f"}
10744
10745if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10746  lt_unset=unset
10747else
10748  lt_unset=false
10749fi
10750
10751
10752
10753
10754
10755# test EBCDIC or ASCII
10756case `echo X|tr X '\101'` in
10757 A) # ASCII based system
10758    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
10759  lt_SP2NL='tr \040 \012'
10760  lt_NL2SP='tr \015\012 \040\040'
10761  ;;
10762 *) # EBCDIC based system
10763  lt_SP2NL='tr \100 \n'
10764  lt_NL2SP='tr \r\n \100\100'
10765  ;;
10766esac
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
10777$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
10778if ${lt_cv_to_host_file_cmd+:} false; then :
10779  $as_echo_n "(cached) " >&6
10780else
10781  case $host in
10782  *-*-mingw* )
10783    case $build in
10784      *-*-mingw* ) # actually msys
10785        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
10786        ;;
10787      *-*-cygwin* )
10788        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
10789        ;;
10790      * ) # otherwise, assume *nix
10791        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
10792        ;;
10793    esac
10794    ;;
10795  *-*-cygwin* )
10796    case $build in
10797      *-*-mingw* ) # actually msys
10798        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
10799        ;;
10800      *-*-cygwin* )
10801        lt_cv_to_host_file_cmd=func_convert_file_noop
10802        ;;
10803      * ) # otherwise, assume *nix
10804        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
10805        ;;
10806    esac
10807    ;;
10808  * ) # unhandled hosts (and "normal" native builds)
10809    lt_cv_to_host_file_cmd=func_convert_file_noop
10810    ;;
10811esac
10812
10813fi
10814
10815to_host_file_cmd=$lt_cv_to_host_file_cmd
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
10817$as_echo "$lt_cv_to_host_file_cmd" >&6; }
10818
10819
10820
10821
10822
10823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
10824$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
10825if ${lt_cv_to_tool_file_cmd+:} false; then :
10826  $as_echo_n "(cached) " >&6
10827else
10828  #assume ordinary cross tools, or native build.
10829lt_cv_to_tool_file_cmd=func_convert_file_noop
10830case $host in
10831  *-*-mingw* )
10832    case $build in
10833      *-*-mingw* ) # actually msys
10834        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
10835        ;;
10836    esac
10837    ;;
10838esac
10839
10840fi
10841
10842to_tool_file_cmd=$lt_cv_to_tool_file_cmd
10843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
10844$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
10845
10846
10847
10848
10849
10850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
10851$as_echo_n "checking for $LD option to reload object files... " >&6; }
10852if ${lt_cv_ld_reload_flag+:} false; then :
10853  $as_echo_n "(cached) " >&6
10854else
10855  lt_cv_ld_reload_flag='-r'
10856fi
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
10858$as_echo "$lt_cv_ld_reload_flag" >&6; }
10859reload_flag=$lt_cv_ld_reload_flag
10860case $reload_flag in
10861"" | " "*) ;;
10862*) reload_flag=" $reload_flag" ;;
10863esac
10864reload_cmds='$LD$reload_flag -o $output$reload_objs'
10865case $host_os in
10866  cygwin* | mingw* | pw32* | cegcc*)
10867    if test yes != "$GCC"; then
10868      reload_cmds=false
10869    fi
10870    ;;
10871  darwin*)
10872    if test yes = "$GCC"; then
10873      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
10874    else
10875      reload_cmds='$LD$reload_flag -o $output$reload_objs'
10876    fi
10877    ;;
10878esac
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888if test -n "$ac_tool_prefix"; then
10889  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
10890set dummy ${ac_tool_prefix}objdump; ac_word=$2
10891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10892$as_echo_n "checking for $ac_word... " >&6; }
10893if ${ac_cv_prog_OBJDUMP+:} false; then :
10894  $as_echo_n "(cached) " >&6
10895else
10896  if test -n "$OBJDUMP"; then
10897  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
10898else
10899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10900for as_dir in $PATH
10901do
10902  IFS=$as_save_IFS
10903  test -z "$as_dir" && as_dir=.
10904    for ac_exec_ext in '' $ac_executable_extensions; do
10905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10906    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
10907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10908    break 2
10909  fi
10910done
10911  done
10912IFS=$as_save_IFS
10913
10914fi
10915fi
10916OBJDUMP=$ac_cv_prog_OBJDUMP
10917if test -n "$OBJDUMP"; then
10918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
10919$as_echo "$OBJDUMP" >&6; }
10920else
10921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10922$as_echo "no" >&6; }
10923fi
10924
10925
10926fi
10927if test -z "$ac_cv_prog_OBJDUMP"; then
10928  ac_ct_OBJDUMP=$OBJDUMP
10929  # Extract the first word of "objdump", so it can be a program name with args.
10930set dummy objdump; ac_word=$2
10931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10932$as_echo_n "checking for $ac_word... " >&6; }
10933if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
10934  $as_echo_n "(cached) " >&6
10935else
10936  if test -n "$ac_ct_OBJDUMP"; then
10937  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
10938else
10939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10940for as_dir in $PATH
10941do
10942  IFS=$as_save_IFS
10943  test -z "$as_dir" && as_dir=.
10944    for ac_exec_ext in '' $ac_executable_extensions; do
10945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10946    ac_cv_prog_ac_ct_OBJDUMP="objdump"
10947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10948    break 2
10949  fi
10950done
10951  done
10952IFS=$as_save_IFS
10953
10954fi
10955fi
10956ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
10957if test -n "$ac_ct_OBJDUMP"; then
10958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
10959$as_echo "$ac_ct_OBJDUMP" >&6; }
10960else
10961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10962$as_echo "no" >&6; }
10963fi
10964
10965  if test "x$ac_ct_OBJDUMP" = x; then
10966    OBJDUMP="false"
10967  else
10968    case $cross_compiling:$ac_tool_warned in
10969yes:)
10970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10972ac_tool_warned=yes ;;
10973esac
10974    OBJDUMP=$ac_ct_OBJDUMP
10975  fi
10976else
10977  OBJDUMP="$ac_cv_prog_OBJDUMP"
10978fi
10979
10980test -z "$OBJDUMP" && OBJDUMP=objdump
10981
10982
10983
10984
10985
10986
10987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
10988$as_echo_n "checking how to recognize dependent libraries... " >&6; }
10989if ${lt_cv_deplibs_check_method+:} false; then :
10990  $as_echo_n "(cached) " >&6
10991else
10992  lt_cv_file_magic_cmd='$MAGIC_CMD'
10993lt_cv_file_magic_test_file=
10994lt_cv_deplibs_check_method='unknown'
10995# Need to set the preceding variable on all platforms that support
10996# interlibrary dependencies.
10997# 'none' -- dependencies not supported.
10998# 'unknown' -- same as none, but documents that we really don't know.
10999# 'pass_all' -- all dependencies passed with no checks.
11000# 'test_compile' -- check by making test program.
11001# 'file_magic [[regex]]' -- check by looking for files in library path
11002# that responds to the $file_magic_cmd with a given extended regex.
11003# If you have 'file' or equivalent on your system and you're not sure
11004# whether 'pass_all' will *always* work, you probably want this one.
11005
11006case $host_os in
11007aix[4-9]*)
11008  lt_cv_deplibs_check_method=pass_all
11009  ;;
11010
11011beos*)
11012  lt_cv_deplibs_check_method=pass_all
11013  ;;
11014
11015bsdi[45]*)
11016  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
11017  lt_cv_file_magic_cmd='/usr/bin/file -L'
11018  lt_cv_file_magic_test_file=/shlib/libc.so
11019  ;;
11020
11021cygwin*)
11022  # func_win32_libid is a shell function defined in ltmain.sh
11023  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
11024  lt_cv_file_magic_cmd='func_win32_libid'
11025  ;;
11026
11027mingw* | pw32*)
11028  # Base MSYS/MinGW do not provide the 'file' command needed by
11029  # func_win32_libid shell function, so use a weaker test based on 'objdump',
11030  # unless we find 'file', for example because we are cross-compiling.
11031  if ( file / ) >/dev/null 2>&1; then
11032    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
11033    lt_cv_file_magic_cmd='func_win32_libid'
11034  else
11035    # Keep this pattern in sync with the one in func_win32_libid.
11036    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
11037    lt_cv_file_magic_cmd='$OBJDUMP -f'
11038  fi
11039  ;;
11040
11041cegcc*)
11042  # use the weaker test based on 'objdump'. See mingw*.
11043  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
11044  lt_cv_file_magic_cmd='$OBJDUMP -f'
11045  ;;
11046
11047darwin* | rhapsody*)
11048  lt_cv_deplibs_check_method=pass_all
11049  ;;
11050
11051freebsd* | dragonfly*)
11052  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
11053    case $host_cpu in
11054    i*86 )
11055      # Not sure whether the presence of OpenBSD here was a mistake.
11056      # Let's accept both of them until this is cleared up.
11057      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
11058      lt_cv_file_magic_cmd=/usr/bin/file
11059      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
11060      ;;
11061    esac
11062  else
11063    lt_cv_deplibs_check_method=pass_all
11064  fi
11065  ;;
11066
11067haiku*)
11068  lt_cv_deplibs_check_method=pass_all
11069  ;;
11070
11071hpux10.20* | hpux11*)
11072  lt_cv_file_magic_cmd=/usr/bin/file
11073  case $host_cpu in
11074  ia64*)
11075    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
11076    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
11077    ;;
11078  hppa*64*)
11079    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
11080    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
11081    ;;
11082  *)
11083    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
11084    lt_cv_file_magic_test_file=/usr/lib/libc.sl
11085    ;;
11086  esac
11087  ;;
11088
11089interix[3-9]*)
11090  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
11091  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
11092  ;;
11093
11094irix5* | irix6* | nonstopux*)
11095  case $LD in
11096  *-32|*"-32 ") libmagic=32-bit;;
11097  *-n32|*"-n32 ") libmagic=N32;;
11098  *-64|*"-64 ") libmagic=64-bit;;
11099  *) libmagic=never-match;;
11100  esac
11101  lt_cv_deplibs_check_method=pass_all
11102  ;;
11103
11104# This must be glibc/ELF.
11105linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11106  lt_cv_deplibs_check_method=pass_all
11107  ;;
11108
11109netbsd*)
11110  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
11111    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
11112  else
11113    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
11114  fi
11115  ;;
11116
11117newos6*)
11118  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
11119  lt_cv_file_magic_cmd=/usr/bin/file
11120  lt_cv_file_magic_test_file=/usr/lib/libnls.so
11121  ;;
11122
11123*nto* | *qnx*)
11124  lt_cv_deplibs_check_method=pass_all
11125  ;;
11126
11127openbsd* | bitrig*)
11128  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
11129    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
11130  else
11131    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
11132  fi
11133  ;;
11134
11135osf3* | osf4* | osf5*)
11136  lt_cv_deplibs_check_method=pass_all
11137  ;;
11138
11139rdos*)
11140  lt_cv_deplibs_check_method=pass_all
11141  ;;
11142
11143solaris*)
11144  lt_cv_deplibs_check_method=pass_all
11145  ;;
11146
11147sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
11148  lt_cv_deplibs_check_method=pass_all
11149  ;;
11150
11151sysv4 | sysv4.3*)
11152  case $host_vendor in
11153  motorola)
11154    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
11155    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
11156    ;;
11157  ncr)
11158    lt_cv_deplibs_check_method=pass_all
11159    ;;
11160  sequent)
11161    lt_cv_file_magic_cmd='/bin/file'
11162    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
11163    ;;
11164  sni)
11165    lt_cv_file_magic_cmd='/bin/file'
11166    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
11167    lt_cv_file_magic_test_file=/lib/libc.so
11168    ;;
11169  siemens)
11170    lt_cv_deplibs_check_method=pass_all
11171    ;;
11172  pc)
11173    lt_cv_deplibs_check_method=pass_all
11174    ;;
11175  esac
11176  ;;
11177
11178tpf*)
11179  lt_cv_deplibs_check_method=pass_all
11180  ;;
11181os2*)
11182  lt_cv_deplibs_check_method=pass_all
11183  ;;
11184esac
11185
11186fi
11187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
11188$as_echo "$lt_cv_deplibs_check_method" >&6; }
11189
11190file_magic_glob=
11191want_nocaseglob=no
11192if test "$build" = "$host"; then
11193  case $host_os in
11194  mingw* | pw32*)
11195    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
11196      want_nocaseglob=yes
11197    else
11198      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
11199    fi
11200    ;;
11201  esac
11202fi
11203
11204file_magic_cmd=$lt_cv_file_magic_cmd
11205deplibs_check_method=$lt_cv_deplibs_check_method
11206test -z "$deplibs_check_method" && deplibs_check_method=unknown
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229if test -n "$ac_tool_prefix"; then
11230  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
11231set dummy ${ac_tool_prefix}dlltool; ac_word=$2
11232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11233$as_echo_n "checking for $ac_word... " >&6; }
11234if ${ac_cv_prog_DLLTOOL+:} false; then :
11235  $as_echo_n "(cached) " >&6
11236else
11237  if test -n "$DLLTOOL"; then
11238  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
11239else
11240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11241for as_dir in $PATH
11242do
11243  IFS=$as_save_IFS
11244  test -z "$as_dir" && as_dir=.
11245    for ac_exec_ext in '' $ac_executable_extensions; do
11246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11247    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
11248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11249    break 2
11250  fi
11251done
11252  done
11253IFS=$as_save_IFS
11254
11255fi
11256fi
11257DLLTOOL=$ac_cv_prog_DLLTOOL
11258if test -n "$DLLTOOL"; then
11259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
11260$as_echo "$DLLTOOL" >&6; }
11261else
11262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11263$as_echo "no" >&6; }
11264fi
11265
11266
11267fi
11268if test -z "$ac_cv_prog_DLLTOOL"; then
11269  ac_ct_DLLTOOL=$DLLTOOL
11270  # Extract the first word of "dlltool", so it can be a program name with args.
11271set dummy dlltool; ac_word=$2
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11273$as_echo_n "checking for $ac_word... " >&6; }
11274if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
11275  $as_echo_n "(cached) " >&6
11276else
11277  if test -n "$ac_ct_DLLTOOL"; then
11278  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
11279else
11280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11281for as_dir in $PATH
11282do
11283  IFS=$as_save_IFS
11284  test -z "$as_dir" && as_dir=.
11285    for ac_exec_ext in '' $ac_executable_extensions; do
11286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11287    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
11288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11289    break 2
11290  fi
11291done
11292  done
11293IFS=$as_save_IFS
11294
11295fi
11296fi
11297ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
11298if test -n "$ac_ct_DLLTOOL"; then
11299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
11300$as_echo "$ac_ct_DLLTOOL" >&6; }
11301else
11302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11303$as_echo "no" >&6; }
11304fi
11305
11306  if test "x$ac_ct_DLLTOOL" = x; then
11307    DLLTOOL="false"
11308  else
11309    case $cross_compiling:$ac_tool_warned in
11310yes:)
11311{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11312$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11313ac_tool_warned=yes ;;
11314esac
11315    DLLTOOL=$ac_ct_DLLTOOL
11316  fi
11317else
11318  DLLTOOL="$ac_cv_prog_DLLTOOL"
11319fi
11320
11321test -z "$DLLTOOL" && DLLTOOL=dlltool
11322
11323
11324
11325
11326
11327
11328
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
11330$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
11331if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
11332  $as_echo_n "(cached) " >&6
11333else
11334  lt_cv_sharedlib_from_linklib_cmd='unknown'
11335
11336case $host_os in
11337cygwin* | mingw* | pw32* | cegcc*)
11338  # two different shell functions defined in ltmain.sh;
11339  # decide which one to use based on capabilities of $DLLTOOL
11340  case `$DLLTOOL --help 2>&1` in
11341  *--identify-strict*)
11342    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
11343    ;;
11344  *)
11345    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
11346    ;;
11347  esac
11348  ;;
11349*)
11350  # fallback: assume linklib IS sharedlib
11351  lt_cv_sharedlib_from_linklib_cmd=$ECHO
11352  ;;
11353esac
11354
11355fi
11356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
11357$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
11358sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
11359test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
11360
11361
11362
11363
11364
11365
11366
11367if test -n "$ac_tool_prefix"; then
11368  for ac_prog in ar
11369  do
11370    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11371set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11373$as_echo_n "checking for $ac_word... " >&6; }
11374if ${ac_cv_prog_AR+:} false; then :
11375  $as_echo_n "(cached) " >&6
11376else
11377  if test -n "$AR"; then
11378  ac_cv_prog_AR="$AR" # Let the user override the test.
11379else
11380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11381for as_dir in $PATH
11382do
11383  IFS=$as_save_IFS
11384  test -z "$as_dir" && as_dir=.
11385    for ac_exec_ext in '' $ac_executable_extensions; do
11386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11387    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
11388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11389    break 2
11390  fi
11391done
11392  done
11393IFS=$as_save_IFS
11394
11395fi
11396fi
11397AR=$ac_cv_prog_AR
11398if test -n "$AR"; then
11399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
11400$as_echo "$AR" >&6; }
11401else
11402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403$as_echo "no" >&6; }
11404fi
11405
11406
11407    test -n "$AR" && break
11408  done
11409fi
11410if test -z "$AR"; then
11411  ac_ct_AR=$AR
11412  for ac_prog in ar
11413do
11414  # Extract the first word of "$ac_prog", so it can be a program name with args.
11415set dummy $ac_prog; ac_word=$2
11416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11417$as_echo_n "checking for $ac_word... " >&6; }
11418if ${ac_cv_prog_ac_ct_AR+:} false; then :
11419  $as_echo_n "(cached) " >&6
11420else
11421  if test -n "$ac_ct_AR"; then
11422  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
11423else
11424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11425for as_dir in $PATH
11426do
11427  IFS=$as_save_IFS
11428  test -z "$as_dir" && as_dir=.
11429    for ac_exec_ext in '' $ac_executable_extensions; do
11430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11431    ac_cv_prog_ac_ct_AR="$ac_prog"
11432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11433    break 2
11434  fi
11435done
11436  done
11437IFS=$as_save_IFS
11438
11439fi
11440fi
11441ac_ct_AR=$ac_cv_prog_ac_ct_AR
11442if test -n "$ac_ct_AR"; then
11443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
11444$as_echo "$ac_ct_AR" >&6; }
11445else
11446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447$as_echo "no" >&6; }
11448fi
11449
11450
11451  test -n "$ac_ct_AR" && break
11452done
11453
11454  if test "x$ac_ct_AR" = x; then
11455    AR="false"
11456  else
11457    case $cross_compiling:$ac_tool_warned in
11458yes:)
11459{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11460$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11461ac_tool_warned=yes ;;
11462esac
11463    AR=$ac_ct_AR
11464  fi
11465fi
11466
11467: ${AR=ar}
11468: ${AR_FLAGS=cru}
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
11481$as_echo_n "checking for archiver @FILE support... " >&6; }
11482if ${lt_cv_ar_at_file+:} false; then :
11483  $as_echo_n "(cached) " >&6
11484else
11485  lt_cv_ar_at_file=no
11486   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11487/* end confdefs.h.  */
11488
11489int
11490main ()
11491{
11492
11493  ;
11494  return 0;
11495}
11496_ACEOF
11497if ac_fn_c_try_compile "$LINENO"; then :
11498  echo conftest.$ac_objext > conftest.lst
11499      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
11500      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
11501  (eval $lt_ar_try) 2>&5
11502  ac_status=$?
11503  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11504  test $ac_status = 0; }
11505      if test 0 -eq "$ac_status"; then
11506	# Ensure the archiver fails upon bogus file names.
11507	rm -f conftest.$ac_objext libconftest.a
11508	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
11509  (eval $lt_ar_try) 2>&5
11510  ac_status=$?
11511  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11512  test $ac_status = 0; }
11513	if test 0 -ne "$ac_status"; then
11514          lt_cv_ar_at_file=@
11515        fi
11516      fi
11517      rm -f conftest.* libconftest.a
11518
11519fi
11520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11521
11522fi
11523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
11524$as_echo "$lt_cv_ar_at_file" >&6; }
11525
11526if test no = "$lt_cv_ar_at_file"; then
11527  archiver_list_spec=
11528else
11529  archiver_list_spec=$lt_cv_ar_at_file
11530fi
11531
11532
11533
11534
11535
11536
11537
11538if test -n "$ac_tool_prefix"; then
11539  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
11540set dummy ${ac_tool_prefix}strip; ac_word=$2
11541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11542$as_echo_n "checking for $ac_word... " >&6; }
11543if ${ac_cv_prog_STRIP+:} false; then :
11544  $as_echo_n "(cached) " >&6
11545else
11546  if test -n "$STRIP"; then
11547  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
11548else
11549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11550for as_dir in $PATH
11551do
11552  IFS=$as_save_IFS
11553  test -z "$as_dir" && as_dir=.
11554    for ac_exec_ext in '' $ac_executable_extensions; do
11555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11556    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
11557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11558    break 2
11559  fi
11560done
11561  done
11562IFS=$as_save_IFS
11563
11564fi
11565fi
11566STRIP=$ac_cv_prog_STRIP
11567if test -n "$STRIP"; then
11568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
11569$as_echo "$STRIP" >&6; }
11570else
11571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11572$as_echo "no" >&6; }
11573fi
11574
11575
11576fi
11577if test -z "$ac_cv_prog_STRIP"; then
11578  ac_ct_STRIP=$STRIP
11579  # Extract the first word of "strip", so it can be a program name with args.
11580set dummy strip; ac_word=$2
11581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11582$as_echo_n "checking for $ac_word... " >&6; }
11583if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
11584  $as_echo_n "(cached) " >&6
11585else
11586  if test -n "$ac_ct_STRIP"; then
11587  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
11588else
11589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11590for as_dir in $PATH
11591do
11592  IFS=$as_save_IFS
11593  test -z "$as_dir" && as_dir=.
11594    for ac_exec_ext in '' $ac_executable_extensions; do
11595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11596    ac_cv_prog_ac_ct_STRIP="strip"
11597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11598    break 2
11599  fi
11600done
11601  done
11602IFS=$as_save_IFS
11603
11604fi
11605fi
11606ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
11607if test -n "$ac_ct_STRIP"; then
11608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
11609$as_echo "$ac_ct_STRIP" >&6; }
11610else
11611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11612$as_echo "no" >&6; }
11613fi
11614
11615  if test "x$ac_ct_STRIP" = x; then
11616    STRIP=":"
11617  else
11618    case $cross_compiling:$ac_tool_warned in
11619yes:)
11620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11622ac_tool_warned=yes ;;
11623esac
11624    STRIP=$ac_ct_STRIP
11625  fi
11626else
11627  STRIP="$ac_cv_prog_STRIP"
11628fi
11629
11630test -z "$STRIP" && STRIP=:
11631
11632
11633
11634
11635
11636
11637if test -n "$ac_tool_prefix"; then
11638  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
11639set dummy ${ac_tool_prefix}ranlib; ac_word=$2
11640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11641$as_echo_n "checking for $ac_word... " >&6; }
11642if ${ac_cv_prog_RANLIB+:} false; then :
11643  $as_echo_n "(cached) " >&6
11644else
11645  if test -n "$RANLIB"; then
11646  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
11647else
11648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11649for as_dir in $PATH
11650do
11651  IFS=$as_save_IFS
11652  test -z "$as_dir" && as_dir=.
11653    for ac_exec_ext in '' $ac_executable_extensions; do
11654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11655    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
11656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11657    break 2
11658  fi
11659done
11660  done
11661IFS=$as_save_IFS
11662
11663fi
11664fi
11665RANLIB=$ac_cv_prog_RANLIB
11666if test -n "$RANLIB"; then
11667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
11668$as_echo "$RANLIB" >&6; }
11669else
11670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11671$as_echo "no" >&6; }
11672fi
11673
11674
11675fi
11676if test -z "$ac_cv_prog_RANLIB"; then
11677  ac_ct_RANLIB=$RANLIB
11678  # Extract the first word of "ranlib", so it can be a program name with args.
11679set dummy ranlib; ac_word=$2
11680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11681$as_echo_n "checking for $ac_word... " >&6; }
11682if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
11683  $as_echo_n "(cached) " >&6
11684else
11685  if test -n "$ac_ct_RANLIB"; then
11686  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
11687else
11688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11689for as_dir in $PATH
11690do
11691  IFS=$as_save_IFS
11692  test -z "$as_dir" && as_dir=.
11693    for ac_exec_ext in '' $ac_executable_extensions; do
11694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11695    ac_cv_prog_ac_ct_RANLIB="ranlib"
11696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11697    break 2
11698  fi
11699done
11700  done
11701IFS=$as_save_IFS
11702
11703fi
11704fi
11705ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
11706if test -n "$ac_ct_RANLIB"; then
11707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
11708$as_echo "$ac_ct_RANLIB" >&6; }
11709else
11710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
11712fi
11713
11714  if test "x$ac_ct_RANLIB" = x; then
11715    RANLIB=":"
11716  else
11717    case $cross_compiling:$ac_tool_warned in
11718yes:)
11719{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11720$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11721ac_tool_warned=yes ;;
11722esac
11723    RANLIB=$ac_ct_RANLIB
11724  fi
11725else
11726  RANLIB="$ac_cv_prog_RANLIB"
11727fi
11728
11729test -z "$RANLIB" && RANLIB=:
11730
11731
11732
11733
11734
11735
11736# Determine commands to create old-style static archives.
11737old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
11738old_postinstall_cmds='chmod 644 $oldlib'
11739old_postuninstall_cmds=
11740
11741if test -n "$RANLIB"; then
11742  case $host_os in
11743  bitrig* | openbsd*)
11744    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
11745    ;;
11746  *)
11747    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
11748    ;;
11749  esac
11750  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
11751fi
11752
11753case $host_os in
11754  darwin*)
11755    lock_old_archive_extraction=yes ;;
11756  *)
11757    lock_old_archive_extraction=no ;;
11758esac
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798# If no C compiler was specified, use CC.
11799LTCC=${LTCC-"$CC"}
11800
11801# If no C compiler flags were specified, use CFLAGS.
11802LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
11803
11804# Allow CC to be a program name with arguments.
11805compiler=$CC
11806
11807
11808# Check for command to grab the raw symbol name followed by C symbol from nm.
11809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
11810$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
11811if ${lt_cv_sys_global_symbol_pipe+:} false; then :
11812  $as_echo_n "(cached) " >&6
11813else
11814
11815# These are sane defaults that work on at least a few old systems.
11816# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
11817
11818# Character class describing NM global symbol codes.
11819symcode='[BCDEGRST]'
11820
11821# Regexp to match symbols that can be accessed directly from C.
11822sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
11823
11824# Define system-specific variables.
11825case $host_os in
11826aix*)
11827  symcode='[BCDT]'
11828  ;;
11829cygwin* | mingw* | pw32* | cegcc*)
11830  symcode='[ABCDGISTW]'
11831  ;;
11832hpux*)
11833  if test ia64 = "$host_cpu"; then
11834    symcode='[ABCDEGRST]'
11835  fi
11836  ;;
11837irix* | nonstopux*)
11838  symcode='[BCDEGRST]'
11839  ;;
11840osf*)
11841  symcode='[BCDEGQRST]'
11842  ;;
11843solaris*)
11844  symcode='[BDRT]'
11845  ;;
11846sco3.2v5*)
11847  symcode='[DT]'
11848  ;;
11849sysv4.2uw2*)
11850  symcode='[DT]'
11851  ;;
11852sysv5* | sco5v6* | unixware* | OpenUNIX*)
11853  symcode='[ABDT]'
11854  ;;
11855sysv4)
11856  symcode='[DFNSTU]'
11857  ;;
11858esac
11859
11860# If we're using GNU nm, then use its standard symbol codes.
11861case `$NM -V 2>&1` in
11862*GNU* | *'with BFD'*)
11863  symcode='[ABCDGIRSTW]' ;;
11864esac
11865
11866if test "$lt_cv_nm_interface" = "MS dumpbin"; then
11867  # Gets list of data symbols to import.
11868  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
11869  # Adjust the below global symbol transforms to fixup imported variables.
11870  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
11871  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
11872  lt_c_name_lib_hook="\
11873  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
11874  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
11875else
11876  # Disable hooks by default.
11877  lt_cv_sys_global_symbol_to_import=
11878  lt_cdecl_hook=
11879  lt_c_name_hook=
11880  lt_c_name_lib_hook=
11881fi
11882
11883# Transform an extracted symbol line into a proper C declaration.
11884# Some systems (esp. on ia64) link data and code symbols differently,
11885# so use this general approach.
11886lt_cv_sys_global_symbol_to_cdecl="sed -n"\
11887$lt_cdecl_hook\
11888" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
11889" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
11890
11891# Transform an extracted symbol line into symbol name and symbol address
11892lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
11893$lt_c_name_hook\
11894" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
11895" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
11896
11897# Transform an extracted symbol line into symbol name with lib prefix and
11898# symbol address.
11899lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
11900$lt_c_name_lib_hook\
11901" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
11902" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
11903" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
11904
11905# Handle CRLF in mingw tool chain
11906opt_cr=
11907case $build_os in
11908mingw*)
11909  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
11910  ;;
11911esac
11912
11913# Try without a prefix underscore, then with it.
11914for ac_symprfx in "" "_"; do
11915
11916  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
11917  symxfrm="\\1 $ac_symprfx\\2 \\2"
11918
11919  # Write the raw and C identifiers.
11920  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
11921    # Fake it for dumpbin and say T for any non-static function,
11922    # D for any global variable and I for any imported variable.
11923    # Also find C++ and __fastcall symbols from MSVC++,
11924    # which start with @ or ?.
11925    lt_cv_sys_global_symbol_pipe="$AWK '"\
11926"     {last_section=section; section=\$ 3};"\
11927"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
11928"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
11929"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
11930"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
11931"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
11932"     \$ 0!~/External *\|/{next};"\
11933"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
11934"     {if(hide[section]) next};"\
11935"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
11936"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
11937"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
11938"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
11939"     ' prfx=^$ac_symprfx"
11940  else
11941    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
11942  fi
11943  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
11944
11945  # Check to see that the pipe works correctly.
11946  pipe_works=no
11947
11948  rm -f conftest*
11949  cat > conftest.$ac_ext <<_LT_EOF
11950#ifdef __cplusplus
11951extern "C" {
11952#endif
11953char nm_test_var;
11954void nm_test_func(void);
11955void nm_test_func(void){}
11956#ifdef __cplusplus
11957}
11958#endif
11959int main(){nm_test_var='a';nm_test_func();return(0);}
11960_LT_EOF
11961
11962  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11963  (eval $ac_compile) 2>&5
11964  ac_status=$?
11965  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11966  test $ac_status = 0; }; then
11967    # Now try to grab the symbols.
11968    nlist=conftest.nm
11969    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
11970  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
11971  ac_status=$?
11972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11973  test $ac_status = 0; } && test -s "$nlist"; then
11974      # Try sorting and uniquifying the output.
11975      if sort "$nlist" | uniq > "$nlist"T; then
11976	mv -f "$nlist"T "$nlist"
11977      else
11978	rm -f "$nlist"T
11979      fi
11980
11981      # Make sure that we snagged all the symbols we need.
11982      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
11983	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
11984	  cat <<_LT_EOF > conftest.$ac_ext
11985/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
11986#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
11987/* DATA imports from DLLs on WIN32 can't be const, because runtime
11988   relocations are performed -- see ld's documentation on pseudo-relocs.  */
11989# define LT_DLSYM_CONST
11990#elif defined __osf__
11991/* This system does not cope well with relocations in const data.  */
11992# define LT_DLSYM_CONST
11993#else
11994# define LT_DLSYM_CONST const
11995#endif
11996
11997#ifdef __cplusplus
11998extern "C" {
11999#endif
12000
12001_LT_EOF
12002	  # Now generate the symbol file.
12003	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
12004
12005	  cat <<_LT_EOF >> conftest.$ac_ext
12006
12007/* The mapping between symbol names and symbols.  */
12008LT_DLSYM_CONST struct {
12009  const char *name;
12010  void       *address;
12011}
12012lt__PROGRAM__LTX_preloaded_symbols[] =
12013{
12014  { "@PROGRAM@", (void *) 0 },
12015_LT_EOF
12016	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
12017	  cat <<\_LT_EOF >> conftest.$ac_ext
12018  {0, (void *) 0}
12019};
12020
12021/* This works around a problem in FreeBSD linker */
12022#ifdef FREEBSD_WORKAROUND
12023static const void *lt_preloaded_setup() {
12024  return lt__PROGRAM__LTX_preloaded_symbols;
12025}
12026#endif
12027
12028#ifdef __cplusplus
12029}
12030#endif
12031_LT_EOF
12032	  # Now try linking the two files.
12033	  mv conftest.$ac_objext conftstm.$ac_objext
12034	  lt_globsym_save_LIBS=$LIBS
12035	  lt_globsym_save_CFLAGS=$CFLAGS
12036	  LIBS=conftstm.$ac_objext
12037	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
12038	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12039  (eval $ac_link) 2>&5
12040  ac_status=$?
12041  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12042  test $ac_status = 0; } && test -s conftest$ac_exeext; then
12043	    pipe_works=yes
12044	  fi
12045	  LIBS=$lt_globsym_save_LIBS
12046	  CFLAGS=$lt_globsym_save_CFLAGS
12047	else
12048	  echo "cannot find nm_test_func in $nlist" >&5
12049	fi
12050      else
12051	echo "cannot find nm_test_var in $nlist" >&5
12052      fi
12053    else
12054      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
12055    fi
12056  else
12057    echo "$progname: failed program was:" >&5
12058    cat conftest.$ac_ext >&5
12059  fi
12060  rm -rf conftest* conftst*
12061
12062  # Do not use the global_symbol_pipe unless it works.
12063  if test yes = "$pipe_works"; then
12064    break
12065  else
12066    lt_cv_sys_global_symbol_pipe=
12067  fi
12068done
12069
12070fi
12071
12072if test -z "$lt_cv_sys_global_symbol_pipe"; then
12073  lt_cv_sys_global_symbol_to_cdecl=
12074fi
12075if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
12076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
12077$as_echo "failed" >&6; }
12078else
12079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
12080$as_echo "ok" >&6; }
12081fi
12082
12083# Response file support.
12084if test "$lt_cv_nm_interface" = "MS dumpbin"; then
12085  nm_file_list_spec='@'
12086elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
12087  nm_file_list_spec='@'
12088fi
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
12127$as_echo_n "checking for sysroot... " >&6; }
12128
12129# Check whether --with-sysroot was given.
12130if test "${with_sysroot+set}" = set; then :
12131  withval=$with_sysroot;
12132else
12133  with_sysroot=no
12134fi
12135
12136
12137lt_sysroot=
12138case $with_sysroot in #(
12139 yes)
12140   if test yes = "$GCC"; then
12141     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
12142   fi
12143   ;; #(
12144 /*)
12145   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
12146   ;; #(
12147 no|'')
12148   ;; #(
12149 *)
12150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
12151$as_echo "$with_sysroot" >&6; }
12152   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
12153   ;;
12154esac
12155
12156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
12157$as_echo "${lt_sysroot:-no}" >&6; }
12158
12159
12160
12161
12162
12163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
12164$as_echo_n "checking for a working dd... " >&6; }
12165if ${ac_cv_path_lt_DD+:} false; then :
12166  $as_echo_n "(cached) " >&6
12167else
12168  printf 0123456789abcdef0123456789abcdef >conftest.i
12169cat conftest.i conftest.i >conftest2.i
12170: ${lt_DD:=$DD}
12171if test -z "$lt_DD"; then
12172  ac_path_lt_DD_found=false
12173  # Loop through the user's path and test for each of PROGNAME-LIST
12174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12175for as_dir in $PATH
12176do
12177  IFS=$as_save_IFS
12178  test -z "$as_dir" && as_dir=.
12179    for ac_prog in dd; do
12180    for ac_exec_ext in '' $ac_executable_extensions; do
12181      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
12182      as_fn_executable_p "$ac_path_lt_DD" || continue
12183if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
12184  cmp -s conftest.i conftest.out \
12185  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
12186fi
12187      $ac_path_lt_DD_found && break 3
12188    done
12189  done
12190  done
12191IFS=$as_save_IFS
12192  if test -z "$ac_cv_path_lt_DD"; then
12193    :
12194  fi
12195else
12196  ac_cv_path_lt_DD=$lt_DD
12197fi
12198
12199rm -f conftest.i conftest2.i conftest.out
12200fi
12201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
12202$as_echo "$ac_cv_path_lt_DD" >&6; }
12203
12204
12205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
12206$as_echo_n "checking how to truncate binary pipes... " >&6; }
12207if ${lt_cv_truncate_bin+:} false; then :
12208  $as_echo_n "(cached) " >&6
12209else
12210  printf 0123456789abcdef0123456789abcdef >conftest.i
12211cat conftest.i conftest.i >conftest2.i
12212lt_cv_truncate_bin=
12213if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
12214  cmp -s conftest.i conftest.out \
12215  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
12216fi
12217rm -f conftest.i conftest2.i conftest.out
12218test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
12219fi
12220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
12221$as_echo "$lt_cv_truncate_bin" >&6; }
12222
12223
12224
12225
12226
12227
12228
12229# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
12230func_cc_basename ()
12231{
12232    for cc_temp in $*""; do
12233      case $cc_temp in
12234        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
12235        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
12236        \-*) ;;
12237        *) break;;
12238      esac
12239    done
12240    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
12241}
12242
12243# Check whether --enable-libtool-lock was given.
12244if test "${enable_libtool_lock+set}" = set; then :
12245  enableval=$enable_libtool_lock;
12246fi
12247
12248test no = "$enable_libtool_lock" || enable_libtool_lock=yes
12249
12250# Some flags need to be propagated to the compiler or linker for good
12251# libtool support.
12252case $host in
12253ia64-*-hpux*)
12254  # Find out what ABI is being produced by ac_compile, and set mode
12255  # options accordingly.
12256  echo 'int i;' > conftest.$ac_ext
12257  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12258  (eval $ac_compile) 2>&5
12259  ac_status=$?
12260  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12261  test $ac_status = 0; }; then
12262    case `/usr/bin/file conftest.$ac_objext` in
12263      *ELF-32*)
12264	HPUX_IA64_MODE=32
12265	;;
12266      *ELF-64*)
12267	HPUX_IA64_MODE=64
12268	;;
12269    esac
12270  fi
12271  rm -rf conftest*
12272  ;;
12273*-*-irix6*)
12274  # Find out what ABI is being produced by ac_compile, and set linker
12275  # options accordingly.
12276  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
12277  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12278  (eval $ac_compile) 2>&5
12279  ac_status=$?
12280  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12281  test $ac_status = 0; }; then
12282    if test yes = "$lt_cv_prog_gnu_ld"; then
12283      case `/usr/bin/file conftest.$ac_objext` in
12284	*32-bit*)
12285	  LD="${LD-ld} -melf32bsmip"
12286	  ;;
12287	*N32*)
12288	  LD="${LD-ld} -melf32bmipn32"
12289	  ;;
12290	*64-bit*)
12291	  LD="${LD-ld} -melf64bmip"
12292	;;
12293      esac
12294    else
12295      case `/usr/bin/file conftest.$ac_objext` in
12296	*32-bit*)
12297	  LD="${LD-ld} -32"
12298	  ;;
12299	*N32*)
12300	  LD="${LD-ld} -n32"
12301	  ;;
12302	*64-bit*)
12303	  LD="${LD-ld} -64"
12304	  ;;
12305      esac
12306    fi
12307  fi
12308  rm -rf conftest*
12309  ;;
12310
12311mips64*-*linux*)
12312  # Find out what ABI is being produced by ac_compile, and set linker
12313  # options accordingly.
12314  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
12315  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12316  (eval $ac_compile) 2>&5
12317  ac_status=$?
12318  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12319  test $ac_status = 0; }; then
12320    emul=elf
12321    case `/usr/bin/file conftest.$ac_objext` in
12322      *32-bit*)
12323	emul="${emul}32"
12324	;;
12325      *64-bit*)
12326	emul="${emul}64"
12327	;;
12328    esac
12329    case `/usr/bin/file conftest.$ac_objext` in
12330      *MSB*)
12331	emul="${emul}btsmip"
12332	;;
12333      *LSB*)
12334	emul="${emul}ltsmip"
12335	;;
12336    esac
12337    case `/usr/bin/file conftest.$ac_objext` in
12338      *N32*)
12339	emul="${emul}n32"
12340	;;
12341    esac
12342    LD="${LD-ld} -m $emul"
12343  fi
12344  rm -rf conftest*
12345  ;;
12346
12347x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
12348s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
12349  # Find out what ABI is being produced by ac_compile, and set linker
12350  # options accordingly.  Note that the listed cases only cover the
12351  # situations where additional linker options are needed (such as when
12352  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
12353  # vice versa); the common cases where no linker options are needed do
12354  # not appear in the list.
12355  echo 'int i;' > conftest.$ac_ext
12356  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12357  (eval $ac_compile) 2>&5
12358  ac_status=$?
12359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12360  test $ac_status = 0; }; then
12361    case `/usr/bin/file conftest.o` in
12362      *32-bit*)
12363	case $host in
12364	  x86_64-*kfreebsd*-gnu)
12365	    LD="${LD-ld} -m elf_i386_fbsd"
12366	    ;;
12367	  x86_64-*linux*)
12368	    case `/usr/bin/file conftest.o` in
12369	      *x86-64*)
12370		LD="${LD-ld} -m elf32_x86_64"
12371		;;
12372	      *)
12373		LD="${LD-ld} -m elf_i386"
12374		;;
12375	    esac
12376	    ;;
12377	  powerpc64le-*linux*)
12378	    LD="${LD-ld} -m elf32lppclinux"
12379	    ;;
12380	  powerpc64-*linux*)
12381	    LD="${LD-ld} -m elf32ppclinux"
12382	    ;;
12383	  s390x-*linux*)
12384	    LD="${LD-ld} -m elf_s390"
12385	    ;;
12386	  sparc64-*linux*)
12387	    LD="${LD-ld} -m elf32_sparc"
12388	    ;;
12389	esac
12390	;;
12391      *64-bit*)
12392	case $host in
12393	  x86_64-*kfreebsd*-gnu)
12394	    LD="${LD-ld} -m elf_x86_64_fbsd"
12395	    ;;
12396	  x86_64-*linux*)
12397	    LD="${LD-ld} -m elf_x86_64"
12398	    ;;
12399	  powerpcle-*linux*)
12400	    LD="${LD-ld} -m elf64lppc"
12401	    ;;
12402	  powerpc-*linux*)
12403	    LD="${LD-ld} -m elf64ppc"
12404	    ;;
12405	  s390*-*linux*|s390*-*tpf*)
12406	    LD="${LD-ld} -m elf64_s390"
12407	    ;;
12408	  sparc*-*linux*)
12409	    LD="${LD-ld} -m elf64_sparc"
12410	    ;;
12411	esac
12412	;;
12413    esac
12414  fi
12415  rm -rf conftest*
12416  ;;
12417
12418*-*-sco3.2v5*)
12419  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
12420  SAVE_CFLAGS=$CFLAGS
12421  CFLAGS="$CFLAGS -belf"
12422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
12423$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
12424if ${lt_cv_cc_needs_belf+:} false; then :
12425  $as_echo_n "(cached) " >&6
12426else
12427  ac_ext=c
12428ac_cpp='$CPP $CPPFLAGS'
12429ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12430ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12431ac_compiler_gnu=$ac_cv_c_compiler_gnu
12432
12433     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12434/* end confdefs.h.  */
12435
12436int
12437main ()
12438{
12439
12440  ;
12441  return 0;
12442}
12443_ACEOF
12444if ac_fn_c_try_link "$LINENO"; then :
12445  lt_cv_cc_needs_belf=yes
12446else
12447  lt_cv_cc_needs_belf=no
12448fi
12449rm -f core conftest.err conftest.$ac_objext \
12450    conftest$ac_exeext conftest.$ac_ext
12451     ac_ext=c
12452ac_cpp='$CPP $CPPFLAGS'
12453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12455ac_compiler_gnu=$ac_cv_c_compiler_gnu
12456
12457fi
12458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
12459$as_echo "$lt_cv_cc_needs_belf" >&6; }
12460  if test yes != "$lt_cv_cc_needs_belf"; then
12461    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
12462    CFLAGS=$SAVE_CFLAGS
12463  fi
12464  ;;
12465*-*solaris*)
12466  # Find out what ABI is being produced by ac_compile, and set linker
12467  # options accordingly.
12468  echo 'int i;' > conftest.$ac_ext
12469  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12470  (eval $ac_compile) 2>&5
12471  ac_status=$?
12472  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12473  test $ac_status = 0; }; then
12474    case `/usr/bin/file conftest.o` in
12475    *64-bit*)
12476      case $lt_cv_prog_gnu_ld in
12477      yes*)
12478        case $host in
12479        i?86-*-solaris*|x86_64-*-solaris*)
12480          LD="${LD-ld} -m elf_x86_64"
12481          ;;
12482        sparc*-*-solaris*)
12483          LD="${LD-ld} -m elf64_sparc"
12484          ;;
12485        esac
12486        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
12487        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
12488          LD=${LD-ld}_sol2
12489        fi
12490        ;;
12491      *)
12492	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
12493	  LD="${LD-ld} -64"
12494	fi
12495	;;
12496      esac
12497      ;;
12498    esac
12499  fi
12500  rm -rf conftest*
12501  ;;
12502esac
12503
12504need_locks=$enable_libtool_lock
12505
12506if test -n "$ac_tool_prefix"; then
12507  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
12508set dummy ${ac_tool_prefix}mt; ac_word=$2
12509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12510$as_echo_n "checking for $ac_word... " >&6; }
12511if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
12512  $as_echo_n "(cached) " >&6
12513else
12514  if test -n "$MANIFEST_TOOL"; then
12515  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
12516else
12517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12518for as_dir in $PATH
12519do
12520  IFS=$as_save_IFS
12521  test -z "$as_dir" && as_dir=.
12522    for ac_exec_ext in '' $ac_executable_extensions; do
12523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12524    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
12525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12526    break 2
12527  fi
12528done
12529  done
12530IFS=$as_save_IFS
12531
12532fi
12533fi
12534MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
12535if test -n "$MANIFEST_TOOL"; then
12536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
12537$as_echo "$MANIFEST_TOOL" >&6; }
12538else
12539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12540$as_echo "no" >&6; }
12541fi
12542
12543
12544fi
12545if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
12546  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
12547  # Extract the first word of "mt", so it can be a program name with args.
12548set dummy mt; ac_word=$2
12549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12550$as_echo_n "checking for $ac_word... " >&6; }
12551if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
12552  $as_echo_n "(cached) " >&6
12553else
12554  if test -n "$ac_ct_MANIFEST_TOOL"; then
12555  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
12556else
12557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12558for as_dir in $PATH
12559do
12560  IFS=$as_save_IFS
12561  test -z "$as_dir" && as_dir=.
12562    for ac_exec_ext in '' $ac_executable_extensions; do
12563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12564    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
12565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12566    break 2
12567  fi
12568done
12569  done
12570IFS=$as_save_IFS
12571
12572fi
12573fi
12574ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
12575if test -n "$ac_ct_MANIFEST_TOOL"; then
12576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
12577$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
12578else
12579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12580$as_echo "no" >&6; }
12581fi
12582
12583  if test "x$ac_ct_MANIFEST_TOOL" = x; then
12584    MANIFEST_TOOL=":"
12585  else
12586    case $cross_compiling:$ac_tool_warned in
12587yes:)
12588{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12589$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12590ac_tool_warned=yes ;;
12591esac
12592    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
12593  fi
12594else
12595  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
12596fi
12597
12598test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
12599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
12600$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
12601if ${lt_cv_path_mainfest_tool+:} false; then :
12602  $as_echo_n "(cached) " >&6
12603else
12604  lt_cv_path_mainfest_tool=no
12605  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
12606  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
12607  cat conftest.err >&5
12608  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
12609    lt_cv_path_mainfest_tool=yes
12610  fi
12611  rm -f conftest*
12612fi
12613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
12614$as_echo "$lt_cv_path_mainfest_tool" >&6; }
12615if test yes != "$lt_cv_path_mainfest_tool"; then
12616  MANIFEST_TOOL=:
12617fi
12618
12619
12620
12621
12622
12623
12624  case $host_os in
12625    rhapsody* | darwin*)
12626    if test -n "$ac_tool_prefix"; then
12627  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
12628set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
12629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12630$as_echo_n "checking for $ac_word... " >&6; }
12631if ${ac_cv_prog_DSYMUTIL+:} false; then :
12632  $as_echo_n "(cached) " >&6
12633else
12634  if test -n "$DSYMUTIL"; then
12635  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
12636else
12637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12638for as_dir in $PATH
12639do
12640  IFS=$as_save_IFS
12641  test -z "$as_dir" && as_dir=.
12642    for ac_exec_ext in '' $ac_executable_extensions; do
12643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12644    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
12645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12646    break 2
12647  fi
12648done
12649  done
12650IFS=$as_save_IFS
12651
12652fi
12653fi
12654DSYMUTIL=$ac_cv_prog_DSYMUTIL
12655if test -n "$DSYMUTIL"; then
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
12657$as_echo "$DSYMUTIL" >&6; }
12658else
12659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660$as_echo "no" >&6; }
12661fi
12662
12663
12664fi
12665if test -z "$ac_cv_prog_DSYMUTIL"; then
12666  ac_ct_DSYMUTIL=$DSYMUTIL
12667  # Extract the first word of "dsymutil", so it can be a program name with args.
12668set dummy dsymutil; ac_word=$2
12669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12670$as_echo_n "checking for $ac_word... " >&6; }
12671if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
12672  $as_echo_n "(cached) " >&6
12673else
12674  if test -n "$ac_ct_DSYMUTIL"; then
12675  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
12676else
12677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12678for as_dir in $PATH
12679do
12680  IFS=$as_save_IFS
12681  test -z "$as_dir" && as_dir=.
12682    for ac_exec_ext in '' $ac_executable_extensions; do
12683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12684    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
12685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12686    break 2
12687  fi
12688done
12689  done
12690IFS=$as_save_IFS
12691
12692fi
12693fi
12694ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
12695if test -n "$ac_ct_DSYMUTIL"; then
12696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
12697$as_echo "$ac_ct_DSYMUTIL" >&6; }
12698else
12699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12700$as_echo "no" >&6; }
12701fi
12702
12703  if test "x$ac_ct_DSYMUTIL" = x; then
12704    DSYMUTIL=":"
12705  else
12706    case $cross_compiling:$ac_tool_warned in
12707yes:)
12708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12710ac_tool_warned=yes ;;
12711esac
12712    DSYMUTIL=$ac_ct_DSYMUTIL
12713  fi
12714else
12715  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
12716fi
12717
12718    if test -n "$ac_tool_prefix"; then
12719  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
12720set dummy ${ac_tool_prefix}nmedit; ac_word=$2
12721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12722$as_echo_n "checking for $ac_word... " >&6; }
12723if ${ac_cv_prog_NMEDIT+:} false; then :
12724  $as_echo_n "(cached) " >&6
12725else
12726  if test -n "$NMEDIT"; then
12727  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
12728else
12729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12730for as_dir in $PATH
12731do
12732  IFS=$as_save_IFS
12733  test -z "$as_dir" && as_dir=.
12734    for ac_exec_ext in '' $ac_executable_extensions; do
12735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12736    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
12737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12738    break 2
12739  fi
12740done
12741  done
12742IFS=$as_save_IFS
12743
12744fi
12745fi
12746NMEDIT=$ac_cv_prog_NMEDIT
12747if test -n "$NMEDIT"; then
12748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
12749$as_echo "$NMEDIT" >&6; }
12750else
12751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12752$as_echo "no" >&6; }
12753fi
12754
12755
12756fi
12757if test -z "$ac_cv_prog_NMEDIT"; then
12758  ac_ct_NMEDIT=$NMEDIT
12759  # Extract the first word of "nmedit", so it can be a program name with args.
12760set dummy nmedit; ac_word=$2
12761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12762$as_echo_n "checking for $ac_word... " >&6; }
12763if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
12764  $as_echo_n "(cached) " >&6
12765else
12766  if test -n "$ac_ct_NMEDIT"; then
12767  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
12768else
12769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12770for as_dir in $PATH
12771do
12772  IFS=$as_save_IFS
12773  test -z "$as_dir" && as_dir=.
12774    for ac_exec_ext in '' $ac_executable_extensions; do
12775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12776    ac_cv_prog_ac_ct_NMEDIT="nmedit"
12777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12778    break 2
12779  fi
12780done
12781  done
12782IFS=$as_save_IFS
12783
12784fi
12785fi
12786ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
12787if test -n "$ac_ct_NMEDIT"; then
12788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
12789$as_echo "$ac_ct_NMEDIT" >&6; }
12790else
12791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12792$as_echo "no" >&6; }
12793fi
12794
12795  if test "x$ac_ct_NMEDIT" = x; then
12796    NMEDIT=":"
12797  else
12798    case $cross_compiling:$ac_tool_warned in
12799yes:)
12800{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12801$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12802ac_tool_warned=yes ;;
12803esac
12804    NMEDIT=$ac_ct_NMEDIT
12805  fi
12806else
12807  NMEDIT="$ac_cv_prog_NMEDIT"
12808fi
12809
12810    if test -n "$ac_tool_prefix"; then
12811  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
12812set dummy ${ac_tool_prefix}lipo; ac_word=$2
12813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12814$as_echo_n "checking for $ac_word... " >&6; }
12815if ${ac_cv_prog_LIPO+:} false; then :
12816  $as_echo_n "(cached) " >&6
12817else
12818  if test -n "$LIPO"; then
12819  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
12820else
12821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12822for as_dir in $PATH
12823do
12824  IFS=$as_save_IFS
12825  test -z "$as_dir" && as_dir=.
12826    for ac_exec_ext in '' $ac_executable_extensions; do
12827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12828    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
12829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12830    break 2
12831  fi
12832done
12833  done
12834IFS=$as_save_IFS
12835
12836fi
12837fi
12838LIPO=$ac_cv_prog_LIPO
12839if test -n "$LIPO"; then
12840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
12841$as_echo "$LIPO" >&6; }
12842else
12843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12844$as_echo "no" >&6; }
12845fi
12846
12847
12848fi
12849if test -z "$ac_cv_prog_LIPO"; then
12850  ac_ct_LIPO=$LIPO
12851  # Extract the first word of "lipo", so it can be a program name with args.
12852set dummy lipo; ac_word=$2
12853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12854$as_echo_n "checking for $ac_word... " >&6; }
12855if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
12856  $as_echo_n "(cached) " >&6
12857else
12858  if test -n "$ac_ct_LIPO"; then
12859  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
12860else
12861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12862for as_dir in $PATH
12863do
12864  IFS=$as_save_IFS
12865  test -z "$as_dir" && as_dir=.
12866    for ac_exec_ext in '' $ac_executable_extensions; do
12867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12868    ac_cv_prog_ac_ct_LIPO="lipo"
12869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12870    break 2
12871  fi
12872done
12873  done
12874IFS=$as_save_IFS
12875
12876fi
12877fi
12878ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
12879if test -n "$ac_ct_LIPO"; then
12880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
12881$as_echo "$ac_ct_LIPO" >&6; }
12882else
12883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12884$as_echo "no" >&6; }
12885fi
12886
12887  if test "x$ac_ct_LIPO" = x; then
12888    LIPO=":"
12889  else
12890    case $cross_compiling:$ac_tool_warned in
12891yes:)
12892{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12893$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12894ac_tool_warned=yes ;;
12895esac
12896    LIPO=$ac_ct_LIPO
12897  fi
12898else
12899  LIPO="$ac_cv_prog_LIPO"
12900fi
12901
12902    if test -n "$ac_tool_prefix"; then
12903  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
12904set dummy ${ac_tool_prefix}otool; ac_word=$2
12905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12906$as_echo_n "checking for $ac_word... " >&6; }
12907if ${ac_cv_prog_OTOOL+:} false; then :
12908  $as_echo_n "(cached) " >&6
12909else
12910  if test -n "$OTOOL"; then
12911  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
12912else
12913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12914for as_dir in $PATH
12915do
12916  IFS=$as_save_IFS
12917  test -z "$as_dir" && as_dir=.
12918    for ac_exec_ext in '' $ac_executable_extensions; do
12919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12920    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
12921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12922    break 2
12923  fi
12924done
12925  done
12926IFS=$as_save_IFS
12927
12928fi
12929fi
12930OTOOL=$ac_cv_prog_OTOOL
12931if test -n "$OTOOL"; then
12932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
12933$as_echo "$OTOOL" >&6; }
12934else
12935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12936$as_echo "no" >&6; }
12937fi
12938
12939
12940fi
12941if test -z "$ac_cv_prog_OTOOL"; then
12942  ac_ct_OTOOL=$OTOOL
12943  # Extract the first word of "otool", so it can be a program name with args.
12944set dummy otool; ac_word=$2
12945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12946$as_echo_n "checking for $ac_word... " >&6; }
12947if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
12948  $as_echo_n "(cached) " >&6
12949else
12950  if test -n "$ac_ct_OTOOL"; then
12951  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
12952else
12953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12954for as_dir in $PATH
12955do
12956  IFS=$as_save_IFS
12957  test -z "$as_dir" && as_dir=.
12958    for ac_exec_ext in '' $ac_executable_extensions; do
12959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12960    ac_cv_prog_ac_ct_OTOOL="otool"
12961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12962    break 2
12963  fi
12964done
12965  done
12966IFS=$as_save_IFS
12967
12968fi
12969fi
12970ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
12971if test -n "$ac_ct_OTOOL"; then
12972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
12973$as_echo "$ac_ct_OTOOL" >&6; }
12974else
12975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12976$as_echo "no" >&6; }
12977fi
12978
12979  if test "x$ac_ct_OTOOL" = x; then
12980    OTOOL=":"
12981  else
12982    case $cross_compiling:$ac_tool_warned in
12983yes:)
12984{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12985$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12986ac_tool_warned=yes ;;
12987esac
12988    OTOOL=$ac_ct_OTOOL
12989  fi
12990else
12991  OTOOL="$ac_cv_prog_OTOOL"
12992fi
12993
12994    if test -n "$ac_tool_prefix"; then
12995  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
12996set dummy ${ac_tool_prefix}otool64; ac_word=$2
12997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12998$as_echo_n "checking for $ac_word... " >&6; }
12999if ${ac_cv_prog_OTOOL64+:} false; then :
13000  $as_echo_n "(cached) " >&6
13001else
13002  if test -n "$OTOOL64"; then
13003  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
13004else
13005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13006for as_dir in $PATH
13007do
13008  IFS=$as_save_IFS
13009  test -z "$as_dir" && as_dir=.
13010    for ac_exec_ext in '' $ac_executable_extensions; do
13011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13012    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
13013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13014    break 2
13015  fi
13016done
13017  done
13018IFS=$as_save_IFS
13019
13020fi
13021fi
13022OTOOL64=$ac_cv_prog_OTOOL64
13023if test -n "$OTOOL64"; then
13024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
13025$as_echo "$OTOOL64" >&6; }
13026else
13027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13028$as_echo "no" >&6; }
13029fi
13030
13031
13032fi
13033if test -z "$ac_cv_prog_OTOOL64"; then
13034  ac_ct_OTOOL64=$OTOOL64
13035  # Extract the first word of "otool64", so it can be a program name with args.
13036set dummy otool64; ac_word=$2
13037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13038$as_echo_n "checking for $ac_word... " >&6; }
13039if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
13040  $as_echo_n "(cached) " >&6
13041else
13042  if test -n "$ac_ct_OTOOL64"; then
13043  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
13044else
13045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13046for as_dir in $PATH
13047do
13048  IFS=$as_save_IFS
13049  test -z "$as_dir" && as_dir=.
13050    for ac_exec_ext in '' $ac_executable_extensions; do
13051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13052    ac_cv_prog_ac_ct_OTOOL64="otool64"
13053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13054    break 2
13055  fi
13056done
13057  done
13058IFS=$as_save_IFS
13059
13060fi
13061fi
13062ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
13063if test -n "$ac_ct_OTOOL64"; then
13064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
13065$as_echo "$ac_ct_OTOOL64" >&6; }
13066else
13067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13068$as_echo "no" >&6; }
13069fi
13070
13071  if test "x$ac_ct_OTOOL64" = x; then
13072    OTOOL64=":"
13073  else
13074    case $cross_compiling:$ac_tool_warned in
13075yes:)
13076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13078ac_tool_warned=yes ;;
13079esac
13080    OTOOL64=$ac_ct_OTOOL64
13081  fi
13082else
13083  OTOOL64="$ac_cv_prog_OTOOL64"
13084fi
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
13113$as_echo_n "checking for -single_module linker flag... " >&6; }
13114if ${lt_cv_apple_cc_single_mod+:} false; then :
13115  $as_echo_n "(cached) " >&6
13116else
13117  lt_cv_apple_cc_single_mod=no
13118      if test -z "$LT_MULTI_MODULE"; then
13119	# By default we will add the -single_module flag. You can override
13120	# by either setting the environment variable LT_MULTI_MODULE
13121	# non-empty at configure time, or by adding -multi_module to the
13122	# link flags.
13123	rm -rf libconftest.dylib*
13124	echo "int foo(void){return 1;}" > conftest.c
13125	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
13126-dynamiclib -Wl,-single_module conftest.c" >&5
13127	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
13128	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
13129        _lt_result=$?
13130	# If there is a non-empty error log, and "single_module"
13131	# appears in it, assume the flag caused a linker warning
13132        if test -s conftest.err && $GREP single_module conftest.err; then
13133	  cat conftest.err >&5
13134	# Otherwise, if the output was created with a 0 exit code from
13135	# the compiler, it worked.
13136	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
13137	  lt_cv_apple_cc_single_mod=yes
13138	else
13139	  cat conftest.err >&5
13140	fi
13141	rm -rf libconftest.dylib*
13142	rm -f conftest.*
13143      fi
13144fi
13145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
13146$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
13147
13148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
13149$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
13150if ${lt_cv_ld_exported_symbols_list+:} false; then :
13151  $as_echo_n "(cached) " >&6
13152else
13153  lt_cv_ld_exported_symbols_list=no
13154      save_LDFLAGS=$LDFLAGS
13155      echo "_main" > conftest.sym
13156      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
13157      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13158/* end confdefs.h.  */
13159
13160int
13161main ()
13162{
13163
13164  ;
13165  return 0;
13166}
13167_ACEOF
13168if ac_fn_c_try_link "$LINENO"; then :
13169  lt_cv_ld_exported_symbols_list=yes
13170else
13171  lt_cv_ld_exported_symbols_list=no
13172fi
13173rm -f core conftest.err conftest.$ac_objext \
13174    conftest$ac_exeext conftest.$ac_ext
13175	LDFLAGS=$save_LDFLAGS
13176
13177fi
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
13179$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
13180
13181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
13182$as_echo_n "checking for -force_load linker flag... " >&6; }
13183if ${lt_cv_ld_force_load+:} false; then :
13184  $as_echo_n "(cached) " >&6
13185else
13186  lt_cv_ld_force_load=no
13187      cat > conftest.c << _LT_EOF
13188int forced_loaded() { return 2;}
13189_LT_EOF
13190      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
13191      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
13192      echo "$AR cru libconftest.a conftest.o" >&5
13193      $AR cru libconftest.a conftest.o 2>&5
13194      echo "$RANLIB libconftest.a" >&5
13195      $RANLIB libconftest.a 2>&5
13196      cat > conftest.c << _LT_EOF
13197int main() { return 0;}
13198_LT_EOF
13199      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
13200      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
13201      _lt_result=$?
13202      if test -s conftest.err && $GREP force_load conftest.err; then
13203	cat conftest.err >&5
13204      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
13205	lt_cv_ld_force_load=yes
13206      else
13207	cat conftest.err >&5
13208      fi
13209        rm -f conftest.err libconftest.a conftest conftest.c
13210        rm -rf conftest.dSYM
13211
13212fi
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
13214$as_echo "$lt_cv_ld_force_load" >&6; }
13215    case $host_os in
13216    rhapsody* | darwin1.[012])
13217      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
13218    darwin1.*)
13219      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
13220    darwin*) # darwin 5.x on
13221      # if running on 10.5 or later, the deployment target defaults
13222      # to the OS version, if on x86, and 10.4, the deployment
13223      # target defaults to 10.4. Don't you love it?
13224      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
13225	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
13226	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
13227	10.[012][,.]*)
13228	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
13229	10.*)
13230	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
13231      esac
13232    ;;
13233  esac
13234    if test yes = "$lt_cv_apple_cc_single_mod"; then
13235      _lt_dar_single_mod='$single_module'
13236    fi
13237    if test yes = "$lt_cv_ld_exported_symbols_list"; then
13238      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
13239    else
13240      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
13241    fi
13242    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
13243      _lt_dsymutil='~$DSYMUTIL $lib || :'
13244    else
13245      _lt_dsymutil=
13246    fi
13247    ;;
13248  esac
13249
13250# func_munge_path_list VARIABLE PATH
13251# -----------------------------------
13252# VARIABLE is name of variable containing _space_ separated list of
13253# directories to be munged by the contents of PATH, which is string
13254# having a format:
13255# "DIR[:DIR]:"
13256#       string "DIR[ DIR]" will be prepended to VARIABLE
13257# ":DIR[:DIR]"
13258#       string "DIR[ DIR]" will be appended to VARIABLE
13259# "DIRP[:DIRP]::[DIRA:]DIRA"
13260#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
13261#       "DIRA[ DIRA]" will be appended to VARIABLE
13262# "DIR[:DIR]"
13263#       VARIABLE will be replaced by "DIR[ DIR]"
13264func_munge_path_list ()
13265{
13266    case x$2 in
13267    x)
13268        ;;
13269    *:)
13270        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
13271        ;;
13272    x:*)
13273        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
13274        ;;
13275    *::*)
13276        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
13277        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
13278        ;;
13279    *)
13280        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
13281        ;;
13282    esac
13283}
13284
13285for ac_header in dlfcn.h
13286do :
13287  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
13288"
13289if test "x$ac_cv_header_dlfcn_h" = xyes; then :
13290  cat >>confdefs.h <<_ACEOF
13291#define HAVE_DLFCN_H 1
13292_ACEOF
13293
13294fi
13295
13296done
13297
13298
13299
13300
13301
13302# Set options
13303enable_win32_dll=yes
13304
13305case $host in
13306*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
13307  if test -n "$ac_tool_prefix"; then
13308  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
13309set dummy ${ac_tool_prefix}as; ac_word=$2
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13311$as_echo_n "checking for $ac_word... " >&6; }
13312if ${ac_cv_prog_AS+:} false; then :
13313  $as_echo_n "(cached) " >&6
13314else
13315  if test -n "$AS"; then
13316  ac_cv_prog_AS="$AS" # Let the user override the test.
13317else
13318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13319for as_dir in $PATH
13320do
13321  IFS=$as_save_IFS
13322  test -z "$as_dir" && as_dir=.
13323    for ac_exec_ext in '' $ac_executable_extensions; do
13324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13325    ac_cv_prog_AS="${ac_tool_prefix}as"
13326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13327    break 2
13328  fi
13329done
13330  done
13331IFS=$as_save_IFS
13332
13333fi
13334fi
13335AS=$ac_cv_prog_AS
13336if test -n "$AS"; then
13337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
13338$as_echo "$AS" >&6; }
13339else
13340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13341$as_echo "no" >&6; }
13342fi
13343
13344
13345fi
13346if test -z "$ac_cv_prog_AS"; then
13347  ac_ct_AS=$AS
13348  # Extract the first word of "as", so it can be a program name with args.
13349set dummy as; ac_word=$2
13350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13351$as_echo_n "checking for $ac_word... " >&6; }
13352if ${ac_cv_prog_ac_ct_AS+:} false; then :
13353  $as_echo_n "(cached) " >&6
13354else
13355  if test -n "$ac_ct_AS"; then
13356  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
13357else
13358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13359for as_dir in $PATH
13360do
13361  IFS=$as_save_IFS
13362  test -z "$as_dir" && as_dir=.
13363    for ac_exec_ext in '' $ac_executable_extensions; do
13364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13365    ac_cv_prog_ac_ct_AS="as"
13366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13367    break 2
13368  fi
13369done
13370  done
13371IFS=$as_save_IFS
13372
13373fi
13374fi
13375ac_ct_AS=$ac_cv_prog_ac_ct_AS
13376if test -n "$ac_ct_AS"; then
13377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
13378$as_echo "$ac_ct_AS" >&6; }
13379else
13380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13381$as_echo "no" >&6; }
13382fi
13383
13384  if test "x$ac_ct_AS" = x; then
13385    AS="false"
13386  else
13387    case $cross_compiling:$ac_tool_warned in
13388yes:)
13389{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13390$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13391ac_tool_warned=yes ;;
13392esac
13393    AS=$ac_ct_AS
13394  fi
13395else
13396  AS="$ac_cv_prog_AS"
13397fi
13398
13399  if test -n "$ac_tool_prefix"; then
13400  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
13401set dummy ${ac_tool_prefix}dlltool; ac_word=$2
13402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13403$as_echo_n "checking for $ac_word... " >&6; }
13404if ${ac_cv_prog_DLLTOOL+:} false; then :
13405  $as_echo_n "(cached) " >&6
13406else
13407  if test -n "$DLLTOOL"; then
13408  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
13409else
13410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13411for as_dir in $PATH
13412do
13413  IFS=$as_save_IFS
13414  test -z "$as_dir" && as_dir=.
13415    for ac_exec_ext in '' $ac_executable_extensions; do
13416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13417    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
13418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13419    break 2
13420  fi
13421done
13422  done
13423IFS=$as_save_IFS
13424
13425fi
13426fi
13427DLLTOOL=$ac_cv_prog_DLLTOOL
13428if test -n "$DLLTOOL"; then
13429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
13430$as_echo "$DLLTOOL" >&6; }
13431else
13432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13433$as_echo "no" >&6; }
13434fi
13435
13436
13437fi
13438if test -z "$ac_cv_prog_DLLTOOL"; then
13439  ac_ct_DLLTOOL=$DLLTOOL
13440  # Extract the first word of "dlltool", so it can be a program name with args.
13441set dummy dlltool; ac_word=$2
13442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13443$as_echo_n "checking for $ac_word... " >&6; }
13444if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
13445  $as_echo_n "(cached) " >&6
13446else
13447  if test -n "$ac_ct_DLLTOOL"; then
13448  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
13449else
13450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13451for as_dir in $PATH
13452do
13453  IFS=$as_save_IFS
13454  test -z "$as_dir" && as_dir=.
13455    for ac_exec_ext in '' $ac_executable_extensions; do
13456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13457    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
13458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13459    break 2
13460  fi
13461done
13462  done
13463IFS=$as_save_IFS
13464
13465fi
13466fi
13467ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
13468if test -n "$ac_ct_DLLTOOL"; then
13469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
13470$as_echo "$ac_ct_DLLTOOL" >&6; }
13471else
13472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13473$as_echo "no" >&6; }
13474fi
13475
13476  if test "x$ac_ct_DLLTOOL" = x; then
13477    DLLTOOL="false"
13478  else
13479    case $cross_compiling:$ac_tool_warned in
13480yes:)
13481{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13482$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13483ac_tool_warned=yes ;;
13484esac
13485    DLLTOOL=$ac_ct_DLLTOOL
13486  fi
13487else
13488  DLLTOOL="$ac_cv_prog_DLLTOOL"
13489fi
13490
13491  if test -n "$ac_tool_prefix"; then
13492  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
13493set dummy ${ac_tool_prefix}objdump; ac_word=$2
13494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13495$as_echo_n "checking for $ac_word... " >&6; }
13496if ${ac_cv_prog_OBJDUMP+:} false; then :
13497  $as_echo_n "(cached) " >&6
13498else
13499  if test -n "$OBJDUMP"; then
13500  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
13501else
13502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13503for as_dir in $PATH
13504do
13505  IFS=$as_save_IFS
13506  test -z "$as_dir" && as_dir=.
13507    for ac_exec_ext in '' $ac_executable_extensions; do
13508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13509    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
13510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13511    break 2
13512  fi
13513done
13514  done
13515IFS=$as_save_IFS
13516
13517fi
13518fi
13519OBJDUMP=$ac_cv_prog_OBJDUMP
13520if test -n "$OBJDUMP"; then
13521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
13522$as_echo "$OBJDUMP" >&6; }
13523else
13524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13525$as_echo "no" >&6; }
13526fi
13527
13528
13529fi
13530if test -z "$ac_cv_prog_OBJDUMP"; then
13531  ac_ct_OBJDUMP=$OBJDUMP
13532  # Extract the first word of "objdump", so it can be a program name with args.
13533set dummy objdump; ac_word=$2
13534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13535$as_echo_n "checking for $ac_word... " >&6; }
13536if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
13537  $as_echo_n "(cached) " >&6
13538else
13539  if test -n "$ac_ct_OBJDUMP"; then
13540  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
13541else
13542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13543for as_dir in $PATH
13544do
13545  IFS=$as_save_IFS
13546  test -z "$as_dir" && as_dir=.
13547    for ac_exec_ext in '' $ac_executable_extensions; do
13548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13549    ac_cv_prog_ac_ct_OBJDUMP="objdump"
13550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13551    break 2
13552  fi
13553done
13554  done
13555IFS=$as_save_IFS
13556
13557fi
13558fi
13559ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
13560if test -n "$ac_ct_OBJDUMP"; then
13561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
13562$as_echo "$ac_ct_OBJDUMP" >&6; }
13563else
13564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13565$as_echo "no" >&6; }
13566fi
13567
13568  if test "x$ac_ct_OBJDUMP" = x; then
13569    OBJDUMP="false"
13570  else
13571    case $cross_compiling:$ac_tool_warned in
13572yes:)
13573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13575ac_tool_warned=yes ;;
13576esac
13577    OBJDUMP=$ac_ct_OBJDUMP
13578  fi
13579else
13580  OBJDUMP="$ac_cv_prog_OBJDUMP"
13581fi
13582
13583  ;;
13584esac
13585
13586test -z "$AS" && AS=as
13587
13588
13589
13590
13591
13592test -z "$DLLTOOL" && DLLTOOL=dlltool
13593
13594
13595
13596
13597
13598test -z "$OBJDUMP" && OBJDUMP=objdump
13599
13600
13601
13602
13603
13604
13605
13606        enable_dlopen=no
13607
13608
13609
13610            # Check whether --enable-shared was given.
13611if test "${enable_shared+set}" = set; then :
13612  enableval=$enable_shared; p=${PACKAGE-default}
13613    case $enableval in
13614    yes) enable_shared=yes ;;
13615    no) enable_shared=no ;;
13616    *)
13617      enable_shared=no
13618      # Look at the argument we got.  We use all the common list separators.
13619      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
13620      for pkg in $enableval; do
13621	IFS=$lt_save_ifs
13622	if test "X$pkg" = "X$p"; then
13623	  enable_shared=yes
13624	fi
13625      done
13626      IFS=$lt_save_ifs
13627      ;;
13628    esac
13629else
13630  enable_shared=yes
13631fi
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641  # Check whether --enable-static was given.
13642if test "${enable_static+set}" = set; then :
13643  enableval=$enable_static; p=${PACKAGE-default}
13644    case $enableval in
13645    yes) enable_static=yes ;;
13646    no) enable_static=no ;;
13647    *)
13648     enable_static=no
13649      # Look at the argument we got.  We use all the common list separators.
13650      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
13651      for pkg in $enableval; do
13652	IFS=$lt_save_ifs
13653	if test "X$pkg" = "X$p"; then
13654	  enable_static=yes
13655	fi
13656      done
13657      IFS=$lt_save_ifs
13658      ;;
13659    esac
13660else
13661  enable_static=yes
13662fi
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673# Check whether --with-pic was given.
13674if test "${with_pic+set}" = set; then :
13675  withval=$with_pic; lt_p=${PACKAGE-default}
13676    case $withval in
13677    yes|no) pic_mode=$withval ;;
13678    *)
13679      pic_mode=default
13680      # Look at the argument we got.  We use all the common list separators.
13681      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
13682      for lt_pkg in $withval; do
13683	IFS=$lt_save_ifs
13684	if test "X$lt_pkg" = "X$lt_p"; then
13685	  pic_mode=yes
13686	fi
13687      done
13688      IFS=$lt_save_ifs
13689      ;;
13690    esac
13691else
13692  pic_mode=default
13693fi
13694
13695
13696
13697
13698
13699
13700
13701
13702  # Check whether --enable-fast-install was given.
13703if test "${enable_fast_install+set}" = set; then :
13704  enableval=$enable_fast_install; p=${PACKAGE-default}
13705    case $enableval in
13706    yes) enable_fast_install=yes ;;
13707    no) enable_fast_install=no ;;
13708    *)
13709      enable_fast_install=no
13710      # Look at the argument we got.  We use all the common list separators.
13711      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
13712      for pkg in $enableval; do
13713	IFS=$lt_save_ifs
13714	if test "X$pkg" = "X$p"; then
13715	  enable_fast_install=yes
13716	fi
13717      done
13718      IFS=$lt_save_ifs
13719      ;;
13720    esac
13721else
13722  enable_fast_install=yes
13723fi
13724
13725
13726
13727
13728
13729
13730
13731
13732  shared_archive_member_spec=
13733case $host,$enable_shared in
13734power*-*-aix[5-9]*,yes)
13735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
13736$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
13737
13738# Check whether --with-aix-soname was given.
13739if test "${with_aix_soname+set}" = set; then :
13740  withval=$with_aix_soname; case $withval in
13741    aix|svr4|both)
13742      ;;
13743    *)
13744      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
13745      ;;
13746    esac
13747    lt_cv_with_aix_soname=$with_aix_soname
13748else
13749  if ${lt_cv_with_aix_soname+:} false; then :
13750  $as_echo_n "(cached) " >&6
13751else
13752  lt_cv_with_aix_soname=aix
13753fi
13754
13755    with_aix_soname=$lt_cv_with_aix_soname
13756fi
13757
13758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
13759$as_echo "$with_aix_soname" >&6; }
13760  if test aix != "$with_aix_soname"; then
13761    # For the AIX way of multilib, we name the shared archive member
13762    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
13763    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
13764    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
13765    # the AIX toolchain works better with OBJECT_MODE set (default 32).
13766    if test 64 = "${OBJECT_MODE-32}"; then
13767      shared_archive_member_spec=shr_64
13768    else
13769      shared_archive_member_spec=shr
13770    fi
13771  fi
13772  ;;
13773*)
13774  with_aix_soname=aix
13775  ;;
13776esac
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787# This can be used to rebuild libtool when needed
13788LIBTOOL_DEPS=$ltmain
13789
13790# Always use our own libtool.
13791LIBTOOL="${CONFIG_SHELL-$SHELL} "'$(top_builddir)/libtool'
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822test -z "$LN_S" && LN_S="ln -s"
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837if test -n "${ZSH_VERSION+set}"; then
13838   setopt NO_GLOB_SUBST
13839fi
13840
13841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
13842$as_echo_n "checking for objdir... " >&6; }
13843if ${lt_cv_objdir+:} false; then :
13844  $as_echo_n "(cached) " >&6
13845else
13846  rm -f .libs 2>/dev/null
13847mkdir .libs 2>/dev/null
13848if test -d .libs; then
13849  lt_cv_objdir=.libs
13850else
13851  # MS-DOS does not allow filenames that begin with a dot.
13852  lt_cv_objdir=_libs
13853fi
13854rmdir .libs 2>/dev/null
13855fi
13856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
13857$as_echo "$lt_cv_objdir" >&6; }
13858objdir=$lt_cv_objdir
13859
13860
13861
13862
13863
13864cat >>confdefs.h <<_ACEOF
13865#define LT_OBJDIR "$lt_cv_objdir/"
13866_ACEOF
13867
13868
13869
13870
13871case $host_os in
13872aix3*)
13873  # AIX sometimes has problems with the GCC collect2 program.  For some
13874  # reason, if we set the COLLECT_NAMES environment variable, the problems
13875  # vanish in a puff of smoke.
13876  if test set != "${COLLECT_NAMES+set}"; then
13877    COLLECT_NAMES=
13878    export COLLECT_NAMES
13879  fi
13880  ;;
13881esac
13882
13883# Global variables:
13884ofile=libtool
13885can_build_shared=yes
13886
13887# All known linkers require a '.a' archive for static linking (except MSVC,
13888# which needs '.lib').
13889libext=a
13890
13891with_gnu_ld=$lt_cv_prog_gnu_ld
13892
13893old_CC=$CC
13894old_CFLAGS=$CFLAGS
13895
13896# Set sane defaults for various variables
13897test -z "$CC" && CC=cc
13898test -z "$LTCC" && LTCC=$CC
13899test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
13900test -z "$LD" && LD=ld
13901test -z "$ac_objext" && ac_objext=o
13902
13903func_cc_basename $compiler
13904cc_basename=$func_cc_basename_result
13905
13906
13907# Only perform the check for file, if the check method requires it
13908test -z "$MAGIC_CMD" && MAGIC_CMD=file
13909case $deplibs_check_method in
13910file_magic*)
13911  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
13912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
13913$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
13914if ${lt_cv_path_MAGIC_CMD+:} false; then :
13915  $as_echo_n "(cached) " >&6
13916else
13917  case $MAGIC_CMD in
13918[\\/*] |  ?:[\\/]*)
13919  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
13920  ;;
13921*)
13922  lt_save_MAGIC_CMD=$MAGIC_CMD
13923  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
13924  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
13925  for ac_dir in $ac_dummy; do
13926    IFS=$lt_save_ifs
13927    test -z "$ac_dir" && ac_dir=.
13928    if test -f "$ac_dir/${ac_tool_prefix}file"; then
13929      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
13930      if test -n "$file_magic_test_file"; then
13931	case $deplibs_check_method in
13932	"file_magic "*)
13933	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
13934	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
13935	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
13936	    $EGREP "$file_magic_regex" > /dev/null; then
13937	    :
13938	  else
13939	    cat <<_LT_EOF 1>&2
13940
13941*** Warning: the command libtool uses to detect shared libraries,
13942*** $file_magic_cmd, produces output that libtool cannot recognize.
13943*** The result is that libtool may fail to recognize shared libraries
13944*** as such.  This will affect the creation of libtool libraries that
13945*** depend on shared libraries, but programs linked with such libtool
13946*** libraries will work regardless of this problem.  Nevertheless, you
13947*** may want to report the problem to your system manager and/or to
13948*** bug-libtool@gnu.org
13949
13950_LT_EOF
13951	  fi ;;
13952	esac
13953      fi
13954      break
13955    fi
13956  done
13957  IFS=$lt_save_ifs
13958  MAGIC_CMD=$lt_save_MAGIC_CMD
13959  ;;
13960esac
13961fi
13962
13963MAGIC_CMD=$lt_cv_path_MAGIC_CMD
13964if test -n "$MAGIC_CMD"; then
13965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
13966$as_echo "$MAGIC_CMD" >&6; }
13967else
13968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13969$as_echo "no" >&6; }
13970fi
13971
13972
13973
13974
13975
13976if test -z "$lt_cv_path_MAGIC_CMD"; then
13977  if test -n "$ac_tool_prefix"; then
13978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
13979$as_echo_n "checking for file... " >&6; }
13980if ${lt_cv_path_MAGIC_CMD+:} false; then :
13981  $as_echo_n "(cached) " >&6
13982else
13983  case $MAGIC_CMD in
13984[\\/*] |  ?:[\\/]*)
13985  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
13986  ;;
13987*)
13988  lt_save_MAGIC_CMD=$MAGIC_CMD
13989  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
13990  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
13991  for ac_dir in $ac_dummy; do
13992    IFS=$lt_save_ifs
13993    test -z "$ac_dir" && ac_dir=.
13994    if test -f "$ac_dir/file"; then
13995      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
13996      if test -n "$file_magic_test_file"; then
13997	case $deplibs_check_method in
13998	"file_magic "*)
13999	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
14000	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
14001	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
14002	    $EGREP "$file_magic_regex" > /dev/null; then
14003	    :
14004	  else
14005	    cat <<_LT_EOF 1>&2
14006
14007*** Warning: the command libtool uses to detect shared libraries,
14008*** $file_magic_cmd, produces output that libtool cannot recognize.
14009*** The result is that libtool may fail to recognize shared libraries
14010*** as such.  This will affect the creation of libtool libraries that
14011*** depend on shared libraries, but programs linked with such libtool
14012*** libraries will work regardless of this problem.  Nevertheless, you
14013*** may want to report the problem to your system manager and/or to
14014*** bug-libtool@gnu.org
14015
14016_LT_EOF
14017	  fi ;;
14018	esac
14019      fi
14020      break
14021    fi
14022  done
14023  IFS=$lt_save_ifs
14024  MAGIC_CMD=$lt_save_MAGIC_CMD
14025  ;;
14026esac
14027fi
14028
14029MAGIC_CMD=$lt_cv_path_MAGIC_CMD
14030if test -n "$MAGIC_CMD"; then
14031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
14032$as_echo "$MAGIC_CMD" >&6; }
14033else
14034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14035$as_echo "no" >&6; }
14036fi
14037
14038
14039  else
14040    MAGIC_CMD=:
14041  fi
14042fi
14043
14044  fi
14045  ;;
14046esac
14047
14048# Use C for the default configuration in the libtool script
14049
14050lt_save_CC=$CC
14051ac_ext=c
14052ac_cpp='$CPP $CPPFLAGS'
14053ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14054ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14055ac_compiler_gnu=$ac_cv_c_compiler_gnu
14056
14057
14058# Source file extension for C test sources.
14059ac_ext=c
14060
14061# Object file extension for compiled C test sources.
14062objext=o
14063objext=$objext
14064
14065# Code to be used in simple compile tests
14066lt_simple_compile_test_code="int some_variable = 0;"
14067
14068# Code to be used in simple link tests
14069lt_simple_link_test_code='int main(){return(0);}'
14070
14071
14072
14073
14074
14075
14076
14077# If no C compiler was specified, use CC.
14078LTCC=${LTCC-"$CC"}
14079
14080# If no C compiler flags were specified, use CFLAGS.
14081LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
14082
14083# Allow CC to be a program name with arguments.
14084compiler=$CC
14085
14086# Save the default compiler, since it gets overwritten when the other
14087# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
14088compiler_DEFAULT=$CC
14089
14090# save warnings/boilerplate of simple test code
14091ac_outfile=conftest.$ac_objext
14092echo "$lt_simple_compile_test_code" >conftest.$ac_ext
14093eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14094_lt_compiler_boilerplate=`cat conftest.err`
14095$RM conftest*
14096
14097ac_outfile=conftest.$ac_objext
14098echo "$lt_simple_link_test_code" >conftest.$ac_ext
14099eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14100_lt_linker_boilerplate=`cat conftest.err`
14101$RM -r conftest*
14102
14103
14104## CAVEAT EMPTOR:
14105## There is no encapsulation within the following macros, do not change
14106## the running order or otherwise move them around unless you know exactly
14107## what you are doing...
14108if test -n "$compiler"; then
14109
14110lt_prog_compiler_no_builtin_flag=
14111
14112if test yes = "$GCC"; then
14113  case $cc_basename in
14114  nvcc*)
14115    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
14116  *)
14117    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
14118  esac
14119
14120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
14121$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
14122if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
14123  $as_echo_n "(cached) " >&6
14124else
14125  lt_cv_prog_compiler_rtti_exceptions=no
14126   ac_outfile=conftest.$ac_objext
14127   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14128   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
14129   # Insert the option either (1) after the last *FLAGS variable, or
14130   # (2) before a word containing "conftest.", or (3) at the end.
14131   # Note that $ac_compile itself does not contain backslashes and begins
14132   # with a dollar sign (not a hyphen), so the echo should work correctly.
14133   # The option is referenced via a variable to avoid confusing sed.
14134   lt_compile=`echo "$ac_compile" | $SED \
14135   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14136   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14137   -e 's:$: $lt_compiler_flag:'`
14138   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
14139   (eval "$lt_compile" 2>conftest.err)
14140   ac_status=$?
14141   cat conftest.err >&5
14142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14143   if (exit $ac_status) && test -s "$ac_outfile"; then
14144     # The compiler can only warn and ignore the option if not recognized
14145     # So say no if there are warnings other than the usual output.
14146     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
14147     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14148     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14149       lt_cv_prog_compiler_rtti_exceptions=yes
14150     fi
14151   fi
14152   $RM conftest*
14153
14154fi
14155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
14156$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
14157
14158if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
14159    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
14160else
14161    :
14162fi
14163
14164fi
14165
14166
14167
14168
14169
14170
14171  lt_prog_compiler_wl=
14172lt_prog_compiler_pic=
14173lt_prog_compiler_static=
14174
14175
14176  if test yes = "$GCC"; then
14177    lt_prog_compiler_wl='-Wl,'
14178    lt_prog_compiler_static='-static'
14179
14180    case $host_os in
14181      aix*)
14182      # All AIX code is PIC.
14183      if test ia64 = "$host_cpu"; then
14184	# AIX 5 now supports IA64 processor
14185	lt_prog_compiler_static='-Bstatic'
14186      fi
14187      lt_prog_compiler_pic='-fPIC'
14188      ;;
14189
14190    amigaos*)
14191      case $host_cpu in
14192      powerpc)
14193            # see comment about AmigaOS4 .so support
14194            lt_prog_compiler_pic='-fPIC'
14195        ;;
14196      m68k)
14197            # FIXME: we need at least 68020 code to build shared libraries, but
14198            # adding the '-m68020' flag to GCC prevents building anything better,
14199            # like '-m68040'.
14200            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
14201        ;;
14202      esac
14203      ;;
14204
14205    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
14206      # PIC is the default for these OSes.
14207      ;;
14208
14209    mingw* | cygwin* | pw32* | os2* | cegcc*)
14210      # This hack is so that the source file can tell whether it is being
14211      # built for inclusion in a dll (and should export symbols for example).
14212      # Although the cygwin gcc ignores -fPIC, still need this for old-style
14213      # (--disable-auto-import) libraries
14214      lt_prog_compiler_pic='-DDLL_EXPORT'
14215      case $host_os in
14216      os2*)
14217	lt_prog_compiler_static='$wl-static'
14218	;;
14219      esac
14220      ;;
14221
14222    darwin* | rhapsody*)
14223      # PIC is the default on this platform
14224      # Common symbols not allowed in MH_DYLIB files
14225      lt_prog_compiler_pic='-fno-common'
14226      ;;
14227
14228    haiku*)
14229      # PIC is the default for Haiku.
14230      # The "-static" flag exists, but is broken.
14231      lt_prog_compiler_static=
14232      ;;
14233
14234    hpux*)
14235      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
14236      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
14237      # sets the default TLS model and affects inlining.
14238      case $host_cpu in
14239      hppa*64*)
14240	# +Z the default
14241	;;
14242      *)
14243	lt_prog_compiler_pic='-fPIC'
14244	;;
14245      esac
14246      ;;
14247
14248    interix[3-9]*)
14249      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
14250      # Instead, we relocate shared libraries at runtime.
14251      ;;
14252
14253    msdosdjgpp*)
14254      # Just because we use GCC doesn't mean we suddenly get shared libraries
14255      # on systems that don't support them.
14256      lt_prog_compiler_can_build_shared=no
14257      enable_shared=no
14258      ;;
14259
14260    *nto* | *qnx*)
14261      # QNX uses GNU C++, but need to define -shared option too, otherwise
14262      # it will coredump.
14263      lt_prog_compiler_pic='-fPIC -shared'
14264      ;;
14265
14266    sysv4*MP*)
14267      if test -d /usr/nec; then
14268	lt_prog_compiler_pic=-Kconform_pic
14269      fi
14270      ;;
14271
14272    *)
14273      lt_prog_compiler_pic='-fPIC'
14274      ;;
14275    esac
14276
14277    case $cc_basename in
14278    nvcc*) # Cuda Compiler Driver 2.2
14279      lt_prog_compiler_wl='-Xlinker '
14280      if test -n "$lt_prog_compiler_pic"; then
14281        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
14282      fi
14283      ;;
14284    esac
14285  else
14286    # PORTME Check for flag to pass linker flags through the system compiler.
14287    case $host_os in
14288    aix*)
14289      lt_prog_compiler_wl='-Wl,'
14290      if test ia64 = "$host_cpu"; then
14291	# AIX 5 now supports IA64 processor
14292	lt_prog_compiler_static='-Bstatic'
14293      else
14294	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
14295      fi
14296      ;;
14297
14298    darwin* | rhapsody*)
14299      # PIC is the default on this platform
14300      # Common symbols not allowed in MH_DYLIB files
14301      lt_prog_compiler_pic='-fno-common'
14302      case $cc_basename in
14303      nagfor*)
14304        # NAG Fortran compiler
14305        lt_prog_compiler_wl='-Wl,-Wl,,'
14306        lt_prog_compiler_pic='-PIC'
14307        lt_prog_compiler_static='-Bstatic'
14308        ;;
14309      esac
14310      ;;
14311
14312    mingw* | cygwin* | pw32* | os2* | cegcc*)
14313      # This hack is so that the source file can tell whether it is being
14314      # built for inclusion in a dll (and should export symbols for example).
14315      lt_prog_compiler_pic='-DDLL_EXPORT'
14316      case $host_os in
14317      os2*)
14318	lt_prog_compiler_static='$wl-static'
14319	;;
14320      esac
14321      ;;
14322
14323    hpux9* | hpux10* | hpux11*)
14324      lt_prog_compiler_wl='-Wl,'
14325      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
14326      # not for PA HP-UX.
14327      case $host_cpu in
14328      hppa*64*|ia64*)
14329	# +Z the default
14330	;;
14331      *)
14332	lt_prog_compiler_pic='+Z'
14333	;;
14334      esac
14335      # Is there a better lt_prog_compiler_static that works with the bundled CC?
14336      lt_prog_compiler_static='$wl-a ${wl}archive'
14337      ;;
14338
14339    irix5* | irix6* | nonstopux*)
14340      lt_prog_compiler_wl='-Wl,'
14341      # PIC (with -KPIC) is the default.
14342      lt_prog_compiler_static='-non_shared'
14343      ;;
14344
14345    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14346      case $cc_basename in
14347      # old Intel for x86_64, which still supported -KPIC.
14348      ecc*)
14349	lt_prog_compiler_wl='-Wl,'
14350	lt_prog_compiler_pic='-KPIC'
14351	lt_prog_compiler_static='-static'
14352        ;;
14353      # icc used to be incompatible with GCC.
14354      # ICC 10 doesn't accept -KPIC any more.
14355      icc* | ifort*)
14356	lt_prog_compiler_wl='-Wl,'
14357	lt_prog_compiler_pic='-fPIC'
14358	lt_prog_compiler_static='-static'
14359        ;;
14360      # Lahey Fortran 8.1.
14361      lf95*)
14362	lt_prog_compiler_wl='-Wl,'
14363	lt_prog_compiler_pic='--shared'
14364	lt_prog_compiler_static='--static'
14365	;;
14366      nagfor*)
14367	# NAG Fortran compiler
14368	lt_prog_compiler_wl='-Wl,-Wl,,'
14369	lt_prog_compiler_pic='-PIC'
14370	lt_prog_compiler_static='-Bstatic'
14371	;;
14372      tcc*)
14373	# Fabrice Bellard et al's Tiny C Compiler
14374	lt_prog_compiler_wl='-Wl,'
14375	lt_prog_compiler_pic='-fPIC'
14376	lt_prog_compiler_static='-static'
14377	;;
14378      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
14379        # Portland Group compilers (*not* the Pentium gcc compiler,
14380	# which looks to be a dead project)
14381	lt_prog_compiler_wl='-Wl,'
14382	lt_prog_compiler_pic='-fpic'
14383	lt_prog_compiler_static='-Bstatic'
14384        ;;
14385      ccc*)
14386        lt_prog_compiler_wl='-Wl,'
14387        # All Alpha code is PIC.
14388        lt_prog_compiler_static='-non_shared'
14389        ;;
14390      xl* | bgxl* | bgf* | mpixl*)
14391	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
14392	lt_prog_compiler_wl='-Wl,'
14393	lt_prog_compiler_pic='-qpic'
14394	lt_prog_compiler_static='-qstaticlink'
14395	;;
14396      *)
14397	case `$CC -V 2>&1 | sed 5q` in
14398	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
14399	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
14400	  lt_prog_compiler_pic='-KPIC'
14401	  lt_prog_compiler_static='-Bstatic'
14402	  lt_prog_compiler_wl=''
14403	  ;;
14404	*Sun\ F* | *Sun*Fortran*)
14405	  lt_prog_compiler_pic='-KPIC'
14406	  lt_prog_compiler_static='-Bstatic'
14407	  lt_prog_compiler_wl='-Qoption ld '
14408	  ;;
14409	*Sun\ C*)
14410	  # Sun C 5.9
14411	  lt_prog_compiler_pic='-KPIC'
14412	  lt_prog_compiler_static='-Bstatic'
14413	  lt_prog_compiler_wl='-Wl,'
14414	  ;;
14415        *Intel*\ [CF]*Compiler*)
14416	  lt_prog_compiler_wl='-Wl,'
14417	  lt_prog_compiler_pic='-fPIC'
14418	  lt_prog_compiler_static='-static'
14419	  ;;
14420	*Portland\ Group*)
14421	  lt_prog_compiler_wl='-Wl,'
14422	  lt_prog_compiler_pic='-fpic'
14423	  lt_prog_compiler_static='-Bstatic'
14424	  ;;
14425	esac
14426	;;
14427      esac
14428      ;;
14429
14430    newsos6)
14431      lt_prog_compiler_pic='-KPIC'
14432      lt_prog_compiler_static='-Bstatic'
14433      ;;
14434
14435    *nto* | *qnx*)
14436      # QNX uses GNU C++, but need to define -shared option too, otherwise
14437      # it will coredump.
14438      lt_prog_compiler_pic='-fPIC -shared'
14439      ;;
14440
14441    osf3* | osf4* | osf5*)
14442      lt_prog_compiler_wl='-Wl,'
14443      # All OSF/1 code is PIC.
14444      lt_prog_compiler_static='-non_shared'
14445      ;;
14446
14447    rdos*)
14448      lt_prog_compiler_static='-non_shared'
14449      ;;
14450
14451    solaris*)
14452      lt_prog_compiler_pic='-KPIC'
14453      lt_prog_compiler_static='-Bstatic'
14454      case $cc_basename in
14455      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
14456	lt_prog_compiler_wl='-Qoption ld ';;
14457      *)
14458	lt_prog_compiler_wl='-Wl,';;
14459      esac
14460      ;;
14461
14462    sunos4*)
14463      lt_prog_compiler_wl='-Qoption ld '
14464      lt_prog_compiler_pic='-PIC'
14465      lt_prog_compiler_static='-Bstatic'
14466      ;;
14467
14468    sysv4 | sysv4.2uw2* | sysv4.3*)
14469      lt_prog_compiler_wl='-Wl,'
14470      lt_prog_compiler_pic='-KPIC'
14471      lt_prog_compiler_static='-Bstatic'
14472      ;;
14473
14474    sysv4*MP*)
14475      if test -d /usr/nec; then
14476	lt_prog_compiler_pic='-Kconform_pic'
14477	lt_prog_compiler_static='-Bstatic'
14478      fi
14479      ;;
14480
14481    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
14482      lt_prog_compiler_wl='-Wl,'
14483      lt_prog_compiler_pic='-KPIC'
14484      lt_prog_compiler_static='-Bstatic'
14485      ;;
14486
14487    unicos*)
14488      lt_prog_compiler_wl='-Wl,'
14489      lt_prog_compiler_can_build_shared=no
14490      ;;
14491
14492    uts4*)
14493      lt_prog_compiler_pic='-pic'
14494      lt_prog_compiler_static='-Bstatic'
14495      ;;
14496
14497    *)
14498      lt_prog_compiler_can_build_shared=no
14499      ;;
14500    esac
14501  fi
14502
14503case $host_os in
14504  # For platforms that do not support PIC, -DPIC is meaningless:
14505  *djgpp*)
14506    lt_prog_compiler_pic=
14507    ;;
14508  *)
14509    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
14510    ;;
14511esac
14512
14513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
14514$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
14515if ${lt_cv_prog_compiler_pic+:} false; then :
14516  $as_echo_n "(cached) " >&6
14517else
14518  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
14519fi
14520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
14521$as_echo "$lt_cv_prog_compiler_pic" >&6; }
14522lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
14523
14524#
14525# Check to make sure the PIC flag actually works.
14526#
14527if test -n "$lt_prog_compiler_pic"; then
14528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
14529$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
14530if ${lt_cv_prog_compiler_pic_works+:} false; then :
14531  $as_echo_n "(cached) " >&6
14532else
14533  lt_cv_prog_compiler_pic_works=no
14534   ac_outfile=conftest.$ac_objext
14535   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14536   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
14537   # Insert the option either (1) after the last *FLAGS variable, or
14538   # (2) before a word containing "conftest.", or (3) at the end.
14539   # Note that $ac_compile itself does not contain backslashes and begins
14540   # with a dollar sign (not a hyphen), so the echo should work correctly.
14541   # The option is referenced via a variable to avoid confusing sed.
14542   lt_compile=`echo "$ac_compile" | $SED \
14543   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14544   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14545   -e 's:$: $lt_compiler_flag:'`
14546   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
14547   (eval "$lt_compile" 2>conftest.err)
14548   ac_status=$?
14549   cat conftest.err >&5
14550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551   if (exit $ac_status) && test -s "$ac_outfile"; then
14552     # The compiler can only warn and ignore the option if not recognized
14553     # So say no if there are warnings other than the usual output.
14554     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
14555     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14556     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14557       lt_cv_prog_compiler_pic_works=yes
14558     fi
14559   fi
14560   $RM conftest*
14561
14562fi
14563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
14564$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
14565
14566if test yes = "$lt_cv_prog_compiler_pic_works"; then
14567    case $lt_prog_compiler_pic in
14568     "" | " "*) ;;
14569     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
14570     esac
14571else
14572    lt_prog_compiler_pic=
14573     lt_prog_compiler_can_build_shared=no
14574fi
14575
14576fi
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588#
14589# Check to make sure the static flag actually works.
14590#
14591wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
14592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
14593$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
14594if ${lt_cv_prog_compiler_static_works+:} false; then :
14595  $as_echo_n "(cached) " >&6
14596else
14597  lt_cv_prog_compiler_static_works=no
14598   save_LDFLAGS=$LDFLAGS
14599   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
14600   echo "$lt_simple_link_test_code" > conftest.$ac_ext
14601   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14602     # The linker can only warn and ignore the option if not recognized
14603     # So say no if there are warnings
14604     if test -s conftest.err; then
14605       # Append any errors to the config.log.
14606       cat conftest.err 1>&5
14607       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
14608       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14609       if diff conftest.exp conftest.er2 >/dev/null; then
14610         lt_cv_prog_compiler_static_works=yes
14611       fi
14612     else
14613       lt_cv_prog_compiler_static_works=yes
14614     fi
14615   fi
14616   $RM -r conftest*
14617   LDFLAGS=$save_LDFLAGS
14618
14619fi
14620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
14621$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
14622
14623if test yes = "$lt_cv_prog_compiler_static_works"; then
14624    :
14625else
14626    lt_prog_compiler_static=
14627fi
14628
14629
14630
14631
14632
14633
14634
14635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14636$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14637if ${lt_cv_prog_compiler_c_o+:} false; then :
14638  $as_echo_n "(cached) " >&6
14639else
14640  lt_cv_prog_compiler_c_o=no
14641   $RM -r conftest 2>/dev/null
14642   mkdir conftest
14643   cd conftest
14644   mkdir out
14645   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14646
14647   lt_compiler_flag="-o out/conftest2.$ac_objext"
14648   # Insert the option either (1) after the last *FLAGS variable, or
14649   # (2) before a word containing "conftest.", or (3) at the end.
14650   # Note that $ac_compile itself does not contain backslashes and begins
14651   # with a dollar sign (not a hyphen), so the echo should work correctly.
14652   lt_compile=`echo "$ac_compile" | $SED \
14653   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14654   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14655   -e 's:$: $lt_compiler_flag:'`
14656   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
14657   (eval "$lt_compile" 2>out/conftest.err)
14658   ac_status=$?
14659   cat out/conftest.err >&5
14660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14661   if (exit $ac_status) && test -s out/conftest2.$ac_objext
14662   then
14663     # The compiler can only warn and ignore the option if not recognized
14664     # So say no if there are warnings
14665     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
14666     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14667     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14668       lt_cv_prog_compiler_c_o=yes
14669     fi
14670   fi
14671   chmod u+w . 2>&5
14672   $RM conftest*
14673   # SGI C++ compiler will create directory out/ii_files/ for
14674   # template instantiation
14675   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14676   $RM out/* && rmdir out
14677   cd ..
14678   $RM -r conftest
14679   $RM conftest*
14680
14681fi
14682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
14683$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
14684
14685
14686
14687
14688
14689
14690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14691$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14692if ${lt_cv_prog_compiler_c_o+:} false; then :
14693  $as_echo_n "(cached) " >&6
14694else
14695  lt_cv_prog_compiler_c_o=no
14696   $RM -r conftest 2>/dev/null
14697   mkdir conftest
14698   cd conftest
14699   mkdir out
14700   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14701
14702   lt_compiler_flag="-o out/conftest2.$ac_objext"
14703   # Insert the option either (1) after the last *FLAGS variable, or
14704   # (2) before a word containing "conftest.", or (3) at the end.
14705   # Note that $ac_compile itself does not contain backslashes and begins
14706   # with a dollar sign (not a hyphen), so the echo should work correctly.
14707   lt_compile=`echo "$ac_compile" | $SED \
14708   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14709   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14710   -e 's:$: $lt_compiler_flag:'`
14711   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
14712   (eval "$lt_compile" 2>out/conftest.err)
14713   ac_status=$?
14714   cat out/conftest.err >&5
14715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14716   if (exit $ac_status) && test -s out/conftest2.$ac_objext
14717   then
14718     # The compiler can only warn and ignore the option if not recognized
14719     # So say no if there are warnings
14720     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
14721     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14722     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14723       lt_cv_prog_compiler_c_o=yes
14724     fi
14725   fi
14726   chmod u+w . 2>&5
14727   $RM conftest*
14728   # SGI C++ compiler will create directory out/ii_files/ for
14729   # template instantiation
14730   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14731   $RM out/* && rmdir out
14732   cd ..
14733   $RM -r conftest
14734   $RM conftest*
14735
14736fi
14737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
14738$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
14739
14740
14741
14742
14743hard_links=nottested
14744if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
14745  # do not overwrite the value of need_locks provided by the user
14746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
14747$as_echo_n "checking if we can lock with hard links... " >&6; }
14748  hard_links=yes
14749  $RM conftest*
14750  ln conftest.a conftest.b 2>/dev/null && hard_links=no
14751  touch conftest.a
14752  ln conftest.a conftest.b 2>&5 || hard_links=no
14753  ln conftest.a conftest.b 2>/dev/null && hard_links=no
14754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
14755$as_echo "$hard_links" >&6; }
14756  if test no = "$hard_links"; then
14757    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
14758$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
14759    need_locks=warn
14760  fi
14761else
14762  need_locks=no
14763fi
14764
14765
14766
14767
14768
14769
14770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
14771$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
14772
14773  runpath_var=
14774  allow_undefined_flag=
14775  always_export_symbols=no
14776  archive_cmds=
14777  archive_expsym_cmds=
14778  compiler_needs_object=no
14779  enable_shared_with_static_runtimes=no
14780  export_dynamic_flag_spec=
14781  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
14782  hardcode_automatic=no
14783  hardcode_direct=no
14784  hardcode_direct_absolute=no
14785  hardcode_libdir_flag_spec=
14786  hardcode_libdir_separator=
14787  hardcode_minus_L=no
14788  hardcode_shlibpath_var=unsupported
14789  inherit_rpath=no
14790  link_all_deplibs=no
14791  module_cmds=
14792  module_expsym_cmds=
14793  old_archive_from_new_cmds=
14794  old_archive_from_expsyms_cmds=
14795  thread_safe_flag_spec=
14796  whole_archive_flag_spec=
14797  # include_expsyms should be a list of space-separated symbols to be *always*
14798  # included in the symbol list
14799  include_expsyms=
14800  # exclude_expsyms can be an extended regexp of symbols to exclude
14801  # it will be wrapped by ' (' and ')$', so one must not match beginning or
14802  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
14803  # as well as any symbol that contains 'd'.
14804  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
14805  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
14806  # platforms (ab)use it in PIC code, but their linkers get confused if
14807  # the symbol is explicitly referenced.  Since portable code cannot
14808  # rely on this symbol name, it's probably fine to never include it in
14809  # preloaded symbol tables.
14810  # Exclude shared library initialization/finalization symbols.
14811  extract_expsyms_cmds=
14812
14813  case $host_os in
14814  cygwin* | mingw* | pw32* | cegcc*)
14815    # FIXME: the MSVC++ port hasn't been tested in a loooong time
14816    # When not using gcc, we currently assume that we are using
14817    # Microsoft Visual C++.
14818    if test yes != "$GCC"; then
14819      with_gnu_ld=no
14820    fi
14821    ;;
14822  interix*)
14823    # we just hope/assume this is gcc and not c89 (= MSVC++)
14824    with_gnu_ld=yes
14825    ;;
14826  openbsd* | bitrig*)
14827    with_gnu_ld=no
14828    ;;
14829  esac
14830
14831  ld_shlibs=yes
14832
14833  # On some targets, GNU ld is compatible enough with the native linker
14834  # that we're better off using the native interface for both.
14835  lt_use_gnu_ld_interface=no
14836  if test yes = "$with_gnu_ld"; then
14837    case $host_os in
14838      aix*)
14839	# The AIX port of GNU ld has always aspired to compatibility
14840	# with the native linker.  However, as the warning in the GNU ld
14841	# block says, versions before 2.19.5* couldn't really create working
14842	# shared libraries, regardless of the interface used.
14843	case `$LD -v 2>&1` in
14844	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
14845	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
14846	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
14847	  *)
14848	    lt_use_gnu_ld_interface=yes
14849	    ;;
14850	esac
14851	;;
14852      *)
14853	lt_use_gnu_ld_interface=yes
14854	;;
14855    esac
14856  fi
14857
14858  if test yes = "$lt_use_gnu_ld_interface"; then
14859    # If archive_cmds runs LD, not CC, wlarc should be empty
14860    wlarc='$wl'
14861
14862    # Set some defaults for GNU ld with shared library support. These
14863    # are reset later if shared libraries are not supported. Putting them
14864    # here allows them to be overridden if necessary.
14865    runpath_var=LD_RUN_PATH
14866    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
14867    export_dynamic_flag_spec='$wl--export-dynamic'
14868    # ancient GNU ld didn't support --whole-archive et. al.
14869    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
14870      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
14871    else
14872      whole_archive_flag_spec=
14873    fi
14874    supports_anon_versioning=no
14875    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
14876      *GNU\ gold*) supports_anon_versioning=yes ;;
14877      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
14878      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
14879      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
14880      *\ 2.11.*) ;; # other 2.11 versions
14881      *) supports_anon_versioning=yes ;;
14882    esac
14883
14884    # See if GNU ld supports shared libraries.
14885    case $host_os in
14886    aix[3-9]*)
14887      # On AIX/PPC, the GNU linker is very broken
14888      if test ia64 != "$host_cpu"; then
14889	ld_shlibs=no
14890	cat <<_LT_EOF 1>&2
14891
14892*** Warning: the GNU linker, at least up to release 2.19, is reported
14893*** to be unable to reliably create shared libraries on AIX.
14894*** Therefore, libtool is disabling shared libraries support.  If you
14895*** really care for shared libraries, you may want to install binutils
14896*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
14897*** You will then need to restart the configuration process.
14898
14899_LT_EOF
14900      fi
14901      ;;
14902
14903    amigaos*)
14904      case $host_cpu in
14905      powerpc)
14906            # see comment about AmigaOS4 .so support
14907            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14908            archive_expsym_cmds=''
14909        ;;
14910      m68k)
14911            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
14912            hardcode_libdir_flag_spec='-L$libdir'
14913            hardcode_minus_L=yes
14914        ;;
14915      esac
14916      ;;
14917
14918    beos*)
14919      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14920	allow_undefined_flag=unsupported
14921	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
14922	# support --undefined.  This deserves some investigation.  FIXME
14923	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14924      else
14925	ld_shlibs=no
14926      fi
14927      ;;
14928
14929    cygwin* | mingw* | pw32* | cegcc*)
14930      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
14931      # as there is no search path for DLLs.
14932      hardcode_libdir_flag_spec='-L$libdir'
14933      export_dynamic_flag_spec='$wl--export-all-symbols'
14934      allow_undefined_flag=unsupported
14935      always_export_symbols=no
14936      enable_shared_with_static_runtimes=yes
14937      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
14938      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
14939
14940      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
14941        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14942	# If the export-symbols file already is a .def file, use it as
14943	# is; otherwise, prepend EXPORTS...
14944	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
14945          cp $export_symbols $output_objdir/$soname.def;
14946        else
14947          echo EXPORTS > $output_objdir/$soname.def;
14948          cat $export_symbols >> $output_objdir/$soname.def;
14949        fi~
14950        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14951      else
14952	ld_shlibs=no
14953      fi
14954      ;;
14955
14956    haiku*)
14957      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14958      link_all_deplibs=yes
14959      ;;
14960
14961    os2*)
14962      hardcode_libdir_flag_spec='-L$libdir'
14963      hardcode_minus_L=yes
14964      allow_undefined_flag=unsupported
14965      shrext_cmds=.dll
14966      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14967	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14968	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14969	$ECHO EXPORTS >> $output_objdir/$libname.def~
14970	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
14971	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14972	emximp -o $lib $output_objdir/$libname.def'
14973      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14974	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14975	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14976	$ECHO EXPORTS >> $output_objdir/$libname.def~
14977	prefix_cmds="$SED"~
14978	if test EXPORTS = "`$SED 1q $export_symbols`"; then
14979	  prefix_cmds="$prefix_cmds -e 1d";
14980	fi~
14981	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
14982	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
14983	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14984	emximp -o $lib $output_objdir/$libname.def'
14985      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
14986      enable_shared_with_static_runtimes=yes
14987      ;;
14988
14989    interix[3-9]*)
14990      hardcode_direct=no
14991      hardcode_shlibpath_var=no
14992      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
14993      export_dynamic_flag_spec='$wl-E'
14994      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
14995      # Instead, shared libraries are loaded at an image base (0x10000000 by
14996      # default) and relocated if they conflict, which is a slow very memory
14997      # consuming and fragmenting process.  To avoid this, we pick a random,
14998      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
14999      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
15000      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
15001      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
15002      ;;
15003
15004    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
15005      tmp_diet=no
15006      if test linux-dietlibc = "$host_os"; then
15007	case $cc_basename in
15008	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
15009	esac
15010      fi
15011      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
15012	 && test no = "$tmp_diet"
15013      then
15014	tmp_addflag=' $pic_flag'
15015	tmp_sharedflag='-shared'
15016	case $cc_basename,$host_cpu in
15017        pgcc*)				# Portland Group C compiler
15018	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
15019	  tmp_addflag=' $pic_flag'
15020	  ;;
15021	pgf77* | pgf90* | pgf95* | pgfortran*)
15022					# Portland Group f77 and f90 compilers
15023	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
15024	  tmp_addflag=' $pic_flag -Mnomain' ;;
15025	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
15026	  tmp_addflag=' -i_dynamic' ;;
15027	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
15028	  tmp_addflag=' -i_dynamic -nofor_main' ;;
15029	ifc* | ifort*)			# Intel Fortran compiler
15030	  tmp_addflag=' -nofor_main' ;;
15031	lf95*)				# Lahey Fortran 8.1
15032	  whole_archive_flag_spec=
15033	  tmp_sharedflag='--shared' ;;
15034        nagfor*)                        # NAGFOR 5.3
15035          tmp_sharedflag='-Wl,-shared' ;;
15036	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
15037	  tmp_sharedflag='-qmkshrobj'
15038	  tmp_addflag= ;;
15039	nvcc*)	# Cuda Compiler Driver 2.2
15040	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
15041	  compiler_needs_object=yes
15042	  ;;
15043	esac
15044	case `$CC -V 2>&1 | sed 5q` in
15045	*Sun\ C*)			# Sun C 5.9
15046	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
15047	  compiler_needs_object=yes
15048	  tmp_sharedflag='-G' ;;
15049	*Sun\ F*)			# Sun Fortran 8.3
15050	  tmp_sharedflag='-G' ;;
15051	esac
15052	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
15053
15054        if test yes = "$supports_anon_versioning"; then
15055          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
15056            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
15057            echo "local: *; };" >> $output_objdir/$libname.ver~
15058            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
15059        fi
15060
15061	case $cc_basename in
15062	tcc*)
15063	  export_dynamic_flag_spec='-rdynamic'
15064	  ;;
15065	xlf* | bgf* | bgxlf* | mpixlf*)
15066	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
15067	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
15068	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
15069	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
15070	  if test yes = "$supports_anon_versioning"; then
15071	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
15072              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
15073              echo "local: *; };" >> $output_objdir/$libname.ver~
15074              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
15075	  fi
15076	  ;;
15077	esac
15078      else
15079        ld_shlibs=no
15080      fi
15081      ;;
15082
15083    netbsd*)
15084      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15085	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
15086	wlarc=
15087      else
15088	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
15089	archive_expsym_cmds='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
15090      fi
15091      ;;
15092
15093    solaris*)
15094      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
15095	ld_shlibs=no
15096	cat <<_LT_EOF 1>&2
15097
15098*** Warning: The releases 2.8.* of the GNU linker cannot reliably
15099*** create shared libraries on Solaris systems.  Therefore, libtool
15100*** is disabling shared libraries support.  We urge you to upgrade GNU
15101*** binutils to release 2.9.1 or newer.  Another option is to modify
15102*** your PATH or compiler configuration so that the native linker is
15103*** used, and then restart.
15104
15105_LT_EOF
15106      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15107	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
15108	archive_expsym_cmds='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
15109      else
15110	ld_shlibs=no
15111      fi
15112      ;;
15113
15114    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
15115      case `$LD -v 2>&1` in
15116        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
15117	ld_shlibs=no
15118	cat <<_LT_EOF 1>&2
15119
15120*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
15121*** reliably create shared libraries on SCO systems.  Therefore, libtool
15122*** is disabling shared libraries support.  We urge you to upgrade GNU
15123*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
15124*** your PATH or compiler configuration so that the native linker is
15125*** used, and then restart.
15126
15127_LT_EOF
15128	;;
15129	*)
15130	  # For security reasons, it is highly recommended that you always
15131	  # use absolute paths for naming shared libraries, and exclude the
15132	  # DT_RUNPATH tag from executables and libraries.  But doing so
15133	  # requires that you compile everything twice, which is a pain.
15134	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15135	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
15136	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
15137	    archive_expsym_cmds='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
15138	  else
15139	    ld_shlibs=no
15140	  fi
15141	;;
15142      esac
15143      ;;
15144
15145    sunos4*)
15146      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15147      wlarc=
15148      hardcode_direct=yes
15149      hardcode_shlibpath_var=no
15150      ;;
15151
15152    *)
15153      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
15154	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
15155	archive_expsym_cmds='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
15156      else
15157	ld_shlibs=no
15158      fi
15159      ;;
15160    esac
15161
15162    if test no = "$ld_shlibs"; then
15163      runpath_var=
15164      hardcode_libdir_flag_spec=
15165      export_dynamic_flag_spec=
15166      whole_archive_flag_spec=
15167    fi
15168  else
15169    # PORTME fill in a description of your system's linker (not GNU ld)
15170    case $host_os in
15171    aix3*)
15172      allow_undefined_flag=unsupported
15173      always_export_symbols=yes
15174      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
15175      # Note: this linker hardcodes the directories in LIBPATH if there
15176      # are no directories specified by -L.
15177      hardcode_minus_L=yes
15178      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
15179	# Neither direct hardcoding nor static linking is supported with a
15180	# broken collect2.
15181	hardcode_direct=unsupported
15182      fi
15183      ;;
15184
15185    aix[4-9]*)
15186      if test ia64 = "$host_cpu"; then
15187	# On IA64, the linker does run time linking by default, so we don't
15188	# have to do anything special.
15189	aix_use_runtimelinking=no
15190	exp_sym_flag='-Bexport'
15191	no_entry_flag=
15192      else
15193	# If we're using GNU nm, then we don't want the "-C" option.
15194	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
15195	# Without the "-l" option, or with the "-B" option, AIX nm treats
15196	# weak defined symbols like other global defined symbols, whereas
15197	# GNU nm marks them as "W".
15198	# While the 'weak' keyword is ignored in the Export File, we need
15199	# it in the Import File for the 'aix-soname' feature, so we have
15200	# to replace the "-B" option with "-P" for AIX nm.
15201	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
15202	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
15203	else
15204	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
15205	fi
15206	aix_use_runtimelinking=no
15207
15208	# Test if we are trying to use run time linking or normal
15209	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
15210	# have runtime linking enabled, and use it for executables.
15211	# For shared libraries, we enable/disable runtime linking
15212	# depending on the kind of the shared library created -
15213	# when "with_aix_soname,aix_use_runtimelinking" is:
15214	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
15215	# "aix,yes"  lib.so          shared, rtl:yes, for executables
15216	#            lib.a           static archive
15217	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
15218	#            lib.a(lib.so.V) shared, rtl:no,  for executables
15219	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
15220	#            lib.a(lib.so.V) shared, rtl:no
15221	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
15222	#            lib.a           static archive
15223	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
15224	  for ld_flag in $LDFLAGS; do
15225	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
15226	    aix_use_runtimelinking=yes
15227	    break
15228	  fi
15229	  done
15230	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
15231	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
15232	    # so we don't have lib.a shared libs to link our executables.
15233	    # We have to force runtime linking in this case.
15234	    aix_use_runtimelinking=yes
15235	    LDFLAGS="$LDFLAGS -Wl,-brtl"
15236	  fi
15237	  ;;
15238	esac
15239
15240	exp_sym_flag='-bexport'
15241	no_entry_flag='-bnoentry'
15242      fi
15243
15244      # When large executables or shared objects are built, AIX ld can
15245      # have problems creating the table of contents.  If linking a library
15246      # or program results in "error TOC overflow" add -mminimal-toc to
15247      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
15248      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
15249
15250      archive_cmds=''
15251      hardcode_direct=yes
15252      hardcode_direct_absolute=yes
15253      hardcode_libdir_separator=':'
15254      link_all_deplibs=yes
15255      file_list_spec='$wl-f,'
15256      case $with_aix_soname,$aix_use_runtimelinking in
15257      aix,*) ;; # traditional, no import file
15258      svr4,* | *,yes) # use import file
15259	# The Import File defines what to hardcode.
15260	hardcode_direct=no
15261	hardcode_direct_absolute=no
15262	;;
15263      esac
15264
15265      if test yes = "$GCC"; then
15266	case $host_os in aix4.[012]|aix4.[012].*)
15267	# We only want to do this on AIX 4.2 and lower, the check
15268	# below for broken collect2 doesn't work under 4.3+
15269	  collect2name=`$CC -print-prog-name=collect2`
15270	  if test -f "$collect2name" &&
15271	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
15272	  then
15273	  # We have reworked collect2
15274	  :
15275	  else
15276	  # We have old collect2
15277	  hardcode_direct=unsupported
15278	  # It fails to find uninstalled libraries when the uninstalled
15279	  # path is not listed in the libpath.  Setting hardcode_minus_L
15280	  # to unsupported forces relinking
15281	  hardcode_minus_L=yes
15282	  hardcode_libdir_flag_spec='-L$libdir'
15283	  hardcode_libdir_separator=
15284	  fi
15285	  ;;
15286	esac
15287	shared_flag='-shared'
15288	if test yes = "$aix_use_runtimelinking"; then
15289	  shared_flag="$shared_flag "'$wl-G'
15290	fi
15291	# Need to ensure runtime linking is disabled for the traditional
15292	# shared library, or the linker may eventually find shared libraries
15293	# /with/ Import File - we do not want to mix them.
15294	shared_flag_aix='-shared'
15295	shared_flag_svr4='-shared $wl-G'
15296      else
15297	# not using gcc
15298	if test ia64 = "$host_cpu"; then
15299	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
15300	# chokes on -Wl,-G. The following line is correct:
15301	  shared_flag='-G'
15302	else
15303	  if test yes = "$aix_use_runtimelinking"; then
15304	    shared_flag='$wl-G'
15305	  else
15306	    shared_flag='$wl-bM:SRE'
15307	  fi
15308	  shared_flag_aix='$wl-bM:SRE'
15309	  shared_flag_svr4='$wl-G'
15310	fi
15311      fi
15312
15313      export_dynamic_flag_spec='$wl-bexpall'
15314      # It seems that -bexpall does not export symbols beginning with
15315      # underscore (_), so it is better to generate a list of symbols to export.
15316      always_export_symbols=yes
15317      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
15318	# Warning - without using the other runtime loading flags (-brtl),
15319	# -berok will link without error, but may produce a broken library.
15320	allow_undefined_flag='-berok'
15321        # Determine the default libpath from the value encoded in an
15322        # empty executable.
15323        if test set = "${lt_cv_aix_libpath+set}"; then
15324  aix_libpath=$lt_cv_aix_libpath
15325else
15326  if ${lt_cv_aix_libpath_+:} false; then :
15327  $as_echo_n "(cached) " >&6
15328else
15329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15330/* end confdefs.h.  */
15331
15332int
15333main ()
15334{
15335
15336  ;
15337  return 0;
15338}
15339_ACEOF
15340if ac_fn_c_try_link "$LINENO"; then :
15341
15342  lt_aix_libpath_sed='
15343      /Import File Strings/,/^$/ {
15344	  /^0/ {
15345	      s/^0  *\([^ ]*\) *$/\1/
15346	      p
15347	  }
15348      }'
15349  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15350  # Check for a 64-bit object if we didn't find anything.
15351  if test -z "$lt_cv_aix_libpath_"; then
15352    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15353  fi
15354fi
15355rm -f core conftest.err conftest.$ac_objext \
15356    conftest$ac_exeext conftest.$ac_ext
15357  if test -z "$lt_cv_aix_libpath_"; then
15358    lt_cv_aix_libpath_=/usr/lib:/lib
15359  fi
15360
15361fi
15362
15363  aix_libpath=$lt_cv_aix_libpath_
15364fi
15365
15366        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
15367        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
15368      else
15369	if test ia64 = "$host_cpu"; then
15370	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
15371	  allow_undefined_flag="-z nodefs"
15372	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
15373	else
15374	 # Determine the default libpath from the value encoded in an
15375	 # empty executable.
15376	 if test set = "${lt_cv_aix_libpath+set}"; then
15377  aix_libpath=$lt_cv_aix_libpath
15378else
15379  if ${lt_cv_aix_libpath_+:} false; then :
15380  $as_echo_n "(cached) " >&6
15381else
15382  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15383/* end confdefs.h.  */
15384
15385int
15386main ()
15387{
15388
15389  ;
15390  return 0;
15391}
15392_ACEOF
15393if ac_fn_c_try_link "$LINENO"; then :
15394
15395  lt_aix_libpath_sed='
15396      /Import File Strings/,/^$/ {
15397	  /^0/ {
15398	      s/^0  *\([^ ]*\) *$/\1/
15399	      p
15400	  }
15401      }'
15402  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15403  # Check for a 64-bit object if we didn't find anything.
15404  if test -z "$lt_cv_aix_libpath_"; then
15405    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15406  fi
15407fi
15408rm -f core conftest.err conftest.$ac_objext \
15409    conftest$ac_exeext conftest.$ac_ext
15410  if test -z "$lt_cv_aix_libpath_"; then
15411    lt_cv_aix_libpath_=/usr/lib:/lib
15412  fi
15413
15414fi
15415
15416  aix_libpath=$lt_cv_aix_libpath_
15417fi
15418
15419	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
15420	  # Warning - without using the other run time loading flags,
15421	  # -berok will link without error, but may produce a broken library.
15422	  no_undefined_flag=' $wl-bernotok'
15423	  allow_undefined_flag=' $wl-berok'
15424	  if test yes = "$with_gnu_ld"; then
15425	    # We only use this code for GNU lds that support --whole-archive.
15426	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
15427	  else
15428	    # Exported symbols can be pulled into shared objects from archives
15429	    whole_archive_flag_spec='$convenience'
15430	  fi
15431	  archive_cmds_need_lc=yes
15432	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
15433	  # -brtl affects multiple linker settings, -berok does not and is overridden later
15434	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
15435	  if test svr4 != "$with_aix_soname"; then
15436	    # This is similar to how AIX traditionally builds its shared libraries.
15437	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
15438	  fi
15439	  if test aix != "$with_aix_soname"; then
15440	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
15441	  else
15442	    # used by -dlpreopen to get the symbols
15443	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
15444	  fi
15445	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
15446	fi
15447      fi
15448      ;;
15449
15450    amigaos*)
15451      case $host_cpu in
15452      powerpc)
15453            # see comment about AmigaOS4 .so support
15454            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
15455            archive_expsym_cmds=''
15456        ;;
15457      m68k)
15458            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
15459            hardcode_libdir_flag_spec='-L$libdir'
15460            hardcode_minus_L=yes
15461        ;;
15462      esac
15463      ;;
15464
15465    bsdi[45]*)
15466      export_dynamic_flag_spec=-rdynamic
15467      ;;
15468
15469    cygwin* | mingw* | pw32* | cegcc*)
15470      # When not using gcc, we currently assume that we are using
15471      # Microsoft Visual C++.
15472      # hardcode_libdir_flag_spec is actually meaningless, as there is
15473      # no search path for DLLs.
15474      case $cc_basename in
15475      cl*)
15476	# Native MSVC
15477	hardcode_libdir_flag_spec=' '
15478	allow_undefined_flag=unsupported
15479	always_export_symbols=yes
15480	file_list_spec='@'
15481	# Tell ltmain to make .lib files, not .a files.
15482	libext=lib
15483	# Tell ltmain to make .dll files, not .so files.
15484	shrext_cmds=.dll
15485	# FIXME: Setting linknames here is a bad hack.
15486	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
15487	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
15488            cp "$export_symbols" "$output_objdir/$soname.def";
15489            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
15490          else
15491            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
15492          fi~
15493          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
15494          linknames='
15495	# The linker will not automatically build a static lib if we build a DLL.
15496	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
15497	enable_shared_with_static_runtimes=yes
15498	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
15499	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
15500	# Don't use ranlib
15501	old_postinstall_cmds='chmod 644 $oldlib'
15502	postlink_cmds='lt_outputfile="@OUTPUT@"~
15503          lt_tool_outputfile="@TOOL_OUTPUT@"~
15504          case $lt_outputfile in
15505            *.exe|*.EXE) ;;
15506            *)
15507              lt_outputfile=$lt_outputfile.exe
15508              lt_tool_outputfile=$lt_tool_outputfile.exe
15509              ;;
15510          esac~
15511          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
15512            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
15513            $RM "$lt_outputfile.manifest";
15514          fi'
15515	;;
15516      *)
15517	# Assume MSVC wrapper
15518	hardcode_libdir_flag_spec=' '
15519	allow_undefined_flag=unsupported
15520	# Tell ltmain to make .lib files, not .a files.
15521	libext=lib
15522	# Tell ltmain to make .dll files, not .so files.
15523	shrext_cmds=.dll
15524	# FIXME: Setting linknames here is a bad hack.
15525	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
15526	# The linker will automatically build a .lib file if we build a DLL.
15527	old_archive_from_new_cmds='true'
15528	# FIXME: Should let the user specify the lib program.
15529	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
15530	enable_shared_with_static_runtimes=yes
15531	;;
15532      esac
15533      ;;
15534
15535    darwin* | rhapsody*)
15536
15537
15538  archive_cmds_need_lc=no
15539  hardcode_direct=no
15540  hardcode_automatic=yes
15541  hardcode_shlibpath_var=unsupported
15542  if test yes = "$lt_cv_ld_force_load"; then
15543    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
15544
15545  else
15546    whole_archive_flag_spec=''
15547  fi
15548  link_all_deplibs=yes
15549  allow_undefined_flag=$_lt_dar_allow_undefined
15550  case $cc_basename in
15551     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
15552     *) _lt_dar_can_shared=$GCC ;;
15553  esac
15554  if test yes = "$_lt_dar_can_shared"; then
15555    output_verbose_link_cmd=func_echo_all
15556    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
15557    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
15558    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
15559    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
15560
15561  else
15562  ld_shlibs=no
15563  fi
15564
15565      ;;
15566
15567    dgux*)
15568      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15569      hardcode_libdir_flag_spec='-L$libdir'
15570      hardcode_shlibpath_var=no
15571      ;;
15572
15573    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15574    # support.  Future versions do this automatically, but an explicit c++rt0.o
15575    # does not break anything, and helps significantly (at the cost of a little
15576    # extra space).
15577    freebsd2.2*)
15578      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
15579      hardcode_libdir_flag_spec='-R$libdir'
15580      hardcode_direct=yes
15581      hardcode_shlibpath_var=no
15582      ;;
15583
15584    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
15585    freebsd2.*)
15586      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15587      hardcode_direct=yes
15588      hardcode_minus_L=yes
15589      hardcode_shlibpath_var=no
15590      ;;
15591
15592    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
15593    freebsd* | dragonfly*)
15594      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15595      hardcode_libdir_flag_spec='-R$libdir'
15596      hardcode_direct=yes
15597      hardcode_shlibpath_var=no
15598      ;;
15599
15600    hpux9*)
15601      if test yes = "$GCC"; then
15602	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
15603      else
15604	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
15605      fi
15606      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
15607      hardcode_libdir_separator=:
15608      hardcode_direct=yes
15609
15610      # hardcode_minus_L: Not really in the search PATH,
15611      # but as the default location of the library.
15612      hardcode_minus_L=yes
15613      export_dynamic_flag_spec='$wl-E'
15614      ;;
15615
15616    hpux10*)
15617      if test yes,no = "$GCC,$with_gnu_ld"; then
15618	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15619      else
15620	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15621      fi
15622      if test no = "$with_gnu_ld"; then
15623	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
15624	hardcode_libdir_separator=:
15625	hardcode_direct=yes
15626	hardcode_direct_absolute=yes
15627	export_dynamic_flag_spec='$wl-E'
15628	# hardcode_minus_L: Not really in the search PATH,
15629	# but as the default location of the library.
15630	hardcode_minus_L=yes
15631      fi
15632      ;;
15633
15634    hpux11*)
15635      if test yes,no = "$GCC,$with_gnu_ld"; then
15636	case $host_cpu in
15637	hppa*64*)
15638	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
15639	  ;;
15640	ia64*)
15641	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15642	  ;;
15643	*)
15644	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15645	  ;;
15646	esac
15647      else
15648	case $host_cpu in
15649	hppa*64*)
15650	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
15651	  ;;
15652	ia64*)
15653	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15654	  ;;
15655	*)
15656
15657	  # Older versions of the 11.00 compiler do not understand -b yet
15658	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
15659	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
15660$as_echo_n "checking if $CC understands -b... " >&6; }
15661if ${lt_cv_prog_compiler__b+:} false; then :
15662  $as_echo_n "(cached) " >&6
15663else
15664  lt_cv_prog_compiler__b=no
15665   save_LDFLAGS=$LDFLAGS
15666   LDFLAGS="$LDFLAGS -b"
15667   echo "$lt_simple_link_test_code" > conftest.$ac_ext
15668   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
15669     # The linker can only warn and ignore the option if not recognized
15670     # So say no if there are warnings
15671     if test -s conftest.err; then
15672       # Append any errors to the config.log.
15673       cat conftest.err 1>&5
15674       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
15675       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15676       if diff conftest.exp conftest.er2 >/dev/null; then
15677         lt_cv_prog_compiler__b=yes
15678       fi
15679     else
15680       lt_cv_prog_compiler__b=yes
15681     fi
15682   fi
15683   $RM -r conftest*
15684   LDFLAGS=$save_LDFLAGS
15685
15686fi
15687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
15688$as_echo "$lt_cv_prog_compiler__b" >&6; }
15689
15690if test yes = "$lt_cv_prog_compiler__b"; then
15691    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15692else
15693    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15694fi
15695
15696	  ;;
15697	esac
15698      fi
15699      if test no = "$with_gnu_ld"; then
15700	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
15701	hardcode_libdir_separator=:
15702
15703	case $host_cpu in
15704	hppa*64*|ia64*)
15705	  hardcode_direct=no
15706	  hardcode_shlibpath_var=no
15707	  ;;
15708	*)
15709	  hardcode_direct=yes
15710	  hardcode_direct_absolute=yes
15711	  export_dynamic_flag_spec='$wl-E'
15712
15713	  # hardcode_minus_L: Not really in the search PATH,
15714	  # but as the default location of the library.
15715	  hardcode_minus_L=yes
15716	  ;;
15717	esac
15718      fi
15719      ;;
15720
15721    irix5* | irix6* | nonstopux*)
15722      if test yes = "$GCC"; then
15723	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
15724	# Try to use the -exported_symbol ld option, if it does not
15725	# work, assume that -exports_file does not work either and
15726	# implicitly export all symbols.
15727	# This should be the same for all languages, so no per-tag cache variable.
15728	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
15729$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
15730if ${lt_cv_irix_exported_symbol+:} false; then :
15731  $as_echo_n "(cached) " >&6
15732else
15733  save_LDFLAGS=$LDFLAGS
15734	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
15735	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15736/* end confdefs.h.  */
15737int foo (void) { return 0; }
15738_ACEOF
15739if ac_fn_c_try_link "$LINENO"; then :
15740  lt_cv_irix_exported_symbol=yes
15741else
15742  lt_cv_irix_exported_symbol=no
15743fi
15744rm -f core conftest.err conftest.$ac_objext \
15745    conftest$ac_exeext conftest.$ac_ext
15746           LDFLAGS=$save_LDFLAGS
15747fi
15748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
15749$as_echo "$lt_cv_irix_exported_symbol" >&6; }
15750	if test yes = "$lt_cv_irix_exported_symbol"; then
15751          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
15752	fi
15753      else
15754	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
15755	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
15756      fi
15757      archive_cmds_need_lc='no'
15758      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
15759      hardcode_libdir_separator=:
15760      inherit_rpath=yes
15761      link_all_deplibs=yes
15762      ;;
15763
15764    linux*)
15765      case $cc_basename in
15766      tcc*)
15767	# Fabrice Bellard et al's Tiny C Compiler
15768	ld_shlibs=yes
15769	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15770	;;
15771      esac
15772      ;;
15773
15774    netbsd*)
15775      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15776	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
15777      else
15778	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
15779      fi
15780      hardcode_libdir_flag_spec='-R$libdir'
15781      hardcode_direct=yes
15782      hardcode_shlibpath_var=no
15783      ;;
15784
15785    newsos6)
15786      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15787      hardcode_direct=yes
15788      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
15789      hardcode_libdir_separator=:
15790      hardcode_shlibpath_var=no
15791      ;;
15792
15793    *nto* | *qnx*)
15794      ;;
15795
15796    openbsd* | bitrig*)
15797      if test -f /usr/libexec/ld.so; then
15798	hardcode_direct=yes
15799	hardcode_shlibpath_var=no
15800	hardcode_direct_absolute=yes
15801	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
15802	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15803	  archive_expsym_cmds='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-version-script,$lib-ver'
15804	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
15805	  export_dynamic_flag_spec='$wl-E'
15806	else
15807	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15808	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
15809	fi
15810      else
15811	ld_shlibs=no
15812      fi
15813      ;;
15814
15815    os2*)
15816      hardcode_libdir_flag_spec='-L$libdir'
15817      hardcode_minus_L=yes
15818      allow_undefined_flag=unsupported
15819      shrext_cmds=.dll
15820      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
15821	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
15822	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
15823	$ECHO EXPORTS >> $output_objdir/$libname.def~
15824	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
15825	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
15826	emximp -o $lib $output_objdir/$libname.def'
15827      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
15828	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
15829	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
15830	$ECHO EXPORTS >> $output_objdir/$libname.def~
15831	prefix_cmds="$SED"~
15832	if test EXPORTS = "`$SED 1q $export_symbols`"; then
15833	  prefix_cmds="$prefix_cmds -e 1d";
15834	fi~
15835	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
15836	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
15837	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
15838	emximp -o $lib $output_objdir/$libname.def'
15839      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
15840      enable_shared_with_static_runtimes=yes
15841      ;;
15842
15843    osf3*)
15844      if test yes = "$GCC"; then
15845	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
15846	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
15847      else
15848	allow_undefined_flag=' -expect_unresolved \*'
15849	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
15850      fi
15851      archive_cmds_need_lc='no'
15852      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
15853      hardcode_libdir_separator=:
15854      ;;
15855
15856    osf4* | osf5*)	# as osf3* with the addition of -msym flag
15857      if test yes = "$GCC"; then
15858	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
15859	archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
15860	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
15861      else
15862	allow_undefined_flag=' -expect_unresolved \*'
15863	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
15864	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
15865          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
15866
15867	# Both c and cxx compiler support -rpath directly
15868	hardcode_libdir_flag_spec='-rpath $libdir'
15869      fi
15870      archive_cmds_need_lc='no'
15871      hardcode_libdir_separator=:
15872      ;;
15873
15874    solaris*)
15875      no_undefined_flag=' -z defs'
15876      if test yes = "$GCC"; then
15877	wlarc='$wl'
15878	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
15879	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15880          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
15881      else
15882	case `$CC -V 2>&1` in
15883	*"Compilers 5.0"*)
15884	  wlarc=''
15885	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
15886	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15887            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
15888	  ;;
15889	*)
15890	  wlarc='$wl'
15891	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
15892	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15893            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
15894	  ;;
15895	esac
15896      fi
15897      hardcode_libdir_flag_spec='-R$libdir'
15898      hardcode_shlibpath_var=no
15899      case $host_os in
15900      solaris2.[0-5] | solaris2.[0-5].*) ;;
15901      *)
15902	# The compiler driver will combine and reorder linker options,
15903	# but understands '-z linker_flag'.  GCC discards it without '$wl',
15904	# but is careful enough not to reorder.
15905	# Supported since Solaris 2.6 (maybe 2.5.1?)
15906	if test yes = "$GCC"; then
15907	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
15908	else
15909	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
15910	fi
15911	;;
15912      esac
15913      link_all_deplibs=yes
15914      ;;
15915
15916    sunos4*)
15917      if test sequent = "$host_vendor"; then
15918	# Use $CC to link under sequent, because it throws in some extra .o
15919	# files that make .init and .fini sections work.
15920	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
15921      else
15922	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
15923      fi
15924      hardcode_libdir_flag_spec='-L$libdir'
15925      hardcode_direct=yes
15926      hardcode_minus_L=yes
15927      hardcode_shlibpath_var=no
15928      ;;
15929
15930    sysv4)
15931      case $host_vendor in
15932	sni)
15933	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15934	  hardcode_direct=yes # is this really true???
15935	;;
15936	siemens)
15937	  ## LD is ld it makes a PLAMLIB
15938	  ## CC just makes a GrossModule.
15939	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
15940	  reload_cmds='$CC -r -o $output$reload_objs'
15941	  hardcode_direct=no
15942        ;;
15943	motorola)
15944	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15945	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
15946	;;
15947      esac
15948      runpath_var='LD_RUN_PATH'
15949      hardcode_shlibpath_var=no
15950      ;;
15951
15952    sysv4.3*)
15953      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15954      hardcode_shlibpath_var=no
15955      export_dynamic_flag_spec='-Bexport'
15956      ;;
15957
15958    sysv4*MP*)
15959      if test -d /usr/nec; then
15960	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15961	hardcode_shlibpath_var=no
15962	runpath_var=LD_RUN_PATH
15963	hardcode_runpath_var=yes
15964	ld_shlibs=yes
15965      fi
15966      ;;
15967
15968    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
15969      no_undefined_flag='$wl-z,text'
15970      archive_cmds_need_lc=no
15971      hardcode_shlibpath_var=no
15972      runpath_var='LD_RUN_PATH'
15973
15974      if test yes = "$GCC"; then
15975	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15976	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15977      else
15978	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15979	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15980      fi
15981      ;;
15982
15983    sysv5* | sco3.2v5* | sco5v6*)
15984      # Note: We CANNOT use -z defs as we might desire, because we do not
15985      # link with -lc, and that would cause any symbols used from libc to
15986      # always be unresolved, which means just about no library would
15987      # ever link correctly.  If we're not using GNU ld we use -z text
15988      # though, which does catch some bad symbols but isn't as heavy-handed
15989      # as -z defs.
15990      no_undefined_flag='$wl-z,text'
15991      allow_undefined_flag='$wl-z,nodefs'
15992      archive_cmds_need_lc=no
15993      hardcode_shlibpath_var=no
15994      hardcode_libdir_flag_spec='$wl-R,$libdir'
15995      hardcode_libdir_separator=':'
15996      link_all_deplibs=yes
15997      export_dynamic_flag_spec='$wl-Bexport'
15998      runpath_var='LD_RUN_PATH'
15999
16000      if test yes = "$GCC"; then
16001	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
16002	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
16003      else
16004	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
16005	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
16006      fi
16007      ;;
16008
16009    uts4*)
16010      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
16011      hardcode_libdir_flag_spec='-L$libdir'
16012      hardcode_shlibpath_var=no
16013      ;;
16014
16015    *)
16016      ld_shlibs=no
16017      ;;
16018    esac
16019
16020    if test sni = "$host_vendor"; then
16021      case $host in
16022      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
16023	export_dynamic_flag_spec='$wl-Blargedynsym'
16024	;;
16025      esac
16026    fi
16027  fi
16028
16029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
16030$as_echo "$ld_shlibs" >&6; }
16031test no = "$ld_shlibs" && can_build_shared=no
16032
16033with_gnu_ld=$with_gnu_ld
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049#
16050# Do we need to explicitly link libc?
16051#
16052case "x$archive_cmds_need_lc" in
16053x|xyes)
16054  # Assume -lc should be added
16055  archive_cmds_need_lc=yes
16056
16057  if test yes,yes = "$GCC,$enable_shared"; then
16058    case $archive_cmds in
16059    *'~'*)
16060      # FIXME: we may have to deal with multi-command sequences.
16061      ;;
16062    '$CC '*)
16063      # Test whether the compiler implicitly links with -lc since on some
16064      # systems, -lgcc has to come before -lc. If gcc already passes -lc
16065      # to ld, don't add -lc before -lgcc.
16066      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
16067$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
16068if ${lt_cv_archive_cmds_need_lc+:} false; then :
16069  $as_echo_n "(cached) " >&6
16070else
16071  $RM conftest*
16072	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16073
16074	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16075  (eval $ac_compile) 2>&5
16076  ac_status=$?
16077  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16078  test $ac_status = 0; } 2>conftest.err; then
16079	  soname=conftest
16080	  lib=conftest
16081	  libobjs=conftest.$ac_objext
16082	  deplibs=
16083	  wl=$lt_prog_compiler_wl
16084	  pic_flag=$lt_prog_compiler_pic
16085	  compiler_flags=-v
16086	  linker_flags=-v
16087	  verstring=
16088	  output_objdir=.
16089	  libname=conftest
16090	  lt_save_allow_undefined_flag=$allow_undefined_flag
16091	  allow_undefined_flag=
16092	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
16093  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
16094  ac_status=$?
16095  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16096  test $ac_status = 0; }
16097	  then
16098	    lt_cv_archive_cmds_need_lc=no
16099	  else
16100	    lt_cv_archive_cmds_need_lc=yes
16101	  fi
16102	  allow_undefined_flag=$lt_save_allow_undefined_flag
16103	else
16104	  cat conftest.err 1>&5
16105	fi
16106	$RM conftest*
16107
16108fi
16109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
16110$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
16111      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
16112      ;;
16113    esac
16114  fi
16115  ;;
16116esac
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
16270$as_echo_n "checking dynamic linker characteristics... " >&6; }
16271
16272if test yes = "$GCC"; then
16273  case $host_os in
16274    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
16275    *) lt_awk_arg='/^libraries:/' ;;
16276  esac
16277  case $host_os in
16278    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
16279    *) lt_sed_strip_eq='s|=/|/|g' ;;
16280  esac
16281  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
16282  case $lt_search_path_spec in
16283  *\;*)
16284    # if the path contains ";" then we assume it to be the separator
16285    # otherwise default to the standard path separator (i.e. ":") - it is
16286    # assumed that no part of a normal pathname contains ";" but that should
16287    # okay in the real world where ";" in dirpaths is itself problematic.
16288    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
16289    ;;
16290  *)
16291    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
16292    ;;
16293  esac
16294  # Ok, now we have the path, separated by spaces, we can step through it
16295  # and add multilib dir if necessary...
16296  lt_tmp_lt_search_path_spec=
16297  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
16298  # ...but if some path component already ends with the multilib dir we assume
16299  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
16300  case "$lt_multi_os_dir; $lt_search_path_spec " in
16301  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
16302    lt_multi_os_dir=
16303    ;;
16304  esac
16305  for lt_sys_path in $lt_search_path_spec; do
16306    if test -d "$lt_sys_path$lt_multi_os_dir"; then
16307      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
16308    elif test -n "$lt_multi_os_dir"; then
16309      test -d "$lt_sys_path" && \
16310	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
16311    fi
16312  done
16313  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
16314BEGIN {RS = " "; FS = "/|\n";} {
16315  lt_foo = "";
16316  lt_count = 0;
16317  for (lt_i = NF; lt_i > 0; lt_i--) {
16318    if ($lt_i != "" && $lt_i != ".") {
16319      if ($lt_i == "..") {
16320        lt_count++;
16321      } else {
16322        if (lt_count == 0) {
16323          lt_foo = "/" $lt_i lt_foo;
16324        } else {
16325          lt_count--;
16326        }
16327      }
16328    }
16329  }
16330  if (lt_foo != "") { lt_freq[lt_foo]++; }
16331  if (lt_freq[lt_foo] == 1) { print lt_foo; }
16332}'`
16333  # AWK program above erroneously prepends '/' to C:/dos/paths
16334  # for these hosts.
16335  case $host_os in
16336    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
16337      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
16338  esac
16339  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
16340else
16341  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
16342fi
16343library_names_spec=
16344libname_spec='lib$name'
16345soname_spec=
16346shrext_cmds=.so
16347postinstall_cmds=
16348postuninstall_cmds=
16349finish_cmds=
16350finish_eval=
16351shlibpath_var=
16352shlibpath_overrides_runpath=unknown
16353version_type=none
16354dynamic_linker="$host_os ld.so"
16355sys_lib_dlsearch_path_spec="/lib /usr/lib"
16356need_lib_prefix=unknown
16357hardcode_into_libs=no
16358
16359# when you set need_version to no, make sure it does not cause -set_version
16360# flags to be left without arguments
16361need_version=unknown
16362
16363
16364
16365case $host_os in
16366aix3*)
16367  version_type=linux # correct to gnu/linux during the next big refactor
16368  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
16369  shlibpath_var=LIBPATH
16370
16371  # AIX 3 has no versioning support, so we append a major version to the name.
16372  soname_spec='$libname$release$shared_ext$major'
16373  ;;
16374
16375aix[4-9]*)
16376  version_type=linux # correct to gnu/linux during the next big refactor
16377  need_lib_prefix=no
16378  need_version=no
16379  hardcode_into_libs=yes
16380  if test ia64 = "$host_cpu"; then
16381    # AIX 5 supports IA64
16382    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
16383    shlibpath_var=LD_LIBRARY_PATH
16384  else
16385    # With GCC up to 2.95.x, collect2 would create an import file
16386    # for dependence libraries.  The import file would start with
16387    # the line '#! .'.  This would cause the generated library to
16388    # depend on '.', always an invalid library.  This was fixed in
16389    # development snapshots of GCC prior to 3.0.
16390    case $host_os in
16391      aix4 | aix4.[01] | aix4.[01].*)
16392      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
16393	   echo ' yes '
16394	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
16395	:
16396      else
16397	can_build_shared=no
16398      fi
16399      ;;
16400    esac
16401    # Using Import Files as archive members, it is possible to support
16402    # filename-based versioning of shared library archives on AIX. While
16403    # this would work for both with and without runtime linking, it will
16404    # prevent static linking of such archives. So we do filename-based
16405    # shared library versioning with .so extension only, which is used
16406    # when both runtime linking and shared linking is enabled.
16407    # Unfortunately, runtime linking may impact performance, so we do
16408    # not want this to be the default eventually. Also, we use the
16409    # versioned .so libs for executables only if there is the -brtl
16410    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
16411    # To allow for filename-based versioning support, we need to create
16412    # libNAME.so.V as an archive file, containing:
16413    # *) an Import File, referring to the versioned filename of the
16414    #    archive as well as the shared archive member, telling the
16415    #    bitwidth (32 or 64) of that shared object, and providing the
16416    #    list of exported symbols of that shared object, eventually
16417    #    decorated with the 'weak' keyword
16418    # *) the shared object with the F_LOADONLY flag set, to really avoid
16419    #    it being seen by the linker.
16420    # At run time we better use the real file rather than another symlink,
16421    # but for link time we create the symlink libNAME.so -> libNAME.so.V
16422
16423    case $with_aix_soname,$aix_use_runtimelinking in
16424    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
16425    # soname into executable. Probably we can add versioning support to
16426    # collect2, so additional links can be useful in future.
16427    aix,yes) # traditional libtool
16428      dynamic_linker='AIX unversionable lib.so'
16429      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
16430      # instead of lib<name>.a to let people know that these are not
16431      # typical AIX shared libraries.
16432      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16433      ;;
16434    aix,no) # traditional AIX only
16435      dynamic_linker='AIX lib.a(lib.so.V)'
16436      # We preserve .a as extension for shared libraries through AIX4.2
16437      # and later when we are not doing run time linking.
16438      library_names_spec='$libname$release.a $libname.a'
16439      soname_spec='$libname$release$shared_ext$major'
16440      ;;
16441    svr4,*) # full svr4 only
16442      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
16443      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
16444      # We do not specify a path in Import Files, so LIBPATH fires.
16445      shlibpath_overrides_runpath=yes
16446      ;;
16447    *,yes) # both, prefer svr4
16448      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
16449      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
16450      # unpreferred sharedlib libNAME.a needs extra handling
16451      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
16452      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
16453      # We do not specify a path in Import Files, so LIBPATH fires.
16454      shlibpath_overrides_runpath=yes
16455      ;;
16456    *,no) # both, prefer aix
16457      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
16458      library_names_spec='$libname$release.a $libname.a'
16459      soname_spec='$libname$release$shared_ext$major'
16460      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
16461      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
16462      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
16463      ;;
16464    esac
16465    shlibpath_var=LIBPATH
16466  fi
16467  ;;
16468
16469amigaos*)
16470  case $host_cpu in
16471  powerpc)
16472    # Since July 2007 AmigaOS4 officially supports .so libraries.
16473    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
16474    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16475    ;;
16476  m68k)
16477    library_names_spec='$libname.ixlibrary $libname.a'
16478    # Create ${libname}_ixlibrary.a entries in /sys/libs.
16479    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
16480    ;;
16481  esac
16482  ;;
16483
16484beos*)
16485  library_names_spec='$libname$shared_ext'
16486  dynamic_linker="$host_os ld.so"
16487  shlibpath_var=LIBRARY_PATH
16488  ;;
16489
16490bsdi[45]*)
16491  version_type=linux # correct to gnu/linux during the next big refactor
16492  need_version=no
16493  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16494  soname_spec='$libname$release$shared_ext$major'
16495  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
16496  shlibpath_var=LD_LIBRARY_PATH
16497  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
16498  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
16499  # the default ld.so.conf also contains /usr/contrib/lib and
16500  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
16501  # libtool to hard-code these into programs
16502  ;;
16503
16504cygwin* | mingw* | pw32* | cegcc*)
16505  version_type=windows
16506  shrext_cmds=.dll
16507  need_version=no
16508  need_lib_prefix=no
16509
16510  case $GCC,$cc_basename in
16511  yes,*)
16512    # gcc
16513    library_names_spec='$libname.dll.a'
16514    # DLL is installed to $(libdir)/../bin by postinstall_cmds
16515    postinstall_cmds='base_file=`basename \$file`~
16516      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
16517      dldir=$destdir/`dirname \$dlpath`~
16518      test -d \$dldir || mkdir -p \$dldir~
16519      $install_prog $dir/$dlname \$dldir/$dlname~
16520      chmod a+x \$dldir/$dlname~
16521      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16522        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16523      fi'
16524    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16525      dlpath=$dir/\$dldll~
16526       $RM \$dlpath'
16527    shlibpath_overrides_runpath=yes
16528
16529    case $host_os in
16530    cygwin*)
16531      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
16532      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16533
16534      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
16535      ;;
16536    mingw* | cegcc*)
16537      # MinGW DLLs use traditional 'lib' prefix
16538      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16539      ;;
16540    pw32*)
16541      # pw32 DLLs use 'pw' prefix rather than 'lib'
16542      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16543      ;;
16544    esac
16545    dynamic_linker='Win32 ld.exe'
16546    ;;
16547
16548  *,cl*)
16549    # Native MSVC
16550    libname_spec='$name'
16551    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16552    library_names_spec='$libname.dll.lib'
16553
16554    case $build_os in
16555    mingw*)
16556      sys_lib_search_path_spec=
16557      lt_save_ifs=$IFS
16558      IFS=';'
16559      for lt_path in $LIB
16560      do
16561        IFS=$lt_save_ifs
16562        # Let DOS variable expansion print the short 8.3 style file name.
16563        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
16564        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
16565      done
16566      IFS=$lt_save_ifs
16567      # Convert to MSYS style.
16568      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
16569      ;;
16570    cygwin*)
16571      # Convert to unix form, then to dos form, then back to unix form
16572      # but this time dos style (no spaces!) so that the unix form looks
16573      # like /cygdrive/c/PROGRA~1:/cygdr...
16574      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
16575      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
16576      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
16577      ;;
16578    *)
16579      sys_lib_search_path_spec=$LIB
16580      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
16581        # It is most probably a Windows format PATH.
16582        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
16583      else
16584        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
16585      fi
16586      # FIXME: find the short name or the path components, as spaces are
16587      # common. (e.g. "Program Files" -> "PROGRA~1")
16588      ;;
16589    esac
16590
16591    # DLL is installed to $(libdir)/../bin by postinstall_cmds
16592    postinstall_cmds='base_file=`basename \$file`~
16593      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
16594      dldir=$destdir/`dirname \$dlpath`~
16595      test -d \$dldir || mkdir -p \$dldir~
16596      $install_prog $dir/$dlname \$dldir/$dlname'
16597    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16598      dlpath=$dir/\$dldll~
16599       $RM \$dlpath'
16600    shlibpath_overrides_runpath=yes
16601    dynamic_linker='Win32 link.exe'
16602    ;;
16603
16604  *)
16605    # Assume MSVC wrapper
16606    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
16607    dynamic_linker='Win32 ld.exe'
16608    ;;
16609  esac
16610  # FIXME: first we should search . and the directory the executable is in
16611  shlibpath_var=PATH
16612  ;;
16613
16614darwin* | rhapsody*)
16615  dynamic_linker="$host_os dyld"
16616  version_type=darwin
16617  need_lib_prefix=no
16618  need_version=no
16619  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
16620  soname_spec='$libname$release$major$shared_ext'
16621  shlibpath_overrides_runpath=yes
16622  shlibpath_var=DYLD_LIBRARY_PATH
16623  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
16624
16625  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
16626  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
16627  ;;
16628
16629dgux*)
16630  version_type=linux # correct to gnu/linux during the next big refactor
16631  need_lib_prefix=no
16632  need_version=no
16633  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16634  soname_spec='$libname$release$shared_ext$major'
16635  shlibpath_var=LD_LIBRARY_PATH
16636  ;;
16637
16638freebsd* | dragonfly*)
16639  # DragonFly does not have aout.  When/if they implement a new
16640  # versioning mechanism, adjust this.
16641  if test -x /usr/bin/objformat; then
16642    objformat=`/usr/bin/objformat`
16643  else
16644    case $host_os in
16645    freebsd[23].*) objformat=aout ;;
16646    *) objformat=elf ;;
16647    esac
16648  fi
16649  version_type=freebsd-$objformat
16650  case $version_type in
16651    freebsd-elf*)
16652      library_names_spec='$libname$release$shared_ext$versuffix  $libname$release$shared_ext$major	 $libname$shared_ext'			 soname_spec='$libname$release$shared_ext$major'
16653      soname_spec='$libname$release$shared_ext$major'
16654      need_version=no
16655      need_lib_prefix=no
16656      ;;
16657    freebsd-*)
16658      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16659      need_version=yes
16660      ;;
16661  esac
16662  shlibpath_var=LD_LIBRARY_PATH
16663  case $host_os in
16664  freebsd2.*)
16665    shlibpath_overrides_runpath=yes
16666    ;;
16667  freebsd3.[01]* | freebsdelf3.[01]*)
16668    shlibpath_overrides_runpath=yes
16669    hardcode_into_libs=yes
16670    ;;
16671  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
16672  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
16673    shlibpath_overrides_runpath=no
16674    hardcode_into_libs=yes
16675    ;;
16676  *) # from 4.6 on, and DragonFly
16677    shlibpath_overrides_runpath=yes
16678    hardcode_into_libs=yes
16679    ;;
16680  esac
16681  ;;
16682
16683haiku*)
16684  version_type=linux # correct to gnu/linux during the next big refactor
16685  need_lib_prefix=no
16686  need_version=no
16687  dynamic_linker="$host_os runtime_loader"
16688  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16689  soname_spec='$libname$release$shared_ext$major'
16690  shlibpath_var=LIBRARY_PATH
16691  shlibpath_overrides_runpath=no
16692  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
16693  hardcode_into_libs=yes
16694  ;;
16695
16696hpux9* | hpux10* | hpux11*)
16697  # Give a soname corresponding to the major version so that dld.sl refuses to
16698  # link against other versions.
16699  version_type=sunos
16700  need_lib_prefix=no
16701  need_version=no
16702  case $host_cpu in
16703  ia64*)
16704    shrext_cmds='.so'
16705    hardcode_into_libs=yes
16706    dynamic_linker="$host_os dld.so"
16707    shlibpath_var=LD_LIBRARY_PATH
16708    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16709    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16710    soname_spec='$libname$release$shared_ext$major'
16711    if test 32 = "$HPUX_IA64_MODE"; then
16712      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
16713      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
16714    else
16715      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
16716      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
16717    fi
16718    ;;
16719  hppa*64*)
16720    shrext_cmds='.sl'
16721    hardcode_into_libs=yes
16722    dynamic_linker="$host_os dld.sl"
16723    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
16724    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16725    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16726    soname_spec='$libname$release$shared_ext$major'
16727    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
16728    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16729    ;;
16730  *)
16731    shrext_cmds='.sl'
16732    dynamic_linker="$host_os dld.sl"
16733    shlibpath_var=SHLIB_PATH
16734    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
16735    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16736    soname_spec='$libname$release$shared_ext$major'
16737    ;;
16738  esac
16739  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
16740  postinstall_cmds='chmod 555 $lib'
16741  # or fails outright, so override atomically:
16742  install_override_mode=555
16743  ;;
16744
16745interix[3-9]*)
16746  version_type=linux # correct to gnu/linux during the next big refactor
16747  need_lib_prefix=no
16748  need_version=no
16749  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16750  soname_spec='$libname$release$shared_ext$major'
16751  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
16752  shlibpath_var=LD_LIBRARY_PATH
16753  shlibpath_overrides_runpath=no
16754  hardcode_into_libs=yes
16755  ;;
16756
16757irix5* | irix6* | nonstopux*)
16758  case $host_os in
16759    nonstopux*) version_type=nonstopux ;;
16760    *)
16761	if test yes = "$lt_cv_prog_gnu_ld"; then
16762		version_type=linux # correct to gnu/linux during the next big refactor
16763	else
16764		version_type=irix
16765	fi ;;
16766  esac
16767  need_lib_prefix=no
16768  need_version=no
16769  soname_spec='$libname$release$shared_ext$major'
16770  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
16771  case $host_os in
16772  irix5* | nonstopux*)
16773    libsuff= shlibsuff=
16774    ;;
16775  *)
16776    case $LD in # libtool.m4 will add one of these switches to LD
16777    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
16778      libsuff= shlibsuff= libmagic=32-bit;;
16779    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
16780      libsuff=32 shlibsuff=N32 libmagic=N32;;
16781    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
16782      libsuff=64 shlibsuff=64 libmagic=64-bit;;
16783    *) libsuff= shlibsuff= libmagic=never-match;;
16784    esac
16785    ;;
16786  esac
16787  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
16788  shlibpath_overrides_runpath=no
16789  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
16790  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
16791  hardcode_into_libs=yes
16792  ;;
16793
16794# No shared lib support for Linux oldld, aout, or coff.
16795linux*oldld* | linux*aout* | linux*coff*)
16796  dynamic_linker=no
16797  ;;
16798
16799linux*android*)
16800  version_type=none # Android doesn't support versioned libraries.
16801  need_lib_prefix=no
16802  need_version=no
16803  library_names_spec='$libname$release$shared_ext'
16804  soname_spec='$libname$release$shared_ext'
16805  finish_cmds=
16806  shlibpath_var=LD_LIBRARY_PATH
16807  shlibpath_overrides_runpath=yes
16808
16809  # This implies no fast_install, which is unacceptable.
16810  # Some rework will be needed to allow for fast_install
16811  # before this can be enabled.
16812  hardcode_into_libs=yes
16813
16814  dynamic_linker='Android linker'
16815  # Don't embed -rpath directories since the linker doesn't support them.
16816  hardcode_libdir_flag_spec='-L$libdir'
16817  ;;
16818
16819# This must be glibc/ELF.
16820linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
16821  version_type=linux # correct to gnu/linux during the next big refactor
16822  need_lib_prefix=no
16823  need_version=no
16824  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16825  soname_spec='$libname$release$shared_ext$major'
16826  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
16827  shlibpath_var=LD_LIBRARY_PATH
16828  shlibpath_overrides_runpath=no
16829
16830  # Some binutils ld are patched to set DT_RUNPATH
16831  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
16832  $as_echo_n "(cached) " >&6
16833else
16834  lt_cv_shlibpath_overrides_runpath=no
16835    save_LDFLAGS=$LDFLAGS
16836    save_libdir=$libdir
16837    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
16838	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
16839    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16840/* end confdefs.h.  */
16841
16842int
16843main ()
16844{
16845
16846  ;
16847  return 0;
16848}
16849_ACEOF
16850if ac_fn_c_try_link "$LINENO"; then :
16851  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
16852  lt_cv_shlibpath_overrides_runpath=yes
16853fi
16854fi
16855rm -f core conftest.err conftest.$ac_objext \
16856    conftest$ac_exeext conftest.$ac_ext
16857    LDFLAGS=$save_LDFLAGS
16858    libdir=$save_libdir
16859
16860fi
16861
16862  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
16863
16864  # This implies no fast_install, which is unacceptable.
16865  # Some rework will be needed to allow for fast_install
16866  # before this can be enabled.
16867  hardcode_into_libs=yes
16868
16869  # Ideally, we could use ldconfig to report *all* directores which are
16870  # searched for libraries, however this is still not possible.  Aside from not
16871  # being certain /sbin/ldconfig is available, command
16872  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
16873  # even though it is searched at run-time.  Try to do the best guess by
16874  # appending ld.so.conf contents (and includes) to the search path.
16875  if test -f /etc/ld.so.conf; then
16876    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
16877    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
16878  fi
16879
16880  # We used to test for /lib/ld.so.1 and disable shared libraries on
16881  # powerpc, because MkLinux only supported shared libraries with the
16882  # GNU dynamic linker.  Since this was broken with cross compilers,
16883  # most powerpc-linux boxes support dynamic linking these days and
16884  # people can always --disable-shared, the test was removed, and we
16885  # assume the GNU/Linux dynamic linker is in use.
16886  dynamic_linker='GNU/Linux ld.so'
16887  ;;
16888
16889netbsd*)
16890  version_type=sunos
16891  need_lib_prefix=no
16892  need_version=no
16893  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
16894    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16895    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16896    dynamic_linker='NetBSD (a.out) ld.so'
16897  else
16898    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16899    soname_spec='$libname$release$shared_ext$major'
16900    dynamic_linker='NetBSD ld.elf_so'
16901  fi
16902  shlibpath_var=LD_LIBRARY_PATH
16903  shlibpath_overrides_runpath=yes
16904  hardcode_into_libs=yes
16905  ;;
16906
16907newsos6)
16908  version_type=linux # correct to gnu/linux during the next big refactor
16909  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16910  shlibpath_var=LD_LIBRARY_PATH
16911  shlibpath_overrides_runpath=yes
16912  ;;
16913
16914*nto* | *qnx*)
16915  version_type=qnx
16916  need_lib_prefix=no
16917  need_version=no
16918  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16919  soname_spec='$libname$release$shared_ext$major'
16920  shlibpath_var=LD_LIBRARY_PATH
16921  shlibpath_overrides_runpath=no
16922  hardcode_into_libs=yes
16923  dynamic_linker='ldqnx.so'
16924  ;;
16925
16926openbsd* | bitrig*)
16927  version_type=sunos
16928  sys_lib_dlsearch_path_spec=/usr/lib
16929  need_lib_prefix=no
16930  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
16931    need_version=no
16932  else
16933    need_version=yes
16934  fi
16935  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16936  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16937  shlibpath_var=LD_LIBRARY_PATH
16938  shlibpath_overrides_runpath=yes
16939  ;;
16940
16941os2*)
16942  libname_spec='$name'
16943  version_type=windows
16944  shrext_cmds=.dll
16945  need_version=no
16946  need_lib_prefix=no
16947  # OS/2 can only load a DLL with a base name of 8 characters or less.
16948  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
16949    v=$($ECHO $release$versuffix | tr -d .-);
16950    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
16951    $ECHO $n$v`$shared_ext'
16952  library_names_spec='${libname}_dll.$libext'
16953  dynamic_linker='OS/2 ld.exe'
16954  shlibpath_var=BEGINLIBPATH
16955  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
16956  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16957  postinstall_cmds='base_file=`basename \$file`~
16958    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
16959    dldir=$destdir/`dirname \$dlpath`~
16960    test -d \$dldir || mkdir -p \$dldir~
16961    $install_prog $dir/$dlname \$dldir/$dlname~
16962    chmod a+x \$dldir/$dlname~
16963    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16964      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16965    fi'
16966  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
16967    dlpath=$dir/\$dldll~
16968    $RM \$dlpath'
16969  ;;
16970
16971osf3* | osf4* | osf5*)
16972  version_type=osf
16973  need_lib_prefix=no
16974  need_version=no
16975  soname_spec='$libname$release$shared_ext$major'
16976  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16977  shlibpath_var=LD_LIBRARY_PATH
16978  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16979  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16980  ;;
16981
16982rdos*)
16983  dynamic_linker=no
16984  ;;
16985
16986solaris*)
16987  version_type=linux # correct to gnu/linux during the next big refactor
16988  need_lib_prefix=no
16989  need_version=no
16990  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16991  soname_spec='$libname$release$shared_ext$major'
16992  shlibpath_var=LD_LIBRARY_PATH
16993  shlibpath_overrides_runpath=yes
16994  hardcode_into_libs=yes
16995  # ldd complains unless libraries are executable
16996  postinstall_cmds='chmod +x $lib'
16997  ;;
16998
16999sunos4*)
17000  version_type=sunos
17001  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
17002  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
17003  shlibpath_var=LD_LIBRARY_PATH
17004  shlibpath_overrides_runpath=yes
17005  if test yes = "$with_gnu_ld"; then
17006    need_lib_prefix=no
17007  fi
17008  need_version=yes
17009  ;;
17010
17011sysv4 | sysv4.3*)
17012  version_type=linux # correct to gnu/linux during the next big refactor
17013  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
17014  soname_spec='$libname$release$shared_ext$major'
17015  shlibpath_var=LD_LIBRARY_PATH
17016  case $host_vendor in
17017    sni)
17018      shlibpath_overrides_runpath=no
17019      need_lib_prefix=no
17020      runpath_var=LD_RUN_PATH
17021      ;;
17022    siemens)
17023      need_lib_prefix=no
17024      ;;
17025    motorola)
17026      need_lib_prefix=no
17027      need_version=no
17028      shlibpath_overrides_runpath=no
17029      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
17030      ;;
17031  esac
17032  ;;
17033
17034sysv4*MP*)
17035  if test -d /usr/nec; then
17036    version_type=linux # correct to gnu/linux during the next big refactor
17037    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
17038    soname_spec='$libname$shared_ext.$major'
17039    shlibpath_var=LD_LIBRARY_PATH
17040  fi
17041  ;;
17042
17043sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
17044  version_type=sco
17045  need_lib_prefix=no
17046  need_version=no
17047  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
17048  soname_spec='$libname$release$shared_ext$major'
17049  shlibpath_var=LD_LIBRARY_PATH
17050  shlibpath_overrides_runpath=yes
17051  hardcode_into_libs=yes
17052  if test yes = "$with_gnu_ld"; then
17053    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
17054  else
17055    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
17056    case $host_os in
17057      sco3.2v5*)
17058        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
17059	;;
17060    esac
17061  fi
17062  sys_lib_dlsearch_path_spec='/usr/lib'
17063  ;;
17064
17065tpf*)
17066  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
17067  version_type=linux # correct to gnu/linux during the next big refactor
17068  need_lib_prefix=no
17069  need_version=no
17070  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
17071  shlibpath_var=LD_LIBRARY_PATH
17072  shlibpath_overrides_runpath=no
17073  hardcode_into_libs=yes
17074  ;;
17075
17076uts4*)
17077  version_type=linux # correct to gnu/linux during the next big refactor
17078  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
17079  soname_spec='$libname$release$shared_ext$major'
17080  shlibpath_var=LD_LIBRARY_PATH
17081  ;;
17082
17083*)
17084  dynamic_linker=no
17085  ;;
17086esac
17087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
17088$as_echo "$dynamic_linker" >&6; }
17089test no = "$dynamic_linker" && can_build_shared=no
17090
17091variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
17092if test yes = "$GCC"; then
17093  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
17094fi
17095
17096if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
17097  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
17098fi
17099
17100if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
17101  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
17102fi
17103
17104# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
17105configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
17106
17107# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
17108func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
17109
17110# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
17111configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
17210$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
17211hardcode_action=
17212if test -n "$hardcode_libdir_flag_spec" ||
17213   test -n "$runpath_var" ||
17214   test yes = "$hardcode_automatic"; then
17215
17216  # We can hardcode non-existent directories.
17217  if test no != "$hardcode_direct" &&
17218     # If the only mechanism to avoid hardcoding is shlibpath_var, we
17219     # have to relink, otherwise we might link with an installed library
17220     # when we should be linking with a yet-to-be-installed one
17221     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
17222     test no != "$hardcode_minus_L"; then
17223    # Linking always hardcodes the temporary library directory.
17224    hardcode_action=relink
17225  else
17226    # We can link without hardcoding, and we can hardcode nonexisting dirs.
17227    hardcode_action=immediate
17228  fi
17229else
17230  # We cannot hardcode anything, or else we can only hardcode existing
17231  # directories.
17232  hardcode_action=unsupported
17233fi
17234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
17235$as_echo "$hardcode_action" >&6; }
17236
17237if test relink = "$hardcode_action" ||
17238   test yes = "$inherit_rpath"; then
17239  # Fast installation is not supported
17240  enable_fast_install=no
17241elif test yes = "$shlibpath_overrides_runpath" ||
17242     test no = "$enable_shared"; then
17243  # Fast installation is not necessary
17244  enable_fast_install=needless
17245fi
17246
17247
17248
17249
17250
17251
17252  if test yes != "$enable_dlopen"; then
17253  enable_dlopen=unknown
17254  enable_dlopen_self=unknown
17255  enable_dlopen_self_static=unknown
17256else
17257  lt_cv_dlopen=no
17258  lt_cv_dlopen_libs=
17259
17260  case $host_os in
17261  beos*)
17262    lt_cv_dlopen=load_add_on
17263    lt_cv_dlopen_libs=
17264    lt_cv_dlopen_self=yes
17265    ;;
17266
17267  mingw* | pw32* | cegcc*)
17268    lt_cv_dlopen=LoadLibrary
17269    lt_cv_dlopen_libs=
17270    ;;
17271
17272  cygwin*)
17273    lt_cv_dlopen=dlopen
17274    lt_cv_dlopen_libs=
17275    ;;
17276
17277  darwin*)
17278    # if libdl is installed we need to link against it
17279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
17280$as_echo_n "checking for dlopen in -ldl... " >&6; }
17281if ${ac_cv_lib_dl_dlopen+:} false; then :
17282  $as_echo_n "(cached) " >&6
17283else
17284  ac_check_lib_save_LIBS=$LIBS
17285LIBS="-ldl  $LIBS"
17286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17287/* end confdefs.h.  */
17288
17289/* Override any GCC internal prototype to avoid an error.
17290   Use char because int might match the return type of a GCC
17291   builtin and then its argument prototype would still apply.  */
17292#ifdef __cplusplus
17293extern "C"
17294#endif
17295char dlopen ();
17296int
17297main ()
17298{
17299return dlopen ();
17300  ;
17301  return 0;
17302}
17303_ACEOF
17304if ac_fn_c_try_link "$LINENO"; then :
17305  ac_cv_lib_dl_dlopen=yes
17306else
17307  ac_cv_lib_dl_dlopen=no
17308fi
17309rm -f core conftest.err conftest.$ac_objext \
17310    conftest$ac_exeext conftest.$ac_ext
17311LIBS=$ac_check_lib_save_LIBS
17312fi
17313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
17314$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
17315if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
17316  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
17317else
17318
17319    lt_cv_dlopen=dyld
17320    lt_cv_dlopen_libs=
17321    lt_cv_dlopen_self=yes
17322
17323fi
17324
17325    ;;
17326
17327  tpf*)
17328    # Don't try to run any link tests for TPF.  We know it's impossible
17329    # because TPF is a cross-compiler, and we know how we open DSOs.
17330    lt_cv_dlopen=dlopen
17331    lt_cv_dlopen_libs=
17332    lt_cv_dlopen_self=no
17333    ;;
17334
17335  *)
17336    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
17337if test "x$ac_cv_func_shl_load" = xyes; then :
17338  lt_cv_dlopen=shl_load
17339else
17340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
17341$as_echo_n "checking for shl_load in -ldld... " >&6; }
17342if ${ac_cv_lib_dld_shl_load+:} false; then :
17343  $as_echo_n "(cached) " >&6
17344else
17345  ac_check_lib_save_LIBS=$LIBS
17346LIBS="-ldld  $LIBS"
17347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17348/* end confdefs.h.  */
17349
17350/* Override any GCC internal prototype to avoid an error.
17351   Use char because int might match the return type of a GCC
17352   builtin and then its argument prototype would still apply.  */
17353#ifdef __cplusplus
17354extern "C"
17355#endif
17356char shl_load ();
17357int
17358main ()
17359{
17360return shl_load ();
17361  ;
17362  return 0;
17363}
17364_ACEOF
17365if ac_fn_c_try_link "$LINENO"; then :
17366  ac_cv_lib_dld_shl_load=yes
17367else
17368  ac_cv_lib_dld_shl_load=no
17369fi
17370rm -f core conftest.err conftest.$ac_objext \
17371    conftest$ac_exeext conftest.$ac_ext
17372LIBS=$ac_check_lib_save_LIBS
17373fi
17374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
17375$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
17376if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
17377  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
17378else
17379  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
17380if test "x$ac_cv_func_dlopen" = xyes; then :
17381  lt_cv_dlopen=dlopen
17382else
17383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
17384$as_echo_n "checking for dlopen in -ldl... " >&6; }
17385if ${ac_cv_lib_dl_dlopen+:} false; then :
17386  $as_echo_n "(cached) " >&6
17387else
17388  ac_check_lib_save_LIBS=$LIBS
17389LIBS="-ldl  $LIBS"
17390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17391/* end confdefs.h.  */
17392
17393/* Override any GCC internal prototype to avoid an error.
17394   Use char because int might match the return type of a GCC
17395   builtin and then its argument prototype would still apply.  */
17396#ifdef __cplusplus
17397extern "C"
17398#endif
17399char dlopen ();
17400int
17401main ()
17402{
17403return dlopen ();
17404  ;
17405  return 0;
17406}
17407_ACEOF
17408if ac_fn_c_try_link "$LINENO"; then :
17409  ac_cv_lib_dl_dlopen=yes
17410else
17411  ac_cv_lib_dl_dlopen=no
17412fi
17413rm -f core conftest.err conftest.$ac_objext \
17414    conftest$ac_exeext conftest.$ac_ext
17415LIBS=$ac_check_lib_save_LIBS
17416fi
17417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
17418$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
17419if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
17420  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
17421else
17422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
17423$as_echo_n "checking for dlopen in -lsvld... " >&6; }
17424if ${ac_cv_lib_svld_dlopen+:} false; then :
17425  $as_echo_n "(cached) " >&6
17426else
17427  ac_check_lib_save_LIBS=$LIBS
17428LIBS="-lsvld  $LIBS"
17429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17430/* end confdefs.h.  */
17431
17432/* Override any GCC internal prototype to avoid an error.
17433   Use char because int might match the return type of a GCC
17434   builtin and then its argument prototype would still apply.  */
17435#ifdef __cplusplus
17436extern "C"
17437#endif
17438char dlopen ();
17439int
17440main ()
17441{
17442return dlopen ();
17443  ;
17444  return 0;
17445}
17446_ACEOF
17447if ac_fn_c_try_link "$LINENO"; then :
17448  ac_cv_lib_svld_dlopen=yes
17449else
17450  ac_cv_lib_svld_dlopen=no
17451fi
17452rm -f core conftest.err conftest.$ac_objext \
17453    conftest$ac_exeext conftest.$ac_ext
17454LIBS=$ac_check_lib_save_LIBS
17455fi
17456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
17457$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
17458if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
17459  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
17460else
17461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
17462$as_echo_n "checking for dld_link in -ldld... " >&6; }
17463if ${ac_cv_lib_dld_dld_link+:} false; then :
17464  $as_echo_n "(cached) " >&6
17465else
17466  ac_check_lib_save_LIBS=$LIBS
17467LIBS="-ldld  $LIBS"
17468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17469/* end confdefs.h.  */
17470
17471/* Override any GCC internal prototype to avoid an error.
17472   Use char because int might match the return type of a GCC
17473   builtin and then its argument prototype would still apply.  */
17474#ifdef __cplusplus
17475extern "C"
17476#endif
17477char dld_link ();
17478int
17479main ()
17480{
17481return dld_link ();
17482  ;
17483  return 0;
17484}
17485_ACEOF
17486if ac_fn_c_try_link "$LINENO"; then :
17487  ac_cv_lib_dld_dld_link=yes
17488else
17489  ac_cv_lib_dld_dld_link=no
17490fi
17491rm -f core conftest.err conftest.$ac_objext \
17492    conftest$ac_exeext conftest.$ac_ext
17493LIBS=$ac_check_lib_save_LIBS
17494fi
17495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
17496$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
17497if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
17498  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
17499fi
17500
17501
17502fi
17503
17504
17505fi
17506
17507
17508fi
17509
17510
17511fi
17512
17513
17514fi
17515
17516    ;;
17517  esac
17518
17519  if test no = "$lt_cv_dlopen"; then
17520    enable_dlopen=no
17521  else
17522    enable_dlopen=yes
17523  fi
17524
17525  case $lt_cv_dlopen in
17526  dlopen)
17527    save_CPPFLAGS=$CPPFLAGS
17528    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
17529
17530    save_LDFLAGS=$LDFLAGS
17531    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
17532
17533    save_LIBS=$LIBS
17534    LIBS="$lt_cv_dlopen_libs $LIBS"
17535
17536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
17537$as_echo_n "checking whether a program can dlopen itself... " >&6; }
17538if ${lt_cv_dlopen_self+:} false; then :
17539  $as_echo_n "(cached) " >&6
17540else
17541  	  if test yes = "$cross_compiling"; then :
17542  lt_cv_dlopen_self=cross
17543else
17544  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17545  lt_status=$lt_dlunknown
17546  cat > conftest.$ac_ext <<_LT_EOF
17547#line $LINENO "configure"
17548#include "confdefs.h"
17549
17550#if HAVE_DLFCN_H
17551#include <dlfcn.h>
17552#endif
17553
17554#include <stdio.h>
17555
17556#ifdef RTLD_GLOBAL
17557#  define LT_DLGLOBAL		RTLD_GLOBAL
17558#else
17559#  ifdef DL_GLOBAL
17560#    define LT_DLGLOBAL		DL_GLOBAL
17561#  else
17562#    define LT_DLGLOBAL		0
17563#  endif
17564#endif
17565
17566/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17567   find out it does not work in some platform. */
17568#ifndef LT_DLLAZY_OR_NOW
17569#  ifdef RTLD_LAZY
17570#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
17571#  else
17572#    ifdef DL_LAZY
17573#      define LT_DLLAZY_OR_NOW		DL_LAZY
17574#    else
17575#      ifdef RTLD_NOW
17576#        define LT_DLLAZY_OR_NOW	RTLD_NOW
17577#      else
17578#        ifdef DL_NOW
17579#          define LT_DLLAZY_OR_NOW	DL_NOW
17580#        else
17581#          define LT_DLLAZY_OR_NOW	0
17582#        endif
17583#      endif
17584#    endif
17585#  endif
17586#endif
17587
17588/* When -fvisibility=hidden is used, assume the code has been annotated
17589   correspondingly for the symbols needed.  */
17590#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
17591int fnord () __attribute__((visibility("default")));
17592#endif
17593
17594int fnord () { return 42; }
17595int main ()
17596{
17597  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17598  int status = $lt_dlunknown;
17599
17600  if (self)
17601    {
17602      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
17603      else
17604        {
17605	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
17606          else puts (dlerror ());
17607	}
17608      /* dlclose (self); */
17609    }
17610  else
17611    puts (dlerror ());
17612
17613  return status;
17614}
17615_LT_EOF
17616  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17617  (eval $ac_link) 2>&5
17618  ac_status=$?
17619  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17620  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
17621    (./conftest; exit; ) >&5 2>/dev/null
17622    lt_status=$?
17623    case x$lt_status in
17624      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
17625      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
17626      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
17627    esac
17628  else :
17629    # compilation failed
17630    lt_cv_dlopen_self=no
17631  fi
17632fi
17633rm -fr conftest*
17634
17635
17636fi
17637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
17638$as_echo "$lt_cv_dlopen_self" >&6; }
17639
17640    if test yes = "$lt_cv_dlopen_self"; then
17641      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
17642      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
17643$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
17644if ${lt_cv_dlopen_self_static+:} false; then :
17645  $as_echo_n "(cached) " >&6
17646else
17647  	  if test yes = "$cross_compiling"; then :
17648  lt_cv_dlopen_self_static=cross
17649else
17650  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17651  lt_status=$lt_dlunknown
17652  cat > conftest.$ac_ext <<_LT_EOF
17653#line $LINENO "configure"
17654#include "confdefs.h"
17655
17656#if HAVE_DLFCN_H
17657#include <dlfcn.h>
17658#endif
17659
17660#include <stdio.h>
17661
17662#ifdef RTLD_GLOBAL
17663#  define LT_DLGLOBAL		RTLD_GLOBAL
17664#else
17665#  ifdef DL_GLOBAL
17666#    define LT_DLGLOBAL		DL_GLOBAL
17667#  else
17668#    define LT_DLGLOBAL		0
17669#  endif
17670#endif
17671
17672/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
17673   find out it does not work in some platform. */
17674#ifndef LT_DLLAZY_OR_NOW
17675#  ifdef RTLD_LAZY
17676#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
17677#  else
17678#    ifdef DL_LAZY
17679#      define LT_DLLAZY_OR_NOW		DL_LAZY
17680#    else
17681#      ifdef RTLD_NOW
17682#        define LT_DLLAZY_OR_NOW	RTLD_NOW
17683#      else
17684#        ifdef DL_NOW
17685#          define LT_DLLAZY_OR_NOW	DL_NOW
17686#        else
17687#          define LT_DLLAZY_OR_NOW	0
17688#        endif
17689#      endif
17690#    endif
17691#  endif
17692#endif
17693
17694/* When -fvisibility=hidden is used, assume the code has been annotated
17695   correspondingly for the symbols needed.  */
17696#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
17697int fnord () __attribute__((visibility("default")));
17698#endif
17699
17700int fnord () { return 42; }
17701int main ()
17702{
17703  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17704  int status = $lt_dlunknown;
17705
17706  if (self)
17707    {
17708      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
17709      else
17710        {
17711	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
17712          else puts (dlerror ());
17713	}
17714      /* dlclose (self); */
17715    }
17716  else
17717    puts (dlerror ());
17718
17719  return status;
17720}
17721_LT_EOF
17722  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17723  (eval $ac_link) 2>&5
17724  ac_status=$?
17725  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17726  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
17727    (./conftest; exit; ) >&5 2>/dev/null
17728    lt_status=$?
17729    case x$lt_status in
17730      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
17731      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
17732      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
17733    esac
17734  else :
17735    # compilation failed
17736    lt_cv_dlopen_self_static=no
17737  fi
17738fi
17739rm -fr conftest*
17740
17741
17742fi
17743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
17744$as_echo "$lt_cv_dlopen_self_static" >&6; }
17745    fi
17746
17747    CPPFLAGS=$save_CPPFLAGS
17748    LDFLAGS=$save_LDFLAGS
17749    LIBS=$save_LIBS
17750    ;;
17751  esac
17752
17753  case $lt_cv_dlopen_self in
17754  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
17755  *) enable_dlopen_self=unknown ;;
17756  esac
17757
17758  case $lt_cv_dlopen_self_static in
17759  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
17760  *) enable_dlopen_self_static=unknown ;;
17761  esac
17762fi
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780striplib=
17781old_striplib=
17782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
17783$as_echo_n "checking whether stripping libraries is possible... " >&6; }
17784if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "strip" >/dev/null; then
17785  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
17786  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
17787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17788$as_echo "yes" >&6; }
17789else
17790# FIXME - insert some real tests, host_os isn't really good enough
17791  case $host_os in
17792  darwin*)
17793    if test -n "$STRIP"; then
17794      striplib="$STRIP -x"
17795      old_striplib="$STRIP -S"
17796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17797$as_echo "yes" >&6; }
17798    else
17799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17800$as_echo "no" >&6; }
17801    fi
17802    ;;
17803  *)
17804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17805$as_echo "no" >&6; }
17806    ;;
17807  esac
17808fi
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821  # Report what library types will actually be built
17822  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
17823$as_echo_n "checking if libtool supports shared libraries... " >&6; }
17824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
17825$as_echo "$can_build_shared" >&6; }
17826
17827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
17828$as_echo_n "checking whether to build shared libraries... " >&6; }
17829  test no = "$can_build_shared" && enable_shared=no
17830
17831  # On AIX, shared libraries and static libraries use the same namespace, and
17832  # are all built from PIC.
17833  case $host_os in
17834  aix3*)
17835    test yes = "$enable_shared" && enable_static=no
17836    if test -n "$RANLIB"; then
17837      archive_cmds="$archive_cmds~\$RANLIB \$lib"
17838      postinstall_cmds='$RANLIB $lib'
17839    fi
17840    ;;
17841
17842  aix[4-9]*)
17843    if test ia64 != "$host_cpu"; then
17844      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
17845      yes,aix,yes) ;;			# shared object as lib.so file only
17846      yes,svr4,*) ;;			# shared object as lib.so archive member only
17847      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
17848      esac
17849    fi
17850    ;;
17851  esac
17852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
17853$as_echo "$enable_shared" >&6; }
17854
17855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
17856$as_echo_n "checking whether to build static libraries... " >&6; }
17857  # Make sure either enable_shared or enable_static is yes.
17858  test yes = "$enable_shared" || enable_static=yes
17859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
17860$as_echo "$enable_static" >&6; }
17861
17862
17863
17864
17865fi
17866ac_ext=c
17867ac_cpp='$CPP $CPPFLAGS'
17868ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17869ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17870ac_compiler_gnu=$ac_cv_c_compiler_gnu
17871
17872CC=$lt_save_CC
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888        ac_config_commands="$ac_config_commands libtool"
17889
17890
17891
17892
17893# Only expand once:
17894
17895
17896
17897if test -n "$ac_tool_prefix"; then
17898  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
17899set dummy ${ac_tool_prefix}windres; ac_word=$2
17900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17901$as_echo_n "checking for $ac_word... " >&6; }
17902if ${ac_cv_prog_RC+:} false; then :
17903  $as_echo_n "(cached) " >&6
17904else
17905  if test -n "$RC"; then
17906  ac_cv_prog_RC="$RC" # Let the user override the test.
17907else
17908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17909for as_dir in $PATH
17910do
17911  IFS=$as_save_IFS
17912  test -z "$as_dir" && as_dir=.
17913    for ac_exec_ext in '' $ac_executable_extensions; do
17914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17915    ac_cv_prog_RC="${ac_tool_prefix}windres"
17916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17917    break 2
17918  fi
17919done
17920  done
17921IFS=$as_save_IFS
17922
17923fi
17924fi
17925RC=$ac_cv_prog_RC
17926if test -n "$RC"; then
17927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
17928$as_echo "$RC" >&6; }
17929else
17930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17931$as_echo "no" >&6; }
17932fi
17933
17934
17935fi
17936if test -z "$ac_cv_prog_RC"; then
17937  ac_ct_RC=$RC
17938  # Extract the first word of "windres", so it can be a program name with args.
17939set dummy windres; ac_word=$2
17940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17941$as_echo_n "checking for $ac_word... " >&6; }
17942if ${ac_cv_prog_ac_ct_RC+:} false; then :
17943  $as_echo_n "(cached) " >&6
17944else
17945  if test -n "$ac_ct_RC"; then
17946  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
17947else
17948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17949for as_dir in $PATH
17950do
17951  IFS=$as_save_IFS
17952  test -z "$as_dir" && as_dir=.
17953    for ac_exec_ext in '' $ac_executable_extensions; do
17954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17955    ac_cv_prog_ac_ct_RC="windres"
17956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17957    break 2
17958  fi
17959done
17960  done
17961IFS=$as_save_IFS
17962
17963fi
17964fi
17965ac_ct_RC=$ac_cv_prog_ac_ct_RC
17966if test -n "$ac_ct_RC"; then
17967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
17968$as_echo "$ac_ct_RC" >&6; }
17969else
17970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17971$as_echo "no" >&6; }
17972fi
17973
17974  if test "x$ac_ct_RC" = x; then
17975    RC=""
17976  else
17977    case $cross_compiling:$ac_tool_warned in
17978yes:)
17979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17981ac_tool_warned=yes ;;
17982esac
17983    RC=$ac_ct_RC
17984  fi
17985else
17986  RC="$ac_cv_prog_RC"
17987fi
17988
17989
17990
17991
17992# Source file extension for RC test sources.
17993ac_ext=rc
17994
17995# Object file extension for compiled RC test sources.
17996objext=o
17997objext_RC=$objext
17998
17999# Code to be used in simple compile tests
18000lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
18001
18002# Code to be used in simple link tests
18003lt_simple_link_test_code=$lt_simple_compile_test_code
18004
18005# ltmain only uses $CC for tagged configurations so make sure $CC is set.
18006
18007
18008
18009
18010
18011
18012# If no C compiler was specified, use CC.
18013LTCC=${LTCC-"$CC"}
18014
18015# If no C compiler flags were specified, use CFLAGS.
18016LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
18017
18018# Allow CC to be a program name with arguments.
18019compiler=$CC
18020
18021
18022# save warnings/boilerplate of simple test code
18023ac_outfile=conftest.$ac_objext
18024echo "$lt_simple_compile_test_code" >conftest.$ac_ext
18025eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
18026_lt_compiler_boilerplate=`cat conftest.err`
18027$RM conftest*
18028
18029ac_outfile=conftest.$ac_objext
18030echo "$lt_simple_link_test_code" >conftest.$ac_ext
18031eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
18032_lt_linker_boilerplate=`cat conftest.err`
18033$RM -r conftest*
18034
18035
18036# Allow CC to be a program name with arguments.
18037lt_save_CC=$CC
18038lt_save_CFLAGS=$CFLAGS
18039lt_save_GCC=$GCC
18040GCC=
18041CC=${RC-"windres"}
18042CFLAGS=
18043compiler=$CC
18044compiler_RC=$CC
18045func_cc_basename $compiler
18046cc_basename=$func_cc_basename_result
18047
18048lt_cv_prog_compiler_c_o_RC=yes
18049
18050if test -n "$compiler"; then
18051  :
18052
18053
18054
18055fi
18056
18057GCC=$lt_save_GCC
18058ac_ext=c
18059ac_cpp='$CPP $CPPFLAGS'
18060ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18061ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18062ac_compiler_gnu=$ac_cv_c_compiler_gnu
18063
18064CC=$lt_save_CC
18065CFLAGS=$lt_save_CFLAGS
18066
18067
18068case "$host_os" in
18069  mingw* | cygwin*) special_makefile_rules=woe32 ;;
18070  os2*) special_makefile_rules=os2 ;;
18071  *) special_makefile_rules=none ;;
18072esac
18073 if test $special_makefile_rules = woe32; then
18074  WOE32_TRUE=
18075  WOE32_FALSE='#'
18076else
18077  WOE32_TRUE='#'
18078  WOE32_FALSE=
18079fi
18080
18081 if test $special_makefile_rules = os2; then
18082  OS2_TRUE=
18083  OS2_FALSE='#'
18084else
18085  OS2_TRUE='#'
18086  OS2_FALSE=
18087fi
18088
18089
18090case "$host_os" in
18091  mingw*) is_windows_native=yes ;;
18092  *) is_windows_native=no ;;
18093esac
18094 if test $is_windows_native = yes; then
18095  WINDOWS_NATIVE_TRUE=
18096  WINDOWS_NATIVE_FALSE='#'
18097else
18098  WINDOWS_NATIVE_TRUE='#'
18099  WINDOWS_NATIVE_FALSE=
18100fi
18101
18102
18103case "$host_os" in
18104  cygwin*) ac_cv_lib_error_at_line=no ;;
18105esac
18106
18107
18108
18109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
18110$as_echo_n "checking whether NLS is requested... " >&6; }
18111    # Check whether --enable-nls was given.
18112if test "${enable_nls+set}" = set; then :
18113  enableval=$enable_nls; USE_NLS=$enableval
18114else
18115  USE_NLS=yes
18116fi
18117
18118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
18119$as_echo "$USE_NLS" >&6; }
18120
18121
18122
18123
18124      GETTEXT_MACRO_VERSION=0.20
18125
18126
18127
18128
18129# Prepare PATH_SEPARATOR.
18130# The user is always right.
18131if test "${PATH_SEPARATOR+set}" != set; then
18132  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
18133  # contains only /bin. Note that ksh looks also at the FPATH variable,
18134  # so we have to set that as well for the test.
18135  PATH_SEPARATOR=:
18136  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
18137    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
18138           || PATH_SEPARATOR=';'
18139       }
18140fi
18141
18142# Find out how to test for executable files. Don't use a zero-byte file,
18143# as systems may use methods other than mode bits to determine executability.
18144cat >conf$$.file <<_ASEOF
18145#! /bin/sh
18146exit 0
18147_ASEOF
18148chmod +x conf$$.file
18149if test -x conf$$.file >/dev/null 2>&1; then
18150  ac_executable_p="test -x"
18151else
18152  ac_executable_p="test -f"
18153fi
18154rm -f conf$$.file
18155
18156# Extract the first word of "msgfmt", so it can be a program name with args.
18157set dummy msgfmt; ac_word=$2
18158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18159$as_echo_n "checking for $ac_word... " >&6; }
18160if ${ac_cv_path_MSGFMT+:} false; then :
18161  $as_echo_n "(cached) " >&6
18162else
18163  case "$MSGFMT" in
18164  [\\/]* | ?:[\\/]*)
18165    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18166    ;;
18167  *)
18168    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
18169    for ac_dir in $PATH; do
18170      IFS="$ac_save_IFS"
18171      test -z "$ac_dir" && ac_dir=.
18172      for ac_exec_ext in '' $ac_executable_extensions; do
18173        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
18174          echo "$as_me: trying $ac_dir/$ac_word..." >&5
18175          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
18176     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
18177            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
18178            break 2
18179          fi
18180        fi
18181      done
18182    done
18183    IFS="$ac_save_IFS"
18184  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
18185    ;;
18186esac
18187fi
18188MSGFMT="$ac_cv_path_MSGFMT"
18189if test "$MSGFMT" != ":"; then
18190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18191$as_echo "$MSGFMT" >&6; }
18192else
18193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18194$as_echo "no" >&6; }
18195fi
18196
18197  # Extract the first word of "gmsgfmt", so it can be a program name with args.
18198set dummy gmsgfmt; ac_word=$2
18199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18200$as_echo_n "checking for $ac_word... " >&6; }
18201if ${ac_cv_path_GMSGFMT+:} false; then :
18202  $as_echo_n "(cached) " >&6
18203else
18204  case $GMSGFMT in
18205  [\\/]* | ?:[\\/]*)
18206  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
18207  ;;
18208  *)
18209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18210for as_dir in $PATH
18211do
18212  IFS=$as_save_IFS
18213  test -z "$as_dir" && as_dir=.
18214    for ac_exec_ext in '' $ac_executable_extensions; do
18215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18216    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
18217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18218    break 2
18219  fi
18220done
18221  done
18222IFS=$as_save_IFS
18223
18224  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
18225  ;;
18226esac
18227fi
18228GMSGFMT=$ac_cv_path_GMSGFMT
18229if test -n "$GMSGFMT"; then
18230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
18231$as_echo "$GMSGFMT" >&6; }
18232else
18233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18234$as_echo "no" >&6; }
18235fi
18236
18237
18238
18239    case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
18240    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
18241    *) GMSGFMT_015=$GMSGFMT ;;
18242  esac
18243
18244
18245
18246# Prepare PATH_SEPARATOR.
18247# The user is always right.
18248if test "${PATH_SEPARATOR+set}" != set; then
18249  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
18250  # contains only /bin. Note that ksh looks also at the FPATH variable,
18251  # so we have to set that as well for the test.
18252  PATH_SEPARATOR=:
18253  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
18254    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
18255           || PATH_SEPARATOR=';'
18256       }
18257fi
18258
18259# Find out how to test for executable files. Don't use a zero-byte file,
18260# as systems may use methods other than mode bits to determine executability.
18261cat >conf$$.file <<_ASEOF
18262#! /bin/sh
18263exit 0
18264_ASEOF
18265chmod +x conf$$.file
18266if test -x conf$$.file >/dev/null 2>&1; then
18267  ac_executable_p="test -x"
18268else
18269  ac_executable_p="test -f"
18270fi
18271rm -f conf$$.file
18272
18273# Extract the first word of "xgettext", so it can be a program name with args.
18274set dummy xgettext; ac_word=$2
18275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18276$as_echo_n "checking for $ac_word... " >&6; }
18277if ${ac_cv_path_XGETTEXT+:} false; then :
18278  $as_echo_n "(cached) " >&6
18279else
18280  case "$XGETTEXT" in
18281  [\\/]* | ?:[\\/]*)
18282    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18283    ;;
18284  *)
18285    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
18286    for ac_dir in $PATH; do
18287      IFS="$ac_save_IFS"
18288      test -z "$ac_dir" && ac_dir=.
18289      for ac_exec_ext in '' $ac_executable_extensions; do
18290        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
18291          echo "$as_me: trying $ac_dir/$ac_word..." >&5
18292          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
18293     (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
18294            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
18295            break 2
18296          fi
18297        fi
18298      done
18299    done
18300    IFS="$ac_save_IFS"
18301  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
18302    ;;
18303esac
18304fi
18305XGETTEXT="$ac_cv_path_XGETTEXT"
18306if test "$XGETTEXT" != ":"; then
18307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18308$as_echo "$XGETTEXT" >&6; }
18309else
18310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18311$as_echo "no" >&6; }
18312fi
18313
18314    rm -f messages.po
18315
18316    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
18317    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
18318    *) XGETTEXT_015=$XGETTEXT ;;
18319  esac
18320
18321
18322
18323# Prepare PATH_SEPARATOR.
18324# The user is always right.
18325if test "${PATH_SEPARATOR+set}" != set; then
18326  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
18327  # contains only /bin. Note that ksh looks also at the FPATH variable,
18328  # so we have to set that as well for the test.
18329  PATH_SEPARATOR=:
18330  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
18331    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
18332           || PATH_SEPARATOR=';'
18333       }
18334fi
18335
18336# Find out how to test for executable files. Don't use a zero-byte file,
18337# as systems may use methods other than mode bits to determine executability.
18338cat >conf$$.file <<_ASEOF
18339#! /bin/sh
18340exit 0
18341_ASEOF
18342chmod +x conf$$.file
18343if test -x conf$$.file >/dev/null 2>&1; then
18344  ac_executable_p="test -x"
18345else
18346  ac_executable_p="test -f"
18347fi
18348rm -f conf$$.file
18349
18350# Extract the first word of "msgmerge", so it can be a program name with args.
18351set dummy msgmerge; ac_word=$2
18352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18353$as_echo_n "checking for $ac_word... " >&6; }
18354if ${ac_cv_path_MSGMERGE+:} false; then :
18355  $as_echo_n "(cached) " >&6
18356else
18357  case "$MSGMERGE" in
18358  [\\/]* | ?:[\\/]*)
18359    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18360    ;;
18361  *)
18362    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
18363    for ac_dir in $PATH; do
18364      IFS="$ac_save_IFS"
18365      test -z "$ac_dir" && ac_dir=.
18366      for ac_exec_ext in '' $ac_executable_extensions; do
18367        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
18368          echo "$as_me: trying $ac_dir/$ac_word..." >&5
18369          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
18370            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
18371            break 2
18372          fi
18373        fi
18374      done
18375    done
18376    IFS="$ac_save_IFS"
18377  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
18378    ;;
18379esac
18380fi
18381MSGMERGE="$ac_cv_path_MSGMERGE"
18382if test "$MSGMERGE" != ":"; then
18383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18384$as_echo "$MSGMERGE" >&6; }
18385else
18386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18387$as_echo "no" >&6; }
18388fi
18389
18390
18391    if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then
18392    MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
18393  else
18394        if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then
18395      MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet'
18396    else
18397                        MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet'
18398    fi
18399  fi
18400
18401
18402    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
18403
18404
18405  ac_config_commands="$ac_config_commands po-directories"
18406
18407
18408
18409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2 or newer" >&5
18410$as_echo_n "checking whether we are using the GNU C Library 2 or newer... " >&6; }
18411if ${ac_cv_gnu_library_2+:} false; then :
18412  $as_echo_n "(cached) " >&6
18413else
18414  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18415/* end confdefs.h.  */
18416
18417#include <features.h>
18418#ifdef __GNU_LIBRARY__
18419 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
18420  Lucky GNU user
18421 #endif
18422#endif
18423
18424_ACEOF
18425if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18426  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
18427  ac_cv_gnu_library_2=yes
18428else
18429  ac_cv_gnu_library_2=no
18430fi
18431rm -f conftest*
18432
18433
18434
18435fi
18436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2" >&5
18437$as_echo "$ac_cv_gnu_library_2" >&6; }
18438
18439    GLIBC2="$ac_cv_gnu_library_2"
18440
18441
18442
18443
18444  CFLAG_VISIBILITY=
18445  HAVE_VISIBILITY=0
18446  if test -n "$GCC"; then
18447                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
18448$as_echo_n "checking whether the -Werror option is usable... " >&6; }
18449if ${gl_cv_cc_vis_werror+:} false; then :
18450  $as_echo_n "(cached) " >&6
18451else
18452  gl_save_CFLAGS="$CFLAGS"
18453       CFLAGS="$CFLAGS -Werror"
18454       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18455/* end confdefs.h.  */
18456
18457int
18458main ()
18459{
18460
18461  ;
18462  return 0;
18463}
18464_ACEOF
18465if ac_fn_c_try_compile "$LINENO"; then :
18466  gl_cv_cc_vis_werror=yes
18467else
18468  gl_cv_cc_vis_werror=no
18469fi
18470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18471       CFLAGS="$gl_save_CFLAGS"
18472
18473fi
18474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
18475$as_echo "$gl_cv_cc_vis_werror" >&6; }
18476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
18477$as_echo_n "checking for simple visibility declarations... " >&6; }
18478if ${gl_cv_cc_visibility+:} false; then :
18479  $as_echo_n "(cached) " >&6
18480else
18481  gl_save_CFLAGS="$CFLAGS"
18482       CFLAGS="$CFLAGS -fvisibility=hidden"
18483                                          if test $gl_cv_cc_vis_werror = yes; then
18484         CFLAGS="$CFLAGS -Werror"
18485       fi
18486       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18487/* end confdefs.h.  */
18488extern __attribute__((__visibility__("hidden"))) int hiddenvar;
18489              extern __attribute__((__visibility__("default"))) int exportedvar;
18490              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
18491              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
18492              void dummyfunc (void) {}
18493
18494int
18495main ()
18496{
18497
18498  ;
18499  return 0;
18500}
18501_ACEOF
18502if ac_fn_c_try_compile "$LINENO"; then :
18503  gl_cv_cc_visibility=yes
18504else
18505  gl_cv_cc_visibility=no
18506fi
18507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18508       CFLAGS="$gl_save_CFLAGS"
18509
18510fi
18511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
18512$as_echo "$gl_cv_cc_visibility" >&6; }
18513    if test $gl_cv_cc_visibility = yes; then
18514      CFLAG_VISIBILITY="-fvisibility=hidden"
18515      HAVE_VISIBILITY=1
18516    fi
18517  fi
18518
18519
18520
18521cat >>confdefs.h <<_ACEOF
18522#define HAVE_VISIBILITY $HAVE_VISIBILITY
18523_ACEOF
18524
18525
18526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
18527$as_echo_n "checking for inline... " >&6; }
18528if ${ac_cv_c_inline+:} false; then :
18529  $as_echo_n "(cached) " >&6
18530else
18531  ac_cv_c_inline=no
18532for ac_kw in inline __inline__ __inline; do
18533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18534/* end confdefs.h.  */
18535#ifndef __cplusplus
18536typedef int foo_t;
18537static $ac_kw foo_t static_foo () {return 0; }
18538$ac_kw foo_t foo () {return 0; }
18539#endif
18540
18541_ACEOF
18542if ac_fn_c_try_compile "$LINENO"; then :
18543  ac_cv_c_inline=$ac_kw
18544fi
18545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18546  test "$ac_cv_c_inline" != no && break
18547done
18548
18549fi
18550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
18551$as_echo "$ac_cv_c_inline" >&6; }
18552
18553case $ac_cv_c_inline in
18554  inline | yes) ;;
18555  *)
18556    case $ac_cv_c_inline in
18557      no) ac_val=;;
18558      *) ac_val=$ac_cv_c_inline;;
18559    esac
18560    cat >>confdefs.h <<_ACEOF
18561#ifndef __cplusplus
18562#define inline $ac_val
18563#endif
18564_ACEOF
18565    ;;
18566esac
18567
18568ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
18569if test "x$ac_cv_type_size_t" = xyes; then :
18570
18571else
18572
18573cat >>confdefs.h <<_ACEOF
18574#define size_t unsigned int
18575_ACEOF
18576
18577fi
18578
18579
18580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
18581$as_echo_n "checking for stdint.h... " >&6; }
18582if ${gl_cv_header_stdint_h+:} false; then :
18583  $as_echo_n "(cached) " >&6
18584else
18585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18586/* end confdefs.h.  */
18587#include <sys/types.h>
18588            #include <stdint.h>
18589int
18590main ()
18591{
18592uintmax_t i = (uintmax_t) -1; return !i;
18593  ;
18594  return 0;
18595}
18596_ACEOF
18597if ac_fn_c_try_compile "$LINENO"; then :
18598  gl_cv_header_stdint_h=yes
18599else
18600  gl_cv_header_stdint_h=no
18601fi
18602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18603fi
18604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
18605$as_echo "$gl_cv_header_stdint_h" >&6; }
18606  if test $gl_cv_header_stdint_h = yes; then
18607
18608cat >>confdefs.h <<_ACEOF
18609#define HAVE_STDINT_H_WITH_UINTMAX 1
18610_ACEOF
18611
18612  fi
18613
18614# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
18615# for constant arguments.  Useless!
18616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
18617$as_echo_n "checking for working alloca.h... " >&6; }
18618if ${ac_cv_working_alloca_h+:} false; then :
18619  $as_echo_n "(cached) " >&6
18620else
18621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18622/* end confdefs.h.  */
18623#include <alloca.h>
18624int
18625main ()
18626{
18627char *p = (char *) alloca (2 * sizeof (int));
18628			  if (p) return 0;
18629  ;
18630  return 0;
18631}
18632_ACEOF
18633if ac_fn_c_try_link "$LINENO"; then :
18634  ac_cv_working_alloca_h=yes
18635else
18636  ac_cv_working_alloca_h=no
18637fi
18638rm -f core conftest.err conftest.$ac_objext \
18639    conftest$ac_exeext conftest.$ac_ext
18640fi
18641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
18642$as_echo "$ac_cv_working_alloca_h" >&6; }
18643if test $ac_cv_working_alloca_h = yes; then
18644
18645$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
18646
18647fi
18648
18649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
18650$as_echo_n "checking for alloca... " >&6; }
18651if ${ac_cv_func_alloca_works+:} false; then :
18652  $as_echo_n "(cached) " >&6
18653else
18654  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18655/* end confdefs.h.  */
18656#ifdef __GNUC__
18657# define alloca __builtin_alloca
18658#else
18659# ifdef _MSC_VER
18660#  include <malloc.h>
18661#  define alloca _alloca
18662# else
18663#  ifdef HAVE_ALLOCA_H
18664#   include <alloca.h>
18665#  else
18666#   ifdef _AIX
18667 #pragma alloca
18668#   else
18669#    ifndef alloca /* predefined by HP cc +Olibcalls */
18670void *alloca (size_t);
18671#    endif
18672#   endif
18673#  endif
18674# endif
18675#endif
18676
18677int
18678main ()
18679{
18680char *p = (char *) alloca (1);
18681				    if (p) return 0;
18682  ;
18683  return 0;
18684}
18685_ACEOF
18686if ac_fn_c_try_link "$LINENO"; then :
18687  ac_cv_func_alloca_works=yes
18688else
18689  ac_cv_func_alloca_works=no
18690fi
18691rm -f core conftest.err conftest.$ac_objext \
18692    conftest$ac_exeext conftest.$ac_ext
18693fi
18694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
18695$as_echo "$ac_cv_func_alloca_works" >&6; }
18696
18697if test $ac_cv_func_alloca_works = yes; then
18698
18699$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
18700
18701else
18702  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
18703# that cause trouble.  Some versions do not even contain alloca or
18704# contain a buggy version.  If you still want to use their alloca,
18705# use ar to extract alloca.o from them instead of compiling alloca.c.
18706
18707ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
18708
18709$as_echo "#define C_ALLOCA 1" >>confdefs.h
18710
18711
18712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
18713$as_echo_n "checking stack direction for C alloca... " >&6; }
18714if ${ac_cv_c_stack_direction+:} false; then :
18715  $as_echo_n "(cached) " >&6
18716else
18717  if test "$cross_compiling" = yes; then :
18718  ac_cv_c_stack_direction=0
18719else
18720  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18721/* end confdefs.h.  */
18722$ac_includes_default
18723int
18724find_stack_direction (int *addr, int depth)
18725{
18726  int dir, dummy = 0;
18727  if (! addr)
18728    addr = &dummy;
18729  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
18730  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
18731  return dir + dummy;
18732}
18733
18734int
18735main (int argc, char **argv)
18736{
18737  return find_stack_direction (0, argc + !argv + 20) < 0;
18738}
18739_ACEOF
18740if ac_fn_c_try_run "$LINENO"; then :
18741  ac_cv_c_stack_direction=1
18742else
18743  ac_cv_c_stack_direction=-1
18744fi
18745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18746  conftest.$ac_objext conftest.beam conftest.$ac_ext
18747fi
18748
18749fi
18750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
18751$as_echo "$ac_cv_c_stack_direction" >&6; }
18752cat >>confdefs.h <<_ACEOF
18753#define STACK_DIRECTION $ac_cv_c_stack_direction
18754_ACEOF
18755
18756
18757fi
18758
18759
18760
18761
18762  for ac_header in $ac_header_list
18763do :
18764  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18765ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
18766"
18767if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18768  cat >>confdefs.h <<_ACEOF
18769#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18770_ACEOF
18771
18772fi
18773
18774done
18775
18776
18777
18778
18779
18780
18781
18782
18783for ac_func in getpagesize
18784do :
18785  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
18786if test "x$ac_cv_func_getpagesize" = xyes; then :
18787  cat >>confdefs.h <<_ACEOF
18788#define HAVE_GETPAGESIZE 1
18789_ACEOF
18790
18791fi
18792done
18793
18794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
18795$as_echo_n "checking for working mmap... " >&6; }
18796if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
18797  $as_echo_n "(cached) " >&6
18798else
18799  if test "$cross_compiling" = yes; then :
18800  ac_cv_func_mmap_fixed_mapped=no
18801else
18802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18803/* end confdefs.h.  */
18804$ac_includes_default
18805/* malloc might have been renamed as rpl_malloc. */
18806#undef malloc
18807
18808/* Thanks to Mike Haertel and Jim Avera for this test.
18809   Here is a matrix of mmap possibilities:
18810	mmap private not fixed
18811	mmap private fixed at somewhere currently unmapped
18812	mmap private fixed at somewhere already mapped
18813	mmap shared not fixed
18814	mmap shared fixed at somewhere currently unmapped
18815	mmap shared fixed at somewhere already mapped
18816   For private mappings, we should verify that changes cannot be read()
18817   back from the file, nor mmap's back from the file at a different
18818   address.  (There have been systems where private was not correctly
18819   implemented like the infamous i386 svr4.0, and systems where the
18820   VM page cache was not coherent with the file system buffer cache
18821   like early versions of FreeBSD and possibly contemporary NetBSD.)
18822   For shared mappings, we should conversely verify that changes get
18823   propagated back to all the places they're supposed to be.
18824
18825   Grep wants private fixed already mapped.
18826   The main things grep needs to know about mmap are:
18827   * does it exist and is it safe to write into the mmap'd area
18828   * how to use it (BSD variants)  */
18829
18830#include <fcntl.h>
18831#include <sys/mman.h>
18832
18833#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
18834char *malloc ();
18835#endif
18836
18837/* This mess was copied from the GNU getpagesize.h.  */
18838#ifndef HAVE_GETPAGESIZE
18839# ifdef _SC_PAGESIZE
18840#  define getpagesize() sysconf(_SC_PAGESIZE)
18841# else /* no _SC_PAGESIZE */
18842#  ifdef HAVE_SYS_PARAM_H
18843#   include <sys/param.h>
18844#   ifdef EXEC_PAGESIZE
18845#    define getpagesize() EXEC_PAGESIZE
18846#   else /* no EXEC_PAGESIZE */
18847#    ifdef NBPG
18848#     define getpagesize() NBPG * CLSIZE
18849#     ifndef CLSIZE
18850#      define CLSIZE 1
18851#     endif /* no CLSIZE */
18852#    else /* no NBPG */
18853#     ifdef NBPC
18854#      define getpagesize() NBPC
18855#     else /* no NBPC */
18856#      ifdef PAGESIZE
18857#       define getpagesize() PAGESIZE
18858#      endif /* PAGESIZE */
18859#     endif /* no NBPC */
18860#    endif /* no NBPG */
18861#   endif /* no EXEC_PAGESIZE */
18862#  else /* no HAVE_SYS_PARAM_H */
18863#   define getpagesize() 8192	/* punt totally */
18864#  endif /* no HAVE_SYS_PARAM_H */
18865# endif /* no _SC_PAGESIZE */
18866
18867#endif /* no HAVE_GETPAGESIZE */
18868
18869int
18870main ()
18871{
18872  char *data, *data2, *data3;
18873  const char *cdata2;
18874  int i, pagesize;
18875  int fd, fd2;
18876
18877  pagesize = getpagesize ();
18878
18879  /* First, make a file with some known garbage in it. */
18880  data = (char *) malloc (pagesize);
18881  if (!data)
18882    return 1;
18883  for (i = 0; i < pagesize; ++i)
18884    *(data + i) = rand ();
18885  umask (0);
18886  fd = creat ("conftest.mmap", 0600);
18887  if (fd < 0)
18888    return 2;
18889  if (write (fd, data, pagesize) != pagesize)
18890    return 3;
18891  close (fd);
18892
18893  /* Next, check that the tail of a page is zero-filled.  File must have
18894     non-zero length, otherwise we risk SIGBUS for entire page.  */
18895  fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
18896  if (fd2 < 0)
18897    return 4;
18898  cdata2 = "";
18899  if (write (fd2, cdata2, 1) != 1)
18900    return 5;
18901  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
18902  if (data2 == MAP_FAILED)
18903    return 6;
18904  for (i = 0; i < pagesize; ++i)
18905    if (*(data2 + i))
18906      return 7;
18907  close (fd2);
18908  if (munmap (data2, pagesize))
18909    return 8;
18910
18911  /* Next, try to mmap the file at a fixed address which already has
18912     something else allocated at it.  If we can, also make sure that
18913     we see the same garbage.  */
18914  fd = open ("conftest.mmap", O_RDWR);
18915  if (fd < 0)
18916    return 9;
18917  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
18918		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
18919    return 10;
18920  for (i = 0; i < pagesize; ++i)
18921    if (*(data + i) != *(data2 + i))
18922      return 11;
18923
18924  /* Finally, make sure that changes to the mapped area do not
18925     percolate back to the file as seen by read().  (This is a bug on
18926     some variants of i386 svr4.0.)  */
18927  for (i = 0; i < pagesize; ++i)
18928    *(data2 + i) = *(data2 + i) + 1;
18929  data3 = (char *) malloc (pagesize);
18930  if (!data3)
18931    return 12;
18932  if (read (fd, data3, pagesize) != pagesize)
18933    return 13;
18934  for (i = 0; i < pagesize; ++i)
18935    if (*(data + i) != *(data3 + i))
18936      return 14;
18937  close (fd);
18938  return 0;
18939}
18940_ACEOF
18941if ac_fn_c_try_run "$LINENO"; then :
18942  ac_cv_func_mmap_fixed_mapped=yes
18943else
18944  ac_cv_func_mmap_fixed_mapped=no
18945fi
18946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18947  conftest.$ac_objext conftest.beam conftest.$ac_ext
18948fi
18949
18950fi
18951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
18952$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
18953if test $ac_cv_func_mmap_fixed_mapped = yes; then
18954
18955$as_echo "#define HAVE_MMAP 1" >>confdefs.h
18956
18957fi
18958rm -f conftest.mmap conftest.txt
18959
18960
18961
18962  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5
18963$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
18964if ${gt_cv_int_divbyzero_sigfpe+:} false; then :
18965  $as_echo_n "(cached) " >&6
18966else
18967
18968      gt_cv_int_divbyzero_sigfpe=
18969      case "$host_os" in
18970        macos* | darwin[6-9]* | darwin[1-9][0-9]*)
18971          # On Mac OS X 10.2 or newer, just assume the same as when cross-
18972          # compiling. If we were to perform the real test, 1 Crash Report
18973          # dialog window would pop up.
18974          case "$host_cpu" in
18975            i[34567]86 | x86_64)
18976              gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
18977          esac
18978          ;;
18979      esac
18980      if test -z "$gt_cv_int_divbyzero_sigfpe"; then
18981        if test "$cross_compiling" = yes; then :
18982
18983            # Guess based on the CPU.
18984            case "$host_cpu" in
18985              alpha* | i[34567]86 | x86_64 | m68k | s390*)
18986                gt_cv_int_divbyzero_sigfpe="guessing yes";;
18987              *)
18988                gt_cv_int_divbyzero_sigfpe="guessing no";;
18989            esac
18990
18991else
18992  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18993/* end confdefs.h.  */
18994
18995#include <stdlib.h> /* for exit() */
18996#include <signal.h>
18997#if !(defined _WIN32 && !defined __CYGWIN__)
18998#include <unistd.h> /* for _exit() */
18999#endif
19000
19001static void
19002sigfpe_handler (int sig)
19003{
19004  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
19005  _exit (sig != SIGFPE);
19006}
19007
19008int x = 1;
19009int y = 0;
19010int z;
19011int nan;
19012
19013int main ()
19014{
19015  signal (SIGFPE, sigfpe_handler);
19016/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
19017#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
19018  signal (SIGTRAP, sigfpe_handler);
19019#endif
19020/* Linux/SPARC yields signal SIGILL.  */
19021#if defined (__sparc__) && defined (__linux__)
19022  signal (SIGILL, sigfpe_handler);
19023#endif
19024
19025  z = x / y;
19026  nan = y / y;
19027  exit (2);
19028}
19029
19030_ACEOF
19031if ac_fn_c_try_run "$LINENO"; then :
19032  gt_cv_int_divbyzero_sigfpe=yes
19033else
19034  gt_cv_int_divbyzero_sigfpe=no
19035fi
19036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19037  conftest.$ac_objext conftest.beam conftest.$ac_ext
19038fi
19039
19040      fi
19041
19042fi
19043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5
19044$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; }
19045  case "$gt_cv_int_divbyzero_sigfpe" in
19046    *yes) value=1;;
19047    *) value=0;;
19048  esac
19049
19050cat >>confdefs.h <<_ACEOF
19051#define INTDIV0_RAISES_SIGFPE $value
19052_ACEOF
19053
19054
19055
19056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
19057$as_echo_n "checking for inttypes.h... " >&6; }
19058if ${gl_cv_header_inttypes_h+:} false; then :
19059  $as_echo_n "(cached) " >&6
19060else
19061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19062/* end confdefs.h.  */
19063
19064#include <sys/types.h>
19065#include <inttypes.h>
19066
19067int
19068main ()
19069{
19070uintmax_t i = (uintmax_t) -1; return !i;
19071  ;
19072  return 0;
19073}
19074_ACEOF
19075if ac_fn_c_try_compile "$LINENO"; then :
19076  gl_cv_header_inttypes_h=yes
19077else
19078  gl_cv_header_inttypes_h=no
19079fi
19080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19081fi
19082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
19083$as_echo "$gl_cv_header_inttypes_h" >&6; }
19084  if test $gl_cv_header_inttypes_h = yes; then
19085
19086cat >>confdefs.h <<_ACEOF
19087#define HAVE_INTTYPES_H_WITH_UINTMAX 1
19088_ACEOF
19089
19090  fi
19091
19092
19093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
19094$as_echo_n "checking for unsigned long long int... " >&6; }
19095if ${ac_cv_type_unsigned_long_long_int+:} false; then :
19096  $as_echo_n "(cached) " >&6
19097else
19098  ac_cv_type_unsigned_long_long_int=yes
19099     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19100       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19101/* end confdefs.h.  */
19102
19103  /* For now, do not test the preprocessor; as of 2007 there are too many
19104	 implementations with broken preprocessors.  Perhaps this can
19105	 be revisited in 2012.  In the meantime, code should not expect
19106	 #if to work with literals wider than 32 bits.  */
19107      /* Test literals.  */
19108      long long int ll = 9223372036854775807ll;
19109      long long int nll = -9223372036854775807LL;
19110      unsigned long long int ull = 18446744073709551615ULL;
19111      /* Test constant expressions.   */
19112      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
19113		     ? 1 : -1)];
19114      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
19115		     ? 1 : -1)];
19116      int i = 63;
19117int
19118main ()
19119{
19120/* Test availability of runtime routines for shift and division.  */
19121      long long int llmax = 9223372036854775807ll;
19122      unsigned long long int ullmax = 18446744073709551615ull;
19123      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
19124	      | (llmax / ll) | (llmax % ll)
19125	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
19126	      | (ullmax / ull) | (ullmax % ull));
19127  ;
19128  return 0;
19129}
19130
19131_ACEOF
19132if ac_fn_c_try_link "$LINENO"; then :
19133
19134else
19135  ac_cv_type_unsigned_long_long_int=no
19136fi
19137rm -f core conftest.err conftest.$ac_objext \
19138    conftest$ac_exeext conftest.$ac_ext
19139     fi
19140fi
19141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
19142$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
19143  if test $ac_cv_type_unsigned_long_long_int = yes; then
19144
19145$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
19146
19147  fi
19148
19149
19150
19151
19152  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
19153
19154    test $ac_cv_type_unsigned_long_long_int = yes \
19155      && ac_type='unsigned long long' \
19156      || ac_type='unsigned long'
19157
19158cat >>confdefs.h <<_ACEOF
19159#define uintmax_t $ac_type
19160_ACEOF
19161
19162  else
19163
19164$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
19165
19166  fi
19167
19168
19169
19170
19171
19172  gl_threads_api=none
19173  LIBTHREAD=
19174  LTLIBTHREAD=
19175  LIBMULTITHREAD=
19176  LTLIBMULTITHREAD=
19177  if test "$gl_use_threads" != no; then
19178
19179
19180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
19181$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
19182if ${gl_cv_have_weak+:} false; then :
19183  $as_echo_n "(cached) " >&6
19184else
19185  gl_cv_have_weak=no
19186          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19187/* end confdefs.h.  */
19188extern void xyzzy ();
19189#pragma weak xyzzy
19190int
19191main ()
19192{
19193xyzzy();
19194  ;
19195  return 0;
19196}
19197_ACEOF
19198if ac_fn_c_try_link "$LINENO"; then :
19199  gl_cv_have_weak=maybe
19200fi
19201rm -f core conftest.err conftest.$ac_objext \
19202    conftest$ac_exeext conftest.$ac_ext
19203     if test $gl_cv_have_weak = maybe; then
19204                     if test "$cross_compiling" = yes; then :
19205                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19206/* end confdefs.h.  */
19207#ifdef __ELF__
19208             Extensible Linking Format
19209             #endif
19210
19211_ACEOF
19212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19213  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
19214  gl_cv_have_weak="guessing yes"
19215else
19216  gl_cv_have_weak="guessing no"
19217fi
19218rm -f conftest*
19219
19220
19221else
19222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19223/* end confdefs.h.  */
19224
19225#include <stdio.h>
19226#pragma weak fputs
19227int main ()
19228{
19229  return (fputs == NULL);
19230}
19231_ACEOF
19232if ac_fn_c_try_run "$LINENO"; then :
19233  gl_cv_have_weak=yes
19234else
19235  gl_cv_have_weak=no
19236fi
19237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19238  conftest.$ac_objext conftest.beam conftest.$ac_ext
19239fi
19240
19241     fi
19242          case " $LDFLAGS " in
19243       *" -static "*) gl_cv_have_weak=no ;;
19244     esac
19245                    case "$gl_cv_have_weak" in
19246       *yes)
19247         case "$host_os" in
19248           freebsd* | dragonfly*)
19249             : > conftest1.c
19250             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
19251             cat <<EOF > conftest2.c
19252#include <pthread.h>
19253#pragma weak pthread_mutexattr_gettype
19254int main ()
19255{
19256  return (pthread_mutexattr_gettype != NULL);
19257}
19258EOF
19259             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
19260               || gl_cv_have_weak=no
19261             rm -f conftest1.c libempty.so conftest2.c conftest
19262             ;;
19263         esac
19264         ;;
19265     esac
19266
19267fi
19268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
19269$as_echo "$gl_cv_have_weak" >&6; }
19270  case "$gl_cv_have_weak" in
19271    *yes)
19272
19273$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
19274
19275      ;;
19276  esac
19277
19278    if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
19279
19280      :
19281    fi
19282    if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
19283
19284      gl_have_isoc_threads="$ac_cv_header_threads_h"
19285    fi
19286    if test "$gl_use_threads" = yes \
19287       || test "$gl_use_threads" = posix \
19288       || test "$gl_use_threads" = isoc+posix; then
19289
19290
19291  if test -z "$gl_pthreadlib_body_done"; then
19292    gl_pthread_api=no
19293    LIBPTHREAD=
19294    LIBPMULTITHREAD=
19295    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
19296    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
19297    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
19298if test "x$ac_cv_header_pthread_h" = xyes; then :
19299  gl_have_pthread_h=yes
19300else
19301  gl_have_pthread_h=no
19302fi
19303
19304
19305    if test "$gl_have_pthread_h" = yes; then
19306      # Other possible tests:
19307      #   -lpthreads (FSU threads, PCthreads)
19308      #   -lgthreads
19309      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
19310      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
19311      # the second one only in libpthread, and lock.c needs it.
19312      #
19313      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
19314      # needs -pthread for some reason.  See:
19315      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
19316      save_LIBS=$LIBS
19317      for gl_pthread in '' '-pthread'; do
19318        LIBS="$LIBS $gl_pthread"
19319        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19320/* end confdefs.h.  */
19321#include <pthread.h>
19322               pthread_mutex_t m;
19323               pthread_mutexattr_t ma;
19324
19325int
19326main ()
19327{
19328pthread_mutex_lock (&m);
19329               pthread_mutexattr_init (&ma);
19330  ;
19331  return 0;
19332}
19333_ACEOF
19334if ac_fn_c_try_link "$LINENO"; then :
19335  gl_pthread_api=yes
19336           LIBPTHREAD=$gl_pthread
19337           LIBPMULTITHREAD=$gl_pthread
19338fi
19339rm -f core conftest.err conftest.$ac_objext \
19340    conftest$ac_exeext conftest.$ac_ext
19341        LIBS=$save_LIBS
19342        test $gl_pthread_api = yes && break
19343      done
19344
19345      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
19346      # since it is defined as a macro on OSF/1.)
19347      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
19348        # The program links fine without libpthread. But it may actually
19349        # need to link with libpthread in order to create multiple threads.
19350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
19351$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
19352if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
19353  $as_echo_n "(cached) " >&6
19354else
19355  ac_check_lib_save_LIBS=$LIBS
19356LIBS="-lpthread  $LIBS"
19357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19358/* end confdefs.h.  */
19359
19360/* Override any GCC internal prototype to avoid an error.
19361   Use char because int might match the return type of a GCC
19362   builtin and then its argument prototype would still apply.  */
19363#ifdef __cplusplus
19364extern "C"
19365#endif
19366char pthread_kill ();
19367int
19368main ()
19369{
19370return pthread_kill ();
19371  ;
19372  return 0;
19373}
19374_ACEOF
19375if ac_fn_c_try_link "$LINENO"; then :
19376  ac_cv_lib_pthread_pthread_kill=yes
19377else
19378  ac_cv_lib_pthread_pthread_kill=no
19379fi
19380rm -f core conftest.err conftest.$ac_objext \
19381    conftest$ac_exeext conftest.$ac_ext
19382LIBS=$ac_check_lib_save_LIBS
19383fi
19384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
19385$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
19386if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
19387  LIBPMULTITHREAD=-lpthread
19388           # On Solaris and HP-UX, most pthread functions exist also in libc.
19389           # Therefore pthread_in_use() needs to actually try to create a
19390           # thread: pthread_create from libc will fail, whereas
19391           # pthread_create will actually create a thread.
19392           # On Solaris 10 or newer, this test is no longer needed, because
19393           # libc contains the fully functional pthread functions.
19394           case "$host_os" in
19395             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
19396
19397$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
19398
19399           esac
19400
19401fi
19402
19403      elif test $gl_pthread_api != yes; then
19404        # Some library is needed. Try libpthread and libc_r.
19405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
19406$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
19407if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
19408  $as_echo_n "(cached) " >&6
19409else
19410  ac_check_lib_save_LIBS=$LIBS
19411LIBS="-lpthread  $LIBS"
19412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19413/* end confdefs.h.  */
19414
19415/* Override any GCC internal prototype to avoid an error.
19416   Use char because int might match the return type of a GCC
19417   builtin and then its argument prototype would still apply.  */
19418#ifdef __cplusplus
19419extern "C"
19420#endif
19421char pthread_kill ();
19422int
19423main ()
19424{
19425return pthread_kill ();
19426  ;
19427  return 0;
19428}
19429_ACEOF
19430if ac_fn_c_try_link "$LINENO"; then :
19431  ac_cv_lib_pthread_pthread_kill=yes
19432else
19433  ac_cv_lib_pthread_pthread_kill=no
19434fi
19435rm -f core conftest.err conftest.$ac_objext \
19436    conftest$ac_exeext conftest.$ac_ext
19437LIBS=$ac_check_lib_save_LIBS
19438fi
19439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
19440$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
19441if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
19442  gl_pthread_api=yes
19443           LIBPTHREAD=-lpthread
19444           LIBPMULTITHREAD=-lpthread
19445fi
19446
19447        if test $gl_pthread_api != yes; then
19448          # For FreeBSD 4.
19449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
19450$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
19451if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
19452  $as_echo_n "(cached) " >&6
19453else
19454  ac_check_lib_save_LIBS=$LIBS
19455LIBS="-lc_r  $LIBS"
19456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19457/* end confdefs.h.  */
19458
19459/* Override any GCC internal prototype to avoid an error.
19460   Use char because int might match the return type of a GCC
19461   builtin and then its argument prototype would still apply.  */
19462#ifdef __cplusplus
19463extern "C"
19464#endif
19465char pthread_kill ();
19466int
19467main ()
19468{
19469return pthread_kill ();
19470  ;
19471  return 0;
19472}
19473_ACEOF
19474if ac_fn_c_try_link "$LINENO"; then :
19475  ac_cv_lib_c_r_pthread_kill=yes
19476else
19477  ac_cv_lib_c_r_pthread_kill=no
19478fi
19479rm -f core conftest.err conftest.$ac_objext \
19480    conftest$ac_exeext conftest.$ac_ext
19481LIBS=$ac_check_lib_save_LIBS
19482fi
19483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
19484$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
19485if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
19486  gl_pthread_api=yes
19487             LIBPTHREAD=-lc_r
19488             LIBPMULTITHREAD=-lc_r
19489fi
19490
19491        fi
19492      fi
19493    fi
19494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
19495$as_echo_n "checking whether POSIX threads API is available... " >&6; }
19496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
19497$as_echo "$gl_pthread_api" >&6; }
19498
19499
19500    if test $gl_pthread_api = yes; then
19501
19502$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
19503
19504    fi
19505
19506        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19507/* end confdefs.h.  */
19508#include <sched.h>
19509int
19510main ()
19511{
19512sched_yield ();
19513  ;
19514  return 0;
19515}
19516_ACEOF
19517if ac_fn_c_try_link "$LINENO"; then :
19518  LIB_SCHED_YIELD=
19519
19520else
19521         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19522$as_echo_n "checking for sched_yield in -lrt... " >&6; }
19523if ${ac_cv_lib_rt_sched_yield+:} false; then :
19524  $as_echo_n "(cached) " >&6
19525else
19526  ac_check_lib_save_LIBS=$LIBS
19527LIBS="-lrt  $LIBS"
19528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19529/* end confdefs.h.  */
19530
19531/* Override any GCC internal prototype to avoid an error.
19532   Use char because int might match the return type of a GCC
19533   builtin and then its argument prototype would still apply.  */
19534#ifdef __cplusplus
19535extern "C"
19536#endif
19537char sched_yield ();
19538int
19539main ()
19540{
19541return sched_yield ();
19542  ;
19543  return 0;
19544}
19545_ACEOF
19546if ac_fn_c_try_link "$LINENO"; then :
19547  ac_cv_lib_rt_sched_yield=yes
19548else
19549  ac_cv_lib_rt_sched_yield=no
19550fi
19551rm -f core conftest.err conftest.$ac_objext \
19552    conftest$ac_exeext conftest.$ac_ext
19553LIBS=$ac_check_lib_save_LIBS
19554fi
19555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19556$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19557if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
19558  LIB_SCHED_YIELD=-lrt
19559else
19560            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
19561$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
19562if ${ac_cv_lib_posix4_sched_yield+:} false; then :
19563  $as_echo_n "(cached) " >&6
19564else
19565  ac_check_lib_save_LIBS=$LIBS
19566LIBS="-lposix4  $LIBS"
19567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19568/* end confdefs.h.  */
19569
19570/* Override any GCC internal prototype to avoid an error.
19571   Use char because int might match the return type of a GCC
19572   builtin and then its argument prototype would still apply.  */
19573#ifdef __cplusplus
19574extern "C"
19575#endif
19576char sched_yield ();
19577int
19578main ()
19579{
19580return sched_yield ();
19581  ;
19582  return 0;
19583}
19584_ACEOF
19585if ac_fn_c_try_link "$LINENO"; then :
19586  ac_cv_lib_posix4_sched_yield=yes
19587else
19588  ac_cv_lib_posix4_sched_yield=no
19589fi
19590rm -f core conftest.err conftest.$ac_objext \
19591    conftest$ac_exeext conftest.$ac_ext
19592LIBS=$ac_check_lib_save_LIBS
19593fi
19594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
19595$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
19596if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
19597  LIB_SCHED_YIELD=-lposix4
19598fi
19599
19600fi
19601
19602
19603fi
19604rm -f core conftest.err conftest.$ac_objext \
19605    conftest$ac_exeext conftest.$ac_ext
19606
19607
19608    gl_pthreadlib_body_done=done
19609  fi
19610
19611      LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
19612      LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
19613      if test $gl_pthread_api = yes; then
19614        if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
19615          gl_threads_api='isoc+posix'
19616
19617$as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
19618
19619          LIBTHREAD= LTLIBTHREAD=
19620        else
19621          gl_threads_api=posix
19622
19623$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
19624
19625          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
19626            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
19627
19628$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
19629
19630              LIBTHREAD= LTLIBTHREAD=
19631            fi
19632          fi
19633        fi
19634      fi
19635    fi
19636    if test $gl_threads_api = none; then
19637      if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
19638
19639
19640
19641  if test -z "$gl_stdthreadlib_body_done"; then
19642
19643
19644    case "$host_os" in
19645      mingw*)
19646        LIBSTDTHREAD=
19647        ;;
19648      *)
19649
19650
19651  if test -z "$gl_pthreadlib_body_done"; then
19652    gl_pthread_api=no
19653    LIBPTHREAD=
19654    LIBPMULTITHREAD=
19655    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
19656    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
19657    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
19658if test "x$ac_cv_header_pthread_h" = xyes; then :
19659  gl_have_pthread_h=yes
19660else
19661  gl_have_pthread_h=no
19662fi
19663
19664
19665    if test "$gl_have_pthread_h" = yes; then
19666      # Other possible tests:
19667      #   -lpthreads (FSU threads, PCthreads)
19668      #   -lgthreads
19669      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
19670      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
19671      # the second one only in libpthread, and lock.c needs it.
19672      #
19673      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
19674      # needs -pthread for some reason.  See:
19675      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
19676      save_LIBS=$LIBS
19677      for gl_pthread in '' '-pthread'; do
19678        LIBS="$LIBS $gl_pthread"
19679        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19680/* end confdefs.h.  */
19681#include <pthread.h>
19682               pthread_mutex_t m;
19683               pthread_mutexattr_t ma;
19684
19685int
19686main ()
19687{
19688pthread_mutex_lock (&m);
19689               pthread_mutexattr_init (&ma);
19690  ;
19691  return 0;
19692}
19693_ACEOF
19694if ac_fn_c_try_link "$LINENO"; then :
19695  gl_pthread_api=yes
19696           LIBPTHREAD=$gl_pthread
19697           LIBPMULTITHREAD=$gl_pthread
19698fi
19699rm -f core conftest.err conftest.$ac_objext \
19700    conftest$ac_exeext conftest.$ac_ext
19701        LIBS=$save_LIBS
19702        test $gl_pthread_api = yes && break
19703      done
19704
19705      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
19706      # since it is defined as a macro on OSF/1.)
19707      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
19708        # The program links fine without libpthread. But it may actually
19709        # need to link with libpthread in order to create multiple threads.
19710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
19711$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
19712if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
19713  $as_echo_n "(cached) " >&6
19714else
19715  ac_check_lib_save_LIBS=$LIBS
19716LIBS="-lpthread  $LIBS"
19717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19718/* end confdefs.h.  */
19719
19720/* Override any GCC internal prototype to avoid an error.
19721   Use char because int might match the return type of a GCC
19722   builtin and then its argument prototype would still apply.  */
19723#ifdef __cplusplus
19724extern "C"
19725#endif
19726char pthread_kill ();
19727int
19728main ()
19729{
19730return pthread_kill ();
19731  ;
19732  return 0;
19733}
19734_ACEOF
19735if ac_fn_c_try_link "$LINENO"; then :
19736  ac_cv_lib_pthread_pthread_kill=yes
19737else
19738  ac_cv_lib_pthread_pthread_kill=no
19739fi
19740rm -f core conftest.err conftest.$ac_objext \
19741    conftest$ac_exeext conftest.$ac_ext
19742LIBS=$ac_check_lib_save_LIBS
19743fi
19744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
19745$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
19746if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
19747  LIBPMULTITHREAD=-lpthread
19748           # On Solaris and HP-UX, most pthread functions exist also in libc.
19749           # Therefore pthread_in_use() needs to actually try to create a
19750           # thread: pthread_create from libc will fail, whereas
19751           # pthread_create will actually create a thread.
19752           # On Solaris 10 or newer, this test is no longer needed, because
19753           # libc contains the fully functional pthread functions.
19754           case "$host_os" in
19755             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
19756
19757$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
19758
19759           esac
19760
19761fi
19762
19763      elif test $gl_pthread_api != yes; then
19764        # Some library is needed. Try libpthread and libc_r.
19765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
19766$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
19767if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
19768  $as_echo_n "(cached) " >&6
19769else
19770  ac_check_lib_save_LIBS=$LIBS
19771LIBS="-lpthread  $LIBS"
19772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19773/* end confdefs.h.  */
19774
19775/* Override any GCC internal prototype to avoid an error.
19776   Use char because int might match the return type of a GCC
19777   builtin and then its argument prototype would still apply.  */
19778#ifdef __cplusplus
19779extern "C"
19780#endif
19781char pthread_kill ();
19782int
19783main ()
19784{
19785return pthread_kill ();
19786  ;
19787  return 0;
19788}
19789_ACEOF
19790if ac_fn_c_try_link "$LINENO"; then :
19791  ac_cv_lib_pthread_pthread_kill=yes
19792else
19793  ac_cv_lib_pthread_pthread_kill=no
19794fi
19795rm -f core conftest.err conftest.$ac_objext \
19796    conftest$ac_exeext conftest.$ac_ext
19797LIBS=$ac_check_lib_save_LIBS
19798fi
19799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
19800$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
19801if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
19802  gl_pthread_api=yes
19803           LIBPTHREAD=-lpthread
19804           LIBPMULTITHREAD=-lpthread
19805fi
19806
19807        if test $gl_pthread_api != yes; then
19808          # For FreeBSD 4.
19809          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
19810$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
19811if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
19812  $as_echo_n "(cached) " >&6
19813else
19814  ac_check_lib_save_LIBS=$LIBS
19815LIBS="-lc_r  $LIBS"
19816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19817/* end confdefs.h.  */
19818
19819/* Override any GCC internal prototype to avoid an error.
19820   Use char because int might match the return type of a GCC
19821   builtin and then its argument prototype would still apply.  */
19822#ifdef __cplusplus
19823extern "C"
19824#endif
19825char pthread_kill ();
19826int
19827main ()
19828{
19829return pthread_kill ();
19830  ;
19831  return 0;
19832}
19833_ACEOF
19834if ac_fn_c_try_link "$LINENO"; then :
19835  ac_cv_lib_c_r_pthread_kill=yes
19836else
19837  ac_cv_lib_c_r_pthread_kill=no
19838fi
19839rm -f core conftest.err conftest.$ac_objext \
19840    conftest$ac_exeext conftest.$ac_ext
19841LIBS=$ac_check_lib_save_LIBS
19842fi
19843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
19844$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
19845if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
19846  gl_pthread_api=yes
19847             LIBPTHREAD=-lc_r
19848             LIBPMULTITHREAD=-lc_r
19849fi
19850
19851        fi
19852      fi
19853    fi
19854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
19855$as_echo_n "checking whether POSIX threads API is available... " >&6; }
19856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
19857$as_echo "$gl_pthread_api" >&6; }
19858
19859
19860    if test $gl_pthread_api = yes; then
19861
19862$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
19863
19864    fi
19865
19866        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19867/* end confdefs.h.  */
19868#include <sched.h>
19869int
19870main ()
19871{
19872sched_yield ();
19873  ;
19874  return 0;
19875}
19876_ACEOF
19877if ac_fn_c_try_link "$LINENO"; then :
19878  LIB_SCHED_YIELD=
19879
19880else
19881         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19882$as_echo_n "checking for sched_yield in -lrt... " >&6; }
19883if ${ac_cv_lib_rt_sched_yield+:} false; then :
19884  $as_echo_n "(cached) " >&6
19885else
19886  ac_check_lib_save_LIBS=$LIBS
19887LIBS="-lrt  $LIBS"
19888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19889/* end confdefs.h.  */
19890
19891/* Override any GCC internal prototype to avoid an error.
19892   Use char because int might match the return type of a GCC
19893   builtin and then its argument prototype would still apply.  */
19894#ifdef __cplusplus
19895extern "C"
19896#endif
19897char sched_yield ();
19898int
19899main ()
19900{
19901return sched_yield ();
19902  ;
19903  return 0;
19904}
19905_ACEOF
19906if ac_fn_c_try_link "$LINENO"; then :
19907  ac_cv_lib_rt_sched_yield=yes
19908else
19909  ac_cv_lib_rt_sched_yield=no
19910fi
19911rm -f core conftest.err conftest.$ac_objext \
19912    conftest$ac_exeext conftest.$ac_ext
19913LIBS=$ac_check_lib_save_LIBS
19914fi
19915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19916$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19917if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
19918  LIB_SCHED_YIELD=-lrt
19919else
19920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
19921$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
19922if ${ac_cv_lib_posix4_sched_yield+:} false; then :
19923  $as_echo_n "(cached) " >&6
19924else
19925  ac_check_lib_save_LIBS=$LIBS
19926LIBS="-lposix4  $LIBS"
19927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19928/* end confdefs.h.  */
19929
19930/* Override any GCC internal prototype to avoid an error.
19931   Use char because int might match the return type of a GCC
19932   builtin and then its argument prototype would still apply.  */
19933#ifdef __cplusplus
19934extern "C"
19935#endif
19936char sched_yield ();
19937int
19938main ()
19939{
19940return sched_yield ();
19941  ;
19942  return 0;
19943}
19944_ACEOF
19945if ac_fn_c_try_link "$LINENO"; then :
19946  ac_cv_lib_posix4_sched_yield=yes
19947else
19948  ac_cv_lib_posix4_sched_yield=no
19949fi
19950rm -f core conftest.err conftest.$ac_objext \
19951    conftest$ac_exeext conftest.$ac_ext
19952LIBS=$ac_check_lib_save_LIBS
19953fi
19954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
19955$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
19956if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
19957  LIB_SCHED_YIELD=-lposix4
19958fi
19959
19960fi
19961
19962
19963fi
19964rm -f core conftest.err conftest.$ac_objext \
19965    conftest$ac_exeext conftest.$ac_ext
19966
19967
19968    gl_pthreadlib_body_done=done
19969  fi
19970
19971        if test $ac_cv_header_threads_h = yes; then
19972                                                  for ac_func in thrd_create
19973do :
19974  ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
19975if test "x$ac_cv_func_thrd_create" = xyes; then :
19976  cat >>confdefs.h <<_ACEOF
19977#define HAVE_THRD_CREATE 1
19978_ACEOF
19979
19980fi
19981done
19982
19983          if test $ac_cv_func_thrd_create = yes; then
19984            LIBSTDTHREAD=
19985          else
19986            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
19987$as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
19988if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
19989  $as_echo_n "(cached) " >&6
19990else
19991  ac_check_lib_save_LIBS=$LIBS
19992LIBS="-lstdthreads  $LIBS"
19993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19994/* end confdefs.h.  */
19995
19996/* Override any GCC internal prototype to avoid an error.
19997   Use char because int might match the return type of a GCC
19998   builtin and then its argument prototype would still apply.  */
19999#ifdef __cplusplus
20000extern "C"
20001#endif
20002char thrd_create ();
20003int
20004main ()
20005{
20006return thrd_create ();
20007  ;
20008  return 0;
20009}
20010_ACEOF
20011if ac_fn_c_try_link "$LINENO"; then :
20012  ac_cv_lib_stdthreads_thrd_create=yes
20013else
20014  ac_cv_lib_stdthreads_thrd_create=no
20015fi
20016rm -f core conftest.err conftest.$ac_objext \
20017    conftest$ac_exeext conftest.$ac_ext
20018LIBS=$ac_check_lib_save_LIBS
20019fi
20020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
20021$as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
20022if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
20023
20024              LIBSTDTHREAD='-lstdthreads -lpthread'
20025
20026else
20027
20028                            LIBSTDTHREAD="$LIBPMULTITHREAD"
20029
20030fi
20031
20032          fi
20033        else
20034                    LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
20035        fi
20036        ;;
20037    esac
20038
20039
20040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
20041$as_echo_n "checking whether ISO C threads API is available... " >&6; }
20042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
20043$as_echo "$ac_cv_header_threads_h" >&6; }
20044    gl_stdthreadlib_body_done=done
20045  fi
20046
20047        LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
20048        LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
20049        gl_threads_api=isoc
20050
20051$as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
20052
20053      fi
20054    fi
20055    if test $gl_threads_api = none; then
20056      case "$gl_use_threads" in
20057        yes | windows | win32) # The 'win32' is for backward compatibility.
20058          if { case "$host_os" in
20059                 mingw*) true;;
20060                 *) false;;
20061               esac
20062             }; then
20063            gl_threads_api=windows
20064
20065$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
20066
20067          fi
20068          ;;
20069      esac
20070    fi
20071  fi
20072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
20073$as_echo_n "checking for multithread API to use... " >&6; }
20074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
20075$as_echo "$gl_threads_api" >&6; }
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087  if test "$gl_threads_api" = posix; then
20088    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
20089    # pthread_rwlock_* functions.
20090    has_rwlock=false
20091    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
20092"
20093if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
20094  has_rwlock=true
20095
20096$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
20097
20098fi
20099
20100    if $has_rwlock; then
20101
20102
20103     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
20104$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
20105if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
20106  $as_echo_n "(cached) " >&6
20107else
20108  save_LIBS="$LIBS"
20109     LIBS="$LIBS $LIBMULTITHREAD"
20110     if test "$cross_compiling" = yes; then :
20111  case "$host_os" in
20112                         # Guess no on glibc systems.
20113          *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
20114                         # Guess no on musl systems.
20115          *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
20116                         # Guess no on bionic systems.
20117          *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
20118                         # Guess yes on native Windows with the mingw-w64 winpthreads library.
20119                         # Guess no on native Windows with the gnulib windows-rwlock module.
20120          mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
20121                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
20122                         else
20123                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
20124                         fi
20125                         ;;
20126                         # If we don't know, obey --enable-cross-guesses.
20127          *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
20128         esac
20129
20130else
20131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20132/* end confdefs.h.  */
20133
20134#include <errno.h>
20135#include <pthread.h>
20136#include <stdlib.h>
20137#include <unistd.h>
20138
20139#define SUCCEED() exit (0)
20140#define FAILURE() exit (1)
20141#define UNEXPECTED(n) (exit (10 + (n)))
20142
20143/* The main thread creates the waiting writer and the requesting reader threads
20144   in the default way; this guarantees that they have the same priority.
20145   We can reuse the main thread as first reader thread.  */
20146
20147static pthread_rwlock_t lock;
20148static pthread_t reader1;
20149static pthread_t writer;
20150static pthread_t reader2;
20151static pthread_t timer;
20152/* Used to pass control from writer to reader2 and from reader2 to timer,
20153   as in a relay race.
20154   Passing control from one running thread to another running thread
20155   is most likely faster than to create the second thread.  */
20156static pthread_mutex_t baton;
20157
20158static void *
20159timer_func (void *ignored)
20160{
20161  /* Step 13 (can be before or after step 12):
20162     The timer thread takes the baton, then waits a moment to make sure
20163     it can tell whether the second reader thread is blocked at step 12.  */
20164  if (pthread_mutex_lock (&baton))
20165    UNEXPECTED (13);
20166  usleep (100000);
20167  /* By the time we get here, it's clear that the second reader thread is
20168     blocked at step 12.  This is the desired behaviour.  */
20169  SUCCEED ();
20170}
20171
20172static void *
20173reader2_func (void *ignored)
20174{
20175  int err;
20176
20177  /* Step 8 (can be before or after step 7):
20178     The second reader thread takes the baton, then waits a moment to make sure
20179     the writer thread has reached step 7.  */
20180  if (pthread_mutex_lock (&baton))
20181    UNEXPECTED (8);
20182  usleep (100000);
20183  /* Step 9: The second reader thread requests the lock.  */
20184  err = pthread_rwlock_tryrdlock (&lock);
20185  if (err == 0)
20186    FAILURE ();
20187  else if (err != EBUSY)
20188    UNEXPECTED (9);
20189  /* Step 10: Launch a timer, to test whether the next call blocks.  */
20190  if (pthread_create (&timer, NULL, timer_func, NULL))
20191    UNEXPECTED (10);
20192  /* Step 11: Release the baton.  */
20193  if (pthread_mutex_unlock (&baton))
20194    UNEXPECTED (11);
20195  /* Step 12: The second reader thread requests the lock.  */
20196  err = pthread_rwlock_rdlock (&lock);
20197  if (err == 0)
20198    FAILURE ();
20199  else
20200    UNEXPECTED (12);
20201}
20202
20203static void *
20204writer_func (void *ignored)
20205{
20206  /* Step 4: Take the baton, so that the second reader thread does not go ahead
20207     too early.  */
20208  if (pthread_mutex_lock (&baton))
20209    UNEXPECTED (4);
20210  /* Step 5: Create the second reader thread.  */
20211  if (pthread_create (&reader2, NULL, reader2_func, NULL))
20212    UNEXPECTED (5);
20213  /* Step 6: Release the baton.  */
20214  if (pthread_mutex_unlock (&baton))
20215    UNEXPECTED (6);
20216  /* Step 7: The writer thread requests the lock.  */
20217  if (pthread_rwlock_wrlock (&lock))
20218    UNEXPECTED (7);
20219  return NULL;
20220}
20221
20222int
20223main ()
20224{
20225  reader1 = pthread_self ();
20226
20227  /* Step 1: The main thread initializes the lock and the baton.  */
20228  if (pthread_rwlock_init (&lock, NULL))
20229    UNEXPECTED (1);
20230  if (pthread_mutex_init (&baton, NULL))
20231    UNEXPECTED (1);
20232  /* Step 2: The main thread acquires the lock as a reader.  */
20233  if (pthread_rwlock_rdlock (&lock))
20234    UNEXPECTED (2);
20235  /* Step 3: Create the writer thread.  */
20236  if (pthread_create (&writer, NULL, writer_func, NULL))
20237    UNEXPECTED (3);
20238  /* Job done.  Go to sleep.  */
20239  for (;;)
20240    {
20241      sleep (1);
20242    }
20243}
20244
20245_ACEOF
20246if ac_fn_c_try_run "$LINENO"; then :
20247  gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
20248else
20249  gl_cv_pthread_rwlock_rdlock_prefer_writer=no
20250fi
20251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20252  conftest.$ac_objext conftest.beam conftest.$ac_ext
20253fi
20254
20255     LIBS="$save_LIBS"
20256
20257fi
20258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
20259$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
20260  case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
20261    *yes)
20262
20263$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
20264
20265      ;;
20266  esac
20267
20268    fi
20269    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
20270    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20271/* end confdefs.h.  */
20272
20273      #include <pthread.h>
20274int
20275main ()
20276{
20277
20278#if __FreeBSD__ == 4
20279error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
20280#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
20281       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
20282error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
20283#else
20284int x = (int)PTHREAD_MUTEX_RECURSIVE;
20285return !x;
20286#endif
20287
20288  ;
20289  return 0;
20290}
20291_ACEOF
20292if ac_fn_c_try_compile "$LINENO"; then :
20293
20294$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
20295
20296fi
20297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20298  fi
20299  :
20300
20301
20302      if test "X$prefix" = "XNONE"; then
20303    acl_final_prefix="$ac_default_prefix"
20304  else
20305    acl_final_prefix="$prefix"
20306  fi
20307  if test "X$exec_prefix" = "XNONE"; then
20308    acl_final_exec_prefix='${prefix}'
20309  else
20310    acl_final_exec_prefix="$exec_prefix"
20311  fi
20312  acl_save_prefix="$prefix"
20313  prefix="$acl_final_prefix"
20314  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
20315  prefix="$acl_save_prefix"
20316
20317
20318
20319# Check whether --with-gnu-ld was given.
20320if test "${with_gnu_ld+set}" = set; then :
20321  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
20322else
20323  with_gnu_ld=no
20324fi
20325
20326# Prepare PATH_SEPARATOR.
20327# The user is always right.
20328if test "${PATH_SEPARATOR+set}" != set; then
20329  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
20330  # contains only /bin. Note that ksh looks also at the FPATH variable,
20331  # so we have to set that as well for the test.
20332  PATH_SEPARATOR=:
20333  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
20334    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
20335           || PATH_SEPARATOR=';'
20336       }
20337fi
20338
20339if test -n "$LD"; then
20340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
20341$as_echo_n "checking for ld... " >&6; }
20342elif test "$GCC" = yes; then
20343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
20344$as_echo_n "checking for ld used by $CC... " >&6; }
20345elif test "$with_gnu_ld" = yes; then
20346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
20347$as_echo_n "checking for GNU ld... " >&6; }
20348else
20349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
20350$as_echo_n "checking for non-GNU ld... " >&6; }
20351fi
20352if test -n "$LD"; then
20353  # Let the user override the test with a path.
20354  :
20355else
20356  if ${acl_cv_path_LD+:} false; then :
20357  $as_echo_n "(cached) " >&6
20358else
20359
20360    acl_cv_path_LD= # Final result of this test
20361    ac_prog=ld # Program to search in $PATH
20362    if test "$GCC" = yes; then
20363      # Check if gcc -print-prog-name=ld gives a path.
20364      case $host in
20365        *-*-mingw*)
20366          # gcc leaves a trailing carriage return which upsets mingw
20367          acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
20368        *)
20369          acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
20370      esac
20371      case $acl_output in
20372        # Accept absolute paths.
20373        [\\/]* | ?:[\\/]*)
20374          re_direlt='/[^/][^/]*/\.\./'
20375          # Canonicalize the pathname of ld
20376          acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
20377          while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
20378            acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
20379          done
20380          # Got the pathname. No search in PATH is needed.
20381          acl_cv_path_LD="$acl_output"
20382          ac_prog=
20383          ;;
20384        "")
20385          # If it fails, then pretend we aren't using GCC.
20386          ;;
20387        *)
20388          # If it is relative, then search for the first ld in PATH.
20389          with_gnu_ld=unknown
20390          ;;
20391      esac
20392    fi
20393    if test -n "$ac_prog"; then
20394      # Search for $ac_prog in $PATH.
20395      acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
20396      for ac_dir in $PATH; do
20397        IFS="$acl_save_ifs"
20398        test -z "$ac_dir" && ac_dir=.
20399        if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
20400          acl_cv_path_LD="$ac_dir/$ac_prog"
20401          # Check to see if the program is GNU ld.  I'd rather use --version,
20402          # but apparently some variants of GNU ld only accept -v.
20403          # Break only if it was the GNU/non-GNU ld that we prefer.
20404          case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
20405            *GNU* | *'with BFD'*)
20406              test "$with_gnu_ld" != no && break
20407              ;;
20408            *)
20409              test "$with_gnu_ld" != yes && break
20410              ;;
20411          esac
20412        fi
20413      done
20414      IFS="$acl_save_ifs"
20415    fi
20416    case $host in
20417      *-*-aix*)
20418        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20419/* end confdefs.h.  */
20420#if defined __powerpc64__ || defined _ARCH_PPC64
20421                int ok;
20422               #else
20423                error fail
20424               #endif
20425
20426_ACEOF
20427if ac_fn_c_try_compile "$LINENO"; then :
20428  # The compiler produces 64-bit code. Add option '-b64' so that the
20429           # linker groks 64-bit object files.
20430           case "$acl_cv_path_LD " in
20431             *" -b64 "*) ;;
20432             *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
20433           esac
20434
20435fi
20436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20437        ;;
20438      sparc64-*-netbsd*)
20439        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20440/* end confdefs.h.  */
20441#if defined __sparcv9 || defined __arch64__
20442                int ok;
20443               #else
20444                error fail
20445               #endif
20446
20447_ACEOF
20448if ac_fn_c_try_compile "$LINENO"; then :
20449
20450else
20451  # The compiler produces 32-bit code. Add option '-m elf32_sparc'
20452           # so that the linker groks 32-bit object files.
20453           case "$acl_cv_path_LD " in
20454             *" -m elf32_sparc "*) ;;
20455             *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
20456           esac
20457
20458fi
20459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20460        ;;
20461    esac
20462
20463fi
20464
20465  LD="$acl_cv_path_LD"
20466fi
20467if test -n "$LD"; then
20468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
20469$as_echo "$LD" >&6; }
20470else
20471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20472$as_echo "no" >&6; }
20473  as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
20474fi
20475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
20476$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
20477if ${acl_cv_prog_gnu_ld+:} false; then :
20478  $as_echo_n "(cached) " >&6
20479else
20480  # I'd rather use --version here, but apparently some GNU lds only accept -v.
20481case `$LD -v 2>&1 </dev/null` in
20482*GNU* | *'with BFD'*)
20483  acl_cv_prog_gnu_ld=yes
20484  ;;
20485*)
20486  acl_cv_prog_gnu_ld=no
20487  ;;
20488esac
20489fi
20490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
20491$as_echo "$acl_cv_prog_gnu_ld" >&6; }
20492with_gnu_ld=$acl_cv_prog_gnu_ld
20493
20494
20495
20496
20497                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
20498$as_echo_n "checking for shared library run path origin... " >&6; }
20499if ${acl_cv_rpath+:} false; then :
20500  $as_echo_n "(cached) " >&6
20501else
20502
20503    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
20504    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
20505    . ./conftest.sh
20506    rm -f ./conftest.sh
20507    acl_cv_rpath=done
20508
20509fi
20510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
20511$as_echo "$acl_cv_rpath" >&6; }
20512  wl="$acl_cv_wl"
20513  acl_libext="$acl_cv_libext"
20514  acl_shlibext="$acl_cv_shlibext"
20515  acl_libname_spec="$acl_cv_libname_spec"
20516  acl_library_names_spec="$acl_cv_library_names_spec"
20517  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
20518  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
20519  acl_hardcode_direct="$acl_cv_hardcode_direct"
20520  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
20521    # Check whether --enable-rpath was given.
20522if test "${enable_rpath+set}" = set; then :
20523  enableval=$enable_rpath; :
20524else
20525  enable_rpath=yes
20526fi
20527
20528
20529
20530
20531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
20532$as_echo_n "checking 32-bit host C ABI... " >&6; }
20533if ${gl_cv_host_cpu_c_abi_32bit+:} false; then :
20534  $as_echo_n "(cached) " >&6
20535else
20536  if test -n "$gl_cv_host_cpu_c_abi"; then
20537       case "$gl_cv_host_cpu_c_abi" in
20538         i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
20539           gl_cv_host_cpu_c_abi_32bit=yes ;;
20540         x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
20541           gl_cv_host_cpu_c_abi_32bit=no ;;
20542         *)
20543           gl_cv_host_cpu_c_abi_32bit=unknown ;;
20544       esac
20545     else
20546       case "$host_cpu" in
20547
20548         # CPUs that only support a 32-bit ABI.
20549         arc \
20550         | bfin \
20551         | cris* \
20552         | csky \
20553         | epiphany \
20554         | ft32 \
20555         | h8300 \
20556         | m68k \
20557         | microblaze | microblazeel \
20558         | nds32 | nds32le | nds32be \
20559         | nios2 | nios2eb | nios2el \
20560         | or1k* \
20561         | or32 \
20562         | sh | sh1234 | sh1234elb \
20563         | tic6x \
20564         | xtensa* )
20565           gl_cv_host_cpu_c_abi_32bit=yes
20566           ;;
20567
20568         # CPUs that only support a 64-bit ABI.
20569         alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
20570         | mmix )
20571           gl_cv_host_cpu_c_abi_32bit=no
20572           ;;
20573
20574         i[34567]86 )
20575           gl_cv_host_cpu_c_abi_32bit=yes
20576           ;;
20577
20578         x86_64 )
20579           # On x86_64 systems, the C compiler may be generating code in one of
20580           # these ABIs:
20581           # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
20582           # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
20583           #   with native Windows (mingw, MSVC).
20584           # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
20585           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
20586           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20587/* end confdefs.h.  */
20588#if (defined __x86_64__ || defined __amd64__ \
20589                       || defined _M_X64 || defined _M_AMD64) \
20590                      && !(defined __ILP32__ || defined _ILP32)
20591                   int ok;
20592                  #else
20593                   error fail
20594                  #endif
20595
20596_ACEOF
20597if ac_fn_c_try_compile "$LINENO"; then :
20598  gl_cv_host_cpu_c_abi_32bit=no
20599else
20600  gl_cv_host_cpu_c_abi_32bit=yes
20601fi
20602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20603           ;;
20604
20605         arm* | aarch64 )
20606           # Assume arm with EABI.
20607           # On arm64 systems, the C compiler may be generating code in one of
20608           # these ABIs:
20609           # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
20610           # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
20611           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
20612           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20613/* end confdefs.h.  */
20614#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
20615                   int ok;
20616                  #else
20617                   error fail
20618                  #endif
20619
20620_ACEOF
20621if ac_fn_c_try_compile "$LINENO"; then :
20622  gl_cv_host_cpu_c_abi_32bit=no
20623else
20624  gl_cv_host_cpu_c_abi_32bit=yes
20625fi
20626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20627           ;;
20628
20629         hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
20630           # On hppa, the C compiler may be generating 32-bit code or 64-bit
20631           # code. In the latter case, it defines _LP64 and __LP64__.
20632           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20633/* end confdefs.h.  */
20634#ifdef __LP64__
20635                   int ok;
20636                  #else
20637                   error fail
20638                  #endif
20639
20640_ACEOF
20641if ac_fn_c_try_compile "$LINENO"; then :
20642  gl_cv_host_cpu_c_abi_32bit=no
20643else
20644  gl_cv_host_cpu_c_abi_32bit=yes
20645fi
20646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20647           ;;
20648
20649         ia64* )
20650           # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
20651           # 32-bit code. In the latter case, it defines _ILP32.
20652           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20653/* end confdefs.h.  */
20654#ifdef _ILP32
20655                   int ok;
20656                  #else
20657                   error fail
20658                  #endif
20659
20660_ACEOF
20661if ac_fn_c_try_compile "$LINENO"; then :
20662  gl_cv_host_cpu_c_abi_32bit=yes
20663else
20664  gl_cv_host_cpu_c_abi_32bit=no
20665fi
20666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20667           ;;
20668
20669         mips* )
20670           # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
20671           # at 32.
20672           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20673/* end confdefs.h.  */
20674#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
20675                   int ok;
20676                  #else
20677                   error fail
20678                  #endif
20679
20680_ACEOF
20681if ac_fn_c_try_compile "$LINENO"; then :
20682  gl_cv_host_cpu_c_abi_32bit=no
20683else
20684  gl_cv_host_cpu_c_abi_32bit=yes
20685fi
20686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20687           ;;
20688
20689         powerpc* )
20690           # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
20691           # No need to distinguish them here; the caller may distinguish
20692           # them based on the OS.
20693           # On powerpc64 systems, the C compiler may still be generating
20694           # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
20695           # be generating 64-bit code.
20696           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20697/* end confdefs.h.  */
20698#if defined __powerpc64__ || defined _ARCH_PPC64
20699                   int ok;
20700                  #else
20701                   error fail
20702                  #endif
20703
20704_ACEOF
20705if ac_fn_c_try_compile "$LINENO"; then :
20706  gl_cv_host_cpu_c_abi_32bit=no
20707else
20708  gl_cv_host_cpu_c_abi_32bit=yes
20709fi
20710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20711           ;;
20712
20713         rs6000 )
20714           gl_cv_host_cpu_c_abi_32bit=yes
20715           ;;
20716
20717         riscv32 | riscv64 )
20718           # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
20719           # Size of 'long' and 'void *':
20720           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20721/* end confdefs.h.  */
20722#if defined __LP64__
20723                    int ok;
20724                  #else
20725                    error fail
20726                  #endif
20727
20728_ACEOF
20729if ac_fn_c_try_compile "$LINENO"; then :
20730  gl_cv_host_cpu_c_abi_32bit=no
20731else
20732  gl_cv_host_cpu_c_abi_32bit=yes
20733fi
20734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20735           ;;
20736
20737         s390* )
20738           # On s390x, the C compiler may be generating 64-bit (= s390x) code
20739           # or 31-bit (= s390) code.
20740           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20741/* end confdefs.h.  */
20742#if defined __LP64__ || defined __s390x__
20743                    int ok;
20744                  #else
20745                    error fail
20746                  #endif
20747
20748_ACEOF
20749if ac_fn_c_try_compile "$LINENO"; then :
20750  gl_cv_host_cpu_c_abi_32bit=no
20751else
20752  gl_cv_host_cpu_c_abi_32bit=yes
20753fi
20754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20755           ;;
20756
20757         sparc | sparc64 )
20758           # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
20759           # C compiler still generates 32-bit code.
20760           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20761/* end confdefs.h.  */
20762#if defined __sparcv9 || defined __arch64__
20763                   int ok;
20764                  #else
20765                   error fail
20766                  #endif
20767
20768_ACEOF
20769if ac_fn_c_try_compile "$LINENO"; then :
20770  gl_cv_host_cpu_c_abi_32bit=no
20771else
20772  gl_cv_host_cpu_c_abi_32bit=yes
20773fi
20774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20775           ;;
20776
20777         *)
20778           gl_cv_host_cpu_c_abi_32bit=unknown
20779           ;;
20780       esac
20781     fi
20782
20783fi
20784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
20785$as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; }
20786
20787  HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
20788
20789
20790
20791
20792
20793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
20794$as_echo_n "checking for ELF binary format... " >&6; }
20795if ${gl_cv_elf+:} false; then :
20796  $as_echo_n "(cached) " >&6
20797else
20798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20799/* end confdefs.h.  */
20800#ifdef __ELF__
20801        Extensible Linking Format
20802        #endif
20803
20804_ACEOF
20805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20806  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
20807  gl_cv_elf=yes
20808else
20809  gl_cv_elf=no
20810fi
20811rm -f conftest*
20812
20813
20814fi
20815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
20816$as_echo "$gl_cv_elf" >&6; }
20817  if test $gl_cv_elf; then
20818    # Extract the ELF class of a file (5th byte) in decimal.
20819    # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
20820    if od -A x < /dev/null >/dev/null 2>/dev/null; then
20821      # Use POSIX od.
20822      func_elfclass ()
20823      {
20824        od -A n -t d1 -j 4 -N 1
20825      }
20826    else
20827      # Use BSD hexdump.
20828      func_elfclass ()
20829      {
20830        dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
20831        echo
20832      }
20833    fi
20834    case $HOST_CPU_C_ABI_32BIT in
20835      yes)
20836        # 32-bit ABI.
20837        acl_is_expected_elfclass ()
20838        {
20839          test "`func_elfclass | sed -e 's/[ 	]//g'`" = 1
20840        }
20841        ;;
20842      no)
20843        # 64-bit ABI.
20844        acl_is_expected_elfclass ()
20845        {
20846          test "`func_elfclass | sed -e 's/[ 	]//g'`" = 2
20847        }
20848        ;;
20849      *)
20850        # Unknown.
20851        acl_is_expected_elfclass ()
20852        {
20853          :
20854        }
20855        ;;
20856    esac
20857  else
20858    acl_is_expected_elfclass ()
20859    {
20860      :
20861    }
20862  fi
20863
20864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
20865$as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; }
20866if ${acl_cv_libdirstems+:} false; then :
20867  $as_echo_n "(cached) " >&6
20868else
20869            acl_libdirstem=lib
20870     acl_libdirstem2=
20871     acl_libdirstem3=
20872     case "$host_os" in
20873       solaris*)
20874                                                      if test $HOST_CPU_C_ABI_32BIT = no; then
20875           acl_libdirstem2=lib/64
20876           case "$host_cpu" in
20877             sparc*)        acl_libdirstem3=lib/sparcv9 ;;
20878             i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
20879           esac
20880         fi
20881         ;;
20882       *)
20883                                                                                 searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
20884                     | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
20885         if test $HOST_CPU_C_ABI_32BIT != no; then
20886           # 32-bit or unknown ABI.
20887           if test -d /usr/lib32; then
20888             acl_libdirstem2=lib32
20889           fi
20890         fi
20891         if test $HOST_CPU_C_ABI_32BIT != yes; then
20892           # 64-bit or unknown ABI.
20893           if test -d /usr/lib64; then
20894             acl_libdirstem3=lib64
20895           fi
20896         fi
20897         if test -n "$searchpath"; then
20898           acl_save_IFS="${IFS= 	}"; IFS=":"
20899           for searchdir in $searchpath; do
20900             if test -d "$searchdir"; then
20901               case "$searchdir" in
20902                 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
20903                 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
20904                 */../ | */.. )
20905                   # Better ignore directories of this form. They are misleading.
20906                   ;;
20907                 *) searchdir=`cd "$searchdir" && pwd`
20908                    case "$searchdir" in
20909                      */lib32 ) acl_libdirstem2=lib32 ;;
20910                      */lib64 ) acl_libdirstem3=lib64 ;;
20911                    esac ;;
20912               esac
20913             fi
20914           done
20915           IFS="$acl_save_IFS"
20916           if test $HOST_CPU_C_ABI_32BIT = yes; then
20917             # 32-bit ABI.
20918             acl_libdirstem3=
20919           fi
20920           if test $HOST_CPU_C_ABI_32BIT = no; then
20921             # 64-bit ABI.
20922             acl_libdirstem2=
20923           fi
20924         fi
20925         ;;
20926     esac
20927     test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
20928     test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
20929     acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
20930
20931fi
20932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
20933$as_echo "$acl_cv_libdirstems" >&6; }
20934      acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
20935  acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
20936  acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948    use_additional=yes
20949
20950  acl_save_prefix="$prefix"
20951  prefix="$acl_final_prefix"
20952  acl_save_exec_prefix="$exec_prefix"
20953  exec_prefix="$acl_final_exec_prefix"
20954
20955    eval additional_includedir=\"$includedir\"
20956    eval additional_libdir=\"$libdir\"
20957    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
20958    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
20959
20960  exec_prefix="$acl_save_exec_prefix"
20961  prefix="$acl_save_prefix"
20962
20963
20964# Check whether --with-libiconv-prefix was given.
20965if test "${with_libiconv_prefix+set}" = set; then :
20966  withval=$with_libiconv_prefix;
20967    if test "X$withval" = "Xno"; then
20968      use_additional=no
20969    else
20970      if test "X$withval" = "X"; then
20971
20972  acl_save_prefix="$prefix"
20973  prefix="$acl_final_prefix"
20974  acl_save_exec_prefix="$exec_prefix"
20975  exec_prefix="$acl_final_exec_prefix"
20976
20977          eval additional_includedir=\"$includedir\"
20978          eval additional_libdir=\"$libdir\"
20979          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
20980          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
20981
20982  exec_prefix="$acl_save_exec_prefix"
20983  prefix="$acl_save_prefix"
20984
20985      else
20986        additional_includedir="$withval/include"
20987        additional_libdir="$withval/$acl_libdirstem"
20988        additional_libdir2="$withval/$acl_libdirstem2"
20989        additional_libdir3="$withval/$acl_libdirstem3"
20990      fi
20991    fi
20992
20993fi
20994
20995  if test "X$additional_libdir2" = "X$additional_libdir"; then
20996    additional_libdir2=
20997  fi
20998  if test "X$additional_libdir3" = "X$additional_libdir"; then
20999    additional_libdir3=
21000  fi
21001      LIBICONV=
21002  LTLIBICONV=
21003  INCICONV=
21004  LIBICONV_PREFIX=
21005      HAVE_LIBICONV=
21006  rpathdirs=
21007  ltrpathdirs=
21008  names_already_handled=
21009  names_next_round='iconv '
21010  while test -n "$names_next_round"; do
21011    names_this_round="$names_next_round"
21012    names_next_round=
21013    for name in $names_this_round; do
21014      already_handled=
21015      for n in $names_already_handled; do
21016        if test "$n" = "$name"; then
21017          already_handled=yes
21018          break
21019        fi
21020      done
21021      if test -z "$already_handled"; then
21022        names_already_handled="$names_already_handled $name"
21023                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
21024        eval value=\"\$HAVE_LIB$uppername\"
21025        if test -n "$value"; then
21026          if test "$value" = yes; then
21027            eval value=\"\$LIB$uppername\"
21028            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
21029            eval value=\"\$LTLIB$uppername\"
21030            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
21031          else
21032                                    :
21033          fi
21034        else
21035                              found_dir=
21036          found_la=
21037          found_so=
21038          found_a=
21039          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
21040          if test -n "$acl_shlibext"; then
21041            shrext=".$acl_shlibext"             # typically: shrext=.so
21042          else
21043            shrext=
21044          fi
21045          if test $use_additional = yes; then
21046            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
21047              if test "X$found_dir" = "X"; then
21048                eval dir=\$$additional_libdir_variable
21049                if test -n "$dir"; then
21050                                                      if test -n "$acl_shlibext"; then
21051                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
21052                      found_dir="$dir"
21053                      found_so="$dir/$libname$shrext"
21054                    else
21055                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
21056                        ver=`(cd "$dir" && \
21057                              for f in "$libname$shrext".*; do echo "$f"; done \
21058                              | sed -e "s,^$libname$shrext\\\\.,," \
21059                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
21060                              | sed 1q ) 2>/dev/null`
21061                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
21062                          found_dir="$dir"
21063                          found_so="$dir/$libname$shrext.$ver"
21064                        fi
21065                      else
21066                        eval library_names=\"$acl_library_names_spec\"
21067                        for f in $library_names; do
21068                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
21069                            found_dir="$dir"
21070                            found_so="$dir/$f"
21071                            break
21072                          fi
21073                        done
21074                      fi
21075                    fi
21076                  fi
21077                                    if test "X$found_dir" = "X"; then
21078                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
21079                      found_dir="$dir"
21080                      found_a="$dir/$libname.$acl_libext"
21081                    fi
21082                  fi
21083                  if test "X$found_dir" != "X"; then
21084                    if test -f "$dir/$libname.la"; then
21085                      found_la="$dir/$libname.la"
21086                    fi
21087                  fi
21088                fi
21089              fi
21090            done
21091          fi
21092          if test "X$found_dir" = "X"; then
21093            for x in $LDFLAGS $LTLIBICONV; do
21094
21095  acl_save_prefix="$prefix"
21096  prefix="$acl_final_prefix"
21097  acl_save_exec_prefix="$exec_prefix"
21098  exec_prefix="$acl_final_exec_prefix"
21099  eval x=\"$x\"
21100  exec_prefix="$acl_save_exec_prefix"
21101  prefix="$acl_save_prefix"
21102
21103              case "$x" in
21104                -L*)
21105                  dir=`echo "X$x" | sed -e 's/^X-L//'`
21106                                    if test -n "$acl_shlibext"; then
21107                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
21108                      found_dir="$dir"
21109                      found_so="$dir/$libname$shrext"
21110                    else
21111                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
21112                        ver=`(cd "$dir" && \
21113                              for f in "$libname$shrext".*; do echo "$f"; done \
21114                              | sed -e "s,^$libname$shrext\\\\.,," \
21115                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
21116                              | sed 1q ) 2>/dev/null`
21117                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
21118                          found_dir="$dir"
21119                          found_so="$dir/$libname$shrext.$ver"
21120                        fi
21121                      else
21122                        eval library_names=\"$acl_library_names_spec\"
21123                        for f in $library_names; do
21124                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
21125                            found_dir="$dir"
21126                            found_so="$dir/$f"
21127                            break
21128                          fi
21129                        done
21130                      fi
21131                    fi
21132                  fi
21133                                    if test "X$found_dir" = "X"; then
21134                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
21135                      found_dir="$dir"
21136                      found_a="$dir/$libname.$acl_libext"
21137                    fi
21138                  fi
21139                  if test "X$found_dir" != "X"; then
21140                    if test -f "$dir/$libname.la"; then
21141                      found_la="$dir/$libname.la"
21142                    fi
21143                  fi
21144                  ;;
21145              esac
21146              if test "X$found_dir" != "X"; then
21147                break
21148              fi
21149            done
21150          fi
21151          if test "X$found_dir" != "X"; then
21152                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
21153            if test "X$found_so" != "X"; then
21154                                                        if test "$enable_rpath" = no \
21155                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
21156                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
21157                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
21158                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
21159              else
21160                                                                                haveit=
21161                for x in $ltrpathdirs; do
21162                  if test "X$x" = "X$found_dir"; then
21163                    haveit=yes
21164                    break
21165                  fi
21166                done
21167                if test -z "$haveit"; then
21168                  ltrpathdirs="$ltrpathdirs $found_dir"
21169                fi
21170                                if test "$acl_hardcode_direct" = yes; then
21171                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
21172                else
21173                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
21174                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
21175                                                            haveit=
21176                    for x in $rpathdirs; do
21177                      if test "X$x" = "X$found_dir"; then
21178                        haveit=yes
21179                        break
21180                      fi
21181                    done
21182                    if test -z "$haveit"; then
21183                      rpathdirs="$rpathdirs $found_dir"
21184                    fi
21185                  else
21186                                                                                haveit=
21187                    for x in $LDFLAGS $LIBICONV; do
21188
21189  acl_save_prefix="$prefix"
21190  prefix="$acl_final_prefix"
21191  acl_save_exec_prefix="$exec_prefix"
21192  exec_prefix="$acl_final_exec_prefix"
21193  eval x=\"$x\"
21194  exec_prefix="$acl_save_exec_prefix"
21195  prefix="$acl_save_prefix"
21196
21197                      if test "X$x" = "X-L$found_dir"; then
21198                        haveit=yes
21199                        break
21200                      fi
21201                    done
21202                    if test -z "$haveit"; then
21203                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
21204                    fi
21205                    if test "$acl_hardcode_minus_L" != no; then
21206                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
21207                    else
21208                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
21209                    fi
21210                  fi
21211                fi
21212              fi
21213            else
21214              if test "X$found_a" != "X"; then
21215                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
21216              else
21217                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
21218              fi
21219            fi
21220                        additional_includedir=
21221            case "$found_dir" in
21222              */$acl_libdirstem | */$acl_libdirstem/)
21223                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
21224                if test "$name" = 'iconv'; then
21225                  LIBICONV_PREFIX="$basedir"
21226                fi
21227                additional_includedir="$basedir/include"
21228                ;;
21229              */$acl_libdirstem2 | */$acl_libdirstem2/)
21230                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
21231                if test "$name" = 'iconv'; then
21232                  LIBICONV_PREFIX="$basedir"
21233                fi
21234                additional_includedir="$basedir/include"
21235                ;;
21236              */$acl_libdirstem3 | */$acl_libdirstem3/)
21237                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
21238                if test "$name" = 'iconv'; then
21239                  LIBICONV_PREFIX="$basedir"
21240                fi
21241                additional_includedir="$basedir/include"
21242                ;;
21243            esac
21244            if test "X$additional_includedir" != "X"; then
21245                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
21246                haveit=
21247                if test "X$additional_includedir" = "X/usr/local/include"; then
21248                  if test -n "$GCC"; then
21249                    case $host_os in
21250                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
21251                    esac
21252                  fi
21253                fi
21254                if test -z "$haveit"; then
21255                  for x in $CPPFLAGS $INCICONV; do
21256
21257  acl_save_prefix="$prefix"
21258  prefix="$acl_final_prefix"
21259  acl_save_exec_prefix="$exec_prefix"
21260  exec_prefix="$acl_final_exec_prefix"
21261  eval x=\"$x\"
21262  exec_prefix="$acl_save_exec_prefix"
21263  prefix="$acl_save_prefix"
21264
21265                    if test "X$x" = "X-I$additional_includedir"; then
21266                      haveit=yes
21267                      break
21268                    fi
21269                  done
21270                  if test -z "$haveit"; then
21271                    if test -d "$additional_includedir"; then
21272                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
21273                    fi
21274                  fi
21275                fi
21276              fi
21277            fi
21278                        if test -n "$found_la"; then
21279                                                        save_libdir="$libdir"
21280              case "$found_la" in
21281                */* | *\\*) . "$found_la" ;;
21282                *) . "./$found_la" ;;
21283              esac
21284              libdir="$save_libdir"
21285                            for dep in $dependency_libs; do
21286                case "$dep" in
21287                  -L*)
21288                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
21289                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
21290                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
21291                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
21292                      haveit=
21293                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
21294                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
21295                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
21296                        if test -n "$GCC"; then
21297                          case $host_os in
21298                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
21299                          esac
21300                        fi
21301                      fi
21302                      if test -z "$haveit"; then
21303                        haveit=
21304                        for x in $LDFLAGS $LIBICONV; do
21305
21306  acl_save_prefix="$prefix"
21307  prefix="$acl_final_prefix"
21308  acl_save_exec_prefix="$exec_prefix"
21309  exec_prefix="$acl_final_exec_prefix"
21310  eval x=\"$x\"
21311  exec_prefix="$acl_save_exec_prefix"
21312  prefix="$acl_save_prefix"
21313
21314                          if test "X$x" = "X-L$dependency_libdir"; then
21315                            haveit=yes
21316                            break
21317                          fi
21318                        done
21319                        if test -z "$haveit"; then
21320                          if test -d "$dependency_libdir"; then
21321                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
21322                          fi
21323                        fi
21324                        haveit=
21325                        for x in $LDFLAGS $LTLIBICONV; do
21326
21327  acl_save_prefix="$prefix"
21328  prefix="$acl_final_prefix"
21329  acl_save_exec_prefix="$exec_prefix"
21330  exec_prefix="$acl_final_exec_prefix"
21331  eval x=\"$x\"
21332  exec_prefix="$acl_save_exec_prefix"
21333  prefix="$acl_save_prefix"
21334
21335                          if test "X$x" = "X-L$dependency_libdir"; then
21336                            haveit=yes
21337                            break
21338                          fi
21339                        done
21340                        if test -z "$haveit"; then
21341                          if test -d "$dependency_libdir"; then
21342                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
21343                          fi
21344                        fi
21345                      fi
21346                    fi
21347                    ;;
21348                  -R*)
21349                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
21350                    if test "$enable_rpath" != no; then
21351                                                                  haveit=
21352                      for x in $rpathdirs; do
21353                        if test "X$x" = "X$dir"; then
21354                          haveit=yes
21355                          break
21356                        fi
21357                      done
21358                      if test -z "$haveit"; then
21359                        rpathdirs="$rpathdirs $dir"
21360                      fi
21361                                                                  haveit=
21362                      for x in $ltrpathdirs; do
21363                        if test "X$x" = "X$dir"; then
21364                          haveit=yes
21365                          break
21366                        fi
21367                      done
21368                      if test -z "$haveit"; then
21369                        ltrpathdirs="$ltrpathdirs $dir"
21370                      fi
21371                    fi
21372                    ;;
21373                  -l*)
21374                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
21375                    ;;
21376                  *.la)
21377                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
21378                    ;;
21379                  *)
21380                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
21381                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
21382                    ;;
21383                esac
21384              done
21385            fi
21386          else
21387                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
21388            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
21389          fi
21390        fi
21391      fi
21392    done
21393  done
21394  if test "X$rpathdirs" != "X"; then
21395    if test -n "$acl_hardcode_libdir_separator"; then
21396                        alldirs=
21397      for found_dir in $rpathdirs; do
21398        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
21399      done
21400            acl_save_libdir="$libdir"
21401      libdir="$alldirs"
21402      eval flag=\"$acl_hardcode_libdir_flag_spec\"
21403      libdir="$acl_save_libdir"
21404      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
21405    else
21406            for found_dir in $rpathdirs; do
21407        acl_save_libdir="$libdir"
21408        libdir="$found_dir"
21409        eval flag=\"$acl_hardcode_libdir_flag_spec\"
21410        libdir="$acl_save_libdir"
21411        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
21412      done
21413    fi
21414  fi
21415  if test "X$ltrpathdirs" != "X"; then
21416            for found_dir in $ltrpathdirs; do
21417      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
21418    done
21419  fi
21420
21421
21422
21423
21424
21425
21426
21427  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use C++" >&5
21428$as_echo_n "checking whether to use C++... " >&6; }
21429    # Check whether --enable-c++ was given.
21430if test "${enable_c__+set}" = set; then :
21431  enableval=$enable_c__; CXX_CHOICE="$enableval"
21432else
21433  CXX_CHOICE=yes
21434fi
21435
21436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_CHOICE" >&5
21437$as_echo "$CXX_CHOICE" >&6; }
21438
21439
21440
21441
21442
21443
21444  if test "$CXX_CHOICE" = no; then
21445    CXX=no
21446  fi
21447  if test -z "$CXX"; then
21448    if test -n "$CCC"; then
21449      CXX="$CCC"
21450    else
21451      if test -n "$ac_tool_prefix"; then
21452  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
21453  do
21454    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21455set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21457$as_echo_n "checking for $ac_word... " >&6; }
21458if ${ac_cv_prog_CXX+:} false; then :
21459  $as_echo_n "(cached) " >&6
21460else
21461  if test -n "$CXX"; then
21462  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21463else
21464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21465for as_dir in $PATH
21466do
21467  IFS=$as_save_IFS
21468  test -z "$as_dir" && as_dir=.
21469    for ac_exec_ext in '' $ac_executable_extensions; do
21470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21471    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21473    break 2
21474  fi
21475done
21476  done
21477IFS=$as_save_IFS
21478
21479fi
21480fi
21481CXX=$ac_cv_prog_CXX
21482if test -n "$CXX"; then
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21484$as_echo "$CXX" >&6; }
21485else
21486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21487$as_echo "no" >&6; }
21488fi
21489
21490
21491    test -n "$CXX" && break
21492  done
21493fi
21494if test -z "$CXX"; then
21495  ac_ct_CXX=$CXX
21496  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
21497do
21498  # Extract the first word of "$ac_prog", so it can be a program name with args.
21499set dummy $ac_prog; ac_word=$2
21500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21501$as_echo_n "checking for $ac_word... " >&6; }
21502if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21503  $as_echo_n "(cached) " >&6
21504else
21505  if test -n "$ac_ct_CXX"; then
21506  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21507else
21508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21509for as_dir in $PATH
21510do
21511  IFS=$as_save_IFS
21512  test -z "$as_dir" && as_dir=.
21513    for ac_exec_ext in '' $ac_executable_extensions; do
21514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21515    ac_cv_prog_ac_ct_CXX="$ac_prog"
21516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21517    break 2
21518  fi
21519done
21520  done
21521IFS=$as_save_IFS
21522
21523fi
21524fi
21525ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21526if test -n "$ac_ct_CXX"; then
21527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21528$as_echo "$ac_ct_CXX" >&6; }
21529else
21530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21531$as_echo "no" >&6; }
21532fi
21533
21534
21535  test -n "$ac_ct_CXX" && break
21536done
21537
21538  if test "x$ac_ct_CXX" = x; then
21539    CXX=":"
21540  else
21541    case $cross_compiling:$ac_tool_warned in
21542yes:)
21543{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21544$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21545ac_tool_warned=yes ;;
21546esac
21547    CXX=$ac_ct_CXX
21548  fi
21549fi
21550
21551    fi
21552  fi
21553  if test "$CXX" != no; then
21554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
21555$as_echo_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works... " >&6; }
21556    ac_ext=cpp
21557ac_cpp='$CXXCPP $CPPFLAGS'
21558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21559ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21561
21562
21563
21564    echo 'int main () { return 0; }' > conftest.$ac_ext
21565    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
21566  (eval $ac_link) 2>&5
21567  ac_status=$?
21568  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21569  test $ac_status = 0; } && test -s conftest$ac_exeext; then
21570      gl_cv_prog_ansicxx_works=yes
21571      if (./conftest; exit) 2>/dev/null; then
21572        gl_cv_prog_ansicxx_cross=no
21573      else
21574        gl_cv_prog_ansicxx_cross=yes
21575      fi
21576    else
21577      gl_cv_prog_ansicxx_works=no
21578    fi
21579    rm -fr conftest*
21580    ac_ext=c
21581ac_cpp='$CPP $CPPFLAGS'
21582ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21583ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21584ac_compiler_gnu=$ac_cv_c_compiler_gnu
21585
21586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_works" >&5
21587$as_echo "$gl_cv_prog_ansicxx_works" >&6; }
21588    if test $gl_cv_prog_ansicxx_works = no; then
21589      CXX=no
21590    else
21591                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports namespaces" >&5
21592$as_echo_n "checking whether the C++ compiler supports namespaces... " >&6; }
21593      ac_ext=cpp
21594ac_cpp='$CXXCPP $CPPFLAGS'
21595ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21596ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21597ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21598
21599      cat <<EOF > conftest.$ac_ext
21600#include <iostream>
21601namespace test { using namespace std; }
21602std::ostream* ptr;
21603int main () { return 0; }
21604EOF
21605      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
21606  (eval $ac_link) 2>&5
21607  ac_status=$?
21608  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21609  test $ac_status = 0; } && test -s conftest$ac_exeext; then
21610        gl_cv_prog_ansicxx_namespaces=yes
21611      else
21612        gl_cv_prog_ansicxx_namespaces=no
21613      fi
21614      rm -fr conftest*
21615      ac_ext=c
21616ac_cpp='$CPP $CPPFLAGS'
21617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21619ac_compiler_gnu=$ac_cv_c_compiler_gnu
21620
21621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_namespaces" >&5
21622$as_echo "$gl_cv_prog_ansicxx_namespaces" >&6; }
21623      if test $gl_cv_prog_ansicxx_namespaces = no; then
21624        CXX=no
21625      fi
21626    fi
21627  fi
21628
21629
21630
21631   if test "$CXX" != no; then
21632  ANSICXX_TRUE=
21633  ANSICXX_FALSE='#'
21634else
21635  ANSICXX_TRUE='#'
21636  ANSICXX_FALSE=
21637fi
21638
21639
21640  if test "$CXX" != no; then
21641
21642depcc="$CXX"  am_compiler_list=
21643
21644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
21645$as_echo_n "checking dependency style of $depcc... " >&6; }
21646if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
21647  $as_echo_n "(cached) " >&6
21648else
21649  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
21650  # We make a subdir and do the tests there.  Otherwise we can end up
21651  # making bogus files that we don't know about and never remove.  For
21652  # instance it was reported that on HP-UX the gcc test will end up
21653  # making a dummy file named 'D' -- because '-MD' means "put the output
21654  # in D".
21655  rm -rf conftest.dir
21656  mkdir conftest.dir
21657  # Copy depcomp to subdir because otherwise we won't find it if we're
21658  # using a relative directory.
21659  cp "$am_depcomp" conftest.dir
21660  cd conftest.dir
21661  # We will build objects and dependencies in a subdirectory because
21662  # it helps to detect inapplicable dependency modes.  For instance
21663  # both Tru64's cc and ICC support -MD to output dependencies as a
21664  # side effect of compilation, but ICC will put the dependencies in
21665  # the current directory while Tru64 will put them in the object
21666  # directory.
21667  mkdir sub
21668
21669  am_cv_CXX_dependencies_compiler_type=none
21670  if test "$am_compiler_list" = ""; then
21671     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
21672  fi
21673  am__universal=false
21674  case " $depcc " in #(
21675     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21676     esac
21677
21678  for depmode in $am_compiler_list; do
21679    # Setup a source with many dependencies, because some compilers
21680    # like to wrap large dependency lists on column 80 (with \), and
21681    # we should not choose a depcomp mode which is confused by this.
21682    #
21683    # We need to recreate these files for each test, as the compiler may
21684    # overwrite some of them when testing with obscure command lines.
21685    # This happens at least with the AIX C compiler.
21686    : > sub/conftest.c
21687    for i in 1 2 3 4 5 6; do
21688      echo '#include "conftst'$i'.h"' >> sub/conftest.c
21689      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
21690      # Solaris 10 /bin/sh.
21691      echo '/* dummy */' > sub/conftst$i.h
21692    done
21693    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
21694
21695    # We check with '-c' and '-o' for the sake of the "dashmstdout"
21696    # mode.  It turns out that the SunPro C++ compiler does not properly
21697    # handle '-M -o', and we need to detect this.  Also, some Intel
21698    # versions had trouble with output in subdirs.
21699    am__obj=sub/conftest.${OBJEXT-o}
21700    am__minus_obj="-o $am__obj"
21701    case $depmode in
21702    gcc)
21703      # This depmode causes a compiler race in universal mode.
21704      test "$am__universal" = false || continue
21705      ;;
21706    nosideeffect)
21707      # After this tag, mechanisms are not by side-effect, so they'll
21708      # only be used when explicitly requested.
21709      if test "x$enable_dependency_tracking" = xyes; then
21710	continue
21711      else
21712	break
21713      fi
21714      ;;
21715    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
21716      # This compiler won't grok '-c -o', but also, the minuso test has
21717      # not run yet.  These depmodes are late enough in the game, and
21718      # so weak that their functioning should not be impacted.
21719      am__obj=conftest.${OBJEXT-o}
21720      am__minus_obj=
21721      ;;
21722    none) break ;;
21723    esac
21724    if depmode=$depmode \
21725       source=sub/conftest.c object=$am__obj \
21726       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
21727       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
21728         >/dev/null 2>conftest.err &&
21729       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
21730       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
21731       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
21732       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
21733      # icc doesn't choke on unknown options, it will just issue warnings
21734      # or remarks (even with -Werror).  So we grep stderr for any message
21735      # that says an option was ignored or not supported.
21736      # When given -MP, icc 7.0 and 7.1 complain thusly:
21737      #   icc: Command line warning: ignoring option '-M'; no argument required
21738      # The diagnosis changed in icc 8.0:
21739      #   icc: Command line remark: option '-MP' not supported
21740      if (grep 'ignoring option' conftest.err ||
21741          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
21742        am_cv_CXX_dependencies_compiler_type=$depmode
21743        break
21744      fi
21745    fi
21746  done
21747
21748  cd ..
21749  rm -rf conftest.dir
21750else
21751  am_cv_CXX_dependencies_compiler_type=none
21752fi
21753
21754fi
21755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
21756$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
21757CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
21758
21759 if
21760  test "x$enable_dependency_tracking" != xno \
21761  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
21762  am__fastdepCXX_TRUE=
21763  am__fastdepCXX_FALSE='#'
21764else
21765  am__fastdepCXX_TRUE='#'
21766  am__fastdepCXX_FALSE=
21767fi
21768
21769
21770        ac_ext=cpp
21771ac_cpp='$CXXCPP $CPPFLAGS'
21772ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21773ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21774ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21775
21776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21777$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21778if ${ac_cv_cxx_compiler_gnu+:} false; then :
21779  $as_echo_n "(cached) " >&6
21780else
21781  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21782/* end confdefs.h.  */
21783
21784int
21785main ()
21786{
21787#ifndef __GNUC__
21788       choke me
21789#endif
21790
21791  ;
21792  return 0;
21793}
21794_ACEOF
21795if ac_fn_cxx_try_compile "$LINENO"; then :
21796  ac_compiler_gnu=yes
21797else
21798  ac_compiler_gnu=no
21799fi
21800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21801ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21802
21803fi
21804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21805$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21806    if test $ac_compiler_gnu = yes; then
21807      GXX=yes
21808    else
21809      GXX=
21810    fi
21811    ac_test_CXXFLAGS=${CXXFLAGS+set}
21812ac_save_CXXFLAGS=$CXXFLAGS
21813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21814$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21815if ${ac_cv_prog_cxx_g+:} false; then :
21816  $as_echo_n "(cached) " >&6
21817else
21818  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21819   ac_cxx_werror_flag=yes
21820   ac_cv_prog_cxx_g=no
21821   CXXFLAGS="-g"
21822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21823/* end confdefs.h.  */
21824
21825int
21826main ()
21827{
21828
21829  ;
21830  return 0;
21831}
21832_ACEOF
21833if ac_fn_cxx_try_compile "$LINENO"; then :
21834  ac_cv_prog_cxx_g=yes
21835else
21836  CXXFLAGS=""
21837      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21838/* end confdefs.h.  */
21839
21840int
21841main ()
21842{
21843
21844  ;
21845  return 0;
21846}
21847_ACEOF
21848if ac_fn_cxx_try_compile "$LINENO"; then :
21849
21850else
21851  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21852	 CXXFLAGS="-g"
21853	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21854/* end confdefs.h.  */
21855
21856int
21857main ()
21858{
21859
21860  ;
21861  return 0;
21862}
21863_ACEOF
21864if ac_fn_cxx_try_compile "$LINENO"; then :
21865  ac_cv_prog_cxx_g=yes
21866fi
21867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21868fi
21869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21870fi
21871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21872   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21873fi
21874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21875$as_echo "$ac_cv_prog_cxx_g" >&6; }
21876if test "$ac_test_CXXFLAGS" = set; then
21877  CXXFLAGS=$ac_save_CXXFLAGS
21878elif test $ac_cv_prog_cxx_g = yes; then
21879  if test "$GXX" = yes; then
21880    CXXFLAGS="-g -O2"
21881  else
21882    CXXFLAGS="-g"
21883  fi
21884else
21885  if test "$GXX" = yes; then
21886    CXXFLAGS="-O2"
21887  else
21888    CXXFLAGS=
21889  fi
21890fi
21891    ac_ext=c
21892ac_cpp='$CPP $CPPFLAGS'
21893ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21894ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21895ac_compiler_gnu=$ac_cv_c_compiler_gnu
21896
21897  else
21898     if false; then
21899  am__fastdepCXX_TRUE=
21900  am__fastdepCXX_FALSE='#'
21901else
21902  am__fastdepCXX_TRUE='#'
21903  am__fastdepCXX_FALSE=
21904fi
21905
21906  fi
21907
21908
21909
21910
21911  GNULIB_ICONV=0;
21912    ICONV_CONST=;
21913  REPLACE_ICONV=0;
21914  REPLACE_ICONV_OPEN=0;
21915  REPLACE_ICONV_UTF=0;
21916  ICONV_H='';
21917  if test "$CXX" != no; then
21918              ICONV_H='iconv.h'
21919     fi
21920
21921   if test -n "$ICONV_H"; then
21922  GL_GENERATE_ICONV_H_TRUE=
21923  GL_GENERATE_ICONV_H_FALSE='#'
21924else
21925  GL_GENERATE_ICONV_H_TRUE='#'
21926  GL_GENERATE_ICONV_H_FALSE=
21927fi
21928
21929
21930
21931
21932
21933
21934
21935          am_save_CPPFLAGS="$CPPFLAGS"
21936
21937  for element in $INCICONV; do
21938    haveit=
21939    for x in $CPPFLAGS; do
21940
21941  acl_save_prefix="$prefix"
21942  prefix="$acl_final_prefix"
21943  acl_save_exec_prefix="$exec_prefix"
21944  exec_prefix="$acl_final_exec_prefix"
21945  eval x=\"$x\"
21946  exec_prefix="$acl_save_exec_prefix"
21947  prefix="$acl_save_prefix"
21948
21949      if test "X$x" = "X$element"; then
21950        haveit=yes
21951        break
21952      fi
21953    done
21954    if test -z "$haveit"; then
21955      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
21956    fi
21957  done
21958
21959
21960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
21961$as_echo_n "checking for iconv... " >&6; }
21962if ${am_cv_func_iconv+:} false; then :
21963  $as_echo_n "(cached) " >&6
21964else
21965
21966    am_cv_func_iconv="no, consider installing GNU libiconv"
21967    am_cv_lib_iconv=no
21968    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21969/* end confdefs.h.  */
21970
21971#include <stdlib.h>
21972#include <iconv.h>
21973
21974int
21975main ()
21976{
21977iconv_t cd = iconv_open("","");
21978           iconv(cd,NULL,NULL,NULL,NULL);
21979           iconv_close(cd);
21980  ;
21981  return 0;
21982}
21983_ACEOF
21984if ac_fn_c_try_link "$LINENO"; then :
21985  am_cv_func_iconv=yes
21986fi
21987rm -f core conftest.err conftest.$ac_objext \
21988    conftest$ac_exeext conftest.$ac_ext
21989    if test "$am_cv_func_iconv" != yes; then
21990      am_save_LIBS="$LIBS"
21991      LIBS="$LIBS $LIBICONV"
21992      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21993/* end confdefs.h.  */
21994
21995#include <stdlib.h>
21996#include <iconv.h>
21997
21998int
21999main ()
22000{
22001iconv_t cd = iconv_open("","");
22002             iconv(cd,NULL,NULL,NULL,NULL);
22003             iconv_close(cd);
22004  ;
22005  return 0;
22006}
22007_ACEOF
22008if ac_fn_c_try_link "$LINENO"; then :
22009  am_cv_lib_iconv=yes
22010        am_cv_func_iconv=yes
22011fi
22012rm -f core conftest.err conftest.$ac_objext \
22013    conftest$ac_exeext conftest.$ac_ext
22014      LIBS="$am_save_LIBS"
22015    fi
22016
22017fi
22018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
22019$as_echo "$am_cv_func_iconv" >&6; }
22020  if test "$am_cv_func_iconv" = yes; then
22021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
22022$as_echo_n "checking for working iconv... " >&6; }
22023if ${am_cv_func_iconv_works+:} false; then :
22024  $as_echo_n "(cached) " >&6
22025else
22026
22027                  am_save_LIBS="$LIBS"
22028      if test $am_cv_lib_iconv = yes; then
22029        LIBS="$LIBS $LIBICONV"
22030      fi
22031      am_cv_func_iconv_works=no
22032      for ac_iconv_const in '' 'const'; do
22033        if test "$cross_compiling" = yes; then :
22034  case "$host_os" in
22035             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
22036             *)            am_cv_func_iconv_works="guessing yes" ;;
22037           esac
22038else
22039  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22040/* end confdefs.h.  */
22041
22042#include <iconv.h>
22043#include <string.h>
22044
22045#ifndef ICONV_CONST
22046# define ICONV_CONST $ac_iconv_const
22047#endif
22048
22049int
22050main ()
22051{
22052int result = 0;
22053  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
22054     returns.  */
22055  {
22056    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
22057    if (cd_utf8_to_88591 != (iconv_t)(-1))
22058      {
22059        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
22060        char buf[10];
22061        ICONV_CONST char *inptr = input;
22062        size_t inbytesleft = strlen (input);
22063        char *outptr = buf;
22064        size_t outbytesleft = sizeof (buf);
22065        size_t res = iconv (cd_utf8_to_88591,
22066                            &inptr, &inbytesleft,
22067                            &outptr, &outbytesleft);
22068        if (res == 0)
22069          result |= 1;
22070        iconv_close (cd_utf8_to_88591);
22071      }
22072  }
22073  /* Test against Solaris 10 bug: Failures are not distinguishable from
22074     successful returns.  */
22075  {
22076    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
22077    if (cd_ascii_to_88591 != (iconv_t)(-1))
22078      {
22079        static ICONV_CONST char input[] = "\263";
22080        char buf[10];
22081        ICONV_CONST char *inptr = input;
22082        size_t inbytesleft = strlen (input);
22083        char *outptr = buf;
22084        size_t outbytesleft = sizeof (buf);
22085        size_t res = iconv (cd_ascii_to_88591,
22086                            &inptr, &inbytesleft,
22087                            &outptr, &outbytesleft);
22088        if (res == 0)
22089          result |= 2;
22090        iconv_close (cd_ascii_to_88591);
22091      }
22092  }
22093  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
22094  {
22095    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
22096    if (cd_88591_to_utf8 != (iconv_t)(-1))
22097      {
22098        static ICONV_CONST char input[] = "\304";
22099        static char buf[2] = { (char)0xDE, (char)0xAD };
22100        ICONV_CONST char *inptr = input;
22101        size_t inbytesleft = 1;
22102        char *outptr = buf;
22103        size_t outbytesleft = 1;
22104        size_t res = iconv (cd_88591_to_utf8,
22105                            &inptr, &inbytesleft,
22106                            &outptr, &outbytesleft);
22107        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
22108          result |= 4;
22109        iconv_close (cd_88591_to_utf8);
22110      }
22111  }
22112#if 0 /* This bug could be worked around by the caller.  */
22113  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
22114  {
22115    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
22116    if (cd_88591_to_utf8 != (iconv_t)(-1))
22117      {
22118        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
22119        char buf[50];
22120        ICONV_CONST char *inptr = input;
22121        size_t inbytesleft = strlen (input);
22122        char *outptr = buf;
22123        size_t outbytesleft = sizeof (buf);
22124        size_t res = iconv (cd_88591_to_utf8,
22125                            &inptr, &inbytesleft,
22126                            &outptr, &outbytesleft);
22127        if ((int)res > 0)
22128          result |= 8;
22129        iconv_close (cd_88591_to_utf8);
22130      }
22131  }
22132#endif
22133  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
22134     provided.  */
22135  {
22136    /* Try standardized names.  */
22137    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
22138    /* Try IRIX, OSF/1 names.  */
22139    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
22140    /* Try AIX names.  */
22141    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
22142    /* Try HP-UX names.  */
22143    iconv_t cd4 = iconv_open ("utf8", "eucJP");
22144    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
22145        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
22146      result |= 16;
22147    if (cd1 != (iconv_t)(-1))
22148      iconv_close (cd1);
22149    if (cd2 != (iconv_t)(-1))
22150      iconv_close (cd2);
22151    if (cd3 != (iconv_t)(-1))
22152      iconv_close (cd3);
22153    if (cd4 != (iconv_t)(-1))
22154      iconv_close (cd4);
22155  }
22156  return result;
22157
22158  ;
22159  return 0;
22160}
22161_ACEOF
22162if ac_fn_c_try_run "$LINENO"; then :
22163  am_cv_func_iconv_works=yes
22164fi
22165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22166  conftest.$ac_objext conftest.beam conftest.$ac_ext
22167fi
22168
22169        test "$am_cv_func_iconv_works" = no || break
22170      done
22171      LIBS="$am_save_LIBS"
22172
22173fi
22174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
22175$as_echo "$am_cv_func_iconv_works" >&6; }
22176    case "$am_cv_func_iconv_works" in
22177      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
22178      *)   am_func_iconv=yes ;;
22179    esac
22180  else
22181    am_func_iconv=no am_cv_lib_iconv=no
22182  fi
22183  if test "$am_func_iconv" = yes; then
22184
22185$as_echo "#define HAVE_ICONV 1" >>confdefs.h
22186
22187  fi
22188  if test "$am_cv_lib_iconv" = yes; then
22189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
22190$as_echo_n "checking how to link with libiconv... " >&6; }
22191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
22192$as_echo "$LIBICONV" >&6; }
22193  else
22194            CPPFLAGS="$am_save_CPPFLAGS"
22195    LIBICONV=
22196    LTLIBICONV=
22197  fi
22198
22199
22200
22201  if test "$am_cv_func_iconv" = yes; then
22202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
22203$as_echo_n "checking for iconv declaration... " >&6; }
22204    if ${am_cv_proto_iconv+:} false; then :
22205  $as_echo_n "(cached) " >&6
22206else
22207
22208      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22209/* end confdefs.h.  */
22210
22211#include <stdlib.h>
22212#include <iconv.h>
22213extern
22214#ifdef __cplusplus
22215"C"
22216#endif
22217#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
22218size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
22219#else
22220size_t iconv();
22221#endif
22222
22223int
22224main ()
22225{
22226
22227  ;
22228  return 0;
22229}
22230_ACEOF
22231if ac_fn_c_try_compile "$LINENO"; then :
22232  am_cv_proto_iconv_arg1=""
22233else
22234  am_cv_proto_iconv_arg1="const"
22235fi
22236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22237      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);"
22238fi
22239
22240    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
22241    { $as_echo "$as_me:${as_lineno-$LINENO}: result:
22242         $am_cv_proto_iconv" >&5
22243$as_echo "
22244         $am_cv_proto_iconv" >&6; }
22245  else
22246            am_cv_proto_iconv_arg1=""
22247  fi
22248
22249cat >>confdefs.h <<_ACEOF
22250#define ICONV_CONST $am_cv_proto_iconv_arg1
22251_ACEOF
22252
22253
22254     if test -n "$am_cv_proto_iconv_arg1"; then
22255       ICONV_CONST="const"
22256     fi
22257
22258
22259
22260
22261
22262  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22263/* end confdefs.h.  */
22264int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }
22265int
22266main ()
22267{
22268
22269  ;
22270  return 0;
22271}
22272_ACEOF
22273if ac_fn_c_try_link "$LINENO"; then :
22274
22275$as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h
22276
22277fi
22278rm -f core conftest.err conftest.$ac_objext \
22279    conftest$ac_exeext conftest.$ac_ext
22280
22281  for ac_header in inttypes.h limits.h unistd.h sys/param.h
22282do :
22283  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22284ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22285if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
22286  cat >>confdefs.h <<_ACEOF
22287#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22288_ACEOF
22289
22290fi
22291
22292done
22293
22294  for ac_func in getcwd getegid geteuid getgid getuid mempcpy munmap \
22295    stpcpy strcasecmp strdup strtoul tsearch __fsetlocking
22296do :
22297  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22298ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22299if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
22300  cat >>confdefs.h <<_ACEOF
22301#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22302_ACEOF
22303
22304fi
22305done
22306
22307
22308          ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "#include <stdio.h>
22309"
22310if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
22311  ac_have_decl=1
22312else
22313  ac_have_decl=0
22314fi
22315
22316cat >>confdefs.h <<_ACEOF
22317#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
22318_ACEOF
22319ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "#include <stdio.h>
22320"
22321if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
22322  ac_have_decl=1
22323else
22324  ac_have_decl=0
22325fi
22326
22327cat >>confdefs.h <<_ACEOF
22328#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
22329_ACEOF
22330
22331
22332
22333
22334
22335  for ac_prog in bison
22336do
22337  # Extract the first word of "$ac_prog", so it can be a program name with args.
22338set dummy $ac_prog; ac_word=$2
22339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22340$as_echo_n "checking for $ac_word... " >&6; }
22341if ${ac_cv_prog_INTLBISON+:} false; then :
22342  $as_echo_n "(cached) " >&6
22343else
22344  if test -n "$INTLBISON"; then
22345  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
22346else
22347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22348for as_dir in $PATH
22349do
22350  IFS=$as_save_IFS
22351  test -z "$as_dir" && as_dir=.
22352    for ac_exec_ext in '' $ac_executable_extensions; do
22353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22354    ac_cv_prog_INTLBISON="$ac_prog"
22355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22356    break 2
22357  fi
22358done
22359  done
22360IFS=$as_save_IFS
22361
22362fi
22363fi
22364INTLBISON=$ac_cv_prog_INTLBISON
22365if test -n "$INTLBISON"; then
22366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5
22367$as_echo "$INTLBISON" >&6; }
22368else
22369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22370$as_echo "no" >&6; }
22371fi
22372
22373
22374  test -n "$INTLBISON" && break
22375done
22376
22377  if test -z "$INTLBISON"; then
22378    ac_verc_fail=yes
22379  else
22380    cat >conftest.y <<_ACEOF
22381%require "3.0"
22382%%
22383exp:
22384_ACEOF
22385    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bison 3.0 or newer" >&5
22386$as_echo_n "checking for bison 3.0 or newer... " >&6; }
22387    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
22388    : ${ac_prog_version:='v. ?.??'}
22389    if $INTLBISON conftest.y -o conftest.c 2>/dev/null; then
22390      ac_prog_version="$ac_prog_version, ok"
22391      ac_verc_fail=no
22392    else
22393      ac_prog_version="$ac_prog_version, bad"
22394      ac_verc_fail=yes
22395    fi
22396    rm -f conftest.y conftest.c
22397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
22398$as_echo "$ac_prog_version" >&6; }
22399  fi
22400  if test $ac_verc_fail = yes; then
22401    INTLBISON=:
22402  fi
22403
22404
22405
22406
22407
22408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
22409$as_echo_n "checking for long long int... " >&6; }
22410if ${ac_cv_type_long_long_int+:} false; then :
22411  $as_echo_n "(cached) " >&6
22412else
22413  ac_cv_type_long_long_int=yes
22414      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
22415	ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
22416	if test $ac_cv_type_long_long_int = yes; then
22417	  	  	  	  if test "$cross_compiling" = yes; then :
22418  :
22419else
22420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22421/* end confdefs.h.  */
22422#include <limits.h>
22423		 #ifndef LLONG_MAX
22424		 # define HALF \
22425			  (1LL << (sizeof (long long int) * CHAR_BIT - 2))
22426		 # define LLONG_MAX (HALF - 1 + HALF)
22427		 #endif
22428int
22429main ()
22430{
22431long long int n = 1;
22432		 int i;
22433		 for (i = 0; ; i++)
22434		   {
22435		     long long int m = n << i;
22436		     if (m >> i != n)
22437		       return 1;
22438		     if (LLONG_MAX / 2 < m)
22439		       break;
22440		   }
22441		 return 0;
22442  ;
22443  return 0;
22444}
22445_ACEOF
22446if ac_fn_c_try_run "$LINENO"; then :
22447
22448else
22449  ac_cv_type_long_long_int=no
22450fi
22451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22452  conftest.$ac_objext conftest.beam conftest.$ac_ext
22453fi
22454
22455	fi
22456      fi
22457fi
22458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
22459$as_echo "$ac_cv_type_long_long_int" >&6; }
22460  if test $ac_cv_type_long_long_int = yes; then
22461
22462$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
22463
22464  fi
22465
22466
22467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
22468$as_echo_n "checking for wchar_t... " >&6; }
22469if ${gt_cv_c_wchar_t+:} false; then :
22470  $as_echo_n "(cached) " >&6
22471else
22472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22473/* end confdefs.h.  */
22474#include <stddef.h>
22475            wchar_t foo = (wchar_t)'\0';
22476int
22477main ()
22478{
22479
22480  ;
22481  return 0;
22482}
22483_ACEOF
22484if ac_fn_c_try_compile "$LINENO"; then :
22485  gt_cv_c_wchar_t=yes
22486else
22487  gt_cv_c_wchar_t=no
22488fi
22489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22490fi
22491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
22492$as_echo "$gt_cv_c_wchar_t" >&6; }
22493  if test $gt_cv_c_wchar_t = yes; then
22494
22495$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
22496
22497  fi
22498
22499
22500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
22501$as_echo_n "checking for wint_t... " >&6; }
22502if ${gt_cv_c_wint_t+:} false; then :
22503  $as_echo_n "(cached) " >&6
22504else
22505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22506/* end confdefs.h.  */
22507
22508/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22509   <wchar.h>.
22510   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
22511   before <wchar.h>.  */
22512#include <stddef.h>
22513#include <stdio.h>
22514#include <time.h>
22515#include <wchar.h>
22516            wint_t foo = (wchar_t)'\0';
22517int
22518main ()
22519{
22520
22521  ;
22522  return 0;
22523}
22524_ACEOF
22525if ac_fn_c_try_compile "$LINENO"; then :
22526  gt_cv_c_wint_t=yes
22527else
22528  gt_cv_c_wint_t=no
22529fi
22530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22531fi
22532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
22533$as_echo "$gt_cv_c_wint_t" >&6; }
22534  if test $gt_cv_c_wint_t = yes; then
22535
22536$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
22537
22538
22539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
22540$as_echo_n "checking whether wint_t is too small... " >&6; }
22541if ${gl_cv_type_wint_t_too_small+:} false; then :
22542  $as_echo_n "(cached) " >&6
22543else
22544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22545/* end confdefs.h.  */
22546
22547/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22548   <wchar.h>.
22549   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22550   included before <wchar.h>.  */
22551#if !(defined __GLIBC__ && !defined __UCLIBC__)
22552# include <stddef.h>
22553# include <stdio.h>
22554# include <time.h>
22555#endif
22556#include <wchar.h>
22557            int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
22558
22559int
22560main ()
22561{
22562
22563  ;
22564  return 0;
22565}
22566_ACEOF
22567if ac_fn_c_try_compile "$LINENO"; then :
22568  gl_cv_type_wint_t_too_small=no
22569else
22570  gl_cv_type_wint_t_too_small=yes
22571fi
22572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22573fi
22574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
22575$as_echo "$gl_cv_type_wint_t_too_small" >&6; }
22576    if test $gl_cv_type_wint_t_too_small = yes; then
22577      GNULIB_OVERRIDES_WINT_T=1
22578    else
22579      GNULIB_OVERRIDES_WINT_T=0
22580    fi
22581  else
22582    GNULIB_OVERRIDES_WINT_T=0
22583  fi
22584
22585
22586
22587
22588
22589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
22590$as_echo_n "checking for intmax_t... " >&6; }
22591if ${gt_cv_c_intmax_t+:} false; then :
22592  $as_echo_n "(cached) " >&6
22593else
22594  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22595/* end confdefs.h.  */
22596
22597#include <stddef.h>
22598#include <stdlib.h>
22599#if HAVE_STDINT_H_WITH_UINTMAX
22600#include <stdint.h>
22601#endif
22602#if HAVE_INTTYPES_H_WITH_UINTMAX
22603#include <inttypes.h>
22604#endif
22605
22606int
22607main ()
22608{
22609intmax_t x = -1;
22610            return !x;
22611  ;
22612  return 0;
22613}
22614_ACEOF
22615if ac_fn_c_try_compile "$LINENO"; then :
22616  gt_cv_c_intmax_t=yes
22617else
22618  gt_cv_c_intmax_t=no
22619fi
22620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22621fi
22622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
22623$as_echo "$gt_cv_c_intmax_t" >&6; }
22624  if test $gt_cv_c_intmax_t = yes; then
22625
22626$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
22627
22628  fi
22629
22630
22631
22632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5
22633$as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; }
22634if ${gt_cv_func_printf_posix+:} false; then :
22635  $as_echo_n "(cached) " >&6
22636else
22637
22638      if test "$cross_compiling" = yes; then :
22639
22640          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22641/* end confdefs.h.  */
22642
22643#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
22644  notposix
22645#endif
22646
22647_ACEOF
22648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22649  $EGREP "notposix" >/dev/null 2>&1; then :
22650  gt_cv_func_printf_posix="guessing no"
22651else
22652  gt_cv_func_printf_posix="guessing yes"
22653fi
22654rm -f conftest*
22655
22656
22657else
22658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22659/* end confdefs.h.  */
22660
22661#include <stdio.h>
22662#include <string.h>
22663/* The string "%2$d %1$d", with dollar characters protected from the shell's
22664   dollar expansion (possibly an autoconf bug).  */
22665static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
22666static char buf[100];
22667int main ()
22668{
22669  sprintf (buf, format, 33, 55);
22670  return (strcmp (buf, "55 33") != 0);
22671}
22672_ACEOF
22673if ac_fn_c_try_run "$LINENO"; then :
22674  gt_cv_func_printf_posix=yes
22675else
22676  gt_cv_func_printf_posix=no
22677fi
22678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22679  conftest.$ac_objext conftest.beam conftest.$ac_ext
22680fi
22681
22682
22683fi
22684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_printf_posix" >&5
22685$as_echo "$gt_cv_func_printf_posix" >&6; }
22686  case $gt_cv_func_printf_posix in
22687    *yes)
22688
22689$as_echo "#define HAVE_POSIX_PRINTF 1" >>confdefs.h
22690
22691      ;;
22692  esac
22693
22694
22695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
22696$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
22697if ${ac_cv_gnu_library_2_1+:} false; then :
22698  $as_echo_n "(cached) " >&6
22699else
22700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22701/* end confdefs.h.  */
22702
22703#include <features.h>
22704#ifdef __GNU_LIBRARY__
22705 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
22706  Lucky GNU user
22707 #endif
22708#endif
22709#ifdef __UCLIBC__
22710 Lucky user
22711#endif
22712
22713_ACEOF
22714if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22715  $EGREP "Lucky" >/dev/null 2>&1; then :
22716  ac_cv_gnu_library_2_1=yes
22717else
22718  ac_cv_gnu_library_2_1=no
22719fi
22720rm -f conftest*
22721
22722
22723
22724fi
22725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
22726$as_echo "$ac_cv_gnu_library_2_1" >&6; }
22727
22728    GLIBC21="$ac_cv_gnu_library_2_1"
22729
22730
22731
22732  for ac_header in stdint.h
22733do :
22734  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
22735if test "x$ac_cv_header_stdint_h" = xyes; then :
22736  cat >>confdefs.h <<_ACEOF
22737#define HAVE_STDINT_H 1
22738_ACEOF
22739
22740fi
22741
22742done
22743
22744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
22745$as_echo_n "checking for SIZE_MAX... " >&6; }
22746if ${gl_cv_size_max+:} false; then :
22747  $as_echo_n "(cached) " >&6
22748else
22749
22750    gl_cv_size_max=no
22751    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22752/* end confdefs.h.  */
22753
22754#include <limits.h>
22755#if HAVE_STDINT_H
22756#include <stdint.h>
22757#endif
22758#ifdef SIZE_MAX
22759Found it
22760#endif
22761
22762_ACEOF
22763if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22764  $EGREP "Found it" >/dev/null 2>&1; then :
22765  gl_cv_size_max=yes
22766fi
22767rm -f conftest*
22768
22769    if test $gl_cv_size_max != yes; then
22770                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
22771#include <limits.h>"; then :
22772
22773else
22774  size_t_bits_minus_1=
22775fi
22776
22777      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
22778
22779else
22780  fits_in_uint=
22781fi
22782
22783      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
22784        if test $fits_in_uint = 1; then
22785                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22786/* end confdefs.h.  */
22787#include <stddef.h>
22788                 extern size_t foo;
22789                 extern unsigned long foo;
22790
22791int
22792main ()
22793{
22794
22795  ;
22796  return 0;
22797}
22798_ACEOF
22799if ac_fn_c_try_compile "$LINENO"; then :
22800  fits_in_uint=0
22801fi
22802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22803        fi
22804                                if test $fits_in_uint = 1; then
22805          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
22806        else
22807          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
22808        fi
22809      else
22810                gl_cv_size_max='((size_t)~(size_t)0)'
22811      fi
22812    fi
22813
22814fi
22815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
22816$as_echo "$gl_cv_size_max" >&6; }
22817  if test "$gl_cv_size_max" != yes; then
22818
22819cat >>confdefs.h <<_ACEOF
22820#define SIZE_MAX $gl_cv_size_max
22821_ACEOF
22822
22823  fi
22824
22825
22826
22827
22828  for ac_header in stdint.h
22829do :
22830  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
22831if test "x$ac_cv_header_stdint_h" = xyes; then :
22832  cat >>confdefs.h <<_ACEOF
22833#define HAVE_STDINT_H 1
22834_ACEOF
22835
22836fi
22837
22838done
22839
22840
22841
22842
22843
22844  for ac_func in $ac_func_list
22845do :
22846  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22847ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22848if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
22849  cat >>confdefs.h <<_ACEOF
22850#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22851_ACEOF
22852
22853fi
22854done
22855
22856
22857
22858
22859
22860
22861
22862
22863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
22864$as_echo_n "checking for working fcntl.h... " >&6; }
22865if ${gl_cv_header_working_fcntl_h+:} false; then :
22866  $as_echo_n "(cached) " >&6
22867else
22868  if test "$cross_compiling" = yes; then :
22869  case "$host_os" in
22870                  # Guess 'no' on native Windows.
22871          mingw*) gl_cv_header_working_fcntl_h='no' ;;
22872          *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
22873        esac
22874
22875else
22876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22877/* end confdefs.h.  */
22878#include <sys/types.h>
22879           #include <sys/stat.h>
22880           #if HAVE_UNISTD_H
22881           # include <unistd.h>
22882           #else /* on Windows with MSVC */
22883           # include <io.h>
22884           # include <stdlib.h>
22885           # defined sleep(n) _sleep ((n) * 1000)
22886           #endif
22887           #include <fcntl.h>
22888           #ifndef O_NOATIME
22889            #define O_NOATIME 0
22890           #endif
22891           #ifndef O_NOFOLLOW
22892            #define O_NOFOLLOW 0
22893           #endif
22894           static int const constants[] =
22895            {
22896              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
22897              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
22898            };
22899
22900int
22901main ()
22902{
22903
22904            int result = !constants;
22905            #if HAVE_SYMLINK
22906            {
22907              static char const sym[] = "conftest.sym";
22908              if (symlink ("/dev/null", sym) != 0)
22909                result |= 2;
22910              else
22911                {
22912                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
22913                  if (fd >= 0)
22914                    {
22915                      close (fd);
22916                      result |= 4;
22917                    }
22918                }
22919              if (unlink (sym) != 0 || symlink (".", sym) != 0)
22920                result |= 2;
22921              else
22922                {
22923                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
22924                  if (fd >= 0)
22925                    {
22926                      close (fd);
22927                      result |= 4;
22928                    }
22929                }
22930              unlink (sym);
22931            }
22932            #endif
22933            {
22934              static char const file[] = "confdefs.h";
22935              int fd = open (file, O_RDONLY | O_NOATIME);
22936              if (fd < 0)
22937                result |= 8;
22938              else
22939                {
22940                  struct stat st0;
22941                  if (fstat (fd, &st0) != 0)
22942                    result |= 16;
22943                  else
22944                    {
22945                      char c;
22946                      sleep (1);
22947                      if (read (fd, &c, 1) != 1)
22948                        result |= 24;
22949                      else
22950                        {
22951                          if (close (fd) != 0)
22952                            result |= 32;
22953                          else
22954                            {
22955                              struct stat st1;
22956                              if (stat (file, &st1) != 0)
22957                                result |= 40;
22958                              else
22959                                if (st0.st_atime != st1.st_atime)
22960                                  result |= 64;
22961                            }
22962                        }
22963                    }
22964                }
22965            }
22966            return result;
22967  ;
22968  return 0;
22969}
22970_ACEOF
22971if ac_fn_c_try_run "$LINENO"; then :
22972  gl_cv_header_working_fcntl_h=yes
22973else
22974  case $? in #(
22975        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
22976        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
22977        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
22978         *) gl_cv_header_working_fcntl_h='no';;
22979        esac
22980fi
22981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22982  conftest.$ac_objext conftest.beam conftest.$ac_ext
22983fi
22984
22985
22986fi
22987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
22988$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
22989
22990  case $gl_cv_header_working_fcntl_h in #(
22991  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
22992  *) ac_val=1;;
22993  esac
22994
22995cat >>confdefs.h <<_ACEOF
22996#define HAVE_WORKING_O_NOATIME $ac_val
22997_ACEOF
22998
22999
23000  case $gl_cv_header_working_fcntl_h in #(
23001  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
23002  *) ac_val=1;;
23003  esac
23004
23005cat >>confdefs.h <<_ACEOF
23006#define HAVE_WORKING_O_NOFOLLOW $ac_val
23007_ACEOF
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025          if test $ac_cv_func_uselocale = yes; then
23026
23027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
23028$as_echo_n "checking whether uselocale works... " >&6; }
23029if ${gt_cv_func_uselocale_works+:} false; then :
23030  $as_echo_n "(cached) " >&6
23031else
23032  if test "$cross_compiling" = yes; then :
23033  # Guess no on AIX and z/OS, yes otherwise.
23034          case "$host_os" in
23035            aix* | openedition*) gt_cv_func_uselocale_works="guessing no" ;;
23036            *)                   gt_cv_func_uselocale_works="guessing yes" ;;
23037          esac
23038
23039else
23040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23041/* end confdefs.h.  */
23042
23043#include <locale.h>
23044#if HAVE_XLOCALE_H
23045# include <xlocale.h>
23046#endif
23047locale_t loc1;
23048int main ()
23049{
23050  uselocale (NULL);
23051  setlocale (LC_ALL, "en_US.UTF-8");
23052  return 0;
23053}
23054_ACEOF
23055if ac_fn_c_try_run "$LINENO"; then :
23056  gt_cv_func_uselocale_works=yes
23057else
23058  gt_cv_func_uselocale_works=no
23059fi
23060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23061  conftest.$ac_objext conftest.beam conftest.$ac_ext
23062fi
23063
23064
23065fi
23066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5
23067$as_echo "$gt_cv_func_uselocale_works" >&6; }
23068  else
23069    gt_cv_func_uselocale_works=no
23070  fi
23071  case "$gt_cv_func_uselocale_works" in
23072    *yes)
23073
23074$as_echo "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
23075
23076      ;;
23077  esac
23078
23079
23080                            case "$gt_cv_func_uselocale_works" in
23081    *yes)
23082
23083      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5
23084$as_echo_n "checking for fake locale system (OpenBSD)... " >&6; }
23085if ${gt_cv_locale_fake+:} false; then :
23086  $as_echo_n "(cached) " >&6
23087else
23088  if test "$cross_compiling" = yes; then :
23089              case "$host_os" in
23090              openbsd*) gt_cv_locale_fake="guessing yes" ;;
23091              *)        gt_cv_locale_fake="guessing no" ;;
23092            esac
23093
23094else
23095  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23096/* end confdefs.h.  */
23097
23098#include <locale.h>
23099#if HAVE_XLOCALE_H
23100# include <xlocale.h>
23101#endif
23102int main ()
23103{
23104  locale_t loc1, loc2;
23105  if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1;
23106  if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1;
23107  loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0);
23108  loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
23109  return !(loc1 == loc2);
23110}
23111_ACEOF
23112if ac_fn_c_try_run "$LINENO"; then :
23113  gt_cv_locale_fake=yes
23114else
23115  gt_cv_locale_fake=no
23116fi
23117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23118  conftest.$ac_objext conftest.beam conftest.$ac_ext
23119fi
23120
23121
23122fi
23123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5
23124$as_echo "$gt_cv_locale_fake" >&6; }
23125      ;;
23126    *) gt_cv_locale_fake=no ;;
23127  esac
23128  case "$gt_cv_locale_fake" in
23129    *yes)
23130
23131$as_echo "#define HAVE_FAKE_LOCALES 1" >>confdefs.h
23132
23133      ;;
23134  esac
23135
23136  case "$gt_cv_func_uselocale_works" in
23137    *yes)
23138      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5
23139$as_echo_n "checking for Solaris 11.4 locale system... " >&6; }
23140if ${gt_cv_locale_solaris114+:} false; then :
23141  $as_echo_n "(cached) " >&6
23142else
23143  case "$host_os" in
23144           solaris*)
23145                                                                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23146/* end confdefs.h.  */
23147
23148                  #include <locale.h>
23149                  struct _LC_locale_t *x;
23150                  locale_t y;
23151
23152int
23153main ()
23154{
23155*y = x;
23156  ;
23157  return 0;
23158}
23159_ACEOF
23160if ac_fn_c_try_compile "$LINENO"; then :
23161  gt_cv_locale_solaris114=yes
23162else
23163  gt_cv_locale_solaris114=no
23164fi
23165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23166             ;;
23167           *) gt_cv_locale_solaris114=no ;;
23168         esac
23169
23170fi
23171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5
23172$as_echo "$gt_cv_locale_solaris114" >&6; }
23173      ;;
23174    *) gt_cv_locale_solaris114=no ;;
23175  esac
23176  if test $gt_cv_locale_solaris114 = yes; then
23177
23178$as_echo "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h
23179
23180  fi
23181
23182        case "$gt_cv_func_uselocale_works" in
23183    *yes)
23184      for ac_func in getlocalename_l
23185do :
23186  ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l"
23187if test "x$ac_cv_func_getlocalename_l" = xyes; then :
23188  cat >>confdefs.h <<_ACEOF
23189#define HAVE_GETLOCALENAME_L 1
23190_ACEOF
23191
23192fi
23193done
23194
23195      ;;
23196  esac
23197
23198            gt_nameless_locales=no
23199  case "$host_os" in
23200        aix*)
23201      gt_nameless_locales=yes
23202
23203$as_echo "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h
23204
23205      ;;
23206  esac
23207
23208
23209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
23210$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
23211if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
23212  $as_echo_n "(cached) " >&6
23213else
23214  gt_save_LIBS="$LIBS"
23215     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
23216     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23217/* end confdefs.h.  */
23218#include <CoreFoundation/CFPreferences.h>
23219int
23220main ()
23221{
23222CFPreferencesCopyAppValue(NULL, NULL)
23223  ;
23224  return 0;
23225}
23226_ACEOF
23227if ac_fn_c_try_link "$LINENO"; then :
23228  gt_cv_func_CFPreferencesCopyAppValue=yes
23229else
23230  gt_cv_func_CFPreferencesCopyAppValue=no
23231fi
23232rm -f core conftest.err conftest.$ac_objext \
23233    conftest$ac_exeext conftest.$ac_ext
23234     LIBS="$gt_save_LIBS"
23235fi
23236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
23237$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
23238  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
23239
23240$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
23241
23242  fi
23243                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
23244$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; }
23245if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then :
23246  $as_echo_n "(cached) " >&6
23247else
23248  gt_save_LIBS="$LIBS"
23249     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
23250     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23251/* end confdefs.h.  */
23252#include <CoreFoundation/CFLocale.h>
23253int
23254main ()
23255{
23256CFLocaleCopyPreferredLanguages();
23257  ;
23258  return 0;
23259}
23260_ACEOF
23261if ac_fn_c_try_link "$LINENO"; then :
23262  gt_cv_func_CFLocaleCopyPreferredLanguages=yes
23263else
23264  gt_cv_func_CFLocaleCopyPreferredLanguages=no
23265fi
23266rm -f core conftest.err conftest.$ac_objext \
23267    conftest$ac_exeext conftest.$ac_ext
23268     LIBS="$gt_save_LIBS"
23269fi
23270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
23271$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
23272  if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
23273
23274$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
23275
23276  fi
23277  INTL_MACOSX_LIBS=
23278  if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
23279     || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
23280    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
23281  fi
23282
23283
23284
23285
23286
23287
23288
23289
23290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
23291$as_echo_n "checking for flexible array member... " >&6; }
23292if ${ac_cv_c_flexmember+:} false; then :
23293  $as_echo_n "(cached) " >&6
23294else
23295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23296/* end confdefs.h.  */
23297#include <stdlib.h>
23298            #include <stdio.h>
23299            #include <stddef.h>
23300            struct m { struct m *next, **list; char name[]; };
23301            struct s { struct s *p; struct m *m; int n; double d[]; };
23302int
23303main ()
23304{
23305int m = getchar ();
23306            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
23307            nbytes += sizeof (struct s) - 1;
23308            nbytes -= nbytes % sizeof (struct s);
23309            struct s *p = malloc (nbytes);
23310            p->p = p;
23311            p->m = NULL;
23312            p->d[0] = 0.0;
23313            return p->d != (double *) NULL;
23314  ;
23315  return 0;
23316}
23317_ACEOF
23318if ac_fn_c_try_compile "$LINENO"; then :
23319  ac_cv_c_flexmember=yes
23320else
23321  ac_cv_c_flexmember=no
23322fi
23323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23324fi
23325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
23326$as_echo "$ac_cv_c_flexmember" >&6; }
23327  if test $ac_cv_c_flexmember = yes; then
23328
23329$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
23330
23331  else
23332    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
23333
23334  fi
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344    case "$enable_silent_rules" in
23345    yes) INTL_DEFAULT_VERBOSITY=0;;
23346    no)  INTL_DEFAULT_VERBOSITY=1;;
23347    *)   INTL_DEFAULT_VERBOSITY=1;;
23348  esac
23349
23350
23351  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23352if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23353
23354else
23355
23356$as_echo "#define ptrdiff_t long" >>confdefs.h
23357
23358
23359fi
23360
23361  for ac_header in features.h stddef.h stdlib.h string.h
23362do :
23363  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23364ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23365if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23366  cat >>confdefs.h <<_ACEOF
23367#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23368_ACEOF
23369
23370fi
23371
23372done
23373
23374  for ac_func in asprintf wprintf newlocale putenv setenv \
23375    snprintf strnlen uselocale wcslen wcsnlen mbrtowc wcrtomb
23376do :
23377  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23378ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23379if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23380  cat >>confdefs.h <<_ACEOF
23381#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23382_ACEOF
23383
23384fi
23385done
23386
23387
23388      ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
23389"
23390if test "x$ac_cv_have_decl__snprintf" = xyes; then :
23391  ac_have_decl=1
23392else
23393  ac_have_decl=0
23394fi
23395
23396cat >>confdefs.h <<_ACEOF
23397#define HAVE_DECL__SNPRINTF $ac_have_decl
23398_ACEOF
23399ac_fn_c_check_decl "$LINENO" "_snwprintf" "ac_cv_have_decl__snwprintf" "#include <stdio.h>
23400"
23401if test "x$ac_cv_have_decl__snwprintf" = xyes; then :
23402  ac_have_decl=1
23403else
23404  ac_have_decl=0
23405fi
23406
23407cat >>confdefs.h <<_ACEOF
23408#define HAVE_DECL__SNWPRINTF $ac_have_decl
23409_ACEOF
23410
23411
23412          ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "#include <stdio.h>
23413"
23414if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
23415  ac_have_decl=1
23416else
23417  ac_have_decl=0
23418fi
23419
23420cat >>confdefs.h <<_ACEOF
23421#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
23422_ACEOF
23423
23424
23425  case $gt_cv_func_printf_posix in
23426    *yes) HAVE_POSIX_PRINTF=1 ;;
23427    *) HAVE_POSIX_PRINTF=0 ;;
23428  esac
23429
23430  if test "$ac_cv_func_asprintf" = yes; then
23431    HAVE_ASPRINTF=1
23432  else
23433    HAVE_ASPRINTF=0
23434  fi
23435
23436  if test "$ac_cv_func_snprintf" = yes; then
23437    HAVE_SNPRINTF=1
23438  else
23439    HAVE_SNPRINTF=0
23440  fi
23441
23442  if test "$ac_cv_func_newlocale" = yes; then
23443    HAVE_NEWLOCALE=1
23444  else
23445    HAVE_NEWLOCALE=0
23446  fi
23447
23448  if test "$ac_cv_func_wprintf" = yes; then
23449    HAVE_WPRINTF=1
23450  else
23451    HAVE_WPRINTF=0
23452  fi
23453
23454
23455
23456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
23457$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
23458if ${am_cv_langinfo_codeset+:} false; then :
23459  $as_echo_n "(cached) " >&6
23460else
23461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23462/* end confdefs.h.  */
23463#include <langinfo.h>
23464int
23465main ()
23466{
23467char* cs = nl_langinfo(CODESET); return !cs;
23468  ;
23469  return 0;
23470}
23471_ACEOF
23472if ac_fn_c_try_link "$LINENO"; then :
23473  am_cv_langinfo_codeset=yes
23474else
23475  am_cv_langinfo_codeset=no
23476fi
23477rm -f core conftest.err conftest.$ac_objext \
23478    conftest$ac_exeext conftest.$ac_ext
23479
23480fi
23481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
23482$as_echo "$am_cv_langinfo_codeset" >&6; }
23483  if test $am_cv_langinfo_codeset = yes; then
23484
23485$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
23486
23487  fi
23488
23489
23490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
23491$as_echo_n "checking for LC_MESSAGES... " >&6; }
23492if ${gt_cv_val_LC_MESSAGES+:} false; then :
23493  $as_echo_n "(cached) " >&6
23494else
23495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23496/* end confdefs.h.  */
23497#include <locale.h>
23498int
23499main ()
23500{
23501return LC_MESSAGES
23502  ;
23503  return 0;
23504}
23505_ACEOF
23506if ac_fn_c_try_link "$LINENO"; then :
23507  gt_cv_val_LC_MESSAGES=yes
23508else
23509  gt_cv_val_LC_MESSAGES=no
23510fi
23511rm -f core conftest.err conftest.$ac_objext \
23512    conftest$ac_exeext conftest.$ac_ext
23513fi
23514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
23515$as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
23516  if test $gt_cv_val_LC_MESSAGES = yes; then
23517
23518$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
23519
23520  fi
23521
23522
23523  if test $gt_nameless_locales = yes; then
23524    HAVE_NAMELESS_LOCALES=1
23525  else
23526    HAVE_NAMELESS_LOCALES=0
23527  fi
23528
23529
23530                if test "$enable_shared" = yes; then
23531    case "$host_os" in
23532      mingw* | cygwin*) is_woe32dll=yes ;;
23533      *) is_woe32dll=no ;;
23534    esac
23535  else
23536    is_woe32dll=no
23537  fi
23538  WOE32DLL=$is_woe32dll
23539
23540
23541      case "$host_os" in
23542    mingw* | cygwin*) is_woe32=yes ;;
23543    *) is_woe32=no ;;
23544  esac
23545  WOE32=$is_woe32
23546
23547  if test $WOE32 = yes; then
23548        if test -n "$ac_tool_prefix"; then
23549  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
23550set dummy ${ac_tool_prefix}windres; ac_word=$2
23551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23552$as_echo_n "checking for $ac_word... " >&6; }
23553if ${ac_cv_prog_WINDRES+:} false; then :
23554  $as_echo_n "(cached) " >&6
23555else
23556  if test -n "$WINDRES"; then
23557  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
23558else
23559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23560for as_dir in $PATH
23561do
23562  IFS=$as_save_IFS
23563  test -z "$as_dir" && as_dir=.
23564    for ac_exec_ext in '' $ac_executable_extensions; do
23565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23566    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
23567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23568    break 2
23569  fi
23570done
23571  done
23572IFS=$as_save_IFS
23573
23574fi
23575fi
23576WINDRES=$ac_cv_prog_WINDRES
23577if test -n "$WINDRES"; then
23578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
23579$as_echo "$WINDRES" >&6; }
23580else
23581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23582$as_echo "no" >&6; }
23583fi
23584
23585
23586fi
23587if test -z "$ac_cv_prog_WINDRES"; then
23588  ac_ct_WINDRES=$WINDRES
23589  # Extract the first word of "windres", so it can be a program name with args.
23590set dummy windres; ac_word=$2
23591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23592$as_echo_n "checking for $ac_word... " >&6; }
23593if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
23594  $as_echo_n "(cached) " >&6
23595else
23596  if test -n "$ac_ct_WINDRES"; then
23597  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
23598else
23599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23600for as_dir in $PATH
23601do
23602  IFS=$as_save_IFS
23603  test -z "$as_dir" && as_dir=.
23604    for ac_exec_ext in '' $ac_executable_extensions; do
23605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23606    ac_cv_prog_ac_ct_WINDRES="windres"
23607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23608    break 2
23609  fi
23610done
23611  done
23612IFS=$as_save_IFS
23613
23614fi
23615fi
23616ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
23617if test -n "$ac_ct_WINDRES"; then
23618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
23619$as_echo "$ac_ct_WINDRES" >&6; }
23620else
23621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23622$as_echo "no" >&6; }
23623fi
23624
23625  if test "x$ac_ct_WINDRES" = x; then
23626    WINDRES=""
23627  else
23628    case $cross_compiling:$ac_tool_warned in
23629yes:)
23630{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23631$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23632ac_tool_warned=yes ;;
23633esac
23634    WINDRES=$ac_ct_WINDRES
23635  fi
23636else
23637  WINDRES="$ac_cv_prog_WINDRES"
23638fi
23639
23640  fi
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
23667$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
23668if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
23669  $as_echo_n "(cached) " >&6
23670else
23671  gt_save_LIBS="$LIBS"
23672     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
23673     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23674/* end confdefs.h.  */
23675#include <CoreFoundation/CFPreferences.h>
23676int
23677main ()
23678{
23679CFPreferencesCopyAppValue(NULL, NULL)
23680  ;
23681  return 0;
23682}
23683_ACEOF
23684if ac_fn_c_try_link "$LINENO"; then :
23685  gt_cv_func_CFPreferencesCopyAppValue=yes
23686else
23687  gt_cv_func_CFPreferencesCopyAppValue=no
23688fi
23689rm -f core conftest.err conftest.$ac_objext \
23690    conftest$ac_exeext conftest.$ac_ext
23691     LIBS="$gt_save_LIBS"
23692fi
23693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
23694$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
23695  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
23696
23697$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
23698
23699  fi
23700                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
23701$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; }
23702if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then :
23703  $as_echo_n "(cached) " >&6
23704else
23705  gt_save_LIBS="$LIBS"
23706     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
23707     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23708/* end confdefs.h.  */
23709#include <CoreFoundation/CFLocale.h>
23710int
23711main ()
23712{
23713CFLocaleCopyPreferredLanguages();
23714  ;
23715  return 0;
23716}
23717_ACEOF
23718if ac_fn_c_try_link "$LINENO"; then :
23719  gt_cv_func_CFLocaleCopyPreferredLanguages=yes
23720else
23721  gt_cv_func_CFLocaleCopyPreferredLanguages=no
23722fi
23723rm -f core conftest.err conftest.$ac_objext \
23724    conftest$ac_exeext conftest.$ac_ext
23725     LIBS="$gt_save_LIBS"
23726fi
23727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
23728$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
23729  if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
23730
23731$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
23732
23733  fi
23734  INTL_MACOSX_LIBS=
23735  if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
23736     || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
23737    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
23738  fi
23739
23740
23741
23742
23743
23744
23745    BUILD_INCLUDED_LIBINTL=no
23746    USE_INCLUDED_LIBINTL=no
23747
23748  LIBINTL=
23749  LTLIBINTL=
23750  POSUB=
23751
23752    case " $gt_needs " in
23753    *" need-formatstring-macros "*) gt_api_version=3 ;;
23754    *" need-ngettext "*) gt_api_version=2 ;;
23755    *) gt_api_version=1 ;;
23756  esac
23757  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
23758  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
23759
23760    if test "$USE_NLS" = "yes"; then
23761    gt_use_preinstalled_gnugettext=no
23762
23763      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5
23764$as_echo_n "checking whether included gettext is requested... " >&6; }
23765
23766# Check whether --with-included-gettext was given.
23767if test "${with_included_gettext+set}" = set; then :
23768  withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
23769else
23770  nls_cv_force_use_gnu_gettext=no
23771fi
23772
23773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5
23774$as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
23775
23776      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
23777      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
23778
23779
23780        if test $gt_api_version -ge 3; then
23781          gt_revision_test_code='
23782#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
23783#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
23784#endif
23785typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
23786'
23787        else
23788          gt_revision_test_code=
23789        fi
23790        if test $gt_api_version -ge 2; then
23791          gt_expression_test_code=' + * ngettext ("", "", 0)'
23792        else
23793          gt_expression_test_code=
23794        fi
23795
23796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
23797$as_echo_n "checking for GNU gettext in libc... " >&6; }
23798if eval \${$gt_func_gnugettext_libc+:} false; then :
23799  $as_echo_n "(cached) " >&6
23800else
23801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23802/* end confdefs.h.  */
23803
23804#include <libintl.h>
23805#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
23806extern int _nl_msg_cat_cntr;
23807extern int *_nl_domain_bindings;
23808#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
23809#else
23810#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
23811#endif
23812$gt_revision_test_code
23813
23814int
23815main ()
23816{
23817
23818bindtextdomain ("", "");
23819return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
23820
23821  ;
23822  return 0;
23823}
23824_ACEOF
23825if ac_fn_c_try_link "$LINENO"; then :
23826  eval "$gt_func_gnugettext_libc=yes"
23827else
23828  eval "$gt_func_gnugettext_libc=no"
23829fi
23830rm -f core conftest.err conftest.$ac_objext \
23831    conftest$ac_exeext conftest.$ac_ext
23832fi
23833eval ac_res=\$$gt_func_gnugettext_libc
23834	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23835$as_echo "$ac_res" >&6; }
23836
23837        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
23838
23839
23840
23841
23842
23843
23844
23845    use_additional=yes
23846
23847  acl_save_prefix="$prefix"
23848  prefix="$acl_final_prefix"
23849  acl_save_exec_prefix="$exec_prefix"
23850  exec_prefix="$acl_final_exec_prefix"
23851
23852    eval additional_includedir=\"$includedir\"
23853    eval additional_libdir=\"$libdir\"
23854    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
23855    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
23856
23857  exec_prefix="$acl_save_exec_prefix"
23858  prefix="$acl_save_prefix"
23859
23860
23861# Check whether --with-libintl-prefix was given.
23862if test "${with_libintl_prefix+set}" = set; then :
23863  withval=$with_libintl_prefix;
23864    if test "X$withval" = "Xno"; then
23865      use_additional=no
23866    else
23867      if test "X$withval" = "X"; then
23868
23869  acl_save_prefix="$prefix"
23870  prefix="$acl_final_prefix"
23871  acl_save_exec_prefix="$exec_prefix"
23872  exec_prefix="$acl_final_exec_prefix"
23873
23874          eval additional_includedir=\"$includedir\"
23875          eval additional_libdir=\"$libdir\"
23876          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
23877          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
23878
23879  exec_prefix="$acl_save_exec_prefix"
23880  prefix="$acl_save_prefix"
23881
23882      else
23883        additional_includedir="$withval/include"
23884        additional_libdir="$withval/$acl_libdirstem"
23885        additional_libdir2="$withval/$acl_libdirstem2"
23886        additional_libdir3="$withval/$acl_libdirstem3"
23887      fi
23888    fi
23889
23890fi
23891
23892  if test "X$additional_libdir2" = "X$additional_libdir"; then
23893    additional_libdir2=
23894  fi
23895  if test "X$additional_libdir3" = "X$additional_libdir"; then
23896    additional_libdir3=
23897  fi
23898      LIBINTL=
23899  LTLIBINTL=
23900  INCINTL=
23901  LIBINTL_PREFIX=
23902      HAVE_LIBINTL=
23903  rpathdirs=
23904  ltrpathdirs=
23905  names_already_handled=
23906  names_next_round='intl '
23907  while test -n "$names_next_round"; do
23908    names_this_round="$names_next_round"
23909    names_next_round=
23910    for name in $names_this_round; do
23911      already_handled=
23912      for n in $names_already_handled; do
23913        if test "$n" = "$name"; then
23914          already_handled=yes
23915          break
23916        fi
23917      done
23918      if test -z "$already_handled"; then
23919        names_already_handled="$names_already_handled $name"
23920                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
23921        eval value=\"\$HAVE_LIB$uppername\"
23922        if test -n "$value"; then
23923          if test "$value" = yes; then
23924            eval value=\"\$LIB$uppername\"
23925            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
23926            eval value=\"\$LTLIB$uppername\"
23927            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
23928          else
23929                                    :
23930          fi
23931        else
23932                              found_dir=
23933          found_la=
23934          found_so=
23935          found_a=
23936          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
23937          if test -n "$acl_shlibext"; then
23938            shrext=".$acl_shlibext"             # typically: shrext=.so
23939          else
23940            shrext=
23941          fi
23942          if test $use_additional = yes; then
23943            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
23944              if test "X$found_dir" = "X"; then
23945                eval dir=\$$additional_libdir_variable
23946                if test -n "$dir"; then
23947                                                      if test -n "$acl_shlibext"; then
23948                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
23949                      found_dir="$dir"
23950                      found_so="$dir/$libname$shrext"
23951                    else
23952                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
23953                        ver=`(cd "$dir" && \
23954                              for f in "$libname$shrext".*; do echo "$f"; done \
23955                              | sed -e "s,^$libname$shrext\\\\.,," \
23956                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
23957                              | sed 1q ) 2>/dev/null`
23958                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
23959                          found_dir="$dir"
23960                          found_so="$dir/$libname$shrext.$ver"
23961                        fi
23962                      else
23963                        eval library_names=\"$acl_library_names_spec\"
23964                        for f in $library_names; do
23965                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
23966                            found_dir="$dir"
23967                            found_so="$dir/$f"
23968                            break
23969                          fi
23970                        done
23971                      fi
23972                    fi
23973                  fi
23974                                    if test "X$found_dir" = "X"; then
23975                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
23976                      found_dir="$dir"
23977                      found_a="$dir/$libname.$acl_libext"
23978                    fi
23979                  fi
23980                  if test "X$found_dir" != "X"; then
23981                    if test -f "$dir/$libname.la"; then
23982                      found_la="$dir/$libname.la"
23983                    fi
23984                  fi
23985                fi
23986              fi
23987            done
23988          fi
23989          if test "X$found_dir" = "X"; then
23990            for x in $LDFLAGS $LTLIBINTL; do
23991
23992  acl_save_prefix="$prefix"
23993  prefix="$acl_final_prefix"
23994  acl_save_exec_prefix="$exec_prefix"
23995  exec_prefix="$acl_final_exec_prefix"
23996  eval x=\"$x\"
23997  exec_prefix="$acl_save_exec_prefix"
23998  prefix="$acl_save_prefix"
23999
24000              case "$x" in
24001                -L*)
24002                  dir=`echo "X$x" | sed -e 's/^X-L//'`
24003                                    if test -n "$acl_shlibext"; then
24004                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
24005                      found_dir="$dir"
24006                      found_so="$dir/$libname$shrext"
24007                    else
24008                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
24009                        ver=`(cd "$dir" && \
24010                              for f in "$libname$shrext".*; do echo "$f"; done \
24011                              | sed -e "s,^$libname$shrext\\\\.,," \
24012                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
24013                              | sed 1q ) 2>/dev/null`
24014                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
24015                          found_dir="$dir"
24016                          found_so="$dir/$libname$shrext.$ver"
24017                        fi
24018                      else
24019                        eval library_names=\"$acl_library_names_spec\"
24020                        for f in $library_names; do
24021                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
24022                            found_dir="$dir"
24023                            found_so="$dir/$f"
24024                            break
24025                          fi
24026                        done
24027                      fi
24028                    fi
24029                  fi
24030                                    if test "X$found_dir" = "X"; then
24031                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
24032                      found_dir="$dir"
24033                      found_a="$dir/$libname.$acl_libext"
24034                    fi
24035                  fi
24036                  if test "X$found_dir" != "X"; then
24037                    if test -f "$dir/$libname.la"; then
24038                      found_la="$dir/$libname.la"
24039                    fi
24040                  fi
24041                  ;;
24042              esac
24043              if test "X$found_dir" != "X"; then
24044                break
24045              fi
24046            done
24047          fi
24048          if test "X$found_dir" != "X"; then
24049                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
24050            if test "X$found_so" != "X"; then
24051                                                        if test "$enable_rpath" = no \
24052                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
24053                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
24054                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
24055                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
24056              else
24057                                                                                haveit=
24058                for x in $ltrpathdirs; do
24059                  if test "X$x" = "X$found_dir"; then
24060                    haveit=yes
24061                    break
24062                  fi
24063                done
24064                if test -z "$haveit"; then
24065                  ltrpathdirs="$ltrpathdirs $found_dir"
24066                fi
24067                                if test "$acl_hardcode_direct" = yes; then
24068                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
24069                else
24070                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
24071                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
24072                                                            haveit=
24073                    for x in $rpathdirs; do
24074                      if test "X$x" = "X$found_dir"; then
24075                        haveit=yes
24076                        break
24077                      fi
24078                    done
24079                    if test -z "$haveit"; then
24080                      rpathdirs="$rpathdirs $found_dir"
24081                    fi
24082                  else
24083                                                                                haveit=
24084                    for x in $LDFLAGS $LIBINTL; do
24085
24086  acl_save_prefix="$prefix"
24087  prefix="$acl_final_prefix"
24088  acl_save_exec_prefix="$exec_prefix"
24089  exec_prefix="$acl_final_exec_prefix"
24090  eval x=\"$x\"
24091  exec_prefix="$acl_save_exec_prefix"
24092  prefix="$acl_save_prefix"
24093
24094                      if test "X$x" = "X-L$found_dir"; then
24095                        haveit=yes
24096                        break
24097                      fi
24098                    done
24099                    if test -z "$haveit"; then
24100                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
24101                    fi
24102                    if test "$acl_hardcode_minus_L" != no; then
24103                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
24104                    else
24105                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
24106                    fi
24107                  fi
24108                fi
24109              fi
24110            else
24111              if test "X$found_a" != "X"; then
24112                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
24113              else
24114                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
24115              fi
24116            fi
24117                        additional_includedir=
24118            case "$found_dir" in
24119              */$acl_libdirstem | */$acl_libdirstem/)
24120                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
24121                if test "$name" = 'intl'; then
24122                  LIBINTL_PREFIX="$basedir"
24123                fi
24124                additional_includedir="$basedir/include"
24125                ;;
24126              */$acl_libdirstem2 | */$acl_libdirstem2/)
24127                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
24128                if test "$name" = 'intl'; then
24129                  LIBINTL_PREFIX="$basedir"
24130                fi
24131                additional_includedir="$basedir/include"
24132                ;;
24133              */$acl_libdirstem3 | */$acl_libdirstem3/)
24134                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
24135                if test "$name" = 'intl'; then
24136                  LIBINTL_PREFIX="$basedir"
24137                fi
24138                additional_includedir="$basedir/include"
24139                ;;
24140            esac
24141            if test "X$additional_includedir" != "X"; then
24142                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
24143                haveit=
24144                if test "X$additional_includedir" = "X/usr/local/include"; then
24145                  if test -n "$GCC"; then
24146                    case $host_os in
24147                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
24148                    esac
24149                  fi
24150                fi
24151                if test -z "$haveit"; then
24152                  for x in $CPPFLAGS $INCINTL; do
24153
24154  acl_save_prefix="$prefix"
24155  prefix="$acl_final_prefix"
24156  acl_save_exec_prefix="$exec_prefix"
24157  exec_prefix="$acl_final_exec_prefix"
24158  eval x=\"$x\"
24159  exec_prefix="$acl_save_exec_prefix"
24160  prefix="$acl_save_prefix"
24161
24162                    if test "X$x" = "X-I$additional_includedir"; then
24163                      haveit=yes
24164                      break
24165                    fi
24166                  done
24167                  if test -z "$haveit"; then
24168                    if test -d "$additional_includedir"; then
24169                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
24170                    fi
24171                  fi
24172                fi
24173              fi
24174            fi
24175                        if test -n "$found_la"; then
24176                                                        save_libdir="$libdir"
24177              case "$found_la" in
24178                */* | *\\*) . "$found_la" ;;
24179                *) . "./$found_la" ;;
24180              esac
24181              libdir="$save_libdir"
24182                            for dep in $dependency_libs; do
24183                case "$dep" in
24184                  -L*)
24185                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
24186                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
24187                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
24188                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
24189                      haveit=
24190                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
24191                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
24192                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
24193                        if test -n "$GCC"; then
24194                          case $host_os in
24195                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
24196                          esac
24197                        fi
24198                      fi
24199                      if test -z "$haveit"; then
24200                        haveit=
24201                        for x in $LDFLAGS $LIBINTL; do
24202
24203  acl_save_prefix="$prefix"
24204  prefix="$acl_final_prefix"
24205  acl_save_exec_prefix="$exec_prefix"
24206  exec_prefix="$acl_final_exec_prefix"
24207  eval x=\"$x\"
24208  exec_prefix="$acl_save_exec_prefix"
24209  prefix="$acl_save_prefix"
24210
24211                          if test "X$x" = "X-L$dependency_libdir"; then
24212                            haveit=yes
24213                            break
24214                          fi
24215                        done
24216                        if test -z "$haveit"; then
24217                          if test -d "$dependency_libdir"; then
24218                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
24219                          fi
24220                        fi
24221                        haveit=
24222                        for x in $LDFLAGS $LTLIBINTL; do
24223
24224  acl_save_prefix="$prefix"
24225  prefix="$acl_final_prefix"
24226  acl_save_exec_prefix="$exec_prefix"
24227  exec_prefix="$acl_final_exec_prefix"
24228  eval x=\"$x\"
24229  exec_prefix="$acl_save_exec_prefix"
24230  prefix="$acl_save_prefix"
24231
24232                          if test "X$x" = "X-L$dependency_libdir"; then
24233                            haveit=yes
24234                            break
24235                          fi
24236                        done
24237                        if test -z "$haveit"; then
24238                          if test -d "$dependency_libdir"; then
24239                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
24240                          fi
24241                        fi
24242                      fi
24243                    fi
24244                    ;;
24245                  -R*)
24246                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
24247                    if test "$enable_rpath" != no; then
24248                                                                  haveit=
24249                      for x in $rpathdirs; do
24250                        if test "X$x" = "X$dir"; then
24251                          haveit=yes
24252                          break
24253                        fi
24254                      done
24255                      if test -z "$haveit"; then
24256                        rpathdirs="$rpathdirs $dir"
24257                      fi
24258                                                                  haveit=
24259                      for x in $ltrpathdirs; do
24260                        if test "X$x" = "X$dir"; then
24261                          haveit=yes
24262                          break
24263                        fi
24264                      done
24265                      if test -z "$haveit"; then
24266                        ltrpathdirs="$ltrpathdirs $dir"
24267                      fi
24268                    fi
24269                    ;;
24270                  -l*)
24271                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
24272                    ;;
24273                  *.la)
24274                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
24275                    ;;
24276                  *)
24277                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
24278                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
24279                    ;;
24280                esac
24281              done
24282            fi
24283          else
24284                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
24285            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
24286          fi
24287        fi
24288      fi
24289    done
24290  done
24291  if test "X$rpathdirs" != "X"; then
24292    if test -n "$acl_hardcode_libdir_separator"; then
24293                        alldirs=
24294      for found_dir in $rpathdirs; do
24295        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
24296      done
24297            acl_save_libdir="$libdir"
24298      libdir="$alldirs"
24299      eval flag=\"$acl_hardcode_libdir_flag_spec\"
24300      libdir="$acl_save_libdir"
24301      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
24302    else
24303            for found_dir in $rpathdirs; do
24304        acl_save_libdir="$libdir"
24305        libdir="$found_dir"
24306        eval flag=\"$acl_hardcode_libdir_flag_spec\"
24307        libdir="$acl_save_libdir"
24308        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
24309      done
24310    fi
24311  fi
24312  if test "X$ltrpathdirs" != "X"; then
24313            for found_dir in $ltrpathdirs; do
24314      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
24315    done
24316  fi
24317
24318
24319
24320
24321
24322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
24323$as_echo_n "checking for GNU gettext in libintl... " >&6; }
24324if eval \${$gt_func_gnugettext_libintl+:} false; then :
24325  $as_echo_n "(cached) " >&6
24326else
24327  gt_save_CPPFLAGS="$CPPFLAGS"
24328            CPPFLAGS="$CPPFLAGS $INCINTL"
24329            gt_save_LIBS="$LIBS"
24330            LIBS="$LIBS $LIBINTL"
24331                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24332/* end confdefs.h.  */
24333
24334#include <libintl.h>
24335#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
24336extern int _nl_msg_cat_cntr;
24337extern
24338#ifdef __cplusplus
24339"C"
24340#endif
24341const char *_nl_expand_alias (const char *);
24342#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
24343#else
24344#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
24345#endif
24346$gt_revision_test_code
24347
24348int
24349main ()
24350{
24351
24352bindtextdomain ("", "");
24353return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
24354
24355  ;
24356  return 0;
24357}
24358_ACEOF
24359if ac_fn_c_try_link "$LINENO"; then :
24360  eval "$gt_func_gnugettext_libintl=yes"
24361else
24362  eval "$gt_func_gnugettext_libintl=no"
24363fi
24364rm -f core conftest.err conftest.$ac_objext \
24365    conftest$ac_exeext conftest.$ac_ext
24366                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
24367              LIBS="$LIBS $LIBICONV"
24368              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24369/* end confdefs.h.  */
24370
24371#include <libintl.h>
24372#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
24373extern int _nl_msg_cat_cntr;
24374extern
24375#ifdef __cplusplus
24376"C"
24377#endif
24378const char *_nl_expand_alias (const char *);
24379#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
24380#else
24381#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
24382#endif
24383$gt_revision_test_code
24384
24385int
24386main ()
24387{
24388
24389bindtextdomain ("", "");
24390return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
24391
24392  ;
24393  return 0;
24394}
24395_ACEOF
24396if ac_fn_c_try_link "$LINENO"; then :
24397  LIBINTL="$LIBINTL $LIBICONV"
24398                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
24399                 eval "$gt_func_gnugettext_libintl=yes"
24400
24401fi
24402rm -f core conftest.err conftest.$ac_objext \
24403    conftest$ac_exeext conftest.$ac_ext
24404            fi
24405            CPPFLAGS="$gt_save_CPPFLAGS"
24406            LIBS="$gt_save_LIBS"
24407fi
24408eval ac_res=\$$gt_func_gnugettext_libintl
24409	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24410$as_echo "$ac_res" >&6; }
24411        fi
24412
24413                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
24414           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
24415                && test "$PACKAGE" != gettext-runtime \
24416                && test "$PACKAGE" != gettext-tools; }; then
24417          gt_use_preinstalled_gnugettext=yes
24418        else
24419                    LIBINTL=
24420          LTLIBINTL=
24421          INCINTL=
24422        fi
24423
24424
24425        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
24426                              nls_cv_use_gnu_gettext=yes
24427        fi
24428      fi
24429
24430      if test "$nls_cv_use_gnu_gettext" = "yes"; then
24431                BUILD_INCLUDED_LIBINTL=yes
24432        USE_INCLUDED_LIBINTL=yes
24433        LIBINTL="\${top_builddir}/intl/libintl.la $LIBICONV $LIBTHREAD"
24434        LTLIBINTL="\${top_builddir}/intl/libintl.la $LTLIBICONV $LTLIBTHREAD"
24435        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
24436      fi
24437
24438      CATOBJEXT=
24439      if test "$gt_use_preinstalled_gnugettext" = "yes" \
24440         || test "$nls_cv_use_gnu_gettext" = "yes"; then
24441                CATOBJEXT=.gmo
24442      fi
24443
24444
24445    if test -n "$INTL_MACOSX_LIBS"; then
24446      if test "$gt_use_preinstalled_gnugettext" = "yes" \
24447         || test "$nls_cv_use_gnu_gettext" = "yes"; then
24448                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
24449        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
24450      fi
24451    fi
24452
24453    if test "$gt_use_preinstalled_gnugettext" = "yes" \
24454       || test "$nls_cv_use_gnu_gettext" = "yes"; then
24455
24456$as_echo "#define ENABLE_NLS 1" >>confdefs.h
24457
24458    else
24459      USE_NLS=no
24460    fi
24461  fi
24462
24463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
24464$as_echo_n "checking whether to use NLS... " >&6; }
24465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
24466$as_echo "$USE_NLS" >&6; }
24467  if test "$USE_NLS" = "yes"; then
24468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
24469$as_echo_n "checking where the gettext function comes from... " >&6; }
24470    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
24471      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
24472        gt_source="external libintl"
24473      else
24474        gt_source="libc"
24475      fi
24476    else
24477      gt_source="included intl directory"
24478    fi
24479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
24480$as_echo "$gt_source" >&6; }
24481  fi
24482
24483  if test "$USE_NLS" = "yes"; then
24484
24485    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
24486      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
24487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
24488$as_echo_n "checking how to link with libintl... " >&6; }
24489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
24490$as_echo "$LIBINTL" >&6; }
24491
24492  for element in $INCINTL; do
24493    haveit=
24494    for x in $CPPFLAGS; do
24495
24496  acl_save_prefix="$prefix"
24497  prefix="$acl_final_prefix"
24498  acl_save_exec_prefix="$exec_prefix"
24499  exec_prefix="$acl_final_exec_prefix"
24500  eval x=\"$x\"
24501  exec_prefix="$acl_save_exec_prefix"
24502  prefix="$acl_save_prefix"
24503
24504      if test "X$x" = "X$element"; then
24505        haveit=yes
24506        break
24507      fi
24508    done
24509    if test -z "$haveit"; then
24510      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
24511    fi
24512  done
24513
24514      fi
24515
24516
24517$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
24518
24519
24520$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
24521
24522    fi
24523
24524        POSUB=po
24525  fi
24526
24527
24528            BUILD_INCLUDED_LIBINTL=yes
24529
24530
24531
24532
24533
24534
24535    INTLLIBS="$LIBINTL"
24536
24537
24538
24539
24540
24541
24542 if test $USE_INCLUDED_LIBINTL = yes; then
24543  USE_INCLUDED_LIBINTL_TRUE=
24544  USE_INCLUDED_LIBINTL_FALSE='#'
24545else
24546  USE_INCLUDED_LIBINTL_TRUE='#'
24547  USE_INCLUDED_LIBINTL_FALSE=
24548fi
24549
24550 if test $BUILD_INCLUDED_LIBINTL = yes; then
24551  BUILD_INCLUDED_LIBINTL_TRUE=
24552  BUILD_INCLUDED_LIBINTL_FALSE='#'
24553else
24554  BUILD_INCLUDED_LIBINTL_TRUE='#'
24555  BUILD_INCLUDED_LIBINTL_FALSE=
24556fi
24557
24558 if true; then
24559  PACKAGE_IS_GETTEXT_TOOLS_TRUE=
24560  PACKAGE_IS_GETTEXT_TOOLS_FALSE='#'
24561else
24562  PACKAGE_IS_GETTEXT_TOOLS_TRUE='#'
24563  PACKAGE_IS_GETTEXT_TOOLS_FALSE=
24564fi
24565
24566 if test $USE_INCLUDED_LIBINTL = no && test $GLIBC2 = yes && test "$enable_shared" = yes; then
24567  PRELOADABLE_LIBINTL_TRUE=
24568  PRELOADABLE_LIBINTL_FALSE='#'
24569else
24570  PRELOADABLE_LIBINTL_TRUE='#'
24571  PRELOADABLE_LIBINTL_FALSE=
24572fi
24573
24574
24575
24576# Check whether --with-installed-libtextstyle was given.
24577if test "${with_installed_libtextstyle+set}" = set; then :
24578  withval=$with_installed_libtextstyle; gt_use_installed_libtextstyle=$withval
24579else
24580  gt_use_installed_libtextstyle=no
24581fi
24582
24583if test "$gt_use_installed_libtextstyle" != no; then
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597    use_additional=yes
24598
24599  acl_save_prefix="$prefix"
24600  prefix="$acl_final_prefix"
24601  acl_save_exec_prefix="$exec_prefix"
24602  exec_prefix="$acl_final_exec_prefix"
24603
24604    eval additional_includedir=\"$includedir\"
24605    eval additional_libdir=\"$libdir\"
24606    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
24607    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
24608
24609  exec_prefix="$acl_save_exec_prefix"
24610  prefix="$acl_save_prefix"
24611
24612
24613# Check whether --with-libtextstyle-prefix was given.
24614if test "${with_libtextstyle_prefix+set}" = set; then :
24615  withval=$with_libtextstyle_prefix;
24616    if test "X$withval" = "Xno"; then
24617      use_additional=no
24618    else
24619      if test "X$withval" = "X"; then
24620
24621  acl_save_prefix="$prefix"
24622  prefix="$acl_final_prefix"
24623  acl_save_exec_prefix="$exec_prefix"
24624  exec_prefix="$acl_final_exec_prefix"
24625
24626          eval additional_includedir=\"$includedir\"
24627          eval additional_libdir=\"$libdir\"
24628          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
24629          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
24630
24631  exec_prefix="$acl_save_exec_prefix"
24632  prefix="$acl_save_prefix"
24633
24634      else
24635        additional_includedir="$withval/include"
24636        additional_libdir="$withval/$acl_libdirstem"
24637        additional_libdir2="$withval/$acl_libdirstem2"
24638        additional_libdir3="$withval/$acl_libdirstem3"
24639      fi
24640    fi
24641
24642fi
24643
24644  if test "X$additional_libdir2" = "X$additional_libdir"; then
24645    additional_libdir2=
24646  fi
24647  if test "X$additional_libdir3" = "X$additional_libdir"; then
24648    additional_libdir3=
24649  fi
24650      LIBTEXTSTYLE=
24651  LTLIBTEXTSTYLE=
24652  INCTEXTSTYLE=
24653  LIBTEXTSTYLE_PREFIX=
24654      HAVE_LIBTEXTSTYLE=
24655  rpathdirs=
24656  ltrpathdirs=
24657  names_already_handled=
24658  names_next_round='textstyle '
24659  while test -n "$names_next_round"; do
24660    names_this_round="$names_next_round"
24661    names_next_round=
24662    for name in $names_this_round; do
24663      already_handled=
24664      for n in $names_already_handled; do
24665        if test "$n" = "$name"; then
24666          already_handled=yes
24667          break
24668        fi
24669      done
24670      if test -z "$already_handled"; then
24671        names_already_handled="$names_already_handled $name"
24672                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
24673        eval value=\"\$HAVE_LIB$uppername\"
24674        if test -n "$value"; then
24675          if test "$value" = yes; then
24676            eval value=\"\$LIB$uppername\"
24677            test -z "$value" || LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }$value"
24678            eval value=\"\$LTLIB$uppername\"
24679            test -z "$value" || LTLIBTEXTSTYLE="${LTLIBTEXTSTYLE}${LTLIBTEXTSTYLE:+ }$value"
24680          else
24681                                    :
24682          fi
24683        else
24684                              found_dir=
24685          found_la=
24686          found_so=
24687          found_a=
24688          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
24689          if test -n "$acl_shlibext"; then
24690            shrext=".$acl_shlibext"             # typically: shrext=.so
24691          else
24692            shrext=
24693          fi
24694          if test $use_additional = yes; then
24695            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
24696              if test "X$found_dir" = "X"; then
24697                eval dir=\$$additional_libdir_variable
24698                if test -n "$dir"; then
24699                                                      if test -n "$acl_shlibext"; then
24700                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
24701                      found_dir="$dir"
24702                      found_so="$dir/$libname$shrext"
24703                    else
24704                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
24705                        ver=`(cd "$dir" && \
24706                              for f in "$libname$shrext".*; do echo "$f"; done \
24707                              | sed -e "s,^$libname$shrext\\\\.,," \
24708                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
24709                              | sed 1q ) 2>/dev/null`
24710                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
24711                          found_dir="$dir"
24712                          found_so="$dir/$libname$shrext.$ver"
24713                        fi
24714                      else
24715                        eval library_names=\"$acl_library_names_spec\"
24716                        for f in $library_names; do
24717                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
24718                            found_dir="$dir"
24719                            found_so="$dir/$f"
24720                            break
24721                          fi
24722                        done
24723                      fi
24724                    fi
24725                  fi
24726                                    if test "X$found_dir" = "X"; then
24727                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
24728                      found_dir="$dir"
24729                      found_a="$dir/$libname.$acl_libext"
24730                    fi
24731                  fi
24732                  if test "X$found_dir" != "X"; then
24733                    if test -f "$dir/$libname.la"; then
24734                      found_la="$dir/$libname.la"
24735                    fi
24736                  fi
24737                fi
24738              fi
24739            done
24740          fi
24741          if test "X$found_dir" = "X"; then
24742            for x in $LDFLAGS $LTLIBTEXTSTYLE; do
24743
24744  acl_save_prefix="$prefix"
24745  prefix="$acl_final_prefix"
24746  acl_save_exec_prefix="$exec_prefix"
24747  exec_prefix="$acl_final_exec_prefix"
24748  eval x=\"$x\"
24749  exec_prefix="$acl_save_exec_prefix"
24750  prefix="$acl_save_prefix"
24751
24752              case "$x" in
24753                -L*)
24754                  dir=`echo "X$x" | sed -e 's/^X-L//'`
24755                                    if test -n "$acl_shlibext"; then
24756                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
24757                      found_dir="$dir"
24758                      found_so="$dir/$libname$shrext"
24759                    else
24760                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
24761                        ver=`(cd "$dir" && \
24762                              for f in "$libname$shrext".*; do echo "$f"; done \
24763                              | sed -e "s,^$libname$shrext\\\\.,," \
24764                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
24765                              | sed 1q ) 2>/dev/null`
24766                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
24767                          found_dir="$dir"
24768                          found_so="$dir/$libname$shrext.$ver"
24769                        fi
24770                      else
24771                        eval library_names=\"$acl_library_names_spec\"
24772                        for f in $library_names; do
24773                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
24774                            found_dir="$dir"
24775                            found_so="$dir/$f"
24776                            break
24777                          fi
24778                        done
24779                      fi
24780                    fi
24781                  fi
24782                                    if test "X$found_dir" = "X"; then
24783                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
24784                      found_dir="$dir"
24785                      found_a="$dir/$libname.$acl_libext"
24786                    fi
24787                  fi
24788                  if test "X$found_dir" != "X"; then
24789                    if test -f "$dir/$libname.la"; then
24790                      found_la="$dir/$libname.la"
24791                    fi
24792                  fi
24793                  ;;
24794              esac
24795              if test "X$found_dir" != "X"; then
24796                break
24797              fi
24798            done
24799          fi
24800          if test "X$found_dir" != "X"; then
24801                        LTLIBTEXTSTYLE="${LTLIBTEXTSTYLE}${LTLIBTEXTSTYLE:+ }-L$found_dir -l$name"
24802            if test "X$found_so" != "X"; then
24803                                                        if test "$enable_rpath" = no \
24804                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
24805                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
24806                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
24807                                LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }$found_so"
24808              else
24809                                                                                haveit=
24810                for x in $ltrpathdirs; do
24811                  if test "X$x" = "X$found_dir"; then
24812                    haveit=yes
24813                    break
24814                  fi
24815                done
24816                if test -z "$haveit"; then
24817                  ltrpathdirs="$ltrpathdirs $found_dir"
24818                fi
24819                                if test "$acl_hardcode_direct" = yes; then
24820                                                      LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }$found_so"
24821                else
24822                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
24823                                                            LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }$found_so"
24824                                                            haveit=
24825                    for x in $rpathdirs; do
24826                      if test "X$x" = "X$found_dir"; then
24827                        haveit=yes
24828                        break
24829                      fi
24830                    done
24831                    if test -z "$haveit"; then
24832                      rpathdirs="$rpathdirs $found_dir"
24833                    fi
24834                  else
24835                                                                                haveit=
24836                    for x in $LDFLAGS $LIBTEXTSTYLE; do
24837
24838  acl_save_prefix="$prefix"
24839  prefix="$acl_final_prefix"
24840  acl_save_exec_prefix="$exec_prefix"
24841  exec_prefix="$acl_final_exec_prefix"
24842  eval x=\"$x\"
24843  exec_prefix="$acl_save_exec_prefix"
24844  prefix="$acl_save_prefix"
24845
24846                      if test "X$x" = "X-L$found_dir"; then
24847                        haveit=yes
24848                        break
24849                      fi
24850                    done
24851                    if test -z "$haveit"; then
24852                      LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }-L$found_dir"
24853                    fi
24854                    if test "$acl_hardcode_minus_L" != no; then
24855                                                                                        LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }$found_so"
24856                    else
24857                                                                                                                                                                                LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }-l$name"
24858                    fi
24859                  fi
24860                fi
24861              fi
24862            else
24863              if test "X$found_a" != "X"; then
24864                                LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }$found_a"
24865              else
24866                                                LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }-L$found_dir -l$name"
24867              fi
24868            fi
24869                        additional_includedir=
24870            case "$found_dir" in
24871              */$acl_libdirstem | */$acl_libdirstem/)
24872                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
24873                if test "$name" = 'textstyle'; then
24874                  LIBTEXTSTYLE_PREFIX="$basedir"
24875                fi
24876                additional_includedir="$basedir/include"
24877                ;;
24878              */$acl_libdirstem2 | */$acl_libdirstem2/)
24879                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
24880                if test "$name" = 'textstyle'; then
24881                  LIBTEXTSTYLE_PREFIX="$basedir"
24882                fi
24883                additional_includedir="$basedir/include"
24884                ;;
24885              */$acl_libdirstem3 | */$acl_libdirstem3/)
24886                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
24887                if test "$name" = 'textstyle'; then
24888                  LIBTEXTSTYLE_PREFIX="$basedir"
24889                fi
24890                additional_includedir="$basedir/include"
24891                ;;
24892            esac
24893            if test "X$additional_includedir" != "X"; then
24894                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
24895                haveit=
24896                if test "X$additional_includedir" = "X/usr/local/include"; then
24897                  if test -n "$GCC"; then
24898                    case $host_os in
24899                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
24900                    esac
24901                  fi
24902                fi
24903                if test -z "$haveit"; then
24904                  for x in $CPPFLAGS $INCTEXTSTYLE; do
24905
24906  acl_save_prefix="$prefix"
24907  prefix="$acl_final_prefix"
24908  acl_save_exec_prefix="$exec_prefix"
24909  exec_prefix="$acl_final_exec_prefix"
24910  eval x=\"$x\"
24911  exec_prefix="$acl_save_exec_prefix"
24912  prefix="$acl_save_prefix"
24913
24914                    if test "X$x" = "X-I$additional_includedir"; then
24915                      haveit=yes
24916                      break
24917                    fi
24918                  done
24919                  if test -z "$haveit"; then
24920                    if test -d "$additional_includedir"; then
24921                                            INCTEXTSTYLE="${INCTEXTSTYLE}${INCTEXTSTYLE:+ }-I$additional_includedir"
24922                    fi
24923                  fi
24924                fi
24925              fi
24926            fi
24927                        if test -n "$found_la"; then
24928                                                        save_libdir="$libdir"
24929              case "$found_la" in
24930                */* | *\\*) . "$found_la" ;;
24931                *) . "./$found_la" ;;
24932              esac
24933              libdir="$save_libdir"
24934                            for dep in $dependency_libs; do
24935                case "$dep" in
24936                  -L*)
24937                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
24938                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
24939                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
24940                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
24941                      haveit=
24942                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
24943                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
24944                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
24945                        if test -n "$GCC"; then
24946                          case $host_os in
24947                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
24948                          esac
24949                        fi
24950                      fi
24951                      if test -z "$haveit"; then
24952                        haveit=
24953                        for x in $LDFLAGS $LIBTEXTSTYLE; do
24954
24955  acl_save_prefix="$prefix"
24956  prefix="$acl_final_prefix"
24957  acl_save_exec_prefix="$exec_prefix"
24958  exec_prefix="$acl_final_exec_prefix"
24959  eval x=\"$x\"
24960  exec_prefix="$acl_save_exec_prefix"
24961  prefix="$acl_save_prefix"
24962
24963                          if test "X$x" = "X-L$dependency_libdir"; then
24964                            haveit=yes
24965                            break
24966                          fi
24967                        done
24968                        if test -z "$haveit"; then
24969                          if test -d "$dependency_libdir"; then
24970                                                        LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }-L$dependency_libdir"
24971                          fi
24972                        fi
24973                        haveit=
24974                        for x in $LDFLAGS $LTLIBTEXTSTYLE; do
24975
24976  acl_save_prefix="$prefix"
24977  prefix="$acl_final_prefix"
24978  acl_save_exec_prefix="$exec_prefix"
24979  exec_prefix="$acl_final_exec_prefix"
24980  eval x=\"$x\"
24981  exec_prefix="$acl_save_exec_prefix"
24982  prefix="$acl_save_prefix"
24983
24984                          if test "X$x" = "X-L$dependency_libdir"; then
24985                            haveit=yes
24986                            break
24987                          fi
24988                        done
24989                        if test -z "$haveit"; then
24990                          if test -d "$dependency_libdir"; then
24991                                                        LTLIBTEXTSTYLE="${LTLIBTEXTSTYLE}${LTLIBTEXTSTYLE:+ }-L$dependency_libdir"
24992                          fi
24993                        fi
24994                      fi
24995                    fi
24996                    ;;
24997                  -R*)
24998                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
24999                    if test "$enable_rpath" != no; then
25000                                                                  haveit=
25001                      for x in $rpathdirs; do
25002                        if test "X$x" = "X$dir"; then
25003                          haveit=yes
25004                          break
25005                        fi
25006                      done
25007                      if test -z "$haveit"; then
25008                        rpathdirs="$rpathdirs $dir"
25009                      fi
25010                                                                  haveit=
25011                      for x in $ltrpathdirs; do
25012                        if test "X$x" = "X$dir"; then
25013                          haveit=yes
25014                          break
25015                        fi
25016                      done
25017                      if test -z "$haveit"; then
25018                        ltrpathdirs="$ltrpathdirs $dir"
25019                      fi
25020                    fi
25021                    ;;
25022                  -l*)
25023                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
25024                    ;;
25025                  *.la)
25026                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
25027                    ;;
25028                  *)
25029                                        LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }$dep"
25030                    LTLIBTEXTSTYLE="${LTLIBTEXTSTYLE}${LTLIBTEXTSTYLE:+ }$dep"
25031                    ;;
25032                esac
25033              done
25034            fi
25035          else
25036                                                            LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }-l$name"
25037            LTLIBTEXTSTYLE="${LTLIBTEXTSTYLE}${LTLIBTEXTSTYLE:+ }-l$name"
25038          fi
25039        fi
25040      fi
25041    done
25042  done
25043  if test "X$rpathdirs" != "X"; then
25044    if test -n "$acl_hardcode_libdir_separator"; then
25045                        alldirs=
25046      for found_dir in $rpathdirs; do
25047        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
25048      done
25049            acl_save_libdir="$libdir"
25050      libdir="$alldirs"
25051      eval flag=\"$acl_hardcode_libdir_flag_spec\"
25052      libdir="$acl_save_libdir"
25053      LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }$flag"
25054    else
25055            for found_dir in $rpathdirs; do
25056        acl_save_libdir="$libdir"
25057        libdir="$found_dir"
25058        eval flag=\"$acl_hardcode_libdir_flag_spec\"
25059        libdir="$acl_save_libdir"
25060        LIBTEXTSTYLE="${LIBTEXTSTYLE}${LIBTEXTSTYLE:+ }$flag"
25061      done
25062    fi
25063  fi
25064  if test "X$ltrpathdirs" != "X"; then
25065            for found_dir in $ltrpathdirs; do
25066      LTLIBTEXTSTYLE="${LTLIBTEXTSTYLE}${LTLIBTEXTSTYLE:+ }-R$found_dir"
25067    done
25068  fi
25069
25070
25071
25072
25073
25074
25075        ac_save_CPPFLAGS="$CPPFLAGS"
25076
25077  for element in $INCTEXTSTYLE; do
25078    haveit=
25079    for x in $CPPFLAGS; do
25080
25081  acl_save_prefix="$prefix"
25082  prefix="$acl_final_prefix"
25083  acl_save_exec_prefix="$exec_prefix"
25084  exec_prefix="$acl_final_exec_prefix"
25085  eval x=\"$x\"
25086  exec_prefix="$acl_save_exec_prefix"
25087  prefix="$acl_save_prefix"
25088
25089      if test "X$x" = "X$element"; then
25090        haveit=yes
25091        break
25092      fi
25093    done
25094    if test -z "$haveit"; then
25095      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
25096    fi
25097  done
25098
25099
25100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libtextstyle" >&5
25101$as_echo_n "checking for libtextstyle... " >&6; }
25102if ${ac_cv_libtextstyle+:} false; then :
25103  $as_echo_n "(cached) " >&6
25104else
25105
25106    ac_save_LIBS="$LIBS"
25107                                case " $LIBTEXTSTYLE" in
25108      *" -l"*) LIBS="$LIBS $LIBTEXTSTYLE" ;;
25109      *)       LIBS="$LIBTEXTSTYLE $LIBS" ;;
25110    esac
25111    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25112/* end confdefs.h.  */
25113#include <textstyle.h>
25114int
25115main ()
25116{
25117term_styled_ostream_create(1,"",TTYCTL_AUTO,"");
25118  ;
25119  return 0;
25120}
25121_ACEOF
25122if ac_fn_c_try_link "$LINENO"; then :
25123  ac_cv_libtextstyle=yes
25124else
25125  ac_cv_libtextstyle='no'
25126fi
25127rm -f core conftest.err conftest.$ac_objext \
25128    conftest$ac_exeext conftest.$ac_ext
25129    LIBS="$ac_save_LIBS"
25130
25131fi
25132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libtextstyle" >&5
25133$as_echo "$ac_cv_libtextstyle" >&6; }
25134  if test "$ac_cv_libtextstyle" = yes; then
25135    HAVE_LIBTEXTSTYLE=yes
25136
25137$as_echo "#define HAVE_LIBTEXTSTYLE 1" >>confdefs.h
25138
25139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libtextstyle" >&5
25140$as_echo_n "checking how to link with libtextstyle... " >&6; }
25141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBTEXTSTYLE" >&5
25142$as_echo "$LIBTEXTSTYLE" >&6; }
25143  else
25144    HAVE_LIBTEXTSTYLE=no
25145            CPPFLAGS="$ac_save_CPPFLAGS"
25146    LIBTEXTSTYLE=
25147    LTLIBTEXTSTYLE=
25148    LIBTEXTSTYLE_PREFIX=
25149  fi
25150
25151
25152
25153
25154
25155
25156
25157
25158else
25159  test -f ../libtextstyle/Makefile || {
25160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: When building the gettext-tools package without building the entire gettext package, you need to pass the --with-installed-libtextstyle option to configure." >&5
25161$as_echo "$as_me: WARNING: When building the gettext-tools package without building the entire gettext package, you need to pass the --with-installed-libtextstyle option to configure." >&2;}
25162  }
25163fi
25164 if test "$gt_use_installed_libtextstyle" != no; then
25165  USE_INSTALLED_LIBTEXTSTYLE_TRUE=
25166  USE_INSTALLED_LIBTEXTSTYLE_FALSE='#'
25167else
25168  USE_INSTALLED_LIBTEXTSTYLE_TRUE='#'
25169  USE_INSTALLED_LIBTEXTSTYLE_FALSE=
25170fi
25171
25172
25173
25174# Check whether --with-installed-csharp-dll was given.
25175if test "${with_installed_csharp_dll+set}" = set; then :
25176  withval=$with_installed_csharp_dll; gt_use_installed_csharp_dll=$withval
25177else
25178  gt_use_installed_csharp_dll=no
25179fi
25180
25181if test "$gt_use_installed_csharp_dll" = no; then
25182  test -f ../gettext-runtime/intl-csharp/Makefile || {
25183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: When building the gettext-tools package without building the entire gettext package, you need to pass the --with-installed-csharp-dll option to configure." >&5
25184$as_echo "$as_me: WARNING: When building the gettext-tools package without building the entire gettext package, you need to pass the --with-installed-csharp-dll option to configure." >&2;}
25185  }
25186fi
25187 if test "$gt_use_installed_csharp_dll" != no; then
25188  USE_INSTALLED_CSHARP_DLL_TRUE=
25189  USE_INSTALLED_CSHARP_DLL_FALSE='#'
25190else
25191  USE_INSTALLED_CSHARP_DLL_TRUE='#'
25192  USE_INSTALLED_CSHARP_DLL_FALSE=
25193fi
25194
25195
25196
25197  for ac_prog in bison
25198do
25199  # Extract the first word of "$ac_prog", so it can be a program name with args.
25200set dummy $ac_prog; ac_word=$2
25201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25202$as_echo_n "checking for $ac_word... " >&6; }
25203if ${ac_cv_prog_TOOLS_BISON+:} false; then :
25204  $as_echo_n "(cached) " >&6
25205else
25206  if test -n "$TOOLS_BISON"; then
25207  ac_cv_prog_TOOLS_BISON="$TOOLS_BISON" # Let the user override the test.
25208else
25209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25210for as_dir in $PATH
25211do
25212  IFS=$as_save_IFS
25213  test -z "$as_dir" && as_dir=.
25214    for ac_exec_ext in '' $ac_executable_extensions; do
25215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25216    ac_cv_prog_TOOLS_BISON="$ac_prog"
25217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25218    break 2
25219  fi
25220done
25221  done
25222IFS=$as_save_IFS
25223
25224fi
25225fi
25226TOOLS_BISON=$ac_cv_prog_TOOLS_BISON
25227if test -n "$TOOLS_BISON"; then
25228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_BISON" >&5
25229$as_echo "$TOOLS_BISON" >&6; }
25230else
25231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25232$as_echo "no" >&6; }
25233fi
25234
25235
25236  test -n "$TOOLS_BISON" && break
25237done
25238
25239  if test -z "$TOOLS_BISON"; then
25240    ac_verc_fail=yes
25241  else
25242    cat >conftest.y <<_ACEOF
25243%require "3.0"
25244%%
25245exp:
25246_ACEOF
25247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bison 3.0 or newer" >&5
25248$as_echo_n "checking for bison 3.0 or newer... " >&6; }
25249    ac_prog_version=`$TOOLS_BISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
25250    : ${ac_prog_version:='v. ?.??'}
25251    if $TOOLS_BISON conftest.y -o conftest.c 2>/dev/null; then
25252      ac_prog_version="$ac_prog_version, ok"
25253      ac_verc_fail=no
25254    else
25255      ac_prog_version="$ac_prog_version, bad"
25256      ac_verc_fail=yes
25257    fi
25258    rm -f conftest.y conftest.c
25259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
25260$as_echo "$ac_prog_version" >&6; }
25261  fi
25262  if test $ac_verc_fail = yes; then
25263    TOOLS_BISON=:
25264  fi
25265
25266
25267
25268  : ${YACC='bison -o y.tab.c'}
25269
25270
25271  if test -z "$USE_NLS"; then
25272    echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." | sed -e 's/-/_/g' 1>&2
25273    exit 1
25274  fi
25275  BISON_LOCALEDIR=
25276  BISON_USE_NLS=no
25277  if test "$USE_NLS" = yes; then
25278                                BISON_LOCALEDIR="${localedir}"
25279
25280# Check whether --with-bison-prefix was given.
25281if test "${with_bison_prefix+set}" = set; then :
25282  withval=$with_bison_prefix; if test "X$withval" != "X" && test "X$withval" != "Xno"; then
25283         BISON_LOCALEDIR="$withval/share/locale"
25284       fi
25285
25286fi
25287
25288    if test $cross_compiling != yes; then
25289                              if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then
25290        BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir`
25291      fi
25292    fi
25293    if test -n "$BISON_LOCALEDIR"; then
25294                              USER_LINGUAS="${LINGUAS-%UNSET%}"
25295      if test -n "$USER_LINGUAS"; then
25296        BISON_USE_NLS=yes
25297      fi
25298    fi
25299
25300  fi
25301  if test $BISON_USE_NLS = yes; then
25302
25303$as_echo "#define YYENABLE_NLS 1" >>confdefs.h
25304
25305  fi
25306
25307
25308MSGMERGE_LIBM=?
25309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25310/* end confdefs.h.  */
25311
25312   #ifndef __NO_MATH_INLINES
25313   # define __NO_MATH_INLINES 1 /* for glibc */
25314   #endif
25315   #include <math.h>
25316   double x;
25317int
25318main ()
25319{
25320x = ceil(x); x = sqrt(x);
25321  ;
25322  return 0;
25323}
25324_ACEOF
25325if ac_fn_c_try_link "$LINENO"; then :
25326  MSGMERGE_LIBM=
25327fi
25328rm -f core conftest.err conftest.$ac_objext \
25329    conftest$ac_exeext conftest.$ac_ext
25330if test "$MSGMERGE_LIBM" = "?"; then
25331  save_LIBS="$LIBS"
25332  LIBS="$LIBS -lm"
25333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25334/* end confdefs.h.  */
25335
25336     #ifndef __NO_MATH_INLINES
25337     # define __NO_MATH_INLINES 1 /* for glibc */
25338     #endif
25339     #include <math.h>
25340     double x;
25341int
25342main ()
25343{
25344x = ceil(x); x = sqrt(x);
25345  ;
25346  return 0;
25347}
25348_ACEOF
25349if ac_fn_c_try_link "$LINENO"; then :
25350  MSGMERGE_LIBM="-lm"
25351fi
25352rm -f core conftest.err conftest.$ac_objext \
25353    conftest$ac_exeext conftest.$ac_ext
25354  LIBS="$save_LIBS"
25355fi
25356if test "$MSGMERGE_LIBM" = "?"; then
25357  MSGMERGE_LIBM=
25358fi
25359
25360
25361
25362  OPENMP_CFLAGS=
25363  # Check whether --enable-openmp was given.
25364if test "${enable_openmp+set}" = set; then :
25365  enableval=$enable_openmp;
25366fi
25367
25368  if test "$enable_openmp" != no; then
25369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to support OpenMP" >&5
25370$as_echo_n "checking for $CC option to support OpenMP... " >&6; }
25371if ${ac_cv_prog_c_openmp+:} false; then :
25372  $as_echo_n "(cached) " >&6
25373else
25374  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25375/* end confdefs.h.  */
25376
25377#ifndef _OPENMP
25378 choke me
25379#endif
25380#include <omp.h>
25381int main () { return omp_get_num_threads (); }
25382
25383_ACEOF
25384if ac_fn_c_try_link "$LINENO"; then :
25385  ac_cv_prog_c_openmp='none needed'
25386else
25387  ac_cv_prog_c_openmp='unsupported'
25388	  	  	  	  	  	  	                                	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \
25389                           -Popenmp --openmp; do
25390	    ac_save_CFLAGS=$CFLAGS
25391	    CFLAGS="$CFLAGS $ac_option"
25392	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25393/* end confdefs.h.  */
25394
25395#ifndef _OPENMP
25396 choke me
25397#endif
25398#include <omp.h>
25399int main () { return omp_get_num_threads (); }
25400
25401_ACEOF
25402if ac_fn_c_try_link "$LINENO"; then :
25403  ac_cv_prog_c_openmp=$ac_option
25404fi
25405rm -f core conftest.err conftest.$ac_objext \
25406    conftest$ac_exeext conftest.$ac_ext
25407	    CFLAGS=$ac_save_CFLAGS
25408	    if test "$ac_cv_prog_c_openmp" != unsupported; then
25409	      break
25410	    fi
25411	  done
25412fi
25413rm -f core conftest.err conftest.$ac_objext \
25414    conftest$ac_exeext conftest.$ac_ext
25415fi
25416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_c_openmp" >&5
25417$as_echo "$ac_cv_prog_c_openmp" >&6; }
25418    case $ac_cv_prog_c_openmp in #(
25419      "none needed" | unsupported)
25420	;; #(
25421      *)
25422	OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;;
25423    esac
25424  fi
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436                        # Check whether --enable-cross-guesses was given.
25437if test "${enable_cross_guesses+set}" = set; then :
25438  enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
25439       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
25440$as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
25441       enableval=conservative
25442     fi
25443     gl_cross_guesses="$enableval"
25444else
25445  gl_cross_guesses=conservative
25446fi
25447
25448  if test $gl_cross_guesses = risky; then
25449    gl_cross_guess_normal="guessing yes"
25450    gl_cross_guess_inverted="guessing no"
25451  else
25452    gl_cross_guess_normal="guessing no"
25453    gl_cross_guess_inverted="guessing yes"
25454  fi
25455          LIBC_FATAL_STDERR_=1
25456  export LIBC_FATAL_STDERR_
25457
25458
25459
25460  GNULIB_ACCESS=0;
25461  GNULIB_CHDIR=0;
25462  GNULIB_CHOWN=0;
25463  GNULIB_CLOSE=0;
25464  GNULIB_COPY_FILE_RANGE=0;
25465  GNULIB_DUP=0;
25466  GNULIB_DUP2=0;
25467  GNULIB_DUP3=0;
25468  GNULIB_ENVIRON=0;
25469  GNULIB_EUIDACCESS=0;
25470  GNULIB_FACCESSAT=0;
25471  GNULIB_FCHDIR=0;
25472  GNULIB_FCHOWNAT=0;
25473  GNULIB_FDATASYNC=0;
25474  GNULIB_FSYNC=0;
25475  GNULIB_FTRUNCATE=0;
25476  GNULIB_GETCWD=0;
25477  GNULIB_GETDOMAINNAME=0;
25478  GNULIB_GETDTABLESIZE=0;
25479  GNULIB_GETENTROPY=0;
25480  GNULIB_GETGROUPS=0;
25481  GNULIB_GETHOSTNAME=0;
25482  GNULIB_GETLOGIN=0;
25483  GNULIB_GETLOGIN_R=0;
25484  GNULIB_GETOPT_POSIX=0;
25485  GNULIB_GETPAGESIZE=0;
25486  GNULIB_GETPASS=0;
25487  GNULIB_GETUSERSHELL=0;
25488  GNULIB_GROUP_MEMBER=0;
25489  GNULIB_ISATTY=0;
25490  GNULIB_LCHOWN=0;
25491  GNULIB_LINK=0;
25492  GNULIB_LINKAT=0;
25493  GNULIB_LSEEK=0;
25494  GNULIB_PIPE=0;
25495  GNULIB_PIPE2=0;
25496  GNULIB_PREAD=0;
25497  GNULIB_PWRITE=0;
25498  GNULIB_READ=0;
25499  GNULIB_READLINK=0;
25500  GNULIB_READLINKAT=0;
25501  GNULIB_RMDIR=0;
25502  GNULIB_SETHOSTNAME=0;
25503  GNULIB_SLEEP=0;
25504  GNULIB_SYMLINK=0;
25505  GNULIB_SYMLINKAT=0;
25506  GNULIB_TRUNCATE=0;
25507  GNULIB_TTYNAME_R=0;
25508  GNULIB_UNISTD_H_NONBLOCKING=0;
25509  GNULIB_UNISTD_H_SIGPIPE=0;
25510  GNULIB_UNLINK=0;
25511  GNULIB_UNLINKAT=0;
25512  GNULIB_USLEEP=0;
25513  GNULIB_WRITE=0;
25514    HAVE_CHOWN=1;
25515  HAVE_COPY_FILE_RANGE=1;
25516  HAVE_DUP3=1;
25517  HAVE_EUIDACCESS=1;
25518  HAVE_FACCESSAT=1;
25519  HAVE_FCHDIR=1;
25520  HAVE_FCHOWNAT=1;
25521  HAVE_FDATASYNC=1;
25522  HAVE_FSYNC=1;
25523  HAVE_FTRUNCATE=1;
25524  HAVE_GETDTABLESIZE=1;
25525  HAVE_GETENTROPY=1;
25526  HAVE_GETGROUPS=1;
25527  HAVE_GETHOSTNAME=1;
25528  HAVE_GETLOGIN=1;
25529  HAVE_GETPAGESIZE=1;
25530  HAVE_GETPASS=1;
25531  HAVE_GROUP_MEMBER=1;
25532  HAVE_LCHOWN=1;
25533  HAVE_LINK=1;
25534  HAVE_LINKAT=1;
25535  HAVE_PIPE=1;
25536  HAVE_PIPE2=1;
25537  HAVE_PREAD=1;
25538  HAVE_PWRITE=1;
25539  HAVE_READLINK=1;
25540  HAVE_READLINKAT=1;
25541  HAVE_SETHOSTNAME=1;
25542  HAVE_SLEEP=1;
25543  HAVE_SYMLINK=1;
25544  HAVE_SYMLINKAT=1;
25545  HAVE_UNLINKAT=1;
25546  HAVE_USLEEP=1;
25547  HAVE_DECL_ENVIRON=1;
25548  HAVE_DECL_FCHDIR=1;
25549  HAVE_DECL_FDATASYNC=1;
25550  HAVE_DECL_GETDOMAINNAME=1;
25551  HAVE_DECL_GETLOGIN=1;
25552  HAVE_DECL_GETLOGIN_R=1;
25553  HAVE_DECL_GETPAGESIZE=1;
25554  HAVE_DECL_GETUSERSHELL=1;
25555  HAVE_DECL_SETHOSTNAME=1;
25556  HAVE_DECL_TRUNCATE=1;
25557  HAVE_DECL_TTYNAME_R=1;
25558  HAVE_OS_H=0;
25559  HAVE_SYS_PARAM_H=0;
25560  REPLACE_ACCESS=0;
25561  REPLACE_CHOWN=0;
25562  REPLACE_CLOSE=0;
25563  REPLACE_DUP=0;
25564  REPLACE_DUP2=0;
25565  REPLACE_FACCESSAT=0;
25566  REPLACE_FCHOWNAT=0;
25567  REPLACE_FTRUNCATE=0;
25568  REPLACE_GETCWD=0;
25569  REPLACE_GETDOMAINNAME=0;
25570  REPLACE_GETDTABLESIZE=0;
25571  REPLACE_GETLOGIN_R=0;
25572  REPLACE_GETGROUPS=0;
25573  REPLACE_GETPAGESIZE=0;
25574  REPLACE_GETPASS=0;
25575  REPLACE_ISATTY=0;
25576  REPLACE_LCHOWN=0;
25577  REPLACE_LINK=0;
25578  REPLACE_LINKAT=0;
25579  REPLACE_LSEEK=0;
25580  REPLACE_PREAD=0;
25581  REPLACE_PWRITE=0;
25582  REPLACE_READ=0;
25583  REPLACE_READLINK=0;
25584  REPLACE_READLINKAT=0;
25585  REPLACE_RMDIR=0;
25586  REPLACE_SLEEP=0;
25587  REPLACE_SYMLINK=0;
25588  REPLACE_SYMLINKAT=0;
25589  REPLACE_TRUNCATE=0;
25590  REPLACE_TTYNAME_R=0;
25591  REPLACE_UNLINK=0;
25592  REPLACE_UNLINKAT=0;
25593  REPLACE_USLEEP=0;
25594  REPLACE_WRITE=0;
25595  UNISTD_H_HAVE_SYS_RANDOM_H=0;
25596  UNISTD_H_HAVE_WINSOCK2_H=0;
25597  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
25598
25599
25600
25601  gl_need_lib_has_acl=
25602  # Check whether --enable-acl was given.
25603if test "${enable_acl+set}" = set; then :
25604  enableval=$enable_acl;
25605else
25606  enable_acl=auto
25607fi
25608
25609
25610
25611
25612
25613
25614
25615  GNULIB_BTOWC=0;
25616  GNULIB_WCTOB=0;
25617  GNULIB_MBSINIT=0;
25618  GNULIB_MBRTOWC=0;
25619  GNULIB_MBRLEN=0;
25620  GNULIB_MBSRTOWCS=0;
25621  GNULIB_MBSNRTOWCS=0;
25622  GNULIB_WCRTOMB=0;
25623  GNULIB_WCSRTOMBS=0;
25624  GNULIB_WCSNRTOMBS=0;
25625  GNULIB_WCWIDTH=0;
25626  GNULIB_WMEMCHR=0;
25627  GNULIB_WMEMCMP=0;
25628  GNULIB_WMEMCPY=0;
25629  GNULIB_WMEMMOVE=0;
25630  GNULIB_WMEMPCPY=0;
25631  GNULIB_WMEMSET=0;
25632  GNULIB_WCSLEN=0;
25633  GNULIB_WCSNLEN=0;
25634  GNULIB_WCSCPY=0;
25635  GNULIB_WCPCPY=0;
25636  GNULIB_WCSNCPY=0;
25637  GNULIB_WCPNCPY=0;
25638  GNULIB_WCSCAT=0;
25639  GNULIB_WCSNCAT=0;
25640  GNULIB_WCSCMP=0;
25641  GNULIB_WCSNCMP=0;
25642  GNULIB_WCSCASECMP=0;
25643  GNULIB_WCSNCASECMP=0;
25644  GNULIB_WCSCOLL=0;
25645  GNULIB_WCSXFRM=0;
25646  GNULIB_WCSDUP=0;
25647  GNULIB_WCSCHR=0;
25648  GNULIB_WCSRCHR=0;
25649  GNULIB_WCSCSPN=0;
25650  GNULIB_WCSSPN=0;
25651  GNULIB_WCSPBRK=0;
25652  GNULIB_WCSSTR=0;
25653  GNULIB_WCSTOK=0;
25654  GNULIB_WCSWIDTH=0;
25655  GNULIB_WCSFTIME=0;
25656    HAVE_BTOWC=1;
25657  HAVE_MBSINIT=1;
25658  HAVE_MBRTOWC=1;
25659  HAVE_MBRLEN=1;
25660  HAVE_MBSRTOWCS=1;
25661  HAVE_MBSNRTOWCS=1;
25662  HAVE_WCRTOMB=1;
25663  HAVE_WCSRTOMBS=1;
25664  HAVE_WCSNRTOMBS=1;
25665  HAVE_WMEMCHR=1;
25666  HAVE_WMEMCMP=1;
25667  HAVE_WMEMCPY=1;
25668  HAVE_WMEMMOVE=1;
25669  HAVE_WMEMPCPY=1;
25670  HAVE_WMEMSET=1;
25671  HAVE_WCSLEN=1;
25672  HAVE_WCSNLEN=1;
25673  HAVE_WCSCPY=1;
25674  HAVE_WCPCPY=1;
25675  HAVE_WCSNCPY=1;
25676  HAVE_WCPNCPY=1;
25677  HAVE_WCSCAT=1;
25678  HAVE_WCSNCAT=1;
25679  HAVE_WCSCMP=1;
25680  HAVE_WCSNCMP=1;
25681  HAVE_WCSCASECMP=1;
25682  HAVE_WCSNCASECMP=1;
25683  HAVE_WCSCOLL=1;
25684  HAVE_WCSXFRM=1;
25685  HAVE_WCSDUP=1;
25686  HAVE_WCSCHR=1;
25687  HAVE_WCSRCHR=1;
25688  HAVE_WCSCSPN=1;
25689  HAVE_WCSSPN=1;
25690  HAVE_WCSPBRK=1;
25691  HAVE_WCSSTR=1;
25692  HAVE_WCSTOK=1;
25693  HAVE_WCSWIDTH=1;
25694  HAVE_WCSFTIME=1;
25695  HAVE_DECL_WCTOB=1;
25696  HAVE_DECL_WCWIDTH=1;
25697  REPLACE_MBSTATE_T=0;
25698  REPLACE_BTOWC=0;
25699  REPLACE_WCTOB=0;
25700  REPLACE_MBSINIT=0;
25701  REPLACE_MBRTOWC=0;
25702  REPLACE_MBRLEN=0;
25703  REPLACE_MBSRTOWCS=0;
25704  REPLACE_MBSNRTOWCS=0;
25705  REPLACE_WCRTOMB=0;
25706  REPLACE_WCSRTOMBS=0;
25707  REPLACE_WCSNRTOMBS=0;
25708  REPLACE_WCWIDTH=0;
25709  REPLACE_WCSWIDTH=0;
25710  REPLACE_WCSFTIME=0;
25711  REPLACE_WCSTOK=0;
25712
25713
25714            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
25715$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
25716if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
25717  $as_echo_n "(cached) " >&6
25718else
25719  gl_cv_header_wchar_h_correct_inline=yes
25720     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25721/* end confdefs.h.  */
25722
25723       #define wcstod renamed_wcstod
25724/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25725   <wchar.h>.
25726   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25727   included before <wchar.h>.  */
25728#include <stddef.h>
25729#include <stdio.h>
25730#include <time.h>
25731#include <wchar.h>
25732extern int zero (void);
25733int main () { return zero(); }
25734
25735_ACEOF
25736                              save_ac_compile="$ac_compile"
25737     ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
25738     if echo '#include "conftest.c"' >conftest1.c &&
25739        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
25740  (eval $ac_compile) 2>&5
25741  ac_status=$?
25742  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25743  test $ac_status = 0; }; then
25744       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25745/* end confdefs.h.  */
25746
25747         #define wcstod renamed_wcstod
25748/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25749   <wchar.h>.
25750   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25751   included before <wchar.h>.  */
25752#include <stddef.h>
25753#include <stdio.h>
25754#include <time.h>
25755#include <wchar.h>
25756int zero (void) { return 0; }
25757
25758_ACEOF
25759              ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
25760       if echo '#include "conftest.c"' >conftest2.c &&
25761          { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
25762  (eval $ac_compile) 2>&5
25763  ac_status=$?
25764  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25765  test $ac_status = 0; }; then
25766         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
25767           :
25768         else
25769           gl_cv_header_wchar_h_correct_inline=no
25770         fi
25771       fi
25772     fi
25773     ac_compile="$save_ac_compile"
25774     rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
25775
25776fi
25777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
25778$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
25779  if test $gl_cv_header_wchar_h_correct_inline = no; then
25780    as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
25781This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
25782C99 mode. You have four options:
25783  - Add the flag -fgnu89-inline to CC and reconfigure, or
25784  - Fix your include files, using parts of
25785    <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
25786  - Use a gcc version older than 4.3, or
25787  - Don't use the flags -std=c99 or -std=gnu99.
25788Configuration aborted." "$LINENO" 5
25789  fi
25790
25791
25792
25793
25794
25795
25796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
25797$as_echo_n "checking for a traditional french locale... " >&6; }
25798if ${gt_cv_locale_fr+:} false; then :
25799  $as_echo_n "(cached) " >&6
25800else
25801
25802    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25803/* end confdefs.h.  */
25804
25805#include <locale.h>
25806#include <time.h>
25807#if HAVE_LANGINFO_CODESET
25808# include <langinfo.h>
25809#endif
25810#include <stdlib.h>
25811#include <string.h>
25812struct tm t;
25813char buf[16];
25814int main () {
25815  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
25816     imitates locale dependent behaviour by looking at the environment
25817     variables, and all locales use the UTF-8 encoding.  */
25818#if defined __BEOS__ || defined __HAIKU__
25819  return 1;
25820#else
25821  /* Check whether the given locale name is recognized by the system.  */
25822# if defined _WIN32 && !defined __CYGWIN__
25823  /* On native Windows, setlocale(category, "") looks at the system settings,
25824     not at the environment variables.  Also, when an encoding suffix such
25825     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
25826     category of the locale to "C".  */
25827  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
25828      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
25829    return 1;
25830# else
25831  if (setlocale (LC_ALL, "") == NULL) return 1;
25832# endif
25833  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
25834     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
25835     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
25836     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
25837     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
25838     some unit tests fail.
25839     On MirBSD 10, when an unsupported locale is specified, setlocale()
25840     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
25841# if HAVE_LANGINFO_CODESET
25842  {
25843    const char *cs = nl_langinfo (CODESET);
25844    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
25845        || strcmp (cs, "UTF-8") == 0)
25846      return 1;
25847  }
25848# endif
25849# ifdef __CYGWIN__
25850  /* On Cygwin, avoid locale names without encoding suffix, because the
25851     locale_charset() function relies on the encoding suffix.  Note that
25852     LC_ALL is set on the command line.  */
25853  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
25854# endif
25855  /* Check whether in the abbreviation of the second month, the second
25856     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
25857     one byte long. This excludes the UTF-8 encoding.  */
25858  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
25859  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
25860# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
25861  /* Check whether the decimal separator is a comma.
25862     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
25863     are nl_langinfo(RADIXCHAR) are both ".".  */
25864  if (localeconv () ->decimal_point[0] != ',') return 1;
25865# endif
25866  return 0;
25867#endif
25868}
25869
25870_ACEOF
25871    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
25872  (eval $ac_link) 2>&5
25873  ac_status=$?
25874  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25875  test $ac_status = 0; } && test -s conftest$ac_exeext; then
25876      case "$host_os" in
25877        # Handle native Windows specially, because there setlocale() interprets
25878        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
25879        # "fr" or "fra" as "French" or "French_France.1252",
25880        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
25881        # "ja" as "Japanese" or "Japanese_Japan.932",
25882        # and similar.
25883        mingw*)
25884          # Test for the native Windows locale name.
25885          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25886            gt_cv_locale_fr=French_France.1252
25887          else
25888            # None found.
25889            gt_cv_locale_fr=none
25890          fi
25891          ;;
25892        *)
25893          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
25894          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
25895          # configure script would override the LC_ALL setting. Likewise for
25896          # LC_CTYPE, which is also set at the beginning of the configure script.
25897          # Test for the usual locale name.
25898          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25899            gt_cv_locale_fr=fr_FR
25900          else
25901            # Test for the locale name with explicit encoding suffix.
25902            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25903              gt_cv_locale_fr=fr_FR.ISO-8859-1
25904            else
25905              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
25906              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25907                gt_cv_locale_fr=fr_FR.ISO8859-1
25908              else
25909                # Test for the HP-UX locale name.
25910                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25911                  gt_cv_locale_fr=fr_FR.iso88591
25912                else
25913                  # Test for the Solaris 7 locale name.
25914                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
25915                    gt_cv_locale_fr=fr
25916                  else
25917                    # None found.
25918                    gt_cv_locale_fr=none
25919                  fi
25920                fi
25921              fi
25922            fi
25923          fi
25924          ;;
25925      esac
25926    fi
25927    rm -fr conftest*
25928
25929fi
25930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
25931$as_echo "$gt_cv_locale_fr" >&6; }
25932  LOCALE_FR=$gt_cv_locale_fr
25933
25934
25935
25936
25937
25938
25939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
25940$as_echo_n "checking whether // is distinct from /... " >&6; }
25941if ${gl_cv_double_slash_root+:} false; then :
25942  $as_echo_n "(cached) " >&6
25943else
25944   if test x"$cross_compiling" = xyes ; then
25945        # When cross-compiling, there is no way to tell whether // is special
25946        # short of a list of hosts.  However, the only known hosts to date
25947        # that have a distinct // are Apollo DomainOS (too old to port to),
25948        # Cygwin, and z/OS.  If anyone knows of another system for which // has
25949        # special semantics and is distinct from /, please report it to
25950        # <bug-gnulib@gnu.org>.
25951        case $host in
25952          *-cygwin | i370-ibm-openedition)
25953            gl_cv_double_slash_root=yes ;;
25954          *)
25955            # Be optimistic and assume that / and // are the same when we
25956            # don't know.
25957            gl_cv_double_slash_root='unknown, assuming no' ;;
25958        esac
25959      else
25960        set x `ls -di / // 2>/dev/null`
25961        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
25962          gl_cv_double_slash_root=no
25963        else
25964          gl_cv_double_slash_root=yes
25965        fi
25966      fi
25967fi
25968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
25969$as_echo "$gl_cv_double_slash_root" >&6; }
25970  if test "$gl_cv_double_slash_root" = yes; then
25971
25972$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
25973
25974  fi
25975
25976
25977
25978
25979
25980     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
25981$as_echo_n "checking whether realpath works... " >&6; }
25982if ${gl_cv_func_realpath_works+:} false; then :
25983  $as_echo_n "(cached) " >&6
25984else
25985
25986    touch conftest.a
25987    mkdir conftest.d
25988    if test "$cross_compiling" = yes; then :
25989  case "$host_os" in
25990                       # Guess yes on glibc systems.
25991        *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
25992                       # Guess yes on musl systems.
25993        *-musl*)       gl_cv_func_realpath_works="guessing yes" ;;
25994                       # Guess no on native Windows.
25995        mingw*)        gl_cv_func_realpath_works="guessing no" ;;
25996                       # If we don't know, obey --enable-cross-guesses.
25997        *)             gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
25998      esac
25999
26000else
26001  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26002/* end confdefs.h.  */
26003
26004
26005
26006#include <stdlib.h>
26007#if defined __MACH__ && defined __APPLE__
26008/* Avoid a crash on Mac OS X.  */
26009#include <mach/mach.h>
26010#include <mach/mach_error.h>
26011#include <mach/thread_status.h>
26012#include <mach/exception.h>
26013#include <mach/task.h>
26014#include <pthread.h>
26015/* The exception port on which our thread listens.  */
26016static mach_port_t our_exception_port;
26017/* The main function of the thread listening for exceptions of type
26018   EXC_BAD_ACCESS.  */
26019static void *
26020mach_exception_thread (void *arg)
26021{
26022  /* Buffer for a message to be received.  */
26023  struct {
26024    mach_msg_header_t head;
26025    mach_msg_body_t msgh_body;
26026    char data[1024];
26027  } msg;
26028  mach_msg_return_t retval;
26029  /* Wait for a message on the exception port.  */
26030  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
26031                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
26032  if (retval != MACH_MSG_SUCCESS)
26033    abort ();
26034  exit (1);
26035}
26036static void
26037nocrash_init (void)
26038{
26039  mach_port_t self = mach_task_self ();
26040  /* Allocate a port on which the thread shall listen for exceptions.  */
26041  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
26042      == KERN_SUCCESS) {
26043    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
26044    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
26045                                MACH_MSG_TYPE_MAKE_SEND)
26046        == KERN_SUCCESS) {
26047      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
26048         for us.  */
26049      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
26050      /* Create the thread listening on the exception port.  */
26051      pthread_attr_t attr;
26052      pthread_t thread;
26053      if (pthread_attr_init (&attr) == 0
26054          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
26055          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
26056        pthread_attr_destroy (&attr);
26057        /* Replace the exception port info for these exceptions with our own.
26058           Note that we replace the exception port for the entire task, not only
26059           for a particular thread.  This has the effect that when our exception
26060           port gets the message, the thread specific exception port has already
26061           been asked, and we don't need to bother about it.
26062           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
26063        task_set_exception_ports (self, mask, our_exception_port,
26064                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
26065      }
26066    }
26067  }
26068}
26069#elif defined _WIN32 && ! defined __CYGWIN__
26070/* Avoid a crash on native Windows.  */
26071#define WIN32_LEAN_AND_MEAN
26072#include <windows.h>
26073#include <winerror.h>
26074static LONG WINAPI
26075exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
26076{
26077  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
26078    {
26079    case EXCEPTION_ACCESS_VIOLATION:
26080    case EXCEPTION_IN_PAGE_ERROR:
26081    case EXCEPTION_STACK_OVERFLOW:
26082    case EXCEPTION_GUARD_PAGE:
26083    case EXCEPTION_PRIV_INSTRUCTION:
26084    case EXCEPTION_ILLEGAL_INSTRUCTION:
26085    case EXCEPTION_DATATYPE_MISALIGNMENT:
26086    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
26087    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
26088      exit (1);
26089    }
26090  return EXCEPTION_CONTINUE_SEARCH;
26091}
26092static void
26093nocrash_init (void)
26094{
26095  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
26096}
26097#else
26098/* Avoid a crash on POSIX systems.  */
26099#include <signal.h>
26100#include <unistd.h>
26101/* A POSIX signal handler.  */
26102static void
26103exception_handler (int sig)
26104{
26105  _exit (1);
26106}
26107static void
26108nocrash_init (void)
26109{
26110#ifdef SIGSEGV
26111  signal (SIGSEGV, exception_handler);
26112#endif
26113#ifdef SIGBUS
26114  signal (SIGBUS, exception_handler);
26115#endif
26116}
26117#endif
26118
26119        #include <stdlib.h>
26120        #include <string.h>
26121
26122int
26123main ()
26124{
26125
26126        int result = 0;
26127        {
26128          char *name = realpath ("conftest.a", NULL);
26129          if (!(name && *name == '/'))
26130            result |= 1;
26131          free (name);
26132        }
26133        {
26134          char *name = realpath ("conftest.b/../conftest.a", NULL);
26135          if (name != NULL)
26136            result |= 2;
26137          free (name);
26138        }
26139        {
26140          char *name = realpath ("conftest.a/", NULL);
26141          if (name != NULL)
26142            result |= 4;
26143          free (name);
26144        }
26145        {
26146          char *name1 = realpath (".", NULL);
26147          char *name2 = realpath ("conftest.d//./..", NULL);
26148          if (! name1 || ! name2 || strcmp (name1, name2))
26149            result |= 8;
26150          free (name1);
26151          free (name2);
26152        }
26153        return result;
26154
26155  ;
26156  return 0;
26157}
26158
26159_ACEOF
26160if ac_fn_c_try_run "$LINENO"; then :
26161  gl_cv_func_realpath_works=yes
26162else
26163  gl_cv_func_realpath_works=no
26164fi
26165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26166  conftest.$ac_objext conftest.beam conftest.$ac_ext
26167fi
26168
26169    rm -rf conftest.a conftest.d
26170
26171fi
26172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
26173$as_echo "$gl_cv_func_realpath_works" >&6; }
26174  case "$gl_cv_func_realpath_works" in
26175    *yes)
26176
26177$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
26178
26179      ;;
26180  esac
26181
26182
26183  GNULIB__EXIT=0;
26184  GNULIB_ATOLL=0;
26185  GNULIB_CALLOC_POSIX=0;
26186  GNULIB_CANONICALIZE_FILE_NAME=0;
26187  GNULIB_GETLOADAVG=0;
26188  GNULIB_GETSUBOPT=0;
26189  GNULIB_GRANTPT=0;
26190  GNULIB_MALLOC_POSIX=0;
26191  GNULIB_MBTOWC=0;
26192  GNULIB_MKDTEMP=0;
26193  GNULIB_MKOSTEMP=0;
26194  GNULIB_MKOSTEMPS=0;
26195  GNULIB_MKSTEMP=0;
26196  GNULIB_MKSTEMPS=0;
26197  GNULIB_POSIX_OPENPT=0;
26198  GNULIB_PTSNAME=0;
26199  GNULIB_PTSNAME_R=0;
26200  GNULIB_PUTENV=0;
26201  GNULIB_QSORT_R=0;
26202  GNULIB_RANDOM=0;
26203  GNULIB_RANDOM_R=0;
26204  GNULIB_REALLOCARRAY=0;
26205  GNULIB_REALLOC_POSIX=0;
26206  GNULIB_REALPATH=0;
26207  GNULIB_RPMATCH=0;
26208  GNULIB_SECURE_GETENV=0;
26209  GNULIB_SETENV=0;
26210  GNULIB_STRTOD=0;
26211  GNULIB_STRTOLD=0;
26212  GNULIB_STRTOLL=0;
26213  GNULIB_STRTOULL=0;
26214  GNULIB_SYSTEM_POSIX=0;
26215  GNULIB_UNLOCKPT=0;
26216  GNULIB_UNSETENV=0;
26217  GNULIB_WCTOMB=0;
26218    HAVE__EXIT=1;
26219  HAVE_ATOLL=1;
26220  HAVE_CANONICALIZE_FILE_NAME=1;
26221  HAVE_DECL_GETLOADAVG=1;
26222  HAVE_GETSUBOPT=1;
26223  HAVE_GRANTPT=1;
26224  HAVE_INITSTATE=1;
26225  HAVE_DECL_INITSTATE=1;
26226  HAVE_MBTOWC=1;
26227  HAVE_MKDTEMP=1;
26228  HAVE_MKOSTEMP=1;
26229  HAVE_MKOSTEMPS=1;
26230  HAVE_MKSTEMP=1;
26231  HAVE_MKSTEMPS=1;
26232  HAVE_POSIX_OPENPT=1;
26233  HAVE_PTSNAME=1;
26234  HAVE_PTSNAME_R=1;
26235  HAVE_QSORT_R=1;
26236  HAVE_RANDOM=1;
26237  HAVE_RANDOM_H=1;
26238  HAVE_RANDOM_R=1;
26239  HAVE_REALLOCARRAY=1;
26240  HAVE_REALPATH=1;
26241  HAVE_RPMATCH=1;
26242  HAVE_SECURE_GETENV=1;
26243  HAVE_SETENV=1;
26244  HAVE_DECL_SETENV=1;
26245  HAVE_SETSTATE=1;
26246  HAVE_DECL_SETSTATE=1;
26247  HAVE_STRTOD=1;
26248  HAVE_STRTOLD=1;
26249  HAVE_STRTOLL=1;
26250  HAVE_STRTOULL=1;
26251  HAVE_STRUCT_RANDOM_DATA=1;
26252  HAVE_SYS_LOADAVG_H=0;
26253  HAVE_UNLOCKPT=1;
26254  HAVE_DECL_UNSETENV=1;
26255  REPLACE_CALLOC=0;
26256  REPLACE_CANONICALIZE_FILE_NAME=0;
26257  REPLACE_INITSTATE=0;
26258  REPLACE_MALLOC=0;
26259  REPLACE_MBTOWC=0;
26260  REPLACE_MKSTEMP=0;
26261  REPLACE_PTSNAME=0;
26262  REPLACE_PTSNAME_R=0;
26263  REPLACE_PUTENV=0;
26264  REPLACE_QSORT_R=0;
26265  REPLACE_RANDOM=0;
26266  REPLACE_RANDOM_R=0;
26267  REPLACE_REALLOC=0;
26268  REPLACE_REALPATH=0;
26269  REPLACE_SETENV=0;
26270  REPLACE_SETSTATE=0;
26271  REPLACE_STRTOD=0;
26272  REPLACE_STRTOLD=0;
26273  REPLACE_UNSETENV=0;
26274  REPLACE_WCTOMB=0;
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
26288$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
26289if ${ac_cv_c_restrict+:} false; then :
26290  $as_echo_n "(cached) " >&6
26291else
26292  ac_cv_c_restrict=no
26293   # The order here caters to the fact that C++ does not require restrict.
26294   for ac_kw in __restrict __restrict__ _Restrict restrict; do
26295     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26296/* end confdefs.h.  */
26297typedef int *int_ptr;
26298           int foo (int_ptr $ac_kw ip) { return ip[0]; }
26299           int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
26300           int bar (int ip[$ac_kw]) { return ip[0]; }
26301
26302int
26303main ()
26304{
26305int s[1];
26306           int *$ac_kw t = s;
26307           t[0] = 0;
26308           return foo (t) + bar (t);
26309
26310  ;
26311  return 0;
26312}
26313_ACEOF
26314if ac_fn_c_try_compile "$LINENO"; then :
26315  ac_cv_c_restrict=$ac_kw
26316fi
26317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26318     test "$ac_cv_c_restrict" != no && break
26319   done
26320
26321fi
26322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
26323$as_echo "$ac_cv_c_restrict" >&6; }
26324
26325 case $ac_cv_c_restrict in
26326   restrict) ;;
26327   no) $as_echo "#define restrict /**/" >>confdefs.h
26328 ;;
26329   *)  cat >>confdefs.h <<_ACEOF
26330#define restrict $ac_cv_c_restrict
26331_ACEOF
26332 ;;
26333 esac
26334
26335
26336
26337
26338
26339
26340
26341  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
26342    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
26343
26344$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
26345
26346  else
26347    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
26348  fi
26349
26350
26351
26352  GNULIB_IOCTL=0;
26353    SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
26354  SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
26355
26356  REPLACE_IOCTL=0;
26357
26358
26359
26360
26361     GNULIB_OPENDIR=0;
26362  GNULIB_READDIR=0;
26363  GNULIB_REWINDDIR=0;
26364  GNULIB_CLOSEDIR=0;
26365  GNULIB_DIRFD=0;
26366  GNULIB_FDOPENDIR=0;
26367  GNULIB_SCANDIR=0;
26368  GNULIB_ALPHASORT=0;
26369    HAVE_OPENDIR=1;
26370  HAVE_READDIR=1;
26371  HAVE_REWINDDIR=1;
26372  HAVE_CLOSEDIR=1;
26373  HAVE_DECL_DIRFD=1;
26374  HAVE_DECL_FDOPENDIR=1;
26375  HAVE_FDOPENDIR=1;
26376  HAVE_SCANDIR=1;
26377  HAVE_ALPHASORT=1;
26378  REPLACE_OPENDIR=0;
26379  REPLACE_CLOSEDIR=0;
26380  REPLACE_DIRFD=0;
26381  REPLACE_FDOPENDIR=0;
26382
26383
26384  GNULIB_ISBLANK=0;
26385    HAVE_ISBLANK=1;
26386
26387
26388
26389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
26390$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
26391if ${gl_cv_have_include_next+:} false; then :
26392  $as_echo_n "(cached) " >&6
26393else
26394  rm -rf conftestd1a conftestd1b conftestd2
26395     mkdir conftestd1a conftestd1b conftestd2
26396                                                  cat <<EOF > conftestd1a/conftest.h
26397#define DEFINED_IN_CONFTESTD1
26398#include_next <conftest.h>
26399#ifdef DEFINED_IN_CONFTESTD2
26400int foo;
26401#else
26402#error "include_next doesn't work"
26403#endif
26404EOF
26405     cat <<EOF > conftestd1b/conftest.h
26406#define DEFINED_IN_CONFTESTD1
26407#include <stdio.h>
26408#include_next <conftest.h>
26409#ifdef DEFINED_IN_CONFTESTD2
26410int foo;
26411#else
26412#error "include_next doesn't work"
26413#endif
26414EOF
26415     cat <<EOF > conftestd2/conftest.h
26416#ifndef DEFINED_IN_CONFTESTD1
26417#error "include_next test doesn't work"
26418#endif
26419#define DEFINED_IN_CONFTESTD2
26420EOF
26421     gl_save_CPPFLAGS="$CPPFLAGS"
26422     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
26423     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26424/* end confdefs.h.  */
26425#include <conftest.h>
26426_ACEOF
26427if ac_fn_c_try_compile "$LINENO"; then :
26428  gl_cv_have_include_next=yes
26429else
26430  CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
26431        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26432/* end confdefs.h.  */
26433#include <conftest.h>
26434_ACEOF
26435if ac_fn_c_try_compile "$LINENO"; then :
26436  gl_cv_have_include_next=buggy
26437else
26438  gl_cv_have_include_next=no
26439fi
26440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26441
26442fi
26443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26444     CPPFLAGS="$gl_save_CPPFLAGS"
26445     rm -rf conftestd1a conftestd1b conftestd2
26446
26447fi
26448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
26449$as_echo "$gl_cv_have_include_next" >&6; }
26450  PRAGMA_SYSTEM_HEADER=
26451  if test $gl_cv_have_include_next = yes; then
26452    INCLUDE_NEXT=include_next
26453    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
26454    if test -n "$GCC"; then
26455      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
26456    fi
26457  else
26458    if test $gl_cv_have_include_next = buggy; then
26459      INCLUDE_NEXT=include
26460      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
26461    else
26462      INCLUDE_NEXT=include
26463      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
26464    fi
26465  fi
26466
26467
26468
26469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
26470$as_echo_n "checking whether system header files limit the line length... " >&6; }
26471if ${gl_cv_pragma_columns+:} false; then :
26472  $as_echo_n "(cached) " >&6
26473else
26474       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26475/* end confdefs.h.  */
26476
26477#ifdef __TANDEM
26478choke me
26479#endif
26480
26481_ACEOF
26482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26483  $EGREP "choke me" >/dev/null 2>&1; then :
26484  gl_cv_pragma_columns=yes
26485else
26486  gl_cv_pragma_columns=no
26487fi
26488rm -f conftest*
26489
26490
26491fi
26492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
26493$as_echo "$gl_cv_pragma_columns" >&6; }
26494  if test $gl_cv_pragma_columns = yes; then
26495    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
26496  else
26497    PRAGMA_COLUMNS=
26498  fi
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
26511$as_echo_n "checking if environ is properly declared... " >&6; }
26512if ${gt_cv_var_environ_declaration+:} false; then :
26513  $as_echo_n "(cached) " >&6
26514else
26515  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26516/* end confdefs.h.  */
26517#if HAVE_UNISTD_H
26518     #include <unistd.h>
26519     #endif
26520     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
26521     #include <stdlib.h>
26522
26523            extern struct { int foo; } environ;
26524int
26525main ()
26526{
26527environ.foo = 1;
26528  ;
26529  return 0;
26530}
26531_ACEOF
26532if ac_fn_c_try_compile "$LINENO"; then :
26533  gt_cv_var_environ_declaration=no
26534else
26535  gt_cv_var_environ_declaration=yes
26536fi
26537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26538fi
26539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
26540$as_echo "$gt_cv_var_environ_declaration" >&6; }
26541  if test $gt_cv_var_environ_declaration = yes; then
26542
26543$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
26544
26545  fi
26546
26547
26548  if test $gt_cv_var_environ_declaration != yes; then
26549    HAVE_DECL_ENVIRON=0
26550  fi
26551
26552
26553
26554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
26555$as_echo_n "checking for complete errno.h... " >&6; }
26556if ${gl_cv_header_errno_h_complete+:} false; then :
26557  $as_echo_n "(cached) " >&6
26558else
26559
26560    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26561/* end confdefs.h.  */
26562
26563#include <errno.h>
26564#if !defined ETXTBSY
26565booboo
26566#endif
26567#if !defined ENOMSG
26568booboo
26569#endif
26570#if !defined EIDRM
26571booboo
26572#endif
26573#if !defined ENOLINK
26574booboo
26575#endif
26576#if !defined EPROTO
26577booboo
26578#endif
26579#if !defined EMULTIHOP
26580booboo
26581#endif
26582#if !defined EBADMSG
26583booboo
26584#endif
26585#if !defined EOVERFLOW
26586booboo
26587#endif
26588#if !defined ENOTSUP
26589booboo
26590#endif
26591#if !defined ENETRESET
26592booboo
26593#endif
26594#if !defined ECONNABORTED
26595booboo
26596#endif
26597#if !defined ESTALE
26598booboo
26599#endif
26600#if !defined EDQUOT
26601booboo
26602#endif
26603#if !defined ECANCELED
26604booboo
26605#endif
26606#if !defined EOWNERDEAD
26607booboo
26608#endif
26609#if !defined ENOTRECOVERABLE
26610booboo
26611#endif
26612#if !defined EILSEQ
26613booboo
26614#endif
26615
26616_ACEOF
26617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26618  $EGREP "booboo" >/dev/null 2>&1; then :
26619  gl_cv_header_errno_h_complete=no
26620else
26621  gl_cv_header_errno_h_complete=yes
26622fi
26623rm -f conftest*
26624
26625
26626fi
26627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
26628$as_echo "$gl_cv_header_errno_h_complete" >&6; }
26629  if test $gl_cv_header_errno_h_complete = yes; then
26630    ERRNO_H=''
26631  else
26632
26633
26634
26635
26636
26637
26638
26639
26640     if test $gl_cv_have_include_next = yes; then
26641       gl_cv_next_errno_h='<'errno.h'>'
26642     else
26643       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
26644$as_echo_n "checking absolute name of <errno.h>... " >&6; }
26645if ${gl_cv_next_errno_h+:} false; then :
26646  $as_echo_n "(cached) " >&6
26647else
26648
26649
26650
26651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26652/* end confdefs.h.  */
26653#include <errno.h>
26654_ACEOF
26655                case "$host_os" in
26656    aix*) gl_absname_cpp="$ac_cpp -C" ;;
26657    *)    gl_absname_cpp="$ac_cpp" ;;
26658  esac
26659
26660  case "$host_os" in
26661    mingw*)
26662                                          gl_dirsep_regex='[/\\]'
26663      ;;
26664    *)
26665      gl_dirsep_regex='\/'
26666      ;;
26667  esac
26668      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26669  gl_header_literal_regex=`echo 'errno.h' \
26670                           | sed -e "$gl_make_literal_regex_sed"`
26671  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26672      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26673      s|^/[^/]|//&|
26674      p
26675      q
26676    }'
26677
26678        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26679  sed -n "$gl_absolute_header_sed"`
26680
26681           gl_header=$gl_cv_absolute_errno_h
26682           gl_cv_next_errno_h='"'$gl_header'"'
26683
26684
26685fi
26686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
26687$as_echo "$gl_cv_next_errno_h" >&6; }
26688     fi
26689     NEXT_ERRNO_H=$gl_cv_next_errno_h
26690
26691     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26692       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26693       gl_next_as_first_directive='<'errno.h'>'
26694     else
26695       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26696       gl_next_as_first_directive=$gl_cv_next_errno_h
26697     fi
26698     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
26699
26700
26701
26702
26703    ERRNO_H='errno.h'
26704  fi
26705
26706   if test -n "$ERRNO_H"; then
26707  GL_GENERATE_ERRNO_H_TRUE=
26708  GL_GENERATE_ERRNO_H_FALSE='#'
26709else
26710  GL_GENERATE_ERRNO_H_TRUE='#'
26711  GL_GENERATE_ERRNO_H_FALSE=
26712fi
26713
26714
26715  if test -n "$ERRNO_H"; then
26716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
26717$as_echo_n "checking for EMULTIHOP value... " >&6; }
26718if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
26719  $as_echo_n "(cached) " >&6
26720else
26721
26722      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26723/* end confdefs.h.  */
26724
26725#include <errno.h>
26726#ifdef EMULTIHOP
26727yes
26728#endif
26729
26730_ACEOF
26731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26732  $EGREP "yes" >/dev/null 2>&1; then :
26733  gl_cv_header_errno_h_EMULTIHOP=yes
26734else
26735  gl_cv_header_errno_h_EMULTIHOP=no
26736fi
26737rm -f conftest*
26738
26739      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
26740        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26741/* end confdefs.h.  */
26742
26743#define _XOPEN_SOURCE_EXTENDED 1
26744#include <errno.h>
26745#ifdef EMULTIHOP
26746yes
26747#endif
26748
26749_ACEOF
26750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26751  $EGREP "yes" >/dev/null 2>&1; then :
26752  gl_cv_header_errno_h_EMULTIHOP=hidden
26753fi
26754rm -f conftest*
26755
26756        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
26757                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
26758#define _XOPEN_SOURCE_EXTENDED 1
26759#include <errno.h>
26760/* The following two lines are a workaround against an autoconf-2.52 bug.  */
26761#include <stdio.h>
26762#include <stdlib.h>
26763"; then :
26764
26765fi
26766
26767        fi
26768      fi
26769
26770fi
26771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
26772$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
26773    case $gl_cv_header_errno_h_EMULTIHOP in
26774      yes | no)
26775        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
26776        ;;
26777      *)
26778        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
26779        ;;
26780    esac
26781
26782
26783  fi
26784
26785
26786  if test -n "$ERRNO_H"; then
26787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
26788$as_echo_n "checking for ENOLINK value... " >&6; }
26789if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
26790  $as_echo_n "(cached) " >&6
26791else
26792
26793      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26794/* end confdefs.h.  */
26795
26796#include <errno.h>
26797#ifdef ENOLINK
26798yes
26799#endif
26800
26801_ACEOF
26802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26803  $EGREP "yes" >/dev/null 2>&1; then :
26804  gl_cv_header_errno_h_ENOLINK=yes
26805else
26806  gl_cv_header_errno_h_ENOLINK=no
26807fi
26808rm -f conftest*
26809
26810      if test $gl_cv_header_errno_h_ENOLINK = no; then
26811        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26812/* end confdefs.h.  */
26813
26814#define _XOPEN_SOURCE_EXTENDED 1
26815#include <errno.h>
26816#ifdef ENOLINK
26817yes
26818#endif
26819
26820_ACEOF
26821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26822  $EGREP "yes" >/dev/null 2>&1; then :
26823  gl_cv_header_errno_h_ENOLINK=hidden
26824fi
26825rm -f conftest*
26826
26827        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
26828                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
26829#define _XOPEN_SOURCE_EXTENDED 1
26830#include <errno.h>
26831/* The following two lines are a workaround against an autoconf-2.52 bug.  */
26832#include <stdio.h>
26833#include <stdlib.h>
26834"; then :
26835
26836fi
26837
26838        fi
26839      fi
26840
26841fi
26842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
26843$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
26844    case $gl_cv_header_errno_h_ENOLINK in
26845      yes | no)
26846        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
26847        ;;
26848      *)
26849        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
26850        ;;
26851    esac
26852
26853
26854  fi
26855
26856
26857  if test -n "$ERRNO_H"; then
26858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
26859$as_echo_n "checking for EOVERFLOW value... " >&6; }
26860if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
26861  $as_echo_n "(cached) " >&6
26862else
26863
26864      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26865/* end confdefs.h.  */
26866
26867#include <errno.h>
26868#ifdef EOVERFLOW
26869yes
26870#endif
26871
26872_ACEOF
26873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26874  $EGREP "yes" >/dev/null 2>&1; then :
26875  gl_cv_header_errno_h_EOVERFLOW=yes
26876else
26877  gl_cv_header_errno_h_EOVERFLOW=no
26878fi
26879rm -f conftest*
26880
26881      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
26882        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26883/* end confdefs.h.  */
26884
26885#define _XOPEN_SOURCE_EXTENDED 1
26886#include <errno.h>
26887#ifdef EOVERFLOW
26888yes
26889#endif
26890
26891_ACEOF
26892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26893  $EGREP "yes" >/dev/null 2>&1; then :
26894  gl_cv_header_errno_h_EOVERFLOW=hidden
26895fi
26896rm -f conftest*
26897
26898        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
26899                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
26900#define _XOPEN_SOURCE_EXTENDED 1
26901#include <errno.h>
26902/* The following two lines are a workaround against an autoconf-2.52 bug.  */
26903#include <stdio.h>
26904#include <stdlib.h>
26905"; then :
26906
26907fi
26908
26909        fi
26910      fi
26911
26912fi
26913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
26914$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
26915    case $gl_cv_header_errno_h_EOVERFLOW in
26916      yes | no)
26917        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
26918        ;;
26919      *)
26920        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
26921        ;;
26922    esac
26923
26924
26925  fi
26926
26927
26928ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
26929if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
26930  ac_have_decl=1
26931else
26932  ac_have_decl=0
26933fi
26934
26935cat >>confdefs.h <<_ACEOF
26936#define HAVE_DECL_STRERROR_R $ac_have_decl
26937_ACEOF
26938
26939for ac_func in strerror_r
26940do :
26941  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
26942if test "x$ac_cv_func_strerror_r" = xyes; then :
26943  cat >>confdefs.h <<_ACEOF
26944#define HAVE_STRERROR_R 1
26945_ACEOF
26946
26947fi
26948done
26949
26950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
26951$as_echo_n "checking whether strerror_r returns char *... " >&6; }
26952if ${ac_cv_func_strerror_r_char_p+:} false; then :
26953  $as_echo_n "(cached) " >&6
26954else
26955
26956    ac_cv_func_strerror_r_char_p=no
26957    if test $ac_cv_have_decl_strerror_r = yes; then
26958      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26959/* end confdefs.h.  */
26960$ac_includes_default
26961int
26962main ()
26963{
26964
26965	  char buf[100];
26966	  char x = *strerror_r (0, buf, sizeof buf);
26967	  char *p = strerror_r (0, buf, sizeof buf);
26968	  return !p || x;
26969
26970  ;
26971  return 0;
26972}
26973_ACEOF
26974if ac_fn_c_try_compile "$LINENO"; then :
26975  ac_cv_func_strerror_r_char_p=yes
26976fi
26977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26978    else
26979      # strerror_r is not declared.  Choose between
26980      # systems that have relatively inaccessible declarations for the
26981      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
26982      # former has a strerror_r that returns char*, while the latter
26983      # has a strerror_r that returns `int'.
26984      # This test should segfault on the DEC system.
26985      if test "$cross_compiling" = yes; then :
26986  :
26987else
26988  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26989/* end confdefs.h.  */
26990$ac_includes_default
26991	extern char *strerror_r ();
26992int
26993main ()
26994{
26995char buf[100];
26996	  char x = *strerror_r (0, buf, sizeof buf);
26997	  return ! isalpha (x);
26998  ;
26999  return 0;
27000}
27001_ACEOF
27002if ac_fn_c_try_run "$LINENO"; then :
27003  ac_cv_func_strerror_r_char_p=yes
27004fi
27005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27006  conftest.$ac_objext conftest.beam conftest.$ac_ext
27007fi
27008
27009    fi
27010
27011fi
27012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
27013$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
27014if test $ac_cv_func_strerror_r_char_p = yes; then
27015
27016$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
27017
27018fi
27019
27020
27021  XGETTEXT_EXTRA_OPTIONS=
27022
27023ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
27024if test "x$ac_cv_type_mode_t" = xyes; then :
27025
27026else
27027
27028cat >>confdefs.h <<_ACEOF
27029#define mode_t int
27030_ACEOF
27031
27032fi
27033
27034
27035  GNULIB_EXPLICIT_BZERO=0;
27036  GNULIB_FFSL=0;
27037  GNULIB_FFSLL=0;
27038  GNULIB_MEMCHR=0;
27039  GNULIB_MEMMEM=0;
27040  GNULIB_MEMPCPY=0;
27041  GNULIB_MEMRCHR=0;
27042  GNULIB_RAWMEMCHR=0;
27043  GNULIB_STPCPY=0;
27044  GNULIB_STPNCPY=0;
27045  GNULIB_STRCHRNUL=0;
27046  GNULIB_STRDUP=0;
27047  GNULIB_STRNCAT=0;
27048  GNULIB_STRNDUP=0;
27049  GNULIB_STRNLEN=0;
27050  GNULIB_STRPBRK=0;
27051  GNULIB_STRSEP=0;
27052  GNULIB_STRSTR=0;
27053  GNULIB_STRCASESTR=0;
27054  GNULIB_STRTOK_R=0;
27055  GNULIB_MBSLEN=0;
27056  GNULIB_MBSNLEN=0;
27057  GNULIB_MBSCHR=0;
27058  GNULIB_MBSRCHR=0;
27059  GNULIB_MBSSTR=0;
27060  GNULIB_MBSCASECMP=0;
27061  GNULIB_MBSNCASECMP=0;
27062  GNULIB_MBSPCASECMP=0;
27063  GNULIB_MBSCASESTR=0;
27064  GNULIB_MBSCSPN=0;
27065  GNULIB_MBSPBRK=0;
27066  GNULIB_MBSSPN=0;
27067  GNULIB_MBSSEP=0;
27068  GNULIB_MBSTOK_R=0;
27069  GNULIB_STRERROR=0;
27070  GNULIB_STRERROR_R=0;
27071  GNULIB_STRSIGNAL=0;
27072  GNULIB_STRVERSCMP=0;
27073  HAVE_MBSLEN=0;
27074    HAVE_EXPLICIT_BZERO=1;
27075  HAVE_FFSL=1;
27076  HAVE_FFSLL=1;
27077  HAVE_DECL_MEMMEM=1;
27078  HAVE_MEMPCPY=1;
27079  HAVE_DECL_MEMRCHR=1;
27080  HAVE_RAWMEMCHR=1;
27081  HAVE_STPCPY=1;
27082  HAVE_STPNCPY=1;
27083  HAVE_STRCHRNUL=1;
27084  HAVE_DECL_STRDUP=1;
27085  HAVE_DECL_STRNDUP=1;
27086  HAVE_DECL_STRNLEN=1;
27087  HAVE_STRPBRK=1;
27088  HAVE_STRSEP=1;
27089  HAVE_STRCASESTR=1;
27090  HAVE_DECL_STRTOK_R=1;
27091  HAVE_DECL_STRERROR_R=1;
27092  HAVE_DECL_STRSIGNAL=1;
27093  HAVE_STRVERSCMP=1;
27094  REPLACE_MEMCHR=0;
27095  REPLACE_MEMMEM=0;
27096  REPLACE_STPNCPY=0;
27097  REPLACE_STRCHRNUL=0;
27098  REPLACE_STRDUP=0;
27099  REPLACE_STRNCAT=0;
27100  REPLACE_STRNDUP=0;
27101  REPLACE_STRNLEN=0;
27102  REPLACE_STRSTR=0;
27103  REPLACE_STRCASESTR=0;
27104  REPLACE_STRTOK_R=0;
27105  REPLACE_STRERROR=0;
27106  REPLACE_STRERROR_R=0;
27107  REPLACE_STRSIGNAL=0;
27108  UNDEFINE_STRTOK_R=0;
27109
27110
27111
27112
27113
27114
27115  ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
27116"
27117if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
27118
27119cat >>confdefs.h <<_ACEOF
27120#define HAVE_SIG_ATOMIC_T 1
27121_ACEOF
27122
27123
27124else
27125
27126$as_echo "#define sig_atomic_t int" >>confdefs.h
27127
27128fi
27129
27130
27131
27132  GNULIB_CREAT=0;
27133  GNULIB_FCNTL=0;
27134  GNULIB_NONBLOCKING=0;
27135  GNULIB_OPEN=0;
27136  GNULIB_OPENAT=0;
27137    HAVE_FCNTL=1;
27138  HAVE_OPENAT=1;
27139  REPLACE_CREAT=0;
27140  REPLACE_FCNTL=0;
27141  REPLACE_OPEN=0;
27142  REPLACE_OPENAT=0;
27143
27144
27145
27146ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
27147if test "x$ac_cv_type_pid_t" = xyes; then :
27148
27149else
27150
27151cat >>confdefs.h <<_ACEOF
27152#define pid_t int
27153_ACEOF
27154
27155fi
27156
27157
27158  GNULIB_DPRINTF=0;
27159  GNULIB_FCLOSE=0;
27160  GNULIB_FDOPEN=0;
27161  GNULIB_FFLUSH=0;
27162  GNULIB_FGETC=0;
27163  GNULIB_FGETS=0;
27164  GNULIB_FOPEN=0;
27165  GNULIB_FPRINTF=0;
27166  GNULIB_FPRINTF_POSIX=0;
27167  GNULIB_FPURGE=0;
27168  GNULIB_FPUTC=0;
27169  GNULIB_FPUTS=0;
27170  GNULIB_FREAD=0;
27171  GNULIB_FREOPEN=0;
27172  GNULIB_FSCANF=0;
27173  GNULIB_FSEEK=0;
27174  GNULIB_FSEEKO=0;
27175  GNULIB_FTELL=0;
27176  GNULIB_FTELLO=0;
27177  GNULIB_FWRITE=0;
27178  GNULIB_GETC=0;
27179  GNULIB_GETCHAR=0;
27180  GNULIB_GETDELIM=0;
27181  GNULIB_GETLINE=0;
27182  GNULIB_OBSTACK_PRINTF=0;
27183  GNULIB_OBSTACK_PRINTF_POSIX=0;
27184  GNULIB_PCLOSE=0;
27185  GNULIB_PERROR=0;
27186  GNULIB_POPEN=0;
27187  GNULIB_PRINTF=0;
27188  GNULIB_PRINTF_POSIX=0;
27189  GNULIB_PUTC=0;
27190  GNULIB_PUTCHAR=0;
27191  GNULIB_PUTS=0;
27192  GNULIB_REMOVE=0;
27193  GNULIB_RENAME=0;
27194  GNULIB_RENAMEAT=0;
27195  GNULIB_SCANF=0;
27196  GNULIB_SNPRINTF=0;
27197  GNULIB_SPRINTF_POSIX=0;
27198  GNULIB_STDIO_H_NONBLOCKING=0;
27199  GNULIB_STDIO_H_SIGPIPE=0;
27200  GNULIB_TMPFILE=0;
27201  GNULIB_VASPRINTF=0;
27202  GNULIB_VFSCANF=0;
27203  GNULIB_VSCANF=0;
27204  GNULIB_VDPRINTF=0;
27205  GNULIB_VFPRINTF=0;
27206  GNULIB_VFPRINTF_POSIX=0;
27207  GNULIB_VPRINTF=0;
27208  GNULIB_VPRINTF_POSIX=0;
27209  GNULIB_VSNPRINTF=0;
27210  GNULIB_VSPRINTF_POSIX=0;
27211    HAVE_DECL_FPURGE=1;
27212  HAVE_DECL_FSEEKO=1;
27213  HAVE_DECL_FTELLO=1;
27214  HAVE_DECL_GETDELIM=1;
27215  HAVE_DECL_GETLINE=1;
27216  HAVE_DECL_OBSTACK_PRINTF=1;
27217  HAVE_DECL_SNPRINTF=1;
27218  HAVE_DECL_VSNPRINTF=1;
27219  HAVE_DPRINTF=1;
27220  HAVE_FSEEKO=1;
27221  HAVE_FTELLO=1;
27222  HAVE_PCLOSE=1;
27223  HAVE_POPEN=1;
27224  HAVE_RENAMEAT=1;
27225  HAVE_VASPRINTF=1;
27226  HAVE_VDPRINTF=1;
27227  REPLACE_DPRINTF=0;
27228  REPLACE_FCLOSE=0;
27229  REPLACE_FDOPEN=0;
27230  REPLACE_FFLUSH=0;
27231  REPLACE_FOPEN=0;
27232  REPLACE_FPRINTF=0;
27233  REPLACE_FPURGE=0;
27234  REPLACE_FREOPEN=0;
27235  REPLACE_FSEEK=0;
27236  REPLACE_FSEEKO=0;
27237  REPLACE_FTELL=0;
27238  REPLACE_FTELLO=0;
27239  REPLACE_GETDELIM=0;
27240  REPLACE_GETLINE=0;
27241  REPLACE_OBSTACK_PRINTF=0;
27242  REPLACE_PERROR=0;
27243  REPLACE_POPEN=0;
27244  REPLACE_PRINTF=0;
27245  REPLACE_REMOVE=0;
27246  REPLACE_RENAME=0;
27247  REPLACE_RENAMEAT=0;
27248  REPLACE_SNPRINTF=0;
27249  REPLACE_SPRINTF=0;
27250  REPLACE_STDIO_READ_FUNCS=0;
27251  REPLACE_STDIO_WRITE_FUNCS=0;
27252  REPLACE_TMPFILE=0;
27253  REPLACE_VASPRINTF=0;
27254  REPLACE_VDPRINTF=0;
27255  REPLACE_VFPRINTF=0;
27256  REPLACE_VPRINTF=0;
27257  REPLACE_VSNPRINTF=0;
27258  REPLACE_VSPRINTF=0;
27259
27260
27261  ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
27262if test "x$ac_cv_func_eaccess" = xyes; then :
27263
27264else
27265
27266$as_echo "#define eaccess access" >>confdefs.h
27267
27268fi
27269
27270
27271
27272  GNULIB_FNMATCH=0;
27273    HAVE_FNMATCH=1;
27274  REPLACE_FNMATCH=0;
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291     if test $gl_cv_have_include_next = yes; then
27292       gl_cv_next_fnmatch_h='<'fnmatch.h'>'
27293     else
27294       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
27295$as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
27296if ${gl_cv_next_fnmatch_h+:} false; then :
27297  $as_echo_n "(cached) " >&6
27298else
27299
27300             if test $ac_cv_header_fnmatch_h = yes; then
27301
27302
27303
27304
27305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27306/* end confdefs.h.  */
27307#include <fnmatch.h>
27308_ACEOF
27309                case "$host_os" in
27310    aix*) gl_absname_cpp="$ac_cpp -C" ;;
27311    *)    gl_absname_cpp="$ac_cpp" ;;
27312  esac
27313
27314  case "$host_os" in
27315    mingw*)
27316                                          gl_dirsep_regex='[/\\]'
27317      ;;
27318    *)
27319      gl_dirsep_regex='\/'
27320      ;;
27321  esac
27322      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27323  gl_header_literal_regex=`echo 'fnmatch.h' \
27324                           | sed -e "$gl_make_literal_regex_sed"`
27325  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27326      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27327      s|^/[^/]|//&|
27328      p
27329      q
27330    }'
27331
27332        gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27333  sed -n "$gl_absolute_header_sed"`
27334
27335           gl_header=$gl_cv_absolute_fnmatch_h
27336           gl_cv_next_fnmatch_h='"'$gl_header'"'
27337          else
27338               gl_cv_next_fnmatch_h='<'fnmatch.h'>'
27339             fi
27340
27341
27342fi
27343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
27344$as_echo "$gl_cv_next_fnmatch_h" >&6; }
27345     fi
27346     NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
27347
27348     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27349       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27350       gl_next_as_first_directive='<'fnmatch.h'>'
27351     else
27352       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27353       gl_next_as_first_directive=$gl_cv_next_fnmatch_h
27354     fi
27355     NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
27356
27357
27358
27359
27360
27361
27362
27363  if test $ac_cv_header_fnmatch_h = yes; then
27364    HAVE_FNMATCH_H=1
27365  else
27366    HAVE_FNMATCH_H=0
27367  fi
27368
27369
27370  FNMATCH_H=''
27371     if test "$CXX" != no; then
27372              FNMATCH_H=fnmatch.h
27373     else
27374       if test $ac_cv_header_fnmatch_h != yes; then
27375                  FNMATCH_H=fnmatch.h
27376       fi
27377     fi
27378
27379
27380   if test -n "$FNMATCH_H"; then
27381  GL_GENERATE_FNMATCH_H_TRUE=
27382  GL_GENERATE_FNMATCH_H_FALSE='#'
27383else
27384  GL_GENERATE_FNMATCH_H_TRUE='#'
27385  GL_GENERATE_FNMATCH_H_FALSE=
27386fi
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
27398$as_echo_n "checking for mbstate_t... " >&6; }
27399if ${ac_cv_type_mbstate_t+:} false; then :
27400  $as_echo_n "(cached) " >&6
27401else
27402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27403/* end confdefs.h.  */
27404$ac_includes_default
27405/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27406   <wchar.h>.
27407   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27408   included before <wchar.h>.  */
27409#include <stddef.h>
27410#include <stdio.h>
27411#include <time.h>
27412#include <wchar.h>
27413int
27414main ()
27415{
27416mbstate_t x; return sizeof x;
27417  ;
27418  return 0;
27419}
27420_ACEOF
27421if ac_fn_c_try_compile "$LINENO"; then :
27422  ac_cv_type_mbstate_t=yes
27423else
27424  ac_cv_type_mbstate_t=no
27425fi
27426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27427fi
27428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
27429$as_echo "$ac_cv_type_mbstate_t" >&6; }
27430   if test $ac_cv_type_mbstate_t = yes; then
27431
27432$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
27433
27434   else
27435
27436$as_echo "#define mbstate_t int" >>confdefs.h
27437
27438   fi
27439
27440
27441
27442
27443     GNULIB_FCHMODAT=0;
27444  GNULIB_FSTAT=0;
27445  GNULIB_FSTATAT=0;
27446  GNULIB_FUTIMENS=0;
27447  GNULIB_GETUMASK=0;
27448  GNULIB_LCHMOD=0;
27449  GNULIB_LSTAT=0;
27450  GNULIB_MKDIRAT=0;
27451  GNULIB_MKFIFO=0;
27452  GNULIB_MKFIFOAT=0;
27453  GNULIB_MKNOD=0;
27454  GNULIB_MKNODAT=0;
27455  GNULIB_STAT=0;
27456  GNULIB_UTIMENSAT=0;
27457  GNULIB_OVERRIDES_STRUCT_STAT=0;
27458    HAVE_FCHMODAT=1;
27459  HAVE_FSTATAT=1;
27460  HAVE_FUTIMENS=1;
27461  HAVE_GETUMASK=1;
27462  HAVE_LCHMOD=1;
27463  HAVE_LSTAT=1;
27464  HAVE_MKDIRAT=1;
27465  HAVE_MKFIFO=1;
27466  HAVE_MKFIFOAT=1;
27467  HAVE_MKNOD=1;
27468  HAVE_MKNODAT=1;
27469  HAVE_UTIMENSAT=1;
27470  REPLACE_FCHMODAT=0;
27471  REPLACE_FSTAT=0;
27472  REPLACE_FSTATAT=0;
27473  REPLACE_FUTIMENS=0;
27474  REPLACE_LSTAT=0;
27475  REPLACE_MKDIR=0;
27476  REPLACE_MKFIFO=0;
27477  REPLACE_MKNOD=0;
27478  REPLACE_STAT=0;
27479  REPLACE_UTIMENSAT=0;
27480
27481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
27482$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
27483if ${ac_cv_header_stat_broken+:} false; then :
27484  $as_echo_n "(cached) " >&6
27485else
27486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27487/* end confdefs.h.  */
27488#include <sys/types.h>
27489#include <sys/stat.h>
27490
27491#if defined S_ISBLK && defined S_IFDIR
27492extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
27493#endif
27494
27495#if defined S_ISBLK && defined S_IFCHR
27496extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
27497#endif
27498
27499#if defined S_ISLNK && defined S_IFREG
27500extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
27501#endif
27502
27503#if defined S_ISSOCK && defined S_IFREG
27504extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
27505#endif
27506
27507_ACEOF
27508if ac_fn_c_try_compile "$LINENO"; then :
27509  ac_cv_header_stat_broken=no
27510else
27511  ac_cv_header_stat_broken=yes
27512fi
27513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27514fi
27515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
27516$as_echo "$ac_cv_header_stat_broken" >&6; }
27517if test $ac_cv_header_stat_broken = yes; then
27518
27519$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
27520
27521fi
27522
27523
27524
27525
27526
27527  case "$host_os" in
27528    mingw*)
27529                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
27530$as_echo_n "checking for 64-bit off_t... " >&6; }
27531if ${gl_cv_type_off_t_64+:} false; then :
27532  $as_echo_n "(cached) " >&6
27533else
27534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27535/* end confdefs.h.  */
27536#include <sys/types.h>
27537                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
27538
27539int
27540main ()
27541{
27542
27543  ;
27544  return 0;
27545}
27546_ACEOF
27547if ac_fn_c_try_compile "$LINENO"; then :
27548  gl_cv_type_off_t_64=yes
27549else
27550  gl_cv_type_off_t_64=no
27551fi
27552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27553
27554fi
27555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
27556$as_echo "$gl_cv_type_off_t_64" >&6; }
27557      if test $gl_cv_type_off_t_64 = no; then
27558        WINDOWS_64_BIT_OFF_T=1
27559      else
27560        WINDOWS_64_BIT_OFF_T=0
27561      fi
27562                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
27563$as_echo_n "checking for 64-bit st_size... " >&6; }
27564if ${gl_cv_member_st_size_64+:} false; then :
27565  $as_echo_n "(cached) " >&6
27566else
27567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27568/* end confdefs.h.  */
27569#include <sys/types.h>
27570                struct stat buf;
27571                int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
27572
27573int
27574main ()
27575{
27576
27577  ;
27578  return 0;
27579}
27580_ACEOF
27581if ac_fn_c_try_compile "$LINENO"; then :
27582  gl_cv_member_st_size_64=yes
27583else
27584  gl_cv_member_st_size_64=no
27585fi
27586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27587
27588fi
27589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
27590$as_echo "$gl_cv_member_st_size_64" >&6; }
27591      if test $gl_cv_member_st_size_64 = no; then
27592        WINDOWS_64_BIT_ST_SIZE=1
27593      else
27594        WINDOWS_64_BIT_ST_SIZE=0
27595      fi
27596      ;;
27597    *)
27598                                                      WINDOWS_64_BIT_OFF_T=0
27599      WINDOWS_64_BIT_ST_SIZE=0
27600      ;;
27601  esac
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617     if test $gl_cv_have_include_next = yes; then
27618       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27619     else
27620       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27621$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
27622if ${gl_cv_next_sys_stat_h+:} false; then :
27623  $as_echo_n "(cached) " >&6
27624else
27625
27626             if test $ac_cv_header_sys_stat_h = yes; then
27627
27628
27629
27630
27631  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27632/* end confdefs.h.  */
27633#include <sys/stat.h>
27634_ACEOF
27635                case "$host_os" in
27636    aix*) gl_absname_cpp="$ac_cpp -C" ;;
27637    *)    gl_absname_cpp="$ac_cpp" ;;
27638  esac
27639
27640  case "$host_os" in
27641    mingw*)
27642                                          gl_dirsep_regex='[/\\]'
27643      ;;
27644    *)
27645      gl_dirsep_regex='\/'
27646      ;;
27647  esac
27648      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27649  gl_header_literal_regex=`echo 'sys/stat.h' \
27650                           | sed -e "$gl_make_literal_regex_sed"`
27651  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27652      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27653      s|^/[^/]|//&|
27654      p
27655      q
27656    }'
27657
27658        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27659  sed -n "$gl_absolute_header_sed"`
27660
27661           gl_header=$gl_cv_absolute_sys_stat_h
27662           gl_cv_next_sys_stat_h='"'$gl_header'"'
27663          else
27664               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27665             fi
27666
27667
27668fi
27669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
27670$as_echo "$gl_cv_next_sys_stat_h" >&6; }
27671     fi
27672     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
27673
27674     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27675       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27676       gl_next_as_first_directive='<'sys/stat.h'>'
27677     else
27678       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27679       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27680     fi
27681     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
27682
27683
27684
27685
27686
27687
27688
27689
27690    WINDOWS_STAT_TIMESPEC=0
27691
27692
27693
27694
27695
27696
27697
27698
27699      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27700     #include <sys/stat.h>
27701"
27702if test "x$ac_cv_type_nlink_t" = xyes; then :
27703
27704else
27705
27706$as_echo "#define nlink_t int" >>confdefs.h
27707
27708fi
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
27719$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
27720if ${gl_cv_var_stdin_large_offset+:} false; then :
27721  $as_echo_n "(cached) " >&6
27722else
27723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27724/* end confdefs.h.  */
27725#include <stdio.h>
27726int
27727main ()
27728{
27729#if defined __SL64 && defined __SCLE /* cygwin */
27730  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
27731     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
27732     it is easier to do a version check than building a runtime test.  */
27733# include <cygwin/version.h>
27734# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
27735  choke me
27736# endif
27737#endif
27738  ;
27739  return 0;
27740}
27741_ACEOF
27742if ac_fn_c_try_link "$LINENO"; then :
27743  gl_cv_var_stdin_large_offset=yes
27744else
27745  gl_cv_var_stdin_large_offset=no
27746fi
27747rm -f core conftest.err conftest.$ac_objext \
27748    conftest$ac_exeext conftest.$ac_ext
27749fi
27750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
27751$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763$as_echo "#define _USE_STD_STAT 1" >>confdefs.h
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775     if test $gl_cv_have_include_next = yes; then
27776       gl_cv_next_sys_types_h='<'sys/types.h'>'
27777     else
27778       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
27779$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
27780if ${gl_cv_next_sys_types_h+:} false; then :
27781  $as_echo_n "(cached) " >&6
27782else
27783
27784
27785
27786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27787/* end confdefs.h.  */
27788#include <sys/types.h>
27789_ACEOF
27790                case "$host_os" in
27791    aix*) gl_absname_cpp="$ac_cpp -C" ;;
27792    *)    gl_absname_cpp="$ac_cpp" ;;
27793  esac
27794
27795  case "$host_os" in
27796    mingw*)
27797                                          gl_dirsep_regex='[/\\]'
27798      ;;
27799    *)
27800      gl_dirsep_regex='\/'
27801      ;;
27802  esac
27803      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27804  gl_header_literal_regex=`echo 'sys/types.h' \
27805                           | sed -e "$gl_make_literal_regex_sed"`
27806  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27807      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27808      s|^/[^/]|//&|
27809      p
27810      q
27811    }'
27812
27813        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27814  sed -n "$gl_absolute_header_sed"`
27815
27816           gl_header=$gl_cv_absolute_sys_types_h
27817           gl_cv_next_sys_types_h='"'$gl_header'"'
27818
27819
27820fi
27821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
27822$as_echo "$gl_cv_next_sys_types_h" >&6; }
27823     fi
27824     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
27825
27826     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27827       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27828       gl_next_as_first_directive='<'sys/types.h'>'
27829     else
27830       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27831       gl_next_as_first_directive=$gl_cv_next_sys_types_h
27832     fi
27833     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846    WINDOWS_STAT_INODES=0
27847
27848
27849
27850ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
27851if test "x$ac_cv_have_decl_ftello" = xyes; then :
27852  ac_have_decl=1
27853else
27854  ac_have_decl=0
27855fi
27856
27857cat >>confdefs.h <<_ACEOF
27858#define HAVE_DECL_FTELLO $ac_have_decl
27859_ACEOF
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870  if test $ac_cv_have_decl_ftello = no; then
27871    HAVE_DECL_FTELLO=0
27872  fi
27873
27874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
27875$as_echo_n "checking for ftello... " >&6; }
27876if ${gl_cv_func_ftello+:} false; then :
27877  $as_echo_n "(cached) " >&6
27878else
27879
27880      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27881/* end confdefs.h.  */
27882#include <stdio.h>
27883int
27884main ()
27885{
27886ftello (stdin);
27887  ;
27888  return 0;
27889}
27890_ACEOF
27891if ac_fn_c_try_link "$LINENO"; then :
27892  gl_cv_func_ftello=yes
27893else
27894  gl_cv_func_ftello=no
27895fi
27896rm -f core conftest.err conftest.$ac_objext \
27897    conftest$ac_exeext conftest.$ac_ext
27898
27899fi
27900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
27901$as_echo "$gl_cv_func_ftello" >&6; }
27902  if test $gl_cv_func_ftello = no; then
27903    HAVE_FTELLO=0
27904  else
27905    if test $WINDOWS_64_BIT_OFF_T = 1; then
27906      REPLACE_FTELLO=1
27907    fi
27908    if test $gl_cv_var_stdin_large_offset = no; then
27909      REPLACE_FTELLO=1
27910    fi
27911    if test $REPLACE_FTELLO = 0; then
27912
27913      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
27914$as_echo_n "checking whether ftello works... " >&6; }
27915if ${gl_cv_func_ftello_works+:} false; then :
27916  $as_echo_n "(cached) " >&6
27917else
27918
27919                              case "$host_os" in
27920                      # Guess no on Solaris.
27921            solaris*) gl_cv_func_ftello_works="guessing no" ;;
27922                      # Guess yes on native Windows.
27923            mingw*)   gl_cv_func_ftello_works="guessing yes" ;;
27924                      # Guess yes otherwise.
27925            *)        gl_cv_func_ftello_works="guessing yes" ;;
27926          esac
27927          if test "$cross_compiling" = yes; then :
27928  :
27929else
27930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27931/* end confdefs.h.  */
27932
27933#include <stdio.h>
27934#include <stdlib.h>
27935#include <string.h>
27936#define TESTFILE "conftest.tmp"
27937int
27938main (void)
27939{
27940  FILE *fp;
27941
27942  /* Create a file with some contents.  */
27943  fp = fopen (TESTFILE, "w");
27944  if (fp == NULL)
27945    return 70;
27946  if (fwrite ("foogarsh", 1, 8, fp) < 8)
27947    { fclose (fp); return 71; }
27948  if (fclose (fp))
27949    return 72;
27950
27951  /* The file's contents is now "foogarsh".  */
27952
27953  /* Try writing after reading to EOF.  */
27954  fp = fopen (TESTFILE, "r+");
27955  if (fp == NULL)
27956    return 73;
27957  if (fseek (fp, -1, SEEK_END))
27958    { fclose (fp); return 74; }
27959  if (!(getc (fp) == 'h'))
27960    { fclose (fp); return 1; }
27961  if (!(getc (fp) == EOF))
27962    { fclose (fp); return 2; }
27963  if (!(ftell (fp) == 8))
27964    { fclose (fp); return 3; }
27965  if (!(ftell (fp) == 8))
27966    { fclose (fp); return 4; }
27967  if (!(putc ('!', fp) == '!'))
27968    { fclose (fp); return 5; }
27969  if (!(ftell (fp) == 9))
27970    { fclose (fp); return 6; }
27971  if (!(fclose (fp) == 0))
27972    return 7;
27973  fp = fopen (TESTFILE, "r");
27974  if (fp == NULL)
27975    return 75;
27976  {
27977    char buf[10];
27978    if (!(fread (buf, 1, 10, fp) == 9))
27979      { fclose (fp); return 10; }
27980    if (!(memcmp (buf, "foogarsh!", 9) == 0))
27981      { fclose (fp); return 11; }
27982  }
27983  if (!(fclose (fp) == 0))
27984    return 12;
27985
27986  /* The file's contents is now "foogarsh!".  */
27987
27988  return 0;
27989}
27990_ACEOF
27991if ac_fn_c_try_run "$LINENO"; then :
27992  gl_cv_func_ftello_works=yes
27993else
27994  gl_cv_func_ftello_works=no
27995fi
27996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27997  conftest.$ac_objext conftest.beam conftest.$ac_ext
27998fi
27999
28000
28001fi
28002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
28003$as_echo "$gl_cv_func_ftello_works" >&6; }
28004      case "$gl_cv_func_ftello_works" in
28005        *yes) ;;
28006        *)
28007          REPLACE_FTELLO=1
28008
28009$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
28010
28011          ;;
28012      esac
28013    fi
28014  fi
28015
28016ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
28017if test "x$ac_cv_have_decl_getdelim" = xyes; then :
28018  ac_have_decl=1
28019else
28020  ac_have_decl=0
28021fi
28022
28023cat >>confdefs.h <<_ACEOF
28024#define HAVE_DECL_GETDELIM $ac_have_decl
28025_ACEOF
28026
28027
28028
28029
28030
28031ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
28032if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
28033  ac_have_decl=1
28034else
28035  ac_have_decl=0
28036fi
28037
28038cat >>confdefs.h <<_ACEOF
28039#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
28040_ACEOF
28041
28042ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
28043if test "x$ac_cv_have_decl_getline" = xyes; then :
28044  ac_have_decl=1
28045else
28046  ac_have_decl=0
28047fi
28048
28049cat >>confdefs.h <<_ACEOF
28050#define HAVE_DECL_GETLINE $ac_have_decl
28051_ACEOF
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068     if test $gl_cv_have_include_next = yes; then
28069       gl_cv_next_getopt_h='<'getopt.h'>'
28070     else
28071       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
28072$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
28073if ${gl_cv_next_getopt_h+:} false; then :
28074  $as_echo_n "(cached) " >&6
28075else
28076
28077             if test $ac_cv_header_getopt_h = yes; then
28078
28079
28080
28081
28082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28083/* end confdefs.h.  */
28084#include <getopt.h>
28085_ACEOF
28086                case "$host_os" in
28087    aix*) gl_absname_cpp="$ac_cpp -C" ;;
28088    *)    gl_absname_cpp="$ac_cpp" ;;
28089  esac
28090
28091  case "$host_os" in
28092    mingw*)
28093                                          gl_dirsep_regex='[/\\]'
28094      ;;
28095    *)
28096      gl_dirsep_regex='\/'
28097      ;;
28098  esac
28099      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28100  gl_header_literal_regex=`echo 'getopt.h' \
28101                           | sed -e "$gl_make_literal_regex_sed"`
28102  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28103      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28104      s|^/[^/]|//&|
28105      p
28106      q
28107    }'
28108
28109        gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28110  sed -n "$gl_absolute_header_sed"`
28111
28112           gl_header=$gl_cv_absolute_getopt_h
28113           gl_cv_next_getopt_h='"'$gl_header'"'
28114          else
28115               gl_cv_next_getopt_h='<'getopt.h'>'
28116             fi
28117
28118
28119fi
28120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
28121$as_echo "$gl_cv_next_getopt_h" >&6; }
28122     fi
28123     NEXT_GETOPT_H=$gl_cv_next_getopt_h
28124
28125     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28126       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28127       gl_next_as_first_directive='<'getopt.h'>'
28128     else
28129       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28130       gl_next_as_first_directive=$gl_cv_next_getopt_h
28131     fi
28132     NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
28133
28134
28135
28136
28137  if test $ac_cv_header_getopt_h = yes; then
28138    HAVE_GETOPT_H=1
28139  else
28140    HAVE_GETOPT_H=0
28141  fi
28142
28143
28144  gl_replace_getopt=
28145
28146    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
28147    for ac_header in getopt.h
28148do :
28149  ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
28150if test "x$ac_cv_header_getopt_h" = xyes; then :
28151  cat >>confdefs.h <<_ACEOF
28152#define HAVE_GETOPT_H 1
28153_ACEOF
28154
28155else
28156  gl_replace_getopt=yes
28157fi
28158
28159done
28160
28161  fi
28162
28163    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
28164    for ac_func in getopt_long_only
28165do :
28166  ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
28167if test "x$ac_cv_func_getopt_long_only" = xyes; then :
28168  cat >>confdefs.h <<_ACEOF
28169#define HAVE_GETOPT_LONG_ONLY 1
28170_ACEOF
28171
28172else
28173  gl_replace_getopt=yes
28174fi
28175done
28176
28177  fi
28178
28179          if test -z "$gl_replace_getopt"; then
28180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
28181$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
28182if ${gl_cv_func_getopt_posix+:} false; then :
28183  $as_echo_n "(cached) " >&6
28184else
28185
28186                                                if test $cross_compiling = no; then
28187                              if test "$cross_compiling" = yes; then :
28188  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28189$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28190as_fn_error $? "cannot run test program while cross compiling
28191See \`config.log' for more details" "$LINENO" 5; }
28192else
28193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28194/* end confdefs.h.  */
28195
28196#include <unistd.h>
28197#include <stdlib.h>
28198#include <string.h>
28199
28200int
28201main ()
28202{
28203  static char program[] = "program";
28204  static char a[] = "-a";
28205  static char foo[] = "foo";
28206  static char bar[] = "bar";
28207  char *argv[] = { program, a, foo, bar, NULL };
28208  int c;
28209
28210  c = getopt (4, argv, "ab");
28211  if (!(c == 'a'))
28212    return 1;
28213  c = getopt (4, argv, "ab");
28214  if (!(c == -1))
28215    return 2;
28216  if (!(optind == 2))
28217    return 3;
28218  return 0;
28219}
28220
28221_ACEOF
28222if ac_fn_c_try_run "$LINENO"; then :
28223  gl_cv_func_getopt_posix=maybe
28224else
28225  gl_cv_func_getopt_posix=no
28226fi
28227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28228  conftest.$ac_objext conftest.beam conftest.$ac_ext
28229fi
28230
28231          if test $gl_cv_func_getopt_posix = maybe; then
28232                                    if test "$cross_compiling" = yes; then :
28233  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28234$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28235as_fn_error $? "cannot run test program while cross compiling
28236See \`config.log' for more details" "$LINENO" 5; }
28237else
28238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28239/* end confdefs.h.  */
28240
28241#include <unistd.h>
28242#include <stdlib.h>
28243#include <string.h>
28244
28245int
28246main ()
28247{
28248  static char program[] = "program";
28249  static char donald[] = "donald";
28250  static char p[] = "-p";
28251  static char billy[] = "billy";
28252  static char duck[] = "duck";
28253  static char a[] = "-a";
28254  static char bar[] = "bar";
28255  char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
28256  int c;
28257
28258  c = getopt (7, argv, "+abp:q:");
28259  if (!(c == -1))
28260    return 4;
28261  if (!(strcmp (argv[0], "program") == 0))
28262    return 5;
28263  if (!(strcmp (argv[1], "donald") == 0))
28264    return 6;
28265  if (!(strcmp (argv[2], "-p") == 0))
28266    return 7;
28267  if (!(strcmp (argv[3], "billy") == 0))
28268    return 8;
28269  if (!(strcmp (argv[4], "duck") == 0))
28270    return 9;
28271  if (!(strcmp (argv[5], "-a") == 0))
28272    return 10;
28273  if (!(strcmp (argv[6], "bar") == 0))
28274    return 11;
28275  if (!(optind == 1))
28276    return 12;
28277  return 0;
28278}
28279
28280_ACEOF
28281if ac_fn_c_try_run "$LINENO"; then :
28282  gl_cv_func_getopt_posix=maybe
28283else
28284  gl_cv_func_getopt_posix=no
28285fi
28286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28287  conftest.$ac_objext conftest.beam conftest.$ac_ext
28288fi
28289
28290          fi
28291          if test $gl_cv_func_getopt_posix = maybe; then
28292                        if test "$cross_compiling" = yes; then :
28293  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28295as_fn_error $? "cannot run test program while cross compiling
28296See \`config.log' for more details" "$LINENO" 5; }
28297else
28298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28299/* end confdefs.h.  */
28300
28301#include <unistd.h>
28302#include <stdlib.h>
28303#include <string.h>
28304
28305int
28306main ()
28307{
28308  static char program[] = "program";
28309  static char ab[] = "-ab";
28310  char *argv[3] = { program, ab, NULL };
28311  if (getopt (2, argv, "ab:") != 'a')
28312    return 13;
28313  if (getopt (2, argv, "ab:") != '?')
28314    return 14;
28315  if (optopt != 'b')
28316    return 15;
28317  if (optind != 2)
28318    return 16;
28319  return 0;
28320}
28321
28322_ACEOF
28323if ac_fn_c_try_run "$LINENO"; then :
28324  gl_cv_func_getopt_posix=yes
28325else
28326  gl_cv_func_getopt_posix=no
28327fi
28328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28329  conftest.$ac_objext conftest.beam conftest.$ac_ext
28330fi
28331
28332          fi
28333        else
28334          case "$host_os" in
28335            darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
28336            *)                       gl_cv_func_getopt_posix="guessing yes";;
28337          esac
28338        fi
28339
28340fi
28341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
28342$as_echo "$gl_cv_func_getopt_posix" >&6; }
28343    case "$gl_cv_func_getopt_posix" in
28344      *no) gl_replace_getopt=yes ;;
28345    esac
28346  fi
28347
28348  if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
28349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
28350$as_echo_n "checking for working GNU getopt function... " >&6; }
28351if ${gl_cv_func_getopt_gnu+:} false; then :
28352  $as_echo_n "(cached) " >&6
28353else
28354  # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
28355       # optstring is necessary for programs like m4 that have POSIX-mandated
28356       # semantics for supporting options interspersed with files.
28357       # Also, since getopt_long is a GNU extension, we require optind=0.
28358       # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
28359       # so take care to revert to the correct (non-)export state.
28360       gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
28361       case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
28362         xx) gl_had_POSIXLY_CORRECT=exported ;;
28363         x)  gl_had_POSIXLY_CORRECT=yes      ;;
28364         *)  gl_had_POSIXLY_CORRECT=         ;;
28365       esac
28366       POSIXLY_CORRECT=1
28367       export POSIXLY_CORRECT
28368       if test "$cross_compiling" = yes; then :
28369                             gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
28370
28371else
28372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28373/* end confdefs.h.  */
28374#include <getopt.h>
28375                           #include <stddef.h>
28376                           #include <string.h>
28377
28378#include <stdlib.h>
28379#if defined __MACH__ && defined __APPLE__
28380/* Avoid a crash on Mac OS X.  */
28381#include <mach/mach.h>
28382#include <mach/mach_error.h>
28383#include <mach/thread_status.h>
28384#include <mach/exception.h>
28385#include <mach/task.h>
28386#include <pthread.h>
28387/* The exception port on which our thread listens.  */
28388static mach_port_t our_exception_port;
28389/* The main function of the thread listening for exceptions of type
28390   EXC_BAD_ACCESS.  */
28391static void *
28392mach_exception_thread (void *arg)
28393{
28394  /* Buffer for a message to be received.  */
28395  struct {
28396    mach_msg_header_t head;
28397    mach_msg_body_t msgh_body;
28398    char data[1024];
28399  } msg;
28400  mach_msg_return_t retval;
28401  /* Wait for a message on the exception port.  */
28402  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
28403                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
28404  if (retval != MACH_MSG_SUCCESS)
28405    abort ();
28406  exit (1);
28407}
28408static void
28409nocrash_init (void)
28410{
28411  mach_port_t self = mach_task_self ();
28412  /* Allocate a port on which the thread shall listen for exceptions.  */
28413  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
28414      == KERN_SUCCESS) {
28415    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
28416    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
28417                                MACH_MSG_TYPE_MAKE_SEND)
28418        == KERN_SUCCESS) {
28419      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
28420         for us.  */
28421      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
28422      /* Create the thread listening on the exception port.  */
28423      pthread_attr_t attr;
28424      pthread_t thread;
28425      if (pthread_attr_init (&attr) == 0
28426          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
28427          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
28428        pthread_attr_destroy (&attr);
28429        /* Replace the exception port info for these exceptions with our own.
28430           Note that we replace the exception port for the entire task, not only
28431           for a particular thread.  This has the effect that when our exception
28432           port gets the message, the thread specific exception port has already
28433           been asked, and we don't need to bother about it.
28434           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
28435        task_set_exception_ports (self, mask, our_exception_port,
28436                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
28437      }
28438    }
28439  }
28440}
28441#elif defined _WIN32 && ! defined __CYGWIN__
28442/* Avoid a crash on native Windows.  */
28443#define WIN32_LEAN_AND_MEAN
28444#include <windows.h>
28445#include <winerror.h>
28446static LONG WINAPI
28447exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
28448{
28449  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
28450    {
28451    case EXCEPTION_ACCESS_VIOLATION:
28452    case EXCEPTION_IN_PAGE_ERROR:
28453    case EXCEPTION_STACK_OVERFLOW:
28454    case EXCEPTION_GUARD_PAGE:
28455    case EXCEPTION_PRIV_INSTRUCTION:
28456    case EXCEPTION_ILLEGAL_INSTRUCTION:
28457    case EXCEPTION_DATATYPE_MISALIGNMENT:
28458    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
28459    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
28460      exit (1);
28461    }
28462  return EXCEPTION_CONTINUE_SEARCH;
28463}
28464static void
28465nocrash_init (void)
28466{
28467  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
28468}
28469#else
28470/* Avoid a crash on POSIX systems.  */
28471#include <signal.h>
28472#include <unistd.h>
28473/* A POSIX signal handler.  */
28474static void
28475exception_handler (int sig)
28476{
28477  _exit (1);
28478}
28479static void
28480nocrash_init (void)
28481{
28482#ifdef SIGSEGV
28483  signal (SIGSEGV, exception_handler);
28484#endif
28485#ifdef SIGBUS
28486  signal (SIGBUS, exception_handler);
28487#endif
28488}
28489#endif
28490
28491
28492int
28493main ()
28494{
28495
28496             int result = 0;
28497
28498             nocrash_init();
28499
28500             /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
28501                and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
28502                OSF/1 5.1, Solaris 10.  */
28503             {
28504               static char conftest[] = "conftest";
28505               static char plus[] = "-+";
28506               char *argv[3] = { conftest, plus, NULL };
28507               opterr = 0;
28508               if (getopt (2, argv, "+a") != '?')
28509                 result |= 1;
28510             }
28511             /* This code succeeds on glibc 2.8, mingw,
28512                and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
28513                IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
28514             {
28515               static char program[] = "program";
28516               static char p[] = "-p";
28517               static char foo[] = "foo";
28518               static char bar[] = "bar";
28519               char *argv[] = { program, p, foo, bar, NULL };
28520
28521               optind = 1;
28522               if (getopt (4, argv, "p::") != 'p')
28523                 result |= 2;
28524               else if (optarg != NULL)
28525                 result |= 4;
28526               else if (getopt (4, argv, "p::") != -1)
28527                 result |= 6;
28528               else if (optind != 2)
28529                 result |= 8;
28530             }
28531             /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
28532             {
28533               static char program[] = "program";
28534               static char foo[] = "foo";
28535               static char p[] = "-p";
28536               char *argv[] = { program, foo, p, NULL };
28537               optind = 0;
28538               if (getopt (3, argv, "-p") != 1)
28539                 result |= 16;
28540               else if (getopt (3, argv, "-p") != 'p')
28541                 result |= 16;
28542             }
28543             /* This code fails on glibc 2.11.  */
28544             {
28545               static char program[] = "program";
28546               static char b[] = "-b";
28547               static char a[] = "-a";
28548               char *argv[] = { program, b, a, NULL };
28549               optind = opterr = 0;
28550               if (getopt (3, argv, "+:a:b") != 'b')
28551                 result |= 32;
28552               else if (getopt (3, argv, "+:a:b") != ':')
28553                 result |= 32;
28554             }
28555             /* This code dumps core on glibc 2.14.  */
28556             {
28557               static char program[] = "program";
28558               static char w[] = "-W";
28559               static char dummy[] = "dummy";
28560               char *argv[] = { program, w, dummy, NULL };
28561               optind = opterr = 1;
28562               if (getopt (3, argv, "W;") != 'W')
28563                 result |= 64;
28564             }
28565             return result;
28566
28567  ;
28568  return 0;
28569}
28570_ACEOF
28571if ac_fn_c_try_run "$LINENO"; then :
28572  gl_cv_func_getopt_gnu=yes
28573else
28574  gl_cv_func_getopt_gnu=no
28575fi
28576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28577  conftest.$ac_objext conftest.beam conftest.$ac_ext
28578fi
28579
28580       case $gl_had_POSIXLY_CORRECT in
28581         exported) ;;
28582         yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
28583         *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
28584       esac
28585
28586fi
28587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
28588$as_echo "$gl_cv_func_getopt_gnu" >&6; }
28589    if test "$gl_cv_func_getopt_gnu" != yes; then
28590      gl_replace_getopt=yes
28591    else
28592      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
28593$as_echo_n "checking for working GNU getopt_long function... " >&6; }
28594if ${gl_cv_func_getopt_long_gnu+:} false; then :
28595  $as_echo_n "(cached) " >&6
28596else
28597  if test "$cross_compiling" = yes; then :
28598              case "$host_os" in
28599              openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
28600              *)        gl_cv_func_getopt_long_gnu="guessing yes";;
28601            esac
28602
28603else
28604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28605/* end confdefs.h.  */
28606#include <getopt.h>
28607                #include <stddef.h>
28608                #include <string.h>
28609
28610int
28611main ()
28612{
28613static const struct option long_options[] =
28614                  {
28615                    { "xtremely-",no_argument,       NULL, 1003 },
28616                    { "xtra",     no_argument,       NULL, 1001 },
28617                    { "xtreme",   no_argument,       NULL, 1002 },
28618                    { "xtremely", no_argument,       NULL, 1003 },
28619                    { NULL,       0,                 NULL, 0 }
28620                  };
28621                /* This code fails on OpenBSD 5.0.  */
28622                {
28623                  static char program[] = "program";
28624                  static char xtremel[] = "--xtremel";
28625                  char *argv[] = { program, xtremel, NULL };
28626                  int option_index;
28627                  optind = 1; opterr = 0;
28628                  if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
28629                    return 1;
28630                }
28631                return 0;
28632
28633  ;
28634  return 0;
28635}
28636_ACEOF
28637if ac_fn_c_try_run "$LINENO"; then :
28638  gl_cv_func_getopt_long_gnu=yes
28639else
28640  gl_cv_func_getopt_long_gnu=no
28641fi
28642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28643  conftest.$ac_objext conftest.beam conftest.$ac_ext
28644fi
28645
28646
28647fi
28648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
28649$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
28650      case "$gl_cv_func_getopt_long_gnu" in
28651        *yes) ;;
28652        *) gl_replace_getopt=yes ;;
28653      esac
28654    fi
28655  fi
28656
28657
28658
28659
28660
28661
28662
28663
28664  GNULIB_GETRANDOM=0;
28665    HAVE_GETRANDOM=1;
28666  REPLACE_GETRANDOM=0;
28667
28668
28669
28670:
28671
28672
28673
28674  GNULIB_GETTIMEOFDAY=0;
28675    HAVE_GETTIMEOFDAY=1;
28676  HAVE_STRUCT_TIMEVAL=1;
28677  HAVE_SYS_TIME_H=1;
28678  REPLACE_GETTIMEOFDAY=0;
28679  REPLACE_STRUCT_TIMEVAL=0;
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696     if test $gl_cv_have_include_next = yes; then
28697       gl_cv_next_sys_time_h='<'sys/time.h'>'
28698     else
28699       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
28700$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
28701if ${gl_cv_next_sys_time_h+:} false; then :
28702  $as_echo_n "(cached) " >&6
28703else
28704
28705             if test $ac_cv_header_sys_time_h = yes; then
28706
28707
28708
28709
28710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28711/* end confdefs.h.  */
28712#include <sys/time.h>
28713_ACEOF
28714                case "$host_os" in
28715    aix*) gl_absname_cpp="$ac_cpp -C" ;;
28716    *)    gl_absname_cpp="$ac_cpp" ;;
28717  esac
28718
28719  case "$host_os" in
28720    mingw*)
28721                                          gl_dirsep_regex='[/\\]'
28722      ;;
28723    *)
28724      gl_dirsep_regex='\/'
28725      ;;
28726  esac
28727      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28728  gl_header_literal_regex=`echo 'sys/time.h' \
28729                           | sed -e "$gl_make_literal_regex_sed"`
28730  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28731      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28732      s|^/[^/]|//&|
28733      p
28734      q
28735    }'
28736
28737        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28738  sed -n "$gl_absolute_header_sed"`
28739
28740           gl_header=$gl_cv_absolute_sys_time_h
28741           gl_cv_next_sys_time_h='"'$gl_header'"'
28742          else
28743               gl_cv_next_sys_time_h='<'sys/time.h'>'
28744             fi
28745
28746
28747fi
28748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
28749$as_echo "$gl_cv_next_sys_time_h" >&6; }
28750     fi
28751     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
28752
28753     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28754       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28755       gl_next_as_first_directive='<'sys/time.h'>'
28756     else
28757       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28758       gl_next_as_first_directive=$gl_cv_next_sys_time_h
28759     fi
28760     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
28761
28762
28763
28764
28765
28766  if test $ac_cv_header_sys_time_h != yes; then
28767    HAVE_SYS_TIME_H=0
28768  fi
28769
28770
28771
28772
28773
28774  if test $ac_cv_header_sys_socket_h != yes; then
28775                    for ac_header in winsock2.h
28776do :
28777  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
28778if test "x$ac_cv_header_winsock2_h" = xyes; then :
28779  cat >>confdefs.h <<_ACEOF
28780#define HAVE_WINSOCK2_H 1
28781_ACEOF
28782
28783fi
28784
28785done
28786
28787  fi
28788  if test "$ac_cv_header_winsock2_h" = yes; then
28789    HAVE_WINSOCK2_H=1
28790    UNISTD_H_HAVE_WINSOCK2_H=1
28791    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
28792  else
28793    HAVE_WINSOCK2_H=0
28794  fi
28795
28796
28797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
28798$as_echo_n "checking for struct timeval... " >&6; }
28799if ${gl_cv_sys_struct_timeval+:} false; then :
28800  $as_echo_n "(cached) " >&6
28801else
28802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28803/* end confdefs.h.  */
28804#if HAVE_SYS_TIME_H
28805             #include <sys/time.h>
28806            #endif
28807            #include <time.h>
28808            #if HAVE_WINSOCK2_H
28809            # include <winsock2.h>
28810            #endif
28811
28812int
28813main ()
28814{
28815static struct timeval x; x.tv_sec = x.tv_usec;
28816  ;
28817  return 0;
28818}
28819_ACEOF
28820if ac_fn_c_try_compile "$LINENO"; then :
28821  gl_cv_sys_struct_timeval=yes
28822else
28823  gl_cv_sys_struct_timeval=no
28824fi
28825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28826
28827fi
28828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
28829$as_echo "$gl_cv_sys_struct_timeval" >&6; }
28830  if test $gl_cv_sys_struct_timeval != yes; then
28831    HAVE_STRUCT_TIMEVAL=0
28832  else
28833                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
28834$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
28835if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
28836  $as_echo_n "(cached) " >&6
28837else
28838  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28839/* end confdefs.h.  */
28840#if HAVE_SYS_TIME_H
28841               #include <sys/time.h>
28842              #endif
28843              #include <time.h>
28844              #if HAVE_WINSOCK2_H
28845              # include <winsock2.h>
28846              #endif
28847
28848int
28849main ()
28850{
28851static struct timeval x;
28852              typedef int verify_tv_sec_type[
28853                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
28854              ];
28855
28856  ;
28857  return 0;
28858}
28859_ACEOF
28860if ac_fn_c_try_compile "$LINENO"; then :
28861  gl_cv_sys_struct_timeval_tv_sec=yes
28862else
28863  gl_cv_sys_struct_timeval_tv_sec=no
28864fi
28865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28866
28867fi
28868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
28869$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
28870    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
28871      REPLACE_STRUCT_TIMEVAL=1
28872    fi
28873  fi
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886  if test -z "$gl_pthreadlib_body_done"; then
28887    gl_pthread_api=no
28888    LIBPTHREAD=
28889    LIBPMULTITHREAD=
28890    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
28891    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
28892    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
28893if test "x$ac_cv_header_pthread_h" = xyes; then :
28894  gl_have_pthread_h=yes
28895else
28896  gl_have_pthread_h=no
28897fi
28898
28899
28900    if test "$gl_have_pthread_h" = yes; then
28901      # Other possible tests:
28902      #   -lpthreads (FSU threads, PCthreads)
28903      #   -lgthreads
28904      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
28905      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
28906      # the second one only in libpthread, and lock.c needs it.
28907      #
28908      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
28909      # needs -pthread for some reason.  See:
28910      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
28911      save_LIBS=$LIBS
28912      for gl_pthread in '' '-pthread'; do
28913        LIBS="$LIBS $gl_pthread"
28914        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28915/* end confdefs.h.  */
28916#include <pthread.h>
28917               pthread_mutex_t m;
28918               pthread_mutexattr_t ma;
28919
28920int
28921main ()
28922{
28923pthread_mutex_lock (&m);
28924               pthread_mutexattr_init (&ma);
28925  ;
28926  return 0;
28927}
28928_ACEOF
28929if ac_fn_c_try_link "$LINENO"; then :
28930  gl_pthread_api=yes
28931           LIBPTHREAD=$gl_pthread
28932           LIBPMULTITHREAD=$gl_pthread
28933fi
28934rm -f core conftest.err conftest.$ac_objext \
28935    conftest$ac_exeext conftest.$ac_ext
28936        LIBS=$save_LIBS
28937        test $gl_pthread_api = yes && break
28938      done
28939
28940      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
28941      # since it is defined as a macro on OSF/1.)
28942      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
28943        # The program links fine without libpthread. But it may actually
28944        # need to link with libpthread in order to create multiple threads.
28945        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
28946$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
28947if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
28948  $as_echo_n "(cached) " >&6
28949else
28950  ac_check_lib_save_LIBS=$LIBS
28951LIBS="-lpthread  $LIBS"
28952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28953/* end confdefs.h.  */
28954
28955/* Override any GCC internal prototype to avoid an error.
28956   Use char because int might match the return type of a GCC
28957   builtin and then its argument prototype would still apply.  */
28958#ifdef __cplusplus
28959extern "C"
28960#endif
28961char pthread_kill ();
28962int
28963main ()
28964{
28965return pthread_kill ();
28966  ;
28967  return 0;
28968}
28969_ACEOF
28970if ac_fn_c_try_link "$LINENO"; then :
28971  ac_cv_lib_pthread_pthread_kill=yes
28972else
28973  ac_cv_lib_pthread_pthread_kill=no
28974fi
28975rm -f core conftest.err conftest.$ac_objext \
28976    conftest$ac_exeext conftest.$ac_ext
28977LIBS=$ac_check_lib_save_LIBS
28978fi
28979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
28980$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
28981if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
28982  LIBPMULTITHREAD=-lpthread
28983           # On Solaris and HP-UX, most pthread functions exist also in libc.
28984           # Therefore pthread_in_use() needs to actually try to create a
28985           # thread: pthread_create from libc will fail, whereas
28986           # pthread_create will actually create a thread.
28987           # On Solaris 10 or newer, this test is no longer needed, because
28988           # libc contains the fully functional pthread functions.
28989           case "$host_os" in
28990             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
28991
28992$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
28993
28994           esac
28995
28996fi
28997
28998      elif test $gl_pthread_api != yes; then
28999        # Some library is needed. Try libpthread and libc_r.
29000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
29001$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
29002if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
29003  $as_echo_n "(cached) " >&6
29004else
29005  ac_check_lib_save_LIBS=$LIBS
29006LIBS="-lpthread  $LIBS"
29007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29008/* end confdefs.h.  */
29009
29010/* Override any GCC internal prototype to avoid an error.
29011   Use char because int might match the return type of a GCC
29012   builtin and then its argument prototype would still apply.  */
29013#ifdef __cplusplus
29014extern "C"
29015#endif
29016char pthread_kill ();
29017int
29018main ()
29019{
29020return pthread_kill ();
29021  ;
29022  return 0;
29023}
29024_ACEOF
29025if ac_fn_c_try_link "$LINENO"; then :
29026  ac_cv_lib_pthread_pthread_kill=yes
29027else
29028  ac_cv_lib_pthread_pthread_kill=no
29029fi
29030rm -f core conftest.err conftest.$ac_objext \
29031    conftest$ac_exeext conftest.$ac_ext
29032LIBS=$ac_check_lib_save_LIBS
29033fi
29034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
29035$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
29036if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
29037  gl_pthread_api=yes
29038           LIBPTHREAD=-lpthread
29039           LIBPMULTITHREAD=-lpthread
29040fi
29041
29042        if test $gl_pthread_api != yes; then
29043          # For FreeBSD 4.
29044          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
29045$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
29046if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
29047  $as_echo_n "(cached) " >&6
29048else
29049  ac_check_lib_save_LIBS=$LIBS
29050LIBS="-lc_r  $LIBS"
29051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29052/* end confdefs.h.  */
29053
29054/* Override any GCC internal prototype to avoid an error.
29055   Use char because int might match the return type of a GCC
29056   builtin and then its argument prototype would still apply.  */
29057#ifdef __cplusplus
29058extern "C"
29059#endif
29060char pthread_kill ();
29061int
29062main ()
29063{
29064return pthread_kill ();
29065  ;
29066  return 0;
29067}
29068_ACEOF
29069if ac_fn_c_try_link "$LINENO"; then :
29070  ac_cv_lib_c_r_pthread_kill=yes
29071else
29072  ac_cv_lib_c_r_pthread_kill=no
29073fi
29074rm -f core conftest.err conftest.$ac_objext \
29075    conftest$ac_exeext conftest.$ac_ext
29076LIBS=$ac_check_lib_save_LIBS
29077fi
29078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
29079$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
29080if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
29081  gl_pthread_api=yes
29082             LIBPTHREAD=-lc_r
29083             LIBPMULTITHREAD=-lc_r
29084fi
29085
29086        fi
29087      fi
29088    fi
29089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
29090$as_echo_n "checking whether POSIX threads API is available... " >&6; }
29091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
29092$as_echo "$gl_pthread_api" >&6; }
29093
29094
29095    if test $gl_pthread_api = yes; then
29096
29097$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
29098
29099    fi
29100
29101        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29102/* end confdefs.h.  */
29103#include <sched.h>
29104int
29105main ()
29106{
29107sched_yield ();
29108  ;
29109  return 0;
29110}
29111_ACEOF
29112if ac_fn_c_try_link "$LINENO"; then :
29113  LIB_SCHED_YIELD=
29114
29115else
29116         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
29117$as_echo_n "checking for sched_yield in -lrt... " >&6; }
29118if ${ac_cv_lib_rt_sched_yield+:} false; then :
29119  $as_echo_n "(cached) " >&6
29120else
29121  ac_check_lib_save_LIBS=$LIBS
29122LIBS="-lrt  $LIBS"
29123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29124/* end confdefs.h.  */
29125
29126/* Override any GCC internal prototype to avoid an error.
29127   Use char because int might match the return type of a GCC
29128   builtin and then its argument prototype would still apply.  */
29129#ifdef __cplusplus
29130extern "C"
29131#endif
29132char sched_yield ();
29133int
29134main ()
29135{
29136return sched_yield ();
29137  ;
29138  return 0;
29139}
29140_ACEOF
29141if ac_fn_c_try_link "$LINENO"; then :
29142  ac_cv_lib_rt_sched_yield=yes
29143else
29144  ac_cv_lib_rt_sched_yield=no
29145fi
29146rm -f core conftest.err conftest.$ac_objext \
29147    conftest$ac_exeext conftest.$ac_ext
29148LIBS=$ac_check_lib_save_LIBS
29149fi
29150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
29151$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
29152if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
29153  LIB_SCHED_YIELD=-lrt
29154else
29155            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
29156$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
29157if ${ac_cv_lib_posix4_sched_yield+:} false; then :
29158  $as_echo_n "(cached) " >&6
29159else
29160  ac_check_lib_save_LIBS=$LIBS
29161LIBS="-lposix4  $LIBS"
29162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29163/* end confdefs.h.  */
29164
29165/* Override any GCC internal prototype to avoid an error.
29166   Use char because int might match the return type of a GCC
29167   builtin and then its argument prototype would still apply.  */
29168#ifdef __cplusplus
29169extern "C"
29170#endif
29171char sched_yield ();
29172int
29173main ()
29174{
29175return sched_yield ();
29176  ;
29177  return 0;
29178}
29179_ACEOF
29180if ac_fn_c_try_link "$LINENO"; then :
29181  ac_cv_lib_posix4_sched_yield=yes
29182else
29183  ac_cv_lib_posix4_sched_yield=no
29184fi
29185rm -f core conftest.err conftest.$ac_objext \
29186    conftest$ac_exeext conftest.$ac_ext
29187LIBS=$ac_check_lib_save_LIBS
29188fi
29189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
29190$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
29191if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
29192  LIB_SCHED_YIELD=-lposix4
29193fi
29194
29195fi
29196
29197
29198fi
29199rm -f core conftest.err conftest.$ac_objext \
29200    conftest$ac_exeext conftest.$ac_ext
29201
29202
29203    gl_pthreadlib_body_done=done
29204  fi
29205
29206
29207
29208
29209
29210
29211
29212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
29213$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
29214if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
29215  $as_echo_n "(cached) " >&6
29216else
29217  case "$host_os" in
29218       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
29219       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
29220         gl_cv_func_setlocale_null_all_mtsafe=no ;;
29221       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
29222       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
29223         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
29224       # If we don't know, obey --enable-cross-guesses.
29225       *)
29226         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
29227     esac
29228
29229fi
29230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
29231$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
29232    case "$host_os" in
29233    mingw*) ;;
29234    *)
29235      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
29236        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
29237      fi
29238      ;;
29239  esac
29240  case "$gl_cv_func_setlocale_null_all_mtsafe" in
29241    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
29242    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
29243  esac
29244
29245cat >>confdefs.h <<_ACEOF
29246#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
29247_ACEOF
29248
29249
29250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
29251$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
29252if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
29253  $as_echo_n "(cached) " >&6
29254else
29255  case "$host_os" in
29256       # Guess no on OpenBSD, AIX.
29257       openbsd* | aix*)
29258         gl_cv_func_setlocale_null_one_mtsafe=no ;;
29259       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
29260       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
29261         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
29262       # If we don't know, obey --enable-cross-guesses.
29263       *)
29264         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
29265     esac
29266
29267fi
29268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
29269$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
29270    case "$host_os" in
29271    mingw*) ;;
29272    *)
29273      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
29274        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
29275      fi
29276      ;;
29277  esac
29278  case "$gl_cv_func_setlocale_null_one_mtsafe" in
29279    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
29280    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
29281  esac
29282
29283cat >>confdefs.h <<_ACEOF
29284#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
29285_ACEOF
29286
29287
29288    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
29289    case "$host_os" in
29290      mingw*) LIB_SETLOCALE_NULL= ;;
29291      *)
29292
29293
29294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
29295$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
29296if ${gl_cv_have_weak+:} false; then :
29297  $as_echo_n "(cached) " >&6
29298else
29299  gl_cv_have_weak=no
29300          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29301/* end confdefs.h.  */
29302extern void xyzzy ();
29303#pragma weak xyzzy
29304int
29305main ()
29306{
29307xyzzy();
29308  ;
29309  return 0;
29310}
29311_ACEOF
29312if ac_fn_c_try_link "$LINENO"; then :
29313  gl_cv_have_weak=maybe
29314fi
29315rm -f core conftest.err conftest.$ac_objext \
29316    conftest$ac_exeext conftest.$ac_ext
29317     if test $gl_cv_have_weak = maybe; then
29318                     if test "$cross_compiling" = yes; then :
29319                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29320/* end confdefs.h.  */
29321#ifdef __ELF__
29322             Extensible Linking Format
29323             #endif
29324
29325_ACEOF
29326if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29327  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
29328  gl_cv_have_weak="guessing yes"
29329else
29330  gl_cv_have_weak="guessing no"
29331fi
29332rm -f conftest*
29333
29334
29335else
29336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29337/* end confdefs.h.  */
29338
29339#include <stdio.h>
29340#pragma weak fputs
29341int main ()
29342{
29343  return (fputs == NULL);
29344}
29345_ACEOF
29346if ac_fn_c_try_run "$LINENO"; then :
29347  gl_cv_have_weak=yes
29348else
29349  gl_cv_have_weak=no
29350fi
29351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29352  conftest.$ac_objext conftest.beam conftest.$ac_ext
29353fi
29354
29355     fi
29356          case " $LDFLAGS " in
29357       *" -static "*) gl_cv_have_weak=no ;;
29358     esac
29359                    case "$gl_cv_have_weak" in
29360       *yes)
29361         case "$host_os" in
29362           freebsd* | dragonfly*)
29363             : > conftest1.c
29364             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
29365             cat <<EOF > conftest2.c
29366#include <pthread.h>
29367#pragma weak pthread_mutexattr_gettype
29368int main ()
29369{
29370  return (pthread_mutexattr_gettype != NULL);
29371}
29372EOF
29373             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
29374               || gl_cv_have_weak=no
29375             rm -f conftest1.c libempty.so conftest2.c conftest
29376             ;;
29377         esac
29378         ;;
29379     esac
29380
29381fi
29382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
29383$as_echo "$gl_cv_have_weak" >&6; }
29384  case "$gl_cv_have_weak" in
29385    *yes)
29386
29387$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
29388
29389      ;;
29390  esac
29391
29392        case "$gl_cv_have_weak" in
29393          *yes) LIB_SETLOCALE_NULL= ;;
29394          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
29395        esac
29396        ;;
29397    esac
29398  else
29399    LIB_SETLOCALE_NULL=
29400  fi
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417     if test $gl_cv_have_include_next = yes; then
29418       gl_cv_next_limits_h='<'limits.h'>'
29419     else
29420       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
29421$as_echo_n "checking absolute name of <limits.h>... " >&6; }
29422if ${gl_cv_next_limits_h+:} false; then :
29423  $as_echo_n "(cached) " >&6
29424else
29425
29426             if test $ac_cv_header_limits_h = yes; then
29427
29428
29429
29430
29431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29432/* end confdefs.h.  */
29433#include <limits.h>
29434_ACEOF
29435                case "$host_os" in
29436    aix*) gl_absname_cpp="$ac_cpp -C" ;;
29437    *)    gl_absname_cpp="$ac_cpp" ;;
29438  esac
29439
29440  case "$host_os" in
29441    mingw*)
29442                                          gl_dirsep_regex='[/\\]'
29443      ;;
29444    *)
29445      gl_dirsep_regex='\/'
29446      ;;
29447  esac
29448      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29449  gl_header_literal_regex=`echo 'limits.h' \
29450                           | sed -e "$gl_make_literal_regex_sed"`
29451  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29452      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29453      s|^/[^/]|//&|
29454      p
29455      q
29456    }'
29457
29458        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29459  sed -n "$gl_absolute_header_sed"`
29460
29461           gl_header=$gl_cv_absolute_limits_h
29462           gl_cv_next_limits_h='"'$gl_header'"'
29463          else
29464               gl_cv_next_limits_h='<'limits.h'>'
29465             fi
29466
29467
29468fi
29469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
29470$as_echo "$gl_cv_next_limits_h" >&6; }
29471     fi
29472     NEXT_LIMITS_H=$gl_cv_next_limits_h
29473
29474     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29475       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29476       gl_next_as_first_directive='<'limits.h'>'
29477     else
29478       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29479       gl_next_as_first_directive=$gl_cv_next_limits_h
29480     fi
29481     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
29482
29483
29484
29485
29486
29487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
29488$as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
29489if ${gl_cv_header_limits_width+:} false; then :
29490  $as_echo_n "(cached) " >&6
29491else
29492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29493/* end confdefs.h.  */
29494#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
29495             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
29496            #endif
29497            #include <limits.h>
29498            long long llm = LLONG_MAX;
29499            int wb = WORD_BIT;
29500            int ullw = ULLONG_WIDTH;
29501
29502int
29503main ()
29504{
29505
29506  ;
29507  return 0;
29508}
29509_ACEOF
29510if ac_fn_c_try_compile "$LINENO"; then :
29511  gl_cv_header_limits_width=yes
29512else
29513  gl_cv_header_limits_width=no
29514fi
29515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29516fi
29517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
29518$as_echo "$gl_cv_header_limits_width" >&6; }
29519  if test "$gl_cv_header_limits_width" = yes; then
29520    LIMITS_H=
29521  else
29522    LIMITS_H=limits.h
29523  fi
29524
29525   if test -n "$LIMITS_H"; then
29526  GL_GENERATE_LIMITS_H_TRUE=
29527  GL_GENERATE_LIMITS_H_FALSE='#'
29528else
29529  GL_GENERATE_LIMITS_H_TRUE='#'
29530  GL_GENERATE_LIMITS_H_FALSE=
29531fi
29532
29533
29534
29535
29536
29537
29538
29539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
29540$as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
29541if ${gl_cv_c_multiarch+:} false; then :
29542  $as_echo_n "(cached) " >&6
29543else
29544  gl_cv_c_multiarch=no
29545     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29546/* end confdefs.h.  */
29547#ifndef __APPLE_CC__
29548            not a universal capable compiler
29549           #endif
29550           typedef int dummy;
29551
29552_ACEOF
29553if ac_fn_c_try_compile "$LINENO"; then :
29554
29555                        arch=
29556        prev=
29557        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
29558          if test -n "$prev"; then
29559            case $word in
29560              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
29561                if test -z "$arch" || test "$arch" = "$word"; then
29562                  arch="$word"
29563                else
29564                  gl_cv_c_multiarch=yes
29565                fi
29566                ;;
29567            esac
29568            prev=
29569          else
29570            if test "x$word" = "x-arch"; then
29571              prev=arch
29572            fi
29573          fi
29574        done
29575
29576fi
29577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29578
29579fi
29580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
29581$as_echo "$gl_cv_c_multiarch" >&6; }
29582  if test $gl_cv_c_multiarch = yes; then
29583    APPLE_UNIVERSAL_BUILD=1
29584  else
29585    APPLE_UNIVERSAL_BUILD=0
29586  fi
29587
29588
29589
29590
29591
29592
29593
29594
29595$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
29596
29597
29598$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
29599
29600
29601
29602  if test $ac_cv_header_wchar_h = yes; then
29603    HAVE_WCHAR_H=1
29604  else
29605    HAVE_WCHAR_H=0
29606  fi
29607
29608
29609      if test $ac_cv_header_inttypes_h = yes; then
29610    HAVE_INTTYPES_H=1
29611  else
29612    HAVE_INTTYPES_H=0
29613  fi
29614
29615
29616      if test $ac_cv_header_sys_types_h = yes; then
29617    HAVE_SYS_TYPES_H=1
29618  else
29619    HAVE_SYS_TYPES_H=0
29620  fi
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632     if test $gl_cv_have_include_next = yes; then
29633       gl_cv_next_stdint_h='<'stdint.h'>'
29634     else
29635       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
29636$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
29637if ${gl_cv_next_stdint_h+:} false; then :
29638  $as_echo_n "(cached) " >&6
29639else
29640
29641             if test $ac_cv_header_stdint_h = yes; then
29642
29643
29644
29645
29646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29647/* end confdefs.h.  */
29648#include <stdint.h>
29649_ACEOF
29650                case "$host_os" in
29651    aix*) gl_absname_cpp="$ac_cpp -C" ;;
29652    *)    gl_absname_cpp="$ac_cpp" ;;
29653  esac
29654
29655  case "$host_os" in
29656    mingw*)
29657                                          gl_dirsep_regex='[/\\]'
29658      ;;
29659    *)
29660      gl_dirsep_regex='\/'
29661      ;;
29662  esac
29663      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29664  gl_header_literal_regex=`echo 'stdint.h' \
29665                           | sed -e "$gl_make_literal_regex_sed"`
29666  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29667      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29668      s|^/[^/]|//&|
29669      p
29670      q
29671    }'
29672
29673        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29674  sed -n "$gl_absolute_header_sed"`
29675
29676           gl_header=$gl_cv_absolute_stdint_h
29677           gl_cv_next_stdint_h='"'$gl_header'"'
29678          else
29679               gl_cv_next_stdint_h='<'stdint.h'>'
29680             fi
29681
29682
29683fi
29684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
29685$as_echo "$gl_cv_next_stdint_h" >&6; }
29686     fi
29687     NEXT_STDINT_H=$gl_cv_next_stdint_h
29688
29689     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29690       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29691       gl_next_as_first_directive='<'stdint.h'>'
29692     else
29693       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29694       gl_next_as_first_directive=$gl_cv_next_stdint_h
29695     fi
29696     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
29697
29698
29699
29700
29701  if test $ac_cv_header_stdint_h = yes; then
29702    HAVE_STDINT_H=1
29703  else
29704    HAVE_STDINT_H=0
29705  fi
29706
29707
29708    if test $ac_cv_header_stdint_h = yes; then
29709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
29710$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
29711if ${gl_cv_header_working_stdint_h+:} false; then :
29712  $as_echo_n "(cached) " >&6
29713else
29714  gl_cv_header_working_stdint_h=no
29715       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29716/* end confdefs.h.  */
29717
29718
29719#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
29720#define __STDC_CONSTANT_MACROS 1
29721#define __STDC_LIMIT_MACROS 1
29722#include <stdint.h>
29723/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
29724#if !(defined WCHAR_MIN && defined WCHAR_MAX)
29725#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
29726#endif
29727
29728
29729  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29730     included before <wchar.h>.  */
29731  #include <stddef.h>
29732  #include <signal.h>
29733  #if HAVE_WCHAR_H
29734  # include <stdio.h>
29735  # include <time.h>
29736  # include <wchar.h>
29737  #endif
29738
29739
29740#ifdef INT8_MAX
29741int8_t a1 = INT8_MAX;
29742int8_t a1min = INT8_MIN;
29743#endif
29744#ifdef INT16_MAX
29745int16_t a2 = INT16_MAX;
29746int16_t a2min = INT16_MIN;
29747#endif
29748#ifdef INT32_MAX
29749int32_t a3 = INT32_MAX;
29750int32_t a3min = INT32_MIN;
29751#endif
29752#ifdef INT64_MAX
29753int64_t a4 = INT64_MAX;
29754int64_t a4min = INT64_MIN;
29755#endif
29756#ifdef UINT8_MAX
29757uint8_t b1 = UINT8_MAX;
29758#else
29759typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
29760#endif
29761#ifdef UINT16_MAX
29762uint16_t b2 = UINT16_MAX;
29763#endif
29764#ifdef UINT32_MAX
29765uint32_t b3 = UINT32_MAX;
29766#endif
29767#ifdef UINT64_MAX
29768uint64_t b4 = UINT64_MAX;
29769#endif
29770int_least8_t c1 = INT8_C (0x7f);
29771int_least8_t c1max = INT_LEAST8_MAX;
29772int_least8_t c1min = INT_LEAST8_MIN;
29773int_least16_t c2 = INT16_C (0x7fff);
29774int_least16_t c2max = INT_LEAST16_MAX;
29775int_least16_t c2min = INT_LEAST16_MIN;
29776int_least32_t c3 = INT32_C (0x7fffffff);
29777int_least32_t c3max = INT_LEAST32_MAX;
29778int_least32_t c3min = INT_LEAST32_MIN;
29779int_least64_t c4 = INT64_C (0x7fffffffffffffff);
29780int_least64_t c4max = INT_LEAST64_MAX;
29781int_least64_t c4min = INT_LEAST64_MIN;
29782uint_least8_t d1 = UINT8_C (0xff);
29783uint_least8_t d1max = UINT_LEAST8_MAX;
29784uint_least16_t d2 = UINT16_C (0xffff);
29785uint_least16_t d2max = UINT_LEAST16_MAX;
29786uint_least32_t d3 = UINT32_C (0xffffffff);
29787uint_least32_t d3max = UINT_LEAST32_MAX;
29788uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
29789uint_least64_t d4max = UINT_LEAST64_MAX;
29790int_fast8_t e1 = INT_FAST8_MAX;
29791int_fast8_t e1min = INT_FAST8_MIN;
29792int_fast16_t e2 = INT_FAST16_MAX;
29793int_fast16_t e2min = INT_FAST16_MIN;
29794int_fast32_t e3 = INT_FAST32_MAX;
29795int_fast32_t e3min = INT_FAST32_MIN;
29796int_fast64_t e4 = INT_FAST64_MAX;
29797int_fast64_t e4min = INT_FAST64_MIN;
29798uint_fast8_t f1 = UINT_FAST8_MAX;
29799uint_fast16_t f2 = UINT_FAST16_MAX;
29800uint_fast32_t f3 = UINT_FAST32_MAX;
29801uint_fast64_t f4 = UINT_FAST64_MAX;
29802#ifdef INTPTR_MAX
29803intptr_t g = INTPTR_MAX;
29804intptr_t gmin = INTPTR_MIN;
29805#endif
29806#ifdef UINTPTR_MAX
29807uintptr_t h = UINTPTR_MAX;
29808#endif
29809intmax_t i = INTMAX_MAX;
29810uintmax_t j = UINTMAX_MAX;
29811
29812/* Check that SIZE_MAX has the correct type, if possible.  */
29813#if 201112 <= __STDC_VERSION__
29814int k = _Generic (SIZE_MAX, size_t: 0);
29815#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
29816       || (0x5110 <= __SUNPRO_C && !__STDC__))
29817extern size_t k;
29818extern __typeof__ (SIZE_MAX) k;
29819#endif
29820
29821#include <limits.h> /* for CHAR_BIT */
29822#define TYPE_MINIMUM(t) \
29823  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
29824#define TYPE_MAXIMUM(t) \
29825  ((t) ((t) 0 < (t) -1 \
29826        ? (t) -1 \
29827        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
29828struct s {
29829  int check_PTRDIFF:
29830      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
29831      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
29832      ? 1 : -1;
29833  /* Detect bug in FreeBSD 6.0 / ia64.  */
29834  int check_SIG_ATOMIC:
29835      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
29836      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
29837      ? 1 : -1;
29838  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
29839  int check_WCHAR:
29840      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
29841      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
29842      ? 1 : -1;
29843  /* Detect bug in mingw.  */
29844  int check_WINT:
29845      WINT_MIN == TYPE_MINIMUM (wint_t)
29846      && WINT_MAX == TYPE_MAXIMUM (wint_t)
29847      ? 1 : -1;
29848
29849  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
29850  int check_UINT8_C:
29851        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
29852  int check_UINT16_C:
29853        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
29854
29855  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
29856#ifdef UINT8_MAX
29857  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
29858#endif
29859#ifdef UINT16_MAX
29860  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
29861#endif
29862#ifdef UINT32_MAX
29863  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
29864#endif
29865#ifdef UINT64_MAX
29866  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
29867#endif
29868  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
29869  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
29870  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
29871  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
29872  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
29873  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
29874  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
29875  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
29876  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
29877  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
29878  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
29879};
29880
29881int
29882main ()
29883{
29884
29885  ;
29886  return 0;
29887}
29888_ACEOF
29889if ac_fn_c_try_compile "$LINENO"; then :
29890                                                    if test "$cross_compiling" = yes; then :
29891  case "$host_os" in
29892                         # Guess yes on native Windows.
29893                 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
29894                         # In general, assume it works.
29895                 *)      gl_cv_header_working_stdint_h="guessing yes" ;;
29896               esac
29897
29898else
29899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29900/* end confdefs.h.  */
29901
29902
29903#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
29904#define __STDC_CONSTANT_MACROS 1
29905#define __STDC_LIMIT_MACROS 1
29906#include <stdint.h>
29907
29908
29909  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29910     included before <wchar.h>.  */
29911  #include <stddef.h>
29912  #include <signal.h>
29913  #if HAVE_WCHAR_H
29914  # include <stdio.h>
29915  # include <time.h>
29916  # include <wchar.h>
29917  #endif
29918
29919
29920#include <stdio.h>
29921#include <string.h>
29922#define MVAL(macro) MVAL1(macro)
29923#define MVAL1(expression) #expression
29924static const char *macro_values[] =
29925  {
29926#ifdef INT8_MAX
29927    MVAL (INT8_MAX),
29928#endif
29929#ifdef INT16_MAX
29930    MVAL (INT16_MAX),
29931#endif
29932#ifdef INT32_MAX
29933    MVAL (INT32_MAX),
29934#endif
29935#ifdef INT64_MAX
29936    MVAL (INT64_MAX),
29937#endif
29938#ifdef UINT8_MAX
29939    MVAL (UINT8_MAX),
29940#endif
29941#ifdef UINT16_MAX
29942    MVAL (UINT16_MAX),
29943#endif
29944#ifdef UINT32_MAX
29945    MVAL (UINT32_MAX),
29946#endif
29947#ifdef UINT64_MAX
29948    MVAL (UINT64_MAX),
29949#endif
29950    NULL
29951  };
29952
29953int
29954main ()
29955{
29956
29957  const char **mv;
29958  for (mv = macro_values; *mv != NULL; mv++)
29959    {
29960      const char *value = *mv;
29961      /* Test whether it looks like a cast expression.  */
29962      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
29963          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
29964          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
29965          || strncmp (value, "((int)"/*)*/, 6) == 0
29966          || strncmp (value, "((signed short)"/*)*/, 15) == 0
29967          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
29968        return mv - macro_values + 1;
29969    }
29970  return 0;
29971
29972  ;
29973  return 0;
29974}
29975_ACEOF
29976if ac_fn_c_try_run "$LINENO"; then :
29977  gl_cv_header_working_stdint_h=yes
29978fi
29979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29980  conftest.$ac_objext conftest.beam conftest.$ac_ext
29981fi
29982
29983
29984fi
29985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29986
29987fi
29988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
29989$as_echo "$gl_cv_header_working_stdint_h" >&6; }
29990  fi
29991
29992  HAVE_C99_STDINT_H=0
29993  HAVE_SYS_BITYPES_H=0
29994  HAVE_SYS_INTTYPES_H=0
29995  STDINT_H=stdint.h
29996  case "$gl_cv_header_working_stdint_h" in
29997    *yes)
29998      HAVE_C99_STDINT_H=1
29999                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
30000$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
30001if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
30002  $as_echo_n "(cached) " >&6
30003else
30004  gl_cv_header_stdint_predates_cxx11_h=yes
30005         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30006/* end confdefs.h.  */
30007
30008
30009#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
30010#include <stdint.h>
30011
30012
30013  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30014     included before <wchar.h>.  */
30015  #include <stddef.h>
30016  #include <signal.h>
30017  #if HAVE_WCHAR_H
30018  # include <stdio.h>
30019  # include <time.h>
30020  # include <wchar.h>
30021  #endif
30022
30023
30024intmax_t im = INTMAX_MAX;
30025int32_t i32 = INT32_C (0x7fffffff);
30026
30027int
30028main ()
30029{
30030
30031  ;
30032  return 0;
30033}
30034_ACEOF
30035if ac_fn_c_try_compile "$LINENO"; then :
30036  gl_cv_header_stdint_predates_cxx11_h=no
30037fi
30038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30039fi
30040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
30041$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
30042
30043      if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
30044
30045$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
30046
30047
30048$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
30049
30050      fi
30051      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
30052$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
30053if ${gl_cv_header_stdint_width+:} false; then :
30054  $as_echo_n "(cached) " >&6
30055else
30056  gl_cv_header_stdint_width=no
30057         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30058/* end confdefs.h.  */
30059
30060              /* Work if build is not clean.  */
30061              #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
30062              #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
30063               #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
30064              #endif
30065              #include <stdint.h>
30066
30067  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30068     included before <wchar.h>.  */
30069  #include <stddef.h>
30070  #include <signal.h>
30071  #if HAVE_WCHAR_H
30072  # include <stdio.h>
30073  # include <time.h>
30074  # include <wchar.h>
30075  #endif
30076
30077              int iw = UINTMAX_WIDTH;
30078
30079int
30080main ()
30081{
30082
30083  ;
30084  return 0;
30085}
30086_ACEOF
30087if ac_fn_c_try_compile "$LINENO"; then :
30088  gl_cv_header_stdint_width=yes
30089fi
30090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30091fi
30092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
30093$as_echo "$gl_cv_header_stdint_width" >&6; }
30094      if test "$gl_cv_header_stdint_width" = yes; then
30095        STDINT_H=
30096      fi
30097      ;;
30098    *)
30099                  for ac_header in sys/inttypes.h sys/bitypes.h
30100do :
30101  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30102ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30103if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30104  cat >>confdefs.h <<_ACEOF
30105#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30106_ACEOF
30107
30108fi
30109
30110done
30111
30112      if test $ac_cv_header_sys_inttypes_h = yes; then
30113        HAVE_SYS_INTTYPES_H=1
30114      fi
30115      if test $ac_cv_header_sys_bitypes_h = yes; then
30116        HAVE_SYS_BITYPES_H=1
30117      fi
30118
30119
30120  if test $APPLE_UNIVERSAL_BUILD = 0; then
30121
30122
30123  for gltype in ptrdiff_t size_t ; do
30124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
30125$as_echo_n "checking for bit size of $gltype... " >&6; }
30126if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
30127  $as_echo_n "(cached) " >&6
30128else
30129  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
30130  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30131     included before <wchar.h>.  */
30132  #include <stddef.h>
30133  #include <signal.h>
30134  #if HAVE_WCHAR_H
30135  # include <stdio.h>
30136  # include <time.h>
30137  # include <wchar.h>
30138  #endif
30139
30140#include <limits.h>"; then :
30141
30142else
30143  result=unknown
30144fi
30145
30146       eval gl_cv_bitsizeof_${gltype}=\$result
30147
30148fi
30149eval ac_res=\$gl_cv_bitsizeof_${gltype}
30150	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30151$as_echo "$ac_res" >&6; }
30152    eval result=\$gl_cv_bitsizeof_${gltype}
30153    if test $result = unknown; then
30154                                                result=0
30155    fi
30156    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
30157    cat >>confdefs.h <<_ACEOF
30158#define BITSIZEOF_${GLTYPE} $result
30159_ACEOF
30160
30161    eval BITSIZEOF_${GLTYPE}=\$result
30162  done
30163
30164
30165  fi
30166
30167
30168  for gltype in sig_atomic_t wchar_t wint_t ; do
30169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
30170$as_echo_n "checking for bit size of $gltype... " >&6; }
30171if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
30172  $as_echo_n "(cached) " >&6
30173else
30174  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
30175  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30176     included before <wchar.h>.  */
30177  #include <stddef.h>
30178  #include <signal.h>
30179  #if HAVE_WCHAR_H
30180  # include <stdio.h>
30181  # include <time.h>
30182  # include <wchar.h>
30183  #endif
30184
30185#include <limits.h>"; then :
30186
30187else
30188  result=unknown
30189fi
30190
30191       eval gl_cv_bitsizeof_${gltype}=\$result
30192
30193fi
30194eval ac_res=\$gl_cv_bitsizeof_${gltype}
30195	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30196$as_echo "$ac_res" >&6; }
30197    eval result=\$gl_cv_bitsizeof_${gltype}
30198    if test $result = unknown; then
30199                                                result=0
30200    fi
30201    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
30202    cat >>confdefs.h <<_ACEOF
30203#define BITSIZEOF_${GLTYPE} $result
30204_ACEOF
30205
30206    eval BITSIZEOF_${GLTYPE}=\$result
30207  done
30208
30209
30210
30211
30212  for gltype in sig_atomic_t wchar_t wint_t ; do
30213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
30214$as_echo_n "checking whether $gltype is signed... " >&6; }
30215if eval \${gl_cv_type_${gltype}_signed+:} false; then :
30216  $as_echo_n "(cached) " >&6
30217else
30218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30219/* end confdefs.h.  */
30220
30221  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30222     included before <wchar.h>.  */
30223  #include <stddef.h>
30224  #include <signal.h>
30225  #if HAVE_WCHAR_H
30226  # include <stdio.h>
30227  # include <time.h>
30228  # include <wchar.h>
30229  #endif
30230
30231            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
30232int
30233main ()
30234{
30235
30236  ;
30237  return 0;
30238}
30239_ACEOF
30240if ac_fn_c_try_compile "$LINENO"; then :
30241  result=yes
30242else
30243  result=no
30244fi
30245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30246       eval gl_cv_type_${gltype}_signed=\$result
30247
30248fi
30249eval ac_res=\$gl_cv_type_${gltype}_signed
30250	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30251$as_echo "$ac_res" >&6; }
30252    eval result=\$gl_cv_type_${gltype}_signed
30253    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
30254    if test "$result" = yes; then
30255      cat >>confdefs.h <<_ACEOF
30256#define HAVE_SIGNED_${GLTYPE} 1
30257_ACEOF
30258
30259      eval HAVE_SIGNED_${GLTYPE}=1
30260    else
30261      eval HAVE_SIGNED_${GLTYPE}=0
30262    fi
30263  done
30264
30265
30266  gl_cv_type_ptrdiff_t_signed=yes
30267  gl_cv_type_size_t_signed=no
30268  if test $APPLE_UNIVERSAL_BUILD = 0; then
30269
30270
30271  for gltype in ptrdiff_t size_t ; do
30272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
30273$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
30274if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
30275  $as_echo_n "(cached) " >&6
30276else
30277  eval gl_cv_type_${gltype}_suffix=no
30278       eval result=\$gl_cv_type_${gltype}_signed
30279       if test "$result" = yes; then
30280         glsufu=
30281       else
30282         glsufu=u
30283       fi
30284       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
30285         case $glsuf in
30286           '')  gltype1='int';;
30287           l)   gltype1='long int';;
30288           ll)  gltype1='long long int';;
30289           i64) gltype1='__int64';;
30290           u)   gltype1='unsigned int';;
30291           ul)  gltype1='unsigned long int';;
30292           ull) gltype1='unsigned long long int';;
30293           ui64)gltype1='unsigned __int64';;
30294         esac
30295         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30296/* end confdefs.h.  */
30297
30298  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30299     included before <wchar.h>.  */
30300  #include <stddef.h>
30301  #include <signal.h>
30302  #if HAVE_WCHAR_H
30303  # include <stdio.h>
30304  # include <time.h>
30305  # include <wchar.h>
30306  #endif
30307
30308              extern $gltype foo;
30309              extern $gltype1 foo;
30310int
30311main ()
30312{
30313
30314  ;
30315  return 0;
30316}
30317_ACEOF
30318if ac_fn_c_try_compile "$LINENO"; then :
30319  eval gl_cv_type_${gltype}_suffix=\$glsuf
30320fi
30321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30322         eval result=\$gl_cv_type_${gltype}_suffix
30323         test "$result" != no && break
30324       done
30325fi
30326eval ac_res=\$gl_cv_type_${gltype}_suffix
30327	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30328$as_echo "$ac_res" >&6; }
30329    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
30330    eval result=\$gl_cv_type_${gltype}_suffix
30331    test "$result" = no && result=
30332    eval ${GLTYPE}_SUFFIX=\$result
30333    cat >>confdefs.h <<_ACEOF
30334#define ${GLTYPE}_SUFFIX $result
30335_ACEOF
30336
30337  done
30338
30339
30340  fi
30341
30342
30343  for gltype in sig_atomic_t wchar_t wint_t ; do
30344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
30345$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
30346if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
30347  $as_echo_n "(cached) " >&6
30348else
30349  eval gl_cv_type_${gltype}_suffix=no
30350       eval result=\$gl_cv_type_${gltype}_signed
30351       if test "$result" = yes; then
30352         glsufu=
30353       else
30354         glsufu=u
30355       fi
30356       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
30357         case $glsuf in
30358           '')  gltype1='int';;
30359           l)   gltype1='long int';;
30360           ll)  gltype1='long long int';;
30361           i64) gltype1='__int64';;
30362           u)   gltype1='unsigned int';;
30363           ul)  gltype1='unsigned long int';;
30364           ull) gltype1='unsigned long long int';;
30365           ui64)gltype1='unsigned __int64';;
30366         esac
30367         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30368/* end confdefs.h.  */
30369
30370  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30371     included before <wchar.h>.  */
30372  #include <stddef.h>
30373  #include <signal.h>
30374  #if HAVE_WCHAR_H
30375  # include <stdio.h>
30376  # include <time.h>
30377  # include <wchar.h>
30378  #endif
30379
30380              extern $gltype foo;
30381              extern $gltype1 foo;
30382int
30383main ()
30384{
30385
30386  ;
30387  return 0;
30388}
30389_ACEOF
30390if ac_fn_c_try_compile "$LINENO"; then :
30391  eval gl_cv_type_${gltype}_suffix=\$glsuf
30392fi
30393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30394         eval result=\$gl_cv_type_${gltype}_suffix
30395         test "$result" != no && break
30396       done
30397fi
30398eval ac_res=\$gl_cv_type_${gltype}_suffix
30399	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30400$as_echo "$ac_res" >&6; }
30401    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
30402    eval result=\$gl_cv_type_${gltype}_suffix
30403    test "$result" = no && result=
30404    eval ${GLTYPE}_SUFFIX=\$result
30405    cat >>confdefs.h <<_ACEOF
30406#define ${GLTYPE}_SUFFIX $result
30407_ACEOF
30408
30409  done
30410
30411
30412
30413          if test $GNULIB_OVERRIDES_WINT_T = 1; then
30414    BITSIZEOF_WINT_T=32
30415  fi
30416
30417      ;;
30418  esac
30419
30420
30421
30422  LIMITS_H='limits.h'
30423   if test -n "$LIMITS_H"; then
30424  GL_GENERATE_LIMITS_H_TRUE=
30425  GL_GENERATE_LIMITS_H_FALSE='#'
30426else
30427  GL_GENERATE_LIMITS_H_TRUE='#'
30428  GL_GENERATE_LIMITS_H_FALSE=
30429fi
30430
30431
30432
30433
30434
30435
30436
30437   if test -n "$STDINT_H"; then
30438  GL_GENERATE_STDINT_H_TRUE=
30439  GL_GENERATE_STDINT_H_FALSE='#'
30440else
30441  GL_GENERATE_STDINT_H_TRUE='#'
30442  GL_GENERATE_STDINT_H_FALSE=
30443fi
30444
30445
30446
30447
30448
30449  GNULIB_IMAXABS=0;
30450  GNULIB_IMAXDIV=0;
30451  GNULIB_STRTOIMAX=0;
30452  GNULIB_STRTOUMAX=0;
30453    HAVE_DECL_IMAXABS=1;
30454  HAVE_DECL_IMAXDIV=1;
30455  HAVE_DECL_STRTOIMAX=1;
30456  HAVE_DECL_STRTOUMAX=1;
30457  HAVE_IMAXDIV_T=1;
30458  REPLACE_STRTOIMAX=0;
30459  REPLACE_STRTOUMAX=0;
30460  INT32_MAX_LT_INTMAX_MAX=1;
30461  INT64_MAX_EQ_LONG_MAX='defined _LP64';
30462  PRIPTR_PREFIX=__PRIPTR_PREFIX;
30463  UINT32_MAX_LT_UINTMAX_MAX=1;
30464  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480     if test $gl_cv_have_include_next = yes; then
30481       gl_cv_next_inttypes_h='<'inttypes.h'>'
30482     else
30483       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
30484$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
30485if ${gl_cv_next_inttypes_h+:} false; then :
30486  $as_echo_n "(cached) " >&6
30487else
30488
30489             if test $ac_cv_header_inttypes_h = yes; then
30490
30491
30492
30493
30494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30495/* end confdefs.h.  */
30496#include <inttypes.h>
30497_ACEOF
30498                case "$host_os" in
30499    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30500    *)    gl_absname_cpp="$ac_cpp" ;;
30501  esac
30502
30503  case "$host_os" in
30504    mingw*)
30505                                          gl_dirsep_regex='[/\\]'
30506      ;;
30507    *)
30508      gl_dirsep_regex='\/'
30509      ;;
30510  esac
30511      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30512  gl_header_literal_regex=`echo 'inttypes.h' \
30513                           | sed -e "$gl_make_literal_regex_sed"`
30514  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30515      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30516      s|^/[^/]|//&|
30517      p
30518      q
30519    }'
30520
30521        gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30522  sed -n "$gl_absolute_header_sed"`
30523
30524           gl_header=$gl_cv_absolute_inttypes_h
30525           gl_cv_next_inttypes_h='"'$gl_header'"'
30526          else
30527               gl_cv_next_inttypes_h='<'inttypes.h'>'
30528             fi
30529
30530
30531fi
30532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
30533$as_echo "$gl_cv_next_inttypes_h" >&6; }
30534     fi
30535     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
30536
30537     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30538       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30539       gl_next_as_first_directive='<'inttypes.h'>'
30540     else
30541       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30542       gl_next_as_first_directive=$gl_cv_next_inttypes_h
30543     fi
30544     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561  GNULIB_ACOSF=0;
30562  GNULIB_ACOSL=0;
30563  GNULIB_ASINF=0;
30564  GNULIB_ASINL=0;
30565  GNULIB_ATANF=0;
30566  GNULIB_ATANL=0;
30567  GNULIB_ATAN2F=0;
30568  GNULIB_CBRT=0;
30569  GNULIB_CBRTF=0;
30570  GNULIB_CBRTL=0;
30571  GNULIB_CEIL=0;
30572  GNULIB_CEILF=0;
30573  GNULIB_CEILL=0;
30574  GNULIB_COPYSIGN=0;
30575  GNULIB_COPYSIGNF=0;
30576  GNULIB_COPYSIGNL=0;
30577  GNULIB_COSF=0;
30578  GNULIB_COSL=0;
30579  GNULIB_COSHF=0;
30580  GNULIB_EXPF=0;
30581  GNULIB_EXPL=0;
30582  GNULIB_EXP2=0;
30583  GNULIB_EXP2F=0;
30584  GNULIB_EXP2L=0;
30585  GNULIB_EXPM1=0;
30586  GNULIB_EXPM1F=0;
30587  GNULIB_EXPM1L=0;
30588  GNULIB_FABSF=0;
30589  GNULIB_FABSL=0;
30590  GNULIB_FLOOR=0;
30591  GNULIB_FLOORF=0;
30592  GNULIB_FLOORL=0;
30593  GNULIB_FMA=0;
30594  GNULIB_FMAF=0;
30595  GNULIB_FMAL=0;
30596  GNULIB_FMOD=0;
30597  GNULIB_FMODF=0;
30598  GNULIB_FMODL=0;
30599  GNULIB_FREXPF=0;
30600  GNULIB_FREXP=0;
30601  GNULIB_FREXPL=0;
30602  GNULIB_HYPOT=0;
30603  GNULIB_HYPOTF=0;
30604  GNULIB_HYPOTL=0;
30605  GNULIB_ILOGB=0;
30606  GNULIB_ILOGBF=0;
30607  GNULIB_ILOGBL=0;
30608  GNULIB_ISFINITE=0;
30609  GNULIB_ISINF=0;
30610  GNULIB_ISNAN=0;
30611  GNULIB_ISNANF=0;
30612  GNULIB_ISNAND=0;
30613  GNULIB_ISNANL=0;
30614  GNULIB_LDEXPF=0;
30615  GNULIB_LDEXPL=0;
30616  GNULIB_LOG=0;
30617  GNULIB_LOGF=0;
30618  GNULIB_LOGL=0;
30619  GNULIB_LOG10=0;
30620  GNULIB_LOG10F=0;
30621  GNULIB_LOG10L=0;
30622  GNULIB_LOG1P=0;
30623  GNULIB_LOG1PF=0;
30624  GNULIB_LOG1PL=0;
30625  GNULIB_LOG2=0;
30626  GNULIB_LOG2F=0;
30627  GNULIB_LOG2L=0;
30628  GNULIB_LOGB=0;
30629  GNULIB_LOGBF=0;
30630  GNULIB_LOGBL=0;
30631  GNULIB_MODF=0;
30632  GNULIB_MODFF=0;
30633  GNULIB_MODFL=0;
30634  GNULIB_POWF=0;
30635  GNULIB_REMAINDER=0;
30636  GNULIB_REMAINDERF=0;
30637  GNULIB_REMAINDERL=0;
30638  GNULIB_RINT=0;
30639  GNULIB_RINTF=0;
30640  GNULIB_RINTL=0;
30641  GNULIB_ROUND=0;
30642  GNULIB_ROUNDF=0;
30643  GNULIB_ROUNDL=0;
30644  GNULIB_SIGNBIT=0;
30645  GNULIB_SINF=0;
30646  GNULIB_SINL=0;
30647  GNULIB_SINHF=0;
30648  GNULIB_SQRTF=0;
30649  GNULIB_SQRTL=0;
30650  GNULIB_TANF=0;
30651  GNULIB_TANL=0;
30652  GNULIB_TANHF=0;
30653  GNULIB_TRUNC=0;
30654  GNULIB_TRUNCF=0;
30655  GNULIB_TRUNCL=0;
30656    HAVE_ACOSF=1;
30657  HAVE_ACOSL=1;
30658  HAVE_ASINF=1;
30659  HAVE_ASINL=1;
30660  HAVE_ATANF=1;
30661  HAVE_ATANL=1;
30662  HAVE_ATAN2F=1;
30663  HAVE_CBRT=1;
30664  HAVE_CBRTF=1;
30665  HAVE_CBRTL=1;
30666  HAVE_COPYSIGN=1;
30667  HAVE_COPYSIGNL=1;
30668  HAVE_COSF=1;
30669  HAVE_COSL=1;
30670  HAVE_COSHF=1;
30671  HAVE_EXPF=1;
30672  HAVE_EXPL=1;
30673  HAVE_EXPM1=1;
30674  HAVE_EXPM1F=1;
30675  HAVE_FABSF=1;
30676  HAVE_FABSL=1;
30677  HAVE_FMA=1;
30678  HAVE_FMAF=1;
30679  HAVE_FMAL=1;
30680  HAVE_FMODF=1;
30681  HAVE_FMODL=1;
30682  HAVE_FREXPF=1;
30683  HAVE_HYPOTF=1;
30684  HAVE_HYPOTL=1;
30685  HAVE_ILOGB=1;
30686  HAVE_ILOGBF=1;
30687  HAVE_ILOGBL=1;
30688  HAVE_ISNANF=1;
30689  HAVE_ISNAND=1;
30690  HAVE_ISNANL=1;
30691  HAVE_LDEXPF=1;
30692  HAVE_LOGF=1;
30693  HAVE_LOGL=1;
30694  HAVE_LOG10F=1;
30695  HAVE_LOG10L=1;
30696  HAVE_LOG1P=1;
30697  HAVE_LOG1PF=1;
30698  HAVE_LOG1PL=1;
30699  HAVE_LOGBF=1;
30700  HAVE_LOGBL=1;
30701  HAVE_MODFF=1;
30702  HAVE_MODFL=1;
30703  HAVE_POWF=1;
30704  HAVE_REMAINDER=1;
30705  HAVE_REMAINDERF=1;
30706  HAVE_RINT=1;
30707  HAVE_RINTL=1;
30708  HAVE_SINF=1;
30709  HAVE_SINL=1;
30710  HAVE_SINHF=1;
30711  HAVE_SQRTF=1;
30712  HAVE_SQRTL=1;
30713  HAVE_TANF=1;
30714  HAVE_TANL=1;
30715  HAVE_TANHF=1;
30716  HAVE_DECL_ACOSL=1;
30717  HAVE_DECL_ASINL=1;
30718  HAVE_DECL_ATANL=1;
30719  HAVE_DECL_CBRTF=1;
30720  HAVE_DECL_CBRTL=1;
30721  HAVE_DECL_CEILF=1;
30722  HAVE_DECL_CEILL=1;
30723  HAVE_DECL_COPYSIGNF=1;
30724  HAVE_DECL_COSL=1;
30725  HAVE_DECL_EXPL=1;
30726  HAVE_DECL_EXP2=1;
30727  HAVE_DECL_EXP2F=1;
30728  HAVE_DECL_EXP2L=1;
30729  HAVE_DECL_EXPM1L=1;
30730  HAVE_DECL_FLOORF=1;
30731  HAVE_DECL_FLOORL=1;
30732  HAVE_DECL_FREXPL=1;
30733  HAVE_DECL_LDEXPL=1;
30734  HAVE_DECL_LOGL=1;
30735  HAVE_DECL_LOG10L=1;
30736  HAVE_DECL_LOG2=1;
30737  HAVE_DECL_LOG2F=1;
30738  HAVE_DECL_LOG2L=1;
30739  HAVE_DECL_LOGB=1;
30740  HAVE_DECL_REMAINDER=1;
30741  HAVE_DECL_REMAINDERL=1;
30742  HAVE_DECL_RINTF=1;
30743  HAVE_DECL_ROUND=1;
30744  HAVE_DECL_ROUNDF=1;
30745  HAVE_DECL_ROUNDL=1;
30746  HAVE_DECL_SINL=1;
30747  HAVE_DECL_SQRTL=1;
30748  HAVE_DECL_TANL=1;
30749  HAVE_DECL_TRUNC=1;
30750  HAVE_DECL_TRUNCF=1;
30751  HAVE_DECL_TRUNCL=1;
30752  REPLACE_ACOSF=0;
30753  REPLACE_ASINF=0;
30754  REPLACE_ATANF=0;
30755  REPLACE_ATAN2F=0;
30756  REPLACE_CBRTF=0;
30757  REPLACE_CBRTL=0;
30758  REPLACE_CEIL=0;
30759  REPLACE_CEILF=0;
30760  REPLACE_CEILL=0;
30761  REPLACE_COSF=0;
30762  REPLACE_COSHF=0;
30763  REPLACE_EXPF=0;
30764  REPLACE_EXPL=0;
30765  REPLACE_EXPM1=0;
30766  REPLACE_EXPM1F=0;
30767  REPLACE_EXPM1L=0;
30768  REPLACE_EXP2=0;
30769  REPLACE_EXP2L=0;
30770  REPLACE_FABSL=0;
30771  REPLACE_FLOOR=0;
30772  REPLACE_FLOORF=0;
30773  REPLACE_FLOORL=0;
30774  REPLACE_FMA=0;
30775  REPLACE_FMAF=0;
30776  REPLACE_FMAL=0;
30777  REPLACE_FMOD=0;
30778  REPLACE_FMODF=0;
30779  REPLACE_FMODL=0;
30780  REPLACE_FREXPF=0;
30781  REPLACE_FREXP=0;
30782  REPLACE_FREXPL=0;
30783  REPLACE_HUGE_VAL=0;
30784  REPLACE_HYPOT=0;
30785  REPLACE_HYPOTF=0;
30786  REPLACE_HYPOTL=0;
30787  REPLACE_ILOGB=0;
30788  REPLACE_ILOGBF=0;
30789  REPLACE_ILOGBL=0;
30790  REPLACE_ISFINITE=0;
30791  REPLACE_ISINF=0;
30792  REPLACE_ISNAN=0;
30793  REPLACE_LDEXPL=0;
30794  REPLACE_LOG=0;
30795  REPLACE_LOGF=0;
30796  REPLACE_LOGL=0;
30797  REPLACE_LOG10=0;
30798  REPLACE_LOG10F=0;
30799  REPLACE_LOG10L=0;
30800  REPLACE_LOG1P=0;
30801  REPLACE_LOG1PF=0;
30802  REPLACE_LOG1PL=0;
30803  REPLACE_LOG2=0;
30804  REPLACE_LOG2F=0;
30805  REPLACE_LOG2L=0;
30806  REPLACE_LOGB=0;
30807  REPLACE_LOGBF=0;
30808  REPLACE_LOGBL=0;
30809  REPLACE_MODF=0;
30810  REPLACE_MODFF=0;
30811  REPLACE_MODFL=0;
30812  REPLACE_NAN=0;
30813  REPLACE_REMAINDER=0;
30814  REPLACE_REMAINDERF=0;
30815  REPLACE_REMAINDERL=0;
30816  REPLACE_RINTL=0;
30817  REPLACE_ROUND=0;
30818  REPLACE_ROUNDF=0;
30819  REPLACE_ROUNDL=0;
30820  REPLACE_SIGNBIT=0;
30821  REPLACE_SIGNBIT_USING_GCC=0;
30822  REPLACE_SINF=0;
30823  REPLACE_SINHF=0;
30824  REPLACE_SQRTF=0;
30825  REPLACE_SQRTL=0;
30826  REPLACE_TANF=0;
30827  REPLACE_TANHF=0;
30828  REPLACE_TRUNC=0;
30829  REPLACE_TRUNCF=0;
30830  REPLACE_TRUNCL=0;
30831
30832
30833   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
30834$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
30835if ${ac_cv_c_bigendian+:} false; then :
30836  $as_echo_n "(cached) " >&6
30837else
30838  ac_cv_c_bigendian=unknown
30839    # See if we're dealing with a universal compiler.
30840    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30841/* end confdefs.h.  */
30842#ifndef __APPLE_CC__
30843	       not a universal capable compiler
30844	     #endif
30845	     typedef int dummy;
30846
30847_ACEOF
30848if ac_fn_c_try_compile "$LINENO"; then :
30849
30850	# Check for potential -arch flags.  It is not universal unless
30851	# there are at least two -arch flags with different values.
30852	ac_arch=
30853	ac_prev=
30854	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
30855	 if test -n "$ac_prev"; then
30856	   case $ac_word in
30857	     i?86 | x86_64 | ppc | ppc64)
30858	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
30859		 ac_arch=$ac_word
30860	       else
30861		 ac_cv_c_bigendian=universal
30862		 break
30863	       fi
30864	       ;;
30865	   esac
30866	   ac_prev=
30867	 elif test "x$ac_word" = "x-arch"; then
30868	   ac_prev=arch
30869	 fi
30870       done
30871fi
30872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30873    if test $ac_cv_c_bigendian = unknown; then
30874      # See if sys/param.h defines the BYTE_ORDER macro.
30875      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30876/* end confdefs.h.  */
30877#include <sys/types.h>
30878	     #include <sys/param.h>
30879
30880int
30881main ()
30882{
30883#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
30884		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
30885		     && LITTLE_ENDIAN)
30886	      bogus endian macros
30887	     #endif
30888
30889  ;
30890  return 0;
30891}
30892_ACEOF
30893if ac_fn_c_try_compile "$LINENO"; then :
30894  # It does; now see whether it defined to BIG_ENDIAN or not.
30895	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30896/* end confdefs.h.  */
30897#include <sys/types.h>
30898		#include <sys/param.h>
30899
30900int
30901main ()
30902{
30903#if BYTE_ORDER != BIG_ENDIAN
30904		 not big endian
30905		#endif
30906
30907  ;
30908  return 0;
30909}
30910_ACEOF
30911if ac_fn_c_try_compile "$LINENO"; then :
30912  ac_cv_c_bigendian=yes
30913else
30914  ac_cv_c_bigendian=no
30915fi
30916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30917fi
30918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30919    fi
30920    if test $ac_cv_c_bigendian = unknown; then
30921      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
30922      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30923/* end confdefs.h.  */
30924#include <limits.h>
30925
30926int
30927main ()
30928{
30929#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
30930	      bogus endian macros
30931	     #endif
30932
30933  ;
30934  return 0;
30935}
30936_ACEOF
30937if ac_fn_c_try_compile "$LINENO"; then :
30938  # It does; now see whether it defined to _BIG_ENDIAN or not.
30939	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30940/* end confdefs.h.  */
30941#include <limits.h>
30942
30943int
30944main ()
30945{
30946#ifndef _BIG_ENDIAN
30947		 not big endian
30948		#endif
30949
30950  ;
30951  return 0;
30952}
30953_ACEOF
30954if ac_fn_c_try_compile "$LINENO"; then :
30955  ac_cv_c_bigendian=yes
30956else
30957  ac_cv_c_bigendian=no
30958fi
30959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30960fi
30961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30962    fi
30963    if test $ac_cv_c_bigendian = unknown; then
30964      # Compile a test program.
30965      if test "$cross_compiling" = yes; then :
30966  # Try to guess by grepping values from an object file.
30967	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30968/* end confdefs.h.  */
30969short int ascii_mm[] =
30970		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
30971		short int ascii_ii[] =
30972		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
30973		int use_ascii (int i) {
30974		  return ascii_mm[i] + ascii_ii[i];
30975		}
30976		short int ebcdic_ii[] =
30977		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
30978		short int ebcdic_mm[] =
30979		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
30980		int use_ebcdic (int i) {
30981		  return ebcdic_mm[i] + ebcdic_ii[i];
30982		}
30983		extern int foo;
30984
30985int
30986main ()
30987{
30988return use_ascii (foo) == use_ebcdic (foo);
30989  ;
30990  return 0;
30991}
30992_ACEOF
30993if ac_fn_c_try_compile "$LINENO"; then :
30994  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
30995	      ac_cv_c_bigendian=yes
30996	    fi
30997	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
30998	      if test "$ac_cv_c_bigendian" = unknown; then
30999		ac_cv_c_bigendian=no
31000	      else
31001		# finding both strings is unlikely to happen, but who knows?
31002		ac_cv_c_bigendian=unknown
31003	      fi
31004	    fi
31005fi
31006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31007else
31008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31009/* end confdefs.h.  */
31010$ac_includes_default
31011int
31012main ()
31013{
31014
31015	     /* Are we little or big endian?  From Harbison&Steele.  */
31016	     union
31017	     {
31018	       long int l;
31019	       char c[sizeof (long int)];
31020	     } u;
31021	     u.l = 1;
31022	     return u.c[sizeof (long int) - 1] == 1;
31023
31024  ;
31025  return 0;
31026}
31027_ACEOF
31028if ac_fn_c_try_run "$LINENO"; then :
31029  ac_cv_c_bigendian=no
31030else
31031  ac_cv_c_bigendian=yes
31032fi
31033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31034  conftest.$ac_objext conftest.beam conftest.$ac_ext
31035fi
31036
31037    fi
31038fi
31039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
31040$as_echo "$ac_cv_c_bigendian" >&6; }
31041 case $ac_cv_c_bigendian in #(
31042   yes)
31043     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
31044;; #(
31045   no)
31046      ;; #(
31047   universal)
31048
31049$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
31050
31051     ;; #(
31052   *)
31053     as_fn_error $? "unknown endianness
31054 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
31055 esac
31056
31057
31058
31059  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
31060$as_echo_n "checking whether long double and double are the same... " >&6; }
31061if ${gl_cv_long_double_equals_double+:} false; then :
31062  $as_echo_n "(cached) " >&6
31063else
31064  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31065/* end confdefs.h.  */
31066#include <float.h>
31067int
31068main ()
31069{
31070typedef int check[sizeof (long double) == sizeof (double)
31071                              && LDBL_MANT_DIG == DBL_MANT_DIG
31072                              && LDBL_MAX_EXP == DBL_MAX_EXP
31073                              && LDBL_MIN_EXP == DBL_MIN_EXP
31074                              ? 1 : -1];
31075
31076  ;
31077  return 0;
31078}
31079_ACEOF
31080if ac_fn_c_try_compile "$LINENO"; then :
31081  gl_cv_long_double_equals_double=yes
31082else
31083  gl_cv_long_double_equals_double=no
31084fi
31085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31086
31087fi
31088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
31089$as_echo "$gl_cv_long_double_equals_double" >&6; }
31090  if test $gl_cv_long_double_equals_double = yes; then
31091
31092$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
31093
31094    HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
31095  else
31096    HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
31097  fi
31098
31099
31100
31101  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
31102$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
31103if ${gl_cv_cc_float_expbit0+:} false; then :
31104  $as_echo_n "(cached) " >&6
31105else
31106
31107      if test "$cross_compiling" = yes; then :
31108  gl_cv_cc_float_expbit0="word 0 bit 23"
31109else
31110  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31111/* end confdefs.h.  */
31112
31113#include <float.h>
31114#include <stddef.h>
31115#include <stdio.h>
31116#include <string.h>
31117#define NWORDS \
31118  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
31119typedef union { float value; unsigned int word[NWORDS]; } memory_float;
31120static unsigned int ored_words[NWORDS];
31121static unsigned int anded_words[NWORDS];
31122static void add_to_ored_words (float x)
31123{
31124  memory_float m;
31125  size_t i;
31126  /* Clear it first, in case
31127     sizeof (float) < sizeof (memory_float).  */
31128  memset (&m, 0, sizeof (memory_float));
31129  m.value = x;
31130  for (i = 0; i < NWORDS; i++)
31131    {
31132      ored_words[i] |= m.word[i];
31133      anded_words[i] &= m.word[i];
31134    }
31135}
31136int main ()
31137{
31138  size_t j;
31139  FILE *fp = fopen ("conftest.out", "w");
31140  if (fp == NULL)
31141    return 1;
31142  for (j = 0; j < NWORDS; j++)
31143    anded_words[j] = ~ (unsigned int) 0;
31144  add_to_ored_words (0.25f);
31145  add_to_ored_words (0.5f);
31146  add_to_ored_words (1.0f);
31147  add_to_ored_words (2.0f);
31148  add_to_ored_words (4.0f);
31149  /* Remove bits that are common (e.g. if representation of the first mantissa
31150     bit is explicit).  */
31151  for (j = 0; j < NWORDS; j++)
31152    ored_words[j] &= ~anded_words[j];
31153  /* Now find the nonzero word.  */
31154  for (j = 0; j < NWORDS; j++)
31155    if (ored_words[j] != 0)
31156      break;
31157  if (j < NWORDS)
31158    {
31159      size_t i;
31160      for (i = j + 1; i < NWORDS; i++)
31161        if (ored_words[i] != 0)
31162          {
31163            fprintf (fp, "unknown");
31164            return (fclose (fp) != 0);
31165          }
31166      for (i = 0; ; i++)
31167        if ((ored_words[j] >> i) & 1)
31168          {
31169            fprintf (fp, "word %d bit %d", (int) j, (int) i);
31170            return (fclose (fp) != 0);
31171          }
31172    }
31173  fprintf (fp, "unknown");
31174  return (fclose (fp) != 0);
31175}
31176
31177_ACEOF
31178if ac_fn_c_try_run "$LINENO"; then :
31179  gl_cv_cc_float_expbit0=`cat conftest.out`
31180else
31181  gl_cv_cc_float_expbit0="unknown"
31182fi
31183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31184  conftest.$ac_objext conftest.beam conftest.$ac_ext
31185fi
31186
31187      rm -f conftest.out
31188
31189fi
31190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
31191$as_echo "$gl_cv_cc_float_expbit0" >&6; }
31192  case "$gl_cv_cc_float_expbit0" in
31193    word*bit*)
31194      word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
31195      bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
31196
31197cat >>confdefs.h <<_ACEOF
31198#define FLT_EXPBIT0_WORD $word
31199_ACEOF
31200
31201
31202cat >>confdefs.h <<_ACEOF
31203#define FLT_EXPBIT0_BIT $bit
31204_ACEOF
31205
31206      ;;
31207  esac
31208
31209
31210
31211  ISNANF_LIBM=
31212
31213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
31214$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
31215if ${gl_cv_func_isnanf_no_libm+:} false; then :
31216  $as_echo_n "(cached) " >&6
31217else
31218
31219      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31220/* end confdefs.h.  */
31221#include <math.h>
31222             #ifndef __has_builtin
31223             # define __has_builtin(name) 0
31224             #endif
31225             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
31226             # undef isnanf
31227             # define isnanf(x) __builtin_isnanf ((float)(x))
31228             #elif defined isnan
31229             # undef isnanf
31230             # define isnanf(x) isnan ((float)(x))
31231             #endif
31232             float x;
31233int
31234main ()
31235{
31236return isnanf (x);
31237  ;
31238  return 0;
31239}
31240_ACEOF
31241if ac_fn_c_try_link "$LINENO"; then :
31242  gl_cv_func_isnanf_no_libm=yes
31243else
31244  gl_cv_func_isnanf_no_libm=no
31245fi
31246rm -f core conftest.err conftest.$ac_objext \
31247    conftest$ac_exeext conftest.$ac_ext
31248
31249fi
31250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
31251$as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
31252
31253  if test $gl_cv_func_isnanf_no_libm = no; then
31254
31255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used with libm" >&5
31256$as_echo_n "checking whether isnan(float) can be used with libm... " >&6; }
31257if ${gl_cv_func_isnanf_in_libm+:} false; then :
31258  $as_echo_n "(cached) " >&6
31259else
31260
31261      save_LIBS="$LIBS"
31262      LIBS="$LIBS -lm"
31263      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31264/* end confdefs.h.  */
31265#include <math.h>
31266             #ifndef __has_builtin
31267             # define __has_builtin(name) 0
31268             #endif
31269             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
31270             # undef isnanf
31271             # define isnanf(x) __builtin_isnanf ((float)(x))
31272             #elif defined isnan
31273             # undef isnanf
31274             # define isnanf(x) isnan ((float)(x))
31275             #endif
31276             float x;
31277int
31278main ()
31279{
31280return isnanf (x);
31281  ;
31282  return 0;
31283}
31284_ACEOF
31285if ac_fn_c_try_link "$LINENO"; then :
31286  gl_cv_func_isnanf_in_libm=yes
31287else
31288  gl_cv_func_isnanf_in_libm=no
31289fi
31290rm -f core conftest.err conftest.$ac_objext \
31291    conftest$ac_exeext conftest.$ac_ext
31292      LIBS="$save_LIBS"
31293
31294fi
31295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_in_libm" >&5
31296$as_echo "$gl_cv_func_isnanf_in_libm" >&6; }
31297
31298    if test $gl_cv_func_isnanf_in_libm = yes; then
31299      ISNANF_LIBM=-lm
31300    fi
31301  fi
31302    if test $gl_cv_func_isnanf_no_libm = yes \
31303     || test $gl_cv_func_isnanf_in_libm = yes; then
31304    save_LIBS="$LIBS"
31305    LIBS="$LIBS $ISNANF_LIBM"
31306
31307
31308
31309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
31310$as_echo_n "checking whether isnan(float) works... " >&6; }
31311if ${gl_cv_func_isnanf_works+:} false; then :
31312  $as_echo_n "(cached) " >&6
31313else
31314
31315      if test "$cross_compiling" = yes; then :
31316  case "$host_os" in
31317           irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
31318           mingw*) # Guess yes on mingw, no on MSVC.
31319             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31320/* end confdefs.h.  */
31321
31322#ifdef __MINGW32__
31323 Known
31324#endif
31325
31326_ACEOF
31327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31328  $EGREP "Known" >/dev/null 2>&1; then :
31329  gl_cv_func_isnanf_works="guessing yes"
31330else
31331  gl_cv_func_isnanf_works="guessing no"
31332fi
31333rm -f conftest*
31334
31335             ;;
31336           *) gl_cv_func_isnanf_works="guessing yes" ;;
31337         esac
31338
31339else
31340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31341/* end confdefs.h.  */
31342
31343#include <math.h>
31344#ifndef __has_builtin
31345# define __has_builtin(name) 0
31346#endif
31347#if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
31348# undef isnanf
31349# define isnanf(x) __builtin_isnanf ((float)(x))
31350#elif defined isnan
31351# undef isnanf
31352# define isnanf(x) isnan ((float)(x))
31353#endif
31354/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
31355#ifdef __DECC
31356static float
31357NaN ()
31358{
31359  static float zero = 0.0f;
31360  return zero / zero;
31361}
31362#else
31363# define NaN() (0.0f / 0.0f)
31364#endif
31365#define NWORDS \
31366  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
31367typedef union { unsigned int word[NWORDS]; float value; } memory_float;
31368int main()
31369{
31370  int result = 0;
31371
31372  if (isnanf (1.0f / 0.0f))
31373    result |= 1;
31374
31375  if (!isnanf (NaN ()))
31376    result |= 2;
31377
31378#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
31379  /* The isnanf function should be immune against changes in the sign bit and
31380     in the mantissa bits.  The xor operation twiddles a bit that can only be
31381     a sign bit or a mantissa bit.  */
31382  if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
31383    {
31384      memory_float m;
31385
31386      m.value = NaN ();
31387      /* Set the bits below the exponent to 01111...111.  */
31388      m.word[0] &= -1U << FLT_EXPBIT0_BIT;
31389      m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
31390      if (!isnanf (m.value))
31391        result |= 4;
31392    }
31393#endif
31394
31395  return result;
31396}
31397_ACEOF
31398if ac_fn_c_try_run "$LINENO"; then :
31399  gl_cv_func_isnanf_works=yes
31400else
31401  gl_cv_func_isnanf_works=no
31402fi
31403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31404  conftest.$ac_objext conftest.beam conftest.$ac_ext
31405fi
31406
31407
31408fi
31409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
31410$as_echo "$gl_cv_func_isnanf_works" >&6; }
31411
31412    LIBS="$save_LIBS"
31413    case "$gl_cv_func_isnanf_works" in
31414      *yes) gl_func_isnanf=yes ;;
31415      *)    gl_func_isnanf=no; ISNANF_LIBM= ;;
31416    esac
31417  else
31418    gl_func_isnanf=no
31419  fi
31420  if test $gl_func_isnanf != yes; then
31421    HAVE_ISNANF=0
31422  fi
31423
31424
31425
31426
31427  ISNAND_LIBM=
31428
31429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
31430$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
31431if ${gl_cv_func_isnand_no_libm+:} false; then :
31432  $as_echo_n "(cached) " >&6
31433else
31434
31435      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31436/* end confdefs.h.  */
31437#include <math.h>
31438             #if __GNUC__ >= 4
31439             # undef isnand
31440             # define isnand(x) __builtin_isnan ((double)(x))
31441             #else
31442             # undef isnand
31443             # define isnand(x) isnan ((double)(x))
31444             #endif
31445             double x;
31446int
31447main ()
31448{
31449return isnand (x);
31450  ;
31451  return 0;
31452}
31453_ACEOF
31454if ac_fn_c_try_link "$LINENO"; then :
31455  gl_cv_func_isnand_no_libm=yes
31456else
31457  gl_cv_func_isnand_no_libm=no
31458fi
31459rm -f core conftest.err conftest.$ac_objext \
31460    conftest$ac_exeext conftest.$ac_ext
31461
31462fi
31463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
31464$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
31465
31466  if test $gl_cv_func_isnand_no_libm = no; then
31467
31468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used with libm" >&5
31469$as_echo_n "checking whether isnan(double) can be used with libm... " >&6; }
31470if ${gl_cv_func_isnand_in_libm+:} false; then :
31471  $as_echo_n "(cached) " >&6
31472else
31473
31474      save_LIBS="$LIBS"
31475      LIBS="$LIBS -lm"
31476      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31477/* end confdefs.h.  */
31478#include <math.h>
31479             #if __GNUC__ >= 4
31480             # undef isnand
31481             # define isnand(x) __builtin_isnan ((double)(x))
31482             #elif defined isnan
31483             # undef isnand
31484             # define isnand(x) isnan ((double)(x))
31485             #endif
31486             double x;
31487int
31488main ()
31489{
31490return isnand (x);
31491  ;
31492  return 0;
31493}
31494_ACEOF
31495if ac_fn_c_try_link "$LINENO"; then :
31496  gl_cv_func_isnand_in_libm=yes
31497else
31498  gl_cv_func_isnand_in_libm=no
31499fi
31500rm -f core conftest.err conftest.$ac_objext \
31501    conftest$ac_exeext conftest.$ac_ext
31502      LIBS="$save_LIBS"
31503
31504fi
31505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_in_libm" >&5
31506$as_echo "$gl_cv_func_isnand_in_libm" >&6; }
31507
31508    if test $gl_cv_func_isnand_in_libm = yes; then
31509      ISNAND_LIBM=-lm
31510    fi
31511  fi
31512    if test $gl_cv_func_isnand_no_libm = yes \
31513     || test $gl_cv_func_isnand_in_libm = yes; then
31514    gl_func_isnand=yes
31515  else
31516    gl_func_isnand=no
31517    HAVE_ISNAND=0
31518  fi
31519
31520
31521
31522
31523  ISNANL_LIBM=
31524
31525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
31526$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
31527if ${gl_cv_func_isnanl_no_libm+:} false; then :
31528  $as_echo_n "(cached) " >&6
31529else
31530
31531      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31532/* end confdefs.h.  */
31533#include <math.h>
31534             #ifndef __has_builtin
31535             # define __has_builtin(name) 0
31536             #endif
31537             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
31538             # undef isnanl
31539             # define isnanl(x) __builtin_isnanl ((long double)(x))
31540             #elif defined isnan
31541             # undef isnanl
31542             # define isnanl(x) isnan ((long double)(x))
31543             #endif
31544             long double x;
31545int
31546main ()
31547{
31548return isnanl (x);
31549  ;
31550  return 0;
31551}
31552_ACEOF
31553if ac_fn_c_try_link "$LINENO"; then :
31554  gl_cv_func_isnanl_no_libm=yes
31555else
31556  gl_cv_func_isnanl_no_libm=no
31557fi
31558rm -f core conftest.err conftest.$ac_objext \
31559    conftest$ac_exeext conftest.$ac_ext
31560
31561fi
31562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
31563$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
31564
31565  if test $gl_cv_func_isnanl_no_libm = no; then
31566
31567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used with libm" >&5
31568$as_echo_n "checking whether isnan(long double) can be used with libm... " >&6; }
31569if ${gl_cv_func_isnanl_in_libm+:} false; then :
31570  $as_echo_n "(cached) " >&6
31571else
31572
31573      save_LIBS="$LIBS"
31574      LIBS="$LIBS -lm"
31575      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31576/* end confdefs.h.  */
31577#include <math.h>
31578             #ifndef __has_builtin
31579             # define __has_builtin(name) 0
31580             #endif
31581             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
31582             # undef isnanl
31583             # define isnanl(x) __builtin_isnanl ((long double)(x))
31584             #elif defined isnan
31585             # undef isnanl
31586             # define isnanl(x) isnan ((long double)(x))
31587             #endif
31588             long double x;
31589int
31590main ()
31591{
31592return isnanl (x);
31593  ;
31594  return 0;
31595}
31596_ACEOF
31597if ac_fn_c_try_link "$LINENO"; then :
31598  gl_cv_func_isnanl_in_libm=yes
31599else
31600  gl_cv_func_isnanl_in_libm=no
31601fi
31602rm -f core conftest.err conftest.$ac_objext \
31603    conftest$ac_exeext conftest.$ac_ext
31604      LIBS="$save_LIBS"
31605
31606fi
31607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_in_libm" >&5
31608$as_echo "$gl_cv_func_isnanl_in_libm" >&6; }
31609
31610    if test $gl_cv_func_isnanl_in_libm = yes; then
31611      ISNANL_LIBM=-lm
31612    fi
31613  fi
31614    if test $gl_cv_func_isnanl_no_libm = yes \
31615     || test $gl_cv_func_isnanl_in_libm = yes; then
31616    save_LIBS="$LIBS"
31617    LIBS="$LIBS $ISNANL_LIBM"
31618
31619
31620
31621
31622     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
31623$as_echo_n "checking whether isnanl works... " >&6; }
31624if ${gl_cv_func_isnanl_works+:} false; then :
31625  $as_echo_n "(cached) " >&6
31626else
31627
31628      if test "$cross_compiling" = yes; then :
31629  case "$host_os" in
31630           mingw*) # Guess yes on mingw, no on MSVC.
31631             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31632/* end confdefs.h.  */
31633
31634#ifdef __MINGW32__
31635 Known
31636#endif
31637
31638_ACEOF
31639if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31640  $EGREP "Known" >/dev/null 2>&1; then :
31641  gl_cv_func_isnanl_works="guessing yes"
31642else
31643  gl_cv_func_isnanl_works="guessing no"
31644fi
31645rm -f conftest*
31646
31647             ;;
31648           *) gl_cv_func_isnanl_works="guessing yes" ;;
31649         esac
31650
31651else
31652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31653/* end confdefs.h.  */
31654
31655#include <float.h>
31656#include <limits.h>
31657#include <math.h>
31658#ifndef __has_builtin
31659# define __has_builtin(name) 0
31660#endif
31661#if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
31662# undef isnanl
31663# define isnanl(x) __builtin_isnanl ((long double)(x))
31664#elif defined isnan
31665# undef isnanl
31666# define isnanl(x) isnan ((long double)(x))
31667#endif
31668#define NWORDS \
31669  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
31670typedef union { unsigned int word[NWORDS]; long double value; }
31671        memory_long_double;
31672/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
31673   runtime type conversion.  */
31674#ifdef __sgi
31675static long double NaNl ()
31676{
31677  double zero = 0.0;
31678  return zero / zero;
31679}
31680#else
31681# define NaNl() (0.0L / 0.0L)
31682#endif
31683int main ()
31684{
31685  int result = 0;
31686
31687  if (!isnanl (NaNl ()))
31688    result |= 1;
31689
31690  {
31691    memory_long_double m;
31692    unsigned int i;
31693
31694    /* The isnanl function should be immune against changes in the sign bit and
31695       in the mantissa bits.  The xor operation twiddles a bit that can only be
31696       a sign bit or a mantissa bit (since the exponent never extends to
31697       bit 31).  */
31698    m.value = NaNl ();
31699    m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
31700    for (i = 0; i < NWORDS; i++)
31701      m.word[i] |= 1;
31702    if (!isnanl (m.value))
31703      result |= 1;
31704  }
31705
31706#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
31707/* Representation of an 80-bit 'long double' as an initializer for a sequence
31708   of 'unsigned int' words.  */
31709# ifdef WORDS_BIGENDIAN
31710#  define LDBL80_WORDS(exponent,manthi,mantlo) \
31711     { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
31712       ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
31713       (unsigned int) (mantlo) << 16                                        \
31714     }
31715# else
31716#  define LDBL80_WORDS(exponent,manthi,mantlo) \
31717     { mantlo, manthi, exponent }
31718# endif
31719  { /* Quiet NaN.  */
31720    static memory_long_double x =
31721      { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
31722    if (!isnanl (x.value))
31723      result |= 2;
31724  }
31725  {
31726    /* Signalling NaN.  */
31727    static memory_long_double x =
31728      { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
31729    if (!isnanl (x.value))
31730      result |= 2;
31731  }
31732  /* isnanl should return something even for noncanonical values.  */
31733  { /* Pseudo-NaN.  */
31734    static memory_long_double x =
31735      { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
31736    if (isnanl (x.value) && !isnanl (x.value))
31737      result |= 4;
31738  }
31739  { /* Pseudo-Infinity.  */
31740    static memory_long_double x =
31741      { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
31742    if (isnanl (x.value) && !isnanl (x.value))
31743      result |= 8;
31744  }
31745  { /* Pseudo-Zero.  */
31746    static memory_long_double x =
31747      { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
31748    if (isnanl (x.value) && !isnanl (x.value))
31749      result |= 16;
31750  }
31751  { /* Unnormalized number.  */
31752    static memory_long_double x =
31753      { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
31754    if (isnanl (x.value) && !isnanl (x.value))
31755      result |= 32;
31756  }
31757  { /* Pseudo-Denormal.  */
31758    static memory_long_double x =
31759      { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
31760    if (isnanl (x.value) && !isnanl (x.value))
31761      result |= 64;
31762  }
31763#endif
31764
31765  return result;
31766}
31767_ACEOF
31768if ac_fn_c_try_run "$LINENO"; then :
31769  gl_cv_func_isnanl_works=yes
31770else
31771  gl_cv_func_isnanl_works=no
31772fi
31773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31774  conftest.$ac_objext conftest.beam conftest.$ac_ext
31775fi
31776
31777
31778fi
31779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
31780$as_echo "$gl_cv_func_isnanl_works" >&6; }
31781
31782    LIBS="$save_LIBS"
31783    case "$gl_cv_func_isnanl_works" in
31784      *yes) gl_func_isnanl=yes ;;
31785      *)    gl_func_isnanl=no; ISNANL_LIBM= ;;
31786    esac
31787  else
31788    gl_func_isnanl=no
31789  fi
31790  if test $gl_func_isnanl != yes; then
31791    HAVE_ISNANL=0
31792  fi
31793
31794
31795
31796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
31797$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
31798if ${gl_cv_cc_double_expbit0+:} false; then :
31799  $as_echo_n "(cached) " >&6
31800else
31801
31802      if test "$cross_compiling" = yes; then :
31803
31804                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31805/* end confdefs.h.  */
31806
31807#if defined arm || defined __arm || defined __arm__
31808  mixed_endianness
31809#endif
31810
31811_ACEOF
31812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31813  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
31814  gl_cv_cc_double_expbit0="unknown"
31815else
31816
31817                                                         :
31818if ${ac_cv_c_bigendian+:} false; then :
31819  $as_echo_n "(cached) " >&6
31820else
31821  ac_cv_c_bigendian=unknown
31822    # See if we're dealing with a universal compiler.
31823    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31824/* end confdefs.h.  */
31825#ifndef __APPLE_CC__
31826	       not a universal capable compiler
31827	     #endif
31828	     typedef int dummy;
31829
31830_ACEOF
31831if ac_fn_c_try_compile "$LINENO"; then :
31832
31833	# Check for potential -arch flags.  It is not universal unless
31834	# there are at least two -arch flags with different values.
31835	ac_arch=
31836	ac_prev=
31837	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
31838	 if test -n "$ac_prev"; then
31839	   case $ac_word in
31840	     i?86 | x86_64 | ppc | ppc64)
31841	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
31842		 ac_arch=$ac_word
31843	       else
31844		 ac_cv_c_bigendian=universal
31845		 break
31846	       fi
31847	       ;;
31848	   esac
31849	   ac_prev=
31850	 elif test "x$ac_word" = "x-arch"; then
31851	   ac_prev=arch
31852	 fi
31853       done
31854fi
31855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31856    if test $ac_cv_c_bigendian = unknown; then
31857      # See if sys/param.h defines the BYTE_ORDER macro.
31858      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31859/* end confdefs.h.  */
31860#include <sys/types.h>
31861	     #include <sys/param.h>
31862
31863int
31864main ()
31865{
31866#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
31867		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
31868		     && LITTLE_ENDIAN)
31869	      bogus endian macros
31870	     #endif
31871
31872  ;
31873  return 0;
31874}
31875_ACEOF
31876if ac_fn_c_try_compile "$LINENO"; then :
31877  # It does; now see whether it defined to BIG_ENDIAN or not.
31878	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31879/* end confdefs.h.  */
31880#include <sys/types.h>
31881		#include <sys/param.h>
31882
31883int
31884main ()
31885{
31886#if BYTE_ORDER != BIG_ENDIAN
31887		 not big endian
31888		#endif
31889
31890  ;
31891  return 0;
31892}
31893_ACEOF
31894if ac_fn_c_try_compile "$LINENO"; then :
31895  ac_cv_c_bigendian=yes
31896else
31897  ac_cv_c_bigendian=no
31898fi
31899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31900fi
31901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31902    fi
31903    if test $ac_cv_c_bigendian = unknown; then
31904      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
31905      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31906/* end confdefs.h.  */
31907#include <limits.h>
31908
31909int
31910main ()
31911{
31912#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
31913	      bogus endian macros
31914	     #endif
31915
31916  ;
31917  return 0;
31918}
31919_ACEOF
31920if ac_fn_c_try_compile "$LINENO"; then :
31921  # It does; now see whether it defined to _BIG_ENDIAN or not.
31922	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31923/* end confdefs.h.  */
31924#include <limits.h>
31925
31926int
31927main ()
31928{
31929#ifndef _BIG_ENDIAN
31930		 not big endian
31931		#endif
31932
31933  ;
31934  return 0;
31935}
31936_ACEOF
31937if ac_fn_c_try_compile "$LINENO"; then :
31938  ac_cv_c_bigendian=yes
31939else
31940  ac_cv_c_bigendian=no
31941fi
31942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31943fi
31944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31945    fi
31946    if test $ac_cv_c_bigendian = unknown; then
31947      # Compile a test program.
31948      if test "$cross_compiling" = yes; then :
31949  # Try to guess by grepping values from an object file.
31950	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31951/* end confdefs.h.  */
31952short int ascii_mm[] =
31953		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
31954		short int ascii_ii[] =
31955		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
31956		int use_ascii (int i) {
31957		  return ascii_mm[i] + ascii_ii[i];
31958		}
31959		short int ebcdic_ii[] =
31960		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
31961		short int ebcdic_mm[] =
31962		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
31963		int use_ebcdic (int i) {
31964		  return ebcdic_mm[i] + ebcdic_ii[i];
31965		}
31966		extern int foo;
31967
31968int
31969main ()
31970{
31971return use_ascii (foo) == use_ebcdic (foo);
31972  ;
31973  return 0;
31974}
31975_ACEOF
31976if ac_fn_c_try_compile "$LINENO"; then :
31977  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
31978	      ac_cv_c_bigendian=yes
31979	    fi
31980	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
31981	      if test "$ac_cv_c_bigendian" = unknown; then
31982		ac_cv_c_bigendian=no
31983	      else
31984		# finding both strings is unlikely to happen, but who knows?
31985		ac_cv_c_bigendian=unknown
31986	      fi
31987	    fi
31988fi
31989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31990else
31991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31992/* end confdefs.h.  */
31993$ac_includes_default
31994int
31995main ()
31996{
31997
31998	     /* Are we little or big endian?  From Harbison&Steele.  */
31999	     union
32000	     {
32001	       long int l;
32002	       char c[sizeof (long int)];
32003	     } u;
32004	     u.l = 1;
32005	     return u.c[sizeof (long int) - 1] == 1;
32006
32007  ;
32008  return 0;
32009}
32010_ACEOF
32011if ac_fn_c_try_run "$LINENO"; then :
32012  ac_cv_c_bigendian=no
32013else
32014  ac_cv_c_bigendian=yes
32015fi
32016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32017  conftest.$ac_objext conftest.beam conftest.$ac_ext
32018fi
32019
32020    fi
32021fi
32022:
32023 case $ac_cv_c_bigendian in #(
32024   yes)
32025     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
32026   no)
32027     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
32028   universal)
32029
32030$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
32031
32032     ;; #(
32033   *)
32034     gl_cv_cc_double_expbit0="unknown" ;;
32035 esac
32036
32037
32038fi
32039rm -f conftest*
32040
32041
32042else
32043  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32044/* end confdefs.h.  */
32045
32046#include <float.h>
32047#include <stddef.h>
32048#include <stdio.h>
32049#include <string.h>
32050#define NWORDS \
32051  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
32052typedef union { double value; unsigned int word[NWORDS]; } memory_double;
32053static unsigned int ored_words[NWORDS];
32054static unsigned int anded_words[NWORDS];
32055static void add_to_ored_words (double x)
32056{
32057  memory_double m;
32058  size_t i;
32059  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
32060  memset (&m, 0, sizeof (memory_double));
32061  m.value = x;
32062  for (i = 0; i < NWORDS; i++)
32063    {
32064      ored_words[i] |= m.word[i];
32065      anded_words[i] &= m.word[i];
32066    }
32067}
32068int main ()
32069{
32070  size_t j;
32071  FILE *fp = fopen ("conftest.out", "w");
32072  if (fp == NULL)
32073    return 1;
32074  for (j = 0; j < NWORDS; j++)
32075    anded_words[j] = ~ (unsigned int) 0;
32076  add_to_ored_words (0.25);
32077  add_to_ored_words (0.5);
32078  add_to_ored_words (1.0);
32079  add_to_ored_words (2.0);
32080  add_to_ored_words (4.0);
32081  /* Remove bits that are common (e.g. if representation of the first mantissa
32082     bit is explicit).  */
32083  for (j = 0; j < NWORDS; j++)
32084    ored_words[j] &= ~anded_words[j];
32085  /* Now find the nonzero word.  */
32086  for (j = 0; j < NWORDS; j++)
32087    if (ored_words[j] != 0)
32088      break;
32089  if (j < NWORDS)
32090    {
32091      size_t i;
32092      for (i = j + 1; i < NWORDS; i++)
32093        if (ored_words[i] != 0)
32094          {
32095            fprintf (fp, "unknown");
32096            return (fclose (fp) != 0);
32097          }
32098      for (i = 0; ; i++)
32099        if ((ored_words[j] >> i) & 1)
32100          {
32101            fprintf (fp, "word %d bit %d", (int) j, (int) i);
32102            return (fclose (fp) != 0);
32103          }
32104    }
32105  fprintf (fp, "unknown");
32106  return (fclose (fp) != 0);
32107}
32108
32109_ACEOF
32110if ac_fn_c_try_run "$LINENO"; then :
32111  gl_cv_cc_double_expbit0=`cat conftest.out`
32112else
32113  gl_cv_cc_double_expbit0="unknown"
32114fi
32115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32116  conftest.$ac_objext conftest.beam conftest.$ac_ext
32117fi
32118
32119      rm -f conftest.out
32120
32121fi
32122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
32123$as_echo "$gl_cv_cc_double_expbit0" >&6; }
32124  case "$gl_cv_cc_double_expbit0" in
32125    word*bit*)
32126      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
32127      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
32128
32129cat >>confdefs.h <<_ACEOF
32130#define DBL_EXPBIT0_WORD $word
32131_ACEOF
32132
32133
32134cat >>confdefs.h <<_ACEOF
32135#define DBL_EXPBIT0_BIT $bit
32136_ACEOF
32137
32138      ;;
32139  esac
32140
32141
32142  GNULIB_ISWBLANK=0;
32143  GNULIB_ISWDIGIT=0;
32144  GNULIB_ISWXDIGIT=0;
32145  GNULIB_WCTYPE=0;
32146  GNULIB_ISWCTYPE=0;
32147  GNULIB_WCTRANS=0;
32148  GNULIB_TOWCTRANS=0;
32149    HAVE_ISWBLANK=1;
32150  HAVE_WCTYPE_T=1;
32151  HAVE_WCTRANS_T=1;
32152  REPLACE_ISWBLANK=0;
32153  REPLACE_ISWDIGIT=0;
32154  REPLACE_ISWXDIGIT=0;
32155
32156
32157
32158
32159
32160
32161
32162  if test $ac_cv_header_crtdefs_h = yes; then
32163    HAVE_CRTDEFS_H=1
32164  else
32165    HAVE_CRTDEFS_H=0
32166  fi
32167
32168
32169
32170
32171
32172
32173
32174
32175
32176  if test $ac_cv_func_iswcntrl = yes; then
32177    HAVE_ISWCNTRL=1
32178  else
32179    HAVE_ISWCNTRL=0
32180  fi
32181
32182
32183
32184  if test $gt_cv_c_wint_t = yes; then
32185    HAVE_WINT_T=1
32186  else
32187    HAVE_WINT_T=0
32188  fi
32189
32190
32191
32192
32193
32194
32195
32196
32197
32198
32199
32200
32201
32202     if test $gl_cv_have_include_next = yes; then
32203       gl_cv_next_wctype_h='<'wctype.h'>'
32204     else
32205       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
32206$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
32207if ${gl_cv_next_wctype_h+:} false; then :
32208  $as_echo_n "(cached) " >&6
32209else
32210
32211             if test $ac_cv_header_wctype_h = yes; then
32212
32213
32214
32215
32216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32217/* end confdefs.h.  */
32218#include <wctype.h>
32219_ACEOF
32220                case "$host_os" in
32221    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32222    *)    gl_absname_cpp="$ac_cpp" ;;
32223  esac
32224
32225  case "$host_os" in
32226    mingw*)
32227                                          gl_dirsep_regex='[/\\]'
32228      ;;
32229    *)
32230      gl_dirsep_regex='\/'
32231      ;;
32232  esac
32233      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32234  gl_header_literal_regex=`echo 'wctype.h' \
32235                           | sed -e "$gl_make_literal_regex_sed"`
32236  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32237      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32238      s|^/[^/]|//&|
32239      p
32240      q
32241    }'
32242
32243        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32244  sed -n "$gl_absolute_header_sed"`
32245
32246           gl_header=$gl_cv_absolute_wctype_h
32247           gl_cv_next_wctype_h='"'$gl_header'"'
32248          else
32249               gl_cv_next_wctype_h='<'wctype.h'>'
32250             fi
32251
32252
32253fi
32254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
32255$as_echo "$gl_cv_next_wctype_h" >&6; }
32256     fi
32257     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
32258
32259     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32260       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32261       gl_next_as_first_directive='<'wctype.h'>'
32262     else
32263       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32264       gl_next_as_first_directive=$gl_cv_next_wctype_h
32265     fi
32266     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
32267
32268
32269
32270
32271  if test $ac_cv_header_wctype_h = yes; then
32272    if test $ac_cv_func_iswcntrl = yes; then
32273                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
32274$as_echo_n "checking whether iswcntrl works... " >&6; }
32275if ${gl_cv_func_iswcntrl_works+:} false; then :
32276  $as_echo_n "(cached) " >&6
32277else
32278
32279          if test "$cross_compiling" = yes; then :
32280               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32281/* end confdefs.h.  */
32282#include <stdlib.h>
32283                          #if __GNU_LIBRARY__ == 1
32284                          Linux libc5 i18n is broken.
32285                          #endif
32286int
32287main ()
32288{
32289
32290  ;
32291  return 0;
32292}
32293_ACEOF
32294if ac_fn_c_try_compile "$LINENO"; then :
32295  gl_cv_func_iswcntrl_works="guessing yes"
32296else
32297  gl_cv_func_iswcntrl_works="guessing no"
32298fi
32299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32300
32301else
32302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32303/* end confdefs.h.  */
32304
32305               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32306                  included before <wchar.h>.
32307                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32308                  must be included before <wchar.h>.  */
32309               #include <stddef.h>
32310               #include <stdio.h>
32311               #include <time.h>
32312               #include <wchar.h>
32313               #include <wctype.h>
32314               int main () { return iswprint ('x') == 0; }
32315
32316_ACEOF
32317if ac_fn_c_try_run "$LINENO"; then :
32318  gl_cv_func_iswcntrl_works=yes
32319else
32320  gl_cv_func_iswcntrl_works=no
32321fi
32322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32323  conftest.$ac_objext conftest.beam conftest.$ac_ext
32324fi
32325
32326
32327fi
32328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
32329$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
32330    fi
32331    HAVE_WCTYPE_H=1
32332  else
32333    HAVE_WCTYPE_H=0
32334  fi
32335
32336
32337  if test $GNULIB_OVERRIDES_WINT_T = 1; then
32338    REPLACE_ISWCNTRL=1
32339  else
32340    case "$gl_cv_func_iswcntrl_works" in
32341      *yes) REPLACE_ISWCNTRL=0 ;;
32342      *)    REPLACE_ISWCNTRL=1 ;;
32343    esac
32344  fi
32345
32346
32347  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
32348        :
32349  fi
32350
32351  if test $REPLACE_ISWCNTRL = 1; then
32352    REPLACE_TOWLOWER=1
32353  else
32354    for ac_func in towlower
32355do :
32356  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
32357if test "x$ac_cv_func_towlower" = xyes; then :
32358  cat >>confdefs.h <<_ACEOF
32359#define HAVE_TOWLOWER 1
32360_ACEOF
32361
32362fi
32363done
32364
32365    if test $ac_cv_func_towlower = yes; then
32366      REPLACE_TOWLOWER=0
32367    else
32368      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32369             included before <wchar.h>.
32370             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32371             must be included before <wchar.h>.  */
32372          #include <stddef.h>
32373          #include <stdio.h>
32374          #include <time.h>
32375          #include <wchar.h>
32376          #if HAVE_WCTYPE_H
32377          # include <wctype.h>
32378          #endif
32379
32380"
32381if test "x$ac_cv_have_decl_towlower" = xyes; then :
32382  ac_have_decl=1
32383else
32384  ac_have_decl=0
32385fi
32386
32387cat >>confdefs.h <<_ACEOF
32388#define HAVE_DECL_TOWLOWER $ac_have_decl
32389_ACEOF
32390
32391      if test $ac_cv_have_decl_towlower = yes; then
32392                                REPLACE_TOWLOWER=1
32393      else
32394        REPLACE_TOWLOWER=0
32395      fi
32396    fi
32397  fi
32398
32399
32400  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
32401        :
32402  fi
32403
32404          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
32405$as_echo_n "checking for wctype_t... " >&6; }
32406if ${gl_cv_type_wctype_t+:} false; then :
32407  $as_echo_n "(cached) " >&6
32408else
32409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32410/* end confdefs.h.  */
32411/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32412               included before <wchar.h>.
32413               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32414               must be included before <wchar.h>.  */
32415            #include <stddef.h>
32416            #include <stdio.h>
32417            #include <time.h>
32418            #include <wchar.h>
32419            #if HAVE_WCTYPE_H
32420            # include <wctype.h>
32421            #endif
32422            wctype_t a;
32423
32424int
32425main ()
32426{
32427
32428  ;
32429  return 0;
32430}
32431_ACEOF
32432if ac_fn_c_try_compile "$LINENO"; then :
32433  gl_cv_type_wctype_t=yes
32434else
32435  gl_cv_type_wctype_t=no
32436fi
32437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32438
32439fi
32440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
32441$as_echo "$gl_cv_type_wctype_t" >&6; }
32442  if test $gl_cv_type_wctype_t = no; then
32443    HAVE_WCTYPE_T=0
32444  fi
32445
32446      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
32447$as_echo_n "checking for wctrans_t... " >&6; }
32448if ${gl_cv_type_wctrans_t+:} false; then :
32449  $as_echo_n "(cached) " >&6
32450else
32451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32452/* end confdefs.h.  */
32453/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32454               included before <wchar.h>.
32455               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32456               must be included before <wchar.h>.  */
32457            #include <stddef.h>
32458            #include <stdio.h>
32459            #include <time.h>
32460            #include <wchar.h>
32461            #include <wctype.h>
32462            wctrans_t a;
32463
32464int
32465main ()
32466{
32467
32468  ;
32469  return 0;
32470}
32471_ACEOF
32472if ac_fn_c_try_compile "$LINENO"; then :
32473  gl_cv_type_wctrans_t=yes
32474else
32475  gl_cv_type_wctrans_t=no
32476fi
32477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32478
32479fi
32480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
32481$as_echo "$gl_cv_type_wctrans_t" >&6; }
32482  if test $gl_cv_type_wctrans_t = no; then
32483    HAVE_WCTRANS_T=0
32484  fi
32485
32486
32487
32488
32489
32490
32491
32492
32493
32494
32495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
32496$as_echo_n "checking for a traditional japanese locale... " >&6; }
32497if ${gt_cv_locale_ja+:} false; then :
32498  $as_echo_n "(cached) " >&6
32499else
32500
32501    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32502/* end confdefs.h.  */
32503
32504#include <locale.h>
32505#include <time.h>
32506#if HAVE_LANGINFO_CODESET
32507# include <langinfo.h>
32508#endif
32509#include <stdlib.h>
32510#include <string.h>
32511struct tm t;
32512char buf[16];
32513int main ()
32514{
32515  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
32516     imitates locale dependent behaviour by looking at the environment
32517     variables, and all locales use the UTF-8 encoding.  */
32518#if defined __BEOS__ || defined __HAIKU__
32519  return 1;
32520#else
32521  /* Check whether the given locale name is recognized by the system.  */
32522# if defined _WIN32 && !defined __CYGWIN__
32523  /* On native Windows, setlocale(category, "") looks at the system settings,
32524     not at the environment variables.  Also, when an encoding suffix such
32525     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32526     category of the locale to "C".  */
32527  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32528      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32529    return 1;
32530# else
32531  if (setlocale (LC_ALL, "") == NULL) return 1;
32532# endif
32533  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32534     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32535     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32536     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32537     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32538     some unit tests fail.
32539     On MirBSD 10, when an unsupported locale is specified, setlocale()
32540     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
32541# if HAVE_LANGINFO_CODESET
32542  {
32543    const char *cs = nl_langinfo (CODESET);
32544    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32545        || strcmp (cs, "UTF-8") == 0)
32546      return 1;
32547  }
32548# endif
32549# ifdef __CYGWIN__
32550  /* On Cygwin, avoid locale names without encoding suffix, because the
32551     locale_charset() function relies on the encoding suffix.  Note that
32552     LC_ALL is set on the command line.  */
32553  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32554# endif
32555  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
32556     on Cygwin 1.5.x.  */
32557  if (MB_CUR_MAX == 1)
32558    return 1;
32559  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
32560     This excludes the UTF-8 encoding (except on MirBSD).  */
32561  {
32562    const char *p;
32563    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32564    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
32565    for (p = buf; *p != '\0'; p++)
32566      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
32567        return 1;
32568  }
32569  return 0;
32570#endif
32571}
32572
32573_ACEOF
32574    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32575  (eval $ac_link) 2>&5
32576  ac_status=$?
32577  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32578  test $ac_status = 0; } && test -s conftest$ac_exeext; then
32579      case "$host_os" in
32580        # Handle native Windows specially, because there setlocale() interprets
32581        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32582        # "fr" or "fra" as "French" or "French_France.1252",
32583        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32584        # "ja" as "Japanese" or "Japanese_Japan.932",
32585        # and similar.
32586        mingw*)
32587          # Note that on native Windows, the Japanese locale is
32588          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
32589          # cannot use it here.
32590          gt_cv_locale_ja=none
32591          ;;
32592        *)
32593          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32594          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32595          # configure script would override the LC_ALL setting. Likewise for
32596          # LC_CTYPE, which is also set at the beginning of the configure script.
32597          # Test for the AIX locale name.
32598          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32599            gt_cv_locale_ja=ja_JP
32600          else
32601            # Test for the locale name with explicit encoding suffix.
32602            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32603              gt_cv_locale_ja=ja_JP.EUC-JP
32604            else
32605              # Test for the HP-UX, OSF/1, NetBSD locale name.
32606              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32607                gt_cv_locale_ja=ja_JP.eucJP
32608              else
32609                # Test for the IRIX, FreeBSD locale name.
32610                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32611                  gt_cv_locale_ja=ja_JP.EUC
32612                else
32613                  # Test for the Solaris 7 locale name.
32614                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32615                    gt_cv_locale_ja=ja
32616                  else
32617                    # Special test for NetBSD 1.6.
32618                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
32619                      gt_cv_locale_ja=ja_JP.eucJP
32620                    else
32621                      # None found.
32622                      gt_cv_locale_ja=none
32623                    fi
32624                  fi
32625                fi
32626              fi
32627            fi
32628          fi
32629          ;;
32630      esac
32631    fi
32632    rm -fr conftest*
32633
32634fi
32635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
32636$as_echo "$gt_cv_locale_ja" >&6; }
32637  LOCALE_JA=$gt_cv_locale_ja
32638
32639
32640
32641
32642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
32643$as_echo_n "checking for a french Unicode locale... " >&6; }
32644if ${gt_cv_locale_fr_utf8+:} false; then :
32645  $as_echo_n "(cached) " >&6
32646else
32647
32648    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32649/* end confdefs.h.  */
32650
32651#include <locale.h>
32652#include <time.h>
32653#if HAVE_LANGINFO_CODESET
32654# include <langinfo.h>
32655#endif
32656#include <stdlib.h>
32657#include <string.h>
32658struct tm t;
32659char buf[16];
32660int main () {
32661  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
32662     imitates locale dependent behaviour by looking at the environment
32663     variables, and all locales use the UTF-8 encoding.  */
32664#if !(defined __BEOS__ || defined __HAIKU__)
32665  /* Check whether the given locale name is recognized by the system.  */
32666# if defined _WIN32 && !defined __CYGWIN__
32667  /* On native Windows, setlocale(category, "") looks at the system settings,
32668     not at the environment variables.  Also, when an encoding suffix such
32669     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32670     category of the locale to "C".  */
32671  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32672      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32673    return 1;
32674# else
32675  if (setlocale (LC_ALL, "") == NULL) return 1;
32676# endif
32677  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32678     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32679     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32680     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32681     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32682     some unit tests fail.  */
32683# if HAVE_LANGINFO_CODESET
32684  {
32685    const char *cs = nl_langinfo (CODESET);
32686    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32687      return 1;
32688  }
32689# endif
32690# ifdef __CYGWIN__
32691  /* On Cygwin, avoid locale names without encoding suffix, because the
32692     locale_charset() function relies on the encoding suffix.  Note that
32693     LC_ALL is set on the command line.  */
32694  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32695# endif
32696  /* Check whether in the abbreviation of the second month, the second
32697     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
32698     two bytes long, with UTF-8 encoding.  */
32699  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32700  if (strftime (buf, sizeof (buf), "%b", &t) < 4
32701      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
32702    return 1;
32703#endif
32704#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
32705  /* Check whether the decimal separator is a comma.
32706     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32707     are nl_langinfo(RADIXCHAR) are both ".".  */
32708  if (localeconv () ->decimal_point[0] != ',') return 1;
32709#endif
32710  return 0;
32711}
32712
32713_ACEOF
32714    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32715  (eval $ac_link) 2>&5
32716  ac_status=$?
32717  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32718  test $ac_status = 0; } && test -s conftest$ac_exeext; then
32719      case "$host_os" in
32720        # Handle native Windows specially, because there setlocale() interprets
32721        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32722        # "fr" or "fra" as "French" or "French_France.1252",
32723        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32724        # "ja" as "Japanese" or "Japanese_Japan.932",
32725        # and similar.
32726        mingw*)
32727          # Test for the hypothetical native Windows locale name.
32728          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32729            gt_cv_locale_fr_utf8=French_France.65001
32730          else
32731            # None found.
32732            gt_cv_locale_fr_utf8=none
32733          fi
32734          ;;
32735        *)
32736          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32737          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32738          # configure script would override the LC_ALL setting. Likewise for
32739          # LC_CTYPE, which is also set at the beginning of the configure script.
32740          # Test for the usual locale name.
32741          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32742            gt_cv_locale_fr_utf8=fr_FR
32743          else
32744            # Test for the locale name with explicit encoding suffix.
32745            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32746              gt_cv_locale_fr_utf8=fr_FR.UTF-8
32747            else
32748              # Test for the Solaris 7 locale name.
32749              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32750                gt_cv_locale_fr_utf8=fr.UTF-8
32751              else
32752                # None found.
32753                gt_cv_locale_fr_utf8=none
32754              fi
32755            fi
32756          fi
32757          ;;
32758      esac
32759    fi
32760    rm -fr conftest*
32761
32762fi
32763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
32764$as_echo "$gt_cv_locale_fr_utf8" >&6; }
32765  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
32766
32767
32768
32769
32770
32771  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
32772$as_echo_n "checking for a transitional chinese locale... " >&6; }
32773if ${gt_cv_locale_zh_CN+:} false; then :
32774  $as_echo_n "(cached) " >&6
32775else
32776
32777    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32778/* end confdefs.h.  */
32779
32780#include <locale.h>
32781#include <stdlib.h>
32782#include <time.h>
32783#if HAVE_LANGINFO_CODESET
32784# include <langinfo.h>
32785#endif
32786#include <stdlib.h>
32787#include <string.h>
32788struct tm t;
32789char buf[16];
32790int main ()
32791{
32792  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
32793     imitates locale dependent behaviour by looking at the environment
32794     variables, and all locales use the UTF-8 encoding.  */
32795#if defined __BEOS__ || defined __HAIKU__
32796  return 1;
32797#else
32798  /* Check whether the given locale name is recognized by the system.  */
32799# if defined _WIN32 && !defined __CYGWIN__
32800  /* On native Windows, setlocale(category, "") looks at the system settings,
32801     not at the environment variables.  Also, when an encoding suffix such
32802     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32803     category of the locale to "C".  */
32804  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32805      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32806    return 1;
32807# else
32808  if (setlocale (LC_ALL, "") == NULL) return 1;
32809# endif
32810  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32811     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32812     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32813     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32814     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32815     some unit tests fail.
32816     On MirBSD 10, when an unsupported locale is specified, setlocale()
32817     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
32818# if HAVE_LANGINFO_CODESET
32819  {
32820    const char *cs = nl_langinfo (CODESET);
32821    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32822        || strcmp (cs, "UTF-8") == 0)
32823      return 1;
32824  }
32825# endif
32826# ifdef __CYGWIN__
32827  /* On Cygwin, avoid locale names without encoding suffix, because the
32828     locale_charset() function relies on the encoding suffix.  Note that
32829     LC_ALL is set on the command line.  */
32830  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32831# endif
32832  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
32833     This excludes the UTF-8 encoding (except on MirBSD).  */
32834  {
32835    const char *p;
32836    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32837    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
32838    for (p = buf; *p != '\0'; p++)
32839      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
32840        return 1;
32841  }
32842  /* Check whether a typical GB18030 multibyte sequence is recognized as a
32843     single wide character.  This excludes the GB2312 and GBK encodings.  */
32844  if (mblen ("\203\062\332\066", 5) != 4)
32845    return 1;
32846  return 0;
32847#endif
32848}
32849
32850_ACEOF
32851    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32852  (eval $ac_link) 2>&5
32853  ac_status=$?
32854  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32855  test $ac_status = 0; } && test -s conftest$ac_exeext; then
32856      case "$host_os" in
32857        # Handle native Windows specially, because there setlocale() interprets
32858        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32859        # "fr" or "fra" as "French" or "French_France.1252",
32860        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32861        # "ja" as "Japanese" or "Japanese_Japan.932",
32862        # and similar.
32863        mingw*)
32864          # Test for the hypothetical native Windows locale name.
32865          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32866            gt_cv_locale_zh_CN=Chinese_China.54936
32867          else
32868            # None found.
32869            gt_cv_locale_zh_CN=none
32870          fi
32871          ;;
32872        solaris2.8)
32873          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
32874          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
32875          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
32876          gt_cv_locale_zh_CN=none
32877          ;;
32878        *)
32879          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32880          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32881          # configure script would override the LC_ALL setting. Likewise for
32882          # LC_CTYPE, which is also set at the beginning of the configure script.
32883          # Test for the locale name without encoding suffix.
32884          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32885            gt_cv_locale_zh_CN=zh_CN
32886          else
32887            # Test for the locale name with explicit encoding suffix.
32888            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32889              gt_cv_locale_zh_CN=zh_CN.GB18030
32890            else
32891              # None found.
32892              gt_cv_locale_zh_CN=none
32893            fi
32894          fi
32895          ;;
32896      esac
32897    else
32898      # If there was a link error, due to mblen(), the system is so old that
32899      # it certainly doesn't have a chinese locale.
32900      gt_cv_locale_zh_CN=none
32901    fi
32902    rm -fr conftest*
32903
32904fi
32905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
32906$as_echo "$gt_cv_locale_zh_CN" >&6; }
32907  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
32908
32909
32910
32911  GNULIB_NL_LANGINFO=0;
32912    HAVE_NL_LANGINFO=1;
32913  REPLACE_NL_LANGINFO=0;
32914
32915
32916
32917
32918
32919
32920
32921
32922
32923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included libunistring is requested" >&5
32924$as_echo_n "checking whether included libunistring is requested... " >&6; }
32925
32926# Check whether --with-included-libunistring was given.
32927if test "${with_included_libunistring+set}" = set; then :
32928  withval=$with_included_libunistring; gl_libunistring_force_included=$withval
32929else
32930  gl_libunistring_force_included=no
32931fi
32932
32933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_libunistring_force_included" >&5
32934$as_echo "$gl_libunistring_force_included" >&6; }
32935      gl_libunistring_use_included="$gl_libunistring_force_included"
32936      if test "$gl_libunistring_use_included" = yes; then
32937                        if test -z "$HAVE_LIBUNISTRING"; then
32938          HAVE_LIBUNISTRING=no
32939        fi
32940        LIBUNISTRING=
32941        LTLIBUNISTRING=
32942      else
32943
32944
32945  if test -n "$LIBICONV"; then
32946
32947
32948
32949
32950
32951
32952
32953
32954
32955
32956
32957
32958    use_additional=yes
32959
32960  acl_save_prefix="$prefix"
32961  prefix="$acl_final_prefix"
32962  acl_save_exec_prefix="$exec_prefix"
32963  exec_prefix="$acl_final_exec_prefix"
32964
32965    eval additional_includedir=\"$includedir\"
32966    eval additional_libdir=\"$libdir\"
32967    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
32968    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
32969
32970  exec_prefix="$acl_save_exec_prefix"
32971  prefix="$acl_save_prefix"
32972
32973
32974# Check whether --with-libunistring-prefix was given.
32975if test "${with_libunistring_prefix+set}" = set; then :
32976  withval=$with_libunistring_prefix;
32977    if test "X$withval" = "Xno"; then
32978      use_additional=no
32979    else
32980      if test "X$withval" = "X"; then
32981
32982  acl_save_prefix="$prefix"
32983  prefix="$acl_final_prefix"
32984  acl_save_exec_prefix="$exec_prefix"
32985  exec_prefix="$acl_final_exec_prefix"
32986
32987          eval additional_includedir=\"$includedir\"
32988          eval additional_libdir=\"$libdir\"
32989          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
32990          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
32991
32992  exec_prefix="$acl_save_exec_prefix"
32993  prefix="$acl_save_prefix"
32994
32995      else
32996        additional_includedir="$withval/include"
32997        additional_libdir="$withval/$acl_libdirstem"
32998        additional_libdir2="$withval/$acl_libdirstem2"
32999        additional_libdir3="$withval/$acl_libdirstem3"
33000      fi
33001    fi
33002
33003fi
33004
33005  if test "X$additional_libdir2" = "X$additional_libdir"; then
33006    additional_libdir2=
33007  fi
33008  if test "X$additional_libdir3" = "X$additional_libdir"; then
33009    additional_libdir3=
33010  fi
33011      LIBUNISTRING=
33012  LTLIBUNISTRING=
33013  INCUNISTRING=
33014  LIBUNISTRING_PREFIX=
33015      HAVE_LIBUNISTRING=
33016  rpathdirs=
33017  ltrpathdirs=
33018  names_already_handled=
33019  names_next_round='unistring '
33020  while test -n "$names_next_round"; do
33021    names_this_round="$names_next_round"
33022    names_next_round=
33023    for name in $names_this_round; do
33024      already_handled=
33025      for n in $names_already_handled; do
33026        if test "$n" = "$name"; then
33027          already_handled=yes
33028          break
33029        fi
33030      done
33031      if test -z "$already_handled"; then
33032        names_already_handled="$names_already_handled $name"
33033                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
33034        eval value=\"\$HAVE_LIB$uppername\"
33035        if test -n "$value"; then
33036          if test "$value" = yes; then
33037            eval value=\"\$LIB$uppername\"
33038            test -z "$value" || LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$value"
33039            eval value=\"\$LTLIB$uppername\"
33040            test -z "$value" || LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$value"
33041          else
33042                                    :
33043          fi
33044        else
33045                              found_dir=
33046          found_la=
33047          found_so=
33048          found_a=
33049          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
33050          if test -n "$acl_shlibext"; then
33051            shrext=".$acl_shlibext"             # typically: shrext=.so
33052          else
33053            shrext=
33054          fi
33055          if test $use_additional = yes; then
33056            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
33057              if test "X$found_dir" = "X"; then
33058                eval dir=\$$additional_libdir_variable
33059                if test -n "$dir"; then
33060                                                      if test -n "$acl_shlibext"; then
33061                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
33062                      found_dir="$dir"
33063                      found_so="$dir/$libname$shrext"
33064                    else
33065                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
33066                        ver=`(cd "$dir" && \
33067                              for f in "$libname$shrext".*; do echo "$f"; done \
33068                              | sed -e "s,^$libname$shrext\\\\.,," \
33069                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
33070                              | sed 1q ) 2>/dev/null`
33071                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
33072                          found_dir="$dir"
33073                          found_so="$dir/$libname$shrext.$ver"
33074                        fi
33075                      else
33076                        eval library_names=\"$acl_library_names_spec\"
33077                        for f in $library_names; do
33078                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
33079                            found_dir="$dir"
33080                            found_so="$dir/$f"
33081                            break
33082                          fi
33083                        done
33084                      fi
33085                    fi
33086                  fi
33087                                    if test "X$found_dir" = "X"; then
33088                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
33089                      found_dir="$dir"
33090                      found_a="$dir/$libname.$acl_libext"
33091                    fi
33092                  fi
33093                  if test "X$found_dir" != "X"; then
33094                    if test -f "$dir/$libname.la"; then
33095                      found_la="$dir/$libname.la"
33096                    fi
33097                  fi
33098                fi
33099              fi
33100            done
33101          fi
33102          if test "X$found_dir" = "X"; then
33103            for x in $LDFLAGS $LTLIBUNISTRING; do
33104
33105  acl_save_prefix="$prefix"
33106  prefix="$acl_final_prefix"
33107  acl_save_exec_prefix="$exec_prefix"
33108  exec_prefix="$acl_final_exec_prefix"
33109  eval x=\"$x\"
33110  exec_prefix="$acl_save_exec_prefix"
33111  prefix="$acl_save_prefix"
33112
33113              case "$x" in
33114                -L*)
33115                  dir=`echo "X$x" | sed -e 's/^X-L//'`
33116                                    if test -n "$acl_shlibext"; then
33117                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
33118                      found_dir="$dir"
33119                      found_so="$dir/$libname$shrext"
33120                    else
33121                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
33122                        ver=`(cd "$dir" && \
33123                              for f in "$libname$shrext".*; do echo "$f"; done \
33124                              | sed -e "s,^$libname$shrext\\\\.,," \
33125                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
33126                              | sed 1q ) 2>/dev/null`
33127                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
33128                          found_dir="$dir"
33129                          found_so="$dir/$libname$shrext.$ver"
33130                        fi
33131                      else
33132                        eval library_names=\"$acl_library_names_spec\"
33133                        for f in $library_names; do
33134                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
33135                            found_dir="$dir"
33136                            found_so="$dir/$f"
33137                            break
33138                          fi
33139                        done
33140                      fi
33141                    fi
33142                  fi
33143                                    if test "X$found_dir" = "X"; then
33144                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
33145                      found_dir="$dir"
33146                      found_a="$dir/$libname.$acl_libext"
33147                    fi
33148                  fi
33149                  if test "X$found_dir" != "X"; then
33150                    if test -f "$dir/$libname.la"; then
33151                      found_la="$dir/$libname.la"
33152                    fi
33153                  fi
33154                  ;;
33155              esac
33156              if test "X$found_dir" != "X"; then
33157                break
33158              fi
33159            done
33160          fi
33161          if test "X$found_dir" != "X"; then
33162                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$found_dir -l$name"
33163            if test "X$found_so" != "X"; then
33164                                                        if test "$enable_rpath" = no \
33165                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
33166                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
33167                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
33168                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
33169              else
33170                                                                                haveit=
33171                for x in $ltrpathdirs; do
33172                  if test "X$x" = "X$found_dir"; then
33173                    haveit=yes
33174                    break
33175                  fi
33176                done
33177                if test -z "$haveit"; then
33178                  ltrpathdirs="$ltrpathdirs $found_dir"
33179                fi
33180                                if test "$acl_hardcode_direct" = yes; then
33181                                                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
33182                else
33183                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
33184                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
33185                                                            haveit=
33186                    for x in $rpathdirs; do
33187                      if test "X$x" = "X$found_dir"; then
33188                        haveit=yes
33189                        break
33190                      fi
33191                    done
33192                    if test -z "$haveit"; then
33193                      rpathdirs="$rpathdirs $found_dir"
33194                    fi
33195                  else
33196                                                                                haveit=
33197                    for x in $LDFLAGS $LIBUNISTRING; do
33198
33199  acl_save_prefix="$prefix"
33200  prefix="$acl_final_prefix"
33201  acl_save_exec_prefix="$exec_prefix"
33202  exec_prefix="$acl_final_exec_prefix"
33203  eval x=\"$x\"
33204  exec_prefix="$acl_save_exec_prefix"
33205  prefix="$acl_save_prefix"
33206
33207                      if test "X$x" = "X-L$found_dir"; then
33208                        haveit=yes
33209                        break
33210                      fi
33211                    done
33212                    if test -z "$haveit"; then
33213                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir"
33214                    fi
33215                    if test "$acl_hardcode_minus_L" != no; then
33216                                                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
33217                    else
33218                                                                                                                                                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
33219                    fi
33220                  fi
33221                fi
33222              fi
33223            else
33224              if test "X$found_a" != "X"; then
33225                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_a"
33226              else
33227                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir -l$name"
33228              fi
33229            fi
33230                        additional_includedir=
33231            case "$found_dir" in
33232              */$acl_libdirstem | */$acl_libdirstem/)
33233                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
33234                if test "$name" = 'unistring'; then
33235                  LIBUNISTRING_PREFIX="$basedir"
33236                fi
33237                additional_includedir="$basedir/include"
33238                ;;
33239              */$acl_libdirstem2 | */$acl_libdirstem2/)
33240                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
33241                if test "$name" = 'unistring'; then
33242                  LIBUNISTRING_PREFIX="$basedir"
33243                fi
33244                additional_includedir="$basedir/include"
33245                ;;
33246              */$acl_libdirstem3 | */$acl_libdirstem3/)
33247                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
33248                if test "$name" = 'unistring'; then
33249                  LIBUNISTRING_PREFIX="$basedir"
33250                fi
33251                additional_includedir="$basedir/include"
33252                ;;
33253            esac
33254            if test "X$additional_includedir" != "X"; then
33255                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
33256                haveit=
33257                if test "X$additional_includedir" = "X/usr/local/include"; then
33258                  if test -n "$GCC"; then
33259                    case $host_os in
33260                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
33261                    esac
33262                  fi
33263                fi
33264                if test -z "$haveit"; then
33265                  for x in $CPPFLAGS $INCUNISTRING; do
33266
33267  acl_save_prefix="$prefix"
33268  prefix="$acl_final_prefix"
33269  acl_save_exec_prefix="$exec_prefix"
33270  exec_prefix="$acl_final_exec_prefix"
33271  eval x=\"$x\"
33272  exec_prefix="$acl_save_exec_prefix"
33273  prefix="$acl_save_prefix"
33274
33275                    if test "X$x" = "X-I$additional_includedir"; then
33276                      haveit=yes
33277                      break
33278                    fi
33279                  done
33280                  if test -z "$haveit"; then
33281                    if test -d "$additional_includedir"; then
33282                                            INCUNISTRING="${INCUNISTRING}${INCUNISTRING:+ }-I$additional_includedir"
33283                    fi
33284                  fi
33285                fi
33286              fi
33287            fi
33288                        if test -n "$found_la"; then
33289                                                        save_libdir="$libdir"
33290              case "$found_la" in
33291                */* | *\\*) . "$found_la" ;;
33292                *) . "./$found_la" ;;
33293              esac
33294              libdir="$save_libdir"
33295                            for dep in $dependency_libs; do
33296                case "$dep" in
33297                  -L*)
33298                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
33299                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
33300                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
33301                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
33302                      haveit=
33303                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
33304                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
33305                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
33306                        if test -n "$GCC"; then
33307                          case $host_os in
33308                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
33309                          esac
33310                        fi
33311                      fi
33312                      if test -z "$haveit"; then
33313                        haveit=
33314                        for x in $LDFLAGS $LIBUNISTRING; do
33315
33316  acl_save_prefix="$prefix"
33317  prefix="$acl_final_prefix"
33318  acl_save_exec_prefix="$exec_prefix"
33319  exec_prefix="$acl_final_exec_prefix"
33320  eval x=\"$x\"
33321  exec_prefix="$acl_save_exec_prefix"
33322  prefix="$acl_save_prefix"
33323
33324                          if test "X$x" = "X-L$dependency_libdir"; then
33325                            haveit=yes
33326                            break
33327                          fi
33328                        done
33329                        if test -z "$haveit"; then
33330                          if test -d "$dependency_libdir"; then
33331                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$dependency_libdir"
33332                          fi
33333                        fi
33334                        haveit=
33335                        for x in $LDFLAGS $LTLIBUNISTRING; do
33336
33337  acl_save_prefix="$prefix"
33338  prefix="$acl_final_prefix"
33339  acl_save_exec_prefix="$exec_prefix"
33340  exec_prefix="$acl_final_exec_prefix"
33341  eval x=\"$x\"
33342  exec_prefix="$acl_save_exec_prefix"
33343  prefix="$acl_save_prefix"
33344
33345                          if test "X$x" = "X-L$dependency_libdir"; then
33346                            haveit=yes
33347                            break
33348                          fi
33349                        done
33350                        if test -z "$haveit"; then
33351                          if test -d "$dependency_libdir"; then
33352                                                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$dependency_libdir"
33353                          fi
33354                        fi
33355                      fi
33356                    fi
33357                    ;;
33358                  -R*)
33359                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
33360                    if test "$enable_rpath" != no; then
33361                                                                  haveit=
33362                      for x in $rpathdirs; do
33363                        if test "X$x" = "X$dir"; then
33364                          haveit=yes
33365                          break
33366                        fi
33367                      done
33368                      if test -z "$haveit"; then
33369                        rpathdirs="$rpathdirs $dir"
33370                      fi
33371                                                                  haveit=
33372                      for x in $ltrpathdirs; do
33373                        if test "X$x" = "X$dir"; then
33374                          haveit=yes
33375                          break
33376                        fi
33377                      done
33378                      if test -z "$haveit"; then
33379                        ltrpathdirs="$ltrpathdirs $dir"
33380                      fi
33381                    fi
33382                    ;;
33383                  -l*)
33384                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
33385                    ;;
33386                  *.la)
33387                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
33388                    ;;
33389                  *)
33390                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$dep"
33391                    LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$dep"
33392                    ;;
33393                esac
33394              done
33395            fi
33396          else
33397                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
33398            LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-l$name"
33399          fi
33400        fi
33401      fi
33402    done
33403  done
33404  if test "X$rpathdirs" != "X"; then
33405    if test -n "$acl_hardcode_libdir_separator"; then
33406                        alldirs=
33407      for found_dir in $rpathdirs; do
33408        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
33409      done
33410            acl_save_libdir="$libdir"
33411      libdir="$alldirs"
33412      eval flag=\"$acl_hardcode_libdir_flag_spec\"
33413      libdir="$acl_save_libdir"
33414      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
33415    else
33416            for found_dir in $rpathdirs; do
33417        acl_save_libdir="$libdir"
33418        libdir="$found_dir"
33419        eval flag=\"$acl_hardcode_libdir_flag_spec\"
33420        libdir="$acl_save_libdir"
33421        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
33422      done
33423    fi
33424  fi
33425  if test "X$ltrpathdirs" != "X"; then
33426            for found_dir in $ltrpathdirs; do
33427      LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-R$found_dir"
33428    done
33429  fi
33430
33431
33432
33433
33434
33435
33436        ac_save_CPPFLAGS="$CPPFLAGS"
33437
33438  for element in $INCUNISTRING; do
33439    haveit=
33440    for x in $CPPFLAGS; do
33441
33442  acl_save_prefix="$prefix"
33443  prefix="$acl_final_prefix"
33444  acl_save_exec_prefix="$exec_prefix"
33445  exec_prefix="$acl_final_exec_prefix"
33446  eval x=\"$x\"
33447  exec_prefix="$acl_save_exec_prefix"
33448  prefix="$acl_save_prefix"
33449
33450      if test "X$x" = "X$element"; then
33451        haveit=yes
33452        break
33453      fi
33454    done
33455    if test -z "$haveit"; then
33456      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
33457    fi
33458  done
33459
33460
33461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunistring" >&5
33462$as_echo_n "checking for libunistring... " >&6; }
33463if ${ac_cv_libunistring+:} false; then :
33464  $as_echo_n "(cached) " >&6
33465else
33466
33467    ac_save_LIBS="$LIBS"
33468                                case " $LIBUNISTRING" in
33469      *" -l"*) LIBS="$LIBS $LIBUNISTRING" ;;
33470      *)       LIBS="$LIBUNISTRING $LIBS" ;;
33471    esac
33472    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33473/* end confdefs.h.  */
33474#include <uniconv.h>
33475int
33476main ()
33477{
33478u8_strconv_from_locale((char*)0);
33479  ;
33480  return 0;
33481}
33482_ACEOF
33483if ac_fn_c_try_link "$LINENO"; then :
33484  ac_cv_libunistring=yes
33485else
33486  ac_cv_libunistring='no, trying again together with libiconv'
33487fi
33488rm -f core conftest.err conftest.$ac_objext \
33489    conftest$ac_exeext conftest.$ac_ext
33490    LIBS="$ac_save_LIBS"
33491
33492fi
33493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libunistring" >&5
33494$as_echo "$ac_cv_libunistring" >&6; }
33495  if test "$ac_cv_libunistring" = yes; then
33496    HAVE_LIBUNISTRING=yes
33497
33498$as_echo "#define HAVE_LIBUNISTRING 1" >>confdefs.h
33499
33500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libunistring" >&5
33501$as_echo_n "checking how to link with libunistring... " >&6; }
33502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBUNISTRING" >&5
33503$as_echo "$LIBUNISTRING" >&6; }
33504  else
33505    HAVE_LIBUNISTRING=no
33506            CPPFLAGS="$ac_save_CPPFLAGS"
33507    LIBUNISTRING=
33508    LTLIBUNISTRING=
33509    LIBUNISTRING_PREFIX=
33510  fi
33511
33512
33513
33514
33515
33516
33517
33518    if test "$ac_cv_libunistring" != yes; then
33519                        unset ac_cv_libunistring
33520      glus_save_LIBS="$LIBS"
33521      LIBS="$LIBS $LIBICONV"
33522
33523
33524
33525
33526
33527
33528
33529
33530
33531
33532
33533
33534    use_additional=yes
33535
33536  acl_save_prefix="$prefix"
33537  prefix="$acl_final_prefix"
33538  acl_save_exec_prefix="$exec_prefix"
33539  exec_prefix="$acl_final_exec_prefix"
33540
33541    eval additional_includedir=\"$includedir\"
33542    eval additional_libdir=\"$libdir\"
33543    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
33544    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
33545
33546  exec_prefix="$acl_save_exec_prefix"
33547  prefix="$acl_save_prefix"
33548
33549
33550# Check whether --with-libunistring-prefix was given.
33551if test "${with_libunistring_prefix+set}" = set; then :
33552  withval=$with_libunistring_prefix;
33553    if test "X$withval" = "Xno"; then
33554      use_additional=no
33555    else
33556      if test "X$withval" = "X"; then
33557
33558  acl_save_prefix="$prefix"
33559  prefix="$acl_final_prefix"
33560  acl_save_exec_prefix="$exec_prefix"
33561  exec_prefix="$acl_final_exec_prefix"
33562
33563          eval additional_includedir=\"$includedir\"
33564          eval additional_libdir=\"$libdir\"
33565          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
33566          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
33567
33568  exec_prefix="$acl_save_exec_prefix"
33569  prefix="$acl_save_prefix"
33570
33571      else
33572        additional_includedir="$withval/include"
33573        additional_libdir="$withval/$acl_libdirstem"
33574        additional_libdir2="$withval/$acl_libdirstem2"
33575        additional_libdir3="$withval/$acl_libdirstem3"
33576      fi
33577    fi
33578
33579fi
33580
33581  if test "X$additional_libdir2" = "X$additional_libdir"; then
33582    additional_libdir2=
33583  fi
33584  if test "X$additional_libdir3" = "X$additional_libdir"; then
33585    additional_libdir3=
33586  fi
33587      LIBUNISTRING=
33588  LTLIBUNISTRING=
33589  INCUNISTRING=
33590  LIBUNISTRING_PREFIX=
33591      HAVE_LIBUNISTRING=
33592  rpathdirs=
33593  ltrpathdirs=
33594  names_already_handled=
33595  names_next_round='unistring '
33596  while test -n "$names_next_round"; do
33597    names_this_round="$names_next_round"
33598    names_next_round=
33599    for name in $names_this_round; do
33600      already_handled=
33601      for n in $names_already_handled; do
33602        if test "$n" = "$name"; then
33603          already_handled=yes
33604          break
33605        fi
33606      done
33607      if test -z "$already_handled"; then
33608        names_already_handled="$names_already_handled $name"
33609                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
33610        eval value=\"\$HAVE_LIB$uppername\"
33611        if test -n "$value"; then
33612          if test "$value" = yes; then
33613            eval value=\"\$LIB$uppername\"
33614            test -z "$value" || LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$value"
33615            eval value=\"\$LTLIB$uppername\"
33616            test -z "$value" || LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$value"
33617          else
33618                                    :
33619          fi
33620        else
33621                              found_dir=
33622          found_la=
33623          found_so=
33624          found_a=
33625          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
33626          if test -n "$acl_shlibext"; then
33627            shrext=".$acl_shlibext"             # typically: shrext=.so
33628          else
33629            shrext=
33630          fi
33631          if test $use_additional = yes; then
33632            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
33633              if test "X$found_dir" = "X"; then
33634                eval dir=\$$additional_libdir_variable
33635                if test -n "$dir"; then
33636                                                      if test -n "$acl_shlibext"; then
33637                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
33638                      found_dir="$dir"
33639                      found_so="$dir/$libname$shrext"
33640                    else
33641                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
33642                        ver=`(cd "$dir" && \
33643                              for f in "$libname$shrext".*; do echo "$f"; done \
33644                              | sed -e "s,^$libname$shrext\\\\.,," \
33645                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
33646                              | sed 1q ) 2>/dev/null`
33647                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
33648                          found_dir="$dir"
33649                          found_so="$dir/$libname$shrext.$ver"
33650                        fi
33651                      else
33652                        eval library_names=\"$acl_library_names_spec\"
33653                        for f in $library_names; do
33654                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
33655                            found_dir="$dir"
33656                            found_so="$dir/$f"
33657                            break
33658                          fi
33659                        done
33660                      fi
33661                    fi
33662                  fi
33663                                    if test "X$found_dir" = "X"; then
33664                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
33665                      found_dir="$dir"
33666                      found_a="$dir/$libname.$acl_libext"
33667                    fi
33668                  fi
33669                  if test "X$found_dir" != "X"; then
33670                    if test -f "$dir/$libname.la"; then
33671                      found_la="$dir/$libname.la"
33672                    fi
33673                  fi
33674                fi
33675              fi
33676            done
33677          fi
33678          if test "X$found_dir" = "X"; then
33679            for x in $LDFLAGS $LTLIBUNISTRING; do
33680
33681  acl_save_prefix="$prefix"
33682  prefix="$acl_final_prefix"
33683  acl_save_exec_prefix="$exec_prefix"
33684  exec_prefix="$acl_final_exec_prefix"
33685  eval x=\"$x\"
33686  exec_prefix="$acl_save_exec_prefix"
33687  prefix="$acl_save_prefix"
33688
33689              case "$x" in
33690                -L*)
33691                  dir=`echo "X$x" | sed -e 's/^X-L//'`
33692                                    if test -n "$acl_shlibext"; then
33693                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
33694                      found_dir="$dir"
33695                      found_so="$dir/$libname$shrext"
33696                    else
33697                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
33698                        ver=`(cd "$dir" && \
33699                              for f in "$libname$shrext".*; do echo "$f"; done \
33700                              | sed -e "s,^$libname$shrext\\\\.,," \
33701                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
33702                              | sed 1q ) 2>/dev/null`
33703                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
33704                          found_dir="$dir"
33705                          found_so="$dir/$libname$shrext.$ver"
33706                        fi
33707                      else
33708                        eval library_names=\"$acl_library_names_spec\"
33709                        for f in $library_names; do
33710                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
33711                            found_dir="$dir"
33712                            found_so="$dir/$f"
33713                            break
33714                          fi
33715                        done
33716                      fi
33717                    fi
33718                  fi
33719                                    if test "X$found_dir" = "X"; then
33720                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
33721                      found_dir="$dir"
33722                      found_a="$dir/$libname.$acl_libext"
33723                    fi
33724                  fi
33725                  if test "X$found_dir" != "X"; then
33726                    if test -f "$dir/$libname.la"; then
33727                      found_la="$dir/$libname.la"
33728                    fi
33729                  fi
33730                  ;;
33731              esac
33732              if test "X$found_dir" != "X"; then
33733                break
33734              fi
33735            done
33736          fi
33737          if test "X$found_dir" != "X"; then
33738                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$found_dir -l$name"
33739            if test "X$found_so" != "X"; then
33740                                                        if test "$enable_rpath" = no \
33741                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
33742                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
33743                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
33744                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
33745              else
33746                                                                                haveit=
33747                for x in $ltrpathdirs; do
33748                  if test "X$x" = "X$found_dir"; then
33749                    haveit=yes
33750                    break
33751                  fi
33752                done
33753                if test -z "$haveit"; then
33754                  ltrpathdirs="$ltrpathdirs $found_dir"
33755                fi
33756                                if test "$acl_hardcode_direct" = yes; then
33757                                                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
33758                else
33759                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
33760                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
33761                                                            haveit=
33762                    for x in $rpathdirs; do
33763                      if test "X$x" = "X$found_dir"; then
33764                        haveit=yes
33765                        break
33766                      fi
33767                    done
33768                    if test -z "$haveit"; then
33769                      rpathdirs="$rpathdirs $found_dir"
33770                    fi
33771                  else
33772                                                                                haveit=
33773                    for x in $LDFLAGS $LIBUNISTRING; do
33774
33775  acl_save_prefix="$prefix"
33776  prefix="$acl_final_prefix"
33777  acl_save_exec_prefix="$exec_prefix"
33778  exec_prefix="$acl_final_exec_prefix"
33779  eval x=\"$x\"
33780  exec_prefix="$acl_save_exec_prefix"
33781  prefix="$acl_save_prefix"
33782
33783                      if test "X$x" = "X-L$found_dir"; then
33784                        haveit=yes
33785                        break
33786                      fi
33787                    done
33788                    if test -z "$haveit"; then
33789                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir"
33790                    fi
33791                    if test "$acl_hardcode_minus_L" != no; then
33792                                                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
33793                    else
33794                                                                                                                                                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
33795                    fi
33796                  fi
33797                fi
33798              fi
33799            else
33800              if test "X$found_a" != "X"; then
33801                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_a"
33802              else
33803                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir -l$name"
33804              fi
33805            fi
33806                        additional_includedir=
33807            case "$found_dir" in
33808              */$acl_libdirstem | */$acl_libdirstem/)
33809                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
33810                if test "$name" = 'unistring'; then
33811                  LIBUNISTRING_PREFIX="$basedir"
33812                fi
33813                additional_includedir="$basedir/include"
33814                ;;
33815              */$acl_libdirstem2 | */$acl_libdirstem2/)
33816                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
33817                if test "$name" = 'unistring'; then
33818                  LIBUNISTRING_PREFIX="$basedir"
33819                fi
33820                additional_includedir="$basedir/include"
33821                ;;
33822              */$acl_libdirstem3 | */$acl_libdirstem3/)
33823                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
33824                if test "$name" = 'unistring'; then
33825                  LIBUNISTRING_PREFIX="$basedir"
33826                fi
33827                additional_includedir="$basedir/include"
33828                ;;
33829            esac
33830            if test "X$additional_includedir" != "X"; then
33831                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
33832                haveit=
33833                if test "X$additional_includedir" = "X/usr/local/include"; then
33834                  if test -n "$GCC"; then
33835                    case $host_os in
33836                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
33837                    esac
33838                  fi
33839                fi
33840                if test -z "$haveit"; then
33841                  for x in $CPPFLAGS $INCUNISTRING; do
33842
33843  acl_save_prefix="$prefix"
33844  prefix="$acl_final_prefix"
33845  acl_save_exec_prefix="$exec_prefix"
33846  exec_prefix="$acl_final_exec_prefix"
33847  eval x=\"$x\"
33848  exec_prefix="$acl_save_exec_prefix"
33849  prefix="$acl_save_prefix"
33850
33851                    if test "X$x" = "X-I$additional_includedir"; then
33852                      haveit=yes
33853                      break
33854                    fi
33855                  done
33856                  if test -z "$haveit"; then
33857                    if test -d "$additional_includedir"; then
33858                                            INCUNISTRING="${INCUNISTRING}${INCUNISTRING:+ }-I$additional_includedir"
33859                    fi
33860                  fi
33861                fi
33862              fi
33863            fi
33864                        if test -n "$found_la"; then
33865                                                        save_libdir="$libdir"
33866              case "$found_la" in
33867                */* | *\\*) . "$found_la" ;;
33868                *) . "./$found_la" ;;
33869              esac
33870              libdir="$save_libdir"
33871                            for dep in $dependency_libs; do
33872                case "$dep" in
33873                  -L*)
33874                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
33875                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
33876                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
33877                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
33878                      haveit=
33879                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
33880                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
33881                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
33882                        if test -n "$GCC"; then
33883                          case $host_os in
33884                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
33885                          esac
33886                        fi
33887                      fi
33888                      if test -z "$haveit"; then
33889                        haveit=
33890                        for x in $LDFLAGS $LIBUNISTRING; do
33891
33892  acl_save_prefix="$prefix"
33893  prefix="$acl_final_prefix"
33894  acl_save_exec_prefix="$exec_prefix"
33895  exec_prefix="$acl_final_exec_prefix"
33896  eval x=\"$x\"
33897  exec_prefix="$acl_save_exec_prefix"
33898  prefix="$acl_save_prefix"
33899
33900                          if test "X$x" = "X-L$dependency_libdir"; then
33901                            haveit=yes
33902                            break
33903                          fi
33904                        done
33905                        if test -z "$haveit"; then
33906                          if test -d "$dependency_libdir"; then
33907                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$dependency_libdir"
33908                          fi
33909                        fi
33910                        haveit=
33911                        for x in $LDFLAGS $LTLIBUNISTRING; do
33912
33913  acl_save_prefix="$prefix"
33914  prefix="$acl_final_prefix"
33915  acl_save_exec_prefix="$exec_prefix"
33916  exec_prefix="$acl_final_exec_prefix"
33917  eval x=\"$x\"
33918  exec_prefix="$acl_save_exec_prefix"
33919  prefix="$acl_save_prefix"
33920
33921                          if test "X$x" = "X-L$dependency_libdir"; then
33922                            haveit=yes
33923                            break
33924                          fi
33925                        done
33926                        if test -z "$haveit"; then
33927                          if test -d "$dependency_libdir"; then
33928                                                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$dependency_libdir"
33929                          fi
33930                        fi
33931                      fi
33932                    fi
33933                    ;;
33934                  -R*)
33935                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
33936                    if test "$enable_rpath" != no; then
33937                                                                  haveit=
33938                      for x in $rpathdirs; do
33939                        if test "X$x" = "X$dir"; then
33940                          haveit=yes
33941                          break
33942                        fi
33943                      done
33944                      if test -z "$haveit"; then
33945                        rpathdirs="$rpathdirs $dir"
33946                      fi
33947                                                                  haveit=
33948                      for x in $ltrpathdirs; do
33949                        if test "X$x" = "X$dir"; then
33950                          haveit=yes
33951                          break
33952                        fi
33953                      done
33954                      if test -z "$haveit"; then
33955                        ltrpathdirs="$ltrpathdirs $dir"
33956                      fi
33957                    fi
33958                    ;;
33959                  -l*)
33960                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
33961                    ;;
33962                  *.la)
33963                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
33964                    ;;
33965                  *)
33966                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$dep"
33967                    LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$dep"
33968                    ;;
33969                esac
33970              done
33971            fi
33972          else
33973                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
33974            LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-l$name"
33975          fi
33976        fi
33977      fi
33978    done
33979  done
33980  if test "X$rpathdirs" != "X"; then
33981    if test -n "$acl_hardcode_libdir_separator"; then
33982                        alldirs=
33983      for found_dir in $rpathdirs; do
33984        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
33985      done
33986            acl_save_libdir="$libdir"
33987      libdir="$alldirs"
33988      eval flag=\"$acl_hardcode_libdir_flag_spec\"
33989      libdir="$acl_save_libdir"
33990      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
33991    else
33992            for found_dir in $rpathdirs; do
33993        acl_save_libdir="$libdir"
33994        libdir="$found_dir"
33995        eval flag=\"$acl_hardcode_libdir_flag_spec\"
33996        libdir="$acl_save_libdir"
33997        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
33998      done
33999    fi
34000  fi
34001  if test "X$ltrpathdirs" != "X"; then
34002            for found_dir in $ltrpathdirs; do
34003      LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-R$found_dir"
34004    done
34005  fi
34006
34007
34008
34009
34010
34011
34012        ac_save_CPPFLAGS="$CPPFLAGS"
34013
34014  for element in $INCUNISTRING; do
34015    haveit=
34016    for x in $CPPFLAGS; do
34017
34018  acl_save_prefix="$prefix"
34019  prefix="$acl_final_prefix"
34020  acl_save_exec_prefix="$exec_prefix"
34021  exec_prefix="$acl_final_exec_prefix"
34022  eval x=\"$x\"
34023  exec_prefix="$acl_save_exec_prefix"
34024  prefix="$acl_save_prefix"
34025
34026      if test "X$x" = "X$element"; then
34027        haveit=yes
34028        break
34029      fi
34030    done
34031    if test -z "$haveit"; then
34032      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
34033    fi
34034  done
34035
34036
34037  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunistring" >&5
34038$as_echo_n "checking for libunistring... " >&6; }
34039if ${ac_cv_libunistring+:} false; then :
34040  $as_echo_n "(cached) " >&6
34041else
34042
34043    ac_save_LIBS="$LIBS"
34044                                case " $LIBUNISTRING" in
34045      *" -l"*) LIBS="$LIBS $LIBUNISTRING" ;;
34046      *)       LIBS="$LIBUNISTRING $LIBS" ;;
34047    esac
34048    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34049/* end confdefs.h.  */
34050#include <uniconv.h>
34051int
34052main ()
34053{
34054u8_strconv_from_locale((char*)0);
34055  ;
34056  return 0;
34057}
34058_ACEOF
34059if ac_fn_c_try_link "$LINENO"; then :
34060  ac_cv_libunistring=yes
34061else
34062  ac_cv_libunistring='no, consider installing GNU libunistring'
34063fi
34064rm -f core conftest.err conftest.$ac_objext \
34065    conftest$ac_exeext conftest.$ac_ext
34066    LIBS="$ac_save_LIBS"
34067
34068fi
34069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libunistring" >&5
34070$as_echo "$ac_cv_libunistring" >&6; }
34071  if test "$ac_cv_libunistring" = yes; then
34072    HAVE_LIBUNISTRING=yes
34073
34074$as_echo "#define HAVE_LIBUNISTRING 1" >>confdefs.h
34075
34076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libunistring" >&5
34077$as_echo_n "checking how to link with libunistring... " >&6; }
34078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBUNISTRING" >&5
34079$as_echo "$LIBUNISTRING" >&6; }
34080  else
34081    HAVE_LIBUNISTRING=no
34082            CPPFLAGS="$ac_save_CPPFLAGS"
34083    LIBUNISTRING=
34084    LTLIBUNISTRING=
34085    LIBUNISTRING_PREFIX=
34086  fi
34087
34088
34089
34090
34091
34092
34093
34094      if test -n "$LIBUNISTRING"; then
34095        LIBUNISTRING="$LIBUNISTRING $LIBICONV"
34096        LTLIBUNISTRING="$LTLIBUNISTRING $LTLIBICONV"
34097      fi
34098      LIBS="$glus_save_LIBS"
34099    fi
34100  else
34101
34102
34103
34104
34105
34106
34107
34108
34109
34110
34111
34112
34113    use_additional=yes
34114
34115  acl_save_prefix="$prefix"
34116  prefix="$acl_final_prefix"
34117  acl_save_exec_prefix="$exec_prefix"
34118  exec_prefix="$acl_final_exec_prefix"
34119
34120    eval additional_includedir=\"$includedir\"
34121    eval additional_libdir=\"$libdir\"
34122    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
34123    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
34124
34125  exec_prefix="$acl_save_exec_prefix"
34126  prefix="$acl_save_prefix"
34127
34128
34129# Check whether --with-libunistring-prefix was given.
34130if test "${with_libunistring_prefix+set}" = set; then :
34131  withval=$with_libunistring_prefix;
34132    if test "X$withval" = "Xno"; then
34133      use_additional=no
34134    else
34135      if test "X$withval" = "X"; then
34136
34137  acl_save_prefix="$prefix"
34138  prefix="$acl_final_prefix"
34139  acl_save_exec_prefix="$exec_prefix"
34140  exec_prefix="$acl_final_exec_prefix"
34141
34142          eval additional_includedir=\"$includedir\"
34143          eval additional_libdir=\"$libdir\"
34144          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
34145          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
34146
34147  exec_prefix="$acl_save_exec_prefix"
34148  prefix="$acl_save_prefix"
34149
34150      else
34151        additional_includedir="$withval/include"
34152        additional_libdir="$withval/$acl_libdirstem"
34153        additional_libdir2="$withval/$acl_libdirstem2"
34154        additional_libdir3="$withval/$acl_libdirstem3"
34155      fi
34156    fi
34157
34158fi
34159
34160  if test "X$additional_libdir2" = "X$additional_libdir"; then
34161    additional_libdir2=
34162  fi
34163  if test "X$additional_libdir3" = "X$additional_libdir"; then
34164    additional_libdir3=
34165  fi
34166      LIBUNISTRING=
34167  LTLIBUNISTRING=
34168  INCUNISTRING=
34169  LIBUNISTRING_PREFIX=
34170      HAVE_LIBUNISTRING=
34171  rpathdirs=
34172  ltrpathdirs=
34173  names_already_handled=
34174  names_next_round='unistring '
34175  while test -n "$names_next_round"; do
34176    names_this_round="$names_next_round"
34177    names_next_round=
34178    for name in $names_this_round; do
34179      already_handled=
34180      for n in $names_already_handled; do
34181        if test "$n" = "$name"; then
34182          already_handled=yes
34183          break
34184        fi
34185      done
34186      if test -z "$already_handled"; then
34187        names_already_handled="$names_already_handled $name"
34188                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
34189        eval value=\"\$HAVE_LIB$uppername\"
34190        if test -n "$value"; then
34191          if test "$value" = yes; then
34192            eval value=\"\$LIB$uppername\"
34193            test -z "$value" || LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$value"
34194            eval value=\"\$LTLIB$uppername\"
34195            test -z "$value" || LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$value"
34196          else
34197                                    :
34198          fi
34199        else
34200                              found_dir=
34201          found_la=
34202          found_so=
34203          found_a=
34204          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
34205          if test -n "$acl_shlibext"; then
34206            shrext=".$acl_shlibext"             # typically: shrext=.so
34207          else
34208            shrext=
34209          fi
34210          if test $use_additional = yes; then
34211            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
34212              if test "X$found_dir" = "X"; then
34213                eval dir=\$$additional_libdir_variable
34214                if test -n "$dir"; then
34215                                                      if test -n "$acl_shlibext"; then
34216                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
34217                      found_dir="$dir"
34218                      found_so="$dir/$libname$shrext"
34219                    else
34220                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34221                        ver=`(cd "$dir" && \
34222                              for f in "$libname$shrext".*; do echo "$f"; done \
34223                              | sed -e "s,^$libname$shrext\\\\.,," \
34224                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34225                              | sed 1q ) 2>/dev/null`
34226                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
34227                          found_dir="$dir"
34228                          found_so="$dir/$libname$shrext.$ver"
34229                        fi
34230                      else
34231                        eval library_names=\"$acl_library_names_spec\"
34232                        for f in $library_names; do
34233                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
34234                            found_dir="$dir"
34235                            found_so="$dir/$f"
34236                            break
34237                          fi
34238                        done
34239                      fi
34240                    fi
34241                  fi
34242                                    if test "X$found_dir" = "X"; then
34243                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
34244                      found_dir="$dir"
34245                      found_a="$dir/$libname.$acl_libext"
34246                    fi
34247                  fi
34248                  if test "X$found_dir" != "X"; then
34249                    if test -f "$dir/$libname.la"; then
34250                      found_la="$dir/$libname.la"
34251                    fi
34252                  fi
34253                fi
34254              fi
34255            done
34256          fi
34257          if test "X$found_dir" = "X"; then
34258            for x in $LDFLAGS $LTLIBUNISTRING; do
34259
34260  acl_save_prefix="$prefix"
34261  prefix="$acl_final_prefix"
34262  acl_save_exec_prefix="$exec_prefix"
34263  exec_prefix="$acl_final_exec_prefix"
34264  eval x=\"$x\"
34265  exec_prefix="$acl_save_exec_prefix"
34266  prefix="$acl_save_prefix"
34267
34268              case "$x" in
34269                -L*)
34270                  dir=`echo "X$x" | sed -e 's/^X-L//'`
34271                                    if test -n "$acl_shlibext"; then
34272                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
34273                      found_dir="$dir"
34274                      found_so="$dir/$libname$shrext"
34275                    else
34276                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34277                        ver=`(cd "$dir" && \
34278                              for f in "$libname$shrext".*; do echo "$f"; done \
34279                              | sed -e "s,^$libname$shrext\\\\.,," \
34280                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34281                              | sed 1q ) 2>/dev/null`
34282                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
34283                          found_dir="$dir"
34284                          found_so="$dir/$libname$shrext.$ver"
34285                        fi
34286                      else
34287                        eval library_names=\"$acl_library_names_spec\"
34288                        for f in $library_names; do
34289                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
34290                            found_dir="$dir"
34291                            found_so="$dir/$f"
34292                            break
34293                          fi
34294                        done
34295                      fi
34296                    fi
34297                  fi
34298                                    if test "X$found_dir" = "X"; then
34299                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
34300                      found_dir="$dir"
34301                      found_a="$dir/$libname.$acl_libext"
34302                    fi
34303                  fi
34304                  if test "X$found_dir" != "X"; then
34305                    if test -f "$dir/$libname.la"; then
34306                      found_la="$dir/$libname.la"
34307                    fi
34308                  fi
34309                  ;;
34310              esac
34311              if test "X$found_dir" != "X"; then
34312                break
34313              fi
34314            done
34315          fi
34316          if test "X$found_dir" != "X"; then
34317                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$found_dir -l$name"
34318            if test "X$found_so" != "X"; then
34319                                                        if test "$enable_rpath" = no \
34320                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
34321                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
34322                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
34323                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
34324              else
34325                                                                                haveit=
34326                for x in $ltrpathdirs; do
34327                  if test "X$x" = "X$found_dir"; then
34328                    haveit=yes
34329                    break
34330                  fi
34331                done
34332                if test -z "$haveit"; then
34333                  ltrpathdirs="$ltrpathdirs $found_dir"
34334                fi
34335                                if test "$acl_hardcode_direct" = yes; then
34336                                                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
34337                else
34338                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
34339                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
34340                                                            haveit=
34341                    for x in $rpathdirs; do
34342                      if test "X$x" = "X$found_dir"; then
34343                        haveit=yes
34344                        break
34345                      fi
34346                    done
34347                    if test -z "$haveit"; then
34348                      rpathdirs="$rpathdirs $found_dir"
34349                    fi
34350                  else
34351                                                                                haveit=
34352                    for x in $LDFLAGS $LIBUNISTRING; do
34353
34354  acl_save_prefix="$prefix"
34355  prefix="$acl_final_prefix"
34356  acl_save_exec_prefix="$exec_prefix"
34357  exec_prefix="$acl_final_exec_prefix"
34358  eval x=\"$x\"
34359  exec_prefix="$acl_save_exec_prefix"
34360  prefix="$acl_save_prefix"
34361
34362                      if test "X$x" = "X-L$found_dir"; then
34363                        haveit=yes
34364                        break
34365                      fi
34366                    done
34367                    if test -z "$haveit"; then
34368                      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir"
34369                    fi
34370                    if test "$acl_hardcode_minus_L" != no; then
34371                                                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_so"
34372                    else
34373                                                                                                                                                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
34374                    fi
34375                  fi
34376                fi
34377              fi
34378            else
34379              if test "X$found_a" != "X"; then
34380                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$found_a"
34381              else
34382                                                LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$found_dir -l$name"
34383              fi
34384            fi
34385                        additional_includedir=
34386            case "$found_dir" in
34387              */$acl_libdirstem | */$acl_libdirstem/)
34388                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
34389                if test "$name" = 'unistring'; then
34390                  LIBUNISTRING_PREFIX="$basedir"
34391                fi
34392                additional_includedir="$basedir/include"
34393                ;;
34394              */$acl_libdirstem2 | */$acl_libdirstem2/)
34395                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
34396                if test "$name" = 'unistring'; then
34397                  LIBUNISTRING_PREFIX="$basedir"
34398                fi
34399                additional_includedir="$basedir/include"
34400                ;;
34401              */$acl_libdirstem3 | */$acl_libdirstem3/)
34402                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
34403                if test "$name" = 'unistring'; then
34404                  LIBUNISTRING_PREFIX="$basedir"
34405                fi
34406                additional_includedir="$basedir/include"
34407                ;;
34408            esac
34409            if test "X$additional_includedir" != "X"; then
34410                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
34411                haveit=
34412                if test "X$additional_includedir" = "X/usr/local/include"; then
34413                  if test -n "$GCC"; then
34414                    case $host_os in
34415                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
34416                    esac
34417                  fi
34418                fi
34419                if test -z "$haveit"; then
34420                  for x in $CPPFLAGS $INCUNISTRING; do
34421
34422  acl_save_prefix="$prefix"
34423  prefix="$acl_final_prefix"
34424  acl_save_exec_prefix="$exec_prefix"
34425  exec_prefix="$acl_final_exec_prefix"
34426  eval x=\"$x\"
34427  exec_prefix="$acl_save_exec_prefix"
34428  prefix="$acl_save_prefix"
34429
34430                    if test "X$x" = "X-I$additional_includedir"; then
34431                      haveit=yes
34432                      break
34433                    fi
34434                  done
34435                  if test -z "$haveit"; then
34436                    if test -d "$additional_includedir"; then
34437                                            INCUNISTRING="${INCUNISTRING}${INCUNISTRING:+ }-I$additional_includedir"
34438                    fi
34439                  fi
34440                fi
34441              fi
34442            fi
34443                        if test -n "$found_la"; then
34444                                                        save_libdir="$libdir"
34445              case "$found_la" in
34446                */* | *\\*) . "$found_la" ;;
34447                *) . "./$found_la" ;;
34448              esac
34449              libdir="$save_libdir"
34450                            for dep in $dependency_libs; do
34451                case "$dep" in
34452                  -L*)
34453                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
34454                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
34455                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
34456                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
34457                      haveit=
34458                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
34459                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
34460                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
34461                        if test -n "$GCC"; then
34462                          case $host_os in
34463                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
34464                          esac
34465                        fi
34466                      fi
34467                      if test -z "$haveit"; then
34468                        haveit=
34469                        for x in $LDFLAGS $LIBUNISTRING; do
34470
34471  acl_save_prefix="$prefix"
34472  prefix="$acl_final_prefix"
34473  acl_save_exec_prefix="$exec_prefix"
34474  exec_prefix="$acl_final_exec_prefix"
34475  eval x=\"$x\"
34476  exec_prefix="$acl_save_exec_prefix"
34477  prefix="$acl_save_prefix"
34478
34479                          if test "X$x" = "X-L$dependency_libdir"; then
34480                            haveit=yes
34481                            break
34482                          fi
34483                        done
34484                        if test -z "$haveit"; then
34485                          if test -d "$dependency_libdir"; then
34486                                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-L$dependency_libdir"
34487                          fi
34488                        fi
34489                        haveit=
34490                        for x in $LDFLAGS $LTLIBUNISTRING; do
34491
34492  acl_save_prefix="$prefix"
34493  prefix="$acl_final_prefix"
34494  acl_save_exec_prefix="$exec_prefix"
34495  exec_prefix="$acl_final_exec_prefix"
34496  eval x=\"$x\"
34497  exec_prefix="$acl_save_exec_prefix"
34498  prefix="$acl_save_prefix"
34499
34500                          if test "X$x" = "X-L$dependency_libdir"; then
34501                            haveit=yes
34502                            break
34503                          fi
34504                        done
34505                        if test -z "$haveit"; then
34506                          if test -d "$dependency_libdir"; then
34507                                                        LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-L$dependency_libdir"
34508                          fi
34509                        fi
34510                      fi
34511                    fi
34512                    ;;
34513                  -R*)
34514                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
34515                    if test "$enable_rpath" != no; then
34516                                                                  haveit=
34517                      for x in $rpathdirs; do
34518                        if test "X$x" = "X$dir"; then
34519                          haveit=yes
34520                          break
34521                        fi
34522                      done
34523                      if test -z "$haveit"; then
34524                        rpathdirs="$rpathdirs $dir"
34525                      fi
34526                                                                  haveit=
34527                      for x in $ltrpathdirs; do
34528                        if test "X$x" = "X$dir"; then
34529                          haveit=yes
34530                          break
34531                        fi
34532                      done
34533                      if test -z "$haveit"; then
34534                        ltrpathdirs="$ltrpathdirs $dir"
34535                      fi
34536                    fi
34537                    ;;
34538                  -l*)
34539                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
34540                    ;;
34541                  *.la)
34542                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
34543                    ;;
34544                  *)
34545                                        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$dep"
34546                    LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }$dep"
34547                    ;;
34548                esac
34549              done
34550            fi
34551          else
34552                                                            LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }-l$name"
34553            LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-l$name"
34554          fi
34555        fi
34556      fi
34557    done
34558  done
34559  if test "X$rpathdirs" != "X"; then
34560    if test -n "$acl_hardcode_libdir_separator"; then
34561                        alldirs=
34562      for found_dir in $rpathdirs; do
34563        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
34564      done
34565            acl_save_libdir="$libdir"
34566      libdir="$alldirs"
34567      eval flag=\"$acl_hardcode_libdir_flag_spec\"
34568      libdir="$acl_save_libdir"
34569      LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
34570    else
34571            for found_dir in $rpathdirs; do
34572        acl_save_libdir="$libdir"
34573        libdir="$found_dir"
34574        eval flag=\"$acl_hardcode_libdir_flag_spec\"
34575        libdir="$acl_save_libdir"
34576        LIBUNISTRING="${LIBUNISTRING}${LIBUNISTRING:+ }$flag"
34577      done
34578    fi
34579  fi
34580  if test "X$ltrpathdirs" != "X"; then
34581            for found_dir in $ltrpathdirs; do
34582      LTLIBUNISTRING="${LTLIBUNISTRING}${LTLIBUNISTRING:+ }-R$found_dir"
34583    done
34584  fi
34585
34586
34587
34588
34589
34590
34591        ac_save_CPPFLAGS="$CPPFLAGS"
34592
34593  for element in $INCUNISTRING; do
34594    haveit=
34595    for x in $CPPFLAGS; do
34596
34597  acl_save_prefix="$prefix"
34598  prefix="$acl_final_prefix"
34599  acl_save_exec_prefix="$exec_prefix"
34600  exec_prefix="$acl_final_exec_prefix"
34601  eval x=\"$x\"
34602  exec_prefix="$acl_save_exec_prefix"
34603  prefix="$acl_save_prefix"
34604
34605      if test "X$x" = "X$element"; then
34606        haveit=yes
34607        break
34608      fi
34609    done
34610    if test -z "$haveit"; then
34611      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
34612    fi
34613  done
34614
34615
34616  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunistring" >&5
34617$as_echo_n "checking for libunistring... " >&6; }
34618if ${ac_cv_libunistring+:} false; then :
34619  $as_echo_n "(cached) " >&6
34620else
34621
34622    ac_save_LIBS="$LIBS"
34623                                case " $LIBUNISTRING" in
34624      *" -l"*) LIBS="$LIBS $LIBUNISTRING" ;;
34625      *)       LIBS="$LIBUNISTRING $LIBS" ;;
34626    esac
34627    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34628/* end confdefs.h.  */
34629#include <uniconv.h>
34630int
34631main ()
34632{
34633u8_strconv_from_locale((char*)0);
34634  ;
34635  return 0;
34636}
34637_ACEOF
34638if ac_fn_c_try_link "$LINENO"; then :
34639  ac_cv_libunistring=yes
34640else
34641  ac_cv_libunistring='no, consider installing GNU libunistring'
34642fi
34643rm -f core conftest.err conftest.$ac_objext \
34644    conftest$ac_exeext conftest.$ac_ext
34645    LIBS="$ac_save_LIBS"
34646
34647fi
34648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libunistring" >&5
34649$as_echo "$ac_cv_libunistring" >&6; }
34650  if test "$ac_cv_libunistring" = yes; then
34651    HAVE_LIBUNISTRING=yes
34652
34653$as_echo "#define HAVE_LIBUNISTRING 1" >>confdefs.h
34654
34655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libunistring" >&5
34656$as_echo_n "checking how to link with libunistring... " >&6; }
34657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBUNISTRING" >&5
34658$as_echo "$LIBUNISTRING" >&6; }
34659  else
34660    HAVE_LIBUNISTRING=no
34661            CPPFLAGS="$ac_save_CPPFLAGS"
34662    LIBUNISTRING=
34663    LTLIBUNISTRING=
34664    LIBUNISTRING_PREFIX=
34665  fi
34666
34667
34668
34669
34670
34671
34672
34673  fi
34674  if test $HAVE_LIBUNISTRING = yes; then
34675        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libunistring version" >&5
34676$as_echo_n "checking for libunistring version... " >&6; }
34677if ${gl_cv_libunistring_version+:} false; then :
34678  $as_echo_n "(cached) " >&6
34679else
34680  if ac_fn_c_compute_int "$LINENO" "_LIBUNISTRING_VERSION" "gl_libunistring_hexversion"        "#include <unistring/version.h>"; then :
34681
34682fi
34683
34684                     if test $gl_libunistring_hexversion = 9; then
34685                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34686/* end confdefs.h.  */
34687#include <unistring/cdefs.h>
34688int
34689main ()
34690{
34691
34692  ;
34693  return 0;
34694}
34695_ACEOF
34696if ac_fn_c_try_compile "$LINENO"; then :
34697  gl_cv_libunistring_version092=true
34698else
34699  gl_cv_libunistring_version092=false
34700fi
34701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34702         if $gl_cv_libunistring_version092; then
34703
34704
34705  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34706/* end confdefs.h.  */
34707#include <unistr.h>
34708_ACEOF
34709                case "$host_os" in
34710    aix*) gl_absname_cpp="$ac_cpp -C" ;;
34711    *)    gl_absname_cpp="$ac_cpp" ;;
34712  esac
34713
34714  case "$host_os" in
34715    mingw*)
34716                                          gl_dirsep_regex='[/\\]'
34717      ;;
34718    *)
34719      gl_dirsep_regex='\/'
34720      ;;
34721  esac
34722      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34723  gl_header_literal_regex=`echo 'unistr.h' \
34724                           | sed -e "$gl_make_literal_regex_sed"`
34725  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34726      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34727      s|^/[^/]|//&|
34728      p
34729      q
34730    }'
34731
34732        gl_cv_absolute_unistr_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34733  sed -n "$gl_absolute_header_sed"`
34734
34735           if test -n "$gl_cv_absolute_unistr_h" \
34736              && grep 'Copy no more than N units of SRC to DEST.  Return a pointer' $gl_cv_absolute_unistr_h > /dev/null; then
34737                          gl_libunistring_hexversion=2307
34738           else
34739                          gl_libunistring_hexversion=2306
34740           fi
34741         else
34742                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34743/* end confdefs.h.  */
34744#include <unicase.h>
34745                  casing_suffix_context_t ct;
34746int
34747main ()
34748{
34749
34750  ;
34751  return 0;
34752}
34753_ACEOF
34754if ac_fn_c_try_compile "$LINENO"; then :
34755  gl_cv_libunistring_version091=true
34756else
34757  gl_cv_libunistring_version091=false
34758fi
34759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34760           if $gl_cv_libunistring_version091; then
34761                          gl_libunistring_hexversion=2305
34762           else
34763                          gl_libunistring_hexversion=2304
34764           fi
34765         fi
34766       fi
34767              gl_libunistring_major=`expr $gl_libunistring_hexversion / 65536`
34768       gl_libunistring_minor=`expr $gl_libunistring_hexversion / 256 % 256`
34769       gl_libunistring_subminor=`expr $gl_libunistring_hexversion % 256`
34770       gl_cv_libunistring_version="$gl_libunistring_major.$gl_libunistring_minor.$gl_libunistring_subminor"
34771
34772fi
34773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_libunistring_version" >&5
34774$as_echo "$gl_cv_libunistring_version" >&6; }
34775    LIBUNISTRING_VERSION="$gl_cv_libunistring_version"
34776  fi
34777
34778        if test $HAVE_LIBUNISTRING = no; then
34779          gl_libunistring_use_included=yes
34780          LIBUNISTRING=
34781          LTLIBUNISTRING=
34782        fi
34783      fi
34784
34785
34786
34787
34788
34789
34790
34791  GNULIB_LOCALECONV=0;
34792  GNULIB_SETLOCALE=0;
34793  GNULIB_SETLOCALE_NULL=0;
34794  GNULIB_DUPLOCALE=0;
34795  GNULIB_LOCALENAME=0;
34796    HAVE_NEWLOCALE=1;
34797  HAVE_DUPLOCALE=1;
34798  HAVE_FREELOCALE=1;
34799  REPLACE_LOCALECONV=0;
34800  REPLACE_SETLOCALE=0;
34801  REPLACE_NEWLOCALE=0;
34802  REPLACE_DUPLOCALE=0;
34803  REPLACE_FREELOCALE=0;
34804  REPLACE_STRUCT_LCONV=0;
34805
34806
34807    REPLACE_NULL=0;
34808  HAVE_MAX_ALIGN_T=1;
34809  HAVE_WCHAR_T=1;
34810
34811
34812
34813
34814  STDDEF_H=
34815
34816      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
34817$as_echo_n "checking for good max_align_t... " >&6; }
34818if ${gl_cv_type_max_align_t+:} false; then :
34819  $as_echo_n "(cached) " >&6
34820else
34821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34822/* end confdefs.h.  */
34823#include <stddef.h>
34824            unsigned int s = sizeof (max_align_t);
34825            #if defined __GNUC__ || defined __IBM__ALIGNOF__
34826            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
34827            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
34828            #endif
34829
34830int
34831main ()
34832{
34833
34834  ;
34835  return 0;
34836}
34837_ACEOF
34838if ac_fn_c_try_compile "$LINENO"; then :
34839  gl_cv_type_max_align_t=yes
34840else
34841  gl_cv_type_max_align_t=no
34842fi
34843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34844
34845fi
34846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
34847$as_echo "$gl_cv_type_max_align_t" >&6; }
34848  if test $gl_cv_type_max_align_t = no; then
34849    HAVE_MAX_ALIGN_T=0
34850    STDDEF_H=stddef.h
34851  fi
34852
34853  if test $gt_cv_c_wchar_t = no; then
34854    HAVE_WCHAR_T=0
34855    STDDEF_H=stddef.h
34856  fi
34857
34858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
34859$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
34860if ${gl_cv_decl_null_works+:} false; then :
34861  $as_echo_n "(cached) " >&6
34862else
34863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34864/* end confdefs.h.  */
34865#include <stddef.h>
34866      int test[2 * (sizeof NULL == sizeof (void *)) -1];
34867
34868int
34869main ()
34870{
34871
34872  ;
34873  return 0;
34874}
34875_ACEOF
34876if ac_fn_c_try_compile "$LINENO"; then :
34877  gl_cv_decl_null_works=yes
34878else
34879  gl_cv_decl_null_works=no
34880fi
34881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34882fi
34883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
34884$as_echo "$gl_cv_decl_null_works" >&6; }
34885  if test $gl_cv_decl_null_works = no; then
34886    REPLACE_NULL=1
34887    STDDEF_H=stddef.h
34888  fi
34889
34890
34891   if test -n "$STDDEF_H"; then
34892  GL_GENERATE_STDDEF_H_TRUE=
34893  GL_GENERATE_STDDEF_H_FALSE='#'
34894else
34895  GL_GENERATE_STDDEF_H_TRUE='#'
34896  GL_GENERATE_STDDEF_H_FALSE=
34897fi
34898
34899  if test -n "$STDDEF_H"; then
34900
34901
34902
34903
34904
34905
34906
34907
34908     if test $gl_cv_have_include_next = yes; then
34909       gl_cv_next_stddef_h='<'stddef.h'>'
34910     else
34911       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
34912$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
34913if ${gl_cv_next_stddef_h+:} false; then :
34914  $as_echo_n "(cached) " >&6
34915else
34916
34917
34918
34919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34920/* end confdefs.h.  */
34921#include <stddef.h>
34922_ACEOF
34923                case "$host_os" in
34924    aix*) gl_absname_cpp="$ac_cpp -C" ;;
34925    *)    gl_absname_cpp="$ac_cpp" ;;
34926  esac
34927
34928  case "$host_os" in
34929    mingw*)
34930                                          gl_dirsep_regex='[/\\]'
34931      ;;
34932    *)
34933      gl_dirsep_regex='\/'
34934      ;;
34935  esac
34936      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34937  gl_header_literal_regex=`echo 'stddef.h' \
34938                           | sed -e "$gl_make_literal_regex_sed"`
34939  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34940      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34941      s|^/[^/]|//&|
34942      p
34943      q
34944    }'
34945
34946        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34947  sed -n "$gl_absolute_header_sed"`
34948
34949           gl_header=$gl_cv_absolute_stddef_h
34950           gl_cv_next_stddef_h='"'$gl_header'"'
34951
34952
34953fi
34954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
34955$as_echo "$gl_cv_next_stddef_h" >&6; }
34956     fi
34957     NEXT_STDDEF_H=$gl_cv_next_stddef_h
34958
34959     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34960       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34961       gl_next_as_first_directive='<'stddef.h'>'
34962     else
34963       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34964       gl_next_as_first_directive=$gl_cv_next_stddef_h
34965     fi
34966     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
34967
34968
34969
34970
34971  fi
34972
34973
34974
34975
34976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
34977$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
34978if ${gl_cv_header_locale_has_locale_t+:} false; then :
34979  $as_echo_n "(cached) " >&6
34980else
34981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34982/* end confdefs.h.  */
34983#include <locale.h>
34984            locale_t x;
34985int
34986main ()
34987{
34988
34989  ;
34990  return 0;
34991}
34992_ACEOF
34993if ac_fn_c_try_compile "$LINENO"; then :
34994  gl_cv_header_locale_has_locale_t=yes
34995else
34996  gl_cv_header_locale_has_locale_t=no
34997fi
34998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34999
35000fi
35001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
35002$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
35003
35004
35005  if test $ac_cv_header_xlocale_h = yes; then
35006    HAVE_XLOCALE_H=1
35007    if test $gl_cv_header_locale_has_locale_t = yes; then
35008      gl_cv_header_locale_h_needs_xlocale_h=no
35009    else
35010      gl_cv_header_locale_h_needs_xlocale_h=yes
35011    fi
35012    HAVE_LOCALE_T=1
35013  else
35014    HAVE_XLOCALE_H=0
35015    gl_cv_header_locale_h_needs_xlocale_h=no
35016    if test $gl_cv_header_locale_has_locale_t = yes; then
35017      HAVE_LOCALE_T=1
35018    else
35019      HAVE_LOCALE_T=0
35020    fi
35021  fi
35022
35023
35024
35025
35026
35027
35028
35029
35030
35031  GNULIB_CTIME=0;
35032  GNULIB_MKTIME=0;
35033  GNULIB_LOCALTIME=0;
35034  GNULIB_NANOSLEEP=0;
35035  GNULIB_STRFTIME=0;
35036  GNULIB_STRPTIME=0;
35037  GNULIB_TIMEGM=0;
35038  GNULIB_TIME_R=0;
35039  GNULIB_TIME_RZ=0;
35040  GNULIB_TZSET=0;
35041    HAVE_DECL_LOCALTIME_R=1;
35042  HAVE_NANOSLEEP=1;
35043  HAVE_STRPTIME=1;
35044  HAVE_TIMEGM=1;
35045  HAVE_TZSET=1;
35046    HAVE_TIMEZONE_T=0;
35047        REPLACE_CTIME=GNULIB_PORTCHECK;
35048  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
35049  REPLACE_MKTIME=GNULIB_PORTCHECK;
35050  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
35051  REPLACE_STRFTIME=GNULIB_PORTCHECK;
35052  REPLACE_TIMEGM=GNULIB_PORTCHECK;
35053  REPLACE_TZSET=GNULIB_PORTCHECK;
35054
35055      : ${GNULIB_GETTIMEOFDAY=0};
35056        REPLACE_GMTIME=0;
35057  REPLACE_LOCALTIME=0;
35058
35059
35060
35061
35062
35063
35064  POW_LIBM=
35065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pow can be used without linking with libm" >&5
35066$as_echo_n "checking whether pow can be used without linking with libm... " >&6; }
35067if ${gl_cv_func_pow_no_libm+:} false; then :
35068  $as_echo_n "(cached) " >&6
35069else
35070
35071      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35072/* end confdefs.h.  */
35073#ifndef __NO_MATH_INLINES
35074             # define __NO_MATH_INLINES 1 /* for glibc */
35075             #endif
35076             #include <math.h>
35077
35078             double (* volatile funcptr) (double, double) = pow;
35079             int i_ret;
35080             float f_ret;
35081             double d_ret;
35082             long double l_ret;
35083int
35084main ()
35085{
35086double y = funcptr (1.6180339887, 1.6180339887) + pow (1.6180339887, 1.6180339887);
35087
35088             return y < 0.3 || y > 1.7;
35089
35090  ;
35091  return 0;
35092}
35093_ACEOF
35094if ac_fn_c_try_link "$LINENO"; then :
35095  gl_cv_func_pow_no_libm=yes
35096else
35097  gl_cv_func_pow_no_libm=no
35098fi
35099rm -f core conftest.err conftest.$ac_objext \
35100    conftest$ac_exeext conftest.$ac_ext
35101
35102fi
35103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pow_no_libm" >&5
35104$as_echo "$gl_cv_func_pow_no_libm" >&6; }
35105  if test $gl_cv_func_pow_no_libm = no; then
35106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pow can be used with libm" >&5
35107$as_echo_n "checking whether pow can be used with libm... " >&6; }
35108if ${gl_cv_func_pow_in_libm+:} false; then :
35109  $as_echo_n "(cached) " >&6
35110else
35111
35112        save_LIBS="$LIBS"
35113        LIBS="$LIBS -lm"
35114        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35115/* end confdefs.h.  */
35116#ifndef __NO_MATH_INLINES
35117               # define __NO_MATH_INLINES 1 /* for glibc */
35118               #endif
35119               #include <math.h>
35120
35121               double (* volatile funcptr) (double, double) = pow;
35122               int i_ret;
35123               float f_ret;
35124               double d_ret;
35125               long double l_ret;
35126int
35127main ()
35128{
35129double y = funcptr (1.6180339887, 1.6180339887) + pow (1.6180339887, 1.6180339887);
35130
35131               return y < 0.3 || y > 1.7;
35132
35133  ;
35134  return 0;
35135}
35136_ACEOF
35137if ac_fn_c_try_link "$LINENO"; then :
35138  gl_cv_func_pow_in_libm=yes
35139else
35140  gl_cv_func_pow_in_libm=no
35141fi
35142rm -f core conftest.err conftest.$ac_objext \
35143    conftest$ac_exeext conftest.$ac_ext
35144        LIBS="$save_LIBS"
35145
35146fi
35147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pow_in_libm" >&5
35148$as_echo "$gl_cv_func_pow_in_libm" >&6; }
35149    if test $gl_cv_func_pow_in_libm = yes; then
35150      POW_LIBM=-lm
35151    fi
35152  fi
35153
35154
35155
35156
35157
35158
35159
35160
35161
35162         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
35163$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
35164if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
35165  $as_echo_n "(cached) " >&6
35166else
35167  rm -f conftest.sym conftest.file
35168     echo >conftest.file
35169     if test "$cross_compiling" = yes; then :
35170  case "$host_os" in
35171          linux-* | linux)
35172            # Guess yes on Linux systems.
35173            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
35174          *-gnu* | gnu*)
35175            # Guess yes on glibc systems.
35176            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
35177          mingw*)
35178            # Guess no on native Windows.
35179            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
35180          *)
35181            # If we don't know, obey --enable-cross-guesses.
35182            gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
35183        esac
35184
35185else
35186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35187/* end confdefs.h.  */
35188$ac_includes_default
35189int
35190main ()
35191{
35192struct stat sbuf;
35193            if (symlink ("conftest.file", "conftest.sym") != 0)
35194              return 1;
35195            /* Linux will dereference the symlink and fail, as required by
35196               POSIX.  That is better in the sense that it means we will not
35197               have to compile and use the lstat wrapper.  */
35198            return lstat ("conftest.sym/", &sbuf) == 0;
35199
35200  ;
35201  return 0;
35202}
35203_ACEOF
35204if ac_fn_c_try_run "$LINENO"; then :
35205  gl_cv_func_lstat_dereferences_slashed_symlink=yes
35206else
35207  gl_cv_func_lstat_dereferences_slashed_symlink=no
35208fi
35209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35210  conftest.$ac_objext conftest.beam conftest.$ac_ext
35211fi
35212
35213     rm -f conftest.sym conftest.file
35214
35215fi
35216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
35217$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
35218  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
35219    *yes)
35220
35221cat >>confdefs.h <<_ACEOF
35222#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
35223_ACEOF
35224
35225      ;;
35226  esac
35227
35228
35229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
35230$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
35231if ${gl_cv_func_malloc_posix+:} false; then :
35232  $as_echo_n "(cached) " >&6
35233else
35234
35235                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35236/* end confdefs.h.  */
35237
35238int
35239main ()
35240{
35241#if defined _WIN32 && ! defined __CYGWIN__
35242             choke me
35243             #endif
35244
35245  ;
35246  return 0;
35247}
35248_ACEOF
35249if ac_fn_c_try_compile "$LINENO"; then :
35250  gl_cv_func_malloc_posix=yes
35251else
35252  gl_cv_func_malloc_posix=no
35253fi
35254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35255
35256fi
35257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
35258$as_echo "$gl_cv_func_malloc_posix" >&6; }
35259
35260
35261
35262      for ac_header in stdlib.h
35263do :
35264  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
35265if test "x$ac_cv_header_stdlib_h" = xyes; then :
35266  cat >>confdefs.h <<_ACEOF
35267#define HAVE_STDLIB_H 1
35268_ACEOF
35269
35270fi
35271
35272done
35273
35274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
35275$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
35276if ${ac_cv_func_malloc_0_nonnull+:} false; then :
35277  $as_echo_n "(cached) " >&6
35278else
35279  if test "$cross_compiling" = yes; then :
35280  case "$host_os" in
35281          # Guess yes on platforms where we know the result.
35282          *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
35283          | hpux* | solaris* | cygwin* | mingw*)
35284            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
35285          # If we don't know, obey --enable-cross-guesses.
35286          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
35287        esac
35288
35289else
35290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35291/* end confdefs.h.  */
35292#if defined STDC_HEADERS || defined HAVE_STDLIB_H
35293            # include <stdlib.h>
35294            #else
35295            char *malloc ();
35296            #endif
35297
35298int
35299main ()
35300{
35301char *p = malloc (0);
35302            int result = !p;
35303            free (p);
35304            return result;
35305  ;
35306  return 0;
35307}
35308
35309_ACEOF
35310if ac_fn_c_try_run "$LINENO"; then :
35311  ac_cv_func_malloc_0_nonnull=yes
35312else
35313  ac_cv_func_malloc_0_nonnull=no
35314fi
35315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35316  conftest.$ac_objext conftest.beam conftest.$ac_ext
35317fi
35318
35319
35320fi
35321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
35322$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
35323  case "$ac_cv_func_malloc_0_nonnull" in
35324    *yes)
35325      gl_cv_func_malloc_0_nonnull=1
35326      ;;
35327    *)
35328      gl_cv_func_malloc_0_nonnull=0
35329      ;;
35330  esac
35331
35332
35333cat >>confdefs.h <<_ACEOF
35334#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
35335_ACEOF
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
35358  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
35359  # irrelevant for anonymous mappings.
35360  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
35361if test "x$ac_cv_func_mmap" = xyes; then :
35362  gl_have_mmap=yes
35363else
35364  gl_have_mmap=no
35365fi
35366
35367
35368  # Try to allow MAP_ANONYMOUS.
35369  gl_have_mmap_anonymous=no
35370  if test $gl_have_mmap = yes; then
35371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
35372$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
35373    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35374/* end confdefs.h.  */
35375
35376#include <sys/mman.h>
35377#ifdef MAP_ANONYMOUS
35378    I cannot identify this map
35379#endif
35380
35381_ACEOF
35382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35383  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
35384  gl_have_mmap_anonymous=yes
35385fi
35386rm -f conftest*
35387
35388    if test $gl_have_mmap_anonymous != yes; then
35389      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35390/* end confdefs.h.  */
35391
35392#include <sys/mman.h>
35393#ifdef MAP_ANON
35394    I cannot identify this map
35395#endif
35396
35397_ACEOF
35398if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35399  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
35400
35401$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
35402
35403         gl_have_mmap_anonymous=yes
35404fi
35405rm -f conftest*
35406
35407    fi
35408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
35409$as_echo "$gl_have_mmap_anonymous" >&6; }
35410    if test $gl_have_mmap_anonymous = yes; then
35411
35412$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
35413
35414    fi
35415  fi
35416
35417
35418
35419
35420
35421  # Detect platform-specific bugs in some versions of glibc:
35422  # memchr should not dereference anything with length 0
35423  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
35424  # memchr should not dereference overestimated length after a match
35425  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
35426  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
35427  # memchr should cast the second argument to 'unsigned char'.
35428  #   This bug exists in Android 4.3.
35429  # Assume that memchr works on platforms that lack mprotect.
35430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
35431$as_echo_n "checking whether memchr works... " >&6; }
35432if ${gl_cv_func_memchr_works+:} false; then :
35433  $as_echo_n "(cached) " >&6
35434else
35435  if test "$cross_compiling" = yes; then :
35436  case "$host_os" in
35437                           # Guess no on Android.
35438          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
35439                           # Guess yes on native Windows.
35440          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
35441                           # If we don't know, obey --enable-cross-guesses.
35442          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
35443        esac
35444
35445else
35446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35447/* end confdefs.h.  */
35448
35449#include <string.h>
35450#if HAVE_SYS_MMAN_H
35451# include <fcntl.h>
35452# include <unistd.h>
35453# include <sys/types.h>
35454# include <sys/mman.h>
35455# ifndef MAP_FILE
35456#  define MAP_FILE 0
35457# endif
35458#endif
35459
35460int
35461main ()
35462{
35463
35464  int result = 0;
35465  char *fence = NULL;
35466#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
35467# if HAVE_MAP_ANONYMOUS
35468  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
35469  const int fd = -1;
35470# else /* !HAVE_MAP_ANONYMOUS */
35471  const int flags = MAP_FILE | MAP_PRIVATE;
35472  int fd = open ("/dev/zero", O_RDONLY, 0666);
35473  if (fd >= 0)
35474# endif
35475    {
35476      int pagesize = getpagesize ();
35477      char *two_pages =
35478        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
35479                       flags, fd, 0);
35480      if (two_pages != (char *)(-1)
35481          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
35482        fence = two_pages + pagesize;
35483    }
35484#endif
35485  if (fence)
35486    {
35487      if (memchr (fence, 0, 0))
35488        result |= 1;
35489      strcpy (fence - 9, "12345678");
35490      if (memchr (fence - 9, 0, 79) != fence - 1)
35491        result |= 2;
35492      if (memchr (fence - 1, 0, 3) != fence - 1)
35493        result |= 4;
35494    }
35495  /* Test against bug on Android 4.3.  */
35496  {
35497    char input[3];
35498    input[0] = 'a';
35499    input[1] = 'b';
35500    input[2] = 'c';
35501    if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
35502      result |= 8;
35503  }
35504  return result;
35505
35506  ;
35507  return 0;
35508}
35509_ACEOF
35510if ac_fn_c_try_run "$LINENO"; then :
35511  gl_cv_func_memchr_works=yes
35512else
35513  gl_cv_func_memchr_works=no
35514fi
35515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35516  conftest.$ac_objext conftest.beam conftest.$ac_ext
35517fi
35518
35519
35520fi
35521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
35522$as_echo "$gl_cv_func_memchr_works" >&6; }
35523  case "$gl_cv_func_memchr_works" in
35524    *yes) ;;
35525    *) REPLACE_MEMCHR=1 ;;
35526  esac
35527
35528
35529
35530
35531
35532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
35533$as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
35534if ${gl_cv_minmax_in_limits_h+:} false; then :
35535  $as_echo_n "(cached) " >&6
35536else
35537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35538/* end confdefs.h.  */
35539#include <limits.h>
35540            int x = MIN (42, 17);
35541int
35542main ()
35543{
35544
35545  ;
35546  return 0;
35547}
35548_ACEOF
35549if ac_fn_c_try_compile "$LINENO"; then :
35550  gl_cv_minmax_in_limits_h=yes
35551else
35552  gl_cv_minmax_in_limits_h=no
35553fi
35554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35555fi
35556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
35557$as_echo "$gl_cv_minmax_in_limits_h" >&6; }
35558  if test $gl_cv_minmax_in_limits_h = yes; then
35559
35560$as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
35561
35562  fi
35563
35564
35565
35566
35567
35568
35569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
35570$as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
35571if ${gl_cv_minmax_in_sys_param_h+:} false; then :
35572  $as_echo_n "(cached) " >&6
35573else
35574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35575/* end confdefs.h.  */
35576#include <sys/param.h>
35577            int x = MIN (42, 17);
35578int
35579main ()
35580{
35581
35582  ;
35583  return 0;
35584}
35585_ACEOF
35586if ac_fn_c_try_compile "$LINENO"; then :
35587  gl_cv_minmax_in_sys_param_h=yes
35588else
35589  gl_cv_minmax_in_sys_param_h=no
35590fi
35591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35592fi
35593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
35594$as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
35595  if test $gl_cv_minmax_in_sys_param_h = yes; then
35596
35597$as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
35598
35599  fi
35600
35601
35602
35603
35604
35605
35606
35607
35608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
35609$as_echo_n "checking for O_CLOEXEC... " >&6; }
35610if ${gl_cv_macro_O_CLOEXEC+:} false; then :
35611  $as_echo_n "(cached) " >&6
35612else
35613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35614/* end confdefs.h.  */
35615#include <fcntl.h>
35616                          #ifndef O_CLOEXEC
35617                            choke me;
35618                          #endif
35619
35620int
35621main ()
35622{
35623return O_CLOEXEC;
35624  ;
35625  return 0;
35626}
35627_ACEOF
35628if ac_fn_c_try_compile "$LINENO"; then :
35629  gl_cv_macro_O_CLOEXEC=yes
35630else
35631  gl_cv_macro_O_CLOEXEC=no
35632fi
35633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35634fi
35635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
35636$as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
35637
35638
35639
35640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
35641$as_echo_n "checking for promoted mode_t type... " >&6; }
35642if ${gl_cv_promoted_mode_t+:} false; then :
35643  $as_echo_n "(cached) " >&6
35644else
35645
35646                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35647/* end confdefs.h.  */
35648#include <sys/types.h>
35649int
35650main ()
35651{
35652typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
35653  ;
35654  return 0;
35655}
35656_ACEOF
35657if ac_fn_c_try_compile "$LINENO"; then :
35658  gl_cv_promoted_mode_t='int'
35659else
35660  gl_cv_promoted_mode_t='mode_t'
35661fi
35662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35663
35664fi
35665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
35666$as_echo "$gl_cv_promoted_mode_t" >&6; }
35667
35668cat >>confdefs.h <<_ACEOF
35669#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
35670_ACEOF
35671
35672
35673
35674
35675
35676
35677
35678  GNULIB_POSIX_SPAWN=0;
35679  GNULIB_POSIX_SPAWNP=0;
35680  GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
35681  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0;
35682  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
35683  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
35684  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0;
35685  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
35686  GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
35687  GNULIB_POSIX_SPAWNATTR_INIT=0;
35688  GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
35689  GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
35690  GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
35691  GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
35692  GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
35693  GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
35694  GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
35695  GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
35696  GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
35697  GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
35698  GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
35699  GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
35700  GNULIB_POSIX_SPAWNATTR_DESTROY=0;
35701    HAVE_POSIX_SPAWN=1;
35702  HAVE_POSIX_SPAWNATTR_T=1;
35703  HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
35704
35705  HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1;
35706
35707  HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=1;
35708
35709  REPLACE_POSIX_SPAWN=0;
35710  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0;
35711
35712  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
35713
35714  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
35715
35716  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0;
35717
35718  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
35719
35720
35721
35722
35723
35724  LIB_POSIX_SPAWN=
35725
35726  gl_saved_libs=$LIBS
35727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
35728$as_echo_n "checking for library containing posix_spawn... " >&6; }
35729if ${ac_cv_search_posix_spawn+:} false; then :
35730  $as_echo_n "(cached) " >&6
35731else
35732  ac_func_search_save_LIBS=$LIBS
35733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35734/* end confdefs.h.  */
35735
35736/* Override any GCC internal prototype to avoid an error.
35737   Use char because int might match the return type of a GCC
35738   builtin and then its argument prototype would still apply.  */
35739#ifdef __cplusplus
35740extern "C"
35741#endif
35742char posix_spawn ();
35743int
35744main ()
35745{
35746return posix_spawn ();
35747  ;
35748  return 0;
35749}
35750_ACEOF
35751for ac_lib in '' rt; do
35752  if test -z "$ac_lib"; then
35753    ac_res="none required"
35754  else
35755    ac_res=-l$ac_lib
35756    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
35757  fi
35758  if ac_fn_c_try_link "$LINENO"; then :
35759  ac_cv_search_posix_spawn=$ac_res
35760fi
35761rm -f core conftest.err conftest.$ac_objext \
35762    conftest$ac_exeext
35763  if ${ac_cv_search_posix_spawn+:} false; then :
35764  break
35765fi
35766done
35767if ${ac_cv_search_posix_spawn+:} false; then :
35768
35769else
35770  ac_cv_search_posix_spawn=no
35771fi
35772rm conftest.$ac_ext
35773LIBS=$ac_func_search_save_LIBS
35774fi
35775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
35776$as_echo "$ac_cv_search_posix_spawn" >&6; }
35777ac_res=$ac_cv_search_posix_spawn
35778if test "$ac_res" != no; then :
35779  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
35780  test "$ac_cv_search_posix_spawn" = "none required" ||
35781                    LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
35782fi
35783
35784    for ac_func in posix_spawn
35785do :
35786  ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
35787if test "x$ac_cv_func_posix_spawn" = xyes; then :
35788  cat >>confdefs.h <<_ACEOF
35789#define HAVE_POSIX_SPAWN 1
35790_ACEOF
35791
35792fi
35793done
35794
35795  LIBS=$gl_saved_libs
35796
35797  if test $ac_cv_func_posix_spawn != yes; then
35798    HAVE_POSIX_SPAWN=0
35799  fi
35800
35801
35802
35803
35804                                      if test $ac_cv_func_posix_spawn = yes; then
35805
35806
35807    if test $REPLACE_POSIX_SPAWN = 0; then
35808
35809
35810     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
35811$as_echo_n "checking whether posix_spawn works... " >&6; }
35812if ${gl_cv_func_posix_spawn_works+:} false; then :
35813  $as_echo_n "(cached) " >&6
35814else
35815  if test $cross_compiling = no; then
35816       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35817/* end confdefs.h.  */
35818
35819#include <errno.h>
35820#include <fcntl.h>
35821#include <signal.h>
35822#include <spawn.h>
35823#include <stdbool.h>
35824#include <stdio.h>
35825#include <stdlib.h>
35826#include <string.h>
35827#include <unistd.h>
35828#include <sys/types.h>
35829#include <sys/wait.h>
35830
35831extern char **environ;
35832
35833#ifndef STDIN_FILENO
35834# define STDIN_FILENO 0
35835#endif
35836#ifndef STDOUT_FILENO
35837# define STDOUT_FILENO 1
35838#endif
35839#ifndef STDERR_FILENO
35840# define STDERR_FILENO 2
35841#endif
35842
35843#ifndef WTERMSIG
35844# define WTERMSIG(x) ((x) & 0x7f)
35845#endif
35846#ifndef WIFEXITED
35847# define WIFEXITED(x) (WTERMSIG (x) == 0)
35848#endif
35849#ifndef WEXITSTATUS
35850# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
35851#endif
35852
35853#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
35854
35855static int
35856fd_safer (int fd)
35857{
35858  if (0 <= fd && fd <= 2)
35859    {
35860      int f = fd_safer (dup (fd));
35861      int e = errno;
35862      close (fd);
35863      errno = e;
35864      fd = f;
35865    }
35866
35867  return fd;
35868}
35869
35870int
35871main ()
35872{
35873  char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
35874  int ofd[2];
35875  sigset_t blocked_signals;
35876  sigset_t fatal_signal_set;
35877  posix_spawn_file_actions_t actions;
35878  bool actions_allocated;
35879  posix_spawnattr_t attrs;
35880  bool attrs_allocated;
35881  int err;
35882  pid_t child;
35883  int status;
35884  int exitstatus;
35885
35886  setvbuf (stdout, NULL, _IOFBF, 0);
35887  puts ("This should be seen only once.");
35888  if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
35889    {
35890      perror ("cannot create pipe");
35891      exit (1);
35892    }
35893  sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
35894  sigemptyset (&fatal_signal_set);
35895  sigaddset (&fatal_signal_set, SIGINT);
35896  sigaddset (&fatal_signal_set, SIGTERM);
35897  sigaddset (&fatal_signal_set, SIGHUP);
35898  sigaddset (&fatal_signal_set, SIGPIPE);
35899  sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
35900  actions_allocated = false;
35901  attrs_allocated = false;
35902  if ((err = posix_spawn_file_actions_init (&actions)) != 0
35903      || (actions_allocated = true,
35904          (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
35905          || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
35906          || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
35907          || (err = posix_spawnattr_init (&attrs)) != 0
35908          || (attrs_allocated = true,
35909              (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
35910              || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
35911          || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
35912    {
35913      if (actions_allocated)
35914        posix_spawn_file_actions_destroy (&actions);
35915      if (attrs_allocated)
35916        posix_spawnattr_destroy (&attrs);
35917      sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
35918      if (err == ENOENT)
35919        return 0;
35920      else
35921        {
35922          errno = err;
35923          perror ("subprocess failed");
35924          exit (1);
35925        }
35926    }
35927  posix_spawn_file_actions_destroy (&actions);
35928  posix_spawnattr_destroy (&attrs);
35929  sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
35930  close (ofd[0]);
35931  close (ofd[1]);
35932  status = 0;
35933  while (waitpid (child, &status, 0) != child)
35934    ;
35935  if (!WIFEXITED (status))
35936    {
35937      fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
35938      exit (1);
35939    }
35940  exitstatus = WEXITSTATUS (status);
35941  if (exitstatus != 127)
35942    {
35943      fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
35944      exit (1);
35945    }
35946  return 0;
35947}
35948
35949_ACEOF
35950if ac_fn_c_try_link "$LINENO"; then :
35951  if test -s conftest$ac_exeext \
35952             && ./conftest$ac_exeext > conftest.out \
35953             && echo 'This should be seen only once.' > conftest.ok \
35954             && cmp conftest.out conftest.ok >/dev/null 2>&1; then
35955            gl_cv_func_posix_spawn_works=yes
35956          else
35957            gl_cv_func_posix_spawn_works=no
35958          fi
35959else
35960  gl_cv_func_posix_spawn_works=no
35961fi
35962rm -f core conftest.err conftest.$ac_objext \
35963    conftest$ac_exeext conftest.$ac_ext
35964       if test $gl_cv_func_posix_spawn_works = yes; then
35965         if test "$cross_compiling" = yes; then :
35966  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35968as_fn_error $? "cannot run test program while cross compiling
35969See \`config.log' for more details" "$LINENO" 5; }
35970else
35971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35972/* end confdefs.h.  */
35973
35974/* Test whether posix_spawn_file_actions_addopen supports filename arguments
35975   that contain special characters such as '*'.  */
35976
35977#include <errno.h>
35978#include <fcntl.h>
35979#include <signal.h>
35980#include <spawn.h>
35981#include <stdbool.h>
35982#include <stdio.h>
35983#include <string.h>
35984#include <unistd.h>
35985#include <sys/types.h>
35986#include <sys/wait.h>
35987
35988extern char **environ;
35989
35990#ifndef STDIN_FILENO
35991# define STDIN_FILENO 0
35992#endif
35993#ifndef STDOUT_FILENO
35994# define STDOUT_FILENO 1
35995#endif
35996#ifndef STDERR_FILENO
35997# define STDERR_FILENO 2
35998#endif
35999
36000#ifndef WTERMSIG
36001# define WTERMSIG(x) ((x) & 0x7f)
36002#endif
36003#ifndef WIFEXITED
36004# define WIFEXITED(x) (WTERMSIG (x) == 0)
36005#endif
36006#ifndef WEXITSTATUS
36007# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
36008#endif
36009
36010#define CHILD_PROGRAM_FILENAME "conftest"
36011#define DATA_FILENAME "conftest%=*#?"
36012
36013static int
36014parent_main (void)
36015{
36016  FILE *fp;
36017  char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
36018  posix_spawn_file_actions_t actions;
36019  bool actions_allocated;
36020  int err;
36021  pid_t child;
36022  int status;
36023  int exitstatus;
36024
36025  /* Create a data file with specific contents.  */
36026  fp = fopen (DATA_FILENAME, "wb");
36027  if (fp == NULL)
36028    {
36029      perror ("cannot create data file");
36030      return 1;
36031    }
36032  fwrite ("Halle Potta", 1, 11, fp);
36033  if (fflush (fp) || fclose (fp))
36034    {
36035      perror ("cannot prepare data file");
36036      return 2;
36037    }
36038
36039  /* Avoid reading from our stdin, as it could block.  */
36040  freopen ("/dev/null", "rb", stdin);
36041
36042  /* Test whether posix_spawn_file_actions_addopen with this file name
36043     actually works, but spawning a child that reads from this file.  */
36044  actions_allocated = false;
36045  if ((err = posix_spawn_file_actions_init (&actions)) != 0
36046      || (actions_allocated = true,
36047          (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
36048          || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
36049    {
36050      if (actions_allocated)
36051        posix_spawn_file_actions_destroy (&actions);
36052      errno = err;
36053      perror ("subprocess failed");
36054      return 3;
36055    }
36056  posix_spawn_file_actions_destroy (&actions);
36057  status = 0;
36058  while (waitpid (child, &status, 0) != child)
36059    ;
36060  if (!WIFEXITED (status))
36061    {
36062      fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
36063      return 4;
36064    }
36065  exitstatus = WEXITSTATUS (status);
36066  if (exitstatus != 0)
36067    {
36068      fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
36069      return 5;
36070    }
36071  return 0;
36072}
36073
36074static int
36075child_main (void)
36076{
36077  char buf[1024];
36078
36079  /* See if reading from STDIN_FILENO yields the expected contents.  */
36080  if (fread (buf, 1, sizeof (buf), stdin) == 11
36081      && memcmp (buf, "Halle Potta", 11) == 0)
36082    return 0;
36083  else
36084    return 8;
36085}
36086
36087static void
36088cleanup_then_die (int sig)
36089{
36090  /* Clean up data file.  */
36091  unlink (DATA_FILENAME);
36092
36093  /* Re-raise the signal and die from it.  */
36094  signal (sig, SIG_DFL);
36095  raise (sig);
36096}
36097
36098int
36099main (int argc, char *argv[])
36100{
36101  int exitstatus;
36102
36103  if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
36104    {
36105      /* This is the parent process.  */
36106      signal (SIGINT, cleanup_then_die);
36107      signal (SIGTERM, cleanup_then_die);
36108      #ifdef SIGHUP
36109      signal (SIGHUP, cleanup_then_die);
36110      #endif
36111
36112      exitstatus = parent_main ();
36113    }
36114  else
36115    {
36116      /* This is the child process.  */
36117
36118      exitstatus = child_main ();
36119    }
36120  unlink (DATA_FILENAME);
36121  return exitstatus;
36122}
36123
36124_ACEOF
36125if ac_fn_c_try_run "$LINENO"; then :
36126
36127else
36128  gl_cv_func_posix_spawn_works=no
36129fi
36130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36131  conftest.$ac_objext conftest.beam conftest.$ac_ext
36132fi
36133
36134       fi
36135     else
36136       case "$host_os" in
36137         aix*) gl_cv_func_posix_spawn_works="guessing no";;
36138         *)    gl_cv_func_posix_spawn_works="guessing yes";;
36139       esac
36140     fi
36141
36142fi
36143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
36144$as_echo "$gl_cv_func_posix_spawn_works" >&6; }
36145
36146      case "$gl_cv_func_posix_spawn_works" in
36147        *yes)
36148                                                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
36149$as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
36150if ${gl_cv_func_spawnattr_setschedpolicy+:} false; then :
36151  $as_echo_n "(cached) " >&6
36152else
36153  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36154/* end confdefs.h.  */
36155
36156#include <spawn.h>
36157#if POSIX_SPAWN_SETSCHEDULER
36158 POSIX scheduling supported
36159#endif
36160
36161_ACEOF
36162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36163  $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
36164  gl_cv_func_spawnattr_setschedpolicy=yes
36165else
36166  gl_cv_func_spawnattr_setschedpolicy=no
36167fi
36168rm -f conftest*
36169
36170
36171fi
36172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
36173$as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
36174                                                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
36175$as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
36176if ${gl_cv_func_spawnattr_setschedparam+:} false; then :
36177  $as_echo_n "(cached) " >&6
36178else
36179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36180/* end confdefs.h.  */
36181
36182#include <spawn.h>
36183#if POSIX_SPAWN_SETSCHEDPARAM
36184 POSIX scheduling supported
36185#endif
36186
36187_ACEOF
36188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36189  $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
36190  gl_cv_func_spawnattr_setschedparam=yes
36191else
36192  gl_cv_func_spawnattr_setschedparam=no
36193fi
36194rm -f conftest*
36195
36196
36197fi
36198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
36199$as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
36200          ;;
36201        *) REPLACE_POSIX_SPAWN=1 ;;
36202      esac
36203    fi
36204  fi
36205  if test $ac_cv_func_posix_spawn != yes || test $REPLACE_POSIX_SPAWN = 1; then
36206
36207$as_echo "#define REPLACE_POSIX_SPAWN 1" >>confdefs.h
36208
36209  fi
36210
36211
36212  GNULIB_PTHREAD_SIGMASK=0;
36213  GNULIB_RAISE=0;
36214  GNULIB_SIGNAL_H_SIGPIPE=0;
36215  GNULIB_SIGPROCMASK=0;
36216  GNULIB_SIGACTION=0;
36217    HAVE_POSIX_SIGNALBLOCKING=1;
36218  HAVE_PTHREAD_SIGMASK=1;
36219  HAVE_RAISE=1;
36220  HAVE_SIGSET_T=1;
36221  HAVE_SIGINFO_T=1;
36222  HAVE_SIGACTION=1;
36223  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
36224
36225  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
36226
36227  HAVE_SIGHANDLER_T=1;
36228  REPLACE_PTHREAD_SIGMASK=0;
36229  REPLACE_RAISE=0;
36230
36231
36232  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
36233      #include <signal.h>
36234      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
36235      #include <sys/types.h>
36236
36237"
36238if test "x$ac_cv_type_sigset_t" = xyes; then :
36239
36240cat >>confdefs.h <<_ACEOF
36241#define HAVE_SIGSET_T 1
36242_ACEOF
36243
36244gl_cv_type_sigset_t=yes
36245else
36246  gl_cv_type_sigset_t=no
36247fi
36248
36249  if test $gl_cv_type_sigset_t != yes; then
36250    HAVE_SIGSET_T=0
36251  fi
36252
36253
36254
36255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPIPE" >&5
36256$as_echo_n "checking for SIGPIPE... " >&6; }
36257if ${gl_cv_header_signal_h_SIGPIPE+:} false; then :
36258  $as_echo_n "(cached) " >&6
36259else
36260
36261    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36262/* end confdefs.h.  */
36263
36264#include <signal.h>
36265#if !defined SIGPIPE
36266booboo
36267#endif
36268
36269_ACEOF
36270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36271  $EGREP "booboo" >/dev/null 2>&1; then :
36272  gl_cv_header_signal_h_SIGPIPE=no
36273else
36274  gl_cv_header_signal_h_SIGPIPE=yes
36275fi
36276rm -f conftest*
36277
36278
36279fi
36280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_signal_h_SIGPIPE" >&5
36281$as_echo "$gl_cv_header_signal_h_SIGPIPE" >&6; }
36282
36283
36284                              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library path variable" >&5
36285$as_echo_n "checking for shared library path variable... " >&6; }
36286if ${acl_cv_libpath+:} false; then :
36287  $as_echo_n "(cached) " >&6
36288else
36289
36290    LD="$LD" \
36291    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.libpath" "$host" > conftest.sh
36292    . ./conftest.sh
36293    rm -f ./conftest.sh
36294    acl_cv_libpath=${acl_cv_shlibpath_var:-none}
36295
36296fi
36297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libpath" >&5
36298$as_echo "$acl_cv_libpath" >&6; }
36299  shlibpath_var="$acl_cv_shlibpath_var"
36300
36301
36302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to activate relocatable installation" >&5
36303$as_echo_n "checking whether to activate relocatable installation... " >&6; }
36304  # Check whether --enable-relocatable was given.
36305if test "${enable_relocatable+set}" = set; then :
36306  enableval=$enable_relocatable; if test "$enableval" != no; then
36307       RELOCATABLE=yes
36308     else
36309       RELOCATABLE=no
36310     fi
36311
36312else
36313  RELOCATABLE=no
36314fi
36315
36316
36317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RELOCATABLE" >&5
36318$as_echo "$RELOCATABLE" >&6; }
36319
36320
36321
36322    if test "X$prefix" = "XNONE"; then
36323    reloc_final_prefix="$ac_default_prefix"
36324  else
36325    reloc_final_prefix="$prefix"
36326  fi
36327
36328cat >>confdefs.h <<_ACEOF
36329#define INSTALLPREFIX "${reloc_final_prefix}"
36330_ACEOF
36331
36332  if test $RELOCATABLE = yes; then
36333
36334$as_echo "#define ENABLE_RELOCATABLE 1" >>confdefs.h
36335
36336  fi
36337
36338
36339
36340
36341
36342
36343
36344
36345  is_noop=no
36346  use_elf_origin_trick=no
36347  use_macos_tools=no
36348  use_wrapper=no
36349  if test $RELOCATABLE = yes; then
36350    # --enable-relocatable implies --disable-rpath
36351    enable_rpath=no
36352    for ac_header in mach-o/dyld.h
36353do :
36354  ac_fn_c_check_header_mongrel "$LINENO" "mach-o/dyld.h" "ac_cv_header_mach_o_dyld_h" "$ac_includes_default"
36355if test "x$ac_cv_header_mach_o_dyld_h" = xyes; then :
36356  cat >>confdefs.h <<_ACEOF
36357#define HAVE_MACH_O_DYLD_H 1
36358_ACEOF
36359
36360fi
36361
36362done
36363
36364    for ac_func in _NSGetExecutablePath
36365do :
36366  ac_fn_c_check_func "$LINENO" "_NSGetExecutablePath" "ac_cv_func__NSGetExecutablePath"
36367if test "x$ac_cv_func__NSGetExecutablePath" = xyes; then :
36368  cat >>confdefs.h <<_ACEOF
36369#define HAVE__NSGETEXECUTABLEPATH 1
36370_ACEOF
36371
36372fi
36373done
36374
36375    case "$host_os" in
36376      mingw*) is_noop=yes ;;
36377      # For the platforms that support $ORIGIN, see
36378      # <https://lekensteyn.nl/rpath.html>.
36379      # glibc systems, Linux with musl libc: yes. Android: no.
36380      linux*-android*) ;;
36381      linux* | kfreebsd*) use_elf_origin_trick=yes ;;
36382      # Hurd: <https://lists.gnu.org/r/bug-hurd/2019-02/msg00049.html>
36383      # only after the glibc commit from 2018-01-08
36384      # <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=311ba8dc4416467947eff2ab327854f124226309>
36385      gnu*)
36386        # Test for a glibc version >= 2.27.
36387        for ac_func in copy_file_range
36388do :
36389  ac_fn_c_check_func "$LINENO" "copy_file_range" "ac_cv_func_copy_file_range"
36390if test "x$ac_cv_func_copy_file_range" = xyes; then :
36391  cat >>confdefs.h <<_ACEOF
36392#define HAVE_COPY_FILE_RANGE 1
36393_ACEOF
36394
36395fi
36396done
36397
36398        if test $ac_cv_func_copy_file_range = yes; then
36399          use_elf_origin_trick=yes
36400        fi
36401        ;;
36402      # FreeBSD >= 7.3, DragonFly >= 3.0: yes.
36403      freebsd | freebsd[1-7] | freebsd[1-6].* | freebsd7.[0-2]) ;;
36404      dragonfly | dragonfly[1-2] | dragonfly[1-2].*) ;;
36405      freebsd* | dragonfly*) use_elf_origin_trick=yes ;;
36406      # NetBSD >= 8.0: yes.
36407      netbsd | netbsd[1-7] | netbsd[1-7].*) ;;
36408      netbsdelf | netbsdelf[1-7] | netbsdelf[1-7].*) ;;
36409      netbsd*) use_elf_origin_trick=yes ;;
36410      # OpenBSD >= 5.4: yes.
36411      openbsd | openbsd[1-5] | openbsd[1-4].* | openbsd5.[0-3]) ;;
36412      openbsd*) use_elf_origin_trick=yes ;;
36413      # Solaris >= 10: yes.
36414      solaris | solaris2.[1-9] | solaris2.[1-9].*) ;;
36415      solaris*) use_elf_origin_trick=yes ;;
36416      # Haiku: yes.
36417      haiku*) use_elf_origin_trick=yes ;;
36418      # On Mac OS X 10.4 or newer, use Mac OS X tools. See
36419      # <https://wincent.com/wiki/@executable_path,_@load_path_and_@rpath>.
36420      darwin | darwin[1-7].*) ;;
36421      darwin*) use_macos_tools=yes ;;
36422    esac
36423    if test $is_noop = yes; then
36424      RELOCATABLE_LDFLAGS=:
36425
36426    else
36427      if test $use_elf_origin_trick = yes || test $use_macos_tools = yes; then
36428                case "$ac_aux_dir" in
36429          /*) reloc_ldflags="$ac_aux_dir/reloc-ldflags" ;;
36430          *) reloc_ldflags="\$(top_builddir)/$ac_aux_dir/reloc-ldflags" ;;
36431        esac
36432        RELOCATABLE_LDFLAGS="\"$reloc_ldflags\" \"\$(host)\" \"\$(RELOCATABLE_LIBRARY_PATH)\""
36433
36434        if test $use_macos_tools = yes; then
36435                    case "$ac_aux_dir" in
36436            /*) LIBTOOL="${CONFIG_SHELL-$SHELL} $ac_aux_dir/libtool-reloc $LIBTOOL" ;;
36437            *) LIBTOOL="${CONFIG_SHELL-$SHELL} \$(top_builddir)/$ac_aux_dir/libtool-reloc $LIBTOOL" ;;
36438          esac
36439        fi
36440      else
36441        use_wrapper=yes
36442                                        INSTALL_PROGRAM_ENV="RELOC_LIBRARY_PATH_VAR=\"$shlibpath_var\" RELOC_LIBRARY_PATH_VALUE=\"\$(RELOCATABLE_LIBRARY_PATH)\" RELOC_PREFIX=\"\$(prefix)\" RELOC_DESTDIR=\"\$(DESTDIR)\" RELOC_COMPILE_COMMAND=\"\$(CC) \$(CPPFLAGS) \$(CFLAGS) \$(LDFLAGS)\" RELOC_SRCDIR=\"\$(RELOCATABLE_SRC_DIR)\" RELOC_BUILDDIR=\"\$(RELOCATABLE_BUILD_DIR)\" RELOC_CONFIG_H_DIR=\"\$(RELOCATABLE_CONFIG_H_DIR)\" RELOC_EXEEXT=\"\$(EXEEXT)\" RELOC_STRIP_PROG=\"\$(RELOCATABLE_STRIP)\" RELOC_INSTALL_PROG=\"$INSTALL_PROGRAM\""
36443
36444        case "$ac_aux_dir" in
36445          /*) INSTALL_PROGRAM="$ac_aux_dir/install-reloc" ;;
36446          *) INSTALL_PROGRAM="\$(top_builddir)/$ac_aux_dir/install-reloc" ;;
36447        esac
36448      fi
36449    fi
36450  fi
36451   if test $is_noop = yes || test $use_elf_origin_trick = yes || test $use_macos_tools = yes; then
36452  RELOCATABLE_VIA_LD_TRUE=
36453  RELOCATABLE_VIA_LD_FALSE='#'
36454else
36455  RELOCATABLE_VIA_LD_TRUE='#'
36456  RELOCATABLE_VIA_LD_FALSE=
36457fi
36458
36459   if test $use_wrapper = yes; then
36460  RELOCATABLE_VIA_WRAPPER_TRUE=
36461  RELOCATABLE_VIA_WRAPPER_FALSE='#'
36462else
36463  RELOCATABLE_VIA_WRAPPER_TRUE='#'
36464  RELOCATABLE_VIA_WRAPPER_FALSE=
36465fi
36466
36467
36468
36469
36470
36471
36472
36473
36474      RELOCATABLE_STRIP=':'
36475
36476
36477ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
36478if test "x$ac_cv_have_decl_setenv" = xyes; then :
36479  ac_have_decl=1
36480else
36481  ac_have_decl=0
36482fi
36483
36484cat >>confdefs.h <<_ACEOF
36485#define HAVE_DECL_SETENV $ac_have_decl
36486_ACEOF
36487
36488
36489
36490
36491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
36492$as_echo_n "checking for ssize_t... " >&6; }
36493if ${gt_cv_ssize_t+:} false; then :
36494  $as_echo_n "(cached) " >&6
36495else
36496  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36497/* end confdefs.h.  */
36498#include <sys/types.h>
36499int
36500main ()
36501{
36502int x = sizeof (ssize_t *) + sizeof (ssize_t);
36503            return !x;
36504  ;
36505  return 0;
36506}
36507_ACEOF
36508if ac_fn_c_try_compile "$LINENO"; then :
36509  gt_cv_ssize_t=yes
36510else
36511  gt_cv_ssize_t=no
36512fi
36513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36514fi
36515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
36516$as_echo "$gt_cv_ssize_t" >&6; }
36517  if test $gt_cv_ssize_t = no; then
36518
36519$as_echo "#define ssize_t int" >>confdefs.h
36520
36521  fi
36522
36523
36524  GNULIB_SCHED_YIELD=0;
36525    HAVE_SCHED_YIELD=1;
36526  REPLACE_SCHED_YIELD=0;
36527
36528
36529
36530
36531
36532
36533
36534
36535
36536
36537
36538
36539
36540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
36541$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
36542if ${ac_cv_type_uid_t+:} false; then :
36543  $as_echo_n "(cached) " >&6
36544else
36545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36546/* end confdefs.h.  */
36547#include <sys/types.h>
36548
36549_ACEOF
36550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36551  $EGREP "uid_t" >/dev/null 2>&1; then :
36552  ac_cv_type_uid_t=yes
36553else
36554  ac_cv_type_uid_t=no
36555fi
36556rm -f conftest*
36557
36558fi
36559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
36560$as_echo "$ac_cv_type_uid_t" >&6; }
36561if test $ac_cv_type_uid_t = no; then
36562
36563$as_echo "#define uid_t int" >>confdefs.h
36564
36565
36566$as_echo "#define gid_t int" >>confdefs.h
36567
36568fi
36569
36570
36571
36572
36573
36574
36575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36576/* end confdefs.h.  */
36577
36578#ifdef _MSC_VER
36579MicrosoftCompiler
36580#endif
36581
36582_ACEOF
36583if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36584  $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
36585  gl_asmext='asm'
36586     gl_c_asm_opt='-c -Fa'
36587
36588else
36589  gl_asmext='s'
36590     gl_c_asm_opt='-S'
36591
36592fi
36593rm -f conftest*
36594
36595
36596
36597
36598
36599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
36600$as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
36601if ${gl_cv_prog_as_underscore+:} false; then :
36602  $as_echo_n "(cached) " >&6
36603else
36604  cat > conftest.c <<EOF
36605#ifdef __cplusplus
36606extern "C" int foo (void);
36607#endif
36608int foo(void) { return 0; }
36609EOF
36610     # Look for the assembly language name in the .s file.
36611     { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
36612  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
36613  (eval $ac_try) 2>&5
36614  ac_status=$?
36615  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36616  test $ac_status = 0; }; } >/dev/null 2>&1
36617     if LC_ALL=C $EGREP '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
36618       gl_cv_prog_as_underscore=yes
36619     else
36620       gl_cv_prog_as_underscore=no
36621     fi
36622     rm -f conftest*
36623
36624fi
36625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
36626$as_echo "$gl_cv_prog_as_underscore" >&6; }
36627  if test $gl_cv_prog_as_underscore = yes; then
36628    USER_LABEL_PREFIX=_
36629  else
36630    USER_LABEL_PREFIX=
36631  fi
36632
36633cat >>confdefs.h <<_ACEOF
36634#define USER_LABEL_PREFIX $USER_LABEL_PREFIX
36635_ACEOF
36636
36637  ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
36638
36639
36640
36641
36642
36643
36644
36645
36646
36647
36648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
36649$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
36650if ${gl_cv_func_snprintf_retval_c99+:} false; then :
36651  $as_echo_n "(cached) " >&6
36652else
36653
36654      if test "$cross_compiling" = yes; then :
36655  case "$host_os" in
36656                                 # Guess yes on glibc systems.
36657           *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
36658                                 # Guess yes on musl systems.
36659           *-musl*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
36660                                 # Guess yes on FreeBSD >= 5.
36661           freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
36662dragonfly* |            freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
36663                                 # Guess yes on Mac OS X >= 10.3.
36664           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
36665           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
36666                                 # Guess yes on OpenBSD >= 3.9.
36667           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
36668                                 gl_cv_func_snprintf_retval_c99="guessing no";;
36669           openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
36670                                 # Guess yes on Solaris >= 2.10.
36671           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
36672           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
36673                                 # Guess yes on AIX >= 4.
36674           aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
36675           aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
36676                                 # Guess yes on NetBSD >= 3.
36677           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
36678                                 gl_cv_func_snprintf_retval_c99="guessing no";;
36679           netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
36680                                 # Guess yes on BeOS.
36681           beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
36682                                 # Guess yes on Android.
36683           linux*-android*)      gl_cv_func_snprintf_retval_c99="guessing yes";;
36684                                 # Guess yes on MSVC, no on mingw.
36685           mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36686/* end confdefs.h.  */
36687
36688#ifdef _MSC_VER
36689 Known
36690#endif
36691
36692_ACEOF
36693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36694  $EGREP "Known" >/dev/null 2>&1; then :
36695  gl_cv_func_snprintf_retval_c99="guessing yes"
36696else
36697  gl_cv_func_snprintf_retval_c99="guessing no"
36698fi
36699rm -f conftest*
36700
36701                                 ;;
36702                                 # If we don't know, obey --enable-cross-guesses.
36703           *)                    gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
36704         esac
36705
36706else
36707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36708/* end confdefs.h.  */
36709
36710#include <stdio.h>
36711#include <string.h>
36712#if HAVE_SNPRINTF
36713# define my_snprintf snprintf
36714#else
36715# include <stdarg.h>
36716static int my_snprintf (char *buf, int size, const char *format, ...)
36717{
36718  va_list args;
36719  int ret;
36720  va_start (args, format);
36721  ret = vsnprintf (buf, size, format, args);
36722  va_end (args);
36723  return ret;
36724}
36725#endif
36726static char buf[100];
36727int main ()
36728{
36729  strcpy (buf, "ABCDEF");
36730  if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
36731    return 1;
36732  if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
36733    return 2;
36734  if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
36735    return 3;
36736  return 0;
36737}
36738_ACEOF
36739if ac_fn_c_try_run "$LINENO"; then :
36740  gl_cv_func_snprintf_retval_c99=yes
36741else
36742  gl_cv_func_snprintf_retval_c99=no
36743fi
36744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36745  conftest.$ac_objext conftest.beam conftest.$ac_ext
36746fi
36747
36748
36749fi
36750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
36751$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
36752
36753ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
36754if test "x$ac_cv_have_decl_snprintf" = xyes; then :
36755  ac_have_decl=1
36756else
36757  ac_have_decl=0
36758fi
36759
36760cat >>confdefs.h <<_ACEOF
36761#define HAVE_DECL_SNPRINTF $ac_have_decl
36762_ACEOF
36763
36764
36765
36766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
36767$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
36768if ${ac_cv_header_stdbool_h+:} false; then :
36769  $as_echo_n "(cached) " >&6
36770else
36771  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36772/* end confdefs.h.  */
36773
36774             #include <stdbool.h>
36775
36776             #ifdef __cplusplus
36777              typedef bool Bool;
36778             #else
36779              typedef _Bool Bool;
36780              #ifndef bool
36781               "error: bool is not defined"
36782              #endif
36783              #ifndef false
36784               "error: false is not defined"
36785              #endif
36786              #if false
36787               "error: false is not 0"
36788              #endif
36789              #ifndef true
36790               "error: true is not defined"
36791              #endif
36792              #if true != 1
36793               "error: true is not 1"
36794              #endif
36795             #endif
36796
36797             #ifndef __bool_true_false_are_defined
36798              "error: __bool_true_false_are_defined is not defined"
36799             #endif
36800
36801             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
36802
36803             char a[true == 1 ? 1 : -1];
36804             char b[false == 0 ? 1 : -1];
36805             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
36806             char d[(bool) 0.5 == true ? 1 : -1];
36807             /* See body of main program for 'e'.  */
36808             char f[(Bool) 0.0 == false ? 1 : -1];
36809             char g[true];
36810             char h[sizeof (Bool)];
36811             char i[sizeof s.t];
36812             enum { j = false, k = true, l = false * true, m = true * 256 };
36813             /* The following fails for
36814                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
36815             Bool n[m];
36816             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
36817             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
36818             /* Catch a bug in an HP-UX C compiler.  See
36819                https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
36820                https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
36821              */
36822             Bool q = true;
36823             Bool *pq = &q;
36824             bool *qq = &q;
36825
36826int
36827main ()
36828{
36829
36830             bool e = &s;
36831             *pq |= q; *pq |= ! q;
36832             *qq |= q; *qq |= ! q;
36833             /* Refer to every declared value, to avoid compiler optimizations.  */
36834             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
36835                     + !m + !n + !o + !p + !q + !pq + !qq);
36836
36837  ;
36838  return 0;
36839}
36840_ACEOF
36841if ac_fn_c_try_compile "$LINENO"; then :
36842  ac_cv_header_stdbool_h=yes
36843else
36844  ac_cv_header_stdbool_h=no
36845fi
36846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36847fi
36848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
36849$as_echo "$ac_cv_header_stdbool_h" >&6; }
36850   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
36851if test "x$ac_cv_type__Bool" = xyes; then :
36852
36853cat >>confdefs.h <<_ACEOF
36854#define HAVE__BOOL 1
36855_ACEOF
36856
36857
36858fi
36859
36860
36861ac_fn_c_check_decl "$LINENO" "stpncpy" "ac_cv_have_decl_stpncpy" "$ac_includes_default"
36862if test "x$ac_cv_have_decl_stpncpy" = xyes; then :
36863  ac_have_decl=1
36864else
36865  ac_have_decl=0
36866fi
36867
36868cat >>confdefs.h <<_ACEOF
36869#define HAVE_DECL_STPNCPY $ac_have_decl
36870_ACEOF
36871
36872
36873
36874
36875     REPLACE_STRERROR_0=0
36876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
36877$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
36878if ${gl_cv_func_strerror_0_works+:} false; then :
36879  $as_echo_n "(cached) " >&6
36880else
36881  if test "$cross_compiling" = yes; then :
36882  case "$host_os" in
36883                        # Guess yes on glibc systems.
36884         *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
36885                        # Guess yes on musl systems.
36886         *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
36887                        # Guess yes on native Windows.
36888         mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
36889                        # If we don't know, obey --enable-cross-guesses.
36890         *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
36891       esac
36892
36893else
36894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36895/* end confdefs.h.  */
36896#include <string.h>
36897           #include <errno.h>
36898
36899int
36900main ()
36901{
36902int result = 0;
36903           char *str;
36904           errno = 0;
36905           str = strerror (0);
36906           if (!*str) result |= 1;
36907           if (errno) result |= 2;
36908           if (strstr (str, "nknown") || strstr (str, "ndefined"))
36909             result |= 4;
36910           return result;
36911  ;
36912  return 0;
36913}
36914_ACEOF
36915if ac_fn_c_try_run "$LINENO"; then :
36916  gl_cv_func_strerror_0_works=yes
36917else
36918  gl_cv_func_strerror_0_works=no
36919fi
36920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36921  conftest.$ac_objext conftest.beam conftest.$ac_ext
36922fi
36923
36924
36925fi
36926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
36927$as_echo "$gl_cv_func_strerror_0_works" >&6; }
36928  case "$gl_cv_func_strerror_0_works" in
36929    *yes) ;;
36930    *)
36931      REPLACE_STRERROR_0=1
36932
36933$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
36934
36935      ;;
36936  esac
36937
36938
36939
36940
36941
36942
36943
36944
36945
36946
36947  if test $ac_cv_func_strerror_r = yes; then
36948    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
36949                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
36950$as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
36951if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
36952  $as_echo_n "(cached) " >&6
36953else
36954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36955/* end confdefs.h.  */
36956#include <string.h>
36957                int strerror_r (int, char *, size_t);
36958
36959int
36960main ()
36961{
36962
36963  ;
36964  return 0;
36965}
36966_ACEOF
36967if ac_fn_c_try_compile "$LINENO"; then :
36968  gl_cv_func_strerror_r_posix_signature=yes
36969else
36970  gl_cv_func_strerror_r_posix_signature=no
36971fi
36972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36973
36974fi
36975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
36976$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
36977      if test $gl_cv_func_strerror_r_posix_signature = yes; then
36978                                                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
36979$as_echo_n "checking whether strerror_r works... " >&6; }
36980if ${gl_cv_func_strerror_r_works+:} false; then :
36981  $as_echo_n "(cached) " >&6
36982else
36983  if test "$cross_compiling" = yes; then :
36984
36985              case "$host_os" in
36986                       # Guess no on AIX.
36987                aix*)  gl_cv_func_strerror_r_works="guessing no";;
36988                       # Guess no on HP-UX.
36989                hpux*) gl_cv_func_strerror_r_works="guessing no";;
36990                       # Guess no on BSD variants.
36991                *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
36992                       # Guess yes otherwise.
36993                *)     gl_cv_func_strerror_r_works="guessing yes";;
36994              esac
36995
36996else
36997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36998/* end confdefs.h.  */
36999#include <errno.h>
37000                  #include <string.h>
37001
37002int
37003main ()
37004{
37005int result = 0;
37006                  char buf[79];
37007                  if (strerror_r (EACCES, buf, 0) < 0)
37008                    result |= 1;
37009                  errno = 0;
37010                  if (strerror_r (EACCES, buf, sizeof buf) != 0)
37011                    result |= 2;
37012                  strcpy (buf, "Unknown");
37013                  if (strerror_r (0, buf, sizeof buf) != 0)
37014                    result |= 4;
37015                  if (errno)
37016                    result |= 8;
37017                  if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
37018                    result |= 0x10;
37019                  errno = 0;
37020                  *buf = 0;
37021                  if (strerror_r (-3, buf, sizeof buf) < 0)
37022                    result |= 0x20;
37023                  if (errno)
37024                    result |= 0x40;
37025                  if (!*buf)
37026                    result |= 0x80;
37027                  return result;
37028
37029  ;
37030  return 0;
37031}
37032_ACEOF
37033if ac_fn_c_try_run "$LINENO"; then :
37034  gl_cv_func_strerror_r_works=yes
37035else
37036  gl_cv_func_strerror_r_works=no
37037fi
37038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37039  conftest.$ac_objext conftest.beam conftest.$ac_ext
37040fi
37041
37042
37043fi
37044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
37045$as_echo "$gl_cv_func_strerror_r_works" >&6; }
37046      else
37047
37048                        if test $ac_cv_func___xpg_strerror_r = yes; then
37049          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
37050$as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
37051if ${gl_cv_func_strerror_r_works+:} false; then :
37052  $as_echo_n "(cached) " >&6
37053else
37054  if test "$cross_compiling" = yes; then :
37055                                  gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
37056
37057else
37058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37059/* end confdefs.h.  */
37060#include <errno.h>
37061                    #include <string.h>
37062                    extern
37063                    #ifdef __cplusplus
37064                    "C"
37065                    #endif
37066                    int __xpg_strerror_r(int, char *, size_t);
37067
37068int
37069main ()
37070{
37071int result = 0;
37072                    char buf[256] = "^";
37073                    char copy[256];
37074                    char *str = strerror (-1);
37075                    strcpy (copy, str);
37076                    if (__xpg_strerror_r (-2, buf, 1) == 0)
37077                      result |= 1;
37078                    if (*buf)
37079                      result |= 2;
37080                    __xpg_strerror_r (-2, buf, 256);
37081                    if (strcmp (str, copy))
37082                      result |= 4;
37083                    return result;
37084
37085  ;
37086  return 0;
37087}
37088_ACEOF
37089if ac_fn_c_try_run "$LINENO"; then :
37090  gl_cv_func_strerror_r_works=yes
37091else
37092  gl_cv_func_strerror_r_works=no
37093fi
37094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37095  conftest.$ac_objext conftest.beam conftest.$ac_ext
37096fi
37097
37098
37099fi
37100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
37101$as_echo "$gl_cv_func_strerror_r_works" >&6; }
37102        fi
37103      fi
37104    fi
37105  fi
37106
37107
37108
37109
37110
37111
37112
37113
37114
37115
37116
37117     if test $gl_cv_have_include_next = yes; then
37118       gl_cv_next_string_h='<'string.h'>'
37119     else
37120       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
37121$as_echo_n "checking absolute name of <string.h>... " >&6; }
37122if ${gl_cv_next_string_h+:} false; then :
37123  $as_echo_n "(cached) " >&6
37124else
37125
37126
37127
37128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37129/* end confdefs.h.  */
37130#include <string.h>
37131_ACEOF
37132                case "$host_os" in
37133    aix*) gl_absname_cpp="$ac_cpp -C" ;;
37134    *)    gl_absname_cpp="$ac_cpp" ;;
37135  esac
37136
37137  case "$host_os" in
37138    mingw*)
37139                                          gl_dirsep_regex='[/\\]'
37140      ;;
37141    *)
37142      gl_dirsep_regex='\/'
37143      ;;
37144  esac
37145      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37146  gl_header_literal_regex=`echo 'string.h' \
37147                           | sed -e "$gl_make_literal_regex_sed"`
37148  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37149      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37150      s|^/[^/]|//&|
37151      p
37152      q
37153    }'
37154
37155        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37156  sed -n "$gl_absolute_header_sed"`
37157
37158           gl_header=$gl_cv_absolute_string_h
37159           gl_cv_next_string_h='"'$gl_header'"'
37160
37161
37162fi
37163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
37164$as_echo "$gl_cv_next_string_h" >&6; }
37165     fi
37166     NEXT_STRING_H=$gl_cv_next_string_h
37167
37168     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37169       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37170       gl_next_as_first_directive='<'string.h'>'
37171     else
37172       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37173       gl_next_as_first_directive=$gl_cv_next_string_h
37174     fi
37175     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
37176
37177
37178
37179
37180
37181
37182
37183
37184
37185
37186
37187ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
37188if test "x$ac_cv_have_decl_strnlen" = xyes; then :
37189  ac_have_decl=1
37190else
37191  ac_have_decl=0
37192fi
37193
37194cat >>confdefs.h <<_ACEOF
37195#define HAVE_DECL_STRNLEN $ac_have_decl
37196_ACEOF
37197
37198
37199
37200
37201  if test $REPLACE_MEMCHR = 1; then
37202    REPLACE_STRSTR=1
37203  else
37204            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
37205$as_echo_n "checking whether strstr works... " >&6; }
37206if ${gl_cv_func_strstr_works_always+:} false; then :
37207  $as_echo_n "(cached) " >&6
37208else
37209  if test "$cross_compiling" = yes; then :
37210                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37211/* end confdefs.h.  */
37212
37213#ifdef __GNU_LIBRARY__
37214 #include <features.h>
37215 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
37216     || defined __UCLIBC__
37217  Lucky user
37218 #endif
37219#elif defined __CYGWIN__
37220 #include <cygwin/version.h>
37221 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
37222  Lucky user
37223 #endif
37224#else
37225  Lucky user
37226#endif
37227
37228_ACEOF
37229if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37230  $EGREP "Lucky user" >/dev/null 2>&1; then :
37231  gl_cv_func_strstr_works_always="guessing yes"
37232else
37233  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
37234fi
37235rm -f conftest*
37236
37237
37238else
37239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37240/* end confdefs.h.  */
37241
37242#include <string.h> /* for strstr */
37243#ifdef __GNU_LIBRARY__
37244 #include <features.h>
37245 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
37246  Unlucky user
37247 #endif
37248#endif
37249#define P "_EF_BF_BD"
37250#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
37251#define NEEDLE P P P P P
37252
37253int
37254main ()
37255{
37256return !!strstr (HAYSTACK, NEEDLE);
37257
37258  ;
37259  return 0;
37260}
37261_ACEOF
37262if ac_fn_c_try_run "$LINENO"; then :
37263  gl_cv_func_strstr_works_always=yes
37264else
37265  gl_cv_func_strstr_works_always=no
37266fi
37267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37268  conftest.$ac_objext conftest.beam conftest.$ac_ext
37269fi
37270
37271
37272fi
37273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
37274$as_echo "$gl_cv_func_strstr_works_always" >&6; }
37275    case "$gl_cv_func_strstr_works_always" in
37276      *yes) ;;
37277      *)
37278        REPLACE_STRSTR=1
37279        ;;
37280    esac
37281  fi
37282
37283
37284
37285
37286  GNULIB_PSELECT=0;
37287  GNULIB_SELECT=0;
37288    HAVE_PSELECT=1;
37289  REPLACE_PSELECT=0;
37290  REPLACE_SELECT=0;
37291
37292
37293
37294
37295
37296
37297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
37298$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
37299if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
37300  $as_echo_n "(cached) " >&6
37301else
37302
37303                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37304/* end confdefs.h.  */
37305#include <sys/select.h>
37306int
37307main ()
37308{
37309struct timeval b;
37310  ;
37311  return 0;
37312}
37313_ACEOF
37314if ac_fn_c_try_compile "$LINENO"; then :
37315  gl_cv_header_sys_select_h_selfcontained=yes
37316else
37317  gl_cv_header_sys_select_h_selfcontained=no
37318fi
37319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37320                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
37321        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37322/* end confdefs.h.  */
37323#include <sys/select.h>
37324int
37325main ()
37326{
37327int memset; int bzero;
37328  ;
37329  return 0;
37330}
37331
37332_ACEOF
37333if ac_fn_c_try_compile "$LINENO"; then :
37334  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37335/* end confdefs.h.  */
37336#include <sys/select.h>
37337int
37338main ()
37339{
37340
37341                  #undef memset
37342                  #define memset nonexistent_memset
37343                  extern
37344                  #ifdef __cplusplus
37345                  "C"
37346                  #endif
37347                  void *memset (void *, int, unsigned long);
37348                  #undef bzero
37349                  #define bzero nonexistent_bzero
37350                  extern
37351                  #ifdef __cplusplus
37352                  "C"
37353                  #endif
37354                  void bzero (void *, unsigned long);
37355                  fd_set fds;
37356                  FD_ZERO (&fds);
37357
37358  ;
37359  return 0;
37360}
37361
37362_ACEOF
37363if ac_fn_c_try_link "$LINENO"; then :
37364
37365else
37366  gl_cv_header_sys_select_h_selfcontained=no
37367fi
37368rm -f core conftest.err conftest.$ac_objext \
37369    conftest$ac_exeext conftest.$ac_ext
37370
37371fi
37372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37373      fi
37374
37375fi
37376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
37377$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
37378
37379
37380
37381
37382
37383
37384
37385
37386
37387     if test $gl_cv_have_include_next = yes; then
37388       gl_cv_next_sys_select_h='<'sys/select.h'>'
37389     else
37390       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
37391$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
37392if ${gl_cv_next_sys_select_h+:} false; then :
37393  $as_echo_n "(cached) " >&6
37394else
37395
37396             if test $ac_cv_header_sys_select_h = yes; then
37397
37398
37399
37400
37401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37402/* end confdefs.h.  */
37403#include <sys/select.h>
37404_ACEOF
37405                case "$host_os" in
37406    aix*) gl_absname_cpp="$ac_cpp -C" ;;
37407    *)    gl_absname_cpp="$ac_cpp" ;;
37408  esac
37409
37410  case "$host_os" in
37411    mingw*)
37412                                          gl_dirsep_regex='[/\\]'
37413      ;;
37414    *)
37415      gl_dirsep_regex='\/'
37416      ;;
37417  esac
37418      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37419  gl_header_literal_regex=`echo 'sys/select.h' \
37420                           | sed -e "$gl_make_literal_regex_sed"`
37421  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37422      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37423      s|^/[^/]|//&|
37424      p
37425      q
37426    }'
37427
37428        gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37429  sed -n "$gl_absolute_header_sed"`
37430
37431           gl_header=$gl_cv_absolute_sys_select_h
37432           gl_cv_next_sys_select_h='"'$gl_header'"'
37433          else
37434               gl_cv_next_sys_select_h='<'sys/select.h'>'
37435             fi
37436
37437
37438fi
37439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
37440$as_echo "$gl_cv_next_sys_select_h" >&6; }
37441     fi
37442     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
37443
37444     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37445       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37446       gl_next_as_first_directive='<'sys/select.h'>'
37447     else
37448       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37449       gl_next_as_first_directive=$gl_cv_next_sys_select_h
37450     fi
37451     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
37452
37453
37454
37455
37456  if test $ac_cv_header_sys_select_h = yes; then
37457    HAVE_SYS_SELECT_H=1
37458  else
37459    HAVE_SYS_SELECT_H=0
37460  fi
37461
37462
37463
37464
37465
37466  if test $ac_cv_header_sys_socket_h != yes; then
37467                    for ac_header in winsock2.h
37468do :
37469  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
37470if test "x$ac_cv_header_winsock2_h" = xyes; then :
37471  cat >>confdefs.h <<_ACEOF
37472#define HAVE_WINSOCK2_H 1
37473_ACEOF
37474
37475fi
37476
37477done
37478
37479  fi
37480  if test "$ac_cv_header_winsock2_h" = yes; then
37481    HAVE_WINSOCK2_H=1
37482    UNISTD_H_HAVE_WINSOCK2_H=1
37483    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
37484  else
37485    HAVE_WINSOCK2_H=0
37486  fi
37487
37488
37489
37490
37491
37492
37493
37494
37495  GNULIB_WAITPID=0;
37496
37497
37498
37499
37500
37501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
37502$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
37503if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
37504  $as_echo_n "(cached) " >&6
37505else
37506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37507/* end confdefs.h.  */
37508#include <time.h>
37509
37510int
37511main ()
37512{
37513static struct timespec x; x.tv_sec = x.tv_nsec;
37514  ;
37515  return 0;
37516}
37517_ACEOF
37518if ac_fn_c_try_compile "$LINENO"; then :
37519  gl_cv_sys_struct_timespec_in_time_h=yes
37520else
37521  gl_cv_sys_struct_timespec_in_time_h=no
37522fi
37523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37524fi
37525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
37526$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
37527
37528  TIME_H_DEFINES_STRUCT_TIMESPEC=0
37529  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
37530  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
37531  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
37532  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
37533    TIME_H_DEFINES_STRUCT_TIMESPEC=1
37534  else
37535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
37536$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
37537if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
37538  $as_echo_n "(cached) " >&6
37539else
37540  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37541/* end confdefs.h.  */
37542#include <sys/time.h>
37543
37544int
37545main ()
37546{
37547static struct timespec x; x.tv_sec = x.tv_nsec;
37548  ;
37549  return 0;
37550}
37551_ACEOF
37552if ac_fn_c_try_compile "$LINENO"; then :
37553  gl_cv_sys_struct_timespec_in_sys_time_h=yes
37554else
37555  gl_cv_sys_struct_timespec_in_sys_time_h=no
37556fi
37557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37558fi
37559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
37560$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
37561    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
37562      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
37563    else
37564      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
37565$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
37566if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
37567  $as_echo_n "(cached) " >&6
37568else
37569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37570/* end confdefs.h.  */
37571#include <pthread.h>
37572
37573int
37574main ()
37575{
37576static struct timespec x; x.tv_sec = x.tv_nsec;
37577  ;
37578  return 0;
37579}
37580_ACEOF
37581if ac_fn_c_try_compile "$LINENO"; then :
37582  gl_cv_sys_struct_timespec_in_pthread_h=yes
37583else
37584  gl_cv_sys_struct_timespec_in_pthread_h=no
37585fi
37586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37587fi
37588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
37589$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
37590      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
37591        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
37592      else
37593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
37594$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
37595if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
37596  $as_echo_n "(cached) " >&6
37597else
37598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37599/* end confdefs.h.  */
37600#include <unistd.h>
37601
37602int
37603main ()
37604{
37605static struct timespec x; x.tv_sec = x.tv_nsec;
37606  ;
37607  return 0;
37608}
37609_ACEOF
37610if ac_fn_c_try_compile "$LINENO"; then :
37611  gl_cv_sys_struct_timespec_in_unistd_h=yes
37612else
37613  gl_cv_sys_struct_timespec_in_unistd_h=no
37614fi
37615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37616fi
37617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
37618$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
37619        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
37620          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
37621        fi
37622      fi
37623    fi
37624  fi
37625
37626
37627
37628
37629
37630
37631
37632
37633
37634
37635
37636
37637
37638
37639
37640
37641     if test $gl_cv_have_include_next = yes; then
37642       gl_cv_next_time_h='<'time.h'>'
37643     else
37644       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
37645$as_echo_n "checking absolute name of <time.h>... " >&6; }
37646if ${gl_cv_next_time_h+:} false; then :
37647  $as_echo_n "(cached) " >&6
37648else
37649
37650
37651
37652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37653/* end confdefs.h.  */
37654#include <time.h>
37655_ACEOF
37656                case "$host_os" in
37657    aix*) gl_absname_cpp="$ac_cpp -C" ;;
37658    *)    gl_absname_cpp="$ac_cpp" ;;
37659  esac
37660
37661  case "$host_os" in
37662    mingw*)
37663                                          gl_dirsep_regex='[/\\]'
37664      ;;
37665    *)
37666      gl_dirsep_regex='\/'
37667      ;;
37668  esac
37669      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37670  gl_header_literal_regex=`echo 'time.h' \
37671                           | sed -e "$gl_make_literal_regex_sed"`
37672  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37673      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37674      s|^/[^/]|//&|
37675      p
37676      q
37677    }'
37678
37679        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37680  sed -n "$gl_absolute_header_sed"`
37681
37682           gl_header=$gl_cv_absolute_time_h
37683           gl_cv_next_time_h='"'$gl_header'"'
37684
37685
37686fi
37687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
37688$as_echo "$gl_cv_next_time_h" >&6; }
37689     fi
37690     NEXT_TIME_H=$gl_cv_next_time_h
37691
37692     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37693       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37694       gl_next_as_first_directive='<'time.h'>'
37695     else
37696       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37697       gl_next_as_first_directive=$gl_cv_next_time_h
37698     fi
37699     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
37700
37701
37702
37703
37704
37705
37706
37707
37708
37709
37710
37711
37712
37713
37714gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
37715i\
377160
37717q
37718'
37719gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
37720i\
377210
37722q
37723'
37724gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
37725i\
377260
37727q
37728'
37729
37730
37731  if test "$HAVE_LIBUNISTRING" = yes; then
37732    LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
37733    LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
37734    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
37735  fi
37736
37737
37738
37739ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
37740if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
37741  ac_have_decl=1
37742else
37743  ac_have_decl=0
37744fi
37745
37746cat >>confdefs.h <<_ACEOF
37747#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
37748_ACEOF
37749
37750ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
37751if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
37752  ac_have_decl=1
37753else
37754  ac_have_decl=0
37755fi
37756
37757cat >>confdefs.h <<_ACEOF
37758#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
37759_ACEOF
37760
37761ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
37762if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
37763  ac_have_decl=1
37764else
37765  ac_have_decl=0
37766fi
37767
37768cat >>confdefs.h <<_ACEOF
37769#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
37770_ACEOF
37771
37772ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
37773if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
37774  ac_have_decl=1
37775else
37776  ac_have_decl=0
37777fi
37778
37779cat >>confdefs.h <<_ACEOF
37780#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
37781_ACEOF
37782
37783ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
37784if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
37785  ac_have_decl=1
37786else
37787  ac_have_decl=0
37788fi
37789
37790cat >>confdefs.h <<_ACEOF
37791#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
37792_ACEOF
37793
37794ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
37795if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
37796  ac_have_decl=1
37797else
37798  ac_have_decl=0
37799fi
37800
37801cat >>confdefs.h <<_ACEOF
37802#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
37803_ACEOF
37804
37805ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
37806if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
37807  ac_have_decl=1
37808else
37809  ac_have_decl=0
37810fi
37811
37812cat >>confdefs.h <<_ACEOF
37813#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
37814_ACEOF
37815
37816ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
37817if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
37818  ac_have_decl=1
37819else
37820  ac_have_decl=0
37821fi
37822
37823cat >>confdefs.h <<_ACEOF
37824#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
37825_ACEOF
37826
37827ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
37828if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
37829  ac_have_decl=1
37830else
37831  ac_have_decl=0
37832fi
37833
37834cat >>confdefs.h <<_ACEOF
37835#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
37836_ACEOF
37837
37838ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
37839if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
37840  ac_have_decl=1
37841else
37842  ac_have_decl=0
37843fi
37844
37845cat >>confdefs.h <<_ACEOF
37846#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
37847_ACEOF
37848
37849ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
37850if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
37851  ac_have_decl=1
37852else
37853  ac_have_decl=0
37854fi
37855
37856cat >>confdefs.h <<_ACEOF
37857#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
37858_ACEOF
37859
37860ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
37861if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
37862  ac_have_decl=1
37863else
37864  ac_have_decl=0
37865fi
37866
37867cat >>confdefs.h <<_ACEOF
37868#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
37869_ACEOF
37870
37871ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
37872if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
37873  ac_have_decl=1
37874else
37875  ac_have_decl=0
37876fi
37877
37878cat >>confdefs.h <<_ACEOF
37879#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
37880_ACEOF
37881
37882ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
37883if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
37884  ac_have_decl=1
37885else
37886  ac_have_decl=0
37887fi
37888
37889cat >>confdefs.h <<_ACEOF
37890#define HAVE_DECL_UNSETENV $ac_have_decl
37891_ACEOF
37892
37893
37894  GNULIB_UTIME=0;
37895    HAVE_UTIME=1;
37896  REPLACE_UTIME=0;
37897
37898
37899
37900
37901
37902
37903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
37904$as_echo_n "checking whether the utimes function works... " >&6; }
37905if ${gl_cv_func_working_utimes+:} false; then :
37906  $as_echo_n "(cached) " >&6
37907else
37908  if test "$cross_compiling" = yes; then :
37909  case "$host_os" in
37910                   # Guess yes on musl systems.
37911          *-musl*) gl_cv_func_working_utimes="guessing yes" ;;
37912                   # Guess no on native Windows.
37913          mingw*)  gl_cv_func_working_utimes="guessing no" ;;
37914          *)       gl_cv_func_working_utimes="$gl_cross_guess_normal" ;;
37915        esac
37916
37917else
37918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37919/* end confdefs.h.  */
37920
37921#include <sys/types.h>
37922#include <sys/stat.h>
37923#include <fcntl.h>
37924#include <sys/time.h>
37925#include <time.h>
37926#include <unistd.h>
37927#include <stdlib.h>
37928#include <stdio.h>
37929#include <utime.h>
37930#include <errno.h>
37931
37932static int
37933inorder (time_t a, time_t b, time_t c)
37934{
37935  return a <= b && b <= c;
37936}
37937
37938int
37939main ()
37940{
37941  int result = 0;
37942  char const *file = "conftest.utimes";
37943  /* On OS/2, file timestamps must be on or after 1980 in local time,
37944     with an even number of seconds.  */
37945  static struct timeval timeval[2] = {{315620000 + 10, 10},
37946                                      {315620000 + 1000000, 999998}};
37947
37948  /* Test whether utimes() essentially works.  */
37949  {
37950    struct stat sbuf;
37951    FILE *f = fopen (file, "w");
37952    if (f == NULL)
37953      result |= 1;
37954    else if (fclose (f) != 0)
37955      result |= 1;
37956    else if (utimes (file, timeval) != 0)
37957      result |= 2;
37958    else if (lstat (file, &sbuf) != 0)
37959      result |= 1;
37960    else if (!(sbuf.st_atime == timeval[0].tv_sec
37961               && sbuf.st_mtime == timeval[1].tv_sec))
37962      result |= 4;
37963    if (unlink (file) != 0)
37964      result |= 1;
37965  }
37966
37967  /* Test whether utimes() with a NULL argument sets the file's timestamp
37968     to the current time.  Use 'fstat' as well as 'time' to
37969     determine the "current" time, to accommodate NFS file systems
37970     if there is a time skew between the host and the NFS server.  */
37971  {
37972    int fd = open (file, O_WRONLY|O_CREAT, 0644);
37973    if (fd < 0)
37974      result |= 1;
37975    else
37976      {
37977        time_t t0, t2;
37978        struct stat st0, st1, st2;
37979        if (time (&t0) == (time_t) -1)
37980          result |= 1;
37981        else if (fstat (fd, &st0) != 0)
37982          result |= 1;
37983        else if (utimes (file, timeval) != 0
37984                 && (errno != EACCES
37985                     /* OS/2 kLIBC utimes fails on opened files.  */
37986                     || close (fd) != 0
37987                     || utimes (file, timeval) != 0
37988                     || (fd = open (file, O_WRONLY)) < 0))
37989          result |= 2;
37990        else if (utimes (file, NULL) != 0
37991                 && (errno != EACCES
37992                     /* OS/2 kLIBC utimes fails on opened files.  */
37993                     || close (fd) != 0
37994                     || utimes (file, NULL) != 0
37995                     || (fd = open (file, O_WRONLY)) < 0))
37996          result |= 8;
37997        else if (fstat (fd, &st1) != 0)
37998          result |= 1;
37999        else if (write (fd, "\n", 1) != 1)
38000          result |= 1;
38001        else if (fstat (fd, &st2) != 0)
38002          result |= 1;
38003        else if (time (&t2) == (time_t) -1)
38004          result |= 1;
38005        else
38006          {
38007            int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
38008            int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
38009            if (! (st1.st_atime == st1.st_mtime))
38010              result |= 16;
38011            if (! (m_ok_POSIX || m_ok_NFS))
38012              result |= 32;
38013          }
38014        if (close (fd) != 0)
38015          result |= 1;
38016      }
38017    if (unlink (file) != 0)
38018      result |= 1;
38019  }
38020
38021  /* Test whether utimes() with a NULL argument works on read-only files.  */
38022  {
38023    int fd = open (file, O_WRONLY|O_CREAT, 0444);
38024    if (fd < 0)
38025      result |= 1;
38026    else if (close (fd) != 0)
38027      result |= 1;
38028    else if (utimes (file, NULL) != 0)
38029      result |= 64;
38030    if (unlink (file) != 0)
38031      result |= 1;
38032  }
38033
38034  return result;
38035}
38036
38037_ACEOF
38038if ac_fn_c_try_run "$LINENO"; then :
38039  gl_cv_func_working_utimes=yes
38040else
38041  gl_cv_func_working_utimes=no
38042fi
38043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38044  conftest.$ac_objext conftest.beam conftest.$ac_ext
38045fi
38046
38047
38048fi
38049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
38050$as_echo "$gl_cv_func_working_utimes" >&6; }
38051
38052  case "$gl_cv_func_working_utimes" in
38053    *yes)
38054
38055$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
38056
38057      ;;
38058  esac
38059
38060
38061
38062
38063
38064
38065
38066
38067
38068
38069
38070
38071
38072
38073
38074
38075
38076  if test $ac_cv_header_features_h = yes; then
38077    HAVE_FEATURES_H=1
38078  else
38079    HAVE_FEATURES_H=0
38080  fi
38081
38082
38083
38084
38085
38086  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
38087$as_echo_n "checking for intmax_t... " >&6; }
38088if ${gt_cv_c_intmax_t+:} false; then :
38089  $as_echo_n "(cached) " >&6
38090else
38091  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38092/* end confdefs.h.  */
38093
38094#include <stddef.h>
38095#include <stdlib.h>
38096#if HAVE_STDINT_H_WITH_UINTMAX
38097#include <stdint.h>
38098#endif
38099#if HAVE_INTTYPES_H_WITH_UINTMAX
38100#include <inttypes.h>
38101#endif
38102
38103int
38104main ()
38105{
38106intmax_t x = -1; return !x;
38107  ;
38108  return 0;
38109}
38110_ACEOF
38111if ac_fn_c_try_compile "$LINENO"; then :
38112  gt_cv_c_intmax_t=yes
38113else
38114  gt_cv_c_intmax_t=no
38115fi
38116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38117fi
38118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
38119$as_echo "$gt_cv_c_intmax_t" >&6; }
38120  if test $gt_cv_c_intmax_t = yes; then
38121
38122$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
38123
38124  else
38125
38126cat >>confdefs.h <<_ACEOF
38127#define intmax_t long long
38128_ACEOF
38129
38130  fi
38131
38132
38133
38134
38135
38136  for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
38137do :
38138  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
38139ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
38140if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
38141  cat >>confdefs.h <<_ACEOF
38142#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
38143_ACEOF
38144
38145fi
38146done
38147
38148      ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
38149"
38150if test "x$ac_cv_have_decl__snprintf" = xyes; then :
38151  ac_have_decl=1
38152else
38153  ac_have_decl=0
38154fi
38155
38156cat >>confdefs.h <<_ACEOF
38157#define HAVE_DECL__SNPRINTF $ac_have_decl
38158_ACEOF
38159
38160
38161
38162  case "$gl_cv_func_snprintf_retval_c99" in
38163    *yes)
38164
38165$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
38166
38167      ;;
38168  esac
38169
38170ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
38171if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
38172  ac_have_decl=1
38173else
38174  ac_have_decl=0
38175fi
38176
38177cat >>confdefs.h <<_ACEOF
38178#define HAVE_DECL_VSNPRINTF $ac_have_decl
38179_ACEOF
38180
38181
38182
38183
38184
38185
38186  GNULIB_SOCKET=0;
38187  GNULIB_CONNECT=0;
38188  GNULIB_ACCEPT=0;
38189  GNULIB_BIND=0;
38190  GNULIB_GETPEERNAME=0;
38191  GNULIB_GETSOCKNAME=0;
38192  GNULIB_GETSOCKOPT=0;
38193  GNULIB_LISTEN=0;
38194  GNULIB_RECV=0;
38195  GNULIB_SEND=0;
38196  GNULIB_RECVFROM=0;
38197  GNULIB_SENDTO=0;
38198  GNULIB_SETSOCKOPT=0;
38199  GNULIB_SHUTDOWN=0;
38200  GNULIB_ACCEPT4=0;
38201  HAVE_STRUCT_SOCKADDR_STORAGE=1;
38202  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
38203
38204  HAVE_SA_FAMILY_T=1;
38205  HAVE_ACCEPT4=1;
38206
38207
38208   if test $ac_cv_header_sys_socket_h = no; then
38209                         for ac_header in ws2tcpip.h
38210do :
38211  ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
38212if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
38213  cat >>confdefs.h <<_ACEOF
38214#define HAVE_WS2TCPIP_H 1
38215_ACEOF
38216
38217fi
38218
38219done
38220
38221   fi
38222
38223
38224
38225
38226
38227        case "$host_os" in
38228    osf*)
38229
38230$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
38231
38232      ;;
38233  esac
38234
38235  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
38236$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
38237if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
38238  $as_echo_n "(cached) " >&6
38239else
38240
38241      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38242/* end confdefs.h.  */
38243#include <sys/socket.h>
38244int
38245main ()
38246{
38247
38248  ;
38249  return 0;
38250}
38251_ACEOF
38252if ac_fn_c_try_compile "$LINENO"; then :
38253  gl_cv_header_sys_socket_h_selfcontained=yes
38254else
38255  gl_cv_header_sys_socket_h_selfcontained=no
38256fi
38257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38258
38259fi
38260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
38261$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
38262  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
38263            for ac_func in shutdown
38264do :
38265  ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
38266if test "x$ac_cv_func_shutdown" = xyes; then :
38267  cat >>confdefs.h <<_ACEOF
38268#define HAVE_SHUTDOWN 1
38269_ACEOF
38270
38271fi
38272done
38273
38274    if test $ac_cv_func_shutdown = yes; then
38275      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
38276$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
38277if ${gl_cv_header_sys_socket_h_shut+:} false; then :
38278  $as_echo_n "(cached) " >&6
38279else
38280
38281          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38282/* end confdefs.h.  */
38283#include <sys/socket.h>
38284int
38285main ()
38286{
38287int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
38288  ;
38289  return 0;
38290}
38291_ACEOF
38292if ac_fn_c_try_compile "$LINENO"; then :
38293  gl_cv_header_sys_socket_h_shut=yes
38294else
38295  gl_cv_header_sys_socket_h_shut=no
38296fi
38297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38298
38299fi
38300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
38301$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
38302      if test $gl_cv_header_sys_socket_h_shut = no; then
38303        SYS_SOCKET_H='sys/socket.h'
38304      fi
38305    fi
38306  fi
38307  # We need to check for ws2tcpip.h now.
38308
38309
38310
38311
38312
38313
38314
38315
38316
38317
38318
38319     if test $gl_cv_have_include_next = yes; then
38320       gl_cv_next_sys_socket_h='<'sys/socket.h'>'
38321     else
38322       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
38323$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
38324if ${gl_cv_next_sys_socket_h+:} false; then :
38325  $as_echo_n "(cached) " >&6
38326else
38327
38328             if test $ac_cv_header_sys_socket_h = yes; then
38329
38330
38331
38332
38333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38334/* end confdefs.h.  */
38335#include <sys/socket.h>
38336_ACEOF
38337                case "$host_os" in
38338    aix*) gl_absname_cpp="$ac_cpp -C" ;;
38339    *)    gl_absname_cpp="$ac_cpp" ;;
38340  esac
38341
38342  case "$host_os" in
38343    mingw*)
38344                                          gl_dirsep_regex='[/\\]'
38345      ;;
38346    *)
38347      gl_dirsep_regex='\/'
38348      ;;
38349  esac
38350      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
38351  gl_header_literal_regex=`echo 'sys/socket.h' \
38352                           | sed -e "$gl_make_literal_regex_sed"`
38353  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
38354      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
38355      s|^/[^/]|//&|
38356      p
38357      q
38358    }'
38359
38360        gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
38361  sed -n "$gl_absolute_header_sed"`
38362
38363           gl_header=$gl_cv_absolute_sys_socket_h
38364           gl_cv_next_sys_socket_h='"'$gl_header'"'
38365          else
38366               gl_cv_next_sys_socket_h='<'sys/socket.h'>'
38367             fi
38368
38369
38370fi
38371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
38372$as_echo "$gl_cv_next_sys_socket_h" >&6; }
38373     fi
38374     NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
38375
38376     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
38377       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
38378       gl_next_as_first_directive='<'sys/socket.h'>'
38379     else
38380       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
38381       gl_next_as_first_directive=$gl_cv_next_sys_socket_h
38382     fi
38383     NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
38384
38385
38386
38387
38388  if test $ac_cv_header_sys_socket_h = yes; then
38389    HAVE_SYS_SOCKET_H=1
38390  else
38391    HAVE_SYS_SOCKET_H=0
38392  fi
38393
38394
38395
38396  if test $ac_cv_header_sys_socket_h = yes; then
38397    HAVE_WS2TCPIP_H=0
38398  else
38399    if test $ac_cv_header_ws2tcpip_h = yes; then
38400      HAVE_WS2TCPIP_H=1
38401    else
38402      HAVE_WS2TCPIP_H=0
38403    fi
38404  fi
38405
38406
38407
38408  ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
38409  /* sys/types.h is not needed according to POSIX, but the
38410     sys/socket.h in i386-unknown-freebsd4.10 and
38411     powerpc-apple-darwin5.5 required it. */
38412#include <sys/types.h>
38413#ifdef HAVE_SYS_SOCKET_H
38414#include <sys/socket.h>
38415#endif
38416#ifdef HAVE_WS2TCPIP_H
38417#include <ws2tcpip.h>
38418#endif
38419
38420"
38421if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
38422
38423cat >>confdefs.h <<_ACEOF
38424#define HAVE_STRUCT_SOCKADDR_STORAGE 1
38425_ACEOF
38426
38427
38428fi
38429ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
38430  /* sys/types.h is not needed according to POSIX, but the
38431     sys/socket.h in i386-unknown-freebsd4.10 and
38432     powerpc-apple-darwin5.5 required it. */
38433#include <sys/types.h>
38434#ifdef HAVE_SYS_SOCKET_H
38435#include <sys/socket.h>
38436#endif
38437#ifdef HAVE_WS2TCPIP_H
38438#include <ws2tcpip.h>
38439#endif
38440
38441"
38442if test "x$ac_cv_type_sa_family_t" = xyes; then :
38443
38444cat >>confdefs.h <<_ACEOF
38445#define HAVE_SA_FAMILY_T 1
38446_ACEOF
38447
38448
38449fi
38450
38451  if test $ac_cv_type_struct_sockaddr_storage = no; then
38452    HAVE_STRUCT_SOCKADDR_STORAGE=0
38453  fi
38454  if test $ac_cv_type_sa_family_t = no; then
38455    HAVE_SA_FAMILY_T=0
38456  fi
38457  if test $ac_cv_type_struct_sockaddr_storage != no; then
38458    ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
38459       #ifdef HAVE_SYS_SOCKET_H
38460       #include <sys/socket.h>
38461       #endif
38462       #ifdef HAVE_WS2TCPIP_H
38463       #include <ws2tcpip.h>
38464       #endif
38465
38466"
38467if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
38468
38469cat >>confdefs.h <<_ACEOF
38470#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
38471_ACEOF
38472
38473
38474else
38475  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
38476fi
38477
38478  fi
38479  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
38480     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
38481    SYS_SOCKET_H='sys/socket.h'
38482  fi
38483
38484
38485
38486
38487  if test $ac_cv_header_sys_socket_h != yes; then
38488                    for ac_header in winsock2.h
38489do :
38490  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
38491if test "x$ac_cv_header_winsock2_h" = xyes; then :
38492  cat >>confdefs.h <<_ACEOF
38493#define HAVE_WINSOCK2_H 1
38494_ACEOF
38495
38496fi
38497
38498done
38499
38500  fi
38501  if test "$ac_cv_header_winsock2_h" = yes; then
38502    HAVE_WINSOCK2_H=1
38503    UNISTD_H_HAVE_WINSOCK2_H=1
38504    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
38505  else
38506    HAVE_WINSOCK2_H=0
38507  fi
38508
38509
38510
38511
38512
38513
38514
38515
38516
38517
38518  GNULIB_INET_NTOP=0;
38519  GNULIB_INET_PTON=0;
38520    HAVE_DECL_INET_NTOP=1;
38521  HAVE_DECL_INET_PTON=1;
38522  REPLACE_INET_NTOP=0;
38523  REPLACE_INET_PTON=0;
38524
38525
38526
38527
38528
38529ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
38530if test "x$ac_cv_have_decl_alarm" = xyes; then :
38531  ac_have_decl=1
38532else
38533  ac_have_decl=0
38534fi
38535
38536cat >>confdefs.h <<_ACEOF
38537#define HAVE_DECL_ALARM $ac_have_decl
38538_ACEOF
38539
38540
38541
38542                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library needed for semaphore functions" >&5
38543$as_echo_n "checking for library needed for semaphore functions... " >&6; }
38544if ${gl_cv_semaphore_lib+:} false; then :
38545  $as_echo_n "(cached) " >&6
38546else
38547  save_LIBS="$LIBS"
38548     LIBS="$LIBS $LIBMULTITHREAD"
38549     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38550/* end confdefs.h.  */
38551#include <semaphore.h>
38552int
38553main ()
38554{
38555sem_post ((sem_t *)0);
38556  ;
38557  return 0;
38558}
38559_ACEOF
38560if ac_fn_c_try_link "$LINENO"; then :
38561  gl_cv_semaphore_lib=none
38562else
38563  LIBS="$LIBS -lrt"
38564        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38565/* end confdefs.h.  */
38566#include <semaphore.h>
38567int
38568main ()
38569{
38570sem_post ((sem_t *)0);
38571  ;
38572  return 0;
38573}
38574_ACEOF
38575if ac_fn_c_try_link "$LINENO"; then :
38576  gl_cv_semaphore_lib='-lrt'
38577else
38578  gl_cv_semaphore_lib=none
38579fi
38580rm -f core conftest.err conftest.$ac_objext \
38581    conftest$ac_exeext conftest.$ac_ext
38582
38583fi
38584rm -f core conftest.err conftest.$ac_objext \
38585    conftest$ac_exeext conftest.$ac_ext
38586     LIBS="$save_LIBS"
38587
38588fi
38589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_semaphore_lib" >&5
38590$as_echo "$gl_cv_semaphore_lib" >&6; }
38591  if test "x$gl_cv_semaphore_lib" = xnone; then
38592    LIB_SEMAPHORE=
38593  else
38594    LIB_SEMAPHORE="$gl_cv_semaphore_lib"
38595  fi
38596
38597
38598
38599
38600
38601
38602
38603
38604
38605
38606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
38607$as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
38608if ${gl_cv_func_ungetc_works+:} false; then :
38609  $as_echo_n "(cached) " >&6
38610else
38611  if test "$cross_compiling" = yes; then :
38612  case "$host_os" in
38613                          # Guess yes on glibc systems.
38614           *-gnu* | gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
38615                          # Guess yes on musl systems.
38616           *-musl*)       gl_cv_func_ungetc_works="guessing yes" ;;
38617                          # Guess yes on bionic systems.
38618           *-android*)    gl_cv_func_ungetc_works="guessing yes" ;;
38619                          # Guess yes on native Windows.
38620           mingw*)        gl_cv_func_ungetc_works="guessing yes" ;;
38621                          # If we don't know, obey --enable-cross-guesses.
38622           *)             gl_cv_func_ungetc_works="$gl_cross_guess_normal" ;;
38623         esac
38624
38625else
38626  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38627/* end confdefs.h.  */
38628
38629#include <stdio.h>
38630
38631int
38632main ()
38633{
38634FILE *f;
38635           if (!(f = fopen ("conftest.tmp", "w+")))
38636             return 1;
38637           if (fputs ("abc", f) < 0)
38638             { fclose (f); return 2; }
38639           rewind (f);
38640           if (fgetc (f) != 'a')
38641             { fclose (f); return 3; }
38642           if (fgetc (f) != 'b')
38643             { fclose (f); return 4; }
38644           if (ungetc ('d', f) != 'd')
38645             { fclose (f); return 5; }
38646           if (ftell (f) != 1)
38647             { fclose (f); return 6; }
38648           if (fgetc (f) != 'd')
38649             { fclose (f); return 7; }
38650           if (ftell (f) != 2)
38651             { fclose (f); return 8; }
38652           if (fseek (f, 0, SEEK_CUR) != 0)
38653             { fclose (f); return 9; }
38654           if (ftell (f) != 2)
38655             { fclose (f); return 10; }
38656           if (fgetc (f) != 'c')
38657             { fclose (f); return 11; }
38658           fclose (f);
38659           remove ("conftest.tmp");
38660  ;
38661  return 0;
38662}
38663_ACEOF
38664if ac_fn_c_try_run "$LINENO"; then :
38665  gl_cv_func_ungetc_works=yes
38666else
38667  gl_cv_func_ungetc_works=no
38668fi
38669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38670  conftest.$ac_objext conftest.beam conftest.$ac_ext
38671fi
38672
38673
38674fi
38675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
38676$as_echo "$gl_cv_func_ungetc_works" >&6; }
38677  case "$gl_cv_func_ungetc_works" in
38678    *yes) ;;
38679    *)
38680
38681$as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
38682
38683      ;;
38684  esac
38685
38686
38687
38688
38689
38690   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
38691$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
38692if ${gl_cv_func_getcwd_null+:} false; then :
38693  $as_echo_n "(cached) " >&6
38694else
38695  if test "$cross_compiling" = yes; then :
38696  case "$host_os" in
38697                           # Guess yes on glibc systems.
38698            *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
38699                           # Guess yes on musl systems.
38700            *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
38701                           # Guess yes on Cygwin.
38702            cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
38703                           # If we don't know, obey --enable-cross-guesses.
38704            *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
38705          esac
38706
38707else
38708  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38709/* end confdefs.h.  */
38710
38711#	 include <stdlib.h>
38712#        if HAVE_UNISTD_H
38713#         include <unistd.h>
38714#        else /* on Windows with MSVC */
38715#         include <direct.h>
38716#        endif
38717#        ifndef getcwd
38718         char *getcwd ();
38719#        endif
38720
38721int
38722main ()
38723{
38724
38725#if defined _WIN32 && ! defined __CYGWIN__
38726/* mingw cwd does not start with '/', but getcwd does allocate.
38727   However, mingw fails to honor non-zero size.  */
38728#else
38729           if (chdir ("/") != 0)
38730             return 1;
38731           else
38732             {
38733               char *f = getcwd (NULL, 0);
38734               if (! f)
38735                 return 2;
38736               if (f[0] != '/')
38737                 { free (f); return 3; }
38738               if (f[1] != '\0')
38739                 { free (f); return 4; }
38740               free (f);
38741               return 0;
38742             }
38743#endif
38744
38745  ;
38746  return 0;
38747}
38748_ACEOF
38749if ac_fn_c_try_run "$LINENO"; then :
38750  gl_cv_func_getcwd_null=yes
38751else
38752  gl_cv_func_getcwd_null=no
38753fi
38754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38755  conftest.$ac_objext conftest.beam conftest.$ac_ext
38756fi
38757
38758fi
38759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
38760$as_echo "$gl_cv_func_getcwd_null" >&6; }
38761
38762
38763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
38764$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
38765if ${gl_cv_func_getcwd_posix_signature+:} false; then :
38766  $as_echo_n "(cached) " >&6
38767else
38768  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38769/* end confdefs.h.  */
38770#include <unistd.h>
38771int
38772main ()
38773{
38774extern
38775           #ifdef __cplusplus
38776           "C"
38777           #endif
38778           char *getcwd (char *, size_t);
38779
38780  ;
38781  return 0;
38782}
38783
38784_ACEOF
38785if ac_fn_c_try_compile "$LINENO"; then :
38786  gl_cv_func_getcwd_posix_signature=yes
38787else
38788  gl_cv_func_getcwd_posix_signature=no
38789fi
38790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38791
38792fi
38793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
38794$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
38795
38796
38797
38798  case "$host_os" in
38799    *-musl*)
38800$as_echo "#define MUSL_LIBC 1" >>confdefs.h
38801 ;;
38802  esac
38803
38804
38805
38806
38807
38808
38809
38810
38811
38812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
38813$as_echo_n "checking for IPv4 sockets... " >&6; }
38814if ${gl_cv_socket_ipv4+:} false; then :
38815  $as_echo_n "(cached) " >&6
38816else
38817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38818/* end confdefs.h.  */
38819#include <sys/types.h>
38820#ifdef HAVE_SYS_SOCKET_H
38821#include <sys/socket.h>
38822#endif
38823#ifdef HAVE_NETINET_IN_H
38824#include <netinet/in.h>
38825#endif
38826#ifdef HAVE_WINSOCK2_H
38827#include <winsock2.h>
38828#endif
38829int
38830main ()
38831{
38832int x = AF_INET; struct in_addr y; struct sockaddr_in z;
38833 if (&x && &y && &z) return 0;
38834  ;
38835  return 0;
38836}
38837_ACEOF
38838if ac_fn_c_try_compile "$LINENO"; then :
38839  gl_cv_socket_ipv4=yes
38840else
38841  gl_cv_socket_ipv4=no
38842fi
38843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38844fi
38845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
38846$as_echo "$gl_cv_socket_ipv4" >&6; }
38847  if test $gl_cv_socket_ipv4 = yes; then
38848
38849$as_echo "#define HAVE_IPV4 1" >>confdefs.h
38850
38851  fi
38852
38853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
38854$as_echo_n "checking for IPv6 sockets... " >&6; }
38855if ${gl_cv_socket_ipv6+:} false; then :
38856  $as_echo_n "(cached) " >&6
38857else
38858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38859/* end confdefs.h.  */
38860#include <sys/types.h>
38861#ifdef HAVE_SYS_SOCKET_H
38862#include <sys/socket.h>
38863#endif
38864#ifdef HAVE_NETINET_IN_H
38865#include <netinet/in.h>
38866#endif
38867#ifdef HAVE_WINSOCK2_H
38868#include <winsock2.h>
38869#endif
38870#ifdef HAVE_WS2TCPIP_H
38871#include <ws2tcpip.h>
38872#endif
38873int
38874main ()
38875{
38876int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
38877 if (&x && &y && &z) return 0;
38878  ;
38879  return 0;
38880}
38881_ACEOF
38882if ac_fn_c_try_compile "$LINENO"; then :
38883  gl_cv_socket_ipv6=yes
38884else
38885  gl_cv_socket_ipv6=no
38886fi
38887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38888fi
38889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
38890$as_echo "$gl_cv_socket_ipv6" >&6; }
38891  if test $gl_cv_socket_ipv6 = yes; then
38892
38893$as_echo "#define HAVE_IPV6 1" >>confdefs.h
38894
38895  fi
38896
38897ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
38898if test "x$ac_cv_type_off_t" = xyes; then :
38899
38900else
38901
38902cat >>confdefs.h <<_ACEOF
38903#define off_t long int
38904_ACEOF
38905
38906fi
38907
38908
38909
38910
38911
38912
38913  if test $ac_cv_header_sys_socket_h != yes; then
38914                    for ac_header in winsock2.h
38915do :
38916  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
38917if test "x$ac_cv_header_winsock2_h" = xyes; then :
38918  cat >>confdefs.h <<_ACEOF
38919#define HAVE_WINSOCK2_H 1
38920_ACEOF
38921
38922fi
38923
38924done
38925
38926  fi
38927  if test "$ac_cv_header_winsock2_h" = yes; then
38928    HAVE_WINSOCK2_H=1
38929    UNISTD_H_HAVE_WINSOCK2_H=1
38930    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
38931  else
38932    HAVE_WINSOCK2_H=0
38933  fi
38934
38935   LIBSOCKET=
38936  if test $HAVE_WINSOCK2_H = 1; then
38937        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
38938$as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
38939if ${gl_cv_func_wsastartup+:} false; then :
38940  $as_echo_n "(cached) " >&6
38941else
38942
38943      gl_save_LIBS="$LIBS"
38944      LIBS="$LIBS -lws2_32"
38945      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38946/* end confdefs.h.  */
38947
38948#ifdef HAVE_WINSOCK2_H
38949# include <winsock2.h>
38950#endif
38951int
38952main ()
38953{
38954
38955          WORD wVersionRequested = MAKEWORD(1, 1);
38956          WSADATA wsaData;
38957          int err = WSAStartup(wVersionRequested, &wsaData);
38958          WSACleanup ();
38959  ;
38960  return 0;
38961}
38962_ACEOF
38963if ac_fn_c_try_link "$LINENO"; then :
38964  gl_cv_func_wsastartup=yes
38965else
38966  gl_cv_func_wsastartup=no
38967fi
38968rm -f core conftest.err conftest.$ac_objext \
38969    conftest$ac_exeext conftest.$ac_ext
38970      LIBS="$gl_save_LIBS"
38971
38972fi
38973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
38974$as_echo "$gl_cv_func_wsastartup" >&6; }
38975    if test "$gl_cv_func_wsastartup" = "yes"; then
38976
38977$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
38978
38979      LIBSOCKET='-lws2_32'
38980    fi
38981  else
38982                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
38983$as_echo_n "checking for library containing setsockopt... " >&6; }
38984if ${gl_cv_lib_socket+:} false; then :
38985  $as_echo_n "(cached) " >&6
38986else
38987
38988      gl_cv_lib_socket=
38989      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38990/* end confdefs.h.  */
38991extern
38992#ifdef __cplusplus
38993"C"
38994#endif
38995char setsockopt();
38996int
38997main ()
38998{
38999setsockopt();
39000  ;
39001  return 0;
39002}
39003_ACEOF
39004if ac_fn_c_try_link "$LINENO"; then :
39005
39006else
39007  gl_save_LIBS="$LIBS"
39008         LIBS="$gl_save_LIBS -lsocket"
39009         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39010/* end confdefs.h.  */
39011extern
39012#ifdef __cplusplus
39013"C"
39014#endif
39015char setsockopt();
39016int
39017main ()
39018{
39019setsockopt();
39020  ;
39021  return 0;
39022}
39023_ACEOF
39024if ac_fn_c_try_link "$LINENO"; then :
39025  gl_cv_lib_socket="-lsocket"
39026fi
39027rm -f core conftest.err conftest.$ac_objext \
39028    conftest$ac_exeext conftest.$ac_ext
39029         if test -z "$gl_cv_lib_socket"; then
39030           LIBS="$gl_save_LIBS -lnetwork"
39031           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39032/* end confdefs.h.  */
39033extern
39034#ifdef __cplusplus
39035"C"
39036#endif
39037char setsockopt();
39038int
39039main ()
39040{
39041setsockopt();
39042  ;
39043  return 0;
39044}
39045_ACEOF
39046if ac_fn_c_try_link "$LINENO"; then :
39047  gl_cv_lib_socket="-lnetwork"
39048fi
39049rm -f core conftest.err conftest.$ac_objext \
39050    conftest$ac_exeext conftest.$ac_ext
39051           if test -z "$gl_cv_lib_socket"; then
39052             LIBS="$gl_save_LIBS -lnet"
39053             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39054/* end confdefs.h.  */
39055extern
39056#ifdef __cplusplus
39057"C"
39058#endif
39059char setsockopt();
39060int
39061main ()
39062{
39063setsockopt();
39064  ;
39065  return 0;
39066}
39067_ACEOF
39068if ac_fn_c_try_link "$LINENO"; then :
39069  gl_cv_lib_socket="-lnet"
39070fi
39071rm -f core conftest.err conftest.$ac_objext \
39072    conftest$ac_exeext conftest.$ac_ext
39073           fi
39074         fi
39075         LIBS="$gl_save_LIBS"
39076
39077fi
39078rm -f core conftest.err conftest.$ac_objext \
39079    conftest$ac_exeext conftest.$ac_ext
39080      if test -z "$gl_cv_lib_socket"; then
39081        gl_cv_lib_socket="none needed"
39082      fi
39083
39084fi
39085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
39086$as_echo "$gl_cv_lib_socket" >&6; }
39087    if test "$gl_cv_lib_socket" != "none needed"; then
39088      LIBSOCKET="$gl_cv_lib_socket"
39089    fi
39090  fi
39091
39092
39093
39094
39095
39096
39097  :
39098
39099
39100
39101
39102
39103
39104  if test "$ac_cv_header_winsock2_h" = yes; then
39105    REPLACE_SELECT=1
39106  else
39107
39108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
39109$as_echo_n "checking whether select supports a 0 argument... " >&6; }
39110if ${gl_cv_func_select_supports0+:} false; then :
39111  $as_echo_n "(cached) " >&6
39112else
39113
39114        if test "$cross_compiling" = yes; then :
39115
39116           case "$host_os" in
39117                       # Guess no on Interix.
39118             interix*) gl_cv_func_select_supports0="guessing no";;
39119                       # Guess yes otherwise.
39120             *)        gl_cv_func_select_supports0="guessing yes";;
39121           esac
39122
39123else
39124  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39125/* end confdefs.h.  */
39126
39127#include <sys/types.h>
39128#include <sys/time.h>
39129#if HAVE_SYS_SELECT_H
39130#include <sys/select.h>
39131#endif
39132int main ()
39133{
39134  struct timeval timeout;
39135  timeout.tv_sec = 0;
39136  timeout.tv_usec = 5;
39137  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
39138}
39139_ACEOF
39140if ac_fn_c_try_run "$LINENO"; then :
39141  gl_cv_func_select_supports0=yes
39142else
39143  gl_cv_func_select_supports0=no
39144fi
39145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39146  conftest.$ac_objext conftest.beam conftest.$ac_ext
39147fi
39148
39149
39150fi
39151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
39152$as_echo "$gl_cv_func_select_supports0" >&6; }
39153    case "$gl_cv_func_select_supports0" in
39154      *yes) ;;
39155      *) REPLACE_SELECT=1 ;;
39156    esac
39157
39158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
39159$as_echo_n "checking whether select detects invalid fds... " >&6; }
39160if ${gl_cv_func_select_detects_ebadf+:} false; then :
39161  $as_echo_n "(cached) " >&6
39162else
39163
39164        if test "$cross_compiling" = yes; then :
39165
39166           case "$host_os" in
39167                             # Guess yes on Linux systems.
39168            linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
39169                             # Guess yes on glibc systems.
39170            *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
39171                             # If we don't know, obey --enable-cross-guesses.
39172            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
39173           esac
39174
39175else
39176  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39177/* end confdefs.h.  */
39178
39179#include <sys/types.h>
39180#include <sys/time.h>
39181#if HAVE_SYS_SELECT_H
39182# include <sys/select.h>
39183#endif
39184#include <unistd.h>
39185#include <errno.h>
39186
39187int
39188main ()
39189{
39190
39191  fd_set set;
39192  dup2(0, 16);
39193  FD_ZERO(&set);
39194  FD_SET(16, &set);
39195  close(16);
39196  struct timeval timeout;
39197  timeout.tv_sec = 0;
39198  timeout.tv_usec = 5;
39199  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
39200
39201  ;
39202  return 0;
39203}
39204_ACEOF
39205if ac_fn_c_try_run "$LINENO"; then :
39206  gl_cv_func_select_detects_ebadf=yes
39207else
39208  gl_cv_func_select_detects_ebadf=no
39209fi
39210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39211  conftest.$ac_objext conftest.beam conftest.$ac_ext
39212fi
39213
39214
39215fi
39216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
39217$as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
39218    case $gl_cv_func_select_detects_ebadf in
39219      *yes) ;;
39220      *) REPLACE_SELECT=1 ;;
39221    esac
39222  fi
39223
39224    LIB_SELECT="$LIBSOCKET"
39225  if test $REPLACE_SELECT = 1; then
39226    case "$host_os" in
39227      mingw*)
39228                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39229/* end confdefs.h.  */
39230
39231#define WIN32_LEAN_AND_MEAN
39232#include <windows.h>
39233int
39234main ()
39235{
39236  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
39237  return 0;
39238}
39239_ACEOF
39240if ac_fn_c_try_link "$LINENO"; then :
39241
39242else
39243  LIB_SELECT="$LIB_SELECT -luser32"
39244fi
39245rm -f core conftest.err conftest.$ac_objext \
39246    conftest$ac_exeext conftest.$ac_ext
39247        ;;
39248    esac
39249  fi
39250
39251
39252ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
39253if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
39254  ac_have_decl=1
39255else
39256  ac_have_decl=0
39257fi
39258
39259cat >>confdefs.h <<_ACEOF
39260#define HAVE_DECL_STRERROR_R $ac_have_decl
39261_ACEOF
39262
39263
39264
39265
39266
39267
39268
39269
39270  if test $ac_cv_have_decl_strerror_r = no; then
39271    HAVE_DECL_STRERROR_R=0
39272  fi
39273
39274  if test $ac_cv_func_strerror_r = yes; then
39275    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
39276      if test $gl_cv_func_strerror_r_posix_signature = yes; then
39277        case "$gl_cv_func_strerror_r_works" in
39278                    *no) REPLACE_STRERROR_R=1 ;;
39279        esac
39280      else
39281                REPLACE_STRERROR_R=1
39282      fi
39283    else
39284                  REPLACE_STRERROR_R=1
39285    fi
39286  fi
39287
39288
39289
39290
39291  GNULIB_PTHREAD_THREAD=0;
39292  GNULIB_PTHREAD_ONCE=0;
39293  GNULIB_PTHREAD_MUTEX=0;
39294  GNULIB_PTHREAD_RWLOCK=0;
39295  GNULIB_PTHREAD_COND=0;
39296  GNULIB_PTHREAD_TSS=0;
39297  GNULIB_PTHREAD_SPIN=0;
39298  GNULIB_PTHREAD_MUTEX_TIMEDLOCK=0;
39299    HAVE_PTHREAD_T=1;
39300  HAVE_PTHREAD_SPINLOCK_T=1;
39301  HAVE_PTHREAD_CREATE_DETACHED=1;
39302  HAVE_PTHREAD_MUTEX_RECURSIVE=1;
39303  HAVE_PTHREAD_MUTEX_ROBUST=1;
39304  HAVE_PTHREAD_PROCESS_SHARED=1;
39305  HAVE_PTHREAD_CREATE=1;
39306  HAVE_PTHREAD_ATTR_INIT=1;
39307  HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;
39308  HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;
39309  HAVE_PTHREAD_ATTR_DESTROY=1;
39310  HAVE_PTHREAD_SELF=1;
39311  HAVE_PTHREAD_EQUAL=1;
39312  HAVE_PTHREAD_DETACH=1;
39313  HAVE_PTHREAD_JOIN=1;
39314  HAVE_PTHREAD_EXIT=1;
39315  HAVE_PTHREAD_ONCE=1;
39316  HAVE_PTHREAD_MUTEX_INIT=1;
39317  HAVE_PTHREAD_MUTEXATTR_INIT=1;
39318  HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;
39319  HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;
39320  HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;
39321  HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;
39322  HAVE_PTHREAD_MUTEXATTR_DESTROY=1;
39323  HAVE_PTHREAD_MUTEX_LOCK=1;
39324  HAVE_PTHREAD_MUTEX_TRYLOCK=1;
39325  HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;
39326  HAVE_PTHREAD_MUTEX_UNLOCK=1;
39327  HAVE_PTHREAD_MUTEX_DESTROY=1;
39328  HAVE_PTHREAD_RWLOCK_INIT=1;
39329  HAVE_PTHREAD_RWLOCKATTR_INIT=1;
39330  HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;
39331  HAVE_PTHREAD_RWLOCK_RDLOCK=1;
39332  HAVE_PTHREAD_RWLOCK_WRLOCK=1;
39333  HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;
39334  HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;
39335  HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;
39336  HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;
39337  HAVE_PTHREAD_RWLOCK_UNLOCK=1;
39338  HAVE_PTHREAD_RWLOCK_DESTROY=1;
39339  HAVE_PTHREAD_COND_INIT=1;
39340  HAVE_PTHREAD_CONDATTR_INIT=1;
39341  HAVE_PTHREAD_CONDATTR_DESTROY=1;
39342  HAVE_PTHREAD_COND_WAIT=1;
39343  HAVE_PTHREAD_COND_TIMEDWAIT=1;
39344  HAVE_PTHREAD_COND_SIGNAL=1;
39345  HAVE_PTHREAD_COND_BROADCAST=1;
39346  HAVE_PTHREAD_COND_DESTROY=1;
39347  HAVE_PTHREAD_KEY_CREATE=1;
39348  HAVE_PTHREAD_SETSPECIFIC=1;
39349  HAVE_PTHREAD_GETSPECIFIC=1;
39350  HAVE_PTHREAD_KEY_DELETE=1;
39351  HAVE_PTHREAD_SPIN_INIT=1;
39352  HAVE_PTHREAD_SPIN_LOCK=1;
39353  HAVE_PTHREAD_SPIN_TRYLOCK=1;
39354  HAVE_PTHREAD_SPIN_UNLOCK=1;
39355  HAVE_PTHREAD_SPIN_DESTROY=1;
39356  REPLACE_PTHREAD_CREATE=0;
39357  REPLACE_PTHREAD_ATTR_INIT=0;
39358  REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0;
39359  REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0;
39360  REPLACE_PTHREAD_ATTR_DESTROY=0;
39361  REPLACE_PTHREAD_SELF=0;
39362  REPLACE_PTHREAD_EQUAL=0;
39363  REPLACE_PTHREAD_DETACH=0;
39364  REPLACE_PTHREAD_JOIN=0;
39365  REPLACE_PTHREAD_EXIT=0;
39366  REPLACE_PTHREAD_ONCE=0;
39367  REPLACE_PTHREAD_MUTEX_INIT=0;
39368  REPLACE_PTHREAD_MUTEXATTR_INIT=0;
39369  REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;
39370  REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;
39371  REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0;
39372  REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0;
39373  REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;
39374  REPLACE_PTHREAD_MUTEX_LOCK=0;
39375  REPLACE_PTHREAD_MUTEX_TRYLOCK=0;
39376  REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;
39377  REPLACE_PTHREAD_MUTEX_UNLOCK=0;
39378  REPLACE_PTHREAD_MUTEX_DESTROY=0;
39379  REPLACE_PTHREAD_RWLOCK_INIT=0;
39380  REPLACE_PTHREAD_RWLOCKATTR_INIT=0;
39381  REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;
39382  REPLACE_PTHREAD_RWLOCK_RDLOCK=0;
39383  REPLACE_PTHREAD_RWLOCK_WRLOCK=0;
39384  REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;
39385  REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;
39386  REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;
39387  REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;
39388  REPLACE_PTHREAD_RWLOCK_UNLOCK=0;
39389  REPLACE_PTHREAD_RWLOCK_DESTROY=0;
39390  REPLACE_PTHREAD_COND_INIT=0;
39391  REPLACE_PTHREAD_CONDATTR_INIT=0;
39392  REPLACE_PTHREAD_CONDATTR_DESTROY=0;
39393  REPLACE_PTHREAD_COND_WAIT=0;
39394  REPLACE_PTHREAD_COND_TIMEDWAIT=0;
39395  REPLACE_PTHREAD_COND_SIGNAL=0;
39396  REPLACE_PTHREAD_COND_BROADCAST=0;
39397  REPLACE_PTHREAD_COND_DESTROY=0;
39398  REPLACE_PTHREAD_KEY_CREATE=0;
39399  REPLACE_PTHREAD_SETSPECIFIC=0;
39400  REPLACE_PTHREAD_GETSPECIFIC=0;
39401  REPLACE_PTHREAD_KEY_DELETE=0;
39402  REPLACE_PTHREAD_SPIN_INIT=0;
39403  REPLACE_PTHREAD_SPIN_LOCK=0;
39404  REPLACE_PTHREAD_SPIN_TRYLOCK=0;
39405  REPLACE_PTHREAD_SPIN_UNLOCK=0;
39406  REPLACE_PTHREAD_SPIN_DESTROY=0;
39407
39408
39409
39410
39411
39412
39413
39414
39415
39416
39417
39418
39419
39420
39421
39422
39423
39424
39425
39426
39427
39428
39429
39430
39431
39432
39433
39434
39435
39436  if test $gl_threads_api = posix; then
39437    YIELD_LIB="$LIB_SCHED_YIELD"
39438  else
39439    YIELD_LIB=
39440  fi
39441
39442
39443
39444   if true; then
39445  GL_COND_LIBTOOL_TRUE=
39446  GL_COND_LIBTOOL_FALSE='#'
39447else
39448  GL_COND_LIBTOOL_TRUE='#'
39449  GL_COND_LIBTOOL_FALSE=
39450fi
39451
39452  gl_cond_libtool=true
39453  gl_m4_base='gnulib-m4'
39454
39455
39456
39457
39458
39459
39460
39461
39462
39463
39464  gl_source_base='gnulib-lib'
39465
39466
39467
39468      case "$host_os" in
39469    mingw*) REPLACE_ACCESS=1 ;;
39470  esac
39471
39472  if test $REPLACE_ACCESS = 1; then
39473
39474
39475
39476
39477
39478
39479
39480
39481  gl_LIBOBJS="$gl_LIBOBJS access.$ac_objext"
39482
39483  fi
39484
39485
39486
39487
39488
39489          GNULIB_ACCESS=1
39490
39491
39492
39493
39494
39495$as_echo "#define GNULIB_TEST_ACCESS 1" >>confdefs.h
39496
39497
39498
39499
39500
39501
39502  LIB_ACL=
39503  use_acl=0
39504  if test "$enable_acl" != no; then
39505        for ac_header in sys/acl.h
39506do :
39507  ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
39508if test "x$ac_cv_header_sys_acl_h" = xyes; then :
39509  cat >>confdefs.h <<_ACEOF
39510#define HAVE_SYS_ACL_H 1
39511_ACEOF
39512
39513fi
39514
39515done
39516
39517    if test $ac_cv_header_sys_acl_h = yes; then
39518      ac_save_LIBS=$LIBS
39519
39520                        if test $use_acl = 0; then
39521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
39522$as_echo_n "checking for library containing acl_get_file... " >&6; }
39523if ${ac_cv_search_acl_get_file+:} false; then :
39524  $as_echo_n "(cached) " >&6
39525else
39526  ac_func_search_save_LIBS=$LIBS
39527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39528/* end confdefs.h.  */
39529
39530/* Override any GCC internal prototype to avoid an error.
39531   Use char because int might match the return type of a GCC
39532   builtin and then its argument prototype would still apply.  */
39533#ifdef __cplusplus
39534extern "C"
39535#endif
39536char acl_get_file ();
39537int
39538main ()
39539{
39540return acl_get_file ();
39541  ;
39542  return 0;
39543}
39544_ACEOF
39545for ac_lib in '' acl pacl; do
39546  if test -z "$ac_lib"; then
39547    ac_res="none required"
39548  else
39549    ac_res=-l$ac_lib
39550    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
39551  fi
39552  if ac_fn_c_try_link "$LINENO"; then :
39553  ac_cv_search_acl_get_file=$ac_res
39554fi
39555rm -f core conftest.err conftest.$ac_objext \
39556    conftest$ac_exeext
39557  if ${ac_cv_search_acl_get_file+:} false; then :
39558  break
39559fi
39560done
39561if ${ac_cv_search_acl_get_file+:} false; then :
39562
39563else
39564  ac_cv_search_acl_get_file=no
39565fi
39566rm conftest.$ac_ext
39567LIBS=$ac_func_search_save_LIBS
39568fi
39569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
39570$as_echo "$ac_cv_search_acl_get_file" >&6; }
39571ac_res=$ac_cv_search_acl_get_file
39572if test "$ac_res" != no; then :
39573  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
39574  if test "$ac_cv_search_acl_get_file" != "none required"; then
39575             LIB_ACL=$ac_cv_search_acl_get_file
39576           fi
39577           for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
39578              acl_free acl_from_mode acl_from_text \
39579              acl_delete_def_file acl_extended_file \
39580              acl_delete_fd_np acl_delete_file_np \
39581              acl_copy_ext_native acl_create_entry_np \
39582              acl_to_short_text acl_free_text
39583do :
39584  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
39585ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
39586if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
39587  cat >>confdefs.h <<_ACEOF
39588#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
39589_ACEOF
39590
39591fi
39592done
39593
39594           # If the acl_get_file bug is detected, don't enable the ACL support.
39595
39596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
39597$as_echo_n "checking for working acl_get_file... " >&6; }
39598if ${gl_cv_func_working_acl_get_file+:} false; then :
39599  $as_echo_n "(cached) " >&6
39600else
39601  gl_cv_func_working_acl_get_file=no
39602     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39603/* end confdefs.h.  */
39604#include <sys/types.h>
39605           #include <sys/acl.h>
39606           #include <errno.h>
39607
39608int
39609main ()
39610{
39611acl_t acl = acl_get_file (".", ACL_TYPE_ACCESS);
39612            return acl ? acl_free (acl) != 0 : errno == ENOENT;
39613
39614  ;
39615  return 0;
39616}
39617_ACEOF
39618if ac_fn_c_try_link "$LINENO"; then :
39619  if test $cross_compiling = yes; then
39620          gl_cv_func_working_acl_get_file="guessing yes"
39621        elif ./conftest$ac_exeext; then
39622          gl_cv_func_working_acl_get_file=yes
39623        fi
39624fi
39625rm -f core conftest.err conftest.$ac_objext \
39626    conftest$ac_exeext conftest.$ac_ext
39627fi
39628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
39629$as_echo "$gl_cv_func_working_acl_get_file" >&6; }
39630  if test "$gl_cv_func_working_acl_get_file" != no; then :
39631  use_acl=1
39632fi
39633
39634           if test $use_acl = 1; then
39635                          for ac_header in acl/libacl.h
39636do :
39637  ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
39638if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
39639  cat >>confdefs.h <<_ACEOF
39640#define HAVE_ACL_LIBACL_H 1
39641_ACEOF
39642
39643fi
39644
39645done
39646
39647
39648
39649
39650
39651
39652
39653
39654
39655  for ac_func in acl_entries
39656do :
39657  ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
39658if test "x$ac_cv_func_acl_entries" = xyes; then :
39659  cat >>confdefs.h <<_ACEOF
39660#define HAVE_ACL_ENTRIES 1
39661_ACEOF
39662
39663else
39664
39665    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
39666
39667fi
39668done
39669
39670
39671             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
39672$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
39673if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then :
39674  $as_echo_n "(cached) " >&6
39675else
39676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39677/* end confdefs.h.  */
39678#include <sys/types.h>
39679#include <sys/acl.h>
39680int type = ACL_FIRST_ENTRY;
39681int
39682main ()
39683{
39684
39685  ;
39686  return 0;
39687}
39688_ACEOF
39689if ac_fn_c_try_compile "$LINENO"; then :
39690  gl_cv_acl_ACL_FIRST_ENTRY=yes
39691else
39692  gl_cv_acl_ACL_FIRST_ENTRY=no
39693fi
39694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39695fi
39696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
39697$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
39698             if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
39699
39700$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
39701
39702             fi
39703                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
39704$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
39705if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then :
39706  $as_echo_n "(cached) " >&6
39707else
39708  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39709/* end confdefs.h.  */
39710#include <sys/types.h>
39711#include <sys/acl.h>
39712int type = ACL_TYPE_EXTENDED;
39713int
39714main ()
39715{
39716
39717  ;
39718  return 0;
39719}
39720_ACEOF
39721if ac_fn_c_try_compile "$LINENO"; then :
39722  gl_cv_acl_ACL_TYPE_EXTENDED=yes
39723else
39724  gl_cv_acl_ACL_TYPE_EXTENDED=no
39725fi
39726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39727fi
39728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
39729$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
39730             if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
39731
39732$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
39733
39734             fi
39735           else
39736             LIB_ACL=
39737           fi
39738
39739fi
39740
39741      fi
39742
39743            if test $use_acl = 0; then
39744        for ac_func in facl
39745do :
39746  ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
39747if test "x$ac_cv_func_facl" = xyes; then :
39748  cat >>confdefs.h <<_ACEOF
39749#define HAVE_FACL 1
39750_ACEOF
39751
39752fi
39753done
39754
39755        if test $ac_cv_func_facl = yes; then
39756          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
39757$as_echo_n "checking for library containing acl_trivial... " >&6; }
39758if ${ac_cv_search_acl_trivial+:} false; then :
39759  $as_echo_n "(cached) " >&6
39760else
39761  ac_func_search_save_LIBS=$LIBS
39762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39763/* end confdefs.h.  */
39764
39765/* Override any GCC internal prototype to avoid an error.
39766   Use char because int might match the return type of a GCC
39767   builtin and then its argument prototype would still apply.  */
39768#ifdef __cplusplus
39769extern "C"
39770#endif
39771char acl_trivial ();
39772int
39773main ()
39774{
39775return acl_trivial ();
39776  ;
39777  return 0;
39778}
39779_ACEOF
39780for ac_lib in '' sec; do
39781  if test -z "$ac_lib"; then
39782    ac_res="none required"
39783  else
39784    ac_res=-l$ac_lib
39785    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
39786  fi
39787  if ac_fn_c_try_link "$LINENO"; then :
39788  ac_cv_search_acl_trivial=$ac_res
39789fi
39790rm -f core conftest.err conftest.$ac_objext \
39791    conftest$ac_exeext
39792  if ${ac_cv_search_acl_trivial+:} false; then :
39793  break
39794fi
39795done
39796if ${ac_cv_search_acl_trivial+:} false; then :
39797
39798else
39799  ac_cv_search_acl_trivial=no
39800fi
39801rm conftest.$ac_ext
39802LIBS=$ac_func_search_save_LIBS
39803fi
39804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
39805$as_echo "$ac_cv_search_acl_trivial" >&6; }
39806ac_res=$ac_cv_search_acl_trivial
39807if test "$ac_res" != no; then :
39808  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
39809  if test "$ac_cv_search_acl_trivial" != "none required"; then
39810               LIB_ACL=$ac_cv_search_acl_trivial
39811             fi
39812
39813fi
39814
39815          for ac_func in acl_trivial
39816do :
39817  ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
39818if test "x$ac_cv_func_acl_trivial" = xyes; then :
39819  cat >>confdefs.h <<_ACEOF
39820#define HAVE_ACL_TRIVIAL 1
39821_ACEOF
39822
39823fi
39824done
39825
39826          use_acl=1
39827        fi
39828      fi
39829
39830            if test $use_acl = 0; then
39831        for ac_func in getacl
39832do :
39833  ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
39834if test "x$ac_cv_func_getacl" = xyes; then :
39835  cat >>confdefs.h <<_ACEOF
39836#define HAVE_GETACL 1
39837_ACEOF
39838
39839fi
39840done
39841
39842        if test $ac_cv_func_getacl = yes; then
39843          use_acl=1
39844        fi
39845                for ac_header in aclv.h
39846do :
39847  ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
39848"
39849if test "x$ac_cv_header_aclv_h" = xyes; then :
39850  cat >>confdefs.h <<_ACEOF
39851#define HAVE_ACLV_H 1
39852_ACEOF
39853
39854fi
39855
39856done
39857
39858      fi
39859
39860            if test $use_acl = 0; then
39861        for ac_func in aclx_get
39862do :
39863  ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
39864if test "x$ac_cv_func_aclx_get" = xyes; then :
39865  cat >>confdefs.h <<_ACEOF
39866#define HAVE_ACLX_GET 1
39867_ACEOF
39868
39869fi
39870done
39871
39872        if test $ac_cv_func_aclx_get = yes; then
39873          use_acl=1
39874        fi
39875      fi
39876
39877            if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
39878        for ac_func in statacl
39879do :
39880  ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
39881if test "x$ac_cv_func_statacl" = xyes; then :
39882  cat >>confdefs.h <<_ACEOF
39883#define HAVE_STATACL 1
39884_ACEOF
39885
39886fi
39887done
39888
39889        if test $ac_cv_func_statacl = yes; then
39890          use_acl=1
39891        fi
39892      fi
39893
39894            if test $use_acl = 0; then
39895        for ac_func in aclsort
39896do :
39897  ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
39898if test "x$ac_cv_func_aclsort" = xyes; then :
39899  cat >>confdefs.h <<_ACEOF
39900#define HAVE_ACLSORT 1
39901_ACEOF
39902
39903fi
39904done
39905
39906        if test $ac_cv_func_aclsort = yes; then
39907          use_acl=1
39908        fi
39909      fi
39910
39911      LIBS=$ac_save_LIBS
39912    fi
39913
39914    if test "$enable_acl$use_acl" = yes0; then
39915      as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
39916    elif test "$enable_acl$use_acl" = auto0; then
39917      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
39918$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
39919      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gettext-tools will be built without ACL support." >&5
39920$as_echo "$as_me: WARNING: gettext-tools will be built without ACL support." >&2;}
39921    fi
39922  fi
39923  test -n "$gl_need_lib_has_acl" && LIB_HAS_ACL=$LIB_ACL
39924
39925
39926cat >>confdefs.h <<_ACEOF
39927#define USE_ACL $use_acl
39928_ACEOF
39929
39930  USE_ACL=$use_acl
39931
39932
39933
39934
39935  if test $ac_cv_func_alloca_works = no; then
39936    :
39937  fi
39938
39939  # Define an additional variable used in the Makefile substitution.
39940  if test $ac_cv_working_alloca_h = yes; then
39941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
39942$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
39943if ${gl_cv_rpl_alloca+:} false; then :
39944  $as_echo_n "(cached) " >&6
39945else
39946
39947      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39948/* end confdefs.h.  */
39949
39950#if defined __GNUC__ || defined _AIX || defined _MSC_VER
39951        Need own alloca
39952#endif
39953
39954_ACEOF
39955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
39956  $EGREP "Need own alloca" >/dev/null 2>&1; then :
39957  gl_cv_rpl_alloca=yes
39958else
39959  gl_cv_rpl_alloca=no
39960fi
39961rm -f conftest*
39962
39963
39964fi
39965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
39966$as_echo "$gl_cv_rpl_alloca" >&6; }
39967    if test $gl_cv_rpl_alloca = yes; then
39968
39969$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
39970
39971      ALLOCA_H=alloca.h
39972    else
39973                  ALLOCA_H=
39974    fi
39975  else
39976    ALLOCA_H=alloca.h
39977  fi
39978
39979   if test -n "$ALLOCA_H"; then
39980  GL_GENERATE_ALLOCA_H_TRUE=
39981  GL_GENERATE_ALLOCA_H_FALSE='#'
39982else
39983  GL_GENERATE_ALLOCA_H_TRUE='#'
39984  GL_GENERATE_ALLOCA_H_FALSE=
39985fi
39986
39987
39988  if test $ac_cv_working_alloca_h = yes; then
39989    HAVE_ALLOCA_H=1
39990  else
39991    HAVE_ALLOCA_H=0
39992  fi
39993
39994
39995
39996
39997
39998
39999  for ac_func in atexit
40000do :
40001  ac_fn_c_check_func "$LINENO" "atexit" "ac_cv_func_atexit"
40002if test "x$ac_cv_func_atexit" = xyes; then :
40003  cat >>confdefs.h <<_ACEOF
40004#define HAVE_ATEXIT 1
40005_ACEOF
40006
40007fi
40008done
40009
40010
40011  if test $ac_cv_func_atexit = no; then
40012
40013
40014
40015
40016
40017
40018
40019
40020  gl_LIBOBJS="$gl_LIBOBJS atexit.$ac_objext"
40021
40022
40023  :
40024
40025  fi
40026
40027    for ac_header in dirent.h string.h
40028do :
40029  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40030ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
40031if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40032  cat >>confdefs.h <<_ACEOF
40033#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40034_ACEOF
40035
40036fi
40037
40038done
40039
40040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
40041$as_echo_n "checking for long file names... " >&6; }
40042if ${ac_cv_sys_long_file_names+:} false; then :
40043  $as_echo_n "(cached) " >&6
40044else
40045  ac_cv_sys_long_file_names=yes
40046# Test for long file names in all the places we know might matter:
40047#      .		the current directory, where building will happen
40048#      $prefix/lib	where we will be installing things
40049#      $exec_prefix/lib	likewise
40050#      $TMPDIR		if set, where it might want to write temporary files
40051#      /tmp		where it might want to write temporary files
40052#      /var/tmp		likewise
40053#      /usr/tmp		likewise
40054for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
40055  # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
40056  # in the usual case where exec_prefix is '${prefix}'.
40057  case $ac_dir in #(
40058    . | /* | ?:[\\/]*) ;; #(
40059    *) continue;;
40060  esac
40061  test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
40062  ac_xdir=$ac_dir/cf$$
40063  (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
40064  ac_tf1=$ac_xdir/conftest9012345
40065  ac_tf2=$ac_xdir/conftest9012346
40066  touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
40067    ac_cv_sys_long_file_names=no
40068  rm -f -r "$ac_xdir" 2>/dev/null
40069  test $ac_cv_sys_long_file_names = no && break
40070done
40071fi
40072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
40073$as_echo "$ac_cv_sys_long_file_names" >&6; }
40074if test $ac_cv_sys_long_file_names = yes; then
40075
40076$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
40077
40078fi
40079
40080  for ac_func in pathconf
40081do :
40082  ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf"
40083if test "x$ac_cv_func_pathconf" = xyes; then :
40084  cat >>confdefs.h <<_ACEOF
40085#define HAVE_PATHCONF 1
40086_ACEOF
40087
40088fi
40089done
40090
40091  for ac_header in string.h unistd.h
40092do :
40093  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40094ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
40095if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40096  cat >>confdefs.h <<_ACEOF
40097#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40098_ACEOF
40099
40100fi
40101
40102done
40103
40104
40105  # See the comments in bison.m4.
40106
40107  if test -z "$USE_NLS"; then
40108    echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." | sed -e 's/-/_/g' 1>&2
40109    exit 1
40110  fi
40111  BISON_LOCALEDIR=
40112  BISON_USE_NLS=no
40113  if test "$USE_NLS" = yes; then
40114                                BISON_LOCALEDIR="${localedir}"
40115
40116# Check whether --with-bison-prefix was given.
40117if test "${with_bison_prefix+set}" = set; then :
40118  withval=$with_bison_prefix; if test "X$withval" != "X" && test "X$withval" != "Xno"; then
40119         BISON_LOCALEDIR="$withval/share/locale"
40120       fi
40121
40122fi
40123
40124    if test $cross_compiling != yes; then
40125                              if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then
40126        BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir`
40127      fi
40128    fi
40129    if test -n "$BISON_LOCALEDIR"; then
40130                              USER_LINGUAS="${LINGUAS-%UNSET%}"
40131      if test -n "$USER_LINGUAS"; then
40132        BISON_USE_NLS=yes
40133      fi
40134    fi
40135
40136  fi
40137  if test $BISON_USE_NLS = yes; then
40138
40139$as_echo "#define YYENABLE_NLS 1" >>confdefs.h
40140
40141  fi
40142
40143
40144
40145
40146
40147
40148
40149  if test $ac_cv_func_btowc = no; then
40150    HAVE_BTOWC=0
40151  else
40152
40153
40154
40155
40156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
40157$as_echo_n "checking whether btowc(0) is correct... " >&6; }
40158if ${gl_cv_func_btowc_nul+:} false; then :
40159  $as_echo_n "(cached) " >&6
40160else
40161
40162        if test "$cross_compiling" = yes; then :
40163
40164           case "$host_os" in
40165                      # Guess no on Cygwin.
40166             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
40167                      # Guess yes on native Windows.
40168             mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
40169                      # Guess yes otherwise.
40170             *)       gl_cv_func_btowc_nul="guessing yes" ;;
40171           esac
40172
40173else
40174  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40175/* end confdefs.h.  */
40176
40177#include <string.h>
40178/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
40179   <wchar.h>.
40180   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
40181   included before <wchar.h>.  */
40182#include <stddef.h>
40183#include <stdio.h>
40184#include <time.h>
40185#include <wchar.h>
40186int main ()
40187{
40188  if (btowc ('\0') != 0)
40189    return 1;
40190  return 0;
40191}
40192_ACEOF
40193if ac_fn_c_try_run "$LINENO"; then :
40194  gl_cv_func_btowc_nul=yes
40195else
40196  gl_cv_func_btowc_nul=no
40197fi
40198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40199  conftest.$ac_objext conftest.beam conftest.$ac_ext
40200fi
40201
40202
40203fi
40204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
40205$as_echo "$gl_cv_func_btowc_nul" >&6; }
40206
40207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
40208$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
40209if ${gl_cv_func_btowc_eof+:} false; then :
40210  $as_echo_n "(cached) " >&6
40211else
40212
40213                        case "$host_os" in
40214                  # Guess no on IRIX.
40215          irix*)  gl_cv_func_btowc_eof="guessing no" ;;
40216                  # Guess yes on native Windows.
40217          mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
40218                  # Guess yes otherwise.
40219          *)      gl_cv_func_btowc_eof="guessing yes" ;;
40220        esac
40221        if test $LOCALE_FR != none; then
40222          if test "$cross_compiling" = yes; then :
40223  :
40224else
40225  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40226/* end confdefs.h.  */
40227
40228#include <locale.h>
40229#include <string.h>
40230/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
40231   <wchar.h>.
40232   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
40233   included before <wchar.h>.  */
40234#include <stddef.h>
40235#include <stdio.h>
40236#include <time.h>
40237#include <wchar.h>
40238int main ()
40239{
40240  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
40241    {
40242      if (btowc (EOF) != WEOF)
40243        return 1;
40244    }
40245  return 0;
40246}
40247_ACEOF
40248if ac_fn_c_try_run "$LINENO"; then :
40249  gl_cv_func_btowc_eof=yes
40250else
40251  gl_cv_func_btowc_eof=no
40252fi
40253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40254  conftest.$ac_objext conftest.beam conftest.$ac_ext
40255fi
40256
40257        fi
40258
40259fi
40260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
40261$as_echo "$gl_cv_func_btowc_eof" >&6; }
40262
40263    case "$gl_cv_func_btowc_nul" in
40264      *yes) ;;
40265      *) REPLACE_BTOWC=1 ;;
40266    esac
40267    case "$gl_cv_func_btowc_eof" in
40268      *yes) ;;
40269      *) REPLACE_BTOWC=1 ;;
40270    esac
40271  fi
40272
40273  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
40274
40275
40276
40277
40278
40279
40280
40281
40282  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
40283
40284
40285  :
40286
40287  fi
40288
40289
40290
40291
40292
40293          GNULIB_BTOWC=1
40294
40295
40296
40297
40298
40299$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
40300
40301
40302
40303
40304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
40305$as_echo_n "checking for __builtin_expect... " >&6; }
40306if ${gl_cv___builtin_expect+:} false; then :
40307  $as_echo_n "(cached) " >&6
40308else
40309  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40310/* end confdefs.h.  */
40311
40312         int
40313         main (int argc, char **argv)
40314         {
40315           argc = __builtin_expect (argc, 100);
40316           return argv[argc != 100][0];
40317         }
40318_ACEOF
40319if ac_fn_c_try_link "$LINENO"; then :
40320  gl_cv___builtin_expect=yes
40321else
40322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40323/* end confdefs.h.  */
40324
40325             #include <builtins.h>
40326             int
40327             main (int argc, char **argv)
40328             {
40329               argc = __builtin_expect (argc, 100);
40330               return argv[argc != 100][0];
40331             }
40332_ACEOF
40333if ac_fn_c_try_link "$LINENO"; then :
40334  gl_cv___builtin_expect="in <builtins.h>"
40335else
40336  gl_cv___builtin_expect=no
40337fi
40338rm -f core conftest.err conftest.$ac_objext \
40339    conftest$ac_exeext conftest.$ac_ext
40340fi
40341rm -f core conftest.err conftest.$ac_objext \
40342    conftest$ac_exeext conftest.$ac_ext
40343fi
40344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
40345$as_echo "$gl_cv___builtin_expect" >&6; }
40346  if test "$gl_cv___builtin_expect" = yes; then
40347    $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
40348
40349  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
40350    $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
40351
40352  fi
40353
40354
40355
40356    for ac_header in byteswap.h
40357do :
40358  ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
40359if test "x$ac_cv_header_byteswap_h" = xyes; then :
40360  cat >>confdefs.h <<_ACEOF
40361#define HAVE_BYTESWAP_H 1
40362_ACEOF
40363
40364    BYTESWAP_H=''
40365
40366else
40367
40368    BYTESWAP_H='byteswap.h'
40369
40370fi
40371
40372done
40373
40374
40375   if test -n "$BYTESWAP_H"; then
40376  GL_GENERATE_BYTESWAP_H_TRUE=
40377  GL_GENERATE_BYTESWAP_H_FALSE='#'
40378else
40379  GL_GENERATE_BYTESWAP_H_TRUE='#'
40380  GL_GENERATE_BYTESWAP_H_FALSE=
40381fi
40382
40383
40384
40385
40386
40387
40388
40389  if test $ac_cv_func_canonicalize_file_name = no; then
40390    HAVE_CANONICALIZE_FILE_NAME=0
40391  else
40392    case "$gl_cv_func_realpath_works" in
40393      *yes) ;;
40394      *)    REPLACE_CANONICALIZE_FILE_NAME=1 ;;
40395    esac
40396  fi
40397
40398
40399
40400cat >>confdefs.h <<_ACEOF
40401#define GNULIB_CANONICALIZE 1
40402_ACEOF
40403
40404
40405
40406
40407$as_echo "#define GNULIB_TEST_CANONICALIZE 1" >>confdefs.h
40408
40409
40410
40411
40412
40413
40414
40415          GNULIB_CANONICALIZE_FILE_NAME=1
40416
40417
40418
40419
40420
40421$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
40422
40423
40424
40425
40426
40427
40428  if test $ac_cv_func_canonicalize_file_name = no; then
40429    HAVE_CANONICALIZE_FILE_NAME=0
40430    if test $ac_cv_func_realpath = no; then
40431      HAVE_REALPATH=0
40432    else
40433      case "$gl_cv_func_realpath_works" in
40434        *yes) ;;
40435        *)    REPLACE_REALPATH=1 ;;
40436      esac
40437    fi
40438  else
40439    case "$gl_cv_func_realpath_works" in
40440      *yes)
40441        ;;
40442      *)
40443        REPLACE_CANONICALIZE_FILE_NAME=1
40444        REPLACE_REALPATH=1
40445        ;;
40446    esac
40447  fi
40448
40449  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
40450
40451
40452
40453
40454
40455
40456
40457
40458  gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
40459
40460  fi
40461
40462
40463cat >>confdefs.h <<_ACEOF
40464#define GNULIB_CANONICALIZE_LGPL 1
40465_ACEOF
40466
40467
40468
40469
40470
40471
40472
40473          GNULIB_CANONICALIZE_FILE_NAME=1
40474
40475
40476
40477
40478
40479$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
40480
40481
40482
40483
40484
40485
40486
40487
40488          GNULIB_REALPATH=1
40489
40490
40491
40492
40493
40494$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
40495
40496
40497
40498
40499
40500
40501$as_echo "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
40502
40503
40504
40505
40506  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
40507  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
40508
40509  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
40510  # programs in the package would end up linked with that potentially-shared
40511  # library, inducing unnecessary run-time overhead.
40512  LIB_CLOCK_GETTIME=
40513
40514  gl_saved_libs=$LIBS
40515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
40516$as_echo_n "checking for library containing clock_gettime... " >&6; }
40517if ${ac_cv_search_clock_gettime+:} false; then :
40518  $as_echo_n "(cached) " >&6
40519else
40520  ac_func_search_save_LIBS=$LIBS
40521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40522/* end confdefs.h.  */
40523
40524/* Override any GCC internal prototype to avoid an error.
40525   Use char because int might match the return type of a GCC
40526   builtin and then its argument prototype would still apply.  */
40527#ifdef __cplusplus
40528extern "C"
40529#endif
40530char clock_gettime ();
40531int
40532main ()
40533{
40534return clock_gettime ();
40535  ;
40536  return 0;
40537}
40538_ACEOF
40539for ac_lib in '' rt posix4; do
40540  if test -z "$ac_lib"; then
40541    ac_res="none required"
40542  else
40543    ac_res=-l$ac_lib
40544    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
40545  fi
40546  if ac_fn_c_try_link "$LINENO"; then :
40547  ac_cv_search_clock_gettime=$ac_res
40548fi
40549rm -f core conftest.err conftest.$ac_objext \
40550    conftest$ac_exeext
40551  if ${ac_cv_search_clock_gettime+:} false; then :
40552  break
40553fi
40554done
40555if ${ac_cv_search_clock_gettime+:} false; then :
40556
40557else
40558  ac_cv_search_clock_gettime=no
40559fi
40560rm conftest.$ac_ext
40561LIBS=$ac_func_search_save_LIBS
40562fi
40563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
40564$as_echo "$ac_cv_search_clock_gettime" >&6; }
40565ac_res=$ac_cv_search_clock_gettime
40566if test "$ac_res" != no; then :
40567  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
40568  test "$ac_cv_search_clock_gettime" = "none required" ||
40569                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
40570fi
40571
40572    for ac_func in clock_gettime clock_settime
40573do :
40574  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
40575ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
40576if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
40577  cat >>confdefs.h <<_ACEOF
40578#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
40579_ACEOF
40580
40581fi
40582done
40583
40584  LIBS=$gl_saved_libs
40585
40586
40587
40588$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
40589
40590
40591
40592
40593
40594
40595    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
40596      REPLACE_CLOSE=1
40597    fi
40598
40599
40600
40601
40602
40603
40604  if test $ac_cv_header_sys_socket_h != yes; then
40605                    for ac_header in winsock2.h
40606do :
40607  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
40608if test "x$ac_cv_header_winsock2_h" = xyes; then :
40609  cat >>confdefs.h <<_ACEOF
40610#define HAVE_WINSOCK2_H 1
40611_ACEOF
40612
40613fi
40614
40615done
40616
40617  fi
40618  if test "$ac_cv_header_winsock2_h" = yes; then
40619    HAVE_WINSOCK2_H=1
40620    UNISTD_H_HAVE_WINSOCK2_H=1
40621    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
40622  else
40623    HAVE_WINSOCK2_H=0
40624  fi
40625
40626
40627    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
40628                        REPLACE_CLOSE=1
40629    fi
40630
40631
40632
40633  if test $REPLACE_CLOSE = 1; then
40634
40635
40636
40637
40638
40639
40640
40641
40642  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
40643
40644  fi
40645
40646
40647
40648
40649
40650          GNULIB_CLOSE=1
40651
40652
40653
40654
40655
40656$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
40657
40658
40659
40660
40661
40662
40663  for ac_func in closedir
40664do :
40665  ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
40666if test "x$ac_cv_func_closedir" = xyes; then :
40667  cat >>confdefs.h <<_ACEOF
40668#define HAVE_CLOSEDIR 1
40669_ACEOF
40670
40671fi
40672done
40673
40674  if test $ac_cv_func_closedir = no; then
40675    HAVE_CLOSEDIR=0
40676  fi
40677
40678    case $host_os,$HAVE_CLOSEDIR in
40679    os2*,1)
40680      REPLACE_CLOSEDIR=1;;
40681  esac
40682
40683  if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
40684
40685
40686
40687
40688
40689
40690
40691
40692  gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
40693
40694  fi
40695
40696
40697
40698
40699
40700          GNULIB_CLOSEDIR=1
40701
40702
40703
40704
40705
40706$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
40707
40708
40709
40710
40711  if test "x$lispdir" = x; then
40712    lispdir='${datarootdir}/emacs/site-lisp'
40713
40714  fi
40715    if test "x$runstatedir" = x; then
40716    runstatedir='${localstatedir}/run'
40717
40718  fi
40719
40720      pkglibexecdir='${libexecdir}/${PACKAGE}'
40721
40722
40723
40724
40725  for ac_func in chown
40726do :
40727  ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
40728if test "x$ac_cv_func_chown" = xyes; then :
40729  cat >>confdefs.h <<_ACEOF
40730#define HAVE_CHOWN 1
40731_ACEOF
40732
40733fi
40734done
40735
40736
40737
40738
40739
40740
40741
40742            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for copy_file_range" >&5
40743$as_echo_n "checking for copy_file_range... " >&6; }
40744if ${gl_cv_func_copy_file_range+:} false; then :
40745  $as_echo_n "(cached) " >&6
40746else
40747  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40748/* end confdefs.h.  */
40749#include <unistd.h>
40750
40751int
40752main ()
40753{
40754ssize_t (*func) (int, off_t *, int, off_t, size_t, unsigned)
40755              = copy_file_range;
40756            return func (0, 0, 0, 0, 0, 0) & 127;
40757
40758  ;
40759  return 0;
40760}
40761
40762_ACEOF
40763if ac_fn_c_try_link "$LINENO"; then :
40764  gl_cv_func_copy_file_range=yes
40765else
40766  gl_cv_func_copy_file_range=no
40767fi
40768rm -f core conftest.err conftest.$ac_objext \
40769    conftest$ac_exeext conftest.$ac_ext
40770
40771fi
40772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copy_file_range" >&5
40773$as_echo "$gl_cv_func_copy_file_range" >&6; }
40774
40775  if test "$gl_cv_func_copy_file_range" != yes; then
40776    HAVE_COPY_FILE_RANGE=0
40777  fi
40778
40779  if test $HAVE_COPY_FILE_RANGE = 0; then
40780
40781
40782
40783
40784
40785
40786
40787
40788  gl_LIBOBJS="$gl_LIBOBJS copy-file-range.$ac_objext"
40789
40790  fi
40791
40792
40793
40794
40795
40796          GNULIB_COPY_FILE_RANGE=1
40797
40798
40799
40800
40801
40802$as_echo "#define GNULIB_TEST_COPY_FILE_RANGE 1" >>confdefs.h
40803
40804
40805
40806
40807  ac_config_files="$ac_config_files csharpcomp.sh:../build-aux/csharpcomp.sh.in"
40808
40809  # You need to invoke gt_CSHARPEXEC yourself, possibly with arguments.
40810  ac_config_files="$ac_config_files csharpexec.sh:../build-aux/csharpexec.sh.in"
40811
40812
40813
40814
40815
40816
40817
40818
40819
40820
40821
40822
40823     if test $gl_cv_have_include_next = yes; then
40824       gl_cv_next_ctype_h='<'ctype.h'>'
40825     else
40826       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
40827$as_echo_n "checking absolute name of <ctype.h>... " >&6; }
40828if ${gl_cv_next_ctype_h+:} false; then :
40829  $as_echo_n "(cached) " >&6
40830else
40831
40832
40833
40834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40835/* end confdefs.h.  */
40836#include <ctype.h>
40837_ACEOF
40838                case "$host_os" in
40839    aix*) gl_absname_cpp="$ac_cpp -C" ;;
40840    *)    gl_absname_cpp="$ac_cpp" ;;
40841  esac
40842
40843  case "$host_os" in
40844    mingw*)
40845                                          gl_dirsep_regex='[/\\]'
40846      ;;
40847    *)
40848      gl_dirsep_regex='\/'
40849      ;;
40850  esac
40851      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
40852  gl_header_literal_regex=`echo 'ctype.h' \
40853                           | sed -e "$gl_make_literal_regex_sed"`
40854  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
40855      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
40856      s|^/[^/]|//&|
40857      p
40858      q
40859    }'
40860
40861        gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
40862  sed -n "$gl_absolute_header_sed"`
40863
40864           gl_header=$gl_cv_absolute_ctype_h
40865           gl_cv_next_ctype_h='"'$gl_header'"'
40866
40867
40868fi
40869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
40870$as_echo "$gl_cv_next_ctype_h" >&6; }
40871     fi
40872     NEXT_CTYPE_H=$gl_cv_next_ctype_h
40873
40874     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
40875       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
40876       gl_next_as_first_directive='<'ctype.h'>'
40877     else
40878       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
40879       gl_next_as_first_directive=$gl_cv_next_ctype_h
40880     fi
40881     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
40882
40883
40884
40885
40886
40887
40888
40889
40890
40891
40892
40893
40894
40895
40896
40897
40898
40899
40900
40901
40902
40903     if test $gl_cv_have_include_next = yes; then
40904       gl_cv_next_dirent_h='<'dirent.h'>'
40905     else
40906       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
40907$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
40908if ${gl_cv_next_dirent_h+:} false; then :
40909  $as_echo_n "(cached) " >&6
40910else
40911
40912             if test $ac_cv_header_dirent_h = yes; then
40913
40914
40915
40916
40917  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40918/* end confdefs.h.  */
40919#include <dirent.h>
40920_ACEOF
40921                case "$host_os" in
40922    aix*) gl_absname_cpp="$ac_cpp -C" ;;
40923    *)    gl_absname_cpp="$ac_cpp" ;;
40924  esac
40925
40926  case "$host_os" in
40927    mingw*)
40928                                          gl_dirsep_regex='[/\\]'
40929      ;;
40930    *)
40931      gl_dirsep_regex='\/'
40932      ;;
40933  esac
40934      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
40935  gl_header_literal_regex=`echo 'dirent.h' \
40936                           | sed -e "$gl_make_literal_regex_sed"`
40937  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
40938      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
40939      s|^/[^/]|//&|
40940      p
40941      q
40942    }'
40943
40944        gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
40945  sed -n "$gl_absolute_header_sed"`
40946
40947           gl_header=$gl_cv_absolute_dirent_h
40948           gl_cv_next_dirent_h='"'$gl_header'"'
40949          else
40950               gl_cv_next_dirent_h='<'dirent.h'>'
40951             fi
40952
40953
40954fi
40955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
40956$as_echo "$gl_cv_next_dirent_h" >&6; }
40957     fi
40958     NEXT_DIRENT_H=$gl_cv_next_dirent_h
40959
40960     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
40961       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
40962       gl_next_as_first_directive='<'dirent.h'>'
40963     else
40964       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
40965       gl_next_as_first_directive=$gl_cv_next_dirent_h
40966     fi
40967     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
40968
40969
40970
40971
40972  if test $ac_cv_header_dirent_h = yes; then
40973    HAVE_DIRENT_H=1
40974  else
40975    HAVE_DIRENT_H=0
40976  fi
40977
40978
40979
40980
40981
40982
40983
40984
40985
40986
40987
40988  for ac_func in dirfd
40989do :
40990  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
40991if test "x$ac_cv_func_dirfd" = xyes; then :
40992  cat >>confdefs.h <<_ACEOF
40993#define HAVE_DIRFD 1
40994_ACEOF
40995
40996fi
40997done
40998
40999  ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
41000      #include <dirent.h>
41001"
41002if test "x$ac_cv_have_decl_dirfd" = xyes; then :
41003  ac_have_decl=1
41004else
41005  ac_have_decl=0
41006fi
41007
41008cat >>confdefs.h <<_ACEOF
41009#define HAVE_DECL_DIRFD $ac_have_decl
41010_ACEOF
41011
41012  if test $ac_cv_have_decl_dirfd = no; then
41013    HAVE_DECL_DIRFD=0
41014  fi
41015
41016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
41017$as_echo_n "checking whether dirfd is a macro... " >&6; }
41018if ${gl_cv_func_dirfd_macro+:} false; then :
41019  $as_echo_n "(cached) " >&6
41020else
41021  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41022/* end confdefs.h.  */
41023
41024#include <sys/types.h>
41025#include <dirent.h>
41026#ifdef dirfd
41027 dirent_header_defines_dirfd
41028#endif
41029_ACEOF
41030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41031  $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
41032  gl_cv_func_dirfd_macro=yes
41033else
41034  gl_cv_func_dirfd_macro=no
41035fi
41036rm -f conftest*
41037
41038fi
41039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
41040$as_echo "$gl_cv_func_dirfd_macro" >&6; }
41041
41042  # Use the replacement if we have no function or macro with that name,
41043  # or if OS/2 kLIBC whose dirfd() does not work.
41044  # Replace only if the system declares dirfd already.
41045  case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
41046    no,no,*,yes | *,*,os2*,yes)
41047      REPLACE_DIRFD=1
41048
41049$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
41050;;
41051  esac
41052
41053  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
41054     || test $REPLACE_DIRFD = 1; then
41055
41056
41057
41058
41059
41060
41061
41062
41063  gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
41064
41065
41066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
41067$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
41068if ${gl_cv_sys_dir_fd_member_name+:} false; then :
41069  $as_echo_n "(cached) " >&6
41070else
41071
41072      dirfd_save_CFLAGS=$CFLAGS
41073      for ac_expr in d_fd dd_fd; do
41074
41075        CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
41076        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41077/* end confdefs.h.  */
41078
41079           #include <sys/types.h>
41080           #include <dirent.h>
41081int
41082main ()
41083{
41084DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
41085  ;
41086  return 0;
41087}
41088_ACEOF
41089if ac_fn_c_try_compile "$LINENO"; then :
41090  dir_fd_found=yes
41091
41092fi
41093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41094        CFLAGS=$dirfd_save_CFLAGS
41095        test "$dir_fd_found" = yes && break
41096      done
41097      test "$dir_fd_found" = yes || ac_expr=no_such_member
41098
41099      gl_cv_sys_dir_fd_member_name=$ac_expr
41100
41101
41102fi
41103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
41104$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
41105  if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
41106
41107cat >>confdefs.h <<_ACEOF
41108#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
41109_ACEOF
41110
41111  fi
41112
41113
41114  fi
41115
41116
41117
41118
41119
41120          GNULIB_DIRFD=1
41121
41122
41123
41124
41125
41126$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
41127
41128
41129
41130
41131
41132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
41133$as_echo_n "checking whether // is distinct from /... " >&6; }
41134if ${gl_cv_double_slash_root+:} false; then :
41135  $as_echo_n "(cached) " >&6
41136else
41137   if test x"$cross_compiling" = xyes ; then
41138        # When cross-compiling, there is no way to tell whether // is special
41139        # short of a list of hosts.  However, the only known hosts to date
41140        # that have a distinct // are Apollo DomainOS (too old to port to),
41141        # Cygwin, and z/OS.  If anyone knows of another system for which // has
41142        # special semantics and is distinct from /, please report it to
41143        # <bug-gnulib@gnu.org>.
41144        case $host in
41145          *-cygwin | i370-ibm-openedition)
41146            gl_cv_double_slash_root=yes ;;
41147          *)
41148            # Be optimistic and assume that / and // are the same when we
41149            # don't know.
41150            gl_cv_double_slash_root='unknown, assuming no' ;;
41151        esac
41152      else
41153        set x `ls -di / // 2>/dev/null`
41154        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
41155          gl_cv_double_slash_root=no
41156        else
41157          gl_cv_double_slash_root=yes
41158        fi
41159      fi
41160fi
41161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
41162$as_echo "$gl_cv_double_slash_root" >&6; }
41163  if test "$gl_cv_double_slash_root" = yes; then
41164
41165$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
41166
41167  fi
41168
41169
41170
41171
41172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
41173$as_echo_n "checking whether dup2 works... " >&6; }
41174if ${gl_cv_func_dup2_works+:} false; then :
41175  $as_echo_n "(cached) " >&6
41176else
41177  if test "$cross_compiling" = yes; then :
41178  case "$host_os" in
41179         mingw*) # on this platform, dup2 always returns 0 for success
41180           gl_cv_func_dup2_works="guessing no" ;;
41181         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
41182           gl_cv_func_dup2_works="guessing no" ;;
41183         aix* | freebsd*)
41184                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
41185                 # not EBADF.
41186           gl_cv_func_dup2_works="guessing no" ;;
41187         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
41188           gl_cv_func_dup2_works="guessing no" ;;
41189         *-android*) # implemented using dup3(), which fails if oldfd == newfd
41190           gl_cv_func_dup2_works="guessing no" ;;
41191         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
41192           gl_cv_func_dup2_works="guessing no" ;;
41193         *) gl_cv_func_dup2_works="guessing yes" ;;
41194       esac
41195else
41196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41197/* end confdefs.h.  */
41198
41199       #include <errno.h>
41200           #include <fcntl.h>
41201           #include <limits.h>
41202           #include <sys/resource.h>
41203           #include <unistd.h>
41204           #ifndef RLIM_SAVED_CUR
41205           # define RLIM_SAVED_CUR RLIM_INFINITY
41206           #endif
41207           #ifndef RLIM_SAVED_MAX
41208           # define RLIM_SAVED_MAX RLIM_INFINITY
41209           #endif
41210
41211int
41212main ()
41213{
41214int result = 0;
41215           int bad_fd = INT_MAX;
41216           struct rlimit rlim;
41217           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
41218               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
41219               && rlim.rlim_cur != RLIM_INFINITY
41220               && rlim.rlim_cur != RLIM_SAVED_MAX
41221               && rlim.rlim_cur != RLIM_SAVED_CUR)
41222             bad_fd = rlim.rlim_cur;
41223           #ifdef FD_CLOEXEC
41224             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
41225               result |= 1;
41226           #endif
41227           if (dup2 (1, 1) != 1)
41228             result |= 2;
41229           #ifdef FD_CLOEXEC
41230             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
41231               result |= 4;
41232           #endif
41233           close (0);
41234           if (dup2 (0, 0) != -1)
41235             result |= 8;
41236           /* Many gnulib modules require POSIX conformance of EBADF.  */
41237           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
41238             result |= 16;
41239           /* Flush out some cygwin core dumps.  */
41240           if (dup2 (2, -1) != -1 || errno != EBADF)
41241             result |= 32;
41242           dup2 (2, 255);
41243           dup2 (2, 256);
41244           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
41245           {
41246             int fd = open (".", O_RDONLY);
41247             if (fd == -1)
41248               result |= 64;
41249             else if (dup2 (fd, fd + 1) == -1)
41250               result |= 128;
41251             close (fd);
41252           }
41253           return result;
41254  ;
41255  return 0;
41256}
41257
41258_ACEOF
41259if ac_fn_c_try_run "$LINENO"; then :
41260  gl_cv_func_dup2_works=yes
41261else
41262  gl_cv_func_dup2_works=no
41263fi
41264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41265  conftest.$ac_objext conftest.beam conftest.$ac_ext
41266fi
41267
41268
41269fi
41270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
41271$as_echo "$gl_cv_func_dup2_works" >&6; }
41272  case "$gl_cv_func_dup2_works" in
41273    *yes) ;;
41274    *)
41275      REPLACE_DUP2=1
41276      for ac_func in setdtablesize
41277do :
41278  ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
41279if test "x$ac_cv_func_setdtablesize" = xyes; then :
41280  cat >>confdefs.h <<_ACEOF
41281#define HAVE_SETDTABLESIZE 1
41282_ACEOF
41283
41284fi
41285done
41286
41287      ;;
41288  esac
41289
41290
41291  if test $REPLACE_DUP2 = 1; then
41292
41293
41294
41295
41296
41297
41298
41299
41300  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
41301
41302
41303  fi
41304
41305
41306
41307
41308
41309          GNULIB_DUP2=1
41310
41311
41312
41313
41314
41315$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
41316
41317
41318
41319
41320
41321
41322
41323
41324
41325          GNULIB_ENVIRON=1
41326
41327
41328
41329
41330
41331$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
41332
41333
41334
41335
41336
41337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
41338$as_echo_n "checking for error_at_line... " >&6; }
41339if ${ac_cv_lib_error_at_line+:} false; then :
41340  $as_echo_n "(cached) " >&6
41341else
41342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41343/* end confdefs.h.  */
41344#include <error.h>
41345int
41346main ()
41347{
41348error_at_line (0, 0, "", 0, "an error occurred");
41349  ;
41350  return 0;
41351}
41352_ACEOF
41353if ac_fn_c_try_link "$LINENO"; then :
41354  ac_cv_lib_error_at_line=yes
41355else
41356  ac_cv_lib_error_at_line=no
41357fi
41358rm -f core conftest.err conftest.$ac_objext \
41359    conftest$ac_exeext conftest.$ac_ext
41360fi
41361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
41362$as_echo "$ac_cv_lib_error_at_line" >&6; }
41363
41364  if test $ac_cv_lib_error_at_line = no; then
41365
41366
41367
41368
41369
41370
41371
41372
41373  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
41374
41375
41376
41377  :
41378
41379  fi
41380
41381
41382  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
41383
41384
41385
41386  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
41387
41388
41389
41390
41391
41392
41393
41394
41395
41396
41397  if test $ac_cv_func_explicit_bzero = no; then
41398    HAVE_EXPLICIT_BZERO=0
41399  fi
41400
41401  if test $HAVE_EXPLICIT_BZERO = 0; then
41402
41403
41404
41405
41406
41407
41408
41409
41410  gl_LIBOBJS="$gl_LIBOBJS explicit_bzero.$ac_objext"
41411
41412
41413  for ac_func in explicit_memset
41414do :
41415  ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset"
41416if test "x$ac_cv_func_explicit_memset" = xyes; then :
41417  cat >>confdefs.h <<_ACEOF
41418#define HAVE_EXPLICIT_MEMSET 1
41419_ACEOF
41420
41421fi
41422done
41423
41424
41425
41426  fi
41427
41428
41429
41430
41431
41432          GNULIB_EXPLICIT_BZERO=1
41433
41434
41435
41436
41437
41438$as_echo "#define GNULIB_TEST_EXPLICIT_BZERO 1" >>confdefs.h
41439
41440
41441
41442
41443
41444
41445
41446
41447
41448  FABS_LIBM=
41449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fabs can be used without linking with libm" >&5
41450$as_echo_n "checking whether fabs can be used without linking with libm... " >&6; }
41451if ${gl_cv_func_fabs_no_libm+:} false; then :
41452  $as_echo_n "(cached) " >&6
41453else
41454
41455      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41456/* end confdefs.h.  */
41457#ifndef __NO_MATH_INLINES
41458             # define __NO_MATH_INLINES 1 /* for glibc */
41459             #endif
41460             #include <math.h>
41461
41462             double (* volatile funcptr) (double) = fabs;
41463             int i_ret;
41464             float f_ret;
41465             double d_ret;
41466             long double l_ret;
41467int
41468main ()
41469{
41470double y = funcptr (1.6180339887) + fabs (1.6180339887);
41471
41472             return y < 0.3 || y > 1.7;
41473
41474  ;
41475  return 0;
41476}
41477_ACEOF
41478if ac_fn_c_try_link "$LINENO"; then :
41479  gl_cv_func_fabs_no_libm=yes
41480else
41481  gl_cv_func_fabs_no_libm=no
41482fi
41483rm -f core conftest.err conftest.$ac_objext \
41484    conftest$ac_exeext conftest.$ac_ext
41485
41486fi
41487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fabs_no_libm" >&5
41488$as_echo "$gl_cv_func_fabs_no_libm" >&6; }
41489  if test $gl_cv_func_fabs_no_libm = no; then
41490    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fabs can be used with libm" >&5
41491$as_echo_n "checking whether fabs can be used with libm... " >&6; }
41492if ${gl_cv_func_fabs_in_libm+:} false; then :
41493  $as_echo_n "(cached) " >&6
41494else
41495
41496        save_LIBS="$LIBS"
41497        LIBS="$LIBS -lm"
41498        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41499/* end confdefs.h.  */
41500#ifndef __NO_MATH_INLINES
41501               # define __NO_MATH_INLINES 1 /* for glibc */
41502               #endif
41503               #include <math.h>
41504
41505               double (* volatile funcptr) (double) = fabs;
41506               int i_ret;
41507               float f_ret;
41508               double d_ret;
41509               long double l_ret;
41510int
41511main ()
41512{
41513double y = funcptr (1.6180339887) + fabs (1.6180339887);
41514
41515               return y < 0.3 || y > 1.7;
41516
41517  ;
41518  return 0;
41519}
41520_ACEOF
41521if ac_fn_c_try_link "$LINENO"; then :
41522  gl_cv_func_fabs_in_libm=yes
41523else
41524  gl_cv_func_fabs_in_libm=no
41525fi
41526rm -f core conftest.err conftest.$ac_objext \
41527    conftest$ac_exeext conftest.$ac_ext
41528        LIBS="$save_LIBS"
41529
41530fi
41531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fabs_in_libm" >&5
41532$as_echo "$gl_cv_func_fabs_in_libm" >&6; }
41533    if test $gl_cv_func_fabs_in_libm = yes; then
41534      FABS_LIBM=-lm
41535    fi
41536  fi
41537
41538
41539
41540
41541
41542
41543
41544
41545
41546  :
41547
41548
41549
41550
41551
41552
41553  if test $ac_cv_func_fcntl = no; then
41554
41555
41556
41557  if test $ac_cv_func_fcntl = no; then
41558    HAVE_FCNTL=0
41559  else
41560    REPLACE_FCNTL=1
41561  fi
41562
41563  else
41564            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
41565$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
41566if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
41567  $as_echo_n "(cached) " >&6
41568else
41569  if test "$cross_compiling" = yes; then :
41570  case $host_os in
41571            aix* | cygwin* | haiku*)
41572               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
41573            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
41574          esac
41575else
41576  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41577/* end confdefs.h.  */
41578#include <errno.h>
41579              #include <fcntl.h>
41580              #include <limits.h>
41581              #include <sys/resource.h>
41582              #include <unistd.h>
41583              #ifndef RLIM_SAVED_CUR
41584              # define RLIM_SAVED_CUR RLIM_INFINITY
41585              #endif
41586              #ifndef RLIM_SAVED_MAX
41587              # define RLIM_SAVED_MAX RLIM_INFINITY
41588              #endif
41589
41590int
41591main ()
41592{
41593int result = 0;
41594              int bad_fd = INT_MAX;
41595              struct rlimit rlim;
41596              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
41597                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
41598                  && rlim.rlim_cur != RLIM_INFINITY
41599                  && rlim.rlim_cur != RLIM_SAVED_MAX
41600                  && rlim.rlim_cur != RLIM_SAVED_CUR)
41601                bad_fd = rlim.rlim_cur;
41602              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
41603              if (errno != EINVAL) result |= 2;
41604              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
41605              if (errno != EINVAL) result |= 8;
41606              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
41607              {
41608                int fd;
41609                fd = open (".", O_RDONLY);
41610                if (fd == -1)
41611                  result |= 16;
41612                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
41613                  result |= 32;
41614
41615                close (fd);
41616              }
41617              return result;
41618  ;
41619  return 0;
41620}
41621_ACEOF
41622if ac_fn_c_try_run "$LINENO"; then :
41623  gl_cv_func_fcntl_f_dupfd_works=yes
41624else
41625  gl_cv_func_fcntl_f_dupfd_works=no
41626fi
41627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41628  conftest.$ac_objext conftest.beam conftest.$ac_ext
41629fi
41630
41631fi
41632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
41633$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
41634    case $gl_cv_func_fcntl_f_dupfd_works in
41635      *yes) ;;
41636      *)
41637
41638
41639  if test $ac_cv_func_fcntl = no; then
41640    HAVE_FCNTL=0
41641  else
41642    REPLACE_FCNTL=1
41643  fi
41644
41645
41646$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
41647 ;;
41648    esac
41649
41650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
41651$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
41652if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
41653  $as_echo_n "(cached) " >&6
41654else
41655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41656/* end confdefs.h.  */
41657
41658#include <fcntl.h>
41659#ifndef F_DUPFD_CLOEXEC
41660choke me
41661#endif
41662
41663int
41664main ()
41665{
41666
41667  ;
41668  return 0;
41669}
41670_ACEOF
41671if ac_fn_c_try_compile "$LINENO"; then :
41672  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41673/* end confdefs.h.  */
41674
41675#ifdef __linux__
41676/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
41677   it to support the semantics on older kernels that failed with EINVAL.  */
41678choke me
41679#endif
41680
41681int
41682main ()
41683{
41684
41685  ;
41686  return 0;
41687}
41688_ACEOF
41689if ac_fn_c_try_compile "$LINENO"; then :
41690  gl_cv_func_fcntl_f_dupfd_cloexec=yes
41691else
41692  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
41693fi
41694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41695else
41696  gl_cv_func_fcntl_f_dupfd_cloexec=no
41697fi
41698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41699fi
41700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
41701$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
41702    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
41703
41704
41705
41706  if test $ac_cv_func_fcntl = no; then
41707    HAVE_FCNTL=0
41708  else
41709    REPLACE_FCNTL=1
41710  fi
41711
41712          fi
41713  fi
41714
41715
41716  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
41717
41718
41719
41720
41721
41722
41723
41724
41725  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
41726
41727  fi
41728
41729
41730
41731
41732
41733          GNULIB_FCNTL=1
41734
41735
41736
41737
41738
41739$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
41740
41741
41742
41743
41744
41745
41746
41747
41748
41749
41750
41751
41752
41753
41754     if test $gl_cv_have_include_next = yes; then
41755       gl_cv_next_fcntl_h='<'fcntl.h'>'
41756     else
41757       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
41758$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
41759if ${gl_cv_next_fcntl_h+:} false; then :
41760  $as_echo_n "(cached) " >&6
41761else
41762
41763
41764
41765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41766/* end confdefs.h.  */
41767#include <fcntl.h>
41768_ACEOF
41769                case "$host_os" in
41770    aix*) gl_absname_cpp="$ac_cpp -C" ;;
41771    *)    gl_absname_cpp="$ac_cpp" ;;
41772  esac
41773
41774  case "$host_os" in
41775    mingw*)
41776                                          gl_dirsep_regex='[/\\]'
41777      ;;
41778    *)
41779      gl_dirsep_regex='\/'
41780      ;;
41781  esac
41782      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
41783  gl_header_literal_regex=`echo 'fcntl.h' \
41784                           | sed -e "$gl_make_literal_regex_sed"`
41785  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
41786      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
41787      s|^/[^/]|//&|
41788      p
41789      q
41790    }'
41791
41792        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
41793  sed -n "$gl_absolute_header_sed"`
41794
41795           gl_header=$gl_cv_absolute_fcntl_h
41796           gl_cv_next_fcntl_h='"'$gl_header'"'
41797
41798
41799fi
41800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
41801$as_echo "$gl_cv_next_fcntl_h" >&6; }
41802     fi
41803     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
41804
41805     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
41806       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
41807       gl_next_as_first_directive='<'fcntl.h'>'
41808     else
41809       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
41810       gl_next_as_first_directive=$gl_cv_next_fcntl_h
41811     fi
41812     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
41813
41814
41815
41816
41817
41818
41819
41820
41821
41822
41823
41824
41825
41826
41827
41828cat >>confdefs.h <<_ACEOF
41829#define GNULIB_FD_SAFER_FLAG 1
41830_ACEOF
41831
41832
41833
41834
41835
41836
41837    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
41838      REPLACE_FDOPEN=1
41839    fi
41840
41841  if test $REPLACE_FDOPEN = 0; then
41842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
41843$as_echo_n "checking whether fdopen sets errno... " >&6; }
41844if ${gl_cv_func_fdopen_works+:} false; then :
41845  $as_echo_n "(cached) " >&6
41846else
41847
41848        if test "$cross_compiling" = yes; then :
41849  case "$host_os" in
41850             mingw*) gl_cv_func_fdopen_works="guessing no" ;;
41851             *)      gl_cv_func_fdopen_works="guessing yes" ;;
41852           esac
41853
41854else
41855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41856/* end confdefs.h.  */
41857
41858#include <stdio.h>
41859#include <errno.h>
41860int
41861main (void)
41862{
41863  FILE *fp;
41864  errno = 0;
41865  fp = fdopen (-1, "r");
41866  if (fp == NULL && errno == 0)
41867    return 1;
41868  return 0;
41869}
41870_ACEOF
41871if ac_fn_c_try_run "$LINENO"; then :
41872  gl_cv_func_fdopen_works=yes
41873else
41874  gl_cv_func_fdopen_works=no
41875fi
41876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41877  conftest.$ac_objext conftest.beam conftest.$ac_ext
41878fi
41879
41880
41881fi
41882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
41883$as_echo "$gl_cv_func_fdopen_works" >&6; }
41884    case "$gl_cv_func_fdopen_works" in
41885      *no) REPLACE_FDOPEN=1 ;;
41886    esac
41887  fi
41888
41889  if test $REPLACE_FDOPEN = 1; then
41890
41891
41892
41893
41894
41895
41896
41897
41898  gl_LIBOBJS="$gl_LIBOBJS fdopen.$ac_objext"
41899
41900
41901  fi
41902
41903
41904
41905
41906
41907          GNULIB_FDOPEN=1
41908
41909
41910
41911
41912
41913$as_echo "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
41914
41915
41916
41917
41918
41919
41920
41921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
41922$as_echo_n "checking for flexible array member... " >&6; }
41923if ${ac_cv_c_flexmember+:} false; then :
41924  $as_echo_n "(cached) " >&6
41925else
41926  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41927/* end confdefs.h.  */
41928#include <stdlib.h>
41929            #include <stdio.h>
41930            #include <stddef.h>
41931            struct m { struct m *next, **list; char name[]; };
41932            struct s { struct s *p; struct m *m; int n; double d[]; };
41933int
41934main ()
41935{
41936int m = getchar ();
41937            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
41938            nbytes += sizeof (struct s) - 1;
41939            nbytes -= nbytes % sizeof (struct s);
41940            struct s *p = malloc (nbytes);
41941            p->p = p;
41942            p->m = NULL;
41943            p->d[0] = 0.0;
41944            return p->d != (double *) NULL;
41945  ;
41946  return 0;
41947}
41948_ACEOF
41949if ac_fn_c_try_compile "$LINENO"; then :
41950  ac_cv_c_flexmember=yes
41951else
41952  ac_cv_c_flexmember=no
41953fi
41954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41955fi
41956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
41957$as_echo "$ac_cv_c_flexmember" >&6; }
41958  if test $ac_cv_c_flexmember = yes; then
41959
41960$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
41961
41962  else
41963    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
41964
41965  fi
41966
41967
41968
41969
41970  FLOAT_H=
41971  REPLACE_FLOAT_LDBL=0
41972  case "$host_os" in
41973    aix* | beos* | openbsd* | mirbsd* | irix*)
41974      FLOAT_H=float.h
41975      ;;
41976    freebsd* | dragonfly*)
41977      case "$host_cpu" in
41978        i[34567]86 )
41979          FLOAT_H=float.h
41980          ;;
41981        x86_64 )
41982          # On x86_64 systems, the C compiler may still be generating
41983          # 32-bit code.
41984          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41985/* end confdefs.h.  */
41986#if defined __LP64__ || defined __x86_64__ || defined __amd64__
41987                  int ok;
41988                 #else
41989                  error fail
41990                 #endif
41991
41992_ACEOF
41993if ac_fn_c_try_compile "$LINENO"; then :
41994
41995else
41996  FLOAT_H=float.h
41997fi
41998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41999          ;;
42000      esac
42001      ;;
42002    linux*)
42003      case "$host_cpu" in
42004        powerpc*)
42005          FLOAT_H=float.h
42006          ;;
42007      esac
42008      ;;
42009  esac
42010  case "$host_os" in
42011    aix* | freebsd* | dragonfly* | linux*)
42012      if test -n "$FLOAT_H"; then
42013        REPLACE_FLOAT_LDBL=1
42014      fi
42015      ;;
42016  esac
42017
42018    REPLACE_ITOLD=0
42019  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
42020$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
42021if ${gl_cv_func_itold_works+:} false; then :
42022  $as_echo_n "(cached) " >&6
42023else
42024
42025      if test "$cross_compiling" = yes; then :
42026  case "$host" in
42027           sparc*-*-linux*)
42028             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42029/* end confdefs.h.  */
42030#if defined __LP64__ || defined __arch64__
42031                    int ok;
42032                   #else
42033                    error fail
42034                   #endif
42035
42036_ACEOF
42037if ac_fn_c_try_compile "$LINENO"; then :
42038  gl_cv_func_itold_works="guessing no"
42039else
42040  gl_cv_func_itold_works="guessing yes"
42041fi
42042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42043             ;;
42044                   # Guess yes on native Windows.
42045           mingw*) gl_cv_func_itold_works="guessing yes" ;;
42046           *)      gl_cv_func_itold_works="guessing yes" ;;
42047         esac
42048
42049else
42050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42051/* end confdefs.h.  */
42052
42053int i = -1;
42054volatile long double ld;
42055int main ()
42056{
42057  ld += i * 1.0L;
42058  if (ld > 0)
42059    return 1;
42060  return 0;
42061}
42062_ACEOF
42063if ac_fn_c_try_run "$LINENO"; then :
42064  gl_cv_func_itold_works=yes
42065else
42066  gl_cv_func_itold_works=no
42067fi
42068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42069  conftest.$ac_objext conftest.beam conftest.$ac_ext
42070fi
42071
42072
42073fi
42074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
42075$as_echo "$gl_cv_func_itold_works" >&6; }
42076  case "$gl_cv_func_itold_works" in
42077    *no)
42078      REPLACE_ITOLD=1
42079                  FLOAT_H=float.h
42080      ;;
42081  esac
42082
42083  if test -n "$FLOAT_H"; then
42084
42085
42086
42087
42088
42089
42090
42091
42092     if test $gl_cv_have_include_next = yes; then
42093       gl_cv_next_float_h='<'float.h'>'
42094     else
42095       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
42096$as_echo_n "checking absolute name of <float.h>... " >&6; }
42097if ${gl_cv_next_float_h+:} false; then :
42098  $as_echo_n "(cached) " >&6
42099else
42100
42101
42102
42103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42104/* end confdefs.h.  */
42105#include <float.h>
42106_ACEOF
42107                case "$host_os" in
42108    aix*) gl_absname_cpp="$ac_cpp -C" ;;
42109    *)    gl_absname_cpp="$ac_cpp" ;;
42110  esac
42111
42112  case "$host_os" in
42113    mingw*)
42114                                          gl_dirsep_regex='[/\\]'
42115      ;;
42116    *)
42117      gl_dirsep_regex='\/'
42118      ;;
42119  esac
42120      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
42121  gl_header_literal_regex=`echo 'float.h' \
42122                           | sed -e "$gl_make_literal_regex_sed"`
42123  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
42124      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
42125      s|^/[^/]|//&|
42126      p
42127      q
42128    }'
42129
42130        gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42131  sed -n "$gl_absolute_header_sed"`
42132
42133           gl_header=$gl_cv_absolute_float_h
42134           gl_cv_next_float_h='"'$gl_header'"'
42135
42136
42137fi
42138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
42139$as_echo "$gl_cv_next_float_h" >&6; }
42140     fi
42141     NEXT_FLOAT_H=$gl_cv_next_float_h
42142
42143     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
42144       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
42145       gl_next_as_first_directive='<'float.h'>'
42146     else
42147       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
42148       gl_next_as_first_directive=$gl_cv_next_float_h
42149     fi
42150     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
42151
42152
42153
42154
42155  fi
42156
42157   if test -n "$FLOAT_H"; then
42158  GL_GENERATE_FLOAT_H_TRUE=
42159  GL_GENERATE_FLOAT_H_FALSE='#'
42160else
42161  GL_GENERATE_FLOAT_H_TRUE='#'
42162  GL_GENERATE_FLOAT_H_FALSE=
42163fi
42164
42165
42166
42167  if test $REPLACE_FLOAT_LDBL = 1; then
42168
42169
42170
42171
42172
42173
42174
42175
42176  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
42177
42178  fi
42179  if test $REPLACE_ITOLD = 1; then
42180
42181
42182
42183
42184
42185
42186
42187
42188  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
42189
42190  fi
42191
42192
42193
42194
42195     gl_fnmatch_required_lowercase=`
42196    echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
42197  `
42198
42199  if test $ac_cv_func_fnmatch = no; then
42200    HAVE_FNMATCH=0
42201  else
42202    gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
42203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
42204$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
42205if eval \${$gl_fnmatch_cache_var+:} false; then :
42206  $as_echo_n "(cached) " >&6
42207else
42208                                     if test $gl_fnmatch_required = GNU; then
42209         gl_fnmatch_gnu_start=
42210         gl_fnmatch_gnu_end=
42211       else
42212         gl_fnmatch_gnu_start='#if 0'
42213         gl_fnmatch_gnu_end='#endif'
42214       fi
42215       if test "$cross_compiling" = yes; then :
42216  case "$host_os" in
42217                     # Guess yes on musl systems.
42218            *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
42219                     # Guess no otherwise, even on glibc systems.
42220            *)       eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
42221          esac
42222
42223else
42224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42225/* end confdefs.h.  */
42226#include <fnmatch.h>
42227              static int
42228              y (char const *pattern, char const *string, int flags)
42229              {
42230                return fnmatch (pattern, string, flags) == 0;
42231              }
42232              static int
42233              n (char const *pattern, char const *string, int flags)
42234              {
42235                return fnmatch (pattern, string, flags) == FNM_NOMATCH;
42236              }
42237
42238int
42239main ()
42240{
42241char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
42242              char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
42243              static char const A_1[] = { 'A' - 1, 0 };
42244              static char const A01[] = { 'A' + 1, 0 };
42245              static char const a_1[] = { 'a' - 1, 0 };
42246              static char const a01[] = { 'a' + 1, 0 };
42247              static char const bs_1[] = { '\\\\' - 1, 0 };
42248              static char const bs01[] = { '\\\\' + 1, 0 };
42249              int result = 0;
42250              if (!n ("a*", "", 0))
42251                return 1;
42252              if (!y ("a*", "abc", 0))
42253                return 1;
42254              if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
42255                return 1;
42256              if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
42257                return 2;
42258              if (!y ("a\\\\bc", "abc", 0))
42259                return 3;
42260              if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
42261                return 3;
42262              if (!y ("*x", ".x", 0))
42263                return 4;
42264              if (!n ("*x", ".x", FNM_PERIOD))
42265                return 4;
42266              if (!y (Apat, "\\\\", 0))
42267                return 5;
42268              if (!y (Apat, "A", 0))
42269                return 5;
42270              if (!y (apat, "\\\\", 0))
42271                return 5;
42272              if (!y (apat, "a", 0))
42273                return 5;
42274              if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
42275                return 5;
42276              if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
42277                return 5;
42278              if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
42279                return 5;
42280              if (!(y (apat, a01, 0) == ('a' < '\\\\')))
42281                return 5;
42282              if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
42283                return 5;
42284              if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
42285                return 5;
42286              if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
42287                return 5;
42288              if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
42289                return 5;
42290              $gl_fnmatch_gnu_start
42291              if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
42292                result |= 8;
42293              if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
42294                result |= 16;
42295              if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
42296                result |= 32;
42297              if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
42298                result |= 64;
42299              if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
42300                result |= 64;
42301              if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
42302                result |= 64;
42303              $gl_fnmatch_gnu_end
42304              return result;
42305
42306  ;
42307  return 0;
42308}
42309_ACEOF
42310if ac_fn_c_try_run "$LINENO"; then :
42311  eval "$gl_fnmatch_cache_var=yes"
42312else
42313  eval "$gl_fnmatch_cache_var=no"
42314fi
42315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42316  conftest.$ac_objext conftest.beam conftest.$ac_ext
42317fi
42318
42319
42320fi
42321eval ac_res=\$$gl_fnmatch_cache_var
42322	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
42323$as_echo "$ac_res" >&6; }
42324    eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
42325    case "$gl_fnmatch_result" in
42326      *yes) ;;
42327      *) REPLACE_FNMATCH=1 ;;
42328    esac
42329  fi
42330  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
42331
42332
42333  FNMATCH_H='fnmatch.h'
42334   if test -n "$FNMATCH_H"; then
42335  GL_GENERATE_FNMATCH_H_TRUE=
42336  GL_GENERATE_FNMATCH_H_FALSE='#'
42337else
42338  GL_GENERATE_FNMATCH_H_TRUE='#'
42339  GL_GENERATE_FNMATCH_H_FALSE=
42340fi
42341
42342
42343  fi
42344
42345  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
42346
42347
42348
42349
42350
42351
42352
42353
42354  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
42355
42356
42357
42358
42359
42360  fi
42361
42362
42363
42364
42365
42366          GNULIB_FNMATCH=1
42367
42368
42369
42370
42371
42372$as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
42373
42374
42375
42376
42377
42378
42379
42380  case "$host_os" in
42381    mingw* | pw*)
42382            REPLACE_FOPEN=1
42383            gl_cv_func_fopen_slash="guessing no"
42384      ;;
42385    *)
42386                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
42387$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
42388if ${gl_cv_func_fopen_slash+:} false; then :
42389  $as_echo_n "(cached) " >&6
42390else
42391
42392          if test "$cross_compiling" = yes; then :
42393
42394             case "$host_os" in
42395               aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
42396                 gl_cv_func_fopen_slash="guessing no" ;;
42397               *)
42398                 gl_cv_func_fopen_slash="guessing yes" ;;
42399             esac
42400
42401else
42402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42403/* end confdefs.h.  */
42404
42405#include <stddef.h>
42406#include <stdio.h>
42407int main ()
42408{
42409  FILE *fp = fopen ("conftest.sl/", "w");
42410  int result = (fp != NULL);
42411  if (fp != NULL)
42412    fclose (fp);
42413  return result;
42414}
42415_ACEOF
42416if ac_fn_c_try_run "$LINENO"; then :
42417  gl_cv_func_fopen_slash=yes
42418else
42419  gl_cv_func_fopen_slash=no
42420fi
42421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42422  conftest.$ac_objext conftest.beam conftest.$ac_ext
42423fi
42424
42425          rm -f conftest.sl
42426
42427fi
42428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
42429$as_echo "$gl_cv_func_fopen_slash" >&6; }
42430      ;;
42431  esac
42432  case "$gl_cv_func_fopen_slash" in
42433    *no)
42434
42435$as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
42436
42437      REPLACE_FOPEN=1
42438      ;;
42439  esac
42440
42441  if test $REPLACE_FOPEN = 1; then
42442
42443
42444
42445
42446
42447
42448
42449
42450  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
42451
42452    :
42453  fi
42454
42455
42456
42457
42458
42459          GNULIB_FOPEN=1
42460
42461
42462
42463
42464
42465$as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
42466
42467
42468
42469
42470
42471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
42472$as_echo_n "checking whether fopen supports the mode character 'x'... " >&6; }
42473if ${gl_cv_func_fopen_mode_x+:} false; then :
42474  $as_echo_n "(cached) " >&6
42475else
42476  rm -f conftest.x
42477     if test "$cross_compiling" = yes; then :
42478  case "$host_os" in
42479          # Guess yes on glibc and musl systems.
42480          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
42481            gl_cv_func_fopen_mode_x="guessing yes" ;;
42482          # If we don't know, obey --enable-cross-guesses.
42483          *)
42484            gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
42485        esac
42486
42487else
42488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42489/* end confdefs.h.  */
42490
42491#include <stdio.h>
42492#include <errno.h>
42493int main ()
42494{
42495  FILE *fp;
42496  fp = fopen ("conftest.x", "w");
42497  fclose (fp);
42498  fp = fopen ("conftest.x", "wx");
42499  if (fp != NULL)
42500    /* 'x' ignored */
42501    return 1;
42502  else if (errno == EEXIST)
42503    return 0;
42504  else
42505    /* 'x' rejected */
42506    return 2;
42507}
42508_ACEOF
42509if ac_fn_c_try_run "$LINENO"; then :
42510  gl_cv_func_fopen_mode_x=yes
42511else
42512  gl_cv_func_fopen_mode_x=no
42513fi
42514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42515  conftest.$ac_objext conftest.beam conftest.$ac_ext
42516fi
42517
42518     rm -f conftest.x
42519
42520fi
42521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
42522$as_echo "$gl_cv_func_fopen_mode_x" >&6; }
42523  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
42524$as_echo_n "checking whether fopen supports the mode character 'e'... " >&6; }
42525if ${gl_cv_func_fopen_mode_e+:} false; then :
42526  $as_echo_n "(cached) " >&6
42527else
42528  echo foo > conftest.x
42529     if test "$cross_compiling" = yes; then :
42530  case "$host_os" in
42531          # Guess yes on glibc and musl systems.
42532          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
42533            gl_cv_func_fopen_mode_e="guessing yes" ;;
42534          # Guess no on native Windows.
42535          mingw*)
42536            gl_cv_func_fopen_mode_e="guessing no" ;;
42537          # If we don't know, obey --enable-cross-guesses.
42538          *)
42539            gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
42540        esac
42541
42542else
42543  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42544/* end confdefs.h.  */
42545
42546#include <stdio.h>
42547#include <errno.h>
42548#include <fcntl.h>
42549int main ()
42550{
42551  FILE *fp = fopen ("conftest.x", "re");
42552  if (fp != NULL)
42553    {
42554      if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
42555        return 0;
42556      else
42557        /* 'e' ignored */
42558        return 1;
42559    }
42560  else
42561    /* 'e' rejected */
42562    return 2;
42563}
42564_ACEOF
42565if ac_fn_c_try_run "$LINENO"; then :
42566  gl_cv_func_fopen_mode_e=yes
42567else
42568  gl_cv_func_fopen_mode_e=no
42569fi
42570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42571  conftest.$ac_objext conftest.beam conftest.$ac_ext
42572fi
42573
42574     rm -f conftest.x
42575
42576fi
42577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
42578$as_echo "$gl_cv_func_fopen_mode_e" >&6; }
42579  case "$gl_cv_func_fopen_mode_x" in
42580    *no) REPLACE_FOPEN=1 ;;
42581  esac
42582  case "$gl_cv_func_fopen_mode_e" in
42583    *no) REPLACE_FOPEN=1 ;;
42584  esac
42585
42586  if test $REPLACE_FOPEN = 1; then
42587
42588
42589
42590
42591
42592
42593
42594
42595  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
42596
42597    :
42598  fi
42599
42600
42601cat >>confdefs.h <<_ACEOF
42602#define GNULIB_FOPEN_GNU 1
42603_ACEOF
42604
42605
42606
42607
42608
42609
42610  case "$host_os" in
42611    mingw* | solaris*)
42612                        REPLACE_FSTAT=1
42613      ;;
42614  esac
42615
42616
42617
42618  if test $REPLACE_FSTAT = 1; then
42619
42620
42621
42622
42623
42624
42625
42626
42627  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
42628
42629    case "$host_os" in
42630      mingw*)
42631
42632
42633
42634
42635
42636
42637
42638
42639  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
42640
42641        ;;
42642    esac
42643
42644
42645  :
42646
42647  fi
42648
42649
42650
42651
42652
42653          GNULIB_FSTAT=1
42654
42655
42656
42657
42658
42659$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
42660
42661
42662
42663
42664
42665
42666    if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
42667    REPLACE_FTELL=1
42668  fi
42669
42670  if test $REPLACE_FTELL = 1; then
42671
42672
42673
42674
42675
42676
42677
42678
42679  gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
42680
42681  fi
42682
42683
42684
42685
42686
42687          GNULIB_FTELL=1
42688
42689
42690
42691
42692
42693$as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
42694
42695
42696
42697
42698
42699
42700
42701
42702
42703
42704
42705
42706  if test $ac_cv_have_decl_ftello = no; then
42707    HAVE_DECL_FTELLO=0
42708  fi
42709
42710  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
42711$as_echo_n "checking for ftello... " >&6; }
42712if ${gl_cv_func_ftello+:} false; then :
42713  $as_echo_n "(cached) " >&6
42714else
42715
42716      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42717/* end confdefs.h.  */
42718#include <stdio.h>
42719int
42720main ()
42721{
42722ftello (stdin);
42723  ;
42724  return 0;
42725}
42726_ACEOF
42727if ac_fn_c_try_link "$LINENO"; then :
42728  gl_cv_func_ftello=yes
42729else
42730  gl_cv_func_ftello=no
42731fi
42732rm -f core conftest.err conftest.$ac_objext \
42733    conftest$ac_exeext conftest.$ac_ext
42734
42735fi
42736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
42737$as_echo "$gl_cv_func_ftello" >&6; }
42738  if test $gl_cv_func_ftello = no; then
42739    HAVE_FTELLO=0
42740  else
42741    if test $WINDOWS_64_BIT_OFF_T = 1; then
42742      REPLACE_FTELLO=1
42743    fi
42744    if test $gl_cv_var_stdin_large_offset = no; then
42745      REPLACE_FTELLO=1
42746    fi
42747    if test $REPLACE_FTELLO = 0; then
42748
42749      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
42750$as_echo_n "checking whether ftello works... " >&6; }
42751if ${gl_cv_func_ftello_works+:} false; then :
42752  $as_echo_n "(cached) " >&6
42753else
42754
42755                              case "$host_os" in
42756                      # Guess no on Solaris.
42757            solaris*) gl_cv_func_ftello_works="guessing no" ;;
42758                      # Guess yes on native Windows.
42759            mingw*)   gl_cv_func_ftello_works="guessing yes" ;;
42760                      # Guess yes otherwise.
42761            *)        gl_cv_func_ftello_works="guessing yes" ;;
42762          esac
42763          if test "$cross_compiling" = yes; then :
42764  :
42765else
42766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42767/* end confdefs.h.  */
42768
42769#include <stdio.h>
42770#include <stdlib.h>
42771#include <string.h>
42772#define TESTFILE "conftest.tmp"
42773int
42774main (void)
42775{
42776  FILE *fp;
42777
42778  /* Create a file with some contents.  */
42779  fp = fopen (TESTFILE, "w");
42780  if (fp == NULL)
42781    return 70;
42782  if (fwrite ("foogarsh", 1, 8, fp) < 8)
42783    { fclose (fp); return 71; }
42784  if (fclose (fp))
42785    return 72;
42786
42787  /* The file's contents is now "foogarsh".  */
42788
42789  /* Try writing after reading to EOF.  */
42790  fp = fopen (TESTFILE, "r+");
42791  if (fp == NULL)
42792    return 73;
42793  if (fseek (fp, -1, SEEK_END))
42794    { fclose (fp); return 74; }
42795  if (!(getc (fp) == 'h'))
42796    { fclose (fp); return 1; }
42797  if (!(getc (fp) == EOF))
42798    { fclose (fp); return 2; }
42799  if (!(ftell (fp) == 8))
42800    { fclose (fp); return 3; }
42801  if (!(ftell (fp) == 8))
42802    { fclose (fp); return 4; }
42803  if (!(putc ('!', fp) == '!'))
42804    { fclose (fp); return 5; }
42805  if (!(ftell (fp) == 9))
42806    { fclose (fp); return 6; }
42807  if (!(fclose (fp) == 0))
42808    return 7;
42809  fp = fopen (TESTFILE, "r");
42810  if (fp == NULL)
42811    return 75;
42812  {
42813    char buf[10];
42814    if (!(fread (buf, 1, 10, fp) == 9))
42815      { fclose (fp); return 10; }
42816    if (!(memcmp (buf, "foogarsh!", 9) == 0))
42817      { fclose (fp); return 11; }
42818  }
42819  if (!(fclose (fp) == 0))
42820    return 12;
42821
42822  /* The file's contents is now "foogarsh!".  */
42823
42824  return 0;
42825}
42826_ACEOF
42827if ac_fn_c_try_run "$LINENO"; then :
42828  gl_cv_func_ftello_works=yes
42829else
42830  gl_cv_func_ftello_works=no
42831fi
42832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42833  conftest.$ac_objext conftest.beam conftest.$ac_ext
42834fi
42835
42836
42837fi
42838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
42839$as_echo "$gl_cv_func_ftello_works" >&6; }
42840      case "$gl_cv_func_ftello_works" in
42841        *yes) ;;
42842        *)
42843          REPLACE_FTELLO=1
42844
42845$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
42846
42847          ;;
42848      esac
42849    fi
42850  fi
42851
42852  if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
42853
42854
42855
42856
42857
42858
42859
42860
42861  gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
42862
42863
42864      for ac_func in _ftelli64
42865do :
42866  ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
42867if test "x$ac_cv_func__ftelli64" = xyes; then :
42868  cat >>confdefs.h <<_ACEOF
42869#define HAVE__FTELLI64 1
42870_ACEOF
42871
42872fi
42873done
42874
42875
42876  fi
42877
42878
42879
42880
42881
42882          GNULIB_FTELLO=1
42883
42884
42885
42886
42887
42888$as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
42889
42890
42891
42892
42893
42894cat >>confdefs.h <<_ACEOF
42895#define GNULIB_FWRITEERROR 1
42896_ACEOF
42897
42898
42899
42900
42901
42902
42903
42904
42905
42906
42907  if test $ac_cv_func_getdelim = yes; then
42908    HAVE_GETDELIM=1
42909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
42910$as_echo_n "checking for working getdelim function... " >&6; }
42911if ${gl_cv_func_working_getdelim+:} false; then :
42912  $as_echo_n "(cached) " >&6
42913else
42914  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
42915       if test "$cross_compiling" = yes; then :
42916                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42917/* end confdefs.h.  */
42918
42919#include <features.h>
42920#ifdef __GNU_LIBRARY__
42921 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
42922  Lucky GNU user
42923 #endif
42924#endif
42925
42926_ACEOF
42927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42928  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
42929  gl_cv_func_working_getdelim="guessing yes"
42930else
42931  case "$host_os" in
42932               *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
42933               *)       gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
42934             esac
42935
42936fi
42937rm -f conftest*
42938
42939
42940else
42941  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42942/* end confdefs.h.  */
42943
42944#    include <stdio.h>
42945#    include <stdlib.h>
42946#    include <string.h>
42947    int main ()
42948    {
42949      FILE *in = fopen ("./conftest.data", "r");
42950      if (!in)
42951        return 1;
42952      {
42953        /* Test result for a NULL buffer and a zero size.
42954           Based on a test program from Karl Heuer.  */
42955        char *line = NULL;
42956        size_t siz = 0;
42957        int len = getdelim (&line, &siz, '\n', in);
42958        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
42959          { free (line); fclose (in); return 2; }
42960        free (line);
42961      }
42962      {
42963        /* Test result for a NULL buffer and a non-zero size.
42964           This crashes on FreeBSD 8.0.  */
42965        char *line = NULL;
42966        size_t siz = (size_t)(~0) / 4;
42967        if (getdelim (&line, &siz, '\n', in) == -1)
42968          { fclose (in); return 3; }
42969        free (line);
42970      }
42971      fclose (in);
42972      return 0;
42973    }
42974
42975_ACEOF
42976if ac_fn_c_try_run "$LINENO"; then :
42977  gl_cv_func_working_getdelim=yes
42978else
42979  gl_cv_func_working_getdelim=no
42980fi
42981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42982  conftest.$ac_objext conftest.beam conftest.$ac_ext
42983fi
42984
42985
42986fi
42987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
42988$as_echo "$gl_cv_func_working_getdelim" >&6; }
42989    case "$gl_cv_func_working_getdelim" in
42990      *yes) ;;
42991      *) REPLACE_GETDELIM=1 ;;
42992    esac
42993  else
42994    HAVE_GETDELIM=0
42995  fi
42996
42997  if test $ac_cv_have_decl_getdelim = no; then
42998    HAVE_DECL_GETDELIM=0
42999  fi
43000
43001  if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
43002
43003
43004
43005
43006
43007
43008
43009
43010  gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
43011
43012
43013  for ac_func in flockfile funlockfile
43014do :
43015  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
43016ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
43017if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
43018  cat >>confdefs.h <<_ACEOF
43019#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
43020_ACEOF
43021
43022fi
43023done
43024
43025  ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
43026if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
43027  ac_have_decl=1
43028else
43029  ac_have_decl=0
43030fi
43031
43032cat >>confdefs.h <<_ACEOF
43033#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
43034_ACEOF
43035
43036
43037  fi
43038
43039
43040
43041
43042
43043          GNULIB_GETDELIM=1
43044
43045
43046
43047
43048
43049$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
43050
43051
43052
43053
43054
43055
43056
43057
43058  if test $ac_cv_func_getdtablesize = yes &&
43059     test $ac_cv_have_decl_getdtablesize = yes; then
43060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
43061$as_echo_n "checking whether getdtablesize works... " >&6; }
43062if ${gl_cv_func_getdtablesize_works+:} false; then :
43063  $as_echo_n "(cached) " >&6
43064else
43065                                                   case "$host_os" in
43066         vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
43067         *)
43068                                                       if test "$cross_compiling" = yes; then :
43069  case "$host_os" in
43070                cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
43071                  gl_cv_func_getdtablesize_works="guessing no" ;;
43072                *) gl_cv_func_getdtablesize_works="guessing yes" ;;
43073              esac
43074
43075else
43076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43077/* end confdefs.h.  */
43078
43079             #include <unistd.h>
43080int
43081main ()
43082{
43083int size = getdtablesize();
43084                if (dup2 (0, getdtablesize()) != -1)
43085                  return 1;
43086                if (size != getdtablesize())
43087                  return 2;
43088
43089  ;
43090  return 0;
43091}
43092_ACEOF
43093if ac_fn_c_try_run "$LINENO"; then :
43094  gl_cv_func_getdtablesize_works=yes
43095else
43096  gl_cv_func_getdtablesize_works=no
43097fi
43098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43099  conftest.$ac_objext conftest.beam conftest.$ac_ext
43100fi
43101
43102           ;;
43103       esac
43104
43105fi
43106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
43107$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
43108    case "$gl_cv_func_getdtablesize_works" in
43109      *yes | "no (limitation)") ;;
43110      *) REPLACE_GETDTABLESIZE=1 ;;
43111    esac
43112  else
43113    HAVE_GETDTABLESIZE=0
43114  fi
43115
43116  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
43117
43118
43119
43120
43121
43122
43123
43124
43125  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
43126
43127    :
43128  fi
43129
43130
43131
43132
43133
43134          GNULIB_GETDTABLESIZE=1
43135
43136
43137
43138
43139
43140$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
43141
43142
43143
43144
43145
43146
43147
43148
43149
43150
43151  gl_getline_needs_run_time_check=no
43152  ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
43153if test "x$ac_cv_func_getline" = xyes; then :
43154                   gl_getline_needs_run_time_check=yes
43155else
43156  am_cv_func_working_getline=no
43157fi
43158
43159  if test $gl_getline_needs_run_time_check = yes; then
43160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
43161$as_echo_n "checking for working getline function... " >&6; }
43162if ${am_cv_func_working_getline+:} false; then :
43163  $as_echo_n "(cached) " >&6
43164else
43165  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
43166       if test "$cross_compiling" = yes; then :
43167                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43168/* end confdefs.h.  */
43169
43170#include <features.h>
43171#ifdef __GNU_LIBRARY__
43172 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
43173  Lucky GNU user
43174 #endif
43175#endif
43176
43177_ACEOF
43178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43179  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
43180  am_cv_func_working_getline="guessing yes"
43181else
43182  case "$host_os" in
43183               *-musl*) am_cv_func_working_getline="guessing yes" ;;
43184               *)       am_cv_func_working_getline="$gl_cross_guess_normal" ;;
43185             esac
43186
43187fi
43188rm -f conftest*
43189
43190
43191else
43192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43193/* end confdefs.h.  */
43194
43195#    include <stdio.h>
43196#    include <stdlib.h>
43197#    include <string.h>
43198    int main ()
43199    {
43200      FILE *in = fopen ("./conftest.data", "r");
43201      if (!in)
43202        return 1;
43203      {
43204        /* Test result for a NULL buffer and a zero size.
43205           Based on a test program from Karl Heuer.  */
43206        char *line = NULL;
43207        size_t siz = 0;
43208        int len = getline (&line, &siz, in);
43209        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
43210          { free (line); fclose (in); return 2; }
43211        free (line);
43212      }
43213      {
43214        /* Test result for a NULL buffer and a non-zero size.
43215           This crashes on FreeBSD 8.0.  */
43216        char *line = NULL;
43217        size_t siz = (size_t)(~0) / 4;
43218        if (getline (&line, &siz, in) == -1)
43219          { fclose (in); return 3; }
43220        free (line);
43221      }
43222      fclose (in);
43223      return 0;
43224    }
43225
43226_ACEOF
43227if ac_fn_c_try_run "$LINENO"; then :
43228  am_cv_func_working_getline=yes
43229else
43230  am_cv_func_working_getline=no
43231fi
43232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43233  conftest.$ac_objext conftest.beam conftest.$ac_ext
43234fi
43235
43236
43237fi
43238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
43239$as_echo "$am_cv_func_working_getline" >&6; }
43240  fi
43241
43242  if test $ac_cv_have_decl_getline = no; then
43243    HAVE_DECL_GETLINE=0
43244  fi
43245
43246  case "$am_cv_func_working_getline" in
43247    *yes) ;;
43248    *)
43249                        REPLACE_GETLINE=1
43250      ;;
43251  esac
43252
43253  if test $REPLACE_GETLINE = 1; then
43254
43255
43256
43257
43258
43259
43260
43261
43262  gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
43263
43264
43265  :
43266
43267  fi
43268
43269
43270
43271
43272
43273          GNULIB_GETLINE=1
43274
43275
43276
43277
43278
43279$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
43280
43281
43282
43283
43284
43285
43286
43287
43288
43289
43290
43291
43292    REPLACE_GETOPT=0
43293    if test -n "$gl_replace_getopt"; then
43294      REPLACE_GETOPT=1
43295    fi
43296
43297  if test $REPLACE_GETOPT = 1; then
43298
43299
43300  if test $ac_cv_header_sys_cdefs_h = yes; then
43301    HAVE_SYS_CDEFS_H=1
43302  else
43303    HAVE_SYS_CDEFS_H=0
43304  fi
43305
43306
43307
43308$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
43309
43310  GETOPT_H=getopt.h
43311  GETOPT_CDEFS_H=getopt-cdefs.h
43312
43313
43314
43315  fi
43316
43317  if test $REPLACE_GETOPT = 1; then
43318
43319
43320
43321
43322
43323
43324
43325
43326  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
43327
43328
43329
43330
43331
43332
43333
43334
43335
43336  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
43337
43338        GNULIB_GL_UNISTD_H_GETOPT=1
43339  fi
43340
43341
43342
43343
43344
43345
43346          GNULIB_GETOPT_POSIX=1
43347
43348
43349
43350
43351
43352$as_echo "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
43353
43354
43355
43356
43357
43358
43359  ac_found=0
43360  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
43361"
43362if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
43363  ac_have_decl=1
43364else
43365  ac_have_decl=0
43366fi
43367
43368cat >>confdefs.h <<_ACEOF
43369#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
43370_ACEOF
43371if test $ac_have_decl = 1; then :
43372  ac_found=1
43373fi
43374
43375  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
43376"
43377if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
43378  ac_have_decl=1
43379else
43380  ac_have_decl=0
43381fi
43382
43383cat >>confdefs.h <<_ACEOF
43384#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
43385_ACEOF
43386if test $ac_have_decl = 1; then :
43387  ac_found=1
43388fi
43389
43390  ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
43391"
43392if test "x$ac_cv_have_decl___argv" = xyes; then :
43393  ac_have_decl=1
43394else
43395  ac_have_decl=0
43396fi
43397
43398cat >>confdefs.h <<_ACEOF
43399#define HAVE_DECL___ARGV $ac_have_decl
43400_ACEOF
43401if test $ac_have_decl = 1; then :
43402  ac_found=1
43403fi
43404
43405
43406  # Incur the cost of this test only if none of the above worked.
43407  if test $ac_found = 0; then
43408    # On OpenBSD 5.1, using the global __progname variable appears to be
43409    # the only way to implement getprogname.
43410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
43411$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
43412if ${gl_cv_var___progname+:} false; then :
43413  $as_echo_n "(cached) " >&6
43414else
43415
43416        gl_cv_var___progname=
43417        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43418/* end confdefs.h.  */
43419extern char *__progname;
43420int
43421main ()
43422{
43423return *__progname;
43424
43425  ;
43426  return 0;
43427}
43428_ACEOF
43429if ac_fn_c_try_link "$LINENO"; then :
43430  gl_cv_var___progname=yes
43431
43432fi
43433rm -f core conftest.err conftest.$ac_objext \
43434    conftest$ac_exeext conftest.$ac_ext
43435
43436
43437fi
43438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
43439$as_echo "$gl_cv_var___progname" >&6; }
43440    if test "$gl_cv_var___progname" = yes; then
43441
43442$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
43443
43444    fi
43445  fi
43446
43447
43448
43449
43450
43451  if test "$ac_cv_func_getrandom" != yes; then
43452    HAVE_GETRANDOM=0
43453  else
43454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
43455$as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
43456if ${gl_cv_func_getrandom_ok+:} false; then :
43457  $as_echo_n "(cached) " >&6
43458else
43459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43460/* end confdefs.h.  */
43461/* Additional includes are needed before <sys/random.h> on Mac OS X.  */
43462              #include <sys/types.h>
43463              #include <stdlib.h>
43464              #include <sys/random.h>
43465              ssize_t getrandom (void *, size_t, unsigned int);
43466
43467int
43468main ()
43469{
43470
43471  ;
43472  return 0;
43473}
43474
43475_ACEOF
43476if ac_fn_c_try_compile "$LINENO"; then :
43477  gl_cv_func_getrandom_ok=yes
43478else
43479  gl_cv_func_getrandom_ok=no
43480fi
43481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43482
43483fi
43484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
43485$as_echo "$gl_cv_func_getrandom_ok" >&6; }
43486    if test $gl_cv_func_getrandom_ok = no; then
43487      REPLACE_GETRANDOM=1
43488    fi
43489  fi
43490
43491  case "$host_os" in
43492    mingw*)
43493      for ac_header in bcrypt.h
43494do :
43495  ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
43496
43497"
43498if test "x$ac_cv_header_bcrypt_h" = xyes; then :
43499  cat >>confdefs.h <<_ACEOF
43500#define HAVE_BCRYPT_H 1
43501_ACEOF
43502
43503fi
43504
43505done
43506
43507      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
43508$as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
43509if ${gl_cv_lib_assume_bcrypt+:} false; then :
43510  $as_echo_n "(cached) " >&6
43511else
43512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43513/* end confdefs.h.  */
43514#include <windows.h>
43515int
43516main ()
43517{
43518#if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
43519                  cannot assume it
43520                #endif
43521
43522  ;
43523  return 0;
43524}
43525
43526_ACEOF
43527if ac_fn_c_try_compile "$LINENO"; then :
43528  gl_cv_lib_assume_bcrypt=yes
43529else
43530  gl_cv_lib_assume_bcrypt=no
43531fi
43532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43533
43534fi
43535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
43536$as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
43537      if test $gl_cv_lib_assume_bcrypt = yes; then
43538
43539$as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
43540
43541        LIB_GETRANDOM='-lbcrypt'
43542      else
43543        LIB_GETRANDOM='-ladvapi32'
43544      fi
43545      ;;
43546    *)
43547      LIB_GETRANDOM= ;;
43548  esac
43549
43550
43551  if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
43552
43553
43554
43555
43556
43557
43558
43559
43560  gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
43561
43562  fi
43563
43564
43565
43566
43567
43568          GNULIB_GETRANDOM=1
43569
43570
43571
43572
43573
43574$as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
43575
43576
43577
43578
43579
43580
43581
43582
43583
43584
43585
43586
43587
43588
43589
43590
43591
43592
43593  gl_gettimeofday_timezone=void
43594  if test $ac_cv_func_gettimeofday != yes; then
43595    HAVE_GETTIMEOFDAY=0
43596  else
43597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
43598$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
43599if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
43600  $as_echo_n "(cached) " >&6
43601else
43602  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43603/* end confdefs.h.  */
43604#include <sys/time.h>
43605              struct timeval c;
43606              int gettimeofday (struct timeval *restrict, void *restrict);
43607
43608int
43609main ()
43610{
43611/* glibc uses struct timezone * rather than the POSIX void *
43612                 if _GNU_SOURCE is defined.  However, since the only portable
43613                 use of gettimeofday uses NULL as the second parameter, and
43614                 since the glibc definition is actually more typesafe, it is
43615                 not worth wrapping this to get a compliant signature.  */
43616              int (*f) (struct timeval *restrict, void *restrict)
43617                = gettimeofday;
43618              int x = f (&c, 0);
43619              return !(x | c.tv_sec | c.tv_usec);
43620
43621  ;
43622  return 0;
43623}
43624_ACEOF
43625if ac_fn_c_try_compile "$LINENO"; then :
43626  gl_cv_func_gettimeofday_posix_signature=yes
43627else
43628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43629/* end confdefs.h.  */
43630#include <sys/time.h>
43631int gettimeofday (struct timeval *restrict, struct timezone *restrict);
43632
43633int
43634main ()
43635{
43636
43637  ;
43638  return 0;
43639}
43640_ACEOF
43641if ac_fn_c_try_compile "$LINENO"; then :
43642  gl_cv_func_gettimeofday_posix_signature=almost
43643else
43644  gl_cv_func_gettimeofday_posix_signature=no
43645fi
43646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43647fi
43648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43649fi
43650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
43651$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
43652    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
43653      gl_gettimeofday_timezone='struct timezone'
43654    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
43655      REPLACE_GETTIMEOFDAY=1
43656    fi
43657        if test $REPLACE_STRUCT_TIMEVAL = 1; then
43658      REPLACE_GETTIMEOFDAY=1
43659    fi
43660            case "$host_os" in
43661      mingw*) REPLACE_GETTIMEOFDAY=1 ;;
43662    esac
43663  fi
43664
43665cat >>confdefs.h <<_ACEOF
43666#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
43667_ACEOF
43668
43669
43670  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
43671
43672
43673
43674
43675
43676
43677
43678
43679  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
43680
43681    :
43682  fi
43683
43684
43685
43686
43687
43688          GNULIB_GETTIMEOFDAY=1
43689
43690
43691
43692
43693
43694$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
43695
43696
43697
43698
43699  LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
43700
43701
43702
43703
43704
43705
43706
43707          GNULIB_ICONV=1
43708
43709
43710
43711
43712
43713
43714
43715
43716
43717
43718
43719
43720
43721
43722
43723
43724     if test $gl_cv_have_include_next = yes; then
43725       gl_cv_next_iconv_h='<'iconv.h'>'
43726     else
43727       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
43728$as_echo_n "checking absolute name of <iconv.h>... " >&6; }
43729if ${gl_cv_next_iconv_h+:} false; then :
43730  $as_echo_n "(cached) " >&6
43731else
43732
43733             if test $ac_cv_header_iconv_h = yes; then
43734
43735
43736
43737
43738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43739/* end confdefs.h.  */
43740#include <iconv.h>
43741_ACEOF
43742                case "$host_os" in
43743    aix*) gl_absname_cpp="$ac_cpp -C" ;;
43744    *)    gl_absname_cpp="$ac_cpp" ;;
43745  esac
43746
43747  case "$host_os" in
43748    mingw*)
43749                                          gl_dirsep_regex='[/\\]'
43750      ;;
43751    *)
43752      gl_dirsep_regex='\/'
43753      ;;
43754  esac
43755      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
43756  gl_header_literal_regex=`echo 'iconv.h' \
43757                           | sed -e "$gl_make_literal_regex_sed"`
43758  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
43759      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
43760      s|^/[^/]|//&|
43761      p
43762      q
43763    }'
43764
43765        gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
43766  sed -n "$gl_absolute_header_sed"`
43767
43768           gl_header=$gl_cv_absolute_iconv_h
43769           gl_cv_next_iconv_h='"'$gl_header'"'
43770          else
43771               gl_cv_next_iconv_h='<'iconv.h'>'
43772             fi
43773
43774
43775fi
43776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
43777$as_echo "$gl_cv_next_iconv_h" >&6; }
43778     fi
43779     NEXT_ICONV_H=$gl_cv_next_iconv_h
43780
43781     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
43782       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
43783       gl_next_as_first_directive='<'iconv.h'>'
43784     else
43785       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
43786       gl_next_as_first_directive=$gl_cv_next_iconv_h
43787     fi
43788     NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
43789
43790
43791
43792
43793
43794
43795
43796
43797
43798
43799
43800
43801
43802
43803
43804  if test "$am_cv_func_iconv" = yes; then
43805
43806
43807  ICONV_H='iconv.h'
43808   if test -n "$ICONV_H"; then
43809  GL_GENERATE_ICONV_H_TRUE=
43810  GL_GENERATE_ICONV_H_FALSE='#'
43811else
43812  GL_GENERATE_ICONV_H_TRUE='#'
43813  GL_GENERATE_ICONV_H_FALSE=
43814fi
43815
43816
43817            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43818/* end confdefs.h.  */
43819
43820      #include <iconv.h>
43821      #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
43822       gnu_iconv
43823      #endif
43824
43825_ACEOF
43826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43827  $EGREP "gnu_iconv" >/dev/null 2>&1; then :
43828  gl_func_iconv_gnu=yes
43829else
43830  gl_func_iconv_gnu=no
43831fi
43832rm -f conftest*
43833
43834    if test $gl_func_iconv_gnu = no; then
43835      iconv_flavor=
43836      case "$host_os" in
43837        aix*)         iconv_flavor=ICONV_FLAVOR_AIX ;;
43838        irix*)        iconv_flavor=ICONV_FLAVOR_IRIX ;;
43839        hpux*)        iconv_flavor=ICONV_FLAVOR_HPUX ;;
43840        osf*)         iconv_flavor=ICONV_FLAVOR_OSF ;;
43841        solaris*)     iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
43842        openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
43843      esac
43844      if test -n "$iconv_flavor"; then
43845
43846cat >>confdefs.h <<_ACEOF
43847#define ICONV_FLAVOR $iconv_flavor
43848_ACEOF
43849
43850
43851
43852
43853  ICONV_H='iconv.h'
43854   if test -n "$ICONV_H"; then
43855  GL_GENERATE_ICONV_H_TRUE=
43856  GL_GENERATE_ICONV_H_FALSE='#'
43857else
43858  GL_GENERATE_ICONV_H_TRUE='#'
43859  GL_GENERATE_ICONV_H_FALSE=
43860fi
43861
43862
43863  REPLACE_ICONV_OPEN=1
43864
43865      fi
43866    fi
43867
43868  fi
43869
43870  if test $REPLACE_ICONV_OPEN = 1; then
43871
43872
43873
43874
43875
43876
43877
43878
43879  gl_LIBOBJS="$gl_LIBOBJS iconv_open.$ac_objext"
43880
43881  fi
43882  if test $REPLACE_ICONV = 1; then
43883
43884
43885
43886
43887
43888
43889
43890
43891  gl_LIBOBJS="$gl_LIBOBJS iconv.$ac_objext"
43892
43893
43894
43895
43896
43897
43898
43899
43900
43901  gl_LIBOBJS="$gl_LIBOBJS iconv_close.$ac_objext"
43902
43903  fi
43904
43905
43906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
43907$as_echo_n "checking whether the compiler generally respects inline... " >&6; }
43908if ${gl_cv_c_inline_effective+:} false; then :
43909  $as_echo_n "(cached) " >&6
43910else
43911  if test $ac_cv_c_inline = no; then
43912       gl_cv_c_inline_effective=no
43913     else
43914                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43915/* end confdefs.h.  */
43916
43917int
43918main ()
43919{
43920#ifdef __NO_INLINE__
43921               #error "inline is not effective"
43922             #endif
43923  ;
43924  return 0;
43925}
43926_ACEOF
43927if ac_fn_c_try_compile "$LINENO"; then :
43928  gl_cv_c_inline_effective=yes
43929else
43930  gl_cv_c_inline_effective=no
43931fi
43932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43933     fi
43934
43935fi
43936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
43937$as_echo "$gl_cv_c_inline_effective" >&6; }
43938  if test $gl_cv_c_inline_effective = yes; then
43939
43940$as_echo "#define HAVE_INLINE 1" >>confdefs.h
43941
43942  fi
43943
43944
43945
43946
43947
43948
43949
43950  if test $ac_cv_func_isblank = no; then
43951    HAVE_ISBLANK=0
43952  fi
43953
43954  if test $HAVE_ISBLANK = 0; then
43955
43956
43957
43958
43959
43960
43961
43962
43963  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
43964
43965  fi
43966
43967
43968cat >>confdefs.h <<_ACEOF
43969#define GNULIB_ISBLANK 1
43970_ACEOF
43971
43972
43973
43974
43975
43976
43977
43978          GNULIB_ISBLANK=1
43979
43980
43981
43982
43983
43984
43985
43986
43987  ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
43988      #ifndef isinf
43989      #error \"isinf must be a macro, not a function\"
43990      #endif
43991
43992"
43993if test "x$ac_cv_have_decl_isinf" = xyes; then :
43994  ac_have_decl=1
43995else
43996  ac_have_decl=0
43997fi
43998
43999cat >>confdefs.h <<_ACEOF
44000#define HAVE_DECL_ISINF $ac_have_decl
44001_ACEOF
44002
44003  if test "$ac_cv_have_decl_isinf" = yes; then
44004
44005  save_LIBS=$LIBS
44006  ISINF_LIBM=missing
44007  for libm in "" "-lm"; do
44008    LIBS="$save_LIBS $libm"
44009    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44010/* end confdefs.h.  */
44011
44012         #ifndef __NO_MATH_INLINES
44013         # define __NO_MATH_INLINES 1 /* for glibc */
44014         #endif
44015         #include <math.h>
44016
44017         double x;
44018int
44019main ()
44020{
44021x = isinf (x) + isinf ((float) x);
44022  ;
44023  return 0;
44024}
44025_ACEOF
44026if ac_fn_c_try_link "$LINENO"; then :
44027  ISINF_LIBM=$libm
44028break
44029fi
44030rm -f core conftest.err conftest.$ac_objext \
44031    conftest$ac_exeext conftest.$ac_ext
44032  done
44033  LIBS=$save_LIBS
44034
44035    if test "$ISINF_LIBM" != missing; then
44036
44037
44038
44039
44040     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isinf(long double) works" >&5
44041$as_echo_n "checking whether isinf(long double) works... " >&6; }
44042if ${gl_cv_func_isinfl_works+:} false; then :
44043  $as_echo_n "(cached) " >&6
44044else
44045
44046      if test "$cross_compiling" = yes; then :
44047  case "$host_os" in
44048         mingw*) # Guess yes on mingw, no on MSVC.
44049           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44050/* end confdefs.h.  */
44051
44052#ifdef __MINGW32__
44053 Known
44054#endif
44055
44056_ACEOF
44057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44058  $EGREP "Known" >/dev/null 2>&1; then :
44059  gl_cv_func_isinfl_works="guessing yes"
44060else
44061  gl_cv_func_isinfl_works="guessing no"
44062fi
44063rm -f conftest*
44064
44065           ;;
44066         *)
44067           gl_cv_func_isinfl_works="guessing yes"
44068           ;;
44069       esac
44070
44071else
44072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44073/* end confdefs.h.  */
44074
44075#include <float.h>
44076#include <limits.h>
44077#include <math.h>
44078#define NWORDS \
44079  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
44080typedef union { unsigned int word[NWORDS]; long double value; }
44081        memory_long_double;
44082/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
44083   runtime type conversion.  */
44084#ifdef __sgi
44085static long double NaNl ()
44086{
44087  double zero = 0.0;
44088  return zero / zero;
44089}
44090#else
44091# define NaNl() (0.0L / 0.0L)
44092#endif
44093int main ()
44094{
44095  int result = 0;
44096
44097  if (isinf (LDBL_MAX))
44098    result |= 1;
44099
44100  {
44101    memory_long_double m;
44102    unsigned int i;
44103
44104    /* The isinf macro should be immune against changes in the sign bit and
44105       in the mantissa bits.  The xor operation twiddles a bit that can only be
44106       a sign bit or a mantissa bit (since the exponent never extends to
44107       bit 31).  */
44108    m.value = NaNl ();
44109    m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
44110    for (i = 0; i < NWORDS; i++)
44111      m.word[i] |= 1;
44112    if (isinf (m.value))
44113      result |= 2;
44114  }
44115
44116#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
44117/* Representation of an 80-bit 'long double' as an initializer for a sequence
44118   of 'unsigned int' words.  */
44119# ifdef WORDS_BIGENDIAN
44120#  define LDBL80_WORDS(exponent,manthi,mantlo) \
44121     { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
44122       ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
44123       (unsigned int) (mantlo) << 16                                        \
44124     }
44125# else
44126#  define LDBL80_WORDS(exponent,manthi,mantlo) \
44127     { mantlo, manthi, exponent }
44128# endif
44129  { /* Quiet NaN.  */
44130    static memory_long_double x =
44131      { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
44132    if (isinf (x.value))
44133      result |= 2;
44134  }
44135  {
44136    /* Signalling NaN.  */
44137    static memory_long_double x =
44138      { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
44139    if (isinf (x.value))
44140      result |= 2;
44141  }
44142  /* isinf should return something even for noncanonical values.  */
44143  { /* Pseudo-NaN.  */
44144    static memory_long_double x =
44145      { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
44146    if (isinf (x.value) && !isinf (x.value))
44147      result |= 4;
44148  }
44149  { /* Pseudo-Infinity.  */
44150    static memory_long_double x =
44151      { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
44152    if (isinf (x.value) && !isinf (x.value))
44153      result |= 8;
44154  }
44155  { /* Pseudo-Zero.  */
44156    static memory_long_double x =
44157      { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
44158    if (isinf (x.value) && !isinf (x.value))
44159      result |= 16;
44160  }
44161  { /* Unnormalized number.  */
44162    static memory_long_double x =
44163      { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
44164    if (isinf (x.value) && !isinf (x.value))
44165      result |= 32;
44166  }
44167  { /* Pseudo-Denormal.  */
44168    static memory_long_double x =
44169      { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
44170    if (isinf (x.value) && !isinf (x.value))
44171      result |= 64;
44172  }
44173#endif
44174
44175  return result;
44176}
44177_ACEOF
44178if ac_fn_c_try_run "$LINENO"; then :
44179  gl_cv_func_isinfl_works=yes
44180else
44181  gl_cv_func_isinfl_works=no
44182fi
44183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44184  conftest.$ac_objext conftest.beam conftest.$ac_ext
44185fi
44186
44187
44188fi
44189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isinfl_works" >&5
44190$as_echo "$gl_cv_func_isinfl_works" >&6; }
44191
44192      case "$gl_cv_func_isinfl_works" in
44193        *yes) ;;
44194        *)    ISINF_LIBM=missing;;
44195      esac
44196    fi
44197  fi
44198          if test "$ac_cv_have_decl_isinf" != yes \
44199     || test "$ISINF_LIBM" = missing \
44200     || { case "$host_os" in solaris*) true;; *) false;; esac; }; then
44201    REPLACE_ISINF=1
44202        ISINF_LIBM=
44203  fi
44204
44205
44206  if test $REPLACE_ISINF = 1; then
44207
44208
44209
44210
44211
44212
44213
44214
44215  gl_LIBOBJS="$gl_LIBOBJS isinf.$ac_objext"
44216
44217  fi
44218
44219
44220
44221
44222
44223          GNULIB_ISINF=1
44224
44225
44226
44227
44228
44229$as_echo "#define GNULIB_TEST_ISINF 1" >>confdefs.h
44230
44231
44232
44233
44234
44235
44236
44237
44238
44239  # If we replaced any of the underlying isnan* functions, replace
44240  # the isnan macro; it undoubtedly suffers from the same flaws.
44241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan macro works" >&5
44242$as_echo_n "checking whether isnan macro works... " >&6; }
44243  if test $gl_func_isnanf = yes \
44244     && test $gl_func_isnand = yes \
44245     && test $gl_func_isnanl = yes; then
44246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44247$as_echo "yes" >&6; }
44248    ISNAN_LIBM=
44249        case " $ISNAN_LIBM " in
44250      *" $ISNANF_LIBM "*) ;;
44251      *) ISNAN_LIBM="$ISNAN_LIBM $ISNANF_LIBM" ;;
44252    esac
44253        case " $ISNAN_LIBM " in
44254      *" $ISNAND_LIBM "*) ;;
44255      *) ISNAN_LIBM="$ISNAN_LIBM $ISNAND_LIBM" ;;
44256    esac
44257        case " $ISNAN_LIBM " in
44258      *" $ISNANL_LIBM "*) ;;
44259      *) ISNAN_LIBM="$ISNAN_LIBM $ISNANL_LIBM" ;;
44260    esac
44261  else
44262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44263$as_echo "no" >&6; }
44264        REPLACE_ISNAN=1
44265    ISNAN_LIBM=
44266  fi
44267
44268
44269
44270
44271
44272
44273
44274          GNULIB_ISNAN=1
44275
44276
44277
44278
44279
44280$as_echo "#define GNULIB_TEST_ISNAN 1" >>confdefs.h
44281
44282
44283
44284
44285
44286  ISNAND_LIBM=
44287
44288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
44289$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
44290if ${gl_cv_func_isnand_no_libm+:} false; then :
44291  $as_echo_n "(cached) " >&6
44292else
44293
44294      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44295/* end confdefs.h.  */
44296#include <math.h>
44297             #if __GNUC__ >= 4
44298             # undef isnand
44299             # define isnand(x) __builtin_isnan ((double)(x))
44300             #else
44301             # undef isnand
44302             # define isnand(x) isnan ((double)(x))
44303             #endif
44304             double x;
44305int
44306main ()
44307{
44308return isnand (x);
44309  ;
44310  return 0;
44311}
44312_ACEOF
44313if ac_fn_c_try_link "$LINENO"; then :
44314  gl_cv_func_isnand_no_libm=yes
44315else
44316  gl_cv_func_isnand_no_libm=no
44317fi
44318rm -f core conftest.err conftest.$ac_objext \
44319    conftest$ac_exeext conftest.$ac_ext
44320
44321fi
44322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
44323$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
44324
44325  if test $gl_cv_func_isnand_no_libm = no; then
44326
44327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used with libm" >&5
44328$as_echo_n "checking whether isnan(double) can be used with libm... " >&6; }
44329if ${gl_cv_func_isnand_in_libm+:} false; then :
44330  $as_echo_n "(cached) " >&6
44331else
44332
44333      save_LIBS="$LIBS"
44334      LIBS="$LIBS -lm"
44335      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44336/* end confdefs.h.  */
44337#include <math.h>
44338             #if __GNUC__ >= 4
44339             # undef isnand
44340             # define isnand(x) __builtin_isnan ((double)(x))
44341             #elif defined isnan
44342             # undef isnand
44343             # define isnand(x) isnan ((double)(x))
44344             #endif
44345             double x;
44346int
44347main ()
44348{
44349return isnand (x);
44350  ;
44351  return 0;
44352}
44353_ACEOF
44354if ac_fn_c_try_link "$LINENO"; then :
44355  gl_cv_func_isnand_in_libm=yes
44356else
44357  gl_cv_func_isnand_in_libm=no
44358fi
44359rm -f core conftest.err conftest.$ac_objext \
44360    conftest$ac_exeext conftest.$ac_ext
44361      LIBS="$save_LIBS"
44362
44363fi
44364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_in_libm" >&5
44365$as_echo "$gl_cv_func_isnand_in_libm" >&6; }
44366
44367    if test $gl_cv_func_isnand_in_libm = yes; then
44368      ISNAND_LIBM=-lm
44369    fi
44370  fi
44371    if test $gl_cv_func_isnand_no_libm = yes \
44372     || test $gl_cv_func_isnand_in_libm = yes; then
44373    gl_func_isnand=yes
44374  else
44375    gl_func_isnand=no
44376    HAVE_ISNAND=0
44377  fi
44378
44379
44380
44381
44382
44383  if test $HAVE_ISNAND = 0 || test $REPLACE_ISNAN = 1; then
44384
44385
44386
44387
44388
44389
44390
44391
44392  gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
44393
44394
44395
44396
44397  fi
44398
44399
44400
44401
44402
44403          GNULIB_ISNAND=1
44404
44405
44406
44407
44408
44409$as_echo "#define GNULIB_TEST_ISNAND 1" >>confdefs.h
44410
44411
44412
44413
44414
44415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
44416$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
44417if ${gl_cv_func_isnand_no_libm+:} false; then :
44418  $as_echo_n "(cached) " >&6
44419else
44420
44421      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44422/* end confdefs.h.  */
44423#include <math.h>
44424             #if __GNUC__ >= 4
44425             # undef isnand
44426             # define isnand(x) __builtin_isnan ((double)(x))
44427             #else
44428             # undef isnand
44429             # define isnand(x) isnan ((double)(x))
44430             #endif
44431             double x;
44432int
44433main ()
44434{
44435return isnand (x);
44436  ;
44437  return 0;
44438}
44439_ACEOF
44440if ac_fn_c_try_link "$LINENO"; then :
44441  gl_cv_func_isnand_no_libm=yes
44442else
44443  gl_cv_func_isnand_no_libm=no
44444fi
44445rm -f core conftest.err conftest.$ac_objext \
44446    conftest$ac_exeext conftest.$ac_ext
44447
44448fi
44449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
44450$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
44451
44452  gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
44453  if test $gl_cv_func_isnand_no_libm = yes; then
44454
44455$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
44456
44457  fi
44458
44459  if test $gl_func_isnand_no_libm != yes; then
44460
44461
44462
44463
44464
44465
44466
44467
44468  gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
44469
44470
44471
44472
44473  fi
44474
44475
44476  ISNANF_LIBM=
44477
44478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
44479$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
44480if ${gl_cv_func_isnanf_no_libm+:} false; then :
44481  $as_echo_n "(cached) " >&6
44482else
44483
44484      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44485/* end confdefs.h.  */
44486#include <math.h>
44487             #ifndef __has_builtin
44488             # define __has_builtin(name) 0
44489             #endif
44490             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
44491             # undef isnanf
44492             # define isnanf(x) __builtin_isnanf ((float)(x))
44493             #elif defined isnan
44494             # undef isnanf
44495             # define isnanf(x) isnan ((float)(x))
44496             #endif
44497             float x;
44498int
44499main ()
44500{
44501return isnanf (x);
44502  ;
44503  return 0;
44504}
44505_ACEOF
44506if ac_fn_c_try_link "$LINENO"; then :
44507  gl_cv_func_isnanf_no_libm=yes
44508else
44509  gl_cv_func_isnanf_no_libm=no
44510fi
44511rm -f core conftest.err conftest.$ac_objext \
44512    conftest$ac_exeext conftest.$ac_ext
44513
44514fi
44515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
44516$as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
44517
44518  if test $gl_cv_func_isnanf_no_libm = no; then
44519
44520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used with libm" >&5
44521$as_echo_n "checking whether isnan(float) can be used with libm... " >&6; }
44522if ${gl_cv_func_isnanf_in_libm+:} false; then :
44523  $as_echo_n "(cached) " >&6
44524else
44525
44526      save_LIBS="$LIBS"
44527      LIBS="$LIBS -lm"
44528      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44529/* end confdefs.h.  */
44530#include <math.h>
44531             #ifndef __has_builtin
44532             # define __has_builtin(name) 0
44533             #endif
44534             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
44535             # undef isnanf
44536             # define isnanf(x) __builtin_isnanf ((float)(x))
44537             #elif defined isnan
44538             # undef isnanf
44539             # define isnanf(x) isnan ((float)(x))
44540             #endif
44541             float x;
44542int
44543main ()
44544{
44545return isnanf (x);
44546  ;
44547  return 0;
44548}
44549_ACEOF
44550if ac_fn_c_try_link "$LINENO"; then :
44551  gl_cv_func_isnanf_in_libm=yes
44552else
44553  gl_cv_func_isnanf_in_libm=no
44554fi
44555rm -f core conftest.err conftest.$ac_objext \
44556    conftest$ac_exeext conftest.$ac_ext
44557      LIBS="$save_LIBS"
44558
44559fi
44560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_in_libm" >&5
44561$as_echo "$gl_cv_func_isnanf_in_libm" >&6; }
44562
44563    if test $gl_cv_func_isnanf_in_libm = yes; then
44564      ISNANF_LIBM=-lm
44565    fi
44566  fi
44567    if test $gl_cv_func_isnanf_no_libm = yes \
44568     || test $gl_cv_func_isnanf_in_libm = yes; then
44569    save_LIBS="$LIBS"
44570    LIBS="$LIBS $ISNANF_LIBM"
44571
44572
44573
44574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
44575$as_echo_n "checking whether isnan(float) works... " >&6; }
44576if ${gl_cv_func_isnanf_works+:} false; then :
44577  $as_echo_n "(cached) " >&6
44578else
44579
44580      if test "$cross_compiling" = yes; then :
44581  case "$host_os" in
44582           irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
44583           mingw*) # Guess yes on mingw, no on MSVC.
44584             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44585/* end confdefs.h.  */
44586
44587#ifdef __MINGW32__
44588 Known
44589#endif
44590
44591_ACEOF
44592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44593  $EGREP "Known" >/dev/null 2>&1; then :
44594  gl_cv_func_isnanf_works="guessing yes"
44595else
44596  gl_cv_func_isnanf_works="guessing no"
44597fi
44598rm -f conftest*
44599
44600             ;;
44601           *) gl_cv_func_isnanf_works="guessing yes" ;;
44602         esac
44603
44604else
44605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44606/* end confdefs.h.  */
44607
44608#include <math.h>
44609#ifndef __has_builtin
44610# define __has_builtin(name) 0
44611#endif
44612#if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
44613# undef isnanf
44614# define isnanf(x) __builtin_isnanf ((float)(x))
44615#elif defined isnan
44616# undef isnanf
44617# define isnanf(x) isnan ((float)(x))
44618#endif
44619/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
44620#ifdef __DECC
44621static float
44622NaN ()
44623{
44624  static float zero = 0.0f;
44625  return zero / zero;
44626}
44627#else
44628# define NaN() (0.0f / 0.0f)
44629#endif
44630#define NWORDS \
44631  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
44632typedef union { unsigned int word[NWORDS]; float value; } memory_float;
44633int main()
44634{
44635  int result = 0;
44636
44637  if (isnanf (1.0f / 0.0f))
44638    result |= 1;
44639
44640  if (!isnanf (NaN ()))
44641    result |= 2;
44642
44643#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
44644  /* The isnanf function should be immune against changes in the sign bit and
44645     in the mantissa bits.  The xor operation twiddles a bit that can only be
44646     a sign bit or a mantissa bit.  */
44647  if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
44648    {
44649      memory_float m;
44650
44651      m.value = NaN ();
44652      /* Set the bits below the exponent to 01111...111.  */
44653      m.word[0] &= -1U << FLT_EXPBIT0_BIT;
44654      m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
44655      if (!isnanf (m.value))
44656        result |= 4;
44657    }
44658#endif
44659
44660  return result;
44661}
44662_ACEOF
44663if ac_fn_c_try_run "$LINENO"; then :
44664  gl_cv_func_isnanf_works=yes
44665else
44666  gl_cv_func_isnanf_works=no
44667fi
44668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44669  conftest.$ac_objext conftest.beam conftest.$ac_ext
44670fi
44671
44672
44673fi
44674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
44675$as_echo "$gl_cv_func_isnanf_works" >&6; }
44676
44677    LIBS="$save_LIBS"
44678    case "$gl_cv_func_isnanf_works" in
44679      *yes) gl_func_isnanf=yes ;;
44680      *)    gl_func_isnanf=no; ISNANF_LIBM= ;;
44681    esac
44682  else
44683    gl_func_isnanf=no
44684  fi
44685  if test $gl_func_isnanf != yes; then
44686    HAVE_ISNANF=0
44687  fi
44688
44689
44690
44691
44692
44693  if test $HAVE_ISNANF = 0 || test $REPLACE_ISNAN = 1; then
44694
44695
44696
44697
44698
44699
44700
44701
44702  gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
44703
44704
44705
44706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
44707$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
44708if ${gl_cv_cc_float_expbit0+:} false; then :
44709  $as_echo_n "(cached) " >&6
44710else
44711
44712      if test "$cross_compiling" = yes; then :
44713  gl_cv_cc_float_expbit0="word 0 bit 23"
44714else
44715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44716/* end confdefs.h.  */
44717
44718#include <float.h>
44719#include <stddef.h>
44720#include <stdio.h>
44721#include <string.h>
44722#define NWORDS \
44723  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
44724typedef union { float value; unsigned int word[NWORDS]; } memory_float;
44725static unsigned int ored_words[NWORDS];
44726static unsigned int anded_words[NWORDS];
44727static void add_to_ored_words (float x)
44728{
44729  memory_float m;
44730  size_t i;
44731  /* Clear it first, in case
44732     sizeof (float) < sizeof (memory_float).  */
44733  memset (&m, 0, sizeof (memory_float));
44734  m.value = x;
44735  for (i = 0; i < NWORDS; i++)
44736    {
44737      ored_words[i] |= m.word[i];
44738      anded_words[i] &= m.word[i];
44739    }
44740}
44741int main ()
44742{
44743  size_t j;
44744  FILE *fp = fopen ("conftest.out", "w");
44745  if (fp == NULL)
44746    return 1;
44747  for (j = 0; j < NWORDS; j++)
44748    anded_words[j] = ~ (unsigned int) 0;
44749  add_to_ored_words (0.25f);
44750  add_to_ored_words (0.5f);
44751  add_to_ored_words (1.0f);
44752  add_to_ored_words (2.0f);
44753  add_to_ored_words (4.0f);
44754  /* Remove bits that are common (e.g. if representation of the first mantissa
44755     bit is explicit).  */
44756  for (j = 0; j < NWORDS; j++)
44757    ored_words[j] &= ~anded_words[j];
44758  /* Now find the nonzero word.  */
44759  for (j = 0; j < NWORDS; j++)
44760    if (ored_words[j] != 0)
44761      break;
44762  if (j < NWORDS)
44763    {
44764      size_t i;
44765      for (i = j + 1; i < NWORDS; i++)
44766        if (ored_words[i] != 0)
44767          {
44768            fprintf (fp, "unknown");
44769            return (fclose (fp) != 0);
44770          }
44771      for (i = 0; ; i++)
44772        if ((ored_words[j] >> i) & 1)
44773          {
44774            fprintf (fp, "word %d bit %d", (int) j, (int) i);
44775            return (fclose (fp) != 0);
44776          }
44777    }
44778  fprintf (fp, "unknown");
44779  return (fclose (fp) != 0);
44780}
44781
44782_ACEOF
44783if ac_fn_c_try_run "$LINENO"; then :
44784  gl_cv_cc_float_expbit0=`cat conftest.out`
44785else
44786  gl_cv_cc_float_expbit0="unknown"
44787fi
44788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44789  conftest.$ac_objext conftest.beam conftest.$ac_ext
44790fi
44791
44792      rm -f conftest.out
44793
44794fi
44795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
44796$as_echo "$gl_cv_cc_float_expbit0" >&6; }
44797  case "$gl_cv_cc_float_expbit0" in
44798    word*bit*)
44799      word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
44800      bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
44801
44802cat >>confdefs.h <<_ACEOF
44803#define FLT_EXPBIT0_WORD $word
44804_ACEOF
44805
44806
44807cat >>confdefs.h <<_ACEOF
44808#define FLT_EXPBIT0_BIT $bit
44809_ACEOF
44810
44811      ;;
44812  esac
44813
44814
44815  fi
44816
44817
44818
44819
44820
44821          GNULIB_ISNANF=1
44822
44823
44824
44825
44826
44827$as_echo "#define GNULIB_TEST_ISNANF 1" >>confdefs.h
44828
44829
44830
44831
44832
44833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
44834$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
44835if ${gl_cv_func_isnanf_no_libm+:} false; then :
44836  $as_echo_n "(cached) " >&6
44837else
44838
44839      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44840/* end confdefs.h.  */
44841#include <math.h>
44842             #ifndef __has_builtin
44843             # define __has_builtin(name) 0
44844             #endif
44845             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
44846             # undef isnanf
44847             # define isnanf(x) __builtin_isnanf ((float)(x))
44848             #elif defined isnan
44849             # undef isnanf
44850             # define isnanf(x) isnan ((float)(x))
44851             #endif
44852             float x;
44853int
44854main ()
44855{
44856return isnanf (x);
44857  ;
44858  return 0;
44859}
44860_ACEOF
44861if ac_fn_c_try_link "$LINENO"; then :
44862  gl_cv_func_isnanf_no_libm=yes
44863else
44864  gl_cv_func_isnanf_no_libm=no
44865fi
44866rm -f core conftest.err conftest.$ac_objext \
44867    conftest$ac_exeext conftest.$ac_ext
44868
44869fi
44870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
44871$as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
44872
44873  if test $gl_cv_func_isnanf_no_libm = yes; then
44874
44875
44876
44877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
44878$as_echo_n "checking whether isnan(float) works... " >&6; }
44879if ${gl_cv_func_isnanf_works+:} false; then :
44880  $as_echo_n "(cached) " >&6
44881else
44882
44883      if test "$cross_compiling" = yes; then :
44884  case "$host_os" in
44885           irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
44886           mingw*) # Guess yes on mingw, no on MSVC.
44887             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44888/* end confdefs.h.  */
44889
44890#ifdef __MINGW32__
44891 Known
44892#endif
44893
44894_ACEOF
44895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44896  $EGREP "Known" >/dev/null 2>&1; then :
44897  gl_cv_func_isnanf_works="guessing yes"
44898else
44899  gl_cv_func_isnanf_works="guessing no"
44900fi
44901rm -f conftest*
44902
44903             ;;
44904           *) gl_cv_func_isnanf_works="guessing yes" ;;
44905         esac
44906
44907else
44908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44909/* end confdefs.h.  */
44910
44911#include <math.h>
44912#ifndef __has_builtin
44913# define __has_builtin(name) 0
44914#endif
44915#if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
44916# undef isnanf
44917# define isnanf(x) __builtin_isnanf ((float)(x))
44918#elif defined isnan
44919# undef isnanf
44920# define isnanf(x) isnan ((float)(x))
44921#endif
44922/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
44923#ifdef __DECC
44924static float
44925NaN ()
44926{
44927  static float zero = 0.0f;
44928  return zero / zero;
44929}
44930#else
44931# define NaN() (0.0f / 0.0f)
44932#endif
44933#define NWORDS \
44934  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
44935typedef union { unsigned int word[NWORDS]; float value; } memory_float;
44936int main()
44937{
44938  int result = 0;
44939
44940  if (isnanf (1.0f / 0.0f))
44941    result |= 1;
44942
44943  if (!isnanf (NaN ()))
44944    result |= 2;
44945
44946#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
44947  /* The isnanf function should be immune against changes in the sign bit and
44948     in the mantissa bits.  The xor operation twiddles a bit that can only be
44949     a sign bit or a mantissa bit.  */
44950  if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
44951    {
44952      memory_float m;
44953
44954      m.value = NaN ();
44955      /* Set the bits below the exponent to 01111...111.  */
44956      m.word[0] &= -1U << FLT_EXPBIT0_BIT;
44957      m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
44958      if (!isnanf (m.value))
44959        result |= 4;
44960    }
44961#endif
44962
44963  return result;
44964}
44965_ACEOF
44966if ac_fn_c_try_run "$LINENO"; then :
44967  gl_cv_func_isnanf_works=yes
44968else
44969  gl_cv_func_isnanf_works=no
44970fi
44971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44972  conftest.$ac_objext conftest.beam conftest.$ac_ext
44973fi
44974
44975
44976fi
44977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
44978$as_echo "$gl_cv_func_isnanf_works" >&6; }
44979
44980  fi
44981  if test $gl_cv_func_isnanf_no_libm = yes \
44982     && { case "$gl_cv_func_isnanf_works" in
44983            *yes) true;;
44984            *) false;;
44985          esac
44986        }; then
44987    gl_func_isnanf_no_libm=yes
44988
44989$as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
44990
44991  else
44992    gl_func_isnanf_no_libm=no
44993  fi
44994
44995  if test $gl_func_isnanf_no_libm != yes; then
44996
44997
44998
44999
45000
45001
45002
45003
45004  gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
45005
45006
45007
45008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
45009$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
45010if ${gl_cv_cc_float_expbit0+:} false; then :
45011  $as_echo_n "(cached) " >&6
45012else
45013
45014      if test "$cross_compiling" = yes; then :
45015  gl_cv_cc_float_expbit0="word 0 bit 23"
45016else
45017  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45018/* end confdefs.h.  */
45019
45020#include <float.h>
45021#include <stddef.h>
45022#include <stdio.h>
45023#include <string.h>
45024#define NWORDS \
45025  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45026typedef union { float value; unsigned int word[NWORDS]; } memory_float;
45027static unsigned int ored_words[NWORDS];
45028static unsigned int anded_words[NWORDS];
45029static void add_to_ored_words (float x)
45030{
45031  memory_float m;
45032  size_t i;
45033  /* Clear it first, in case
45034     sizeof (float) < sizeof (memory_float).  */
45035  memset (&m, 0, sizeof (memory_float));
45036  m.value = x;
45037  for (i = 0; i < NWORDS; i++)
45038    {
45039      ored_words[i] |= m.word[i];
45040      anded_words[i] &= m.word[i];
45041    }
45042}
45043int main ()
45044{
45045  size_t j;
45046  FILE *fp = fopen ("conftest.out", "w");
45047  if (fp == NULL)
45048    return 1;
45049  for (j = 0; j < NWORDS; j++)
45050    anded_words[j] = ~ (unsigned int) 0;
45051  add_to_ored_words (0.25f);
45052  add_to_ored_words (0.5f);
45053  add_to_ored_words (1.0f);
45054  add_to_ored_words (2.0f);
45055  add_to_ored_words (4.0f);
45056  /* Remove bits that are common (e.g. if representation of the first mantissa
45057     bit is explicit).  */
45058  for (j = 0; j < NWORDS; j++)
45059    ored_words[j] &= ~anded_words[j];
45060  /* Now find the nonzero word.  */
45061  for (j = 0; j < NWORDS; j++)
45062    if (ored_words[j] != 0)
45063      break;
45064  if (j < NWORDS)
45065    {
45066      size_t i;
45067      for (i = j + 1; i < NWORDS; i++)
45068        if (ored_words[i] != 0)
45069          {
45070            fprintf (fp, "unknown");
45071            return (fclose (fp) != 0);
45072          }
45073      for (i = 0; ; i++)
45074        if ((ored_words[j] >> i) & 1)
45075          {
45076            fprintf (fp, "word %d bit %d", (int) j, (int) i);
45077            return (fclose (fp) != 0);
45078          }
45079    }
45080  fprintf (fp, "unknown");
45081  return (fclose (fp) != 0);
45082}
45083
45084_ACEOF
45085if ac_fn_c_try_run "$LINENO"; then :
45086  gl_cv_cc_float_expbit0=`cat conftest.out`
45087else
45088  gl_cv_cc_float_expbit0="unknown"
45089fi
45090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45091  conftest.$ac_objext conftest.beam conftest.$ac_ext
45092fi
45093
45094      rm -f conftest.out
45095
45096fi
45097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
45098$as_echo "$gl_cv_cc_float_expbit0" >&6; }
45099  case "$gl_cv_cc_float_expbit0" in
45100    word*bit*)
45101      word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
45102      bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
45103
45104cat >>confdefs.h <<_ACEOF
45105#define FLT_EXPBIT0_WORD $word
45106_ACEOF
45107
45108
45109cat >>confdefs.h <<_ACEOF
45110#define FLT_EXPBIT0_BIT $bit
45111_ACEOF
45112
45113      ;;
45114  esac
45115
45116
45117  fi
45118
45119
45120  ISNANL_LIBM=
45121
45122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
45123$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
45124if ${gl_cv_func_isnanl_no_libm+:} false; then :
45125  $as_echo_n "(cached) " >&6
45126else
45127
45128      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45129/* end confdefs.h.  */
45130#include <math.h>
45131             #ifndef __has_builtin
45132             # define __has_builtin(name) 0
45133             #endif
45134             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
45135             # undef isnanl
45136             # define isnanl(x) __builtin_isnanl ((long double)(x))
45137             #elif defined isnan
45138             # undef isnanl
45139             # define isnanl(x) isnan ((long double)(x))
45140             #endif
45141             long double x;
45142int
45143main ()
45144{
45145return isnanl (x);
45146  ;
45147  return 0;
45148}
45149_ACEOF
45150if ac_fn_c_try_link "$LINENO"; then :
45151  gl_cv_func_isnanl_no_libm=yes
45152else
45153  gl_cv_func_isnanl_no_libm=no
45154fi
45155rm -f core conftest.err conftest.$ac_objext \
45156    conftest$ac_exeext conftest.$ac_ext
45157
45158fi
45159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
45160$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
45161
45162  if test $gl_cv_func_isnanl_no_libm = no; then
45163
45164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used with libm" >&5
45165$as_echo_n "checking whether isnan(long double) can be used with libm... " >&6; }
45166if ${gl_cv_func_isnanl_in_libm+:} false; then :
45167  $as_echo_n "(cached) " >&6
45168else
45169
45170      save_LIBS="$LIBS"
45171      LIBS="$LIBS -lm"
45172      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45173/* end confdefs.h.  */
45174#include <math.h>
45175             #ifndef __has_builtin
45176             # define __has_builtin(name) 0
45177             #endif
45178             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
45179             # undef isnanl
45180             # define isnanl(x) __builtin_isnanl ((long double)(x))
45181             #elif defined isnan
45182             # undef isnanl
45183             # define isnanl(x) isnan ((long double)(x))
45184             #endif
45185             long double x;
45186int
45187main ()
45188{
45189return isnanl (x);
45190  ;
45191  return 0;
45192}
45193_ACEOF
45194if ac_fn_c_try_link "$LINENO"; then :
45195  gl_cv_func_isnanl_in_libm=yes
45196else
45197  gl_cv_func_isnanl_in_libm=no
45198fi
45199rm -f core conftest.err conftest.$ac_objext \
45200    conftest$ac_exeext conftest.$ac_ext
45201      LIBS="$save_LIBS"
45202
45203fi
45204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_in_libm" >&5
45205$as_echo "$gl_cv_func_isnanl_in_libm" >&6; }
45206
45207    if test $gl_cv_func_isnanl_in_libm = yes; then
45208      ISNANL_LIBM=-lm
45209    fi
45210  fi
45211    if test $gl_cv_func_isnanl_no_libm = yes \
45212     || test $gl_cv_func_isnanl_in_libm = yes; then
45213    save_LIBS="$LIBS"
45214    LIBS="$LIBS $ISNANL_LIBM"
45215
45216
45217
45218
45219     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
45220$as_echo_n "checking whether isnanl works... " >&6; }
45221if ${gl_cv_func_isnanl_works+:} false; then :
45222  $as_echo_n "(cached) " >&6
45223else
45224
45225      if test "$cross_compiling" = yes; then :
45226  case "$host_os" in
45227           mingw*) # Guess yes on mingw, no on MSVC.
45228             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45229/* end confdefs.h.  */
45230
45231#ifdef __MINGW32__
45232 Known
45233#endif
45234
45235_ACEOF
45236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45237  $EGREP "Known" >/dev/null 2>&1; then :
45238  gl_cv_func_isnanl_works="guessing yes"
45239else
45240  gl_cv_func_isnanl_works="guessing no"
45241fi
45242rm -f conftest*
45243
45244             ;;
45245           *) gl_cv_func_isnanl_works="guessing yes" ;;
45246         esac
45247
45248else
45249  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45250/* end confdefs.h.  */
45251
45252#include <float.h>
45253#include <limits.h>
45254#include <math.h>
45255#ifndef __has_builtin
45256# define __has_builtin(name) 0
45257#endif
45258#if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
45259# undef isnanl
45260# define isnanl(x) __builtin_isnanl ((long double)(x))
45261#elif defined isnan
45262# undef isnanl
45263# define isnanl(x) isnan ((long double)(x))
45264#endif
45265#define NWORDS \
45266  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45267typedef union { unsigned int word[NWORDS]; long double value; }
45268        memory_long_double;
45269/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
45270   runtime type conversion.  */
45271#ifdef __sgi
45272static long double NaNl ()
45273{
45274  double zero = 0.0;
45275  return zero / zero;
45276}
45277#else
45278# define NaNl() (0.0L / 0.0L)
45279#endif
45280int main ()
45281{
45282  int result = 0;
45283
45284  if (!isnanl (NaNl ()))
45285    result |= 1;
45286
45287  {
45288    memory_long_double m;
45289    unsigned int i;
45290
45291    /* The isnanl function should be immune against changes in the sign bit and
45292       in the mantissa bits.  The xor operation twiddles a bit that can only be
45293       a sign bit or a mantissa bit (since the exponent never extends to
45294       bit 31).  */
45295    m.value = NaNl ();
45296    m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
45297    for (i = 0; i < NWORDS; i++)
45298      m.word[i] |= 1;
45299    if (!isnanl (m.value))
45300      result |= 1;
45301  }
45302
45303#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
45304/* Representation of an 80-bit 'long double' as an initializer for a sequence
45305   of 'unsigned int' words.  */
45306# ifdef WORDS_BIGENDIAN
45307#  define LDBL80_WORDS(exponent,manthi,mantlo) \
45308     { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
45309       ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
45310       (unsigned int) (mantlo) << 16                                        \
45311     }
45312# else
45313#  define LDBL80_WORDS(exponent,manthi,mantlo) \
45314     { mantlo, manthi, exponent }
45315# endif
45316  { /* Quiet NaN.  */
45317    static memory_long_double x =
45318      { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
45319    if (!isnanl (x.value))
45320      result |= 2;
45321  }
45322  {
45323    /* Signalling NaN.  */
45324    static memory_long_double x =
45325      { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
45326    if (!isnanl (x.value))
45327      result |= 2;
45328  }
45329  /* isnanl should return something even for noncanonical values.  */
45330  { /* Pseudo-NaN.  */
45331    static memory_long_double x =
45332      { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
45333    if (isnanl (x.value) && !isnanl (x.value))
45334      result |= 4;
45335  }
45336  { /* Pseudo-Infinity.  */
45337    static memory_long_double x =
45338      { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
45339    if (isnanl (x.value) && !isnanl (x.value))
45340      result |= 8;
45341  }
45342  { /* Pseudo-Zero.  */
45343    static memory_long_double x =
45344      { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
45345    if (isnanl (x.value) && !isnanl (x.value))
45346      result |= 16;
45347  }
45348  { /* Unnormalized number.  */
45349    static memory_long_double x =
45350      { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
45351    if (isnanl (x.value) && !isnanl (x.value))
45352      result |= 32;
45353  }
45354  { /* Pseudo-Denormal.  */
45355    static memory_long_double x =
45356      { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
45357    if (isnanl (x.value) && !isnanl (x.value))
45358      result |= 64;
45359  }
45360#endif
45361
45362  return result;
45363}
45364_ACEOF
45365if ac_fn_c_try_run "$LINENO"; then :
45366  gl_cv_func_isnanl_works=yes
45367else
45368  gl_cv_func_isnanl_works=no
45369fi
45370rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45371  conftest.$ac_objext conftest.beam conftest.$ac_ext
45372fi
45373
45374
45375fi
45376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
45377$as_echo "$gl_cv_func_isnanl_works" >&6; }
45378
45379    LIBS="$save_LIBS"
45380    case "$gl_cv_func_isnanl_works" in
45381      *yes) gl_func_isnanl=yes ;;
45382      *)    gl_func_isnanl=no; ISNANL_LIBM= ;;
45383    esac
45384  else
45385    gl_func_isnanl=no
45386  fi
45387  if test $gl_func_isnanl != yes; then
45388    HAVE_ISNANL=0
45389  fi
45390
45391
45392
45393
45394
45395  if test $HAVE_ISNANL = 0 || test $REPLACE_ISNAN = 1; then
45396
45397
45398
45399
45400
45401
45402
45403
45404  gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
45405
45406
45407
45408
45409     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
45410$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
45411if ${gl_cv_cc_long_double_expbit0+:} false; then :
45412  $as_echo_n "(cached) " >&6
45413else
45414
45415      if test "$cross_compiling" = yes; then :
45416
45417                              gl_cv_cc_long_double_expbit0="unknown"
45418          case "$host_os" in
45419            mingw*) # On native Windows (little-endian), we know the result
45420                    # in two cases: mingw, MSVC.
45421              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45422/* end confdefs.h.  */
45423
45424#ifdef __MINGW32__
45425 Known
45426#endif
45427
45428_ACEOF
45429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45430  $EGREP "Known" >/dev/null 2>&1; then :
45431  gl_cv_cc_long_double_expbit0="word 2 bit 0"
45432fi
45433rm -f conftest*
45434
45435              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45436/* end confdefs.h.  */
45437
45438#ifdef _MSC_VER
45439 Known
45440#endif
45441
45442_ACEOF
45443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45444  $EGREP "Known" >/dev/null 2>&1; then :
45445  gl_cv_cc_long_double_expbit0="word 1 bit 20"
45446fi
45447rm -f conftest*
45448
45449              ;;
45450          esac
45451
45452else
45453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45454/* end confdefs.h.  */
45455
45456#include <float.h>
45457#include <stddef.h>
45458#include <stdio.h>
45459#include <string.h>
45460#define NWORDS \
45461  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45462typedef union { long double value; unsigned int word[NWORDS]; }
45463        memory_long_double;
45464static unsigned int ored_words[NWORDS];
45465static unsigned int anded_words[NWORDS];
45466static void add_to_ored_words (long double *x)
45467{
45468  memory_long_double m;
45469  size_t i;
45470  /* Clear it first, in case
45471     sizeof (long double) < sizeof (memory_long_double).  */
45472  memset (&m, 0, sizeof (memory_long_double));
45473  m.value = *x;
45474  for (i = 0; i < NWORDS; i++)
45475    {
45476      ored_words[i] |= m.word[i];
45477      anded_words[i] &= m.word[i];
45478    }
45479}
45480int main ()
45481{
45482  static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
45483  size_t j;
45484  FILE *fp = fopen ("conftest.out", "w");
45485  if (fp == NULL)
45486    return 1;
45487  for (j = 0; j < NWORDS; j++)
45488    anded_words[j] = ~ (unsigned int) 0;
45489  for (j = 0; j < 5; j++)
45490    add_to_ored_words (&samples[j]);
45491  /* Remove bits that are common (e.g. if representation of the first mantissa
45492     bit is explicit).  */
45493  for (j = 0; j < NWORDS; j++)
45494    ored_words[j] &= ~anded_words[j];
45495  /* Now find the nonzero word.  */
45496  for (j = 0; j < NWORDS; j++)
45497    if (ored_words[j] != 0)
45498      break;
45499  if (j < NWORDS)
45500    {
45501      size_t i;
45502      for (i = j + 1; i < NWORDS; i++)
45503        if (ored_words[i] != 0)
45504          {
45505            fprintf (fp, "unknown");
45506            return (fclose (fp) != 0);
45507          }
45508      for (i = 0; ; i++)
45509        if ((ored_words[j] >> i) & 1)
45510          {
45511            fprintf (fp, "word %d bit %d", (int) j, (int) i);
45512            return (fclose (fp) != 0);
45513          }
45514    }
45515  fprintf (fp, "unknown");
45516  return (fclose (fp) != 0);
45517}
45518
45519_ACEOF
45520if ac_fn_c_try_run "$LINENO"; then :
45521  gl_cv_cc_long_double_expbit0=`cat conftest.out`
45522else
45523  gl_cv_cc_long_double_expbit0="unknown"
45524fi
45525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45526  conftest.$ac_objext conftest.beam conftest.$ac_ext
45527fi
45528
45529      rm -f conftest.out
45530
45531fi
45532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
45533$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
45534  case "$gl_cv_cc_long_double_expbit0" in
45535    word*bit*)
45536      word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
45537      bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
45538
45539cat >>confdefs.h <<_ACEOF
45540#define LDBL_EXPBIT0_WORD $word
45541_ACEOF
45542
45543
45544cat >>confdefs.h <<_ACEOF
45545#define LDBL_EXPBIT0_BIT $bit
45546_ACEOF
45547
45548      ;;
45549  esac
45550
45551
45552
45553  fi
45554
45555
45556
45557
45558
45559          GNULIB_ISNANL=1
45560
45561
45562
45563
45564
45565$as_echo "#define GNULIB_TEST_ISNANL 1" >>confdefs.h
45566
45567
45568
45569
45570
45571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
45572$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
45573if ${gl_cv_func_isnanl_no_libm+:} false; then :
45574  $as_echo_n "(cached) " >&6
45575else
45576
45577      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45578/* end confdefs.h.  */
45579#include <math.h>
45580             #ifndef __has_builtin
45581             # define __has_builtin(name) 0
45582             #endif
45583             #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
45584             # undef isnanl
45585             # define isnanl(x) __builtin_isnanl ((long double)(x))
45586             #elif defined isnan
45587             # undef isnanl
45588             # define isnanl(x) isnan ((long double)(x))
45589             #endif
45590             long double x;
45591int
45592main ()
45593{
45594return isnanl (x);
45595  ;
45596  return 0;
45597}
45598_ACEOF
45599if ac_fn_c_try_link "$LINENO"; then :
45600  gl_cv_func_isnanl_no_libm=yes
45601else
45602  gl_cv_func_isnanl_no_libm=no
45603fi
45604rm -f core conftest.err conftest.$ac_objext \
45605    conftest$ac_exeext conftest.$ac_ext
45606
45607fi
45608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
45609$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
45610
45611  gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
45612  if test $gl_func_isnanl_no_libm = yes; then
45613
45614
45615
45616
45617     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
45618$as_echo_n "checking whether isnanl works... " >&6; }
45619if ${gl_cv_func_isnanl_works+:} false; then :
45620  $as_echo_n "(cached) " >&6
45621else
45622
45623      if test "$cross_compiling" = yes; then :
45624  case "$host_os" in
45625           mingw*) # Guess yes on mingw, no on MSVC.
45626             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45627/* end confdefs.h.  */
45628
45629#ifdef __MINGW32__
45630 Known
45631#endif
45632
45633_ACEOF
45634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45635  $EGREP "Known" >/dev/null 2>&1; then :
45636  gl_cv_func_isnanl_works="guessing yes"
45637else
45638  gl_cv_func_isnanl_works="guessing no"
45639fi
45640rm -f conftest*
45641
45642             ;;
45643           *) gl_cv_func_isnanl_works="guessing yes" ;;
45644         esac
45645
45646else
45647  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45648/* end confdefs.h.  */
45649
45650#include <float.h>
45651#include <limits.h>
45652#include <math.h>
45653#ifndef __has_builtin
45654# define __has_builtin(name) 0
45655#endif
45656#if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
45657# undef isnanl
45658# define isnanl(x) __builtin_isnanl ((long double)(x))
45659#elif defined isnan
45660# undef isnanl
45661# define isnanl(x) isnan ((long double)(x))
45662#endif
45663#define NWORDS \
45664  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45665typedef union { unsigned int word[NWORDS]; long double value; }
45666        memory_long_double;
45667/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
45668   runtime type conversion.  */
45669#ifdef __sgi
45670static long double NaNl ()
45671{
45672  double zero = 0.0;
45673  return zero / zero;
45674}
45675#else
45676# define NaNl() (0.0L / 0.0L)
45677#endif
45678int main ()
45679{
45680  int result = 0;
45681
45682  if (!isnanl (NaNl ()))
45683    result |= 1;
45684
45685  {
45686    memory_long_double m;
45687    unsigned int i;
45688
45689    /* The isnanl function should be immune against changes in the sign bit and
45690       in the mantissa bits.  The xor operation twiddles a bit that can only be
45691       a sign bit or a mantissa bit (since the exponent never extends to
45692       bit 31).  */
45693    m.value = NaNl ();
45694    m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
45695    for (i = 0; i < NWORDS; i++)
45696      m.word[i] |= 1;
45697    if (!isnanl (m.value))
45698      result |= 1;
45699  }
45700
45701#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
45702/* Representation of an 80-bit 'long double' as an initializer for a sequence
45703   of 'unsigned int' words.  */
45704# ifdef WORDS_BIGENDIAN
45705#  define LDBL80_WORDS(exponent,manthi,mantlo) \
45706     { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
45707       ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16),   \
45708       (unsigned int) (mantlo) << 16                                        \
45709     }
45710# else
45711#  define LDBL80_WORDS(exponent,manthi,mantlo) \
45712     { mantlo, manthi, exponent }
45713# endif
45714  { /* Quiet NaN.  */
45715    static memory_long_double x =
45716      { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
45717    if (!isnanl (x.value))
45718      result |= 2;
45719  }
45720  {
45721    /* Signalling NaN.  */
45722    static memory_long_double x =
45723      { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
45724    if (!isnanl (x.value))
45725      result |= 2;
45726  }
45727  /* isnanl should return something even for noncanonical values.  */
45728  { /* Pseudo-NaN.  */
45729    static memory_long_double x =
45730      { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
45731    if (isnanl (x.value) && !isnanl (x.value))
45732      result |= 4;
45733  }
45734  { /* Pseudo-Infinity.  */
45735    static memory_long_double x =
45736      { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
45737    if (isnanl (x.value) && !isnanl (x.value))
45738      result |= 8;
45739  }
45740  { /* Pseudo-Zero.  */
45741    static memory_long_double x =
45742      { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
45743    if (isnanl (x.value) && !isnanl (x.value))
45744      result |= 16;
45745  }
45746  { /* Unnormalized number.  */
45747    static memory_long_double x =
45748      { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
45749    if (isnanl (x.value) && !isnanl (x.value))
45750      result |= 32;
45751  }
45752  { /* Pseudo-Denormal.  */
45753    static memory_long_double x =
45754      { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
45755    if (isnanl (x.value) && !isnanl (x.value))
45756      result |= 64;
45757  }
45758#endif
45759
45760  return result;
45761}
45762_ACEOF
45763if ac_fn_c_try_run "$LINENO"; then :
45764  gl_cv_func_isnanl_works=yes
45765else
45766  gl_cv_func_isnanl_works=no
45767fi
45768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45769  conftest.$ac_objext conftest.beam conftest.$ac_ext
45770fi
45771
45772
45773fi
45774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
45775$as_echo "$gl_cv_func_isnanl_works" >&6; }
45776
45777    case "$gl_cv_func_isnanl_works" in
45778      *yes) ;;
45779      *)    gl_func_isnanl_no_libm=no ;;
45780    esac
45781  fi
45782  if test $gl_func_isnanl_no_libm = yes; then
45783
45784$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
45785
45786  fi
45787
45788  if test $gl_func_isnanl_no_libm != yes; then
45789
45790
45791
45792
45793
45794
45795
45796
45797  gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
45798
45799
45800
45801
45802     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
45803$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
45804if ${gl_cv_cc_long_double_expbit0+:} false; then :
45805  $as_echo_n "(cached) " >&6
45806else
45807
45808      if test "$cross_compiling" = yes; then :
45809
45810                              gl_cv_cc_long_double_expbit0="unknown"
45811          case "$host_os" in
45812            mingw*) # On native Windows (little-endian), we know the result
45813                    # in two cases: mingw, MSVC.
45814              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45815/* end confdefs.h.  */
45816
45817#ifdef __MINGW32__
45818 Known
45819#endif
45820
45821_ACEOF
45822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45823  $EGREP "Known" >/dev/null 2>&1; then :
45824  gl_cv_cc_long_double_expbit0="word 2 bit 0"
45825fi
45826rm -f conftest*
45827
45828              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45829/* end confdefs.h.  */
45830
45831#ifdef _MSC_VER
45832 Known
45833#endif
45834
45835_ACEOF
45836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45837  $EGREP "Known" >/dev/null 2>&1; then :
45838  gl_cv_cc_long_double_expbit0="word 1 bit 20"
45839fi
45840rm -f conftest*
45841
45842              ;;
45843          esac
45844
45845else
45846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45847/* end confdefs.h.  */
45848
45849#include <float.h>
45850#include <stddef.h>
45851#include <stdio.h>
45852#include <string.h>
45853#define NWORDS \
45854  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
45855typedef union { long double value; unsigned int word[NWORDS]; }
45856        memory_long_double;
45857static unsigned int ored_words[NWORDS];
45858static unsigned int anded_words[NWORDS];
45859static void add_to_ored_words (long double *x)
45860{
45861  memory_long_double m;
45862  size_t i;
45863  /* Clear it first, in case
45864     sizeof (long double) < sizeof (memory_long_double).  */
45865  memset (&m, 0, sizeof (memory_long_double));
45866  m.value = *x;
45867  for (i = 0; i < NWORDS; i++)
45868    {
45869      ored_words[i] |= m.word[i];
45870      anded_words[i] &= m.word[i];
45871    }
45872}
45873int main ()
45874{
45875  static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
45876  size_t j;
45877  FILE *fp = fopen ("conftest.out", "w");
45878  if (fp == NULL)
45879    return 1;
45880  for (j = 0; j < NWORDS; j++)
45881    anded_words[j] = ~ (unsigned int) 0;
45882  for (j = 0; j < 5; j++)
45883    add_to_ored_words (&samples[j]);
45884  /* Remove bits that are common (e.g. if representation of the first mantissa
45885     bit is explicit).  */
45886  for (j = 0; j < NWORDS; j++)
45887    ored_words[j] &= ~anded_words[j];
45888  /* Now find the nonzero word.  */
45889  for (j = 0; j < NWORDS; j++)
45890    if (ored_words[j] != 0)
45891      break;
45892  if (j < NWORDS)
45893    {
45894      size_t i;
45895      for (i = j + 1; i < NWORDS; i++)
45896        if (ored_words[i] != 0)
45897          {
45898            fprintf (fp, "unknown");
45899            return (fclose (fp) != 0);
45900          }
45901      for (i = 0; ; i++)
45902        if ((ored_words[j] >> i) & 1)
45903          {
45904            fprintf (fp, "word %d bit %d", (int) j, (int) i);
45905            return (fclose (fp) != 0);
45906          }
45907    }
45908  fprintf (fp, "unknown");
45909  return (fclose (fp) != 0);
45910}
45911
45912_ACEOF
45913if ac_fn_c_try_run "$LINENO"; then :
45914  gl_cv_cc_long_double_expbit0=`cat conftest.out`
45915else
45916  gl_cv_cc_long_double_expbit0="unknown"
45917fi
45918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45919  conftest.$ac_objext conftest.beam conftest.$ac_ext
45920fi
45921
45922      rm -f conftest.out
45923
45924fi
45925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
45926$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
45927  case "$gl_cv_cc_long_double_expbit0" in
45928    word*bit*)
45929      word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
45930      bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
45931
45932cat >>confdefs.h <<_ACEOF
45933#define LDBL_EXPBIT0_WORD $word
45934_ACEOF
45935
45936
45937cat >>confdefs.h <<_ACEOF
45938#define LDBL_EXPBIT0_BIT $bit
45939_ACEOF
45940
45941      ;;
45942  esac
45943
45944
45945
45946  fi
45947
45948
45949
45950
45951
45952  ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
45953/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
45954   <wchar.h>.
45955   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
45956   before <wchar.h>.  */
45957#include <stddef.h>
45958#include <stdio.h>
45959#include <time.h>
45960#include <wchar.h>
45961#include <wctype.h>
45962
45963"
45964if test "x$ac_cv_have_decl_iswblank" = xyes; then :
45965  ac_have_decl=1
45966else
45967  ac_have_decl=0
45968fi
45969
45970cat >>confdefs.h <<_ACEOF
45971#define HAVE_DECL_ISWBLANK $ac_have_decl
45972_ACEOF
45973
45974  if test $ac_cv_func_iswblank = no; then
45975    HAVE_ISWBLANK=0
45976    if test $ac_cv_have_decl_iswblank = yes; then
45977      REPLACE_ISWBLANK=1
45978    fi
45979  fi
45980  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
45981        :
45982  else
45983    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
45984            :
45985    fi
45986  fi
45987
45988
45989  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
45990    :
45991  else
45992    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
45993
45994
45995
45996
45997
45998
45999
46000
46001  gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
46002
46003    fi
46004  fi
46005
46006
46007
46008
46009
46010          GNULIB_ISWBLANK=1
46011
46012
46013
46014
46015
46016$as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
46017
46018
46019
46020
46021
46022
46023
46024
46025
46026
46027
46028  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
46029        REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
46030  else
46031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswdigit is ISO C compliant" >&5
46032$as_echo_n "checking whether iswdigit is ISO C compliant... " >&6; }
46033if ${gl_cv_func_iswdigit_works+:} false; then :
46034  $as_echo_n "(cached) " >&6
46035else
46036
46037                     case "$host_os" in
46038         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
46039         freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
46040           gl_cv_func_iswdigit_works="guessing no" ;;
46041         # Guess yes otherwise.
46042         *) gl_cv_func_iswdigit_works="guessing yes" ;;
46043       esac
46044       if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
46045         if test "$cross_compiling" = yes; then :
46046  :
46047else
46048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46049/* end confdefs.h.  */
46050
46051#include <locale.h>
46052#include <stdlib.h>
46053#include <string.h>
46054/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
46055   <wchar.h>.
46056   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
46057   included before <wchar.h>.  */
46058#include <stddef.h>
46059#include <stdio.h>
46060#include <time.h>
46061#include <wchar.h>
46062#include <wctype.h>
46063
46064/* Returns the value of iswdigit for the multibyte character s[0..n-1].  */
46065static int
46066for_character (const char *s, size_t n)
46067{
46068  mbstate_t state;
46069  wchar_t wc;
46070  size_t ret;
46071
46072  memset (&state, '\0', sizeof (mbstate_t));
46073  wc = (wchar_t) 0xBADFACE;
46074  ret = mbrtowc (&wc, s, n, &state);
46075  if (ret != n)
46076    abort ();
46077
46078  return iswdigit (wc);
46079}
46080
46081int
46082main (int argc, char *argv[])
46083{
46084  int is;
46085  int result = 0;
46086
46087  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
46088    {
46089      /* This fails on mingw, MSVC 14.  */
46090      /* U+00B2 SUPERSCRIPT TWO */
46091      is = for_character ("\262", 1);
46092      if (!(is == 0))
46093        result |= 1;
46094    }
46095  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
46096    {
46097      /* This fails on NetBSD 8.0.  */
46098      /* U+FF11 FULLWIDTH DIGIT ONE */
46099      is = for_character ("\243\261", 2);
46100      if (!(is == 0))
46101        result |= 2;
46102    }
46103  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
46104    {
46105      /* This fails on FreeBSD 12, NetBSD 8.0, MSVC 14.  */
46106      /* U+0663 ARABIC-INDIC DIGIT THREE */
46107      is = for_character ("\331\243", 2);
46108      if (!(is == 0))
46109        result |= 4;
46110      /* This fails on FreeBSD 12, NetBSD 8.0, MSVC 14.  */
46111      /* U+FF11 FULLWIDTH DIGIT ONE */
46112      is = for_character ("\357\274\221", 3);
46113      if (!(is == 0))
46114        result |= 8;
46115    }
46116  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
46117    {
46118      /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4.  */
46119      /* U+FF11 FULLWIDTH DIGIT ONE */
46120      is = for_character ("\243\261", 2);
46121      if (!(is == 0))
46122        result |= 16;
46123    }
46124  return result;
46125}
46126_ACEOF
46127if ac_fn_c_try_run "$LINENO"; then :
46128  gl_cv_func_iswdigit_works=yes
46129else
46130  gl_cv_func_iswdigit_works=no
46131fi
46132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46133  conftest.$ac_objext conftest.beam conftest.$ac_ext
46134fi
46135
46136       fi
46137
46138fi
46139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswdigit_works" >&5
46140$as_echo "$gl_cv_func_iswdigit_works" >&6; }
46141    case "$gl_cv_func_iswdigit_works" in
46142      *yes) ;;
46143      *) REPLACE_ISWDIGIT=1 ;;
46144    esac
46145  fi
46146
46147  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
46148    :
46149  else
46150    if test $REPLACE_ISWDIGIT = 1; then
46151
46152
46153
46154
46155
46156
46157
46158
46159  gl_LIBOBJS="$gl_LIBOBJS iswdigit.$ac_objext"
46160
46161    fi
46162  fi
46163
46164
46165
46166
46167
46168          GNULIB_ISWDIGIT=1
46169
46170
46171
46172
46173
46174$as_echo "#define GNULIB_TEST_ISWDIGIT 1" >>confdefs.h
46175
46176
46177
46178
46179
46180
46181
46182
46183
46184
46185  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
46186        REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
46187  else
46188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswxdigit is ISO C compliant" >&5
46189$as_echo_n "checking whether iswxdigit is ISO C compliant... " >&6; }
46190if ${gl_cv_func_iswxdigit_works+:} false; then :
46191  $as_echo_n "(cached) " >&6
46192else
46193
46194                     case "$host_os" in
46195         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
46196         freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
46197           gl_cv_func_iswxdigit_works="guessing no" ;;
46198         # Guess yes otherwise.
46199         *) gl_cv_func_iswxdigit_works="guessing yes" ;;
46200       esac
46201       if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
46202         if test "$cross_compiling" = yes; then :
46203  :
46204else
46205  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46206/* end confdefs.h.  */
46207
46208#include <locale.h>
46209#include <stdlib.h>
46210#include <string.h>
46211/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
46212   <wchar.h>.
46213   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
46214   included before <wchar.h>.  */
46215#include <stddef.h>
46216#include <stdio.h>
46217#include <time.h>
46218#include <wchar.h>
46219#include <wctype.h>
46220
46221/* Returns the value of iswxdigit for the multibyte character s[0..n-1].  */
46222static int
46223for_character (const char *s, size_t n)
46224{
46225  mbstate_t state;
46226  wchar_t wc;
46227  size_t ret;
46228
46229  memset (&state, '\0', sizeof (mbstate_t));
46230  wc = (wchar_t) 0xBADFACE;
46231  ret = mbrtowc (&wc, s, n, &state);
46232  if (ret != n)
46233    abort ();
46234
46235  return iswxdigit (wc);
46236}
46237
46238int
46239main (int argc, char *argv[])
46240{
46241  int is;
46242  int result = 0;
46243
46244  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
46245    {
46246      /* This fails on NetBSD 8.0.  */
46247      /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
46248      is = for_character ("\243\301", 2);
46249      if (!(is == 0))
46250        result |= 1;
46251    }
46252  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
46253    {
46254      /* This fails on FreeBSD 12.  */
46255      /* U+0663 ARABIC-INDIC DIGIT THREE */
46256      is = for_character ("\331\243", 2);
46257      if (!(is == 0))
46258        result |= 2;
46259      /* This fails on MSVC 14.  */
46260      /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
46261      is = for_character ("\357\274\241", 3);
46262      if (!(is == 0))
46263        result |= 4;
46264    }
46265  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
46266    {
46267      /* This fails on Solaris 10, Solaris 11.4.  */
46268      /* U+FF11 FULLWIDTH DIGIT ONE */
46269      is = for_character ("\243\261", 2);
46270      if (!(is == 0))
46271        result |= 8;
46272    }
46273  return result;
46274}
46275_ACEOF
46276if ac_fn_c_try_run "$LINENO"; then :
46277  gl_cv_func_iswxdigit_works=yes
46278else
46279  gl_cv_func_iswxdigit_works=no
46280fi
46281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46282  conftest.$ac_objext conftest.beam conftest.$ac_ext
46283fi
46284
46285       fi
46286
46287fi
46288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswxdigit_works" >&5
46289$as_echo "$gl_cv_func_iswxdigit_works" >&6; }
46290    case "$gl_cv_func_iswxdigit_works" in
46291      *yes) ;;
46292      *) REPLACE_ISWXDIGIT=1 ;;
46293    esac
46294  fi
46295
46296  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
46297    :
46298  else
46299    if test $REPLACE_ISWXDIGIT = 1; then
46300
46301
46302
46303
46304
46305
46306
46307
46308  gl_LIBOBJS="$gl_LIBOBJS iswxdigit.$ac_objext"
46309
46310    fi
46311  fi
46312
46313
46314
46315
46316
46317          GNULIB_ISWXDIGIT=1
46318
46319
46320
46321
46322
46323$as_echo "#define GNULIB_TEST_ISWXDIGIT 1" >>confdefs.h
46324
46325
46326
46327
46328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use Java" >&5
46329$as_echo_n "checking whether to use Java... " >&6; }
46330  # Check whether --enable-java was given.
46331if test "${enable_java+set}" = set; then :
46332  enableval=$enable_java; JAVA_CHOICE="$enableval"
46333else
46334  JAVA_CHOICE=yes
46335fi
46336
46337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHOICE" >&5
46338$as_echo "$JAVA_CHOICE" >&6; }
46339
46340
46341  # You need to invoke gt_JAVACOMP yourself, possibly with arguments.
46342  ac_config_files="$ac_config_files javacomp.sh:../build-aux/javacomp.sh.in"
46343
46344  # You need to invoke gt_JAVAEXEC yourself, possibly with arguments.
46345  ac_config_files="$ac_config_files javaexec.sh:../build-aux/javaexec.sh.in"
46346
46347
46348
46349
46350
46351
46352
46353
46354
46355
46356
46357
46358
46359
46360
46361     if test $gl_cv_have_include_next = yes; then
46362       gl_cv_next_langinfo_h='<'langinfo.h'>'
46363     else
46364       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
46365$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
46366if ${gl_cv_next_langinfo_h+:} false; then :
46367  $as_echo_n "(cached) " >&6
46368else
46369
46370             if test $ac_cv_header_langinfo_h = yes; then
46371
46372
46373
46374
46375  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46376/* end confdefs.h.  */
46377#include <langinfo.h>
46378_ACEOF
46379                case "$host_os" in
46380    aix*) gl_absname_cpp="$ac_cpp -C" ;;
46381    *)    gl_absname_cpp="$ac_cpp" ;;
46382  esac
46383
46384  case "$host_os" in
46385    mingw*)
46386                                          gl_dirsep_regex='[/\\]'
46387      ;;
46388    *)
46389      gl_dirsep_regex='\/'
46390      ;;
46391  esac
46392      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
46393  gl_header_literal_regex=`echo 'langinfo.h' \
46394                           | sed -e "$gl_make_literal_regex_sed"`
46395  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
46396      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
46397      s|^/[^/]|//&|
46398      p
46399      q
46400    }'
46401
46402        gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
46403  sed -n "$gl_absolute_header_sed"`
46404
46405           gl_header=$gl_cv_absolute_langinfo_h
46406           gl_cv_next_langinfo_h='"'$gl_header'"'
46407          else
46408               gl_cv_next_langinfo_h='<'langinfo.h'>'
46409             fi
46410
46411
46412fi
46413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
46414$as_echo "$gl_cv_next_langinfo_h" >&6; }
46415     fi
46416     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
46417
46418     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
46419       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
46420       gl_next_as_first_directive='<'langinfo.h'>'
46421     else
46422       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
46423       gl_next_as_first_directive=$gl_cv_next_langinfo_h
46424     fi
46425     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
46426
46427
46428
46429
46430
46431    HAVE_LANGINFO_CODESET=0
46432  HAVE_LANGINFO_T_FMT_AMPM=0
46433  HAVE_LANGINFO_ALTMON=0
46434  HAVE_LANGINFO_ERA=0
46435  HAVE_LANGINFO_YESEXPR=0
46436
46437  if test $ac_cv_header_langinfo_h = yes; then
46438    HAVE_LANGINFO_H=1
46439                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
46440$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
46441if ${gl_cv_header_langinfo_codeset+:} false; then :
46442  $as_echo_n "(cached) " >&6
46443else
46444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46445/* end confdefs.h.  */
46446#include <langinfo.h>
46447int a = CODESET;
46448
46449int
46450main ()
46451{
46452
46453  ;
46454  return 0;
46455}
46456_ACEOF
46457if ac_fn_c_try_compile "$LINENO"; then :
46458  gl_cv_header_langinfo_codeset=yes
46459else
46460  gl_cv_header_langinfo_codeset=no
46461fi
46462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46463
46464fi
46465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
46466$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
46467    if test $gl_cv_header_langinfo_codeset = yes; then
46468      HAVE_LANGINFO_CODESET=1
46469    fi
46470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
46471$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
46472if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
46473  $as_echo_n "(cached) " >&6
46474else
46475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46476/* end confdefs.h.  */
46477#include <langinfo.h>
46478int a = T_FMT_AMPM;
46479
46480int
46481main ()
46482{
46483
46484  ;
46485  return 0;
46486}
46487_ACEOF
46488if ac_fn_c_try_compile "$LINENO"; then :
46489  gl_cv_header_langinfo_t_fmt_ampm=yes
46490else
46491  gl_cv_header_langinfo_t_fmt_ampm=no
46492fi
46493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46494
46495fi
46496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
46497$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
46498    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
46499      HAVE_LANGINFO_T_FMT_AMPM=1
46500    fi
46501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
46502$as_echo_n "checking whether langinfo.h defines ALTMON_1... " >&6; }
46503if ${gl_cv_header_langinfo_altmon+:} false; then :
46504  $as_echo_n "(cached) " >&6
46505else
46506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46507/* end confdefs.h.  */
46508#include <langinfo.h>
46509int a = ALTMON_1;
46510
46511int
46512main ()
46513{
46514
46515  ;
46516  return 0;
46517}
46518_ACEOF
46519if ac_fn_c_try_compile "$LINENO"; then :
46520  gl_cv_header_langinfo_altmon=yes
46521else
46522  gl_cv_header_langinfo_altmon=no
46523fi
46524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46525
46526fi
46527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
46528$as_echo "$gl_cv_header_langinfo_altmon" >&6; }
46529    if test $gl_cv_header_langinfo_altmon = yes; then
46530      HAVE_LANGINFO_ALTMON=1
46531    fi
46532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
46533$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
46534if ${gl_cv_header_langinfo_era+:} false; then :
46535  $as_echo_n "(cached) " >&6
46536else
46537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46538/* end confdefs.h.  */
46539#include <langinfo.h>
46540int a = ERA;
46541
46542int
46543main ()
46544{
46545
46546  ;
46547  return 0;
46548}
46549_ACEOF
46550if ac_fn_c_try_compile "$LINENO"; then :
46551  gl_cv_header_langinfo_era=yes
46552else
46553  gl_cv_header_langinfo_era=no
46554fi
46555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46556
46557fi
46558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
46559$as_echo "$gl_cv_header_langinfo_era" >&6; }
46560    if test $gl_cv_header_langinfo_era = yes; then
46561      HAVE_LANGINFO_ERA=1
46562    fi
46563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
46564$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
46565if ${gl_cv_header_langinfo_yesexpr+:} false; then :
46566  $as_echo_n "(cached) " >&6
46567else
46568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46569/* end confdefs.h.  */
46570#include <langinfo.h>
46571int a = YESEXPR;
46572
46573int
46574main ()
46575{
46576
46577  ;
46578  return 0;
46579}
46580_ACEOF
46581if ac_fn_c_try_compile "$LINENO"; then :
46582  gl_cv_header_langinfo_yesexpr=yes
46583else
46584  gl_cv_header_langinfo_yesexpr=no
46585fi
46586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46587
46588fi
46589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
46590$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
46591    if test $gl_cv_header_langinfo_yesexpr = yes; then
46592      HAVE_LANGINFO_YESEXPR=1
46593    fi
46594  else
46595    HAVE_LANGINFO_H=0
46596  fi
46597
46598
46599
46600
46601
46602
46603
46604
46605
46606
46607
46608
46609
46610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
46611$as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
46612if ${gl_cv_c___inline+:} false; then :
46613  $as_echo_n "(cached) " >&6
46614else
46615  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46616/* end confdefs.h.  */
46617typedef int foo_t;
46618           static __inline foo_t foo (void) { return 0; }
46619int
46620main ()
46621{
46622return foo ();
46623  ;
46624  return 0;
46625}
46626_ACEOF
46627if ac_fn_c_try_compile "$LINENO"; then :
46628  gl_cv_c___inline=yes
46629else
46630  gl_cv_c___inline=no
46631fi
46632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46633fi
46634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
46635$as_echo "$gl_cv_c___inline" >&6; }
46636  if test $gl_cv_c___inline = yes; then
46637
46638$as_echo "#define HAVE___INLINE 1" >>confdefs.h
46639
46640  fi
46641
46642
46643
46644
46645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the included libunistring" >&5
46646$as_echo_n "checking whether to use the included libunistring... " >&6; }
46647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_libunistring_use_included" >&5
46648$as_echo "$gl_libunistring_use_included" >&6; }
46649
46650
46651
46652
46653
46654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included libxml is requested" >&5
46655$as_echo_n "checking whether included libxml is requested... " >&6; }
46656
46657# Check whether --with-included-libxml was given.
46658if test "${with_included_libxml+set}" = set; then :
46659  withval=$with_included_libxml; gl_cv_libxml_force_included=$withval
46660else
46661  gl_cv_libxml_force_included=no
46662fi
46663
46664    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_libxml_force_included" >&5
46665$as_echo "$gl_cv_libxml_force_included" >&6; }
46666
46667
46668  gl_cv_libxml_use_included="$gl_cv_libxml_force_included"
46669  LIBXML=
46670  LTLIBXML=
46671  INCXML=
46672
46673    if test "$gl_cv_libxml_use_included" != yes; then
46674                  if ${gl_cv_libxml+:} false; then :
46675  $as_echo_n "(cached) " >&6
46676else
46677
46678        gl_cv_libxml=no
46679        gl_cv_LIBXML=
46680        gl_cv_LTLIBXML=
46681        gl_cv_INCXML=
46682        gl_save_LIBS="$LIBS"
46683        LIBS="$LIBS $LIBICONV"
46684
46685
46686
46687
46688
46689
46690    use_additional=yes
46691
46692  acl_save_prefix="$prefix"
46693  prefix="$acl_final_prefix"
46694  acl_save_exec_prefix="$exec_prefix"
46695  exec_prefix="$acl_final_exec_prefix"
46696
46697    eval additional_includedir=\"$includedir\"
46698    eval additional_libdir=\"$libdir\"
46699    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
46700    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
46701
46702  exec_prefix="$acl_save_exec_prefix"
46703  prefix="$acl_save_prefix"
46704
46705
46706# Check whether --with-libxml2-prefix was given.
46707if test "${with_libxml2_prefix+set}" = set; then :
46708  withval=$with_libxml2_prefix;
46709    if test "X$withval" = "Xno"; then
46710      use_additional=no
46711    else
46712      if test "X$withval" = "X"; then
46713
46714  acl_save_prefix="$prefix"
46715  prefix="$acl_final_prefix"
46716  acl_save_exec_prefix="$exec_prefix"
46717  exec_prefix="$acl_final_exec_prefix"
46718
46719          eval additional_includedir=\"$includedir\"
46720          eval additional_libdir=\"$libdir\"
46721          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
46722          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
46723
46724  exec_prefix="$acl_save_exec_prefix"
46725  prefix="$acl_save_prefix"
46726
46727      else
46728        additional_includedir="$withval/include"
46729        additional_libdir="$withval/$acl_libdirstem"
46730        additional_libdir2="$withval/$acl_libdirstem2"
46731        additional_libdir3="$withval/$acl_libdirstem3"
46732      fi
46733    fi
46734
46735fi
46736
46737  if test "X$additional_libdir2" = "X$additional_libdir"; then
46738    additional_libdir2=
46739  fi
46740  if test "X$additional_libdir3" = "X$additional_libdir"; then
46741    additional_libdir3=
46742  fi
46743      LIBXML2=
46744  LTLIBXML2=
46745  INCXML2=
46746  LIBXML2_PREFIX=
46747      HAVE_LIBXML2=
46748  rpathdirs=
46749  ltrpathdirs=
46750  names_already_handled=
46751  names_next_round='xml2 '
46752  while test -n "$names_next_round"; do
46753    names_this_round="$names_next_round"
46754    names_next_round=
46755    for name in $names_this_round; do
46756      already_handled=
46757      for n in $names_already_handled; do
46758        if test "$n" = "$name"; then
46759          already_handled=yes
46760          break
46761        fi
46762      done
46763      if test -z "$already_handled"; then
46764        names_already_handled="$names_already_handled $name"
46765                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
46766        eval value=\"\$HAVE_LIB$uppername\"
46767        if test -n "$value"; then
46768          if test "$value" = yes; then
46769            eval value=\"\$LIB$uppername\"
46770            test -z "$value" || LIBXML2="${LIBXML2}${LIBXML2:+ }$value"
46771            eval value=\"\$LTLIB$uppername\"
46772            test -z "$value" || LTLIBXML2="${LTLIBXML2}${LTLIBXML2:+ }$value"
46773          else
46774                                    :
46775          fi
46776        else
46777                              found_dir=
46778          found_la=
46779          found_so=
46780          found_a=
46781          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
46782          if test -n "$acl_shlibext"; then
46783            shrext=".$acl_shlibext"             # typically: shrext=.so
46784          else
46785            shrext=
46786          fi
46787          if test $use_additional = yes; then
46788            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
46789              if test "X$found_dir" = "X"; then
46790                eval dir=\$$additional_libdir_variable
46791                if test -n "$dir"; then
46792                                                      if test -n "$acl_shlibext"; then
46793                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
46794                      found_dir="$dir"
46795                      found_so="$dir/$libname$shrext"
46796                    else
46797                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
46798                        ver=`(cd "$dir" && \
46799                              for f in "$libname$shrext".*; do echo "$f"; done \
46800                              | sed -e "s,^$libname$shrext\\\\.,," \
46801                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
46802                              | sed 1q ) 2>/dev/null`
46803                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
46804                          found_dir="$dir"
46805                          found_so="$dir/$libname$shrext.$ver"
46806                        fi
46807                      else
46808                        eval library_names=\"$acl_library_names_spec\"
46809                        for f in $library_names; do
46810                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
46811                            found_dir="$dir"
46812                            found_so="$dir/$f"
46813                            break
46814                          fi
46815                        done
46816                      fi
46817                    fi
46818                  fi
46819                                    if test "X$found_dir" = "X"; then
46820                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
46821                      found_dir="$dir"
46822                      found_a="$dir/$libname.$acl_libext"
46823                    fi
46824                  fi
46825                  if test "X$found_dir" != "X"; then
46826                    if test -f "$dir/$libname.la"; then
46827                      found_la="$dir/$libname.la"
46828                    fi
46829                  fi
46830                fi
46831              fi
46832            done
46833          fi
46834          if test "X$found_dir" = "X"; then
46835            for x in $LDFLAGS $LTLIBXML2; do
46836
46837  acl_save_prefix="$prefix"
46838  prefix="$acl_final_prefix"
46839  acl_save_exec_prefix="$exec_prefix"
46840  exec_prefix="$acl_final_exec_prefix"
46841  eval x=\"$x\"
46842  exec_prefix="$acl_save_exec_prefix"
46843  prefix="$acl_save_prefix"
46844
46845              case "$x" in
46846                -L*)
46847                  dir=`echo "X$x" | sed -e 's/^X-L//'`
46848                                    if test -n "$acl_shlibext"; then
46849                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
46850                      found_dir="$dir"
46851                      found_so="$dir/$libname$shrext"
46852                    else
46853                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
46854                        ver=`(cd "$dir" && \
46855                              for f in "$libname$shrext".*; do echo "$f"; done \
46856                              | sed -e "s,^$libname$shrext\\\\.,," \
46857                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
46858                              | sed 1q ) 2>/dev/null`
46859                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
46860                          found_dir="$dir"
46861                          found_so="$dir/$libname$shrext.$ver"
46862                        fi
46863                      else
46864                        eval library_names=\"$acl_library_names_spec\"
46865                        for f in $library_names; do
46866                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
46867                            found_dir="$dir"
46868                            found_so="$dir/$f"
46869                            break
46870                          fi
46871                        done
46872                      fi
46873                    fi
46874                  fi
46875                                    if test "X$found_dir" = "X"; then
46876                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
46877                      found_dir="$dir"
46878                      found_a="$dir/$libname.$acl_libext"
46879                    fi
46880                  fi
46881                  if test "X$found_dir" != "X"; then
46882                    if test -f "$dir/$libname.la"; then
46883                      found_la="$dir/$libname.la"
46884                    fi
46885                  fi
46886                  ;;
46887              esac
46888              if test "X$found_dir" != "X"; then
46889                break
46890              fi
46891            done
46892          fi
46893          if test "X$found_dir" != "X"; then
46894                        LTLIBXML2="${LTLIBXML2}${LTLIBXML2:+ }-L$found_dir -l$name"
46895            if test "X$found_so" != "X"; then
46896                                                        if test "$enable_rpath" = no \
46897                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
46898                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
46899                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
46900                                LIBXML2="${LIBXML2}${LIBXML2:+ }$found_so"
46901              else
46902                                                                                haveit=
46903                for x in $ltrpathdirs; do
46904                  if test "X$x" = "X$found_dir"; then
46905                    haveit=yes
46906                    break
46907                  fi
46908                done
46909                if test -z "$haveit"; then
46910                  ltrpathdirs="$ltrpathdirs $found_dir"
46911                fi
46912                                if test "$acl_hardcode_direct" = yes; then
46913                                                      LIBXML2="${LIBXML2}${LIBXML2:+ }$found_so"
46914                else
46915                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
46916                                                            LIBXML2="${LIBXML2}${LIBXML2:+ }$found_so"
46917                                                            haveit=
46918                    for x in $rpathdirs; do
46919                      if test "X$x" = "X$found_dir"; then
46920                        haveit=yes
46921                        break
46922                      fi
46923                    done
46924                    if test -z "$haveit"; then
46925                      rpathdirs="$rpathdirs $found_dir"
46926                    fi
46927                  else
46928                                                                                haveit=
46929                    for x in $LDFLAGS $LIBXML2; do
46930
46931  acl_save_prefix="$prefix"
46932  prefix="$acl_final_prefix"
46933  acl_save_exec_prefix="$exec_prefix"
46934  exec_prefix="$acl_final_exec_prefix"
46935  eval x=\"$x\"
46936  exec_prefix="$acl_save_exec_prefix"
46937  prefix="$acl_save_prefix"
46938
46939                      if test "X$x" = "X-L$found_dir"; then
46940                        haveit=yes
46941                        break
46942                      fi
46943                    done
46944                    if test -z "$haveit"; then
46945                      LIBXML2="${LIBXML2}${LIBXML2:+ }-L$found_dir"
46946                    fi
46947                    if test "$acl_hardcode_minus_L" != no; then
46948                                                                                        LIBXML2="${LIBXML2}${LIBXML2:+ }$found_so"
46949                    else
46950                                                                                                                                                                                LIBXML2="${LIBXML2}${LIBXML2:+ }-l$name"
46951                    fi
46952                  fi
46953                fi
46954              fi
46955            else
46956              if test "X$found_a" != "X"; then
46957                                LIBXML2="${LIBXML2}${LIBXML2:+ }$found_a"
46958              else
46959                                                LIBXML2="${LIBXML2}${LIBXML2:+ }-L$found_dir -l$name"
46960              fi
46961            fi
46962                        additional_includedir=
46963            case "$found_dir" in
46964              */$acl_libdirstem | */$acl_libdirstem/)
46965                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
46966                if test "$name" = 'xml2'; then
46967                  LIBXML2_PREFIX="$basedir"
46968                fi
46969                additional_includedir="$basedir/include"
46970                ;;
46971              */$acl_libdirstem2 | */$acl_libdirstem2/)
46972                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
46973                if test "$name" = 'xml2'; then
46974                  LIBXML2_PREFIX="$basedir"
46975                fi
46976                additional_includedir="$basedir/include"
46977                ;;
46978              */$acl_libdirstem3 | */$acl_libdirstem3/)
46979                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
46980                if test "$name" = 'xml2'; then
46981                  LIBXML2_PREFIX="$basedir"
46982                fi
46983                additional_includedir="$basedir/include"
46984                ;;
46985            esac
46986            if test "X$additional_includedir" != "X"; then
46987                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
46988                haveit=
46989                if test "X$additional_includedir" = "X/usr/local/include"; then
46990                  if test -n "$GCC"; then
46991                    case $host_os in
46992                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
46993                    esac
46994                  fi
46995                fi
46996                if test -z "$haveit"; then
46997                  for x in $CPPFLAGS $INCXML2; do
46998
46999  acl_save_prefix="$prefix"
47000  prefix="$acl_final_prefix"
47001  acl_save_exec_prefix="$exec_prefix"
47002  exec_prefix="$acl_final_exec_prefix"
47003  eval x=\"$x\"
47004  exec_prefix="$acl_save_exec_prefix"
47005  prefix="$acl_save_prefix"
47006
47007                    if test "X$x" = "X-I$additional_includedir"; then
47008                      haveit=yes
47009                      break
47010                    fi
47011                  done
47012                  if test -z "$haveit"; then
47013                    if test -d "$additional_includedir"; then
47014                                            INCXML2="${INCXML2}${INCXML2:+ }-I$additional_includedir"
47015                    fi
47016                  fi
47017                fi
47018              fi
47019            fi
47020                        if test -n "$found_la"; then
47021                                                        save_libdir="$libdir"
47022              case "$found_la" in
47023                */* | *\\*) . "$found_la" ;;
47024                *) . "./$found_la" ;;
47025              esac
47026              libdir="$save_libdir"
47027                            for dep in $dependency_libs; do
47028                case "$dep" in
47029                  -L*)
47030                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
47031                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
47032                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
47033                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
47034                      haveit=
47035                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
47036                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
47037                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
47038                        if test -n "$GCC"; then
47039                          case $host_os in
47040                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
47041                          esac
47042                        fi
47043                      fi
47044                      if test -z "$haveit"; then
47045                        haveit=
47046                        for x in $LDFLAGS $LIBXML2; do
47047
47048  acl_save_prefix="$prefix"
47049  prefix="$acl_final_prefix"
47050  acl_save_exec_prefix="$exec_prefix"
47051  exec_prefix="$acl_final_exec_prefix"
47052  eval x=\"$x\"
47053  exec_prefix="$acl_save_exec_prefix"
47054  prefix="$acl_save_prefix"
47055
47056                          if test "X$x" = "X-L$dependency_libdir"; then
47057                            haveit=yes
47058                            break
47059                          fi
47060                        done
47061                        if test -z "$haveit"; then
47062                          if test -d "$dependency_libdir"; then
47063                                                        LIBXML2="${LIBXML2}${LIBXML2:+ }-L$dependency_libdir"
47064                          fi
47065                        fi
47066                        haveit=
47067                        for x in $LDFLAGS $LTLIBXML2; do
47068
47069  acl_save_prefix="$prefix"
47070  prefix="$acl_final_prefix"
47071  acl_save_exec_prefix="$exec_prefix"
47072  exec_prefix="$acl_final_exec_prefix"
47073  eval x=\"$x\"
47074  exec_prefix="$acl_save_exec_prefix"
47075  prefix="$acl_save_prefix"
47076
47077                          if test "X$x" = "X-L$dependency_libdir"; then
47078                            haveit=yes
47079                            break
47080                          fi
47081                        done
47082                        if test -z "$haveit"; then
47083                          if test -d "$dependency_libdir"; then
47084                                                        LTLIBXML2="${LTLIBXML2}${LTLIBXML2:+ }-L$dependency_libdir"
47085                          fi
47086                        fi
47087                      fi
47088                    fi
47089                    ;;
47090                  -R*)
47091                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
47092                    if test "$enable_rpath" != no; then
47093                                                                  haveit=
47094                      for x in $rpathdirs; do
47095                        if test "X$x" = "X$dir"; then
47096                          haveit=yes
47097                          break
47098                        fi
47099                      done
47100                      if test -z "$haveit"; then
47101                        rpathdirs="$rpathdirs $dir"
47102                      fi
47103                                                                  haveit=
47104                      for x in $ltrpathdirs; do
47105                        if test "X$x" = "X$dir"; then
47106                          haveit=yes
47107                          break
47108                        fi
47109                      done
47110                      if test -z "$haveit"; then
47111                        ltrpathdirs="$ltrpathdirs $dir"
47112                      fi
47113                    fi
47114                    ;;
47115                  -l*)
47116                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
47117                    ;;
47118                  *.la)
47119                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
47120                    ;;
47121                  *)
47122                                        LIBXML2="${LIBXML2}${LIBXML2:+ }$dep"
47123                    LTLIBXML2="${LTLIBXML2}${LTLIBXML2:+ }$dep"
47124                    ;;
47125                esac
47126              done
47127            fi
47128          else
47129                                                            LIBXML2="${LIBXML2}${LIBXML2:+ }-l$name"
47130            LTLIBXML2="${LTLIBXML2}${LTLIBXML2:+ }-l$name"
47131          fi
47132        fi
47133      fi
47134    done
47135  done
47136  if test "X$rpathdirs" != "X"; then
47137    if test -n "$acl_hardcode_libdir_separator"; then
47138                        alldirs=
47139      for found_dir in $rpathdirs; do
47140        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
47141      done
47142            acl_save_libdir="$libdir"
47143      libdir="$alldirs"
47144      eval flag=\"$acl_hardcode_libdir_flag_spec\"
47145      libdir="$acl_save_libdir"
47146      LIBXML2="${LIBXML2}${LIBXML2:+ }$flag"
47147    else
47148            for found_dir in $rpathdirs; do
47149        acl_save_libdir="$libdir"
47150        libdir="$found_dir"
47151        eval flag=\"$acl_hardcode_libdir_flag_spec\"
47152        libdir="$acl_save_libdir"
47153        LIBXML2="${LIBXML2}${LIBXML2:+ }$flag"
47154      done
47155    fi
47156  fi
47157  if test "X$ltrpathdirs" != "X"; then
47158            for found_dir in $ltrpathdirs; do
47159      LTLIBXML2="${LTLIBXML2}${LTLIBXML2:+ }-R$found_dir"
47160    done
47161  fi
47162
47163
47164
47165
47166
47167        LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV"
47168        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47169/* end confdefs.h.  */
47170#include <libxml/xmlversion.h>
47171                     #include <libxml/xmlmemory.h>
47172                     #include <libxml/xpath.h>
47173
47174int
47175main ()
47176{
47177xmlCheckVersion (0);
47178           xmlFree ((void *) 0);
47179           xmlXPathSetContextNode ((void *)0, (void *)0);
47180
47181  ;
47182  return 0;
47183}
47184_ACEOF
47185if ac_fn_c_try_link "$LINENO"; then :
47186  gl_cv_libxml=yes
47187           gl_cv_LIBXML="$LIBXML2 $LIBICONV"
47188           gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
47189
47190fi
47191rm -f core conftest.err conftest.$ac_objext \
47192    conftest$ac_exeext conftest.$ac_ext
47193        if test "$gl_cv_libxml" != yes; then
47194          gl_save_CPPFLAGS="$CPPFLAGS"
47195          CPPFLAGS="$CPPFLAGS $INCXML2"
47196          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47197/* end confdefs.h.  */
47198#include <libxml/xmlversion.h>
47199                       #include <libxml/xmlmemory.h>
47200                       #include <libxml/xpath.h>
47201
47202int
47203main ()
47204{
47205xmlCheckVersion (0);
47206             xmlFree ((void *) 0);
47207             xmlXPathSetContextNode ((void *)0, (void *)0);
47208
47209  ;
47210  return 0;
47211}
47212_ACEOF
47213if ac_fn_c_try_link "$LINENO"; then :
47214  gl_cv_libxml=yes
47215             gl_cv_LIBXML="$LIBXML2 $LIBICONV"
47216             gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
47217             gl_cv_INCXML="$INCXML2"
47218
47219fi
47220rm -f core conftest.err conftest.$ac_objext \
47221    conftest$ac_exeext conftest.$ac_ext
47222          if test "$gl_cv_libxml" != yes; then
47223                                                            libxml2_include_dir=
47224            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47225/* end confdefs.h.  */
47226#include <libxml2/libxml/xmlexports.h>
47227_ACEOF
47228if ac_fn_c_try_cpp "$LINENO"; then :
47229
47230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <libxml2/libxml/xmlexports.h>" >&5
47231$as_echo_n "checking absolute name of <libxml2/libxml/xmlexports.h>... " >&6; }
47232if ${gl_cv_absolute_libxml2_libxml_xmlexports_h+:} false; then :
47233  $as_echo_n "(cached) " >&6
47234else
47235          if test $ac_cv_header_libxml2_libxml_xmlexports_h = yes; then
47236
47237
47238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47239/* end confdefs.h.  */
47240#include <libxml2/libxml/xmlexports.h>
47241_ACEOF
47242                case "$host_os" in
47243    aix*) gl_absname_cpp="$ac_cpp -C" ;;
47244    *)    gl_absname_cpp="$ac_cpp" ;;
47245  esac
47246
47247  case "$host_os" in
47248    mingw*)
47249                                          gl_dirsep_regex='[/\\]'
47250      ;;
47251    *)
47252      gl_dirsep_regex='\/'
47253      ;;
47254  esac
47255      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
47256  gl_header_literal_regex=`echo 'libxml2/libxml/xmlexports.h' \
47257                           | sed -e "$gl_make_literal_regex_sed"`
47258  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
47259      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
47260      s|^/[^/]|//&|
47261      p
47262      q
47263    }'
47264
47265        gl_cv_absolute_libxml2_libxml_xmlexports_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
47266  sed -n "$gl_absolute_header_sed"`
47267
47268    fi
47269
47270fi
47271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_absolute_libxml2_libxml_xmlexports_h" >&5
47272$as_echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" >&6; }
47273cat >>confdefs.h <<_ACEOF
47274#define ABSOLUTE_LIBXML2_LIBXML_XMLEXPORTS_H "$gl_cv_absolute_libxml2_libxml_xmlexports_h"
47275_ACEOF
47276
47277
47278               libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'`
47279
47280fi
47281rm -f conftest.err conftest.i conftest.$ac_ext
47282            if test -z "$libxml2_include_dir"; then
47283              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47284/* end confdefs.h.  */
47285#include <libxml2/libxml/xmlversion.h>
47286_ACEOF
47287if ac_fn_c_try_cpp "$LINENO"; then :
47288
47289  { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <libxml2/libxml/xmlversion.h>" >&5
47290$as_echo_n "checking absolute name of <libxml2/libxml/xmlversion.h>... " >&6; }
47291if ${gl_cv_absolute_libxml2_libxml_xmlversion_h+:} false; then :
47292  $as_echo_n "(cached) " >&6
47293else
47294          if test $ac_cv_header_libxml2_libxml_xmlversion_h = yes; then
47295
47296
47297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47298/* end confdefs.h.  */
47299#include <libxml2/libxml/xmlversion.h>
47300_ACEOF
47301                case "$host_os" in
47302    aix*) gl_absname_cpp="$ac_cpp -C" ;;
47303    *)    gl_absname_cpp="$ac_cpp" ;;
47304  esac
47305
47306  case "$host_os" in
47307    mingw*)
47308                                          gl_dirsep_regex='[/\\]'
47309      ;;
47310    *)
47311      gl_dirsep_regex='\/'
47312      ;;
47313  esac
47314      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
47315  gl_header_literal_regex=`echo 'libxml2/libxml/xmlversion.h' \
47316                           | sed -e "$gl_make_literal_regex_sed"`
47317  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
47318      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
47319      s|^/[^/]|//&|
47320      p
47321      q
47322    }'
47323
47324        gl_cv_absolute_libxml2_libxml_xmlversion_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
47325  sed -n "$gl_absolute_header_sed"`
47326
47327    fi
47328
47329fi
47330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_absolute_libxml2_libxml_xmlversion_h" >&5
47331$as_echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" >&6; }
47332cat >>confdefs.h <<_ACEOF
47333#define ABSOLUTE_LIBXML2_LIBXML_XMLVERSION_H "$gl_cv_absolute_libxml2_libxml_xmlversion_h"
47334_ACEOF
47335
47336
47337                 libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'`
47338
47339fi
47340rm -f conftest.err conftest.i conftest.$ac_ext
47341            fi
47342            if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then
47343              CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir"
47344              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47345/* end confdefs.h.  */
47346#include <libxml/xmlversion.h>
47347                           #include <libxml/xmlmemory.h>
47348                           #include <libxml/xpath.h>
47349
47350int
47351main ()
47352{
47353xmlCheckVersion (0);
47354                 xmlFree ((void *) 0);
47355                 xmlXPathSetContextNode ((void *)0, (void *)0);
47356
47357  ;
47358  return 0;
47359}
47360_ACEOF
47361if ac_fn_c_try_link "$LINENO"; then :
47362  gl_cv_libxml=yes
47363                 gl_cv_LIBXML="$LIBXML2 $LIBICONV"
47364                 gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"
47365                 gl_cv_INCXML="-I$libxml2_include_dir"
47366
47367fi
47368rm -f core conftest.err conftest.$ac_objext \
47369    conftest$ac_exeext conftest.$ac_ext
47370            fi
47371          fi
47372          CPPFLAGS="$gl_save_CPPFLAGS"
47373        fi
47374        LIBS="$gl_save_LIBS"
47375
47376fi
47377
47378      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml" >&5
47379$as_echo_n "checking for libxml... " >&6; }
47380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_libxml" >&5
47381$as_echo "$gl_cv_libxml" >&6; }
47382      if test $gl_cv_libxml = yes; then
47383        LIBXML="$gl_cv_LIBXML"
47384        LTLIBXML="$gl_cv_LTLIBXML"
47385        INCXML="$gl_cv_INCXML"
47386      else
47387        gl_cv_libxml_use_included=yes
47388      fi
47389    fi
47390
47391
47392
47393
47394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the included libxml" >&5
47395$as_echo_n "checking whether to use the included libxml... " >&6; }
47396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_libxml_use_included" >&5
47397$as_echo "$gl_cv_libxml_use_included" >&6; }
47398
47399  if test "$gl_cv_libxml_use_included" = yes; then
47400    LIBXML_H=
47401    LIBXML_H="$LIBXML_H libxml/DOCBparser.h"
47402    LIBXML_H="$LIBXML_H libxml/HTMLparser.h"
47403    LIBXML_H="$LIBXML_H libxml/HTMLtree.h"
47404    LIBXML_H="$LIBXML_H libxml/SAX2.h"
47405    LIBXML_H="$LIBXML_H libxml/SAX.h"
47406    LIBXML_H="$LIBXML_H libxml/c14n.h"
47407    LIBXML_H="$LIBXML_H libxml/catalog.h"
47408    LIBXML_H="$LIBXML_H libxml/chvalid.h"
47409    LIBXML_H="$LIBXML_H libxml/debugXML.h"
47410    LIBXML_H="$LIBXML_H libxml/dict.h"
47411    LIBXML_H="$LIBXML_H libxml/encoding.h"
47412    LIBXML_H="$LIBXML_H libxml/entities.h"
47413    LIBXML_H="$LIBXML_H libxml/globals.h"
47414    LIBXML_H="$LIBXML_H libxml/hash.h"
47415    LIBXML_H="$LIBXML_H libxml/list.h"
47416    LIBXML_H="$LIBXML_H libxml/nanoftp.h"
47417    LIBXML_H="$LIBXML_H libxml/nanohttp.h"
47418    LIBXML_H="$LIBXML_H libxml/parser.h"
47419    LIBXML_H="$LIBXML_H libxml/parserInternals.h"
47420    LIBXML_H="$LIBXML_H libxml/pattern.h"
47421    LIBXML_H="$LIBXML_H libxml/relaxng.h"
47422    LIBXML_H="$LIBXML_H libxml/schemasInternals.h"
47423    LIBXML_H="$LIBXML_H libxml/schematron.h"
47424    LIBXML_H="$LIBXML_H libxml/threads.h"
47425    LIBXML_H="$LIBXML_H libxml/tree.h"
47426    LIBXML_H="$LIBXML_H libxml/uri.h"
47427    LIBXML_H="$LIBXML_H libxml/valid.h"
47428    LIBXML_H="$LIBXML_H libxml/xinclude.h"
47429    LIBXML_H="$LIBXML_H libxml/xlink.h"
47430    LIBXML_H="$LIBXML_H libxml/xmlIO.h"
47431    LIBXML_H="$LIBXML_H libxml/xmlautomata.h"
47432    LIBXML_H="$LIBXML_H libxml/xmlerror.h"
47433    LIBXML_H="$LIBXML_H libxml/xmlexports.h"
47434    LIBXML_H="$LIBXML_H libxml/xmlmemory.h"
47435    LIBXML_H="$LIBXML_H libxml/xmlmodule.h"
47436    LIBXML_H="$LIBXML_H libxml/xmlreader.h"
47437    LIBXML_H="$LIBXML_H libxml/xmlregexp.h"
47438    LIBXML_H="$LIBXML_H libxml/xmlsave.h"
47439    LIBXML_H="$LIBXML_H libxml/xmlschemas.h"
47440    LIBXML_H="$LIBXML_H libxml/xmlschemastypes.h"
47441    LIBXML_H="$LIBXML_H libxml/xmlstring.h"
47442    LIBXML_H="$LIBXML_H libxml/xmlunicode.h"
47443    LIBXML_H="$LIBXML_H libxml/xmlversion.h"
47444    LIBXML_H="$LIBXML_H libxml/xmlwriter.h"
47445    LIBXML_H="$LIBXML_H libxml/xpath.h"
47446    LIBXML_H="$LIBXML_H libxml/xpathInternals.h"
47447    LIBXML_H="$LIBXML_H libxml/xpointer.h"
47448    for ac_header in arpa/inet.h ctype.h dlfcn.h dl.h errno.h \
47449                      fcntl.h float.h limits.h malloc.h math.h netdb.h \
47450                      netinet/in.h signal.h stdlib.h string.h \
47451                      strings.h sys/select.h sys/socket.h sys/stat.h \
47452                      sys/time.h sys/types.h time.h unistd.h
47453do :
47454  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47455ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
47456if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47457  cat >>confdefs.h <<_ACEOF
47458#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47459_ACEOF
47460
47461fi
47462
47463done
47464
47465    for ac_header in arpa/nameser.h
47466do :
47467  ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "
47468      #if HAVE_SYS_TYPES_H
47469      # include <sys/types.h>
47470      #endif
47471
47472"
47473if test "x$ac_cv_header_arpa_nameser_h" = xyes; then :
47474  cat >>confdefs.h <<_ACEOF
47475#define HAVE_ARPA_NAMESER_H 1
47476_ACEOF
47477
47478fi
47479
47480done
47481
47482    for ac_header in resolv.h
47483do :
47484  ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
47485      #if HAVE_SYS_TYPES_H
47486      # include <sys/types.h>
47487      #endif
47488      #if HAVE_NETINET_IN_H
47489      # include <netinet/in.h>
47490      #endif
47491      #if HAVE_ARPA_NAMESER_H
47492      # include <arpa/nameser.h>
47493      #endif
47494
47495"
47496if test "x$ac_cv_header_resolv_h" = xyes; then :
47497  cat >>confdefs.h <<_ACEOF
47498#define HAVE_RESOLV_H 1
47499_ACEOF
47500
47501fi
47502
47503done
47504
47505    for ac_func in getaddrinfo localtime stat strftime
47506do :
47507  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
47508ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
47509if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
47510  cat >>confdefs.h <<_ACEOF
47511#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
47512_ACEOF
47513
47514fi
47515done
47516
47517
47518$as_echo "#define VA_COPY va_copy" >>confdefs.h
47519
47520          else
47521    LIBXML_H=
47522  fi
47523
47524
47525   if test "$gl_cv_libxml_use_included" = yes; then
47526  INCLUDED_LIBXML_TRUE=
47527  INCLUDED_LIBXML_FALSE='#'
47528else
47529  INCLUDED_LIBXML_TRUE='#'
47530  INCLUDED_LIBXML_FALSE=
47531fi
47532
47533
47534
47535
47536
47537
47538    LOCALCHARSET_TESTS_ENVIRONMENT=
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550  case "$host_os" in
47551    solaris*)
47552
47553$as_echo "#define _LCONV_C99 1" >>confdefs.h
47554
47555      ;;
47556  esac
47557
47558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
47559$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
47560if ${gl_cv_header_locale_h_posix2001+:} false; then :
47561  $as_echo_n "(cached) " >&6
47562else
47563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47564/* end confdefs.h.  */
47565#include <locale.h>
47566            int x = LC_MESSAGES;
47567            int y = sizeof (((struct lconv *) 0)->decimal_point);
47568int
47569main ()
47570{
47571
47572  ;
47573  return 0;
47574}
47575_ACEOF
47576if ac_fn_c_try_compile "$LINENO"; then :
47577  gl_cv_header_locale_h_posix2001=yes
47578else
47579  gl_cv_header_locale_h_posix2001=no
47580fi
47581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47582fi
47583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
47584$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
47585
47586          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
47587$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
47588if ${gl_cv_sys_struct_lconv_ok+:} false; then :
47589  $as_echo_n "(cached) " >&6
47590else
47591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47592/* end confdefs.h.  */
47593#include <locale.h>
47594            struct lconv l;
47595            int x = sizeof (l.decimal_point);
47596            int y = sizeof (l.int_p_cs_precedes);
47597int
47598main ()
47599{
47600
47601  ;
47602  return 0;
47603}
47604_ACEOF
47605if ac_fn_c_try_compile "$LINENO"; then :
47606  gl_cv_sys_struct_lconv_ok=yes
47607else
47608  gl_cv_sys_struct_lconv_ok=no
47609fi
47610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47611
47612fi
47613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
47614$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
47615  if test $gl_cv_sys_struct_lconv_ok = no; then
47616            case "$host_os" in
47617      mingw*)
47618        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47619/* end confdefs.h.  */
47620
47621#ifdef _MSC_VER
47622 Special
47623#endif
47624
47625_ACEOF
47626if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47627  $EGREP "Special" >/dev/null 2>&1; then :
47628
47629else
47630  REPLACE_STRUCT_LCONV=1
47631fi
47632rm -f conftest*
47633
47634        ;;
47635      *) REPLACE_STRUCT_LCONV=1 ;;
47636    esac
47637  fi
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647     if test $gl_cv_have_include_next = yes; then
47648       gl_cv_next_locale_h='<'locale.h'>'
47649     else
47650       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
47651$as_echo_n "checking absolute name of <locale.h>... " >&6; }
47652if ${gl_cv_next_locale_h+:} false; then :
47653  $as_echo_n "(cached) " >&6
47654else
47655
47656
47657
47658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47659/* end confdefs.h.  */
47660#include <locale.h>
47661_ACEOF
47662                case "$host_os" in
47663    aix*) gl_absname_cpp="$ac_cpp -C" ;;
47664    *)    gl_absname_cpp="$ac_cpp" ;;
47665  esac
47666
47667  case "$host_os" in
47668    mingw*)
47669                                          gl_dirsep_regex='[/\\]'
47670      ;;
47671    *)
47672      gl_dirsep_regex='\/'
47673      ;;
47674  esac
47675      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
47676  gl_header_literal_regex=`echo 'locale.h' \
47677                           | sed -e "$gl_make_literal_regex_sed"`
47678  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
47679      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
47680      s|^/[^/]|//&|
47681      p
47682      q
47683    }'
47684
47685        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
47686  sed -n "$gl_absolute_header_sed"`
47687
47688           gl_header=$gl_cv_absolute_locale_h
47689           gl_cv_next_locale_h='"'$gl_header'"'
47690
47691
47692fi
47693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
47694$as_echo "$gl_cv_next_locale_h" >&6; }
47695     fi
47696     NEXT_LOCALE_H=$gl_cv_next_locale_h
47697
47698     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
47699       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
47700       gl_next_as_first_directive='<'locale.h'>'
47701     else
47702       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
47703       gl_next_as_first_directive=$gl_cv_next_locale_h
47704     fi
47705     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722  if test $HAVE_LOCALE_T = 1; then
47723
47724    gl_func_newlocale="$ac_cv_func_newlocale"
47725    gl_func_duplocale="$ac_cv_func_duplocale"
47726    gl_func_freelocale="$ac_cv_func_freelocale"
47727  else
47728            gl_func_newlocale=no
47729    gl_func_duplocale=no
47730    gl_func_freelocale=no
47731  fi
47732  if test $gl_func_newlocale != yes; then
47733    HAVE_NEWLOCALE=0
47734  fi
47735  if test $gl_func_duplocale != yes; then
47736    HAVE_DUPLOCALE=0
47737  fi
47738  if test $gl_func_freelocale != yes; then
47739    HAVE_FREELOCALE=0
47740  fi
47741  if test $gt_nameless_locales = yes; then
47742    REPLACE_NEWLOCALE=1
47743    REPLACE_DUPLOCALE=1
47744    REPLACE_FREELOCALE=1
47745  fi
47746
47747
47748
47749
47750
47751
47752          GNULIB_LOCALENAME=1
47753
47754
47755
47756
47757
47758$as_echo "#define GNULIB_TEST_LOCALENAME 1" >>confdefs.h
47759
47760
47761
47762
47763
47764
47765  case "$host_os" in
47766    mingw*) REPLACE_LOCALTIME=1 ;;
47767  esac
47768
47769  if test $REPLACE_LOCALTIME = 1; then
47770
47771
47772
47773
47774
47775
47776
47777
47778  gl_LIBOBJS="$gl_LIBOBJS localtime.$ac_objext"
47779
47780  fi
47781
47782
47783
47784
47785
47786          GNULIB_LOCALTIME=1
47787
47788
47789
47790
47791
47792$as_echo "#define GNULIB_TEST_LOCALTIME 1" >>confdefs.h
47793
47794
47795
47796
47797
47798  if test "$gl_threads_api" = posix; then
47799    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
47800    # pthread_rwlock_* functions.
47801    has_rwlock=false
47802    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
47803"
47804if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
47805  has_rwlock=true
47806
47807$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
47808
47809fi
47810
47811    if $has_rwlock; then
47812
47813
47814     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
47815$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
47816if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
47817  $as_echo_n "(cached) " >&6
47818else
47819  save_LIBS="$LIBS"
47820     LIBS="$LIBS $LIBMULTITHREAD"
47821     if test "$cross_compiling" = yes; then :
47822  case "$host_os" in
47823                         # Guess no on glibc systems.
47824          *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
47825                         # Guess no on musl systems.
47826          *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
47827                         # Guess no on bionic systems.
47828          *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
47829                         # Guess yes on native Windows with the mingw-w64 winpthreads library.
47830                         # Guess no on native Windows with the gnulib windows-rwlock module.
47831          mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
47832                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
47833                         else
47834                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
47835                         fi
47836                         ;;
47837                         # If we don't know, obey --enable-cross-guesses.
47838          *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
47839         esac
47840
47841else
47842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47843/* end confdefs.h.  */
47844
47845#include <errno.h>
47846#include <pthread.h>
47847#include <stdlib.h>
47848#include <unistd.h>
47849
47850#define SUCCEED() exit (0)
47851#define FAILURE() exit (1)
47852#define UNEXPECTED(n) (exit (10 + (n)))
47853
47854/* The main thread creates the waiting writer and the requesting reader threads
47855   in the default way; this guarantees that they have the same priority.
47856   We can reuse the main thread as first reader thread.  */
47857
47858static pthread_rwlock_t lock;
47859static pthread_t reader1;
47860static pthread_t writer;
47861static pthread_t reader2;
47862static pthread_t timer;
47863/* Used to pass control from writer to reader2 and from reader2 to timer,
47864   as in a relay race.
47865   Passing control from one running thread to another running thread
47866   is most likely faster than to create the second thread.  */
47867static pthread_mutex_t baton;
47868
47869static void *
47870timer_func (void *ignored)
47871{
47872  /* Step 13 (can be before or after step 12):
47873     The timer thread takes the baton, then waits a moment to make sure
47874     it can tell whether the second reader thread is blocked at step 12.  */
47875  if (pthread_mutex_lock (&baton))
47876    UNEXPECTED (13);
47877  usleep (100000);
47878  /* By the time we get here, it's clear that the second reader thread is
47879     blocked at step 12.  This is the desired behaviour.  */
47880  SUCCEED ();
47881}
47882
47883static void *
47884reader2_func (void *ignored)
47885{
47886  int err;
47887
47888  /* Step 8 (can be before or after step 7):
47889     The second reader thread takes the baton, then waits a moment to make sure
47890     the writer thread has reached step 7.  */
47891  if (pthread_mutex_lock (&baton))
47892    UNEXPECTED (8);
47893  usleep (100000);
47894  /* Step 9: The second reader thread requests the lock.  */
47895  err = pthread_rwlock_tryrdlock (&lock);
47896  if (err == 0)
47897    FAILURE ();
47898  else if (err != EBUSY)
47899    UNEXPECTED (9);
47900  /* Step 10: Launch a timer, to test whether the next call blocks.  */
47901  if (pthread_create (&timer, NULL, timer_func, NULL))
47902    UNEXPECTED (10);
47903  /* Step 11: Release the baton.  */
47904  if (pthread_mutex_unlock (&baton))
47905    UNEXPECTED (11);
47906  /* Step 12: The second reader thread requests the lock.  */
47907  err = pthread_rwlock_rdlock (&lock);
47908  if (err == 0)
47909    FAILURE ();
47910  else
47911    UNEXPECTED (12);
47912}
47913
47914static void *
47915writer_func (void *ignored)
47916{
47917  /* Step 4: Take the baton, so that the second reader thread does not go ahead
47918     too early.  */
47919  if (pthread_mutex_lock (&baton))
47920    UNEXPECTED (4);
47921  /* Step 5: Create the second reader thread.  */
47922  if (pthread_create (&reader2, NULL, reader2_func, NULL))
47923    UNEXPECTED (5);
47924  /* Step 6: Release the baton.  */
47925  if (pthread_mutex_unlock (&baton))
47926    UNEXPECTED (6);
47927  /* Step 7: The writer thread requests the lock.  */
47928  if (pthread_rwlock_wrlock (&lock))
47929    UNEXPECTED (7);
47930  return NULL;
47931}
47932
47933int
47934main ()
47935{
47936  reader1 = pthread_self ();
47937
47938  /* Step 1: The main thread initializes the lock and the baton.  */
47939  if (pthread_rwlock_init (&lock, NULL))
47940    UNEXPECTED (1);
47941  if (pthread_mutex_init (&baton, NULL))
47942    UNEXPECTED (1);
47943  /* Step 2: The main thread acquires the lock as a reader.  */
47944  if (pthread_rwlock_rdlock (&lock))
47945    UNEXPECTED (2);
47946  /* Step 3: Create the writer thread.  */
47947  if (pthread_create (&writer, NULL, writer_func, NULL))
47948    UNEXPECTED (3);
47949  /* Job done.  Go to sleep.  */
47950  for (;;)
47951    {
47952      sleep (1);
47953    }
47954}
47955
47956_ACEOF
47957if ac_fn_c_try_run "$LINENO"; then :
47958  gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
47959else
47960  gl_cv_pthread_rwlock_rdlock_prefer_writer=no
47961fi
47962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47963  conftest.$ac_objext conftest.beam conftest.$ac_ext
47964fi
47965
47966     LIBS="$save_LIBS"
47967
47968fi
47969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
47970$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
47971  case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
47972    *yes)
47973
47974$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
47975
47976      ;;
47977  esac
47978
47979    fi
47980    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
47981    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47982/* end confdefs.h.  */
47983
47984      #include <pthread.h>
47985int
47986main ()
47987{
47988
47989#if __FreeBSD__ == 4
47990error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
47991#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
47992       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
47993error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
47994#else
47995int x = (int)PTHREAD_MUTEX_RECURSIVE;
47996return !x;
47997#endif
47998
47999  ;
48000  return 0;
48001}
48002_ACEOF
48003if ac_fn_c_try_compile "$LINENO"; then :
48004
48005$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
48006
48007fi
48008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48009  fi
48010  :
48011
48012
48013
48014cat >>confdefs.h <<_ACEOF
48015#define GNULIB_LOCK 1
48016_ACEOF
48017
48018
48019
48020
48021
48022
48023
48024
48025
48026  LOG10_LIBM="$POW_LIBM"
48027
48028
48029
48030
48031  save_LIBS="$LIBS"
48032  LIBS="$LIBS $LOG10_LIBM"
48033
48034
48035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log10 works" >&5
48036$as_echo_n "checking whether log10 works... " >&6; }
48037if ${gl_cv_func_log10_works+:} false; then :
48038  $as_echo_n "(cached) " >&6
48039else
48040
48041      if test "$cross_compiling" = yes; then :
48042  case "$host_os" in
48043           osf*)   gl_cv_func_log10_works="guessing no" ;;
48044                   # Guess yes on native Windows.
48045           mingw*) gl_cv_func_log10_works="guessing yes" ;;
48046           *)      gl_cv_func_log10_works="guessing yes" ;;
48047         esac
48048
48049else
48050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48051/* end confdefs.h.  */
48052
48053#include <math.h>
48054volatile double x;
48055double y;
48056int main ()
48057{
48058  x = -0.0;
48059  y = log10 (x);
48060  if (!(y + y == y))
48061    return 1;
48062  return 0;
48063}
48064
48065_ACEOF
48066if ac_fn_c_try_run "$LINENO"; then :
48067  gl_cv_func_log10_works=yes
48068else
48069  gl_cv_func_log10_works=no
48070fi
48071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48072  conftest.$ac_objext conftest.beam conftest.$ac_ext
48073fi
48074
48075
48076fi
48077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_log10_works" >&5
48078$as_echo "$gl_cv_func_log10_works" >&6; }
48079
48080  LIBS="$save_LIBS"
48081  case "$gl_cv_func_log10_works" in
48082    *yes) ;;
48083    *) REPLACE_LOG10=1 ;;
48084  esac
48085
48086
48087
48088  if test $REPLACE_LOG10 = 1; then
48089
48090
48091
48092
48093
48094
48095
48096
48097  gl_LIBOBJS="$gl_LIBOBJS log10.$ac_objext"
48098
48099  fi
48100
48101
48102
48103
48104
48105          GNULIB_LOG10=1
48106
48107
48108
48109
48110
48111$as_echo "#define GNULIB_TEST_LOG10 1" >>confdefs.h
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
48122$as_echo_n "checking whether lseek detects pipes... " >&6; }
48123if ${gl_cv_func_lseek_pipe+:} false; then :
48124  $as_echo_n "(cached) " >&6
48125else
48126  case "$host_os" in
48127       mingw*)
48128                                                               gl_cv_func_lseek_pipe=no
48129         ;;
48130       *)
48131         if test $cross_compiling = no; then
48132           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48133/* end confdefs.h.  */
48134
48135#include <sys/types.h> /* for off_t */
48136#include <stdio.h> /* for SEEK_CUR */
48137#if HAVE_UNISTD_H
48138# include <unistd.h>
48139#else /* on Windows with MSVC */
48140# include <io.h>
48141#endif
48142
48143int
48144main ()
48145{
48146
48147  /* Exit with success only if stdin is seekable.  */
48148  return lseek (0, (off_t)0, SEEK_CUR) < 0;
48149
48150  ;
48151  return 0;
48152}
48153_ACEOF
48154if ac_fn_c_try_link "$LINENO"; then :
48155  if test -s conftest$ac_exeext \
48156                 && ./conftest$ac_exeext < conftest.$ac_ext \
48157                 && test 1 = "`echo hi \
48158                   | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
48159                gl_cv_func_lseek_pipe=yes
48160              else
48161                gl_cv_func_lseek_pipe=no
48162              fi
48163
48164else
48165  gl_cv_func_lseek_pipe=no
48166fi
48167rm -f core conftest.err conftest.$ac_objext \
48168    conftest$ac_exeext conftest.$ac_ext
48169         else
48170           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48171/* end confdefs.h.  */
48172
48173#if defined __BEOS__
48174/* BeOS mistakenly return 0 when trying to seek on pipes.  */
48175  Choke me.
48176#endif
48177_ACEOF
48178if ac_fn_c_try_compile "$LINENO"; then :
48179  gl_cv_func_lseek_pipe=yes
48180else
48181  gl_cv_func_lseek_pipe=no
48182fi
48183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48184         fi
48185         ;;
48186     esac
48187
48188fi
48189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
48190$as_echo "$gl_cv_func_lseek_pipe" >&6; }
48191  if test $gl_cv_func_lseek_pipe = no; then
48192    REPLACE_LSEEK=1
48193
48194$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
48195
48196  fi
48197
48198
48199  if test $WINDOWS_64_BIT_OFF_T = 1; then
48200    REPLACE_LSEEK=1
48201  fi
48202
48203  if test $REPLACE_LSEEK = 1; then
48204
48205
48206
48207
48208
48209
48210
48211
48212  gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
48213
48214  fi
48215
48216
48217
48218
48219
48220          GNULIB_LSEEK=1
48221
48222
48223
48224
48225
48226$as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
48227
48228
48229
48230
48231
48232
48233
48234  if test $ac_cv_func_lstat = yes; then
48235
48236    case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
48237      solaris* | *no)
48238        REPLACE_LSTAT=1
48239        ;;
48240    esac
48241  else
48242    HAVE_LSTAT=0
48243  fi
48244
48245  if test $REPLACE_LSTAT = 1; then
48246
48247
48248
48249
48250
48251
48252
48253
48254  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
48255
48256    :
48257  fi
48258
48259
48260
48261
48262
48263          GNULIB_LSTAT=1
48264
48265
48266
48267
48268
48269$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
48270
48271
48272
48273
48274
48275
48276  if test $gl_cv_func_malloc_posix = yes; then
48277
48278$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
48279
48280  else
48281    REPLACE_MALLOC=1
48282  fi
48283
48284  if test $REPLACE_MALLOC = 1; then
48285
48286
48287
48288
48289
48290
48291
48292
48293  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
48294
48295  fi
48296
48297
48298
48299
48300
48301          GNULIB_MALLOC_POSIX=1
48302
48303
48304
48305
48306
48307$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325     if test $gl_cv_have_include_next = yes; then
48326       gl_cv_next_math_h='<'math.h'>'
48327     else
48328       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
48329$as_echo_n "checking absolute name of <math.h>... " >&6; }
48330if ${gl_cv_next_math_h+:} false; then :
48331  $as_echo_n "(cached) " >&6
48332else
48333
48334             if test $ac_cv_header_math_h = yes; then
48335
48336
48337
48338
48339  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48340/* end confdefs.h.  */
48341#include <math.h>
48342_ACEOF
48343                case "$host_os" in
48344    aix*) gl_absname_cpp="$ac_cpp -C" ;;
48345    *)    gl_absname_cpp="$ac_cpp" ;;
48346  esac
48347
48348  case "$host_os" in
48349    mingw*)
48350                                          gl_dirsep_regex='[/\\]'
48351      ;;
48352    *)
48353      gl_dirsep_regex='\/'
48354      ;;
48355  esac
48356      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
48357  gl_header_literal_regex=`echo 'math.h' \
48358                           | sed -e "$gl_make_literal_regex_sed"`
48359  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
48360      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
48361      s|^/[^/]|//&|
48362      p
48363      q
48364    }'
48365
48366        gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
48367  sed -n "$gl_absolute_header_sed"`
48368
48369           gl_header=$gl_cv_absolute_math_h
48370           gl_cv_next_math_h='"'$gl_header'"'
48371          else
48372               gl_cv_next_math_h='<'math.h'>'
48373             fi
48374
48375
48376fi
48377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
48378$as_echo "$gl_cv_next_math_h" >&6; }
48379     fi
48380     NEXT_MATH_H=$gl_cv_next_math_h
48381
48382     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
48383       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
48384       gl_next_as_first_directive='<'math.h'>'
48385     else
48386       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
48387       gl_next_as_first_directive=$gl_cv_next_math_h
48388     fi
48389     NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
48390
48391
48392
48393
48394
48395  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
48396$as_echo_n "checking whether NAN macro works... " >&6; }
48397if ${gl_cv_header_math_nan_works+:} false; then :
48398  $as_echo_n "(cached) " >&6
48399else
48400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48401/* end confdefs.h.  */
48402#include <math.h>
48403int
48404main ()
48405{
48406/* Solaris 10 has a broken definition of NAN.  Other platforms
48407        fail to provide NAN, or provide it only in C99 mode; this
48408        test only needs to fail when NAN is provided but wrong.  */
48409         float f = 1.0f;
48410#ifdef NAN
48411         f = NAN;
48412#endif
48413         return f == 0;
48414  ;
48415  return 0;
48416}
48417_ACEOF
48418if ac_fn_c_try_compile "$LINENO"; then :
48419  gl_cv_header_math_nan_works=yes
48420else
48421  gl_cv_header_math_nan_works=no
48422fi
48423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48424fi
48425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
48426$as_echo "$gl_cv_header_math_nan_works" >&6; }
48427  if test $gl_cv_header_math_nan_works = no; then
48428    REPLACE_NAN=1
48429  fi
48430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
48431$as_echo_n "checking whether HUGE_VAL works... " >&6; }
48432if ${gl_cv_header_math_huge_val_works+:} false; then :
48433  $as_echo_n "(cached) " >&6
48434else
48435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48436/* end confdefs.h.  */
48437#include <math.h>
48438int
48439main ()
48440{
48441/* Solaris 10 has a broken definition of HUGE_VAL.  */
48442         double d = HUGE_VAL;
48443         return d == 0;
48444  ;
48445  return 0;
48446}
48447_ACEOF
48448if ac_fn_c_try_compile "$LINENO"; then :
48449  gl_cv_header_math_huge_val_works=yes
48450else
48451  gl_cv_header_math_huge_val_works=no
48452fi
48453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48454fi
48455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
48456$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
48457  if test $gl_cv_header_math_huge_val_works = no; then
48458    REPLACE_HUGE_VAL=1
48459  fi
48460
48461
48462
48463
48464
48465
48466
48467
48468
48469
48470  :
48471
48472
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485        if case "$host_os" in
48486       mingw*) true ;;
48487       *) test $ac_cv_func_mbsinit = yes ;;
48488     esac \
48489    && test $ac_cv_func_mbrtowc = yes; then
48490
48491
48492
48493
48494     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
48495$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
48496if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
48497  $as_echo_n "(cached) " >&6
48498else
48499
48500                  case "$host_os" in
48501                     # Guess no on AIX and OSF/1.
48502        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
48503                     # Guess yes otherwise.
48504        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
48505      esac
48506      if test $LOCALE_JA != none; then
48507        if test "$cross_compiling" = yes; then :
48508  :
48509else
48510  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48511/* end confdefs.h.  */
48512
48513#include <locale.h>
48514#include <string.h>
48515/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48516   <wchar.h>.
48517   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48518   included before <wchar.h>.  */
48519#include <stddef.h>
48520#include <stdio.h>
48521#include <time.h>
48522#include <wchar.h>
48523int main ()
48524{
48525  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
48526    {
48527      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
48528      mbstate_t state;
48529      wchar_t wc;
48530
48531      memset (&state, '\0', sizeof (mbstate_t));
48532      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
48533        if (mbsinit (&state))
48534          return 2;
48535    }
48536  return 0;
48537}
48538_ACEOF
48539if ac_fn_c_try_run "$LINENO"; then :
48540  gl_cv_func_mbrtowc_incomplete_state=yes
48541else
48542  gl_cv_func_mbrtowc_incomplete_state=no
48543fi
48544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48545  conftest.$ac_objext conftest.beam conftest.$ac_ext
48546fi
48547
48548      else
48549        if test $LOCALE_FR_UTF8 != none; then
48550          if test "$cross_compiling" = yes; then :
48551  :
48552else
48553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48554/* end confdefs.h.  */
48555
48556#include <locale.h>
48557#include <string.h>
48558/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48559   <wchar.h>.
48560   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48561   included before <wchar.h>.  */
48562#include <stddef.h>
48563#include <stdio.h>
48564#include <time.h>
48565#include <wchar.h>
48566int main ()
48567{
48568  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
48569    {
48570      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
48571      mbstate_t state;
48572      wchar_t wc;
48573
48574      memset (&state, '\0', sizeof (mbstate_t));
48575      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
48576        if (mbsinit (&state))
48577          return 2;
48578    }
48579  return 0;
48580}
48581_ACEOF
48582if ac_fn_c_try_run "$LINENO"; then :
48583  gl_cv_func_mbrtowc_incomplete_state=yes
48584else
48585  gl_cv_func_mbrtowc_incomplete_state=no
48586fi
48587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48588  conftest.$ac_objext conftest.beam conftest.$ac_ext
48589fi
48590
48591        fi
48592      fi
48593
48594fi
48595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
48596$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
48597
48598
48599
48600
48601     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
48602$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
48603if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
48604  $as_echo_n "(cached) " >&6
48605else
48606
48607                  case "$host_os" in
48608                    # Guess no on Solaris 8.
48609        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
48610                    # Guess yes otherwise.
48611        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
48612      esac
48613      if test $LOCALE_ZH_CN != none; then
48614        if test "$cross_compiling" = yes; then :
48615  :
48616else
48617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48618/* end confdefs.h.  */
48619
48620#include <locale.h>
48621#include <stdlib.h>
48622#include <string.h>
48623/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48624   <wchar.h>.
48625   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48626   included before <wchar.h>.  */
48627#include <stddef.h>
48628#include <stdio.h>
48629#include <time.h>
48630#include <wchar.h>
48631int main ()
48632{
48633  /* This fails on Solaris 8:
48634     mbrtowc returns 2, and sets wc to 0x00F0.
48635     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
48636  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
48637    {
48638      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
48639      mbstate_t state;
48640      wchar_t wc;
48641
48642      memset (&state, '\0', sizeof (mbstate_t));
48643      if (mbrtowc (&wc, input + 3, 6, &state) != 4
48644          && mbtowc (&wc, input + 3, 6) == 4)
48645        return 2;
48646    }
48647  return 0;
48648}
48649_ACEOF
48650if ac_fn_c_try_run "$LINENO"; then :
48651  gl_cv_func_mbrtowc_sanitycheck=yes
48652else
48653  gl_cv_func_mbrtowc_sanitycheck=no
48654fi
48655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48656  conftest.$ac_objext conftest.beam conftest.$ac_ext
48657fi
48658
48659      fi
48660
48661fi
48662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
48663$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
48664
48665    REPLACE_MBSTATE_T=0
48666    case "$gl_cv_func_mbrtowc_incomplete_state" in
48667      *yes) ;;
48668      *) REPLACE_MBSTATE_T=1 ;;
48669    esac
48670    case "$gl_cv_func_mbrtowc_sanitycheck" in
48671      *yes) ;;
48672      *) REPLACE_MBSTATE_T=1 ;;
48673    esac
48674  else
48675    REPLACE_MBSTATE_T=1
48676  fi
48677
48678
48679
48680  if test $ac_cv_func_mbrtowc = no; then
48681    HAVE_MBRTOWC=0
48682    ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
48683/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48684   <wchar.h>.
48685   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48686   included before <wchar.h>.  */
48687#include <stddef.h>
48688#include <stdio.h>
48689#include <time.h>
48690#include <wchar.h>
48691
48692"
48693if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
48694  ac_have_decl=1
48695else
48696  ac_have_decl=0
48697fi
48698
48699cat >>confdefs.h <<_ACEOF
48700#define HAVE_DECL_MBRTOWC $ac_have_decl
48701_ACEOF
48702
48703    if test $ac_cv_have_decl_mbrtowc = yes; then
48704                        REPLACE_MBRTOWC=1
48705    fi
48706  else
48707    if test $REPLACE_MBSTATE_T = 1; then
48708      REPLACE_MBRTOWC=1
48709    else
48710
48711
48712
48713     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
48714$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
48715if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
48716  $as_echo_n "(cached) " >&6
48717else
48718
48719                  case "$host_os" in
48720                  # Guess no on Solaris.
48721        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
48722                  # Guess yes otherwise.
48723        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
48724      esac
48725      if test $LOCALE_FR_UTF8 != none; then
48726        if test "$cross_compiling" = yes; then :
48727  :
48728else
48729  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48730/* end confdefs.h.  */
48731
48732#include <locale.h>
48733#include <stdlib.h>
48734#include <string.h>
48735/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48736   <wchar.h>.
48737   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48738   included before <wchar.h>.  */
48739#include <stddef.h>
48740#include <stdio.h>
48741#include <time.h>
48742#include <wchar.h>
48743int main ()
48744{
48745  int result = 0;
48746
48747  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
48748    {
48749      char input[] = "\303\237er";
48750      mbstate_t state;
48751      wchar_t wc;
48752      size_t ret;
48753
48754      memset (&state, '\0', sizeof (mbstate_t));
48755      wc = (wchar_t) 0xBADFACE;
48756      ret = mbrtowc (&wc, input, 5, &state);
48757      if (ret != 2)
48758        result |= 1;
48759      if (!mbsinit (&state))
48760        result |= 2;
48761
48762      memset (&state, '\0', sizeof (mbstate_t));
48763      ret = mbrtowc (NULL, input, 5, &state);
48764      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
48765        result |= 4;
48766      if (!mbsinit (&state))
48767        result |= 8;
48768    }
48769  return result;
48770}
48771_ACEOF
48772if ac_fn_c_try_run "$LINENO"; then :
48773  gl_cv_func_mbrtowc_null_arg1=yes
48774else
48775  gl_cv_func_mbrtowc_null_arg1=no
48776fi
48777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48778  conftest.$ac_objext conftest.beam conftest.$ac_ext
48779fi
48780
48781      fi
48782
48783fi
48784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
48785$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
48786
48787
48788
48789
48790     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
48791$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
48792if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
48793  $as_echo_n "(cached) " >&6
48794else
48795
48796                  case "$host_os" in
48797              # Guess no on OSF/1.
48798        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
48799              # Guess yes otherwise.
48800        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
48801      esac
48802      if test $LOCALE_FR_UTF8 != none; then
48803        if test "$cross_compiling" = yes; then :
48804  :
48805else
48806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48807/* end confdefs.h.  */
48808
48809#include <locale.h>
48810#include <string.h>
48811/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48812   <wchar.h>.
48813   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48814   included before <wchar.h>.  */
48815#include <stddef.h>
48816#include <stdio.h>
48817#include <time.h>
48818#include <wchar.h>
48819int main ()
48820{
48821  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
48822    {
48823      mbstate_t state;
48824      wchar_t wc;
48825      int ret;
48826
48827      memset (&state, '\0', sizeof (mbstate_t));
48828      wc = (wchar_t) 0xBADFACE;
48829      mbrtowc (&wc, NULL, 5, &state);
48830      /* Check that wc was not modified.  */
48831      if (wc != (wchar_t) 0xBADFACE)
48832        return 2;
48833    }
48834  return 0;
48835}
48836_ACEOF
48837if ac_fn_c_try_run "$LINENO"; then :
48838  gl_cv_func_mbrtowc_null_arg2=yes
48839else
48840  gl_cv_func_mbrtowc_null_arg2=no
48841fi
48842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48843  conftest.$ac_objext conftest.beam conftest.$ac_ext
48844fi
48845
48846      fi
48847
48848fi
48849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
48850$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
48851
48852
48853
48854
48855
48856
48857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
48858$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
48859if ${gl_cv_func_mbrtowc_retval+:} false; then :
48860  $as_echo_n "(cached) " >&6
48861else
48862
48863                  case "$host_os" in
48864                                   # Guess no on HP-UX, Solaris, native Windows.
48865        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
48866                                   # Guess yes otherwise.
48867        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
48868      esac
48869      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
48870         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
48871        if test "$cross_compiling" = yes; then :
48872  :
48873else
48874  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48875/* end confdefs.h.  */
48876
48877#include <locale.h>
48878#include <string.h>
48879/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48880   <wchar.h>.
48881   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48882   included before <wchar.h>.  */
48883#include <stddef.h>
48884#include <stdio.h>
48885#include <time.h>
48886#include <wchar.h>
48887int main ()
48888{
48889  int result = 0;
48890  int found_some_locale = 0;
48891  /* This fails on Solaris.  */
48892  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
48893    {
48894      char input[] = "B\303\274\303\237er"; /* "Büßer" */
48895      mbstate_t state;
48896      wchar_t wc;
48897
48898      memset (&state, '\0', sizeof (mbstate_t));
48899      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
48900        {
48901          input[1] = '\0';
48902          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
48903            result |= 1;
48904        }
48905      found_some_locale = 1;
48906    }
48907  /* This fails on HP-UX 11.11.  */
48908  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
48909    {
48910      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
48911      mbstate_t state;
48912      wchar_t wc;
48913
48914      memset (&state, '\0', sizeof (mbstate_t));
48915      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
48916        {
48917          input[1] = '\0';
48918          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
48919            result |= 2;
48920        }
48921      found_some_locale = 1;
48922    }
48923  /* This fails on native Windows.  */
48924  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
48925    {
48926      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
48927      mbstate_t state;
48928      wchar_t wc;
48929
48930      memset (&state, '\0', sizeof (mbstate_t));
48931      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
48932        {
48933          input[3] = '\0';
48934          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
48935            result |= 4;
48936        }
48937      found_some_locale = 1;
48938    }
48939  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
48940    {
48941      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
48942      mbstate_t state;
48943      wchar_t wc;
48944
48945      memset (&state, '\0', sizeof (mbstate_t));
48946      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
48947        {
48948          input[3] = '\0';
48949          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
48950            result |= 8;
48951        }
48952      found_some_locale = 1;
48953    }
48954  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
48955    {
48956      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
48957      mbstate_t state;
48958      wchar_t wc;
48959
48960      memset (&state, '\0', sizeof (mbstate_t));
48961      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
48962        {
48963          input[3] = '\0';
48964          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
48965            result |= 16;
48966        }
48967      found_some_locale = 1;
48968    }
48969  return (found_some_locale ? result : 77);
48970}
48971_ACEOF
48972if ac_fn_c_try_run "$LINENO"; then :
48973  gl_cv_func_mbrtowc_retval=yes
48974else
48975  if test $? != 77; then
48976             gl_cv_func_mbrtowc_retval=no
48977           fi
48978
48979fi
48980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48981  conftest.$ac_objext conftest.beam conftest.$ac_ext
48982fi
48983
48984      fi
48985
48986fi
48987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
48988$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
48989
48990
48991
48992
48993     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
48994$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
48995if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
48996  $as_echo_n "(cached) " >&6
48997else
48998
48999                  case "$host_os" in
49000                       # Guess no on Solaris 8 and 9.
49001        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
49002                       # Guess yes otherwise.
49003        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
49004      esac
49005      if test $LOCALE_ZH_CN != none; then
49006        if test "$cross_compiling" = yes; then :
49007  :
49008else
49009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49010/* end confdefs.h.  */
49011
49012#include <locale.h>
49013#include <string.h>
49014/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
49015   <wchar.h>.
49016   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
49017   included before <wchar.h>.  */
49018#include <stddef.h>
49019#include <stdio.h>
49020#include <time.h>
49021#include <wchar.h>
49022int main ()
49023{
49024  /* This fails on Solaris 8 and 9.  */
49025  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
49026    {
49027      mbstate_t state;
49028      wchar_t wc;
49029
49030      memset (&state, '\0', sizeof (mbstate_t));
49031      if (mbrtowc (&wc, "", 1, &state) != 0)
49032        return 2;
49033    }
49034  return 0;
49035}
49036_ACEOF
49037if ac_fn_c_try_run "$LINENO"; then :
49038  gl_cv_func_mbrtowc_nul_retval=yes
49039else
49040  gl_cv_func_mbrtowc_nul_retval=no
49041fi
49042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49043  conftest.$ac_objext conftest.beam conftest.$ac_ext
49044fi
49045
49046      fi
49047
49048fi
49049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
49050$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
49051
49052
49053
49054     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
49055$as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
49056if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
49057  $as_echo_n "(cached) " >&6
49058else
49059
49060               case "$host_os" in
49061               # Guess yes on native Windows.
49062       mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
49063       *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
49064     esac
49065     case "$host_os" in
49066       mingw*)
49067         if test "$cross_compiling" = yes; then :
49068  :
49069else
49070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49071/* end confdefs.h.  */
49072
49073#include <locale.h>
49074#include <string.h>
49075/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
49076   <wchar.h>.
49077   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
49078   included before <wchar.h>.  */
49079#include <stddef.h>
49080#include <stdio.h>
49081#include <time.h>
49082#include <wchar.h>
49083int main ()
49084{
49085  int result = 0;
49086  if (setlocale (LC_ALL, "French_France.65001") != NULL)
49087    {
49088      wchar_t wc = (wchar_t) 0xBADFACE;
49089      mbstate_t state;
49090
49091      memset (&state, '\0', sizeof (mbstate_t));
49092      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
49093          && wc != (wchar_t) 0xBADFACE)
49094        result |= 1;
49095    }
49096  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
49097    {
49098      wchar_t wc = (wchar_t) 0xBADFACE;
49099      mbstate_t state;
49100
49101      memset (&state, '\0', sizeof (mbstate_t));
49102      if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
49103          && wc != (wchar_t) 0xBADFACE)
49104        result |= 2;
49105    }
49106  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
49107    {
49108      wchar_t wc = (wchar_t) 0xBADFACE;
49109      mbstate_t state;
49110
49111      memset (&state, '\0', sizeof (mbstate_t));
49112      if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
49113          && wc != (wchar_t) 0xBADFACE)
49114        result |= 4;
49115    }
49116  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
49117    {
49118      wchar_t wc = (wchar_t) 0xBADFACE;
49119      mbstate_t state;
49120
49121      memset (&state, '\0', sizeof (mbstate_t));
49122      if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
49123          && wc != (wchar_t) 0xBADFACE)
49124        result |= 8;
49125    }
49126  return result;
49127}
49128_ACEOF
49129if ac_fn_c_try_run "$LINENO"; then :
49130  gl_cv_func_mbrtowc_stores_incomplete=no
49131else
49132  gl_cv_func_mbrtowc_stores_incomplete=yes
49133fi
49134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49135  conftest.$ac_objext conftest.beam conftest.$ac_ext
49136fi
49137
49138         ;;
49139       *)
49140
49141         if test $LOCALE_FR_UTF8 != none; then
49142           if test "$cross_compiling" = yes; then :
49143  :
49144else
49145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49146/* end confdefs.h.  */
49147
49148#include <locale.h>
49149#include <string.h>
49150/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
49151   <wchar.h>.
49152   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
49153   included before <wchar.h>.  */
49154#include <stddef.h>
49155#include <stdio.h>
49156#include <time.h>
49157#include <wchar.h>
49158int main ()
49159{
49160  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
49161    {
49162      wchar_t wc = (wchar_t) 0xBADFACE;
49163      mbstate_t state;
49164
49165      memset (&state, '\0', sizeof (mbstate_t));
49166      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
49167          && wc != (wchar_t) 0xBADFACE)
49168        return 1;
49169    }
49170  return 0;
49171}
49172_ACEOF
49173if ac_fn_c_try_run "$LINENO"; then :
49174  gl_cv_func_mbrtowc_stores_incomplete=no
49175else
49176  gl_cv_func_mbrtowc_stores_incomplete=yes
49177fi
49178rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49179  conftest.$ac_objext conftest.beam conftest.$ac_ext
49180fi
49181
49182         fi
49183         ;;
49184     esac
49185
49186fi
49187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
49188$as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
49189
49190
49191
49192     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
49193$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
49194if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
49195  $as_echo_n "(cached) " >&6
49196else
49197
49198                  case "$host_os" in
49199                              # Guess no on AIX and glibc systems.
49200        aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
49201                              # Guess yes on native Windows.
49202        mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
49203        *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
49204      esac
49205      if test "$cross_compiling" = yes; then :
49206  :
49207else
49208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49209/* end confdefs.h.  */
49210
49211           #include <wchar.h>
49212           static wchar_t wc;
49213           static mbstate_t mbs;
49214           int
49215           main (void)
49216           {
49217             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
49218           }
49219_ACEOF
49220if ac_fn_c_try_run "$LINENO"; then :
49221  gl_cv_func_mbrtowc_empty_input=yes
49222else
49223  gl_cv_func_mbrtowc_empty_input=no
49224fi
49225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49226  conftest.$ac_objext conftest.beam conftest.$ac_ext
49227fi
49228
49229
49230fi
49231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
49232$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
49233
49234
49235     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
49236$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
49237if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
49238  $as_echo_n "(cached) " >&6
49239else
49240
49241               gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
49242
49243     if test "$cross_compiling" = yes; then :
49244  case "$host_os" in
49245                 # Guess yes on native Windows.
49246         mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
49247       esac
49248
49249else
49250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49251/* end confdefs.h.  */
49252#include <limits.h>
49253            #include <locale.h>
49254            #include <wchar.h>
49255
49256int
49257main ()
49258{
49259
49260            int i;
49261            char *locale = setlocale (LC_ALL, "C");
49262            if (! locale)
49263              return 2;
49264            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
49265              {
49266                char c = i;
49267                wchar_t wc;
49268                mbstate_t mbs = { 0, };
49269                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
49270                if (1 < ss)
49271                  return 3;
49272              }
49273            return 0;
49274
49275  ;
49276  return 0;
49277}
49278_ACEOF
49279if ac_fn_c_try_run "$LINENO"; then :
49280  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
49281else
49282  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
49283fi
49284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49285  conftest.$ac_objext conftest.beam conftest.$ac_ext
49286fi
49287
49288
49289fi
49290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
49291$as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
49292
49293      case "$gl_cv_func_mbrtowc_null_arg1" in
49294        *yes) ;;
49295        *)
49296$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
49297
49298           REPLACE_MBRTOWC=1
49299           ;;
49300      esac
49301      case "$gl_cv_func_mbrtowc_null_arg2" in
49302        *yes) ;;
49303        *)
49304$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
49305
49306           REPLACE_MBRTOWC=1
49307           ;;
49308      esac
49309      case "$gl_cv_func_mbrtowc_retval" in
49310        *yes) ;;
49311        *)
49312$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
49313
49314           REPLACE_MBRTOWC=1
49315           ;;
49316      esac
49317      case "$gl_cv_func_mbrtowc_nul_retval" in
49318        *yes) ;;
49319        *)
49320$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
49321
49322           REPLACE_MBRTOWC=1
49323           ;;
49324      esac
49325      case "$gl_cv_func_mbrtowc_stores_incomplete" in
49326        *no) ;;
49327        *)
49328$as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
49329
49330           REPLACE_MBRTOWC=1
49331           ;;
49332      esac
49333      case "$gl_cv_func_mbrtowc_empty_input" in
49334        *yes) ;;
49335        *)
49336$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
49337
49338           REPLACE_MBRTOWC=1
49339           ;;
49340      esac
49341      case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
49342        *yes) ;;
49343        *)
49344$as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
49345
49346           REPLACE_MBRTOWC=1
49347           ;;
49348      esac
49349    fi
49350  fi
49351  if test $REPLACE_MBSTATE_T = 1; then
49352    case "$host_os" in
49353      mingw*) LIB_MBRTOWC= ;;
49354      *)
49355
49356
49357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
49358$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
49359if ${gl_cv_have_weak+:} false; then :
49360  $as_echo_n "(cached) " >&6
49361else
49362  gl_cv_have_weak=no
49363          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49364/* end confdefs.h.  */
49365extern void xyzzy ();
49366#pragma weak xyzzy
49367int
49368main ()
49369{
49370xyzzy();
49371  ;
49372  return 0;
49373}
49374_ACEOF
49375if ac_fn_c_try_link "$LINENO"; then :
49376  gl_cv_have_weak=maybe
49377fi
49378rm -f core conftest.err conftest.$ac_objext \
49379    conftest$ac_exeext conftest.$ac_ext
49380     if test $gl_cv_have_weak = maybe; then
49381                     if test "$cross_compiling" = yes; then :
49382                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49383/* end confdefs.h.  */
49384#ifdef __ELF__
49385             Extensible Linking Format
49386             #endif
49387
49388_ACEOF
49389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49390  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
49391  gl_cv_have_weak="guessing yes"
49392else
49393  gl_cv_have_weak="guessing no"
49394fi
49395rm -f conftest*
49396
49397
49398else
49399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49400/* end confdefs.h.  */
49401
49402#include <stdio.h>
49403#pragma weak fputs
49404int main ()
49405{
49406  return (fputs == NULL);
49407}
49408_ACEOF
49409if ac_fn_c_try_run "$LINENO"; then :
49410  gl_cv_have_weak=yes
49411else
49412  gl_cv_have_weak=no
49413fi
49414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49415  conftest.$ac_objext conftest.beam conftest.$ac_ext
49416fi
49417
49418     fi
49419          case " $LDFLAGS " in
49420       *" -static "*) gl_cv_have_weak=no ;;
49421     esac
49422                    case "$gl_cv_have_weak" in
49423       *yes)
49424         case "$host_os" in
49425           freebsd* | dragonfly*)
49426             : > conftest1.c
49427             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
49428             cat <<EOF > conftest2.c
49429#include <pthread.h>
49430#pragma weak pthread_mutexattr_gettype
49431int main ()
49432{
49433  return (pthread_mutexattr_gettype != NULL);
49434}
49435EOF
49436             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
49437               || gl_cv_have_weak=no
49438             rm -f conftest1.c libempty.so conftest2.c conftest
49439             ;;
49440         esac
49441         ;;
49442     esac
49443
49444fi
49445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
49446$as_echo "$gl_cv_have_weak" >&6; }
49447  case "$gl_cv_have_weak" in
49448    *yes)
49449
49450$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
49451
49452      ;;
49453  esac
49454
49455        case "$gl_cv_have_weak" in
49456          *yes) LIB_MBRTOWC= ;;
49457          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
49458        esac
49459        ;;
49460    esac
49461  else
49462    LIB_MBRTOWC=
49463  fi
49464
49465
49466  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
49467
49468
49469
49470
49471
49472
49473
49474
49475  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
49476
49477    if test $REPLACE_MBSTATE_T = 1; then
49478
49479
49480
49481
49482
49483
49484
49485
49486  gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496  gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
49497
49498
49499
49500
49501  CFLAG_VISIBILITY=
49502  HAVE_VISIBILITY=0
49503  if test -n "$GCC"; then
49504                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
49505$as_echo_n "checking whether the -Werror option is usable... " >&6; }
49506if ${gl_cv_cc_vis_werror+:} false; then :
49507  $as_echo_n "(cached) " >&6
49508else
49509  gl_save_CFLAGS="$CFLAGS"
49510       CFLAGS="$CFLAGS -Werror"
49511       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49512/* end confdefs.h.  */
49513
49514int
49515main ()
49516{
49517
49518  ;
49519  return 0;
49520}
49521_ACEOF
49522if ac_fn_c_try_compile "$LINENO"; then :
49523  gl_cv_cc_vis_werror=yes
49524else
49525  gl_cv_cc_vis_werror=no
49526fi
49527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49528       CFLAGS="$gl_save_CFLAGS"
49529
49530fi
49531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
49532$as_echo "$gl_cv_cc_vis_werror" >&6; }
49533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
49534$as_echo_n "checking for simple visibility declarations... " >&6; }
49535if ${gl_cv_cc_visibility+:} false; then :
49536  $as_echo_n "(cached) " >&6
49537else
49538  gl_save_CFLAGS="$CFLAGS"
49539       CFLAGS="$CFLAGS -fvisibility=hidden"
49540                                          if test $gl_cv_cc_vis_werror = yes; then
49541         CFLAGS="$CFLAGS -Werror"
49542       fi
49543       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49544/* end confdefs.h.  */
49545extern __attribute__((__visibility__("hidden"))) int hiddenvar;
49546              extern __attribute__((__visibility__("default"))) int exportedvar;
49547              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
49548              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
49549              void dummyfunc (void) {}
49550
49551int
49552main ()
49553{
49554
49555  ;
49556  return 0;
49557}
49558_ACEOF
49559if ac_fn_c_try_compile "$LINENO"; then :
49560  gl_cv_cc_visibility=yes
49561else
49562  gl_cv_cc_visibility=no
49563fi
49564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49565       CFLAGS="$gl_save_CFLAGS"
49566
49567fi
49568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
49569$as_echo "$gl_cv_cc_visibility" >&6; }
49570    if test $gl_cv_cc_visibility = yes; then
49571      CFLAG_VISIBILITY="-fvisibility=hidden"
49572      HAVE_VISIBILITY=1
49573    fi
49574  fi
49575
49576
49577
49578cat >>confdefs.h <<_ACEOF
49579#define HAVE_VISIBILITY $HAVE_VISIBILITY
49580_ACEOF
49581
49582
49583
49584    fi
49585
49586
49587  :
49588
49589  fi
49590
49591
49592
49593
49594
49595          GNULIB_MBRTOWC=1
49596
49597
49598
49599
49600
49601$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
49602
49603
49604
49605
49606
49607
49608
49609
49610
49611
49612
49613
49614
49615
49616
49617        if case "$host_os" in
49618       mingw*) true ;;
49619       *) test $ac_cv_func_mbsinit = yes ;;
49620     esac \
49621    && test $ac_cv_func_mbrtowc = yes; then
49622
49623
49624
49625
49626     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
49627$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
49628if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
49629  $as_echo_n "(cached) " >&6
49630else
49631
49632                  case "$host_os" in
49633                     # Guess no on AIX and OSF/1.
49634        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
49635                     # Guess yes otherwise.
49636        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
49637      esac
49638      if test $LOCALE_JA != none; then
49639        if test "$cross_compiling" = yes; then :
49640  :
49641else
49642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49643/* end confdefs.h.  */
49644
49645#include <locale.h>
49646#include <string.h>
49647/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
49648   <wchar.h>.
49649   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
49650   included before <wchar.h>.  */
49651#include <stddef.h>
49652#include <stdio.h>
49653#include <time.h>
49654#include <wchar.h>
49655int main ()
49656{
49657  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
49658    {
49659      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
49660      mbstate_t state;
49661      wchar_t wc;
49662
49663      memset (&state, '\0', sizeof (mbstate_t));
49664      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
49665        if (mbsinit (&state))
49666          return 2;
49667    }
49668  return 0;
49669}
49670_ACEOF
49671if ac_fn_c_try_run "$LINENO"; then :
49672  gl_cv_func_mbrtowc_incomplete_state=yes
49673else
49674  gl_cv_func_mbrtowc_incomplete_state=no
49675fi
49676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49677  conftest.$ac_objext conftest.beam conftest.$ac_ext
49678fi
49679
49680      else
49681        if test $LOCALE_FR_UTF8 != none; then
49682          if test "$cross_compiling" = yes; then :
49683  :
49684else
49685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49686/* end confdefs.h.  */
49687
49688#include <locale.h>
49689#include <string.h>
49690/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
49691   <wchar.h>.
49692   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
49693   included before <wchar.h>.  */
49694#include <stddef.h>
49695#include <stdio.h>
49696#include <time.h>
49697#include <wchar.h>
49698int main ()
49699{
49700  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
49701    {
49702      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
49703      mbstate_t state;
49704      wchar_t wc;
49705
49706      memset (&state, '\0', sizeof (mbstate_t));
49707      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
49708        if (mbsinit (&state))
49709          return 2;
49710    }
49711  return 0;
49712}
49713_ACEOF
49714if ac_fn_c_try_run "$LINENO"; then :
49715  gl_cv_func_mbrtowc_incomplete_state=yes
49716else
49717  gl_cv_func_mbrtowc_incomplete_state=no
49718fi
49719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49720  conftest.$ac_objext conftest.beam conftest.$ac_ext
49721fi
49722
49723        fi
49724      fi
49725
49726fi
49727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
49728$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
49729
49730
49731
49732
49733     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
49734$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
49735if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
49736  $as_echo_n "(cached) " >&6
49737else
49738
49739                  case "$host_os" in
49740                    # Guess no on Solaris 8.
49741        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
49742                    # Guess yes otherwise.
49743        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
49744      esac
49745      if test $LOCALE_ZH_CN != none; then
49746        if test "$cross_compiling" = yes; then :
49747  :
49748else
49749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49750/* end confdefs.h.  */
49751
49752#include <locale.h>
49753#include <stdlib.h>
49754#include <string.h>
49755/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
49756   <wchar.h>.
49757   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
49758   included before <wchar.h>.  */
49759#include <stddef.h>
49760#include <stdio.h>
49761#include <time.h>
49762#include <wchar.h>
49763int main ()
49764{
49765  /* This fails on Solaris 8:
49766     mbrtowc returns 2, and sets wc to 0x00F0.
49767     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
49768  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
49769    {
49770      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
49771      mbstate_t state;
49772      wchar_t wc;
49773
49774      memset (&state, '\0', sizeof (mbstate_t));
49775      if (mbrtowc (&wc, input + 3, 6, &state) != 4
49776          && mbtowc (&wc, input + 3, 6) == 4)
49777        return 2;
49778    }
49779  return 0;
49780}
49781_ACEOF
49782if ac_fn_c_try_run "$LINENO"; then :
49783  gl_cv_func_mbrtowc_sanitycheck=yes
49784else
49785  gl_cv_func_mbrtowc_sanitycheck=no
49786fi
49787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49788  conftest.$ac_objext conftest.beam conftest.$ac_ext
49789fi
49790
49791      fi
49792
49793fi
49794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
49795$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49796
49797    REPLACE_MBSTATE_T=0
49798    case "$gl_cv_func_mbrtowc_incomplete_state" in
49799      *yes) ;;
49800      *) REPLACE_MBSTATE_T=1 ;;
49801    esac
49802    case "$gl_cv_func_mbrtowc_sanitycheck" in
49803      *yes) ;;
49804      *) REPLACE_MBSTATE_T=1 ;;
49805    esac
49806  else
49807    REPLACE_MBSTATE_T=1
49808  fi
49809
49810
49811
49812  if test $ac_cv_func_mbsinit = no; then
49813    HAVE_MBSINIT=0
49814    ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
49815/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
49816   <wchar.h>.
49817   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
49818   included before <wchar.h>.  */
49819#include <stddef.h>
49820#include <stdio.h>
49821#include <time.h>
49822#include <wchar.h>
49823
49824"
49825if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
49826  ac_have_decl=1
49827else
49828  ac_have_decl=0
49829fi
49830
49831cat >>confdefs.h <<_ACEOF
49832#define HAVE_DECL_MBSINIT $ac_have_decl
49833_ACEOF
49834
49835    if test $ac_cv_have_decl_mbsinit = yes; then
49836                        REPLACE_MBSINIT=1
49837    fi
49838  else
49839    if test $REPLACE_MBSTATE_T = 1; then
49840      REPLACE_MBSINIT=1
49841    else
49842                        case "$host_os" in
49843        mingw*) REPLACE_MBSINIT=1 ;;
49844      esac
49845    fi
49846  fi
49847
49848  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
49849
49850
49851
49852
49853
49854
49855
49856
49857  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
49858
49859
49860  :
49861
49862  fi
49863
49864
49865
49866
49867
49868          GNULIB_MBSINIT=1
49869
49870
49871
49872
49873
49874$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
49875
49876
49877
49878
49879
49880
49881  if test $ac_cv_func_mbslen = yes; then
49882    HAVE_MBSLEN=1
49883  else
49884    HAVE_MBSLEN=0
49885  fi
49886
49887
49888
49889
49890
49891
49892          GNULIB_MBSLEN=1
49893
49894
49895
49896
49897
49898$as_echo "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913        if case "$host_os" in
49914       mingw*) true ;;
49915       *) test $ac_cv_func_mbsinit = yes ;;
49916     esac \
49917    && test $ac_cv_func_mbrtowc = yes; then
49918
49919
49920
49921
49922     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
49923$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
49924if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
49925  $as_echo_n "(cached) " >&6
49926else
49927
49928                  case "$host_os" in
49929                     # Guess no on AIX and OSF/1.
49930        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
49931                     # Guess yes otherwise.
49932        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
49933      esac
49934      if test $LOCALE_JA != none; then
49935        if test "$cross_compiling" = yes; then :
49936  :
49937else
49938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49939/* end confdefs.h.  */
49940
49941#include <locale.h>
49942#include <string.h>
49943/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
49944   <wchar.h>.
49945   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
49946   included before <wchar.h>.  */
49947#include <stddef.h>
49948#include <stdio.h>
49949#include <time.h>
49950#include <wchar.h>
49951int main ()
49952{
49953  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
49954    {
49955      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
49956      mbstate_t state;
49957      wchar_t wc;
49958
49959      memset (&state, '\0', sizeof (mbstate_t));
49960      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
49961        if (mbsinit (&state))
49962          return 2;
49963    }
49964  return 0;
49965}
49966_ACEOF
49967if ac_fn_c_try_run "$LINENO"; then :
49968  gl_cv_func_mbrtowc_incomplete_state=yes
49969else
49970  gl_cv_func_mbrtowc_incomplete_state=no
49971fi
49972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49973  conftest.$ac_objext conftest.beam conftest.$ac_ext
49974fi
49975
49976      else
49977        if test $LOCALE_FR_UTF8 != none; then
49978          if test "$cross_compiling" = yes; then :
49979  :
49980else
49981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49982/* end confdefs.h.  */
49983
49984#include <locale.h>
49985#include <string.h>
49986/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
49987   <wchar.h>.
49988   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
49989   included before <wchar.h>.  */
49990#include <stddef.h>
49991#include <stdio.h>
49992#include <time.h>
49993#include <wchar.h>
49994int main ()
49995{
49996  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
49997    {
49998      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
49999      mbstate_t state;
50000      wchar_t wc;
50001
50002      memset (&state, '\0', sizeof (mbstate_t));
50003      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
50004        if (mbsinit (&state))
50005          return 2;
50006    }
50007  return 0;
50008}
50009_ACEOF
50010if ac_fn_c_try_run "$LINENO"; then :
50011  gl_cv_func_mbrtowc_incomplete_state=yes
50012else
50013  gl_cv_func_mbrtowc_incomplete_state=no
50014fi
50015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50016  conftest.$ac_objext conftest.beam conftest.$ac_ext
50017fi
50018
50019        fi
50020      fi
50021
50022fi
50023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
50024$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
50025
50026
50027
50028
50029     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
50030$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
50031if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
50032  $as_echo_n "(cached) " >&6
50033else
50034
50035                  case "$host_os" in
50036                    # Guess no on Solaris 8.
50037        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
50038                    # Guess yes otherwise.
50039        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
50040      esac
50041      if test $LOCALE_ZH_CN != none; then
50042        if test "$cross_compiling" = yes; then :
50043  :
50044else
50045  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50046/* end confdefs.h.  */
50047
50048#include <locale.h>
50049#include <stdlib.h>
50050#include <string.h>
50051/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
50052   <wchar.h>.
50053   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
50054   included before <wchar.h>.  */
50055#include <stddef.h>
50056#include <stdio.h>
50057#include <time.h>
50058#include <wchar.h>
50059int main ()
50060{
50061  /* This fails on Solaris 8:
50062     mbrtowc returns 2, and sets wc to 0x00F0.
50063     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
50064  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
50065    {
50066      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
50067      mbstate_t state;
50068      wchar_t wc;
50069
50070      memset (&state, '\0', sizeof (mbstate_t));
50071      if (mbrtowc (&wc, input + 3, 6, &state) != 4
50072          && mbtowc (&wc, input + 3, 6) == 4)
50073        return 2;
50074    }
50075  return 0;
50076}
50077_ACEOF
50078if ac_fn_c_try_run "$LINENO"; then :
50079  gl_cv_func_mbrtowc_sanitycheck=yes
50080else
50081  gl_cv_func_mbrtowc_sanitycheck=no
50082fi
50083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50084  conftest.$ac_objext conftest.beam conftest.$ac_ext
50085fi
50086
50087      fi
50088
50089fi
50090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
50091$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
50092
50093    REPLACE_MBSTATE_T=0
50094    case "$gl_cv_func_mbrtowc_incomplete_state" in
50095      *yes) ;;
50096      *) REPLACE_MBSTATE_T=1 ;;
50097    esac
50098    case "$gl_cv_func_mbrtowc_sanitycheck" in
50099      *yes) ;;
50100      *) REPLACE_MBSTATE_T=1 ;;
50101    esac
50102  else
50103    REPLACE_MBSTATE_T=1
50104  fi
50105
50106
50107
50108  if test $ac_cv_func_mbsrtowcs = no; then
50109    HAVE_MBSRTOWCS=0
50110    ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
50111/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
50112   <wchar.h>.
50113   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
50114   included before <wchar.h>.  */
50115#include <stddef.h>
50116#include <stdio.h>
50117#include <time.h>
50118#include <wchar.h>
50119
50120"
50121if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
50122  ac_have_decl=1
50123else
50124  ac_have_decl=0
50125fi
50126
50127cat >>confdefs.h <<_ACEOF
50128#define HAVE_DECL_MBSRTOWCS $ac_have_decl
50129_ACEOF
50130
50131    if test $ac_cv_have_decl_mbsrtowcs = yes; then
50132                        REPLACE_MBSRTOWCS=1
50133    fi
50134  else
50135    if test $REPLACE_MBSTATE_T = 1; then
50136      REPLACE_MBSRTOWCS=1
50137    else
50138
50139
50140
50141
50142
50143
50144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
50145$as_echo_n "checking whether mbsrtowcs works... " >&6; }
50146if ${gl_cv_func_mbsrtowcs_works+:} false; then :
50147  $as_echo_n "(cached) " >&6
50148else
50149
50150                  case "$host_os" in
50151                                   # Guess no on HP-UX, Solaris, mingw.
50152        hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
50153                                   # Guess yes otherwise.
50154        *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
50155      esac
50156      if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
50157        if test "$cross_compiling" = yes; then :
50158  :
50159else
50160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50161/* end confdefs.h.  */
50162
50163#include <locale.h>
50164#include <string.h>
50165/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
50166   <wchar.h>.
50167   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
50168   included before <wchar.h>.  */
50169#include <stddef.h>
50170#include <stdio.h>
50171#include <time.h>
50172#include <wchar.h>
50173int main ()
50174{
50175  int result = 0;
50176  /* Test whether the function supports a NULL destination argument.
50177     This fails on native Windows.  */
50178  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
50179    {
50180      const char input[] = "\337er";
50181      const char *src = input;
50182      mbstate_t state;
50183
50184      memset (&state, '\0', sizeof (mbstate_t));
50185      if (mbsrtowcs (NULL, &src, 1, &state) != 3
50186          || src != input)
50187        result |= 1;
50188    }
50189  /* Test whether the function works when started with a conversion state
50190     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
50191  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
50192    {
50193      const char input[] = "B\303\274\303\237er";
50194      mbstate_t state;
50195
50196      memset (&state, '\0', sizeof (mbstate_t));
50197      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
50198        if (!mbsinit (&state))
50199          {
50200            const char *src = input + 2;
50201            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
50202              result |= 2;
50203          }
50204    }
50205  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
50206    {
50207      const char input[] = "<\306\374\313\334\270\354>";
50208      mbstate_t state;
50209
50210      memset (&state, '\0', sizeof (mbstate_t));
50211      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
50212        if (!mbsinit (&state))
50213          {
50214            const char *src = input + 4;
50215            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
50216              result |= 4;
50217          }
50218    }
50219  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
50220    {
50221      const char input[] = "B\250\271\201\060\211\070er";
50222      mbstate_t state;
50223
50224      memset (&state, '\0', sizeof (mbstate_t));
50225      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
50226        if (!mbsinit (&state))
50227          {
50228            const char *src = input + 2;
50229            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
50230              result |= 8;
50231          }
50232    }
50233  return result;
50234}
50235_ACEOF
50236if ac_fn_c_try_run "$LINENO"; then :
50237  gl_cv_func_mbsrtowcs_works=yes
50238else
50239  gl_cv_func_mbsrtowcs_works=no
50240fi
50241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50242  conftest.$ac_objext conftest.beam conftest.$ac_ext
50243fi
50244
50245      fi
50246
50247fi
50248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
50249$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
50250
50251      case "$gl_cv_func_mbsrtowcs_works" in
50252        *yes) ;;
50253        *) REPLACE_MBSRTOWCS=1 ;;
50254      esac
50255    fi
50256  fi
50257
50258  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
50259
50260
50261
50262
50263
50264
50265
50266
50267  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
50278
50279
50280  :
50281
50282  fi
50283
50284
50285
50286
50287
50288          GNULIB_MBSRTOWCS=1
50289
50290
50291
50292
50293
50294$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
50295
50296
50297
50298
50299
50300
50301
50302
50303          GNULIB_MBSSTR=1
50304
50305
50306
50307
50308
50309$as_echo "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
50310
50311
50312
50313
50314
50315
50316
50317      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbswidth is declared in <wchar.h>" >&5
50318$as_echo_n "checking whether mbswidth is declared in <wchar.h>... " >&6; }
50319if ${ac_cv_have_decl_mbswidth+:} false; then :
50320  $as_echo_n "(cached) " >&6
50321else
50322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50323/* end confdefs.h.  */
50324
50325/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
50326   <wchar.h>.
50327   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
50328   before <wchar.h>.  */
50329#include <stddef.h>
50330#include <stdio.h>
50331#include <time.h>
50332#include <wchar.h>
50333
50334int
50335main ()
50336{
50337
50338  char *p = (char *) mbswidth;
50339  return !p;
50340
50341  ;
50342  return 0;
50343}
50344_ACEOF
50345if ac_fn_c_try_compile "$LINENO"; then :
50346  ac_cv_have_decl_mbswidth=yes
50347else
50348  ac_cv_have_decl_mbswidth=no
50349fi
50350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50351fi
50352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_mbswidth" >&5
50353$as_echo "$ac_cv_have_decl_mbswidth" >&6; }
50354  if test $ac_cv_have_decl_mbswidth = yes; then
50355    ac_val=1
50356  else
50357    ac_val=0
50358  fi
50359
50360cat >>confdefs.h <<_ACEOF
50361#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H $ac_val
50362_ACEOF
50363
50364
50365
50366
50367   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
50368$as_echo_n "checking for mbstate_t... " >&6; }
50369if ${ac_cv_type_mbstate_t+:} false; then :
50370  $as_echo_n "(cached) " >&6
50371else
50372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50373/* end confdefs.h.  */
50374$ac_includes_default
50375/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
50376   <wchar.h>.
50377   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
50378   included before <wchar.h>.  */
50379#include <stddef.h>
50380#include <stdio.h>
50381#include <time.h>
50382#include <wchar.h>
50383int
50384main ()
50385{
50386mbstate_t x; return sizeof x;
50387  ;
50388  return 0;
50389}
50390_ACEOF
50391if ac_fn_c_try_compile "$LINENO"; then :
50392  ac_cv_type_mbstate_t=yes
50393else
50394  ac_cv_type_mbstate_t=no
50395fi
50396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50397fi
50398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
50399$as_echo "$ac_cv_type_mbstate_t" >&6; }
50400   if test $ac_cv_type_mbstate_t = yes; then
50401
50402$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
50403
50404   else
50405
50406$as_echo "#define mbstate_t int" >>confdefs.h
50407
50408   fi
50409
50410
50411
50412
50413
50414  for ac_func in mbtowc
50415do :
50416  ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
50417if test "x$ac_cv_func_mbtowc" = xyes; then :
50418  cat >>confdefs.h <<_ACEOF
50419#define HAVE_MBTOWC 1
50420_ACEOF
50421
50422fi
50423done
50424
50425  if test $ac_cv_func_mbtowc = no; then
50426    HAVE_MBTOWC=0
50427  else
50428    if false; then
50429      REPLACE_MBTOWC=1
50430    fi
50431  fi
50432
50433  if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
50434
50435
50436
50437
50438
50439
50440
50441
50442  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
50443
50444
50445  :
50446
50447  fi
50448
50449
50450
50451
50452
50453          GNULIB_MBTOWC=1
50454
50455
50456
50457
50458
50459$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
50460
50461
50462
50463
50464
50465  :
50466
50467
50468  if test $REPLACE_MEMCHR = 1; then
50469
50470
50471
50472
50473
50474
50475
50476
50477  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
50478
50479
50480  for ac_header in bp-sym.h
50481do :
50482  ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
50483if test "x$ac_cv_header_bp_sym_h" = xyes; then :
50484  cat >>confdefs.h <<_ACEOF
50485#define HAVE_BP_SYM_H 1
50486_ACEOF
50487
50488fi
50489
50490done
50491
50492
50493  fi
50494
50495
50496
50497
50498
50499          GNULIB_MEMCHR=1
50500
50501
50502
50503
50504
50505$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
50506
50507
50508
50509
50510  for ac_func in memmove
50511do :
50512  ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
50513if test "x$ac_cv_func_memmove" = xyes; then :
50514  cat >>confdefs.h <<_ACEOF
50515#define HAVE_MEMMOVE 1
50516_ACEOF
50517
50518fi
50519done
50520
50521
50522  if test $ac_cv_func_memmove = no; then
50523
50524
50525
50526
50527
50528
50529
50530
50531  gl_LIBOBJS="$gl_LIBOBJS memmove.$ac_objext"
50532
50533
50534  :
50535
50536  fi
50537
50538
50539
50540
50541
50542
50543  for ac_func in mempcpy
50544do :
50545  ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
50546if test "x$ac_cv_func_mempcpy" = xyes; then :
50547  cat >>confdefs.h <<_ACEOF
50548#define HAVE_MEMPCPY 1
50549_ACEOF
50550
50551fi
50552done
50553
50554  if test $ac_cv_func_mempcpy = no; then
50555    HAVE_MEMPCPY=0
50556  fi
50557
50558  if test $HAVE_MEMPCPY = 0; then
50559
50560
50561
50562
50563
50564
50565
50566
50567  gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
50568
50569
50570  :
50571
50572  fi
50573
50574
50575
50576
50577
50578          GNULIB_MEMPCPY=1
50579
50580
50581
50582
50583
50584$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
50585
50586
50587
50588
50589  for ac_func in memset
50590do :
50591  ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
50592if test "x$ac_cv_func_memset" = xyes; then :
50593  cat >>confdefs.h <<_ACEOF
50594#define HAVE_MEMSET 1
50595_ACEOF
50596
50597fi
50598done
50599
50600
50601  if test $ac_cv_func_memset = no; then
50602
50603
50604
50605
50606
50607
50608
50609
50610  gl_LIBOBJS="$gl_LIBOBJS memset.$ac_objext"
50611
50612
50613  :
50614
50615  fi
50616
50617
50618
50619
50620
50621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
50622$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
50623if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
50624  $as_echo_n "(cached) " >&6
50625else
50626  rm -rf conftest.dir
50627      if test "$cross_compiling" = yes; then :
50628  case "$host_os" in
50629                          # Guess yes on Linux systems.
50630         linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
50631                          # Guess yes on glibc systems.
50632         *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
50633                          # Guess yes on MSVC, no on mingw.
50634         mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50635/* end confdefs.h.  */
50636
50637#ifdef _MSC_VER
50638 Known
50639#endif
50640
50641_ACEOF
50642if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50643  $EGREP "Known" >/dev/null 2>&1; then :
50644  gl_cv_func_mkdir_trailing_slash_works="guessing yes"
50645else
50646  gl_cv_func_mkdir_trailing_slash_works="guessing no"
50647fi
50648rm -f conftest*
50649
50650                          ;;
50651                          # If we don't know, obey --enable-cross-guesses.
50652         *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
50653       esac
50654
50655else
50656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50657/* end confdefs.h.  */
50658
50659#       include <sys/types.h>
50660#       include <sys/stat.h>
50661
50662int
50663main ()
50664{
50665return mkdir ("conftest.dir/", 0700);
50666  ;
50667  return 0;
50668}
50669_ACEOF
50670if ac_fn_c_try_run "$LINENO"; then :
50671  gl_cv_func_mkdir_trailing_slash_works=yes
50672else
50673  gl_cv_func_mkdir_trailing_slash_works=no
50674fi
50675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50676  conftest.$ac_objext conftest.beam conftest.$ac_ext
50677fi
50678
50679    rm -rf conftest.dir
50680
50681
50682fi
50683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
50684$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
50685  case "$gl_cv_func_mkdir_trailing_slash_works" in
50686    *yes) ;;
50687    *)
50688      REPLACE_MKDIR=1
50689      ;;
50690  esac
50691
50692  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
50693$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
50694if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
50695  $as_echo_n "(cached) " >&6
50696else
50697  rm -rf conftest.dir
50698      if test "$cross_compiling" = yes; then :
50699  case "$host_os" in
50700                        # Guess yes on glibc systems.
50701         *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
50702                        # Guess yes on musl systems.
50703         *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
50704                        # Guess no on native Windows.
50705         mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
50706                        # If we don't know, obey --enable-cross-guesses.
50707         *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
50708       esac
50709
50710else
50711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50712/* end confdefs.h.  */
50713
50714#       include <sys/types.h>
50715#       include <sys/stat.h>
50716
50717int
50718main ()
50719{
50720return !mkdir ("conftest.dir/./", 0700);
50721  ;
50722  return 0;
50723}
50724_ACEOF
50725if ac_fn_c_try_run "$LINENO"; then :
50726  gl_cv_func_mkdir_trailing_dot_works=yes
50727else
50728  gl_cv_func_mkdir_trailing_dot_works=no
50729fi
50730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50731  conftest.$ac_objext conftest.beam conftest.$ac_ext
50732fi
50733
50734    rm -rf conftest.dir
50735
50736
50737fi
50738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
50739$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
50740  case "$gl_cv_func_mkdir_trailing_dot_works" in
50741    *yes) ;;
50742    *)
50743      REPLACE_MKDIR=1
50744
50745$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
50746
50747      ;;
50748  esac
50749
50750  if test $REPLACE_MKDIR = 1; then
50751
50752
50753
50754
50755
50756
50757
50758
50759  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
50760
50761  fi
50762
50763
50764  for ac_func in mkdtemp
50765do :
50766  ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
50767if test "x$ac_cv_func_mkdtemp" = xyes; then :
50768  cat >>confdefs.h <<_ACEOF
50769#define HAVE_MKDTEMP 1
50770_ACEOF
50771
50772fi
50773done
50774
50775  if test $ac_cv_func_mkdtemp = no; then
50776    HAVE_MKDTEMP=0
50777  fi
50778
50779  if test $HAVE_MKDTEMP = 0; then
50780
50781
50782
50783
50784
50785
50786
50787
50788  gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
50789
50790    :
50791
50792  fi
50793
50794
50795
50796
50797
50798          GNULIB_MKDTEMP=1
50799
50800
50801
50802
50803
50804$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
50805
50806
50807
50808
50809  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
50810
50811
50812
50813
50814
50815
50816
50817
50818  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
50819
50820  fi
50821
50822  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
50823
50824
50825
50826
50827
50828
50829
50830
50831  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
50832
50833  fi
50834
50835
50836cat >>confdefs.h <<_ACEOF
50837#define GNULIB_MSVC_NOTHROW 1
50838_ACEOF
50839
50840
50841
50842
50843  NO_CXX=
50844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50845/* end confdefs.h.  */
50846
50847#if defined __GNUC__ && defined __cplusplus
50848  Is_g_plus_plus
50849#endif
50850
50851_ACEOF
50852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50853  $EGREP "Is_g_plus_plus" >/dev/null 2>&1; then :
50854  NO_CXX="-x c"
50855fi
50856rm -f conftest*
50857
50858
50859
50860
50861
50862
50863
50864
50865
50866
50867
50868
50869
50870
50871
50872   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
50873$as_echo_n "checking for obstacks that work with any size object... " >&6; }
50874if ${ac_cv_func_obstack+:} false; then :
50875  $as_echo_n "(cached) " >&6
50876else
50877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50878/* end confdefs.h.  */
50879#include "obstack.h"
50880             void *obstack_chunk_alloc (size_t n) { return 0; }
50881             void obstack_chunk_free (void *p) { }
50882             /* Check that an internal function returns size_t, not int.  */
50883             size_t _obstack_memory_used (struct obstack *);
50884
50885int
50886main ()
50887{
50888struct obstack mem;
50889             obstack_init (&mem);
50890             obstack_free (&mem, 0);
50891
50892  ;
50893  return 0;
50894}
50895_ACEOF
50896if ac_fn_c_try_link "$LINENO"; then :
50897  ac_cv_func_obstack=yes
50898else
50899  ac_cv_func_obstack=no
50900fi
50901rm -f core conftest.err conftest.$ac_objext \
50902    conftest$ac_exeext conftest.$ac_ext
50903fi
50904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
50905$as_echo "$ac_cv_func_obstack" >&6; }
50906   if test "$ac_cv_func_obstack" = yes; then
50907
50908$as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
50909
50910   else
50911
50912
50913
50914
50915
50916
50917
50918
50919  gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
50920
50921   fi
50922
50923
50924
50925
50926  case "$host_os" in
50927    mingw* | pw*)
50928      REPLACE_OPEN=1
50929      ;;
50930    *)
50931
50932      if test "$gl_cv_macro_O_CLOEXEC" != yes; then
50933        REPLACE_OPEN=1
50934      fi
50935
50936
50937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
50938$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
50939if ${gl_cv_func_open_slash+:} false; then :
50940  $as_echo_n "(cached) " >&6
50941else
50942  # Assume that if we have lstat, we can also check symlinks.
50943     if test $ac_cv_func_lstat = yes; then
50944       touch conftest.tmp
50945       ln -s conftest.tmp conftest.lnk
50946     fi
50947     if test "$cross_compiling" = yes; then :
50948
50949        case "$host_os" in
50950dragonfly* |           freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
50951            gl_cv_func_open_slash="guessing no" ;;
50952          *)
50953            gl_cv_func_open_slash="guessing yes" ;;
50954        esac
50955
50956else
50957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50958/* end confdefs.h.  */
50959
50960#include <fcntl.h>
50961#if HAVE_UNISTD_H
50962# include <unistd.h>
50963#endif
50964int main ()
50965{
50966  int result = 0;
50967#if HAVE_LSTAT
50968  if (open ("conftest.lnk/", O_RDONLY) != -1)
50969    result |= 1;
50970#endif
50971  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
50972    result |= 2;
50973  return result;
50974}
50975_ACEOF
50976if ac_fn_c_try_run "$LINENO"; then :
50977  gl_cv_func_open_slash=yes
50978else
50979  gl_cv_func_open_slash=no
50980fi
50981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50982  conftest.$ac_objext conftest.beam conftest.$ac_ext
50983fi
50984
50985     rm -f conftest.sl conftest.tmp conftest.lnk
50986
50987fi
50988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
50989$as_echo "$gl_cv_func_open_slash" >&6; }
50990  case "$gl_cv_func_open_slash" in
50991    *no)
50992
50993$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
50994
50995      ;;
50996  esac
50997
50998      case "$gl_cv_func_open_slash" in
50999        *no)
51000          REPLACE_OPEN=1
51001          ;;
51002      esac
51003      ;;
51004  esac
51005
51006
51007
51008  if test $REPLACE_OPEN = 1; then
51009
51010
51011
51012
51013
51014
51015
51016
51017  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
51018
51019
51020
51021  :
51022
51023  fi
51024
51025
51026
51027
51028
51029          GNULIB_OPEN=1
51030
51031
51032
51033
51034
51035$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
51036
51037
51038
51039
51040
51041
51042  for ac_func in opendir
51043do :
51044  ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
51045if test "x$ac_cv_func_opendir" = xyes; then :
51046  cat >>confdefs.h <<_ACEOF
51047#define HAVE_OPENDIR 1
51048_ACEOF
51049
51050fi
51051done
51052
51053  if test $ac_cv_func_opendir = no; then
51054    HAVE_OPENDIR=0
51055  fi
51056
51057      case $host_os,$HAVE_OPENDIR in
51058    os2*,1)
51059      REPLACE_OPENDIR=1;;
51060  esac
51061
51062  if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
51063
51064
51065
51066
51067
51068
51069
51070
51071  gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
51072
51073  fi
51074
51075
51076
51077
51078
51079          GNULIB_OPENDIR=1
51080
51081
51082
51083
51084
51085$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098     if test $gl_cv_have_include_next = yes; then
51099       gl_cv_next_omp_h='<'omp.h'>'
51100     else
51101       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <omp.h>" >&5
51102$as_echo_n "checking absolute name of <omp.h>... " >&6; }
51103if ${gl_cv_next_omp_h+:} false; then :
51104  $as_echo_n "(cached) " >&6
51105else
51106
51107
51108
51109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51110/* end confdefs.h.  */
51111#include <omp.h>
51112_ACEOF
51113                case "$host_os" in
51114    aix*) gl_absname_cpp="$ac_cpp -C" ;;
51115    *)    gl_absname_cpp="$ac_cpp" ;;
51116  esac
51117
51118  case "$host_os" in
51119    mingw*)
51120                                          gl_dirsep_regex='[/\\]'
51121      ;;
51122    *)
51123      gl_dirsep_regex='\/'
51124      ;;
51125  esac
51126      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
51127  gl_header_literal_regex=`echo 'omp.h' \
51128                           | sed -e "$gl_make_literal_regex_sed"`
51129  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
51130      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
51131      s|^/[^/]|//&|
51132      p
51133      q
51134    }'
51135
51136        gl_cv_absolute_omp_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
51137  sed -n "$gl_absolute_header_sed"`
51138
51139           gl_header=$gl_cv_absolute_omp_h
51140           gl_cv_next_omp_h='"'$gl_header'"'
51141
51142
51143fi
51144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_omp_h" >&5
51145$as_echo "$gl_cv_next_omp_h" >&6; }
51146     fi
51147     NEXT_OMP_H=$gl_cv_next_omp_h
51148
51149     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
51150       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
51151       gl_next_as_first_directive='<'omp.h'>'
51152     else
51153       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
51154       gl_next_as_first_directive=$gl_cv_next_omp_h
51155     fi
51156     NEXT_AS_FIRST_DIRECTIVE_OMP_H=$gl_next_as_first_directive
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172  if test $ac_cv_func_pipe2 != yes; then
51173    HAVE_PIPE2=0
51174  fi
51175
51176
51177
51178
51179
51180
51181          GNULIB_PIPE2=1
51182
51183
51184
51185
51186
51187$as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
51188
51189
51190
51191
51192
51193cat >>confdefs.h <<_ACEOF
51194#define GNULIB_PIPE2_SAFER 1
51195_ACEOF
51196
51197
51198
51199
51200
51201  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
51202
51203
51204
51205
51206
51207
51208
51209
51210  gl_LIBOBJS="$gl_LIBOBJS spawni.$ac_objext"
51211
51212
51213  for ac_header in paths.h
51214do :
51215  ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
51216if test "x$ac_cv_header_paths_h" = xyes; then :
51217  cat >>confdefs.h <<_ACEOF
51218#define HAVE_PATHS_H 1
51219_ACEOF
51220
51221fi
51222
51223done
51224
51225  for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
51226do :
51227  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
51228ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
51229if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
51230  cat >>confdefs.h <<_ACEOF
51231#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
51232_ACEOF
51233
51234fi
51235done
51236
51237
51238  fi
51239
51240
51241
51242
51243
51244
51245  if test $REPLACE_POSIX_SPAWN = 1; then
51246    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
51247  else
51248            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
51249$as_echo_n "checking whether posix_spawn_file_actions_addclose works... " >&6; }
51250if ${gl_cv_func_posix_spawn_file_actions_addclose_works+:} false; then :
51251  $as_echo_n "(cached) " >&6
51252else
51253  if test "$cross_compiling" = yes; then :
51254  # Guess no on musl libc and Solaris, yes otherwise.
51255          case "$host_os" in
51256            *-musl*)  gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
51257            solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
51258                      # Guess no on native Windows.
51259            mingw*)   gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
51260            *)        gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes" ;;
51261          esac
51262
51263else
51264  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51265/* end confdefs.h.  */
51266
51267#include <spawn.h>
51268int main ()
51269{
51270  posix_spawn_file_actions_t actions;
51271  if (posix_spawn_file_actions_init (&actions) != 0)
51272    return 1;
51273  if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
51274    return 2;
51275  return 0;
51276}
51277_ACEOF
51278if ac_fn_c_try_run "$LINENO"; then :
51279  gl_cv_func_posix_spawn_file_actions_addclose_works=yes
51280else
51281  gl_cv_func_posix_spawn_file_actions_addclose_works=no
51282fi
51283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51284  conftest.$ac_objext conftest.beam conftest.$ac_ext
51285fi
51286
51287
51288fi
51289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
51290$as_echo "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
51291    case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
51292      *yes) ;;
51293      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
51294    esac
51295  fi
51296
51297  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
51298
51299
51300
51301
51302
51303
51304
51305
51306  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addclose.$ac_objext"
51307
51308  fi
51309
51310
51311
51312
51313
51314          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
51315
51316
51317
51318
51319
51320$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330  if test $REPLACE_POSIX_SPAWN = 1; then
51331    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
51332  else
51333            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
51334$as_echo_n "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
51335if ${gl_cv_func_posix_spawn_file_actions_adddup2_works+:} false; then :
51336  $as_echo_n "(cached) " >&6
51337else
51338  if test "$cross_compiling" = yes; then :
51339  # Guess no on musl libc and Solaris, yes otherwise.
51340          case "$host_os" in
51341            *-musl*)  gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
51342            solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
51343                      # Guess no on native Windows.
51344            mingw*)   gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no" ;;
51345            *)        gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
51346          esac
51347
51348else
51349  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51350/* end confdefs.h.  */
51351
51352#include <spawn.h>
51353int main ()
51354{
51355  posix_spawn_file_actions_t actions;
51356  if (posix_spawn_file_actions_init (&actions) != 0)
51357    return 1;
51358  if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
51359    return 2;
51360  return 0;
51361}
51362_ACEOF
51363if ac_fn_c_try_run "$LINENO"; then :
51364  gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
51365else
51366  gl_cv_func_posix_spawn_file_actions_adddup2_works=no
51367fi
51368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51369  conftest.$ac_objext conftest.beam conftest.$ac_ext
51370fi
51371
51372
51373fi
51374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
51375$as_echo "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
51376    case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
51377      *yes) ;;
51378      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
51379    esac
51380  fi
51381
51382  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
51383
51384
51385
51386
51387
51388
51389
51390
51391  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_adddup2.$ac_objext"
51392
51393  fi
51394
51395
51396
51397
51398
51399          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
51400
51401
51402
51403
51404
51405$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415  if test $REPLACE_POSIX_SPAWN = 1; then
51416    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
51417  else
51418            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
51419$as_echo_n "checking whether posix_spawn_file_actions_addopen works... " >&6; }
51420if ${gl_cv_func_posix_spawn_file_actions_addopen_works+:} false; then :
51421  $as_echo_n "(cached) " >&6
51422else
51423  if test "$cross_compiling" = yes; then :
51424  # Guess no on musl libc and Solaris, yes otherwise.
51425          case "$host_os" in
51426            *-musl*)  gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
51427            solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
51428                      # Guess no on native Windows.
51429            mingw*)   gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no" ;;
51430            *)        gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
51431          esac
51432
51433else
51434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51435/* end confdefs.h.  */
51436
51437#include <spawn.h>
51438#include <fcntl.h>
51439int main ()
51440{
51441  posix_spawn_file_actions_t actions;
51442  if (posix_spawn_file_actions_init (&actions) != 0)
51443    return 1;
51444  if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
51445      == 0)
51446    return 2;
51447  return 0;
51448}
51449_ACEOF
51450if ac_fn_c_try_run "$LINENO"; then :
51451  gl_cv_func_posix_spawn_file_actions_addopen_works=yes
51452else
51453  gl_cv_func_posix_spawn_file_actions_addopen_works=no
51454fi
51455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51456  conftest.$ac_objext conftest.beam conftest.$ac_ext
51457fi
51458
51459
51460fi
51461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
51462$as_echo "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
51463    case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
51464      *yes) ;;
51465      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
51466    esac
51467  fi
51468
51469  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
51470
51471
51472
51473
51474
51475
51476
51477
51478  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addopen.$ac_objext"
51479
51480  fi
51481
51482
51483
51484
51485
51486          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
51487
51488
51489
51490
51491
51492$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
51493
51494
51495
51496
51497
51498
51499  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
51500
51501
51502
51503
51504
51505
51506
51507
51508  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_destroy.$ac_objext"
51509
51510  fi
51511
51512
51513
51514
51515
51516          GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
51517
51518
51519
51520
51521
51522$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
51523
51524
51525
51526
51527
51528
51529  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
51530
51531
51532
51533
51534
51535
51536
51537
51538  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_init.$ac_objext"
51539
51540  fi
51541
51542
51543
51544
51545
51546          GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
51547
51548
51549
51550
51551
51552$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
51553
51554
51555
51556
51557
51558
51559  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
51560
51561
51562
51563
51564
51565
51566
51567
51568  gl_LIBOBJS="$gl_LIBOBJS spawnattr_destroy.$ac_objext"
51569
51570  fi
51571
51572
51573
51574
51575
51576          GNULIB_POSIX_SPAWNATTR_DESTROY=1
51577
51578
51579
51580
51581
51582$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
51583
51584
51585
51586
51587
51588
51589  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
51590
51591
51592
51593
51594
51595
51596
51597
51598  gl_LIBOBJS="$gl_LIBOBJS spawnattr_init.$ac_objext"
51599
51600  fi
51601
51602
51603
51604
51605
51606          GNULIB_POSIX_SPAWNATTR_INIT=1
51607
51608
51609
51610
51611
51612$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
51613
51614
51615
51616
51617
51618
51619  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
51620
51621
51622
51623
51624
51625
51626
51627
51628  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setflags.$ac_objext"
51629
51630  fi
51631
51632
51633
51634
51635
51636          GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
51637
51638
51639
51640
51641
51642$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
51643
51644
51645
51646
51647
51648
51649  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
51650
51651
51652
51653
51654
51655
51656
51657
51658  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setsigmask.$ac_objext"
51659
51660  fi
51661
51662
51663
51664
51665
51666          GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
51667
51668
51669
51670
51671
51672$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
51673
51674
51675
51676
51677
51678
51679  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
51680
51681
51682
51683
51684
51685
51686
51687
51688  gl_LIBOBJS="$gl_LIBOBJS spawnp.$ac_objext"
51689
51690  fi
51691
51692
51693
51694
51695
51696          GNULIB_POSIX_SPAWNP=1
51697
51698
51699
51700
51701
51702$as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
51703
51704
51705
51706
51707
51708
51709
51710  POW_LIBM="$POW_LIBM"
51711
51712
51713
51714
51715  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
51716"
51717if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
51718  ac_have_decl=1
51719else
51720  ac_have_decl=0
51721fi
51722
51723cat >>confdefs.h <<_ACEOF
51724#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
51725_ACEOF
51726
51727  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
51728"
51729if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
51730  ac_have_decl=1
51731else
51732  ac_have_decl=0
51733fi
51734
51735cat >>confdefs.h <<_ACEOF
51736#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
51737_ACEOF
51738
51739
51740
51741  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
51742
51743
51744
51745  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
51746
51747
51748      :
51749
51750
51751
51752  :
51753
51754
51755
51756
51757  for ac_func in raise
51758do :
51759  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
51760if test "x$ac_cv_func_raise" = xyes; then :
51761  cat >>confdefs.h <<_ACEOF
51762#define HAVE_RAISE 1
51763_ACEOF
51764
51765fi
51766done
51767
51768  if test $ac_cv_func_raise = no; then
51769    HAVE_RAISE=0
51770  else
51771
51772
51773      if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
51774        REPLACE_RAISE=1
51775      fi
51776
51777
51778
51779
51780
51781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigprocmask" >&5
51782$as_echo_n "checking for sigprocmask... " >&6; }
51783if ${gl_cv_func_sigprocmask+:} false; then :
51784  $as_echo_n "(cached) " >&6
51785else
51786  if test $gl_cv_type_sigset_t = yes; then
51787
51788  {
51789
51790         ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
51791if test "x$ac_cv_func_sigprocmask" = xyes; then :
51792  gl_cv_func_sigprocmask=yes
51793else
51794  gl_cv_func_sigprocmask=no
51795fi
51796
51797
51798  } 6>/dev/null
51799
51800     else
51801       gl_cv_func_sigprocmask=no
51802     fi
51803
51804fi
51805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sigprocmask" >&5
51806$as_echo "$gl_cv_func_sigprocmask" >&6; }
51807  if test $gl_cv_func_sigprocmask != yes; then
51808    HAVE_POSIX_SIGNALBLOCKING=0
51809  fi
51810
51811      if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
51812
51813
51814
51815
51816          if test $gl_cv_header_signal_h_SIGPIPE != yes; then
51817            REPLACE_RAISE=1
51818          fi
51819
51820      fi
51821
51822  fi
51823
51824  if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
51825
51826
51827
51828
51829
51830
51831
51832
51833  gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
51834
51835    :
51836  fi
51837
51838
51839
51840
51841
51842          GNULIB_RAISE=1
51843
51844
51845
51846
51847
51848$as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
51849
51850
51851
51852
51853
51854
51855
51856  for ac_func in rawmemchr
51857do :
51858  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
51859if test "x$ac_cv_func_rawmemchr" = xyes; then :
51860  cat >>confdefs.h <<_ACEOF
51861#define HAVE_RAWMEMCHR 1
51862_ACEOF
51863
51864fi
51865done
51866
51867  if test $ac_cv_func_rawmemchr = no; then
51868    HAVE_RAWMEMCHR=0
51869  fi
51870
51871  if test $HAVE_RAWMEMCHR = 0; then
51872
51873
51874
51875
51876
51877
51878
51879
51880  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
51881
51882    :
51883  fi
51884
51885
51886
51887
51888
51889          GNULIB_RAWMEMCHR=1
51890
51891
51892
51893
51894
51895$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
51896
51897
51898
51899
51900
51901
51902
51903    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
51904      REPLACE_READ=1
51905    fi
51906
51907
51908
51909  if test $REPLACE_READ = 1; then
51910
51911
51912
51913
51914
51915
51916
51917
51918  gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
51919
51920    :
51921  fi
51922
51923
51924
51925
51926
51927          GNULIB_READ=1
51928
51929
51930
51931
51932
51933$as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h
51934
51935
51936
51937  :
51938
51939
51940
51941  for ac_func in readdir
51942do :
51943  ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
51944if test "x$ac_cv_func_readdir" = xyes; then :
51945  cat >>confdefs.h <<_ACEOF
51946#define HAVE_READDIR 1
51947_ACEOF
51948
51949fi
51950done
51951
51952  if test $ac_cv_func_readdir = no; then
51953    HAVE_READDIR=0
51954  fi
51955
51956  if test $HAVE_READDIR = 0; then
51957
51958
51959
51960
51961
51962
51963
51964
51965  gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
51966
51967  fi
51968
51969
51970
51971
51972
51973          GNULIB_READDIR=1
51974
51975
51976
51977
51978
51979$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
51980
51981
51982
51983
51984
51985
51986  if test $ac_cv_func_readlink = no; then
51987    HAVE_READLINK=0
51988  else
51989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
51990$as_echo_n "checking whether readlink signature is correct... " >&6; }
51991if ${gl_cv_decl_readlink_works+:} false; then :
51992  $as_echo_n "(cached) " >&6
51993else
51994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51995/* end confdefs.h.  */
51996#include <unistd.h>
51997      /* Cause compilation failure if original declaration has wrong type.  */
51998      ssize_t readlink (const char *, char *, size_t);
51999int
52000main ()
52001{
52002
52003  ;
52004  return 0;
52005}
52006_ACEOF
52007if ac_fn_c_try_compile "$LINENO"; then :
52008  gl_cv_decl_readlink_works=yes
52009else
52010  gl_cv_decl_readlink_works=no
52011fi
52012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52013fi
52014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
52015$as_echo "$gl_cv_decl_readlink_works" >&6; }
52016            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
52017$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
52018if ${gl_cv_func_readlink_works+:} false; then :
52019  $as_echo_n "(cached) " >&6
52020else
52021  # We have readlink, so assume ln -s works.
52022       ln -s conftest.no-such conftest.link
52023       ln -s conftest.link conftest.lnk2
52024       if test "$cross_compiling" = yes; then :
52025  case "$host_os" in
52026                             # Guess yes on Linux systems.
52027            linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
52028                             # Guess yes on glibc systems.
52029            *-gnu* | gnu*)   gl_cv_func_readlink_works="guessing yes" ;;
52030                             # If we don't know, obey --enable-cross-guesses.
52031            *)               gl_cv_func_readlink_works="$gl_cross_guess_normal" ;;
52032          esac
52033
52034else
52035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52036/* end confdefs.h.  */
52037#include <unistd.h>
52038
52039int
52040main ()
52041{
52042char buf[20];
52043      return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
52044  ;
52045  return 0;
52046}
52047_ACEOF
52048if ac_fn_c_try_run "$LINENO"; then :
52049  gl_cv_func_readlink_works=yes
52050else
52051  gl_cv_func_readlink_works=no
52052fi
52053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52054  conftest.$ac_objext conftest.beam conftest.$ac_ext
52055fi
52056
52057      rm -f conftest.link conftest.lnk2
52058fi
52059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
52060$as_echo "$gl_cv_func_readlink_works" >&6; }
52061    case "$gl_cv_func_readlink_works" in
52062      *yes)
52063        if test "$gl_cv_decl_readlink_works" != yes; then
52064          REPLACE_READLINK=1
52065        fi
52066        ;;
52067      *)
52068
52069$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
52070
52071        REPLACE_READLINK=1
52072        ;;
52073    esac
52074  fi
52075
52076  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
52077
52078
52079
52080
52081
52082
52083
52084
52085  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
52086
52087
52088  :
52089
52090  fi
52091
52092
52093
52094
52095
52096          GNULIB_READLINK=1
52097
52098
52099
52100
52101
52102$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
52103
52104
52105
52106
52107
52108
52109  if test $gl_cv_func_malloc_posix = yes; then
52110
52111$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
52112
52113  else
52114    REPLACE_REALLOC=1
52115  fi
52116
52117  if test $REPLACE_REALLOC = 1; then
52118
52119
52120
52121
52122
52123
52124
52125
52126  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
52127
52128  fi
52129
52130
52131
52132
52133
52134          GNULIB_REALLOC_POSIX=1
52135
52136
52137
52138
52139
52140$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
52141
52142
52143
52144
52145
52146
52147
52148
52149  : ${RELOCATABLE_CONFIG_H_DIR='$(top_builddir)'}
52150  RELOCATABLE_SRC_DIR="\$(top_srcdir)/$gl_source_base"
52151  RELOCATABLE_BUILD_DIR="\$(top_builddir)/$gl_source_base"
52152
52153  if test $RELOCATABLE = yes; then
52154
52155
52156
52157
52158
52159
52160
52161
52162  gl_LIBOBJS="$gl_LIBOBJS progreloc.$ac_objext"
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172  gl_LIBOBJS="$gl_LIBOBJS relocatable.$ac_objext"
52173
52174  fi
52175
52176
52177
52178
52179  :
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198  if test $ac_cv_have_decl_setenv = no; then
52199    HAVE_DECL_SETENV=0
52200  fi
52201
52202
52203
52204
52205
52206  for ac_header in search.h
52207do :
52208  ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
52209if test "x$ac_cv_header_search_h" = xyes; then :
52210  cat >>confdefs.h <<_ACEOF
52211#define HAVE_SEARCH_H 1
52212_ACEOF
52213
52214fi
52215
52216done
52217
52218  for ac_func in tsearch
52219do :
52220  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
52221if test "x$ac_cv_func_tsearch" = xyes; then :
52222  cat >>confdefs.h <<_ACEOF
52223#define HAVE_TSEARCH 1
52224_ACEOF
52225
52226fi
52227done
52228
52229
52230
52231
52232  relocatable_sh=$ac_aux_dir/relocatable.sh.in
52233
52234
52235
52236
52237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
52238$as_echo_n "checking whether rmdir works... " >&6; }
52239if ${gl_cv_func_rmdir_works+:} false; then :
52240  $as_echo_n "(cached) " >&6
52241else
52242  mkdir conftest.dir
52243     touch conftest.file
52244     if test "$cross_compiling" = yes; then :
52245  case "$host_os" in
52246                           # Guess yes on Linux systems.
52247          linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
52248                           # Guess yes on glibc systems.
52249          *-gnu* | gnu*)   gl_cv_func_rmdir_works="guessing yes" ;;
52250                           # Guess no on native Windows.
52251          mingw*)          gl_cv_func_rmdir_works="guessing no" ;;
52252                           # If we don't know, obey --enable-cross-guesses.
52253          *)               gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
52254        esac
52255
52256else
52257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52258/* end confdefs.h.  */
52259#include <stdio.h>
52260           #include <errno.h>
52261           #if HAVE_UNISTD_H
52262           # include <unistd.h>
52263           #else /* on Windows with MSVC */
52264           # include <direct.h>
52265           #endif
52266
52267int
52268main ()
52269{
52270int result = 0;
52271      if (!rmdir ("conftest.file/"))
52272        result |= 1;
52273      else if (errno != ENOTDIR)
52274        result |= 2;
52275      if (!rmdir ("conftest.dir/./"))
52276        result |= 4;
52277      return result;
52278
52279  ;
52280  return 0;
52281}
52282_ACEOF
52283if ac_fn_c_try_run "$LINENO"; then :
52284  gl_cv_func_rmdir_works=yes
52285else
52286  gl_cv_func_rmdir_works=no
52287fi
52288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52289  conftest.$ac_objext conftest.beam conftest.$ac_ext
52290fi
52291
52292     rm -rf conftest.dir conftest.file
52293fi
52294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
52295$as_echo "$gl_cv_func_rmdir_works" >&6; }
52296  case "$gl_cv_func_rmdir_works" in
52297    *yes) ;;
52298    *)
52299      REPLACE_RMDIR=1
52300      ;;
52301  esac
52302
52303  if test $REPLACE_RMDIR = 1; then
52304
52305
52306
52307
52308
52309
52310
52311
52312  gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
52313
52314  fi
52315
52316
52317
52318
52319
52320          GNULIB_RMDIR=1
52321
52322
52323
52324
52325
52326$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344  for ac_header in sched.h
52345do :
52346  ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
52347       #include <sys/cdefs.h>
52348      #endif
52349
52350"
52351if test "x$ac_cv_header_sched_h" = xyes; then :
52352  cat >>confdefs.h <<_ACEOF
52353#define HAVE_SCHED_H 1
52354_ACEOF
52355
52356fi
52357
52358done
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368     if test $gl_cv_have_include_next = yes; then
52369       gl_cv_next_sched_h='<'sched.h'>'
52370     else
52371       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
52372$as_echo_n "checking absolute name of <sched.h>... " >&6; }
52373if ${gl_cv_next_sched_h+:} false; then :
52374  $as_echo_n "(cached) " >&6
52375else
52376
52377
52378
52379  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52380/* end confdefs.h.  */
52381#include <sched.h>
52382_ACEOF
52383                case "$host_os" in
52384    aix*) gl_absname_cpp="$ac_cpp -C" ;;
52385    *)    gl_absname_cpp="$ac_cpp" ;;
52386  esac
52387
52388  case "$host_os" in
52389    mingw*)
52390                                          gl_dirsep_regex='[/\\]'
52391      ;;
52392    *)
52393      gl_dirsep_regex='\/'
52394      ;;
52395  esac
52396      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
52397  gl_header_literal_regex=`echo 'sched.h' \
52398                           | sed -e "$gl_make_literal_regex_sed"`
52399  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
52400      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
52401      s|^/[^/]|//&|
52402      p
52403      q
52404    }'
52405
52406        gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
52407  sed -n "$gl_absolute_header_sed"`
52408
52409           gl_header=$gl_cv_absolute_sched_h
52410           gl_cv_next_sched_h='"'$gl_header'"'
52411
52412
52413fi
52414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
52415$as_echo "$gl_cv_next_sched_h" >&6; }
52416     fi
52417     NEXT_SCHED_H=$gl_cv_next_sched_h
52418
52419     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
52420       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
52421       gl_next_as_first_directive='<'sched.h'>'
52422     else
52423       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
52424       gl_next_as_first_directive=$gl_cv_next_sched_h
52425     fi
52426     NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
52427
52428
52429
52430
52431
52432  if test "$ac_cv_header_sched_h" = yes; then
52433    HAVE_SCHED_H=1
52434  else
52435    HAVE_SCHED_H=0
52436  fi
52437
52438
52439  if test "$HAVE_SCHED_H" = 1; then
52440    ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
52441         #include <sys/cdefs.h>
52442        #endif
52443        #include <sched.h>
52444
52445"
52446if test "x$ac_cv_type_struct_sched_param" = xyes; then :
52447  HAVE_STRUCT_SCHED_PARAM=1
52448else
52449  HAVE_STRUCT_SCHED_PARAM=0
52450fi
52451
52452  else
52453    HAVE_STRUCT_SCHED_PARAM=0
52454    case "$host_os" in
52455      os2*)
52456                ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
52457"
52458if test "x$ac_cv_type_struct_sched_param" = xyes; then :
52459  HAVE_STRUCT_SCHED_PARAM=1
52460fi
52461
52462        ;;
52463      vms)
52464                ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
52465"
52466if test "x$ac_cv_type_struct_sched_param" = xyes; then :
52467  HAVE_STRUCT_SCHED_PARAM=1
52468fi
52469
52470        ;;
52471    esac
52472  fi
52473
52474
52475  if test "$ac_cv_header_sys_cdefs_h" = yes; then
52476    HAVE_SYS_CDEFS_H=1
52477  else
52478    HAVE_SYS_CDEFS_H=0
52479  fi
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493  if test $ac_cv_func_secure_getenv = no; then
52494    HAVE_SECURE_GETENV=0
52495  fi
52496
52497  if test $HAVE_SECURE_GETENV = 0; then
52498
52499
52500
52501
52502
52503
52504
52505
52506  gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
52507
52508
52509  for ac_func in __secure_getenv
52510do :
52511  ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
52512if test "x$ac_cv_func___secure_getenv" = xyes; then :
52513  cat >>confdefs.h <<_ACEOF
52514#define HAVE___SECURE_GETENV 1
52515_ACEOF
52516
52517fi
52518done
52519
52520  if test $ac_cv_func___secure_getenv = no; then
52521    for ac_func in issetugid
52522do :
52523  ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
52524if test "x$ac_cv_func_issetugid" = xyes; then :
52525  cat >>confdefs.h <<_ACEOF
52526#define HAVE_ISSETUGID 1
52527_ACEOF
52528
52529fi
52530done
52531
52532  fi
52533
52534
52535  fi
52536
52537
52538
52539
52540
52541          GNULIB_SECURE_GETENV=1
52542
52543
52544
52545
52546
52547$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
52548
52549
52550
52551
52552
52553     if test $ac_cv_func_setenv = no; then
52554    HAVE_SETENV=0
52555  else
52556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
52557$as_echo_n "checking whether setenv validates arguments... " >&6; }
52558if ${gl_cv_func_setenv_works+:} false; then :
52559  $as_echo_n "(cached) " >&6
52560else
52561  if test "$cross_compiling" = yes; then :
52562  case "$host_os" in
52563                        # Guess yes on glibc systems.
52564         *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
52565                        # Guess yes on musl systems.
52566         *-musl*)       gl_cv_func_setenv_works="guessing yes" ;;
52567                        # If we don't know, obey --enable-cross-guesses.
52568         *)             gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
52569       esac
52570
52571else
52572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52573/* end confdefs.h.  */
52574
52575       #include <stdlib.h>
52576       #include <errno.h>
52577       #include <string.h>
52578
52579int
52580main ()
52581{
52582
52583       int result = 0;
52584       {
52585         if (setenv ("", "", 0) != -1)
52586           result |= 1;
52587         else if (errno != EINVAL)
52588           result |= 2;
52589       }
52590       {
52591         if (setenv ("a", "=", 1) != 0)
52592           result |= 4;
52593         else if (strcmp (getenv ("a"), "=") != 0)
52594           result |= 8;
52595       }
52596       return result;
52597
52598  ;
52599  return 0;
52600}
52601_ACEOF
52602if ac_fn_c_try_run "$LINENO"; then :
52603  gl_cv_func_setenv_works=yes
52604else
52605  gl_cv_func_setenv_works=no
52606fi
52607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52608  conftest.$ac_objext conftest.beam conftest.$ac_ext
52609fi
52610
52611fi
52612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
52613$as_echo "$gl_cv_func_setenv_works" >&6; }
52614    case "$gl_cv_func_setenv_works" in
52615      *yes) ;;
52616      *)
52617        REPLACE_SETENV=1
52618        ;;
52619    esac
52620  fi
52621
52622  if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
52623
52624
52625
52626
52627
52628
52629
52630
52631  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
52632
52633  fi
52634
52635
52636
52637
52638
52639          GNULIB_SETENV=1
52640
52641
52642
52643
52644
52645$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
52646
52647
52648
52649
52650
52651
52652
52653
52654    NEED_SETLOCALE_IMPROVED=0
52655  case "$host_os" in
52656            mingw*) NEED_SETLOCALE_IMPROVED=1 ;;
52657            cygwin*)
52658      case `uname -r` in
52659        1.5.*) NEED_SETLOCALE_IMPROVED=1 ;;
52660      esac
52661      ;;
52662        *)
52663      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale supports the C locale" >&5
52664$as_echo_n "checking whether setlocale supports the C locale... " >&6; }
52665if ${gl_cv_func_setlocale_works+:} false; then :
52666  $as_echo_n "(cached) " >&6
52667else
52668  if test "$cross_compiling" = yes; then :
52669  case "$host_os" in
52670                               # Guess no on Android.
52671              linux*-android*) gl_cv_func_setlocale_works="guessing no";;
52672                               # Guess yes otherwise.
52673              *)               gl_cv_func_setlocale_works="guessing yes";;
52674            esac
52675
52676else
52677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52678/* end confdefs.h.  */
52679
52680#include <locale.h>
52681int main ()
52682{
52683  return setlocale (LC_ALL, "C") == NULL;
52684}
52685_ACEOF
52686if ac_fn_c_try_run "$LINENO"; then :
52687  gl_cv_func_setlocale_works=yes
52688else
52689  gl_cv_func_setlocale_works=no
52690fi
52691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52692  conftest.$ac_objext conftest.beam conftest.$ac_ext
52693fi
52694
52695
52696fi
52697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_works" >&5
52698$as_echo "$gl_cv_func_setlocale_works" >&6; }
52699      case "$gl_cv_func_setlocale_works" in
52700        *yes) ;;
52701        *) NEED_SETLOCALE_IMPROVED=1 ;;
52702      esac
52703      ;;
52704  esac
52705
52706cat >>confdefs.h <<_ACEOF
52707#define NEED_SETLOCALE_IMPROVED $NEED_SETLOCALE_IMPROVED
52708_ACEOF
52709
52710
52711    NEED_SETLOCALE_MTSAFE=0
52712  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
52713    NEED_SETLOCALE_MTSAFE=1
52714  fi
52715
52716cat >>confdefs.h <<_ACEOF
52717#define NEED_SETLOCALE_MTSAFE $NEED_SETLOCALE_MTSAFE
52718_ACEOF
52719
52720
52721  if test $NEED_SETLOCALE_IMPROVED = 1 || test $NEED_SETLOCALE_MTSAFE = 1; then
52722    REPLACE_SETLOCALE=1
52723  fi
52724
52725  if test $NEED_SETLOCALE_MTSAFE = 1; then
52726    LIB_SETLOCALE="$LIB_SETLOCALE_NULL"
52727  else
52728    LIB_SETLOCALE=
52729  fi
52730
52731
52732  if test $REPLACE_SETLOCALE = 1; then
52733
52734
52735
52736
52737
52738
52739
52740
52741  gl_LIBOBJS="$gl_LIBOBJS setlocale.$ac_objext"
52742
52743
52744        :
52745
52746  fi
52747
52748
52749
52750
52751
52752          GNULIB_SETLOCALE=1
52753
52754
52755
52756
52757
52758$as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
52759
52760
52761
52762
52763
52764
52765
52766
52767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
52768$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
52769if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
52770  $as_echo_n "(cached) " >&6
52771else
52772  case "$host_os" in
52773       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
52774       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
52775         gl_cv_func_setlocale_null_all_mtsafe=no ;;
52776       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
52777       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
52778         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
52779       # If we don't know, obey --enable-cross-guesses.
52780       *)
52781         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
52782     esac
52783
52784fi
52785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
52786$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
52787    case "$host_os" in
52788    mingw*) ;;
52789    *)
52790      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
52791        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
52792      fi
52793      ;;
52794  esac
52795  case "$gl_cv_func_setlocale_null_all_mtsafe" in
52796    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
52797    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
52798  esac
52799
52800cat >>confdefs.h <<_ACEOF
52801#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
52802_ACEOF
52803
52804
52805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
52806$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
52807if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
52808  $as_echo_n "(cached) " >&6
52809else
52810  case "$host_os" in
52811       # Guess no on OpenBSD, AIX.
52812       openbsd* | aix*)
52813         gl_cv_func_setlocale_null_one_mtsafe=no ;;
52814       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
52815       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
52816         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
52817       # If we don't know, obey --enable-cross-guesses.
52818       *)
52819         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
52820     esac
52821
52822fi
52823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
52824$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
52825    case "$host_os" in
52826    mingw*) ;;
52827    *)
52828      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
52829        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
52830      fi
52831      ;;
52832  esac
52833  case "$gl_cv_func_setlocale_null_one_mtsafe" in
52834    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
52835    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
52836  esac
52837
52838cat >>confdefs.h <<_ACEOF
52839#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
52840_ACEOF
52841
52842
52843    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
52844    case "$host_os" in
52845      mingw*) LIB_SETLOCALE_NULL= ;;
52846      *)
52847
52848
52849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
52850$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
52851if ${gl_cv_have_weak+:} false; then :
52852  $as_echo_n "(cached) " >&6
52853else
52854  gl_cv_have_weak=no
52855          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52856/* end confdefs.h.  */
52857extern void xyzzy ();
52858#pragma weak xyzzy
52859int
52860main ()
52861{
52862xyzzy();
52863  ;
52864  return 0;
52865}
52866_ACEOF
52867if ac_fn_c_try_link "$LINENO"; then :
52868  gl_cv_have_weak=maybe
52869fi
52870rm -f core conftest.err conftest.$ac_objext \
52871    conftest$ac_exeext conftest.$ac_ext
52872     if test $gl_cv_have_weak = maybe; then
52873                     if test "$cross_compiling" = yes; then :
52874                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52875/* end confdefs.h.  */
52876#ifdef __ELF__
52877             Extensible Linking Format
52878             #endif
52879
52880_ACEOF
52881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
52882  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
52883  gl_cv_have_weak="guessing yes"
52884else
52885  gl_cv_have_weak="guessing no"
52886fi
52887rm -f conftest*
52888
52889
52890else
52891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52892/* end confdefs.h.  */
52893
52894#include <stdio.h>
52895#pragma weak fputs
52896int main ()
52897{
52898  return (fputs == NULL);
52899}
52900_ACEOF
52901if ac_fn_c_try_run "$LINENO"; then :
52902  gl_cv_have_weak=yes
52903else
52904  gl_cv_have_weak=no
52905fi
52906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52907  conftest.$ac_objext conftest.beam conftest.$ac_ext
52908fi
52909
52910     fi
52911          case " $LDFLAGS " in
52912       *" -static "*) gl_cv_have_weak=no ;;
52913     esac
52914                    case "$gl_cv_have_weak" in
52915       *yes)
52916         case "$host_os" in
52917           freebsd* | dragonfly*)
52918             : > conftest1.c
52919             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
52920             cat <<EOF > conftest2.c
52921#include <pthread.h>
52922#pragma weak pthread_mutexattr_gettype
52923int main ()
52924{
52925  return (pthread_mutexattr_gettype != NULL);
52926}
52927EOF
52928             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
52929               || gl_cv_have_weak=no
52930             rm -f conftest1.c libempty.so conftest2.c conftest
52931             ;;
52932         esac
52933         ;;
52934     esac
52935
52936fi
52937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
52938$as_echo "$gl_cv_have_weak" >&6; }
52939  case "$gl_cv_have_weak" in
52940    *yes)
52941
52942$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
52943
52944      ;;
52945  esac
52946
52947        case "$gl_cv_have_weak" in
52948          *yes) LIB_SETLOCALE_NULL= ;;
52949          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
52950        esac
52951        ;;
52952    esac
52953  else
52954    LIB_SETLOCALE_NULL=
52955  fi
52956
52957
52958  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
52959
52960
52961
52962
52963
52964
52965
52966
52967  gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
52968
52969
52970
52971
52972  CFLAG_VISIBILITY=
52973  HAVE_VISIBILITY=0
52974  if test -n "$GCC"; then
52975                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
52976$as_echo_n "checking whether the -Werror option is usable... " >&6; }
52977if ${gl_cv_cc_vis_werror+:} false; then :
52978  $as_echo_n "(cached) " >&6
52979else
52980  gl_save_CFLAGS="$CFLAGS"
52981       CFLAGS="$CFLAGS -Werror"
52982       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52983/* end confdefs.h.  */
52984
52985int
52986main ()
52987{
52988
52989  ;
52990  return 0;
52991}
52992_ACEOF
52993if ac_fn_c_try_compile "$LINENO"; then :
52994  gl_cv_cc_vis_werror=yes
52995else
52996  gl_cv_cc_vis_werror=no
52997fi
52998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52999       CFLAGS="$gl_save_CFLAGS"
53000
53001fi
53002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
53003$as_echo "$gl_cv_cc_vis_werror" >&6; }
53004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
53005$as_echo_n "checking for simple visibility declarations... " >&6; }
53006if ${gl_cv_cc_visibility+:} false; then :
53007  $as_echo_n "(cached) " >&6
53008else
53009  gl_save_CFLAGS="$CFLAGS"
53010       CFLAGS="$CFLAGS -fvisibility=hidden"
53011                                          if test $gl_cv_cc_vis_werror = yes; then
53012         CFLAGS="$CFLAGS -Werror"
53013       fi
53014       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53015/* end confdefs.h.  */
53016extern __attribute__((__visibility__("hidden"))) int hiddenvar;
53017              extern __attribute__((__visibility__("default"))) int exportedvar;
53018              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
53019              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
53020              void dummyfunc (void) {}
53021
53022int
53023main ()
53024{
53025
53026  ;
53027  return 0;
53028}
53029_ACEOF
53030if ac_fn_c_try_compile "$LINENO"; then :
53031  gl_cv_cc_visibility=yes
53032else
53033  gl_cv_cc_visibility=no
53034fi
53035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53036       CFLAGS="$gl_save_CFLAGS"
53037
53038fi
53039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
53040$as_echo "$gl_cv_cc_visibility" >&6; }
53041    if test $gl_cv_cc_visibility = yes; then
53042      CFLAG_VISIBILITY="-fvisibility=hidden"
53043      HAVE_VISIBILITY=1
53044    fi
53045  fi
53046
53047
53048
53049cat >>confdefs.h <<_ACEOF
53050#define HAVE_VISIBILITY $HAVE_VISIBILITY
53051_ACEOF
53052
53053
53054
53055  fi
53056
53057
53058
53059
53060
53061          GNULIB_SETLOCALE_NULL=1
53062
53063
53064
53065
53066
53067$as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077
53078  if test $ac_cv_func_sigaction = yes; then
53079    ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
53080"
53081if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
53082
53083cat >>confdefs.h <<_ACEOF
53084#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
53085_ACEOF
53086
53087
53088fi
53089
53090    if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
53091      HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
53092    fi
53093  else
53094    HAVE_SIGACTION=0
53095  fi
53096
53097  if test $HAVE_SIGACTION = 0; then
53098
53099
53100
53101
53102
53103
53104
53105
53106  gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
53107
53108
53109
53110
53111
53112
53113
53114  ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
53115#include <signal.h>
53116
53117"
53118if test "x$ac_cv_type_siginfo_t" = xyes; then :
53119
53120cat >>confdefs.h <<_ACEOF
53121#define HAVE_SIGINFO_T 1
53122_ACEOF
53123
53124
53125fi
53126
53127  if test $ac_cv_type_siginfo_t = no; then
53128    HAVE_SIGINFO_T=0
53129  fi
53130
53131  fi
53132
53133
53134
53135
53136
53137          GNULIB_SIGACTION=1
53138
53139
53140
53141
53142
53143$as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
53144
53145
53146
53147
53148
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158     if test $gl_cv_have_include_next = yes; then
53159       gl_cv_next_signal_h='<'signal.h'>'
53160     else
53161       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
53162$as_echo_n "checking absolute name of <signal.h>... " >&6; }
53163if ${gl_cv_next_signal_h+:} false; then :
53164  $as_echo_n "(cached) " >&6
53165else
53166
53167
53168
53169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53170/* end confdefs.h.  */
53171#include <signal.h>
53172_ACEOF
53173                case "$host_os" in
53174    aix*) gl_absname_cpp="$ac_cpp -C" ;;
53175    *)    gl_absname_cpp="$ac_cpp" ;;
53176  esac
53177
53178  case "$host_os" in
53179    mingw*)
53180                                          gl_dirsep_regex='[/\\]'
53181      ;;
53182    *)
53183      gl_dirsep_regex='\/'
53184      ;;
53185  esac
53186      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
53187  gl_header_literal_regex=`echo 'signal.h' \
53188                           | sed -e "$gl_make_literal_regex_sed"`
53189  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
53190      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
53191      s|^/[^/]|//&|
53192      p
53193      q
53194    }'
53195
53196        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
53197  sed -n "$gl_absolute_header_sed"`
53198
53199           gl_header=$gl_cv_absolute_signal_h
53200           gl_cv_next_signal_h='"'$gl_header'"'
53201
53202
53203fi
53204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
53205$as_echo "$gl_cv_next_signal_h" >&6; }
53206     fi
53207     NEXT_SIGNAL_H=$gl_cv_next_signal_h
53208
53209     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
53210       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
53211       gl_next_as_first_directive='<'signal.h'>'
53212     else
53213       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
53214       gl_next_as_first_directive=$gl_cv_next_signal_h
53215     fi
53216     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
53217
53218
53219
53220
53221
53222# AIX declares sig_atomic_t to already include volatile, and C89 compilers
53223# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
53224  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
53225#include <signal.h>
53226
53227"
53228if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
53229
53230else
53231  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
53232fi
53233
53234
53235
53236
53237
53238
53239
53240  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
53241#include <signal.h>
53242
53243"
53244if test "x$ac_cv_type_sighandler_t" = xyes; then :
53245
53246else
53247  HAVE_SIGHANDLER_T=0
53248fi
53249
53250
53251
53252
53253
53254
53255
53256
53257
53258
53259
53260  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
53261$as_echo_n "checking for signbit macro... " >&6; }
53262if ${gl_cv_func_signbit+:} false; then :
53263  $as_echo_n "(cached) " >&6
53264else
53265
53266      if test "$cross_compiling" = yes; then :
53267  case "$host_os" in
53268                          # Guess yes on glibc systems.
53269           *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
53270                          # Guess yes on musl systems.
53271           *-musl*)       gl_cv_func_signbit="guessing yes" ;;
53272                          # Guess yes on native Windows.
53273           mingw*)        gl_cv_func_signbit="guessing yes" ;;
53274                          # If we don't know, obey --enable-cross-guesses.
53275           *)             gl_cv_func_signbit="$gl_cross_guess_normal" ;;
53276         esac
53277
53278else
53279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53280/* end confdefs.h.  */
53281
53282#include <math.h>
53283/* If signbit is defined as a function, don't use it, since calling it for
53284   'float' or 'long double' arguments would involve conversions.
53285   If signbit is not declared at all but exists as a library function, don't
53286   use it, since the prototype may not match.
53287   If signbit is not declared at all but exists as a compiler built-in, don't
53288   use it, since it's preferable to use __builtin_signbit* (no warnings,
53289   no conversions).  */
53290#ifndef signbit
53291# error "signbit should be a macro"
53292#endif
53293#include <string.h>
53294
53295/* Global variables.
53296   Needed because GCC 4 constant-folds __builtin_signbitl (literal)
53297   but cannot constant-fold            __builtin_signbitl (variable).  */
53298float vf;
53299double vd;
53300long double vl;
53301int main ()
53302{
53303/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
53304   So we use -p0f and -p0d instead.  */
53305float p0f = 0.0f;
53306float m0f = -p0f;
53307double p0d = 0.0;
53308double m0d = -p0d;
53309/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
53310   So we use another constant expression instead.
53311   But that expression does not work on other platforms, such as when
53312   cross-compiling to PowerPC on Mac OS X 10.5.  */
53313long double p0l = 0.0L;
53314#if defined __hpux || defined __sgi
53315long double m0l = -LDBL_MIN * LDBL_MIN;
53316#else
53317long double m0l = -p0l;
53318#endif
53319  int result = 0;
53320  if (signbit (vf)) /* link check */
53321    vf++;
53322  {
53323    float plus_inf = 1.0f / p0f;
53324    float minus_inf = -1.0f / p0f;
53325    if (!(!signbit (255.0f)
53326          && signbit (-255.0f)
53327          && !signbit (p0f)
53328          && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
53329          && !signbit (plus_inf)
53330          && signbit (minus_inf)))
53331      result |= 1;
53332  }
53333  if (signbit (vd)) /* link check */
53334    vd++;
53335  {
53336    double plus_inf = 1.0 / p0d;
53337    double minus_inf = -1.0 / p0d;
53338    if (!(!signbit (255.0)
53339          && signbit (-255.0)
53340          && !signbit (p0d)
53341          && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
53342          && !signbit (plus_inf)
53343          && signbit (minus_inf)))
53344      result |= 2;
53345  }
53346  if (signbit (vl)) /* link check */
53347    vl++;
53348  {
53349    long double plus_inf = 1.0L / p0l;
53350    long double minus_inf = -1.0L / p0l;
53351    if (signbit (255.0L))
53352      result |= 4;
53353    if (!signbit (-255.0L))
53354      result |= 4;
53355    if (signbit (p0l))
53356      result |= 8;
53357    if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
53358      result |= 16;
53359    if (signbit (plus_inf))
53360      result |= 32;
53361    if (!signbit (minus_inf))
53362      result |= 64;
53363  }
53364  return result;
53365}
53366
53367
53368_ACEOF
53369if ac_fn_c_try_run "$LINENO"; then :
53370  gl_cv_func_signbit=yes
53371else
53372  gl_cv_func_signbit=no
53373fi
53374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53375  conftest.$ac_objext conftest.beam conftest.$ac_ext
53376fi
53377
53378
53379fi
53380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
53381$as_echo "$gl_cv_func_signbit" >&6; }
53382          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
53383$as_echo_n "checking for signbit compiler built-ins... " >&6; }
53384if ${gl_cv_func_signbit_gcc+:} false; then :
53385  $as_echo_n "(cached) " >&6
53386else
53387
53388      if test "$cross_compiling" = yes; then :
53389  case "$host_os" in
53390                          # Guess yes on glibc systems.
53391           *-gnu* | gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
53392                          # Guess yes on musl systems.
53393           *-musl*)       gl_cv_func_signbit_gcc="guessing yes" ;;
53394                          # Guess yes on mingw, no on MSVC.
53395           mingw*)        if test -n "$GCC"; then
53396                            gl_cv_func_signbit_gcc="guessing yes"
53397                          else
53398                            gl_cv_func_signbit_gcc="guessing no"
53399                          fi
53400                          ;;
53401                          # If we don't know, obey --enable-cross-guesses.
53402           *)             gl_cv_func_signbit_gcc="$gl_cross_guess_normal" ;;
53403         esac
53404
53405else
53406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53407/* end confdefs.h.  */
53408
53409#if __GNUC__ >= 4
53410# define signbit(x) \
53411   (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
53412    sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
53413    __builtin_signbitf (x))
53414#else
53415# error "signbit should be three compiler built-ins"
53416#endif
53417#include <string.h>
53418
53419/* Global variables.
53420   Needed because GCC 4 constant-folds __builtin_signbitl (literal)
53421   but cannot constant-fold            __builtin_signbitl (variable).  */
53422float vf;
53423double vd;
53424long double vl;
53425int main ()
53426{
53427/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
53428   So we use -p0f and -p0d instead.  */
53429float p0f = 0.0f;
53430float m0f = -p0f;
53431double p0d = 0.0;
53432double m0d = -p0d;
53433/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
53434   So we use another constant expression instead.
53435   But that expression does not work on other platforms, such as when
53436   cross-compiling to PowerPC on Mac OS X 10.5.  */
53437long double p0l = 0.0L;
53438#if defined __hpux || defined __sgi
53439long double m0l = -LDBL_MIN * LDBL_MIN;
53440#else
53441long double m0l = -p0l;
53442#endif
53443  int result = 0;
53444  if (signbit (vf)) /* link check */
53445    vf++;
53446  {
53447    float plus_inf = 1.0f / p0f;
53448    float minus_inf = -1.0f / p0f;
53449    if (!(!signbit (255.0f)
53450          && signbit (-255.0f)
53451          && !signbit (p0f)
53452          && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
53453          && !signbit (plus_inf)
53454          && signbit (minus_inf)))
53455      result |= 1;
53456  }
53457  if (signbit (vd)) /* link check */
53458    vd++;
53459  {
53460    double plus_inf = 1.0 / p0d;
53461    double minus_inf = -1.0 / p0d;
53462    if (!(!signbit (255.0)
53463          && signbit (-255.0)
53464          && !signbit (p0d)
53465          && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
53466          && !signbit (plus_inf)
53467          && signbit (minus_inf)))
53468      result |= 2;
53469  }
53470  if (signbit (vl)) /* link check */
53471    vl++;
53472  {
53473    long double plus_inf = 1.0L / p0l;
53474    long double minus_inf = -1.0L / p0l;
53475    if (signbit (255.0L))
53476      result |= 4;
53477    if (!signbit (-255.0L))
53478      result |= 4;
53479    if (signbit (p0l))
53480      result |= 8;
53481    if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)))
53482      result |= 16;
53483    if (signbit (plus_inf))
53484      result |= 32;
53485    if (!signbit (minus_inf))
53486      result |= 64;
53487  }
53488  return result;
53489}
53490
53491
53492_ACEOF
53493if ac_fn_c_try_run "$LINENO"; then :
53494  gl_cv_func_signbit_gcc=yes
53495else
53496  gl_cv_func_signbit_gcc=no
53497fi
53498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53499  conftest.$ac_objext conftest.beam conftest.$ac_ext
53500fi
53501
53502
53503fi
53504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
53505$as_echo "$gl_cv_func_signbit_gcc" >&6; }
53506      case "$gl_cv_func_signbit_gcc" in
53507    *yes)
53508      REPLACE_SIGNBIT_USING_GCC=1
53509      ;;
53510    *)
53511      case "$gl_cv_func_signbit" in
53512        *yes) ;;
53513        *)
53514                    REPLACE_SIGNBIT=1
53515          ;;
53516      esac
53517      ;;
53518  esac
53519          case "$host_os" in
53520    solaris*)
53521      REPLACE_SIGNBIT=1
53522      ;;
53523  esac
53524  if test $REPLACE_SIGNBIT = 1; then
53525
53526
53527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
53528$as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
53529if ${gl_cv_cc_float_signbit+:} false; then :
53530  $as_echo_n "(cached) " >&6
53531else
53532
53533      if test "$cross_compiling" = yes; then :
53534
53535                              gl_cv_cc_float_signbit="unknown"
53536
53537else
53538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53539/* end confdefs.h.  */
53540
53541#include <stddef.h>
53542#include <stdio.h>
53543#define NWORDS \
53544  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
53545typedef union { float value; unsigned int word[NWORDS]; }
53546        memory_float;
53547static memory_float plus = { 1.0f };
53548static memory_float minus = { -1.0f };
53549int main ()
53550{
53551  size_t j, k, i;
53552  unsigned int m;
53553  FILE *fp = fopen ("conftest.out", "w");
53554  if (fp == NULL)
53555    return 1;
53556  /* Find the different bit.  */
53557  k = 0; m = 0;
53558  for (j = 0; j < NWORDS; j++)
53559    {
53560      unsigned int x = plus.word[j] ^ minus.word[j];
53561      if ((x & (x - 1)) || (x && m))
53562        {
53563          /* More than one bit difference.  */
53564          fprintf (fp, "unknown");
53565          fclose (fp);
53566          return 2;
53567        }
53568      if (x)
53569        {
53570          k = j;
53571          m = x;
53572        }
53573    }
53574  if (m == 0)
53575    {
53576      /* No difference.  */
53577      fprintf (fp, "unknown");
53578      fclose (fp);
53579      return 3;
53580    }
53581  /* Now m = plus.word[k] ^ ~minus.word[k].  */
53582  if (plus.word[k] & ~minus.word[k])
53583    {
53584      /* Oh? The sign bit is set in the positive and cleared in the negative
53585         numbers?  */
53586      fprintf (fp, "unknown");
53587      fclose (fp);
53588      return 4;
53589    }
53590  for (i = 0; ; i++)
53591    if ((m >> i) & 1)
53592      break;
53593  fprintf (fp, "word %d bit %d", (int) k, (int) i);
53594  if (fclose (fp) != 0)
53595    return 5;
53596  return 0;
53597}
53598
53599_ACEOF
53600if ac_fn_c_try_run "$LINENO"; then :
53601  gl_cv_cc_float_signbit=`cat conftest.out`
53602else
53603  gl_cv_cc_float_signbit="unknown"
53604fi
53605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53606  conftest.$ac_objext conftest.beam conftest.$ac_ext
53607fi
53608
53609      rm -f conftest.out
53610
53611fi
53612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
53613$as_echo "$gl_cv_cc_float_signbit" >&6; }
53614  case "$gl_cv_cc_float_signbit" in
53615    word*bit*)
53616      word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
53617      bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
53618
53619cat >>confdefs.h <<_ACEOF
53620#define FLT_SIGNBIT_WORD $word
53621_ACEOF
53622
53623
53624cat >>confdefs.h <<_ACEOF
53625#define FLT_SIGNBIT_BIT $bit
53626_ACEOF
53627
53628      ;;
53629  esac
53630
53631
53632
53633
53634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
53635$as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
53636if ${gl_cv_cc_double_signbit+:} false; then :
53637  $as_echo_n "(cached) " >&6
53638else
53639
53640      if test "$cross_compiling" = yes; then :
53641
53642                              gl_cv_cc_double_signbit="unknown"
53643
53644else
53645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53646/* end confdefs.h.  */
53647
53648#include <stddef.h>
53649#include <stdio.h>
53650#define NWORDS \
53651  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
53652typedef union { double value; unsigned int word[NWORDS]; }
53653        memory_float;
53654static memory_float plus = { 1.0 };
53655static memory_float minus = { -1.0 };
53656int main ()
53657{
53658  size_t j, k, i;
53659  unsigned int m;
53660  FILE *fp = fopen ("conftest.out", "w");
53661  if (fp == NULL)
53662    return 1;
53663  /* Find the different bit.  */
53664  k = 0; m = 0;
53665  for (j = 0; j < NWORDS; j++)
53666    {
53667      unsigned int x = plus.word[j] ^ minus.word[j];
53668      if ((x & (x - 1)) || (x && m))
53669        {
53670          /* More than one bit difference.  */
53671          fprintf (fp, "unknown");
53672          fclose (fp);
53673          return 2;
53674        }
53675      if (x)
53676        {
53677          k = j;
53678          m = x;
53679        }
53680    }
53681  if (m == 0)
53682    {
53683      /* No difference.  */
53684      fprintf (fp, "unknown");
53685      fclose (fp);
53686      return 3;
53687    }
53688  /* Now m = plus.word[k] ^ ~minus.word[k].  */
53689  if (plus.word[k] & ~minus.word[k])
53690    {
53691      /* Oh? The sign bit is set in the positive and cleared in the negative
53692         numbers?  */
53693      fprintf (fp, "unknown");
53694      fclose (fp);
53695      return 4;
53696    }
53697  for (i = 0; ; i++)
53698    if ((m >> i) & 1)
53699      break;
53700  fprintf (fp, "word %d bit %d", (int) k, (int) i);
53701  if (fclose (fp) != 0)
53702    return 5;
53703  return 0;
53704}
53705
53706_ACEOF
53707if ac_fn_c_try_run "$LINENO"; then :
53708  gl_cv_cc_double_signbit=`cat conftest.out`
53709else
53710  gl_cv_cc_double_signbit="unknown"
53711fi
53712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53713  conftest.$ac_objext conftest.beam conftest.$ac_ext
53714fi
53715
53716      rm -f conftest.out
53717
53718fi
53719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
53720$as_echo "$gl_cv_cc_double_signbit" >&6; }
53721  case "$gl_cv_cc_double_signbit" in
53722    word*bit*)
53723      word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
53724      bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
53725
53726cat >>confdefs.h <<_ACEOF
53727#define DBL_SIGNBIT_WORD $word
53728_ACEOF
53729
53730
53731cat >>confdefs.h <<_ACEOF
53732#define DBL_SIGNBIT_BIT $bit
53733_ACEOF
53734
53735      ;;
53736  esac
53737
53738
53739
53740
53741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
53742$as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
53743if ${gl_cv_cc_long_double_signbit+:} false; then :
53744  $as_echo_n "(cached) " >&6
53745else
53746
53747      if test "$cross_compiling" = yes; then :
53748
53749                              gl_cv_cc_long_double_signbit="unknown"
53750
53751else
53752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53753/* end confdefs.h.  */
53754
53755#include <stddef.h>
53756#include <stdio.h>
53757#define NWORDS \
53758  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
53759typedef union { long double value; unsigned int word[NWORDS]; }
53760        memory_float;
53761static memory_float plus = { 1.0L };
53762static memory_float minus = { -1.0L };
53763int main ()
53764{
53765  size_t j, k, i;
53766  unsigned int m;
53767  FILE *fp = fopen ("conftest.out", "w");
53768  if (fp == NULL)
53769    return 1;
53770  /* Find the different bit.  */
53771  k = 0; m = 0;
53772  for (j = 0; j < NWORDS; j++)
53773    {
53774      unsigned int x = plus.word[j] ^ minus.word[j];
53775      if ((x & (x - 1)) || (x && m))
53776        {
53777          /* More than one bit difference.  */
53778          fprintf (fp, "unknown");
53779          fclose (fp);
53780          return 2;
53781        }
53782      if (x)
53783        {
53784          k = j;
53785          m = x;
53786        }
53787    }
53788  if (m == 0)
53789    {
53790      /* No difference.  */
53791      fprintf (fp, "unknown");
53792      fclose (fp);
53793      return 3;
53794    }
53795  /* Now m = plus.word[k] ^ ~minus.word[k].  */
53796  if (plus.word[k] & ~minus.word[k])
53797    {
53798      /* Oh? The sign bit is set in the positive and cleared in the negative
53799         numbers?  */
53800      fprintf (fp, "unknown");
53801      fclose (fp);
53802      return 4;
53803    }
53804  for (i = 0; ; i++)
53805    if ((m >> i) & 1)
53806      break;
53807  fprintf (fp, "word %d bit %d", (int) k, (int) i);
53808  if (fclose (fp) != 0)
53809    return 5;
53810  return 0;
53811}
53812
53813_ACEOF
53814if ac_fn_c_try_run "$LINENO"; then :
53815  gl_cv_cc_long_double_signbit=`cat conftest.out`
53816else
53817  gl_cv_cc_long_double_signbit="unknown"
53818fi
53819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53820  conftest.$ac_objext conftest.beam conftest.$ac_ext
53821fi
53822
53823      rm -f conftest.out
53824
53825fi
53826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
53827$as_echo "$gl_cv_cc_long_double_signbit" >&6; }
53828  case "$gl_cv_cc_long_double_signbit" in
53829    word*bit*)
53830      word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
53831      bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
53832
53833cat >>confdefs.h <<_ACEOF
53834#define LDBL_SIGNBIT_WORD $word
53835_ACEOF
53836
53837
53838cat >>confdefs.h <<_ACEOF
53839#define LDBL_SIGNBIT_BIT $bit
53840_ACEOF
53841
53842      ;;
53843  esac
53844
53845
53846    if test "$gl_cv_cc_float_signbit" = unknown; then
53847            ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
53848"
53849if test "x$ac_cv_have_decl_copysignf" = xyes; then :
53850  ac_have_decl=1
53851else
53852  ac_have_decl=0
53853fi
53854
53855cat >>confdefs.h <<_ACEOF
53856#define HAVE_DECL_COPYSIGNF $ac_have_decl
53857_ACEOF
53858
53859      if test "$ac_cv_have_decl_copysignf" = yes; then
53860                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
53861$as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
53862if ${gl_cv_func_copysignf_no_libm+:} false; then :
53863  $as_echo_n "(cached) " >&6
53864else
53865
53866            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53867/* end confdefs.h.  */
53868#include <math.h>
53869                   float x, y;
53870int
53871main ()
53872{
53873return copysignf (x, y) < 0;
53874  ;
53875  return 0;
53876}
53877_ACEOF
53878if ac_fn_c_try_link "$LINENO"; then :
53879  gl_cv_func_copysignf_no_libm=yes
53880else
53881  gl_cv_func_copysignf_no_libm=no
53882fi
53883rm -f core conftest.err conftest.$ac_objext \
53884    conftest$ac_exeext conftest.$ac_ext
53885
53886fi
53887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
53888$as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
53889        if test $gl_cv_func_copysignf_no_libm = yes; then
53890
53891$as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
53892
53893        fi
53894      fi
53895    fi
53896    if test "$gl_cv_cc_double_signbit" = unknown; then
53897            ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
53898"
53899if test "x$ac_cv_have_decl_copysign" = xyes; then :
53900  ac_have_decl=1
53901else
53902  ac_have_decl=0
53903fi
53904
53905cat >>confdefs.h <<_ACEOF
53906#define HAVE_DECL_COPYSIGN $ac_have_decl
53907_ACEOF
53908
53909      if test "$ac_cv_have_decl_copysign" = yes; then
53910                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
53911$as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
53912if ${gl_cv_func_copysign_no_libm+:} false; then :
53913  $as_echo_n "(cached) " >&6
53914else
53915
53916            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53917/* end confdefs.h.  */
53918#include <math.h>
53919                   double x, y;
53920int
53921main ()
53922{
53923return copysign (x, y) < 0;
53924  ;
53925  return 0;
53926}
53927_ACEOF
53928if ac_fn_c_try_link "$LINENO"; then :
53929  gl_cv_func_copysign_no_libm=yes
53930else
53931  gl_cv_func_copysign_no_libm=no
53932fi
53933rm -f core conftest.err conftest.$ac_objext \
53934    conftest$ac_exeext conftest.$ac_ext
53935
53936fi
53937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
53938$as_echo "$gl_cv_func_copysign_no_libm" >&6; }
53939        if test $gl_cv_func_copysign_no_libm = yes; then
53940
53941$as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
53942
53943        fi
53944      fi
53945    fi
53946    if test "$gl_cv_cc_long_double_signbit" = unknown; then
53947            ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
53948"
53949if test "x$ac_cv_have_decl_copysignl" = xyes; then :
53950  ac_have_decl=1
53951else
53952  ac_have_decl=0
53953fi
53954
53955cat >>confdefs.h <<_ACEOF
53956#define HAVE_DECL_COPYSIGNL $ac_have_decl
53957_ACEOF
53958
53959      if test "$ac_cv_have_decl_copysignl" = yes; then
53960                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
53961$as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
53962if ${gl_cv_func_copysignl_no_libm+:} false; then :
53963  $as_echo_n "(cached) " >&6
53964else
53965
53966            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53967/* end confdefs.h.  */
53968#include <math.h>
53969                   long double x, y;
53970int
53971main ()
53972{
53973return copysignl (x, y) < 0;
53974  ;
53975  return 0;
53976}
53977_ACEOF
53978if ac_fn_c_try_link "$LINENO"; then :
53979  gl_cv_func_copysignl_no_libm=yes
53980else
53981  gl_cv_func_copysignl_no_libm=no
53982fi
53983rm -f core conftest.err conftest.$ac_objext \
53984    conftest$ac_exeext conftest.$ac_ext
53985
53986fi
53987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
53988$as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
53989        if test $gl_cv_func_copysignl_no_libm = yes; then
53990
53991$as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
53992
53993        fi
53994      fi
53995    fi
53996  fi
53997
53998  if test $REPLACE_SIGNBIT = 1; then
53999
54000
54001
54002
54003
54004
54005
54006
54007  gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
54008
54009
54010
54011
54012
54013
54014
54015
54016
54017  gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
54018
54019
54020
54021
54022
54023
54024
54025
54026
54027  gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
54028
54029  fi
54030
54031
54032
54033
54034
54035          GNULIB_SIGNBIT=1
54036
54037
54038
54039
54040
54041$as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
54042
54043
54044
54045
54046
54047
54048
54049
54050cat >>confdefs.h <<_ACEOF
54051#define GNULIB_SIGPIPE 1
54052_ACEOF
54053
54054
54055
54056  GNULIB_SIGNAL_H_SIGPIPE=1
54057
54058
54059  GNULIB_STDIO_H_SIGPIPE=1
54060
54061  GNULIB_UNISTD_H_SIGPIPE=1
54062
54063
54064
54065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigprocmask" >&5
54066$as_echo_n "checking for sigprocmask... " >&6; }
54067if ${gl_cv_func_sigprocmask+:} false; then :
54068  $as_echo_n "(cached) " >&6
54069else
54070  if test $gl_cv_type_sigset_t = yes; then
54071
54072  {
54073
54074         ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
54075if test "x$ac_cv_func_sigprocmask" = xyes; then :
54076  gl_cv_func_sigprocmask=yes
54077else
54078  gl_cv_func_sigprocmask=no
54079fi
54080
54081
54082  } 6>/dev/null
54083
54084     else
54085       gl_cv_func_sigprocmask=no
54086     fi
54087
54088fi
54089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sigprocmask" >&5
54090$as_echo "$gl_cv_func_sigprocmask" >&6; }
54091  if test $gl_cv_func_sigprocmask != yes; then
54092    HAVE_POSIX_SIGNALBLOCKING=0
54093  fi
54094
54095  if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
54096
54097
54098
54099
54100
54101
54102
54103
54104  gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
54105
54106    :
54107  fi
54108
54109
54110
54111
54112
54113          GNULIB_SIGPROCMASK=1
54114
54115
54116
54117
54118
54119$as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
54120
54121
54122
54123
54124  for ac_header in stdint.h
54125do :
54126  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
54127if test "x$ac_cv_header_stdint_h" = xyes; then :
54128  cat >>confdefs.h <<_ACEOF
54129#define HAVE_STDINT_H 1
54130_ACEOF
54131
54132fi
54133
54134done
54135
54136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
54137$as_echo_n "checking for SIZE_MAX... " >&6; }
54138if ${gl_cv_size_max+:} false; then :
54139  $as_echo_n "(cached) " >&6
54140else
54141
54142    gl_cv_size_max=no
54143    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54144/* end confdefs.h.  */
54145
54146#include <limits.h>
54147#if HAVE_STDINT_H
54148#include <stdint.h>
54149#endif
54150#ifdef SIZE_MAX
54151Found it
54152#endif
54153
54154_ACEOF
54155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
54156  $EGREP "Found it" >/dev/null 2>&1; then :
54157  gl_cv_size_max=yes
54158fi
54159rm -f conftest*
54160
54161    if test $gl_cv_size_max != yes; then
54162                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
54163#include <limits.h>"; then :
54164
54165else
54166  size_t_bits_minus_1=
54167fi
54168
54169      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
54170
54171else
54172  fits_in_uint=
54173fi
54174
54175      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
54176        if test $fits_in_uint = 1; then
54177                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54178/* end confdefs.h.  */
54179#include <stddef.h>
54180                 extern size_t foo;
54181                 extern unsigned long foo;
54182
54183int
54184main ()
54185{
54186
54187  ;
54188  return 0;
54189}
54190_ACEOF
54191if ac_fn_c_try_compile "$LINENO"; then :
54192  fits_in_uint=0
54193fi
54194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54195        fi
54196                                if test $fits_in_uint = 1; then
54197          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
54198        else
54199          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
54200        fi
54201      else
54202                gl_cv_size_max='((size_t)~(size_t)0)'
54203      fi
54204    fi
54205
54206fi
54207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
54208$as_echo "$gl_cv_size_max" >&6; }
54209  if test "$gl_cv_size_max" != yes; then
54210
54211cat >>confdefs.h <<_ACEOF
54212#define SIZE_MAX $gl_cv_size_max
54213_ACEOF
54214
54215  fi
54216
54217
54218
54219
54220  gl_cv_func_snprintf_usable=no
54221  for ac_func in snprintf
54222do :
54223  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
54224if test "x$ac_cv_func_snprintf" = xyes; then :
54225  cat >>confdefs.h <<_ACEOF
54226#define HAVE_SNPRINTF 1
54227_ACEOF
54228
54229fi
54230done
54231
54232  if test $ac_cv_func_snprintf = yes; then
54233
54234
54235
54236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
54237$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
54238if ${gl_cv_func_snprintf_size1+:} false; then :
54239  $as_echo_n "(cached) " >&6
54240else
54241
54242      if test "$cross_compiling" = yes; then :
54243  case "$host_os" in
54244                            # Guess yes on Android.
54245           linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
54246                            # Guess yes on native Windows.
54247           mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
54248           *)               gl_cv_func_snprintf_size1="guessing yes" ;;
54249         esac
54250
54251else
54252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54253/* end confdefs.h.  */
54254
54255#include <stdio.h>
54256#if HAVE_SNPRINTF
54257# define my_snprintf snprintf
54258#else
54259# include <stdarg.h>
54260static int my_snprintf (char *buf, int size, const char *format, ...)
54261{
54262  va_list args;
54263  int ret;
54264  va_start (args, format);
54265  ret = vsnprintf (buf, size, format, args);
54266  va_end (args);
54267  return ret;
54268}
54269#endif
54270int main()
54271{
54272  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
54273  my_snprintf (buf, 1, "%d", 12345);
54274  return buf[1] != 'E';
54275}
54276_ACEOF
54277if ac_fn_c_try_run "$LINENO"; then :
54278  gl_cv_func_snprintf_size1=yes
54279else
54280  gl_cv_func_snprintf_size1=no
54281fi
54282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
54283  conftest.$ac_objext conftest.beam conftest.$ac_ext
54284fi
54285
54286
54287fi
54288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
54289$as_echo "$gl_cv_func_snprintf_size1" >&6; }
54290
54291    case "$gl_cv_func_snprintf_size1" in
54292      *yes)
54293
54294        case "$gl_cv_func_snprintf_retval_c99" in
54295          *yes)
54296
54297
54298     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
54299$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
54300if ${gl_cv_func_printf_positions+:} false; then :
54301  $as_echo_n "(cached) " >&6
54302else
54303
54304      if test "$cross_compiling" = yes; then :
54305
54306         case "$host_os" in
54307           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
54308                            gl_cv_func_printf_positions="guessing no";;
54309           beos*)           gl_cv_func_printf_positions="guessing no";;
54310                            # Guess yes on Android.
54311           linux*-android*) gl_cv_func_printf_positions="guessing yes";;
54312                            # Guess no on native Windows.
54313           mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
54314           *)               gl_cv_func_printf_positions="guessing yes";;
54315         esac
54316
54317else
54318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54319/* end confdefs.h.  */
54320
54321#include <stdio.h>
54322#include <string.h>
54323/* The string "%2$d %1$d", with dollar characters protected from the shell's
54324   dollar expansion (possibly an autoconf bug).  */
54325static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
54326static char buf[100];
54327int main ()
54328{
54329  sprintf (buf, format, 33, 55);
54330  return (strcmp (buf, "55 33") != 0);
54331}
54332_ACEOF
54333if ac_fn_c_try_run "$LINENO"; then :
54334  gl_cv_func_printf_positions=yes
54335else
54336  gl_cv_func_printf_positions=no
54337fi
54338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
54339  conftest.$ac_objext conftest.beam conftest.$ac_ext
54340fi
54341
54342
54343fi
54344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
54345$as_echo "$gl_cv_func_printf_positions" >&6; }
54346
54347            case "$gl_cv_func_printf_positions" in
54348              *yes)
54349                gl_cv_func_snprintf_usable=yes
54350                ;;
54351            esac
54352            ;;
54353        esac
54354        ;;
54355    esac
54356  fi
54357  if test $gl_cv_func_snprintf_usable = no; then
54358
54359
54360
54361
54362
54363
54364
54365
54366
54367
54368  gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
54369
54370  if test $ac_cv_func_snprintf = yes; then
54371    REPLACE_SNPRINTF=1
54372  else
54373
54374    if test $ac_cv_have_decl_snprintf = yes; then
54375                        REPLACE_SNPRINTF=1
54376    fi
54377  fi
54378  :
54379
54380  fi
54381
54382  if test $ac_cv_have_decl_snprintf = no; then
54383    HAVE_DECL_SNPRINTF=0
54384  fi
54385
54386
54387
54388
54389
54390
54391          GNULIB_SNPRINTF=1
54392
54393
54394
54395
54396
54397$as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
54398
54399
54400
54401
54402
54403cat >>confdefs.h <<_ACEOF
54404#define GNULIB_SNPRINTF 1
54405_ACEOF
54406
54407
54408
54409
54410
54411
54412
54413
54414
54415
54416
54417
54418
54419
54420     if test $gl_cv_have_include_next = yes; then
54421       gl_cv_next_spawn_h='<'spawn.h'>'
54422     else
54423       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
54424$as_echo_n "checking absolute name of <spawn.h>... " >&6; }
54425if ${gl_cv_next_spawn_h+:} false; then :
54426  $as_echo_n "(cached) " >&6
54427else
54428
54429             if test $ac_cv_header_spawn_h = yes; then
54430
54431
54432
54433
54434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54435/* end confdefs.h.  */
54436#include <spawn.h>
54437_ACEOF
54438                case "$host_os" in
54439    aix*) gl_absname_cpp="$ac_cpp -C" ;;
54440    *)    gl_absname_cpp="$ac_cpp" ;;
54441  esac
54442
54443  case "$host_os" in
54444    mingw*)
54445                                          gl_dirsep_regex='[/\\]'
54446      ;;
54447    *)
54448      gl_dirsep_regex='\/'
54449      ;;
54450  esac
54451      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
54452  gl_header_literal_regex=`echo 'spawn.h' \
54453                           | sed -e "$gl_make_literal_regex_sed"`
54454  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
54455      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
54456      s|^/[^/]|//&|
54457      p
54458      q
54459    }'
54460
54461        gl_cv_absolute_spawn_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
54462  sed -n "$gl_absolute_header_sed"`
54463
54464           gl_header=$gl_cv_absolute_spawn_h
54465           gl_cv_next_spawn_h='"'$gl_header'"'
54466          else
54467               gl_cv_next_spawn_h='<'spawn.h'>'
54468             fi
54469
54470
54471fi
54472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
54473$as_echo "$gl_cv_next_spawn_h" >&6; }
54474     fi
54475     NEXT_SPAWN_H=$gl_cv_next_spawn_h
54476
54477     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
54478       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
54479       gl_next_as_first_directive='<'spawn.h'>'
54480     else
54481       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
54482       gl_next_as_first_directive=$gl_cv_next_spawn_h
54483     fi
54484     NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
54485
54486
54487
54488
54489
54490  if test $ac_cv_header_spawn_h = yes; then
54491    HAVE_SPAWN_H=1
54492    ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
54493#include <spawn.h>
54494
54495"
54496if test "x$ac_cv_type_posix_spawnattr_t" = xyes; then :
54497
54498cat >>confdefs.h <<_ACEOF
54499#define HAVE_POSIX_SPAWNATTR_T 1
54500_ACEOF
54501
54502
54503else
54504  HAVE_POSIX_SPAWNATTR_T=0
54505fi
54506
54507    ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
54508#include <spawn.h>
54509
54510"
54511if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes; then :
54512
54513cat >>confdefs.h <<_ACEOF
54514#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
54515_ACEOF
54516
54517
54518else
54519  HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
54520fi
54521
54522  else
54523    HAVE_SPAWN_H=0
54524    HAVE_POSIX_SPAWNATTR_T=0
54525    HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
54526  fi
54527
54528
54529
54530
54531
54532
54533
54534
54535
54536
54537
54538
54539
54540
54541
54542
54543
54544
54545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
54546$as_echo_n "checking for ssize_t... " >&6; }
54547if ${gt_cv_ssize_t+:} false; then :
54548  $as_echo_n "(cached) " >&6
54549else
54550  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54551/* end confdefs.h.  */
54552#include <sys/types.h>
54553int
54554main ()
54555{
54556int x = sizeof (ssize_t *) + sizeof (ssize_t);
54557            return !x;
54558  ;
54559  return 0;
54560}
54561_ACEOF
54562if ac_fn_c_try_compile "$LINENO"; then :
54563  gt_cv_ssize_t=yes
54564else
54565  gt_cv_ssize_t=no
54566fi
54567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54568fi
54569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
54570$as_echo "$gt_cv_ssize_t" >&6; }
54571  if test $gt_cv_ssize_t = no; then
54572
54573$as_echo "#define ssize_t int" >>confdefs.h
54574
54575  fi
54576
54577
54578
54579
54580
54581  case "$host_os" in
54582    mingw*)
54583                  REPLACE_STAT=1
54584      ;;
54585    *)
54586                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
54587$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
54588if ${gl_cv_func_stat_file_slash+:} false; then :
54589  $as_echo_n "(cached) " >&6
54590else
54591  touch conftest.tmp
54592         # Assume that if we have lstat, we can also check symlinks.
54593         if test $ac_cv_func_lstat = yes; then
54594           ln -s conftest.tmp conftest.lnk
54595         fi
54596         if test "$cross_compiling" = yes; then :
54597  case "$host_os" in
54598                               # Guess yes on Linux systems.
54599              linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
54600                               # Guess yes on glibc systems.
54601              *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
54602                               # If we don't know, obey --enable-cross-guesses.
54603              *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
54604            esac
54605
54606else
54607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54608/* end confdefs.h.  */
54609#include <sys/stat.h>
54610
54611int
54612main ()
54613{
54614int result = 0;
54615               struct stat st;
54616               if (!stat ("conftest.tmp/", &st))
54617                 result |= 1;
54618#if HAVE_LSTAT
54619               if (!stat ("conftest.lnk/", &st))
54620                 result |= 2;
54621#endif
54622               return result;
54623
54624  ;
54625  return 0;
54626}
54627_ACEOF
54628if ac_fn_c_try_run "$LINENO"; then :
54629  gl_cv_func_stat_file_slash=yes
54630else
54631  gl_cv_func_stat_file_slash=no
54632fi
54633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
54634  conftest.$ac_objext conftest.beam conftest.$ac_ext
54635fi
54636
54637         rm -f conftest.tmp conftest.lnk
54638fi
54639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
54640$as_echo "$gl_cv_func_stat_file_slash" >&6; }
54641      case $gl_cv_func_stat_file_slash in
54642        *no)
54643          REPLACE_STAT=1
54644
54645$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
54646;;
54647      esac
54648      case $host_os in
54649                solaris*)
54650          REPLACE_FSTAT=1 ;;
54651      esac
54652      ;;
54653  esac
54654
54655  if test $REPLACE_STAT = 1; then
54656
54657
54658
54659
54660
54661
54662
54663
54664  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
54665
54666    case "$host_os" in
54667      mingw*)
54668
54669
54670
54671
54672
54673
54674
54675
54676  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
54677
54678        ;;
54679    esac
54680
54681
54682  :
54683
54684  fi
54685
54686
54687
54688
54689
54690          GNULIB_STAT=1
54691
54692
54693
54694
54695
54696$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
54697
54698
54699
54700
54701
54702
54703
54704  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
54705     #include <sys/stat.h>
54706"
54707if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
54708
54709cat >>confdefs.h <<_ACEOF
54710#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
54711_ACEOF
54712
54713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
54714$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
54715if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
54716  $as_echo_n "(cached) " >&6
54717else
54718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54719/* end confdefs.h.  */
54720
54721            #include <sys/types.h>
54722            #include <sys/stat.h>
54723            #if HAVE_SYS_TIME_H
54724            # include <sys/time.h>
54725            #endif
54726            #include <time.h>
54727            struct timespec ts;
54728            struct stat st;
54729
54730int
54731main ()
54732{
54733
54734            st.st_atim = ts;
54735
54736  ;
54737  return 0;
54738}
54739_ACEOF
54740if ac_fn_c_try_compile "$LINENO"; then :
54741  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
54742else
54743  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
54744fi
54745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54746fi
54747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
54748$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
54749     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
54750
54751$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
54752
54753     fi
54754else
54755  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
54756        #include <sys/stat.h>
54757"
54758if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
54759
54760cat >>confdefs.h <<_ACEOF
54761#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
54762_ACEOF
54763
54764
54765else
54766  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
54767           #include <sys/stat.h>
54768"
54769if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
54770
54771cat >>confdefs.h <<_ACEOF
54772#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
54773_ACEOF
54774
54775
54776else
54777  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
54778              #include <sys/stat.h>
54779"
54780if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
54781
54782cat >>confdefs.h <<_ACEOF
54783#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
54784_ACEOF
54785
54786
54787fi
54788
54789fi
54790
54791fi
54792
54793fi
54794
54795
54796
54797
54798
54799  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
54800     #include <sys/stat.h>
54801"
54802if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
54803
54804cat >>confdefs.h <<_ACEOF
54805#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
54806_ACEOF
54807
54808
54809else
54810  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
54811        #include <sys/stat.h>
54812"
54813if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
54814
54815cat >>confdefs.h <<_ACEOF
54816#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
54817_ACEOF
54818
54819
54820else
54821  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
54822          #include <sys/stat.h>
54823"
54824if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
54825
54826cat >>confdefs.h <<_ACEOF
54827#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
54828_ACEOF
54829
54830
54831fi
54832
54833fi
54834
54835fi
54836
54837
54838
54839  STDARG_H=''
54840  NEXT_STDARG_H='<stdarg.h>'
54841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
54842$as_echo_n "checking for va_copy... " >&6; }
54843if ${gl_cv_func_va_copy+:} false; then :
54844  $as_echo_n "(cached) " >&6
54845else
54846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54847/* end confdefs.h.  */
54848#include <stdarg.h>
54849int
54850main ()
54851{
54852
54853#ifndef va_copy
54854void (*func) (va_list, va_list) = va_copy;
54855#endif
54856
54857  ;
54858  return 0;
54859}
54860_ACEOF
54861if ac_fn_c_try_compile "$LINENO"; then :
54862  gl_cv_func_va_copy=yes
54863else
54864  gl_cv_func_va_copy=no
54865fi
54866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54867
54868fi
54869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
54870$as_echo "$gl_cv_func_va_copy" >&6; }
54871  if test $gl_cv_func_va_copy = no; then
54872                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54873/* end confdefs.h.  */
54874#if defined _AIX && !defined __GNUC__
54875        AIX vaccine
54876       #endif
54877
54878_ACEOF
54879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
54880  $EGREP "vaccine" >/dev/null 2>&1; then :
54881  gl_aixcc=yes
54882else
54883  gl_aixcc=no
54884fi
54885rm -f conftest*
54886
54887    if test $gl_aixcc = yes; then
54888            STDARG_H=stdarg.h
54889
54890
54891
54892
54893
54894
54895
54896
54897     if test $gl_cv_have_include_next = yes; then
54898       gl_cv_next_stdarg_h='<'stdarg.h'>'
54899     else
54900       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
54901$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
54902if ${gl_cv_next_stdarg_h+:} false; then :
54903  $as_echo_n "(cached) " >&6
54904else
54905
54906
54907
54908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54909/* end confdefs.h.  */
54910#include <stdarg.h>
54911_ACEOF
54912                case "$host_os" in
54913    aix*) gl_absname_cpp="$ac_cpp -C" ;;
54914    *)    gl_absname_cpp="$ac_cpp" ;;
54915  esac
54916
54917  case "$host_os" in
54918    mingw*)
54919                                          gl_dirsep_regex='[/\\]'
54920      ;;
54921    *)
54922      gl_dirsep_regex='\/'
54923      ;;
54924  esac
54925      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
54926  gl_header_literal_regex=`echo 'stdarg.h' \
54927                           | sed -e "$gl_make_literal_regex_sed"`
54928  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
54929      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
54930      s|^/[^/]|//&|
54931      p
54932      q
54933    }'
54934
54935        gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
54936  sed -n "$gl_absolute_header_sed"`
54937
54938           gl_header=$gl_cv_absolute_stdarg_h
54939           gl_cv_next_stdarg_h='"'$gl_header'"'
54940
54941
54942fi
54943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
54944$as_echo "$gl_cv_next_stdarg_h" >&6; }
54945     fi
54946     NEXT_STDARG_H=$gl_cv_next_stdarg_h
54947
54948     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
54949       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
54950       gl_next_as_first_directive='<'stdarg.h'>'
54951     else
54952       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
54953       gl_next_as_first_directive=$gl_cv_next_stdarg_h
54954     fi
54955     NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
54956
54957
54958
54959
54960            if test "$gl_cv_next_stdarg_h" = '""'; then
54961        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
54962        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
54963      fi
54964    else
54965
54966  saved_as_echo_n="$as_echo_n"
54967  as_echo_n=':'
54968  if ${gl_cv_func___va_copy+:} false; then :
54969  $as_echo_n "(cached) " >&6
54970else
54971
54972        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54973/* end confdefs.h.  */
54974#include <stdarg.h>
54975int
54976main ()
54977{
54978
54979#ifndef __va_copy
54980error, bail out
54981#endif
54982
54983  ;
54984  return 0;
54985}
54986_ACEOF
54987if ac_fn_c_try_compile "$LINENO"; then :
54988  gl_cv_func___va_copy=yes
54989else
54990  gl_cv_func___va_copy=no
54991fi
54992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54993fi
54994
54995  as_echo_n="$saved_as_echo_n"
54996
54997      if test $gl_cv_func___va_copy = yes; then
54998
54999$as_echo "#define va_copy __va_copy" >>confdefs.h
55000
55001      else
55002
55003
55004$as_echo "#define va_copy gl_va_copy" >>confdefs.h
55005
55006      fi
55007    fi
55008  fi
55009
55010   if test -n "$STDARG_H"; then
55011  GL_GENERATE_STDARG_H_TRUE=
55012  GL_GENERATE_STDARG_H_FALSE='#'
55013else
55014  GL_GENERATE_STDARG_H_TRUE='#'
55015  GL_GENERATE_STDARG_H_FALSE=
55016fi
55017
55018
55019
55020
55021
55022
55023
55024          if test "$ac_cv_header_stdbool_h" = yes; then
55025    case "$host_os" in
55026      solaris*)
55027        if test -z "$GCC"; then
55028          STDBOOL_H='stdbool.h'
55029        else
55030          STDBOOL_H=''
55031        fi
55032        ;;
55033      *)
55034        STDBOOL_H=''
55035        ;;
55036    esac
55037  else
55038    STDBOOL_H='stdbool.h'
55039  fi
55040
55041   if test -n "$STDBOOL_H"; then
55042  GL_GENERATE_STDBOOL_H_TRUE=
55043  GL_GENERATE_STDBOOL_H_FALSE='#'
55044else
55045  GL_GENERATE_STDBOOL_H_TRUE='#'
55046  GL_GENERATE_STDBOOL_H_FALSE=
55047fi
55048
55049
55050  if test "$ac_cv_type__Bool" = yes; then
55051    HAVE__BOOL=1
55052  else
55053    HAVE__BOOL=0
55054  fi
55055
55056
55057
55058
55059
55060  STDDEF_H=
55061
55062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
55063$as_echo_n "checking for good max_align_t... " >&6; }
55064if ${gl_cv_type_max_align_t+:} false; then :
55065  $as_echo_n "(cached) " >&6
55066else
55067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55068/* end confdefs.h.  */
55069#include <stddef.h>
55070            unsigned int s = sizeof (max_align_t);
55071            #if defined __GNUC__ || defined __IBM__ALIGNOF__
55072            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
55073            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
55074            #endif
55075
55076int
55077main ()
55078{
55079
55080  ;
55081  return 0;
55082}
55083_ACEOF
55084if ac_fn_c_try_compile "$LINENO"; then :
55085  gl_cv_type_max_align_t=yes
55086else
55087  gl_cv_type_max_align_t=no
55088fi
55089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55090
55091fi
55092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
55093$as_echo "$gl_cv_type_max_align_t" >&6; }
55094  if test $gl_cv_type_max_align_t = no; then
55095    HAVE_MAX_ALIGN_T=0
55096    STDDEF_H=stddef.h
55097  fi
55098
55099  if test $gt_cv_c_wchar_t = no; then
55100    HAVE_WCHAR_T=0
55101    STDDEF_H=stddef.h
55102  fi
55103
55104  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
55105$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
55106if ${gl_cv_decl_null_works+:} false; then :
55107  $as_echo_n "(cached) " >&6
55108else
55109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55110/* end confdefs.h.  */
55111#include <stddef.h>
55112      int test[2 * (sizeof NULL == sizeof (void *)) -1];
55113
55114int
55115main ()
55116{
55117
55118  ;
55119  return 0;
55120}
55121_ACEOF
55122if ac_fn_c_try_compile "$LINENO"; then :
55123  gl_cv_decl_null_works=yes
55124else
55125  gl_cv_decl_null_works=no
55126fi
55127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55128fi
55129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
55130$as_echo "$gl_cv_decl_null_works" >&6; }
55131  if test $gl_cv_decl_null_works = no; then
55132    REPLACE_NULL=1
55133    STDDEF_H=stddef.h
55134  fi
55135
55136
55137   if test -n "$STDDEF_H"; then
55138  GL_GENERATE_STDDEF_H_TRUE=
55139  GL_GENERATE_STDDEF_H_FALSE='#'
55140else
55141  GL_GENERATE_STDDEF_H_TRUE='#'
55142  GL_GENERATE_STDDEF_H_FALSE=
55143fi
55144
55145  if test -n "$STDDEF_H"; then
55146
55147
55148
55149
55150
55151
55152
55153
55154     if test $gl_cv_have_include_next = yes; then
55155       gl_cv_next_stddef_h='<'stddef.h'>'
55156     else
55157       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
55158$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
55159if ${gl_cv_next_stddef_h+:} false; then :
55160  $as_echo_n "(cached) " >&6
55161else
55162
55163
55164
55165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55166/* end confdefs.h.  */
55167#include <stddef.h>
55168_ACEOF
55169                case "$host_os" in
55170    aix*) gl_absname_cpp="$ac_cpp -C" ;;
55171    *)    gl_absname_cpp="$ac_cpp" ;;
55172  esac
55173
55174  case "$host_os" in
55175    mingw*)
55176                                          gl_dirsep_regex='[/\\]'
55177      ;;
55178    *)
55179      gl_dirsep_regex='\/'
55180      ;;
55181  esac
55182      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
55183  gl_header_literal_regex=`echo 'stddef.h' \
55184                           | sed -e "$gl_make_literal_regex_sed"`
55185  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
55186      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
55187      s|^/[^/]|//&|
55188      p
55189      q
55190    }'
55191
55192        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
55193  sed -n "$gl_absolute_header_sed"`
55194
55195           gl_header=$gl_cv_absolute_stddef_h
55196           gl_cv_next_stddef_h='"'$gl_header'"'
55197
55198
55199fi
55200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
55201$as_echo "$gl_cv_next_stddef_h" >&6; }
55202     fi
55203     NEXT_STDDEF_H=$gl_cv_next_stddef_h
55204
55205     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
55206       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
55207       gl_next_as_first_directive='<'stddef.h'>'
55208     else
55209       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
55210       gl_next_as_first_directive=$gl_cv_next_stddef_h
55211     fi
55212     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
55213
55214
55215
55216
55217  fi
55218
55219
55220
55221
55222  $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
55223
55224
55225
55226
55227
55228
55229
55230
55231
55232
55233     if test $gl_cv_have_include_next = yes; then
55234       gl_cv_next_stdio_h='<'stdio.h'>'
55235     else
55236       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
55237$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
55238if ${gl_cv_next_stdio_h+:} false; then :
55239  $as_echo_n "(cached) " >&6
55240else
55241
55242
55243
55244  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55245/* end confdefs.h.  */
55246#include <stdio.h>
55247_ACEOF
55248                case "$host_os" in
55249    aix*) gl_absname_cpp="$ac_cpp -C" ;;
55250    *)    gl_absname_cpp="$ac_cpp" ;;
55251  esac
55252
55253  case "$host_os" in
55254    mingw*)
55255                                          gl_dirsep_regex='[/\\]'
55256      ;;
55257    *)
55258      gl_dirsep_regex='\/'
55259      ;;
55260  esac
55261      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
55262  gl_header_literal_regex=`echo 'stdio.h' \
55263                           | sed -e "$gl_make_literal_regex_sed"`
55264  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
55265      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
55266      s|^/[^/]|//&|
55267      p
55268      q
55269    }'
55270
55271        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
55272  sed -n "$gl_absolute_header_sed"`
55273
55274           gl_header=$gl_cv_absolute_stdio_h
55275           gl_cv_next_stdio_h='"'$gl_header'"'
55276
55277
55278fi
55279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
55280$as_echo "$gl_cv_next_stdio_h" >&6; }
55281     fi
55282     NEXT_STDIO_H=$gl_cv_next_stdio_h
55283
55284     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
55285       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
55286       gl_next_as_first_directive='<'stdio.h'>'
55287     else
55288       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
55289       gl_next_as_first_directive=$gl_cv_next_stdio_h
55290     fi
55291     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
55292
55293
55294
55295
55296
55297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
55298$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
55299if ${gl_cv_func_printf_attribute_flavor+:} false; then :
55300  $as_echo_n "(cached) " >&6
55301else
55302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55303/* end confdefs.h.  */
55304
55305       #define __STDC_FORMAT_MACROS 1
55306       #include <stdio.h>
55307       #include <inttypes.h>
55308       /* For non-mingw systems, compilation will trivially succeed.
55309          For mingw, compilation will succeed for older mingw (system
55310          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
55311       #if (defined _WIN32 && ! defined __CYGWIN__) && \
55312         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
55313       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
55314       #endif
55315
55316int
55317main ()
55318{
55319
55320  ;
55321  return 0;
55322}
55323_ACEOF
55324if ac_fn_c_try_compile "$LINENO"; then :
55325  gl_cv_func_printf_attribute_flavor=system
55326else
55327  gl_cv_func_printf_attribute_flavor=gnu
55328fi
55329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55330fi
55331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
55332$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
55333  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
55334
55335$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
55336
55337  fi
55338
55339      GNULIB_FSCANF=1
55340
55341
55342cat >>confdefs.h <<_ACEOF
55343#define GNULIB_FSCANF 1
55344_ACEOF
55345
55346
55347  GNULIB_SCANF=1
55348
55349
55350cat >>confdefs.h <<_ACEOF
55351#define GNULIB_SCANF 1
55352_ACEOF
55353
55354
55355  GNULIB_FGETC=1
55356  GNULIB_GETC=1
55357  GNULIB_GETCHAR=1
55358  GNULIB_FGETS=1
55359  GNULIB_FREAD=1
55360
55361
55362      GNULIB_FPRINTF=1
55363  GNULIB_PRINTF=1
55364  GNULIB_VFPRINTF=1
55365  GNULIB_VPRINTF=1
55366  GNULIB_FPUTC=1
55367  GNULIB_PUTC=1
55368  GNULIB_PUTCHAR=1
55369  GNULIB_FPUTS=1
55370  GNULIB_PUTS=1
55371  GNULIB_FWRITE=1
55372
55373
55374
55375
55376    if test $gl_cv_header_signal_h_SIGPIPE != yes; then
55377      REPLACE_STDIO_WRITE_FUNCS=1
55378
55379
55380
55381
55382
55383
55384
55385
55386  gl_LIBOBJS="$gl_LIBOBJS stdio-write.$ac_objext"
55387
55388    fi
55389
55390
55391
55392
55393
55394
55395
55396
55397
55398
55399
55400
55401
55402
55403
55404
55405
55406
55407
55408     if test $gl_cv_have_include_next = yes; then
55409       gl_cv_next_stdlib_h='<'stdlib.h'>'
55410     else
55411       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
55412$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
55413if ${gl_cv_next_stdlib_h+:} false; then :
55414  $as_echo_n "(cached) " >&6
55415else
55416
55417
55418
55419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55420/* end confdefs.h.  */
55421#include <stdlib.h>
55422_ACEOF
55423                case "$host_os" in
55424    aix*) gl_absname_cpp="$ac_cpp -C" ;;
55425    *)    gl_absname_cpp="$ac_cpp" ;;
55426  esac
55427
55428  case "$host_os" in
55429    mingw*)
55430                                          gl_dirsep_regex='[/\\]'
55431      ;;
55432    *)
55433      gl_dirsep_regex='\/'
55434      ;;
55435  esac
55436      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
55437  gl_header_literal_regex=`echo 'stdlib.h' \
55438                           | sed -e "$gl_make_literal_regex_sed"`
55439  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
55440      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
55441      s|^/[^/]|//&|
55442      p
55443      q
55444    }'
55445
55446        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
55447  sed -n "$gl_absolute_header_sed"`
55448
55449           gl_header=$gl_cv_absolute_stdlib_h
55450           gl_cv_next_stdlib_h='"'$gl_header'"'
55451
55452
55453fi
55454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
55455$as_echo "$gl_cv_next_stdlib_h" >&6; }
55456     fi
55457     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
55458
55459     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
55460       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
55461       gl_next_as_first_directive='<'stdlib.h'>'
55462     else
55463       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
55464       gl_next_as_first_directive=$gl_cv_next_stdlib_h
55465     fi
55466     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
55467
55468
55469
55470
55471
55472
55473
55474
55475
55476
55477
55478
55479
55480
55481
55482
55483
55484  for ac_func in stpcpy
55485do :
55486  ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
55487if test "x$ac_cv_func_stpcpy" = xyes; then :
55488  cat >>confdefs.h <<_ACEOF
55489#define HAVE_STPCPY 1
55490_ACEOF
55491
55492fi
55493done
55494
55495  if test $ac_cv_func_stpcpy = no; then
55496    HAVE_STPCPY=0
55497  fi
55498
55499  if test $HAVE_STPCPY = 0; then
55500
55501
55502
55503
55504
55505
55506
55507
55508  gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
55509
55510
55511  :
55512
55513  fi
55514
55515
55516
55517
55518
55519          GNULIB_STPCPY=1
55520
55521
55522
55523
55524
55525$as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
55526
55527
55528
55529
55530
55531
55532
55533
55534
55535
55536
55537
55538
55539
55540  if test $ac_cv_func_stpncpy = yes; then
55541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stpncpy" >&5
55542$as_echo_n "checking for working stpncpy... " >&6; }
55543if ${gl_cv_func_stpncpy+:} false; then :
55544  $as_echo_n "(cached) " >&6
55545else
55546
55547      if test "$cross_compiling" = yes; then :
55548           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55549/* end confdefs.h.  */
55550
55551#include <features.h>
55552#ifdef __GNU_LIBRARY__
55553  Thanks for using GNU
55554#endif
55555
55556_ACEOF
55557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
55558  $EGREP "Thanks for using GNU" >/dev/null 2>&1; then :
55559  gl_cv_func_stpncpy="guessing yes"
55560else
55561  case "$host_os" in
55562              *-musl*) gl_cv_func_stpncpy="guessing yes" ;;
55563              *)       gl_cv_func_stpncpy="$gl_cross_guess_normal" ;;
55564            esac
55565
55566fi
55567rm -f conftest*
55568
55569
55570else
55571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55572/* end confdefs.h.  */
55573
55574#include <stdlib.h>
55575#include <string.h> /* for strcpy */
55576/* The stpncpy prototype is missing in <string.h> on AIX 4.  */
55577#if !HAVE_DECL_STPNCPY
55578extern
55579# ifdef __cplusplus
55580"C"
55581# endif
55582char *stpncpy (char *dest, const char *src, size_t n);
55583#endif
55584int main ()
55585{
55586  int result = 0;
55587  const char *src = "Hello";
55588  char dest[10];
55589  /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+1 here.  */
55590  {
55591    strcpy (dest, "\377\377\377\377\377\377");
55592    if (stpncpy (dest, src, 2) != dest + 2)
55593      result |= 1;
55594  }
55595  /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+4 here.  */
55596  {
55597    strcpy (dest, "\377\377\377\377\377\377");
55598    if (stpncpy (dest, src, 5) != dest + 5)
55599      result |= 2;
55600  }
55601  /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+6 here.  */
55602  {
55603    strcpy (dest, "\377\377\377\377\377\377");
55604    if (stpncpy (dest, src, 7) != dest + 5)
55605      result |= 4;
55606  }
55607  return result;
55608}
55609
55610_ACEOF
55611if ac_fn_c_try_run "$LINENO"; then :
55612  gl_cv_func_stpncpy=yes
55613else
55614  gl_cv_func_stpncpy=no
55615fi
55616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
55617  conftest.$ac_objext conftest.beam conftest.$ac_ext
55618fi
55619
55620
55621fi
55622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stpncpy" >&5
55623$as_echo "$gl_cv_func_stpncpy" >&6; }
55624    case "$gl_cv_func_stpncpy" in
55625      *yes)
55626
55627$as_echo "#define HAVE_STPNCPY 1" >>confdefs.h
55628
55629        ;;
55630      *)
55631        REPLACE_STPNCPY=1
55632        ;;
55633    esac
55634  else
55635    HAVE_STPNCPY=0
55636  fi
55637
55638  if test $HAVE_STPNCPY = 0 || test $REPLACE_STPNCPY = 1; then
55639
55640
55641
55642
55643
55644
55645
55646
55647  gl_LIBOBJS="$gl_LIBOBJS stpncpy.$ac_objext"
55648
55649
55650  :
55651
55652  fi
55653
55654
55655
55656
55657
55658          GNULIB_STPNCPY=1
55659
55660
55661
55662
55663
55664$as_echo "#define GNULIB_TEST_STPNCPY 1" >>confdefs.h
55665
55666
55667
55668
55669
55670
55671
55672  for ac_func in strchrnul
55673do :
55674  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
55675if test "x$ac_cv_func_strchrnul" = xyes; then :
55676  cat >>confdefs.h <<_ACEOF
55677#define HAVE_STRCHRNUL 1
55678_ACEOF
55679
55680fi
55681done
55682
55683  if test $ac_cv_func_strchrnul = no; then
55684    HAVE_STRCHRNUL=0
55685  else
55686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
55687$as_echo_n "checking whether strchrnul works... " >&6; }
55688if ${gl_cv_func_strchrnul_works+:} false; then :
55689  $as_echo_n "(cached) " >&6
55690else
55691  if test "$cross_compiling" = yes; then :
55692           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55693/* end confdefs.h.  */
55694
55695#if defined __CYGWIN__
55696 #include <cygwin/version.h>
55697 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
55698  Lucky user
55699 #endif
55700#else
55701  Lucky user
55702#endif
55703
55704_ACEOF
55705if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
55706  $EGREP "Lucky user" >/dev/null 2>&1; then :
55707  gl_cv_func_strchrnul_works="guessing yes"
55708else
55709  gl_cv_func_strchrnul_works="guessing no"
55710fi
55711rm -f conftest*
55712
55713
55714else
55715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55716/* end confdefs.h.  */
55717
55718#include <string.h> /* for strchrnul */
55719
55720int
55721main ()
55722{
55723const char *buf = "a";
55724      return strchrnul (buf, 'b') != buf + 1;
55725
55726  ;
55727  return 0;
55728}
55729_ACEOF
55730if ac_fn_c_try_run "$LINENO"; then :
55731  gl_cv_func_strchrnul_works=yes
55732else
55733  gl_cv_func_strchrnul_works=no
55734fi
55735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
55736  conftest.$ac_objext conftest.beam conftest.$ac_ext
55737fi
55738
55739
55740fi
55741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
55742$as_echo "$gl_cv_func_strchrnul_works" >&6; }
55743    case "$gl_cv_func_strchrnul_works" in
55744      *yes) ;;
55745      *) REPLACE_STRCHRNUL=1 ;;
55746    esac
55747  fi
55748
55749  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
55750
55751
55752
55753
55754
55755
55756
55757
55758  gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
55759
55760    :
55761  fi
55762
55763
55764
55765
55766
55767          GNULIB_STRCHRNUL=1
55768
55769
55770
55771
55772
55773$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
55774
55775
55776
55777
55778  for ac_func in strcspn
55779do :
55780  ac_fn_c_check_func "$LINENO" "strcspn" "ac_cv_func_strcspn"
55781if test "x$ac_cv_func_strcspn" = xyes; then :
55782  cat >>confdefs.h <<_ACEOF
55783#define HAVE_STRCSPN 1
55784_ACEOF
55785
55786fi
55787done
55788
55789
55790  if test $ac_cv_func_strcspn = no; then
55791
55792
55793
55794
55795
55796
55797
55798
55799  gl_LIBOBJS="$gl_LIBOBJS strcspn.$ac_objext"
55800
55801    :
55802  fi
55803
55804
55805
55806
55807
55808
55809
55810  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
55811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
55812$as_echo_n "checking for working strerror function... " >&6; }
55813if ${gl_cv_func_working_strerror+:} false; then :
55814  $as_echo_n "(cached) " >&6
55815else
55816  if test "$cross_compiling" = yes; then :
55817  case "$host_os" in
55818                          # Guess yes on glibc systems.
55819           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
55820                          # Guess yes on musl systems.
55821           *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
55822                          # If we don't know, obey --enable-cross-guesses.
55823           *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
55824         esac
55825
55826else
55827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55828/* end confdefs.h.  */
55829#include <string.h>
55830
55831int
55832main ()
55833{
55834if (!*strerror (-2)) return 1;
55835  ;
55836  return 0;
55837}
55838_ACEOF
55839if ac_fn_c_try_run "$LINENO"; then :
55840  gl_cv_func_working_strerror=yes
55841else
55842  gl_cv_func_working_strerror=no
55843fi
55844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
55845  conftest.$ac_objext conftest.beam conftest.$ac_ext
55846fi
55847
55848
55849fi
55850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
55851$as_echo "$gl_cv_func_working_strerror" >&6; }
55852    case "$gl_cv_func_working_strerror" in
55853      *yes) ;;
55854      *)
55855                        REPLACE_STRERROR=1
55856        ;;
55857    esac
55858
55859                  case "$gl_cv_func_strerror_r_works" in
55860        *no) REPLACE_STRERROR=1 ;;
55861      esac
55862
55863  else
55864            REPLACE_STRERROR=1
55865  fi
55866
55867  if test $REPLACE_STRERROR = 1; then
55868
55869
55870
55871
55872
55873
55874
55875
55876  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
55877
55878  fi
55879
55880
55881cat >>confdefs.h <<_ACEOF
55882#define GNULIB_STRERROR 1
55883_ACEOF
55884
55885
55886
55887
55888
55889
55890
55891          GNULIB_STRERROR=1
55892
55893
55894
55895
55896
55897$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
55898
55899
55900
55901
55902
55903  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
55904
55905
55906
55907
55908
55909
55910
55911
55912  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
55913
55914
55915
55916
55917
55918  if test $ac_cv_header_sys_socket_h != yes; then
55919                    for ac_header in winsock2.h
55920do :
55921  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
55922if test "x$ac_cv_header_winsock2_h" = xyes; then :
55923  cat >>confdefs.h <<_ACEOF
55924#define HAVE_WINSOCK2_H 1
55925_ACEOF
55926
55927fi
55928
55929done
55930
55931  fi
55932  if test "$ac_cv_header_winsock2_h" = yes; then
55933    HAVE_WINSOCK2_H=1
55934    UNISTD_H_HAVE_WINSOCK2_H=1
55935    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
55936  else
55937    HAVE_WINSOCK2_H=0
55938  fi
55939
55940
55941  fi
55942  if test $gl_cond_libtool = false; then
55943    gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
55944    gl_libdeps="$gl_libdeps $LIBICONV"
55945  fi
55946  if test $gl_cond_libtool = false; then
55947    gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
55948    gl_libdeps="$gl_libdeps $LIBICONV"
55949  fi
55950
55951
55952
55953
55954
55955
55956
55957
55958
55959  if test $ac_cv_have_decl_strnlen = no; then
55960    HAVE_DECL_STRNLEN=0
55961  else
55962
55963         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
55964$as_echo_n "checking for working strnlen... " >&6; }
55965if ${ac_cv_func_strnlen_working+:} false; then :
55966  $as_echo_n "(cached) " >&6
55967else
55968  if test "$cross_compiling" = yes; then :
55969  # Guess no on AIX systems, yes otherwise.
55970		case "$host_os" in
55971		  aix*) ac_cv_func_strnlen_working=no;;
55972		  *)    ac_cv_func_strnlen_working=yes;;
55973		esac
55974else
55975  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55976/* end confdefs.h.  */
55977$ac_includes_default
55978int
55979main ()
55980{
55981
55982#define S "foobar"
55983#define S_LEN (sizeof S - 1)
55984
55985  /* At least one implementation is buggy: that of AIX 4.3 would
55986     give strnlen (S, 1) == 3.  */
55987
55988  int i;
55989  for (i = 0; i < S_LEN + 1; ++i)
55990    {
55991      int expected = i <= S_LEN ? i : S_LEN;
55992      if (strnlen (S, i) != expected)
55993	return 1;
55994    }
55995  return 0;
55996
55997  ;
55998  return 0;
55999}
56000_ACEOF
56001if ac_fn_c_try_run "$LINENO"; then :
56002  ac_cv_func_strnlen_working=yes
56003else
56004  ac_cv_func_strnlen_working=no
56005fi
56006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56007  conftest.$ac_objext conftest.beam conftest.$ac_ext
56008fi
56009
56010fi
56011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
56012$as_echo "$ac_cv_func_strnlen_working" >&6; }
56013test $ac_cv_func_strnlen_working = no && :
56014
56015
56016    if test $ac_cv_func_strnlen_working = no; then
56017      REPLACE_STRNLEN=1
56018    fi
56019  fi
56020
56021  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
56022
56023
56024
56025
56026
56027
56028
56029
56030  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
56031
56032    :
56033  fi
56034
56035
56036
56037
56038
56039          GNULIB_STRNLEN=1
56040
56041
56042
56043
56044
56045$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
56046
56047
56048
56049
56050
56051  for ac_func in strpbrk
56052do :
56053  ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
56054if test "x$ac_cv_func_strpbrk" = xyes; then :
56055  cat >>confdefs.h <<_ACEOF
56056#define HAVE_STRPBRK 1
56057_ACEOF
56058
56059fi
56060done
56061
56062  if test $ac_cv_func_strpbrk = no; then
56063    HAVE_STRPBRK=0
56064  fi
56065
56066  if test $HAVE_STRPBRK = 0; then
56067
56068
56069
56070
56071
56072
56073
56074
56075  gl_LIBOBJS="$gl_LIBOBJS strpbrk.$ac_objext"
56076
56077    :
56078  fi
56079
56080
56081
56082
56083
56084          GNULIB_STRPBRK=1
56085
56086
56087
56088
56089
56090$as_echo "#define GNULIB_TEST_STRPBRK 1" >>confdefs.h
56091
56092
56093
56094
56095
56096  if test $REPLACE_STRSTR = 0; then
56097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
56098$as_echo_n "checking whether strstr works in linear time... " >&6; }
56099if ${gl_cv_func_strstr_linear+:} false; then :
56100  $as_echo_n "(cached) " >&6
56101else
56102  if test "$cross_compiling" = yes; then :
56103                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56104/* end confdefs.h.  */
56105
56106#include <features.h>
56107#ifdef __GNU_LIBRARY__
56108 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
56109     && !(defined __i386__ || defined __x86_64__) \
56110     && !defined __UCLIBC__
56111  Lucky user
56112 #endif
56113#endif
56114#ifdef __CYGWIN__
56115 #include <cygwin/version.h>
56116 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
56117  Lucky user
56118 #endif
56119#endif
56120
56121_ACEOF
56122if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
56123  $EGREP "Lucky user" >/dev/null 2>&1; then :
56124  gl_cv_func_strstr_linear="guessing yes"
56125else
56126  gl_cv_func_strstr_linear="$gl_cross_guess_normal"
56127fi
56128rm -f conftest*
56129
56130
56131else
56132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56133/* end confdefs.h.  */
56134
56135#ifdef __MVS__
56136/* z/OS does not deliver signals while strstr() is running (thanks to
56137   restrictions on its LE runtime), which prevents us from limiting the
56138   running time of this test.  */
56139# error "This test does not work properly on z/OS"
56140#endif
56141#include <signal.h> /* for signal */
56142#include <string.h> /* for strstr */
56143#include <stdlib.h> /* for malloc */
56144#include <unistd.h> /* for alarm */
56145static void quit (int sig) { _exit (sig + 128); }
56146
56147int
56148main ()
56149{
56150
56151    int result = 0;
56152    size_t m = 1000000;
56153    char *haystack = (char *) malloc (2 * m + 2);
56154    char *needle = (char *) malloc (m + 2);
56155    /* Failure to compile this test due to missing alarm is okay,
56156       since all such platforms (mingw) also have quadratic strstr.  */
56157    signal (SIGALRM, quit);
56158    alarm (5);
56159    /* Check for quadratic performance.  */
56160    if (haystack && needle)
56161      {
56162        memset (haystack, 'A', 2 * m);
56163        haystack[2 * m] = 'B';
56164        haystack[2 * m + 1] = 0;
56165        memset (needle, 'A', m);
56166        needle[m] = 'B';
56167        needle[m + 1] = 0;
56168        if (!strstr (haystack, needle))
56169          result |= 1;
56170      }
56171    /* Free allocated memory, in case some sanitizer is watching.  */
56172    free (haystack);
56173    free (needle);
56174    return result;
56175
56176  ;
56177  return 0;
56178}
56179_ACEOF
56180if ac_fn_c_try_run "$LINENO"; then :
56181  gl_cv_func_strstr_linear=yes
56182else
56183  gl_cv_func_strstr_linear=no
56184fi
56185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56186  conftest.$ac_objext conftest.beam conftest.$ac_ext
56187fi
56188
56189
56190fi
56191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
56192$as_echo "$gl_cv_func_strstr_linear" >&6; }
56193    case "$gl_cv_func_strstr_linear" in
56194      *yes) ;;
56195      *)
56196        REPLACE_STRSTR=1
56197        ;;
56198    esac
56199  fi
56200
56201  if test $REPLACE_STRSTR = 1; then
56202
56203
56204
56205
56206
56207
56208
56209
56210  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
56211
56212  fi
56213
56214
56215
56216  if test $REPLACE_MEMCHR = 1; then
56217    REPLACE_STRSTR=1
56218  else
56219            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
56220$as_echo_n "checking whether strstr works... " >&6; }
56221if ${gl_cv_func_strstr_works_always+:} false; then :
56222  $as_echo_n "(cached) " >&6
56223else
56224  if test "$cross_compiling" = yes; then :
56225                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56226/* end confdefs.h.  */
56227
56228#ifdef __GNU_LIBRARY__
56229 #include <features.h>
56230 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
56231     || defined __UCLIBC__
56232  Lucky user
56233 #endif
56234#elif defined __CYGWIN__
56235 #include <cygwin/version.h>
56236 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
56237  Lucky user
56238 #endif
56239#else
56240  Lucky user
56241#endif
56242
56243_ACEOF
56244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
56245  $EGREP "Lucky user" >/dev/null 2>&1; then :
56246  gl_cv_func_strstr_works_always="guessing yes"
56247else
56248  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
56249fi
56250rm -f conftest*
56251
56252
56253else
56254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56255/* end confdefs.h.  */
56256
56257#include <string.h> /* for strstr */
56258#ifdef __GNU_LIBRARY__
56259 #include <features.h>
56260 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
56261  Unlucky user
56262 #endif
56263#endif
56264#define P "_EF_BF_BD"
56265#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
56266#define NEEDLE P P P P P
56267
56268int
56269main ()
56270{
56271return !!strstr (HAYSTACK, NEEDLE);
56272
56273  ;
56274  return 0;
56275}
56276_ACEOF
56277if ac_fn_c_try_run "$LINENO"; then :
56278  gl_cv_func_strstr_works_always=yes
56279else
56280  gl_cv_func_strstr_works_always=no
56281fi
56282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
56283  conftest.$ac_objext conftest.beam conftest.$ac_ext
56284fi
56285
56286
56287fi
56288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
56289$as_echo "$gl_cv_func_strstr_works_always" >&6; }
56290    case "$gl_cv_func_strstr_works_always" in
56291      *yes) ;;
56292      *)
56293        REPLACE_STRSTR=1
56294        ;;
56295    esac
56296  fi
56297
56298  if test $REPLACE_STRSTR = 1; then
56299
56300
56301
56302
56303
56304
56305
56306
56307  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
56308
56309  fi
56310
56311
56312
56313
56314
56315          GNULIB_STRSTR=1
56316
56317
56318
56319
56320
56321$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
56322
56323
56324
56325
56326  for ac_func in strtol
56327do :
56328  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
56329if test "x$ac_cv_func_strtol" = xyes; then :
56330  cat >>confdefs.h <<_ACEOF
56331#define HAVE_STRTOL 1
56332_ACEOF
56333
56334fi
56335done
56336
56337
56338  if test $ac_cv_func_strtol = no; then
56339
56340
56341
56342
56343
56344
56345
56346
56347  gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
56348
56349  fi
56350
56351  for ac_func in strtoul
56352do :
56353  ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
56354if test "x$ac_cv_func_strtoul" = xyes; then :
56355  cat >>confdefs.h <<_ACEOF
56356#define HAVE_STRTOUL 1
56357_ACEOF
56358
56359fi
56360done
56361
56362
56363  if test $ac_cv_func_strtoul = no; then
56364
56365
56366
56367
56368
56369
56370
56371
56372  gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext"
56373
56374  fi
56375
56376  for ac_func in chown
56377do :
56378  ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown"
56379if test "x$ac_cv_func_chown" = xyes; then :
56380  cat >>confdefs.h <<_ACEOF
56381#define HAVE_CHOWN 1
56382_ACEOF
56383
56384fi
56385done
56386
56387
56388
56389
56390
56391
56392
56393
56394
56395
56396
56397
56398
56399     if test $gl_cv_have_include_next = yes; then
56400       gl_cv_next_sys_random_h='<'sys/random.h'>'
56401     else
56402       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
56403$as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
56404if ${gl_cv_next_sys_random_h+:} false; then :
56405  $as_echo_n "(cached) " >&6
56406else
56407
56408             if test $ac_cv_header_sys_random_h = yes; then
56409
56410
56411
56412
56413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56414/* end confdefs.h.  */
56415#include <sys/random.h>
56416_ACEOF
56417                case "$host_os" in
56418    aix*) gl_absname_cpp="$ac_cpp -C" ;;
56419    *)    gl_absname_cpp="$ac_cpp" ;;
56420  esac
56421
56422  case "$host_os" in
56423    mingw*)
56424                                          gl_dirsep_regex='[/\\]'
56425      ;;
56426    *)
56427      gl_dirsep_regex='\/'
56428      ;;
56429  esac
56430      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
56431  gl_header_literal_regex=`echo 'sys/random.h' \
56432                           | sed -e "$gl_make_literal_regex_sed"`
56433  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
56434      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
56435      s|^/[^/]|//&|
56436      p
56437      q
56438    }'
56439
56440        gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
56441  sed -n "$gl_absolute_header_sed"`
56442
56443           gl_header=$gl_cv_absolute_sys_random_h
56444           gl_cv_next_sys_random_h='"'$gl_header'"'
56445          else
56446               gl_cv_next_sys_random_h='<'sys/random.h'>'
56447             fi
56448
56449
56450fi
56451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
56452$as_echo "$gl_cv_next_sys_random_h" >&6; }
56453     fi
56454     NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
56455
56456     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
56457       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
56458       gl_next_as_first_directive='<'sys/random.h'>'
56459     else
56460       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
56461       gl_next_as_first_directive=$gl_cv_next_sys_random_h
56462     fi
56463     NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
56464
56465
56466
56467
56468  if test $ac_cv_header_sys_random_h = yes; then
56469    HAVE_SYS_RANDOM_H=1
56470  else
56471    HAVE_SYS_RANDOM_H=0
56472  fi
56473
56474
56475
56476  if test $ac_cv_header_sys_random_h = yes; then
56477    UNISTD_H_HAVE_SYS_RANDOM_H=1
56478  fi
56479
56480
56481
56482
56483
56484
56485
56486
56487
56488
56489
56490
56491
56492
56493
56494
56495
56496
56497
56498
56499
56500
56501     if test $gl_cv_have_include_next = yes; then
56502       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
56503     else
56504       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
56505$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
56506if ${gl_cv_next_sys_stat_h+:} false; then :
56507  $as_echo_n "(cached) " >&6
56508else
56509
56510             if test $ac_cv_header_sys_stat_h = yes; then
56511
56512
56513
56514
56515  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56516/* end confdefs.h.  */
56517#include <sys/stat.h>
56518_ACEOF
56519                case "$host_os" in
56520    aix*) gl_absname_cpp="$ac_cpp -C" ;;
56521    *)    gl_absname_cpp="$ac_cpp" ;;
56522  esac
56523
56524  case "$host_os" in
56525    mingw*)
56526                                          gl_dirsep_regex='[/\\]'
56527      ;;
56528    *)
56529      gl_dirsep_regex='\/'
56530      ;;
56531  esac
56532      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
56533  gl_header_literal_regex=`echo 'sys/stat.h' \
56534                           | sed -e "$gl_make_literal_regex_sed"`
56535  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
56536      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
56537      s|^/[^/]|//&|
56538      p
56539      q
56540    }'
56541
56542        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
56543  sed -n "$gl_absolute_header_sed"`
56544
56545           gl_header=$gl_cv_absolute_sys_stat_h
56546           gl_cv_next_sys_stat_h='"'$gl_header'"'
56547          else
56548               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
56549             fi
56550
56551
56552fi
56553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
56554$as_echo "$gl_cv_next_sys_stat_h" >&6; }
56555     fi
56556     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
56557
56558     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
56559       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
56560       gl_next_as_first_directive='<'sys/stat.h'>'
56561     else
56562       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
56563       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
56564     fi
56565     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
56566
56567
56568
56569
56570
56571
56572
56573
56574    WINDOWS_STAT_TIMESPEC=0
56575
56576
56577
56578
56579
56580
56581
56582
56583      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
56584     #include <sys/stat.h>
56585"
56586if test "x$ac_cv_type_nlink_t" = xyes; then :
56587
56588else
56589
56590$as_echo "#define nlink_t int" >>confdefs.h
56591
56592fi
56593
56594
56595
56596
56597
56598
56599
56600
56601
56602
56603
56604
56605
56606
56607
56608
56609
56610
56611
56612
56613
56614
56615
56616
56617
56618
56619
56620     if test $gl_cv_have_include_next = yes; then
56621       gl_cv_next_sys_wait_h='<'sys/wait.h'>'
56622     else
56623       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
56624$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
56625if ${gl_cv_next_sys_wait_h+:} false; then :
56626  $as_echo_n "(cached) " >&6
56627else
56628
56629             if test $ac_cv_header_sys_wait_h = yes; then
56630
56631
56632
56633
56634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56635/* end confdefs.h.  */
56636#include <sys/wait.h>
56637_ACEOF
56638                case "$host_os" in
56639    aix*) gl_absname_cpp="$ac_cpp -C" ;;
56640    *)    gl_absname_cpp="$ac_cpp" ;;
56641  esac
56642
56643  case "$host_os" in
56644    mingw*)
56645                                          gl_dirsep_regex='[/\\]'
56646      ;;
56647    *)
56648      gl_dirsep_regex='\/'
56649      ;;
56650  esac
56651      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
56652  gl_header_literal_regex=`echo 'sys/wait.h' \
56653                           | sed -e "$gl_make_literal_regex_sed"`
56654  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
56655      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
56656      s|^/[^/]|//&|
56657      p
56658      q
56659    }'
56660
56661        gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
56662  sed -n "$gl_absolute_header_sed"`
56663
56664           gl_header=$gl_cv_absolute_sys_wait_h
56665           gl_cv_next_sys_wait_h='"'$gl_header'"'
56666          else
56667               gl_cv_next_sys_wait_h='<'sys/wait.h'>'
56668             fi
56669
56670
56671fi
56672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
56673$as_echo "$gl_cv_next_sys_wait_h" >&6; }
56674     fi
56675     NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
56676
56677     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
56678       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
56679       gl_next_as_first_directive='<'sys/wait.h'>'
56680     else
56681       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
56682       gl_next_as_first_directive=$gl_cv_next_sys_wait_h
56683     fi
56684     NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
56685
56686
56687
56688
56689
56690
56691
56692
56693
56694
56695
56696
56697
56698
56699  :
56700
56701
56702
56703
56704cat >>confdefs.h <<_ACEOF
56705#define GNULIB_TEMPNAME 1
56706_ACEOF
56707
56708
56709
56710
56711
56712
56713  :
56714
56715
56716
56717  :
56718
56719
56720      if  { test "$HAVE_LIBUNISTRING" != yes \
56721    || {
56722
56723
56724
56725            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
56726            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
56727                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
56728                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
56729                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
56730                         }
56731                    }
56732               }
56733
56734
56735
56736
56737       }
56738  }; then
56739    LIBUNISTRING_UNICONV_H='uniconv.h'
56740  else
56741    LIBUNISTRING_UNICONV_H=
56742  fi
56743
56744
56745
56746
56747       if  { test "$HAVE_LIBUNISTRING" != yes \
56748    || {
56749
56750
56751
56752            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
56753            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
56754                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
56755                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
56756                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
56757                         }
56758                    }
56759               }
56760
56761
56762
56763
56764       }
56765  }; then
56766  LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_TRUE=
56767  LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_FALSE='#'
56768else
56769  LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_TRUE='#'
56770  LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_FALSE=
56771fi
56772
56773
56774
56775
56776      if  { test "$HAVE_LIBUNISTRING" != yes \
56777    || {
56778
56779
56780
56781            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
56782            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
56783                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
56784                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
56785                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
56786                         }
56787                    }
56788               }
56789
56790
56791
56792
56793       }
56794  }; then
56795    LIBUNISTRING_UNICTYPE_H='unictype.h'
56796  else
56797    LIBUNISTRING_UNICTYPE_H=
56798  fi
56799
56800
56801
56802
56803
56804       if  { test "$HAVE_LIBUNISTRING" != yes \
56805    || {
56806
56807
56808
56809            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
56810            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
56811                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
56812                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
56813                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
56814                         }
56815                    }
56816               }
56817
56818
56819
56820
56821       }
56822  }; then
56823  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_TRUE=
56824  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_FALSE='#'
56825else
56826  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_TRUE='#'
56827  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_FALSE=
56828fi
56829
56830
56831
56832
56833       if  { test "$HAVE_LIBUNISTRING" != yes \
56834    || {
56835
56836
56837
56838            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
56839            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
56840                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
56841                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
56842                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
56843                         }
56844                    }
56845               }
56846
56847
56848
56849
56850       }
56851  }; then
56852  LIBUNISTRING_COMPILE_UNICTYPE_SYNTAX_JAVA_WHITESPACE_TRUE=
56853  LIBUNISTRING_COMPILE_UNICTYPE_SYNTAX_JAVA_WHITESPACE_FALSE='#'
56854else
56855  LIBUNISTRING_COMPILE_UNICTYPE_SYNTAX_JAVA_WHITESPACE_TRUE='#'
56856  LIBUNISTRING_COMPILE_UNICTYPE_SYNTAX_JAVA_WHITESPACE_FALSE=
56857fi
56858
56859
56860
56861
56862      if  { test "$HAVE_LIBUNISTRING" != yes \
56863    || {
56864
56865
56866
56867            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
56868            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
56869                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
56870                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
56871                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
56872                         }
56873                    }
56874               }
56875
56876
56877
56878
56879       }
56880  }; then
56881    LIBUNISTRING_UNILBRK_H='unilbrk.h'
56882  else
56883    LIBUNISTRING_UNILBRK_H=
56884  fi
56885
56886
56887
56888
56889
56890       if  { test "$HAVE_LIBUNISTRING" != yes \
56891    || {
56892
56893
56894
56895            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
56896            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
56897                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
56898                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
56899                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
56900                         }
56901                    }
56902               }
56903
56904
56905
56906
56907       }
56908  }; then
56909  LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_TRUE=
56910  LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_FALSE='#'
56911else
56912  LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_TRUE='#'
56913  LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_FALSE=
56914fi
56915
56916
56917
56918
56919       if  { test "$HAVE_LIBUNISTRING" != yes \
56920    || {
56921
56922
56923
56924            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
56925            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
56926                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
56927                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
56928                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
56929                         }
56930                    }
56931               }
56932
56933
56934
56935
56936       }
56937  }; then
56938  LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_TRUE=
56939  LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_FALSE='#'
56940else
56941  LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_TRUE='#'
56942  LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_FALSE=
56943fi
56944
56945
56946
56947
56948       if  { test "$HAVE_LIBUNISTRING" != yes \
56949    || {
56950
56951
56952
56953            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
56954            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
56955                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
56956                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
56957                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
56958                         }
56959                    }
56960               }
56961
56962
56963
56964
56965       }
56966  }; then
56967  LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_TRUE=
56968  LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_FALSE='#'
56969else
56970  LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_TRUE='#'
56971  LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_FALSE=
56972fi
56973
56974
56975
56976
56977      if  { test "$HAVE_LIBUNISTRING" != yes \
56978    || {
56979
56980
56981
56982            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
56983            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
56984                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
56985                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
56986                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 5
56987                         }
56988                    }
56989               }
56990
56991
56992
56993
56994       }
56995  }; then
56996    LIBUNISTRING_UNINAME_H='uniname.h'
56997  else
56998    LIBUNISTRING_UNINAME_H=
56999  fi
57000
57001
57002
57003
57004       if  { test "$HAVE_LIBUNISTRING" != yes \
57005    || {
57006
57007
57008
57009            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57010            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57011                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57012                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57013                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
57014                         }
57015                    }
57016               }
57017
57018
57019
57020
57021       }
57022  }; then
57023  LIBUNISTRING_COMPILE_UNINAME_UNINAME_TRUE=
57024  LIBUNISTRING_COMPILE_UNINAME_UNINAME_FALSE='#'
57025else
57026  LIBUNISTRING_COMPILE_UNINAME_UNINAME_TRUE='#'
57027  LIBUNISTRING_COMPILE_UNINAME_UNINAME_FALSE=
57028fi
57029
57030
57031
57032
57033
57034
57035
57036
57037
57038
57039
57040
57041
57042
57043     if test $gl_cv_have_include_next = yes; then
57044       gl_cv_next_unistd_h='<'unistd.h'>'
57045     else
57046       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
57047$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
57048if ${gl_cv_next_unistd_h+:} false; then :
57049  $as_echo_n "(cached) " >&6
57050else
57051
57052             if test $ac_cv_header_unistd_h = yes; then
57053
57054
57055
57056
57057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57058/* end confdefs.h.  */
57059#include <unistd.h>
57060_ACEOF
57061                case "$host_os" in
57062    aix*) gl_absname_cpp="$ac_cpp -C" ;;
57063    *)    gl_absname_cpp="$ac_cpp" ;;
57064  esac
57065
57066  case "$host_os" in
57067    mingw*)
57068                                          gl_dirsep_regex='[/\\]'
57069      ;;
57070    *)
57071      gl_dirsep_regex='\/'
57072      ;;
57073  esac
57074      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
57075  gl_header_literal_regex=`echo 'unistd.h' \
57076                           | sed -e "$gl_make_literal_regex_sed"`
57077  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
57078      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
57079      s|^/[^/]|//&|
57080      p
57081      q
57082    }'
57083
57084        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
57085  sed -n "$gl_absolute_header_sed"`
57086
57087           gl_header=$gl_cv_absolute_unistd_h
57088           gl_cv_next_unistd_h='"'$gl_header'"'
57089          else
57090               gl_cv_next_unistd_h='<'unistd.h'>'
57091             fi
57092
57093
57094fi
57095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
57096$as_echo "$gl_cv_next_unistd_h" >&6; }
57097     fi
57098     NEXT_UNISTD_H=$gl_cv_next_unistd_h
57099
57100     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
57101       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
57102       gl_next_as_first_directive='<'unistd.h'>'
57103     else
57104       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
57105       gl_next_as_first_directive=$gl_cv_next_unistd_h
57106     fi
57107     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
57108
57109
57110
57111
57112  if test $ac_cv_header_unistd_h = yes; then
57113    HAVE_UNISTD_H=1
57114  else
57115    HAVE_UNISTD_H=0
57116  fi
57117
57118
57119
57120
57121
57122
57123
57124
57125
57126
57127
57128
57129
57130
57131
57132
57133
57134      if  { test "$HAVE_LIBUNISTRING" != yes \
57135    || {
57136
57137
57138
57139            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57140            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57141                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57142                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57143                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
57144                         }
57145                    }
57146               }
57147
57148
57149
57150
57151       }
57152  }; then
57153    LIBUNISTRING_UNISTR_H='unistr.h'
57154  else
57155    LIBUNISTRING_UNISTR_H=
57156  fi
57157
57158
57159
57160
57161cat >>confdefs.h <<_ACEOF
57162#define GNULIB_UNISTR_U16_MBTOUC 1
57163_ACEOF
57164
57165
57166
57167
57168       if  { test "$HAVE_LIBUNISTRING" != yes \
57169    || {
57170
57171
57172
57173            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57174            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57175                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57176                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57177                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
57178                         }
57179                    }
57180               }
57181
57182
57183
57184
57185       }
57186  }; then
57187  LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_TRUE=
57188  LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_FALSE='#'
57189else
57190  LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_TRUE='#'
57191  LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_FALSE=
57192fi
57193
57194
57195
57196
57197       if  { test "$HAVE_LIBUNISTRING" != yes \
57198    || {
57199
57200
57201
57202            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57203            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57204                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57205                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57206                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
57207                         }
57208                    }
57209               }
57210
57211
57212
57213
57214       }
57215  }; then
57216  LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_TRUE=
57217  LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_FALSE='#'
57218else
57219  LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_TRUE='#'
57220  LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_FALSE=
57221fi
57222
57223
57224
57225
57226       if  { test "$HAVE_LIBUNISTRING" != yes \
57227    || {
57228
57229
57230
57231            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57232            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57233                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57234                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57235                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
57236                         }
57237                    }
57238               }
57239
57240
57241
57242
57243       }
57244  }; then
57245  LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_TRUE=
57246  LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_FALSE='#'
57247else
57248  LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_TRUE='#'
57249  LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_FALSE=
57250fi
57251
57252
57253
57254
57255cat >>confdefs.h <<_ACEOF
57256#define GNULIB_UNISTR_U8_MBTOUC 1
57257_ACEOF
57258
57259
57260
57261
57262       if  { test "$HAVE_LIBUNISTRING" != yes \
57263    || {
57264
57265
57266
57267            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57268            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57269                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57270                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57271                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
57272                         }
57273                    }
57274               }
57275
57276
57277
57278
57279       }
57280  }; then
57281  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_TRUE=
57282  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_FALSE='#'
57283else
57284  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_TRUE='#'
57285  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_FALSE=
57286fi
57287
57288
57289
57290
57291cat >>confdefs.h <<_ACEOF
57292#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1
57293_ACEOF
57294
57295
57296
57297
57298       if  { test "$HAVE_LIBUNISTRING" != yes \
57299    || {
57300
57301
57302
57303            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57304            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57305                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57306                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57307                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
57308                         }
57309                    }
57310               }
57311
57312
57313
57314
57315       }
57316  }; then
57317  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE=
57318  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE='#'
57319else
57320  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE='#'
57321  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE=
57322fi
57323
57324
57325
57326
57327cat >>confdefs.h <<_ACEOF
57328#define GNULIB_UNISTR_U8_MBTOUCR 1
57329_ACEOF
57330
57331
57332
57333
57334       if  { test "$HAVE_LIBUNISTRING" != yes \
57335    || {
57336
57337
57338
57339            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57340            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57341                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57342                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57343                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
57344                         }
57345                    }
57346               }
57347
57348
57349
57350
57351       }
57352  }; then
57353  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
57354  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
57355else
57356  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
57357  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
57358fi
57359
57360
57361
57362
57363       if  { test "$HAVE_LIBUNISTRING" != yes \
57364    || {
57365
57366
57367
57368            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57369            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57370                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57371                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57372                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
57373                         }
57374                    }
57375               }
57376
57377
57378
57379
57380       }
57381  }; then
57382  LIBUNISTRING_COMPILE_UNISTR_U8_PREV_TRUE=
57383  LIBUNISTRING_COMPILE_UNISTR_U8_PREV_FALSE='#'
57384else
57385  LIBUNISTRING_COMPILE_UNISTR_U8_PREV_TRUE='#'
57386  LIBUNISTRING_COMPILE_UNISTR_U8_PREV_FALSE=
57387fi
57388
57389
57390
57391
57392cat >>confdefs.h <<_ACEOF
57393#define GNULIB_UNISTR_U8_UCTOMB 1
57394_ACEOF
57395
57396
57397
57398
57399       if  { test "$HAVE_LIBUNISTRING" != yes \
57400    || {
57401
57402
57403
57404            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57405            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57406                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57407                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57408                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
57409                         }
57410                    }
57411               }
57412
57413
57414
57415
57416       }
57417  }; then
57418  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
57419  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
57420else
57421  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
57422  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
57423fi
57424
57425
57426
57427
57428      if  { test "$HAVE_LIBUNISTRING" != yes \
57429    || {
57430
57431
57432
57433            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57434            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57435                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57436                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57437                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
57438                         }
57439                    }
57440               }
57441
57442
57443
57444
57445       }
57446  }; then
57447    LIBUNISTRING_UNITYPES_H='unitypes.h'
57448  else
57449    LIBUNISTRING_UNITYPES_H=
57450  fi
57451
57452
57453
57454
57455      if  { test "$HAVE_LIBUNISTRING" != yes \
57456    || {
57457
57458
57459
57460            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57461            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57462                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57463                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57464                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
57465                         }
57466                    }
57467               }
57468
57469
57470
57471
57472       }
57473  }; then
57474    LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
57475  else
57476    LIBUNISTRING_UNIWIDTH_H=
57477  fi
57478
57479
57480
57481
57482       if  { test "$HAVE_LIBUNISTRING" != yes \
57483    || {
57484
57485
57486
57487            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
57488            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
57489                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
57490                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
57491                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
57492                         }
57493                    }
57494               }
57495
57496
57497
57498
57499       }
57500  }; then
57501  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
57502  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
57503else
57504  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
57505  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
57506fi
57507
57508
57509
57510
57511
57512
57513
57514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
57515$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
57516if ${gl_cv_func_unlink_honors_slashes+:} false; then :
57517  $as_echo_n "(cached) " >&6
57518else
57519  touch conftest.file
57520     # Assume that if we have lstat, we can also check symlinks.
57521     if test $ac_cv_func_lstat = yes; then
57522       ln -s conftest.file conftest.lnk
57523     fi
57524     if test "$cross_compiling" = yes; then :
57525  case "$host_os" in
57526                          # Guess yes on Linux systems.
57527         linux-* | linux) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
57528                          # Guess yes on glibc systems.
57529         *-gnu*)          gl_cv_func_unlink_honors_slashes="guessing yes" ;;
57530                          # Guess no on native Windows.
57531         mingw*)          gl_cv_func_unlink_honors_slashes="guessing no" ;;
57532                          # If we don't know, obey --enable-cross-guesses.
57533         *)               gl_cv_func_unlink_honors_slashes="$gl_cross_guess_normal" ;;
57534       esac
57535
57536else
57537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57538/* end confdefs.h.  */
57539#if HAVE_UNISTD_H
57540           # include <unistd.h>
57541           #else /* on Windows with MSVC */
57542           # include <io.h>
57543           #endif
57544           #include <errno.h>
57545
57546int
57547main ()
57548{
57549int result = 0;
57550           if (!unlink ("conftest.file/"))
57551             result |= 1;
57552           else if (errno != ENOTDIR)
57553             result |= 2;
57554#if HAVE_LSTAT
57555           if (!unlink ("conftest.lnk/"))
57556             result |= 4;
57557           else if (errno != ENOTDIR)
57558             result |= 8;
57559#endif
57560           return result;
57561
57562  ;
57563  return 0;
57564}
57565_ACEOF
57566if ac_fn_c_try_run "$LINENO"; then :
57567  gl_cv_func_unlink_honors_slashes=yes
57568else
57569  gl_cv_func_unlink_honors_slashes=no
57570fi
57571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
57572  conftest.$ac_objext conftest.beam conftest.$ac_ext
57573fi
57574
57575     rm -f conftest.file conftest.lnk
57576fi
57577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
57578$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
57579  case "$gl_cv_func_unlink_honors_slashes" in
57580    *no)
57581      REPLACE_UNLINK=1
57582      ;;
57583  esac
57584
57585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
57586$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
57587if ${gl_cv_func_unlink_parent_fails+:} false; then :
57588  $as_echo_n "(cached) " >&6
57589else
57590  case "$host_os" in
57591       darwin*)
57592                                                      if {
57593              # Use the mktemp program if available. If not available, hide the error
57594              # message.
57595              tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
57596              test -n "$tmp" && test -d "$tmp"
57597            } ||
57598            {
57599              # Use a simple mkdir command. It is guaranteed to fail if the directory
57600              # already exists.  $RANDOM is bash specific and expands to empty in shells
57601              # other than bash, ksh and zsh.  Its use does not increase security;
57602              # rather, it minimizes the probability of failure in a very cluttered /tmp
57603              # directory.
57604              tmp=/tmp/gt$$-$RANDOM
57605              (umask 077 && mkdir "$tmp")
57606            }; then
57607           mkdir "$tmp/subdir"
57608           GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
57609           export GL_SUBDIR_FOR_UNLINK
57610           if test "$cross_compiling" = yes; then :
57611  # If we don't know, obey --enable-cross-guesses.
57612              gl_cv_func_unlink_parent_fails="$gl_cross_guess_normal"
57613
57614else
57615  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57616/* end confdefs.h.  */
57617
57618                #include <stdlib.h>
57619                #if HAVE_UNISTD_H
57620                # include <unistd.h>
57621                #else /* on Windows with MSVC */
57622                # include <direct.h>
57623                # include <io.h>
57624                #endif
57625                int main ()
57626                {
57627                  int result = 0;
57628                  if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
57629                    result |= 1;
57630                  else if (unlink ("..") == 0)
57631                    result |= 2;
57632                  return result;
57633                }
57634
57635_ACEOF
57636if ac_fn_c_try_run "$LINENO"; then :
57637  gl_cv_func_unlink_parent_fails=yes
57638else
57639  gl_cv_func_unlink_parent_fails=no
57640fi
57641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
57642  conftest.$ac_objext conftest.beam conftest.$ac_ext
57643fi
57644
57645           unset GL_SUBDIR_FOR_UNLINK
57646           rm -rf "$tmp"
57647         else
57648           gl_cv_func_unlink_parent_fails="guessing no"
57649         fi
57650         ;;
57651       *)
57652         gl_cv_func_unlink_parent_fails="guessing yes"
57653         ;;
57654     esac
57655
57656fi
57657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
57658$as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
57659  case "$gl_cv_func_unlink_parent_fails" in
57660    *no)
57661      REPLACE_UNLINK=1
57662
57663$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
57664
57665      ;;
57666  esac
57667
57668  if test $REPLACE_UNLINK = 1; then
57669
57670
57671
57672
57673
57674
57675
57676
57677  gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
57678
57679  fi
57680
57681
57682
57683
57684
57685          GNULIB_UNLINK=1
57686
57687
57688
57689
57690
57691$as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
57692
57693
57694
57695
57696
57697$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
57698
57699
57700
57701
57702
57703
57704
57705
57706
57707
57708
57709
57710
57711
57712
57713
57714
57715
57716
57717
57718
57719  if test $ac_cv_have_decl_unsetenv = no; then
57720    HAVE_DECL_UNSETENV=0
57721  fi
57722  for ac_func in unsetenv
57723do :
57724  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
57725if test "x$ac_cv_func_unsetenv" = xyes; then :
57726  cat >>confdefs.h <<_ACEOF
57727#define HAVE_UNSETENV 1
57728_ACEOF
57729
57730fi
57731done
57732
57733  if test $ac_cv_func_unsetenv = no; then
57734    HAVE_UNSETENV=0
57735  else
57736    HAVE_UNSETENV=1
57737        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
57738$as_echo_n "checking for unsetenv() return type... " >&6; }
57739if ${gt_cv_func_unsetenv_ret+:} false; then :
57740  $as_echo_n "(cached) " >&6
57741else
57742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57743/* end confdefs.h.  */
57744
57745#undef _BSD
57746#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
57747#include <stdlib.h>
57748extern
57749#ifdef __cplusplus
57750"C"
57751#endif
57752int unsetenv (const char *name);
57753
57754int
57755main ()
57756{
57757
57758  ;
57759  return 0;
57760}
57761_ACEOF
57762if ac_fn_c_try_compile "$LINENO"; then :
57763  gt_cv_func_unsetenv_ret='int'
57764else
57765  gt_cv_func_unsetenv_ret='void'
57766fi
57767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57768fi
57769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
57770$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
57771    if test $gt_cv_func_unsetenv_ret = 'void'; then
57772
57773$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
57774
57775      REPLACE_UNSETENV=1
57776    fi
57777
57778                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
57779$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
57780if ${gl_cv_func_unsetenv_works+:} false; then :
57781  $as_echo_n "(cached) " >&6
57782else
57783  if test "$cross_compiling" = yes; then :
57784  case "$host_os" in
57785                 # Guess yes on glibc systems.
57786         *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
57787                 # If we don't know, obey --enable-cross-guesses.
57788         *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
57789       esac
57790
57791else
57792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57793/* end confdefs.h.  */
57794
57795       #include <stdlib.h>
57796       #include <errno.h>
57797       extern char **environ;
57798
57799int
57800main ()
57801{
57802
57803       char entry1[] = "a=1";
57804       char entry2[] = "b=2";
57805       char *env[] = { entry1, entry2, NULL };
57806       if (putenv ((char *) "a=1")) return 1;
57807       if (putenv (entry2)) return 2;
57808       entry2[0] = 'a';
57809       unsetenv ("a");
57810       if (getenv ("a")) return 3;
57811       if (!unsetenv ("") || errno != EINVAL) return 4;
57812       entry2[0] = 'b';
57813       environ = env;
57814       if (!getenv ("a")) return 5;
57815       entry2[0] = 'a';
57816       unsetenv ("a");
57817       if (getenv ("a")) return 6;
57818
57819  ;
57820  return 0;
57821}
57822_ACEOF
57823if ac_fn_c_try_run "$LINENO"; then :
57824  gl_cv_func_unsetenv_works=yes
57825else
57826  gl_cv_func_unsetenv_works=no
57827fi
57828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
57829  conftest.$ac_objext conftest.beam conftest.$ac_ext
57830fi
57831
57832fi
57833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
57834$as_echo "$gl_cv_func_unsetenv_works" >&6; }
57835    case "$gl_cv_func_unsetenv_works" in
57836      *yes) ;;
57837      *)
57838        REPLACE_UNSETENV=1
57839        ;;
57840    esac
57841  fi
57842
57843  if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
57844
57845
57846
57847
57848
57849
57850
57851
57852  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
57853
57854
57855
57856
57857
57858  fi
57859
57860
57861
57862
57863
57864          GNULIB_UNSETENV=1
57865
57866
57867
57868
57869
57870$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
57871
57872
57873
57874
57875
57876
57877
57878  if test $ac_cv_func_utime = no; then
57879    HAVE_UTIME=0
57880  else
57881    case "$host_os" in
57882      mingw*)
57883                        REPLACE_UTIME=1
57884        ;;
57885    esac
57886  fi
57887
57888  if test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1; then
57889
57890
57891
57892
57893
57894
57895
57896
57897  gl_LIBOBJS="$gl_LIBOBJS utime.$ac_objext"
57898
57899    :
57900  fi
57901
57902
57903
57904
57905
57906          GNULIB_UTIME=1
57907
57908
57909
57910
57911
57912$as_echo "#define GNULIB_TEST_UTIME 1" >>confdefs.h
57913
57914
57915
57916
57917
57918
57919
57920
57921
57922
57923
57924
57925
57926
57927
57928
57929
57930     if test $gl_cv_have_include_next = yes; then
57931       gl_cv_next_utime_h='<'utime.h'>'
57932     else
57933       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <utime.h>" >&5
57934$as_echo_n "checking absolute name of <utime.h>... " >&6; }
57935if ${gl_cv_next_utime_h+:} false; then :
57936  $as_echo_n "(cached) " >&6
57937else
57938
57939             if test $ac_cv_header_utime_h = yes; then
57940
57941
57942
57943
57944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57945/* end confdefs.h.  */
57946#include <utime.h>
57947_ACEOF
57948                case "$host_os" in
57949    aix*) gl_absname_cpp="$ac_cpp -C" ;;
57950    *)    gl_absname_cpp="$ac_cpp" ;;
57951  esac
57952
57953  case "$host_os" in
57954    mingw*)
57955                                          gl_dirsep_regex='[/\\]'
57956      ;;
57957    *)
57958      gl_dirsep_regex='\/'
57959      ;;
57960  esac
57961      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
57962  gl_header_literal_regex=`echo 'utime.h' \
57963                           | sed -e "$gl_make_literal_regex_sed"`
57964  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
57965      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
57966      s|^/[^/]|//&|
57967      p
57968      q
57969    }'
57970
57971        gl_cv_absolute_utime_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
57972  sed -n "$gl_absolute_header_sed"`
57973
57974           gl_header=$gl_cv_absolute_utime_h
57975           gl_cv_next_utime_h='"'$gl_header'"'
57976          else
57977               gl_cv_next_utime_h='<'utime.h'>'
57978             fi
57979
57980
57981fi
57982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_utime_h" >&5
57983$as_echo "$gl_cv_next_utime_h" >&6; }
57984     fi
57985     NEXT_UTIME_H=$gl_cv_next_utime_h
57986
57987     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
57988       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
57989       gl_next_as_first_directive='<'utime.h'>'
57990     else
57991       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
57992       gl_next_as_first_directive=$gl_cv_next_utime_h
57993     fi
57994     NEXT_AS_FIRST_DIRECTIVE_UTIME_H=$gl_next_as_first_directive
57995
57996
57997
57998
57999
58000  if test $ac_cv_header_utime_h = yes; then
58001    HAVE_UTIME_H=1
58002  else
58003    HAVE_UTIME_H=0
58004  fi
58005
58006
58007  UTIME_H=''
58008     if test "$CXX" != no; then
58009              UTIME_H=utime.h
58010     else
58011       if test $ac_cv_header_utime_h != yes; then
58012                  UTIME_H=utime.h
58013       else
58014         case "$host_os" in
58015           mingw*)              UTIME_H=utime.h
58016             ;;
58017         esac
58018       fi
58019     fi
58020
58021
58022   if test -n "$UTIME_H"; then
58023  GL_GENERATE_UTIME_H_TRUE=
58024  GL_GENERATE_UTIME_H_FALSE='#'
58025else
58026  GL_GENERATE_UTIME_H_TRUE='#'
58027  GL_GENERATE_UTIME_H_FALSE=
58028fi
58029
58030
58031
58032
58033
58034
58035
58036
58037
58038
58039
58040  if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
58041                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
58042$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
58043if ${gl_cv_func_futimesat_works+:} false; then :
58044  $as_echo_n "(cached) " >&6
58045else
58046  touch conftest.file
58047       if test "$cross_compiling" = yes; then :
58048  case "$host_os" in
58049                            # Guess yes on Linux systems.
58050           linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;;
58051                            # Guess yes on glibc systems.
58052           *-gnu*)          gl_cv_func_futimesat_works="guessing yes" ;;
58053                            # If we don't know, obey --enable-cross-guesses.
58054           *)               gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;;
58055         esac
58056
58057else
58058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58059/* end confdefs.h.  */
58060
58061#include <stddef.h>
58062#include <sys/times.h>
58063#include <fcntl.h>
58064
58065int
58066main ()
58067{
58068    int fd = open ("conftest.file", O_RDWR);
58069          if (fd < 0) return 1;
58070          if (futimesat (fd, NULL, NULL)) return 2;
58071
58072  ;
58073  return 0;
58074}
58075_ACEOF
58076if ac_fn_c_try_run "$LINENO"; then :
58077  gl_cv_func_futimesat_works=yes
58078else
58079  gl_cv_func_futimesat_works=no
58080fi
58081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
58082  conftest.$ac_objext conftest.beam conftest.$ac_ext
58083fi
58084
58085      rm -f conftest.file
58086fi
58087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
58088$as_echo "$gl_cv_func_futimesat_works" >&6; }
58089    case "$gl_cv_func_futimesat_works" in
58090      *yes) ;;
58091      *)
58092
58093$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
58094
58095        ;;
58096    esac
58097  fi
58098
58099
58100
58101
58102  if test $ac_cv_func_vasnprintf = no; then
58103
58104
58105
58106
58107
58108
58109
58110
58111
58112
58113  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
58114
58115
58116
58117
58118
58119
58120
58121
58122
58123  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
58124
58125
58126
58127
58128
58129
58130
58131
58132
58133  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
58134
58135
58136
58137
58138
58139
58140
58141
58142
58143  gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
58144
58145  if test $ac_cv_func_vasnprintf = yes; then
58146
58147$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
58148
58149  fi
58150
58151
58152
58153
58154
58155
58156
58157
58158
58159  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
58160if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
58161
58162else
58163
58164$as_echo "#define ptrdiff_t long" >>confdefs.h
58165
58166
58167fi
58168
58169
58170
58171
58172
58173
58174
58175  fi
58176
58177
58178  for ac_func in vasprintf
58179do :
58180  ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
58181if test "x$ac_cv_func_vasprintf" = xyes; then :
58182  cat >>confdefs.h <<_ACEOF
58183#define HAVE_VASPRINTF 1
58184_ACEOF
58185
58186fi
58187done
58188
58189  if test $ac_cv_func_vasprintf = no; then
58190
58191
58192
58193
58194
58195
58196
58197
58198
58199  gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
58200
58201
58202
58203
58204
58205
58206
58207
58208
58209  gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
58210
58211
58212  if test $ac_cv_func_vasprintf = yes; then
58213    REPLACE_VASPRINTF=1
58214  else
58215    HAVE_VASPRINTF=0
58216  fi
58217
58218
58219
58220
58221
58222
58223
58224
58225  fi
58226
58227
58228
58229
58230
58231
58232          GNULIB_VASPRINTF=1
58233
58234
58235
58236
58237
58238$as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
58239
58240
58241
58242
58243
58244  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
58245
58246
58247
58248  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
58249
58250
58251
58252  gl_cv_func_vsnprintf_usable=no
58253  for ac_func in vsnprintf
58254do :
58255  ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
58256if test "x$ac_cv_func_vsnprintf" = xyes; then :
58257  cat >>confdefs.h <<_ACEOF
58258#define HAVE_VSNPRINTF 1
58259_ACEOF
58260
58261fi
58262done
58263
58264  if test $ac_cv_func_vsnprintf = yes; then
58265
58266
58267
58268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
58269$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
58270if ${gl_cv_func_snprintf_size1+:} false; then :
58271  $as_echo_n "(cached) " >&6
58272else
58273
58274      if test "$cross_compiling" = yes; then :
58275  case "$host_os" in
58276                            # Guess yes on Android.
58277           linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
58278                            # Guess yes on native Windows.
58279           mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
58280           *)               gl_cv_func_snprintf_size1="guessing yes" ;;
58281         esac
58282
58283else
58284  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58285/* end confdefs.h.  */
58286
58287#include <stdio.h>
58288#if HAVE_SNPRINTF
58289# define my_snprintf snprintf
58290#else
58291# include <stdarg.h>
58292static int my_snprintf (char *buf, int size, const char *format, ...)
58293{
58294  va_list args;
58295  int ret;
58296  va_start (args, format);
58297  ret = vsnprintf (buf, size, format, args);
58298  va_end (args);
58299  return ret;
58300}
58301#endif
58302int main()
58303{
58304  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
58305  my_snprintf (buf, 1, "%d", 12345);
58306  return buf[1] != 'E';
58307}
58308_ACEOF
58309if ac_fn_c_try_run "$LINENO"; then :
58310  gl_cv_func_snprintf_size1=yes
58311else
58312  gl_cv_func_snprintf_size1=no
58313fi
58314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
58315  conftest.$ac_objext conftest.beam conftest.$ac_ext
58316fi
58317
58318
58319fi
58320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
58321$as_echo "$gl_cv_func_snprintf_size1" >&6; }
58322
58323    case "$gl_cv_func_snprintf_size1" in
58324      *yes)
58325
58326        case "$gl_cv_func_snprintf_retval_c99" in
58327          *yes)
58328
58329
58330     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
58331$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
58332if ${gl_cv_func_printf_positions+:} false; then :
58333  $as_echo_n "(cached) " >&6
58334else
58335
58336      if test "$cross_compiling" = yes; then :
58337
58338         case "$host_os" in
58339           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
58340                            gl_cv_func_printf_positions="guessing no";;
58341           beos*)           gl_cv_func_printf_positions="guessing no";;
58342                            # Guess yes on Android.
58343           linux*-android*) gl_cv_func_printf_positions="guessing yes";;
58344                            # Guess no on native Windows.
58345           mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
58346           *)               gl_cv_func_printf_positions="guessing yes";;
58347         esac
58348
58349else
58350  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58351/* end confdefs.h.  */
58352
58353#include <stdio.h>
58354#include <string.h>
58355/* The string "%2$d %1$d", with dollar characters protected from the shell's
58356   dollar expansion (possibly an autoconf bug).  */
58357static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
58358static char buf[100];
58359int main ()
58360{
58361  sprintf (buf, format, 33, 55);
58362  return (strcmp (buf, "55 33") != 0);
58363}
58364_ACEOF
58365if ac_fn_c_try_run "$LINENO"; then :
58366  gl_cv_func_printf_positions=yes
58367else
58368  gl_cv_func_printf_positions=no
58369fi
58370rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
58371  conftest.$ac_objext conftest.beam conftest.$ac_ext
58372fi
58373
58374
58375fi
58376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
58377$as_echo "$gl_cv_func_printf_positions" >&6; }
58378
58379            case "$gl_cv_func_printf_positions" in
58380              *yes)
58381                gl_cv_func_vsnprintf_usable=yes
58382                ;;
58383            esac
58384            ;;
58385        esac
58386        ;;
58387    esac
58388  fi
58389  if test $gl_cv_func_vsnprintf_usable = no; then
58390
58391
58392
58393
58394
58395
58396
58397
58398
58399
58400  gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
58401
58402  if test $ac_cv_func_vsnprintf = yes; then
58403    REPLACE_VSNPRINTF=1
58404  else
58405
58406    if test $ac_cv_have_decl_vsnprintf = yes; then
58407                        REPLACE_VSNPRINTF=1
58408    fi
58409  fi
58410  :
58411
58412  fi
58413
58414  if test $ac_cv_have_decl_vsnprintf = no; then
58415    HAVE_DECL_VSNPRINTF=0
58416  fi
58417
58418
58419
58420
58421
58422
58423          GNULIB_VSNPRINTF=1
58424
58425
58426
58427
58428
58429$as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
58430
58431
58432
58433
58434
58435  for ac_func in waitid
58436do :
58437  ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
58438if test "x$ac_cv_func_waitid" = xyes; then :
58439  cat >>confdefs.h <<_ACEOF
58440#define HAVE_WAITID 1
58441_ACEOF
58442
58443fi
58444done
58445
58446
58447
58448
58449  HAVE_WAITPID=1
58450  case $host_os in
58451    mingw*) HAVE_WAITPID=0 ;;
58452  esac
58453
58454  if test $HAVE_WAITPID = 0; then
58455
58456
58457
58458
58459
58460
58461
58462
58463  gl_LIBOBJS="$gl_LIBOBJS waitpid.$ac_objext"
58464
58465  fi
58466
58467
58468
58469
58470
58471          GNULIB_WAITPID=1
58472
58473
58474
58475
58476
58477$as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
58478
58479
58480
58481
58482
58483
58484
58485
58486
58487
58488
58489
58490
58491
58492
58493     if test $gl_cv_have_include_next = yes; then
58494       gl_cv_next_wchar_h='<'wchar.h'>'
58495     else
58496       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
58497$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
58498if ${gl_cv_next_wchar_h+:} false; then :
58499  $as_echo_n "(cached) " >&6
58500else
58501
58502             if test $ac_cv_header_wchar_h = yes; then
58503
58504
58505
58506
58507  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58508/* end confdefs.h.  */
58509#include <wchar.h>
58510_ACEOF
58511                case "$host_os" in
58512    aix*) gl_absname_cpp="$ac_cpp -C" ;;
58513    *)    gl_absname_cpp="$ac_cpp" ;;
58514  esac
58515
58516  case "$host_os" in
58517    mingw*)
58518                                          gl_dirsep_regex='[/\\]'
58519      ;;
58520    *)
58521      gl_dirsep_regex='\/'
58522      ;;
58523  esac
58524      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
58525  gl_header_literal_regex=`echo 'wchar.h' \
58526                           | sed -e "$gl_make_literal_regex_sed"`
58527  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
58528      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
58529      s|^/[^/]|//&|
58530      p
58531      q
58532    }'
58533
58534        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
58535  sed -n "$gl_absolute_header_sed"`
58536
58537           gl_header=$gl_cv_absolute_wchar_h
58538           gl_cv_next_wchar_h='"'$gl_header'"'
58539          else
58540               gl_cv_next_wchar_h='<'wchar.h'>'
58541             fi
58542
58543
58544fi
58545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
58546$as_echo "$gl_cv_next_wchar_h" >&6; }
58547     fi
58548     NEXT_WCHAR_H=$gl_cv_next_wchar_h
58549
58550     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
58551       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
58552       gl_next_as_first_directive='<'wchar.h'>'
58553     else
58554       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
58555       gl_next_as_first_directive=$gl_cv_next_wchar_h
58556     fi
58557     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
58558
58559
58560
58561
58562  if test $ac_cv_header_wchar_h = yes; then
58563    HAVE_WCHAR_H=1
58564  else
58565    HAVE_WCHAR_H=0
58566  fi
58567
58568
58569
58570
58571
58572  if test $gt_cv_c_wint_t = yes; then
58573    HAVE_WINT_T=1
58574  else
58575    HAVE_WINT_T=0
58576  fi
58577
58578
58579
58580
58581
58582
58583
58584
58585
58586
58587
58588
58589
58590
58591
58592  if test $ac_cv_func_iswcntrl = yes; then
58593    HAVE_ISWCNTRL=1
58594  else
58595    HAVE_ISWCNTRL=0
58596  fi
58597
58598
58599
58600  if test $gt_cv_c_wint_t = yes; then
58601    HAVE_WINT_T=1
58602  else
58603    HAVE_WINT_T=0
58604  fi
58605
58606
58607
58608
58609
58610
58611
58612
58613
58614
58615
58616
58617
58618     if test $gl_cv_have_include_next = yes; then
58619       gl_cv_next_wctype_h='<'wctype.h'>'
58620     else
58621       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
58622$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
58623if ${gl_cv_next_wctype_h+:} false; then :
58624  $as_echo_n "(cached) " >&6
58625else
58626
58627             if test $ac_cv_header_wctype_h = yes; then
58628
58629
58630
58631
58632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58633/* end confdefs.h.  */
58634#include <wctype.h>
58635_ACEOF
58636                case "$host_os" in
58637    aix*) gl_absname_cpp="$ac_cpp -C" ;;
58638    *)    gl_absname_cpp="$ac_cpp" ;;
58639  esac
58640
58641  case "$host_os" in
58642    mingw*)
58643                                          gl_dirsep_regex='[/\\]'
58644      ;;
58645    *)
58646      gl_dirsep_regex='\/'
58647      ;;
58648  esac
58649      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
58650  gl_header_literal_regex=`echo 'wctype.h' \
58651                           | sed -e "$gl_make_literal_regex_sed"`
58652  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
58653      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
58654      s|^/[^/]|//&|
58655      p
58656      q
58657    }'
58658
58659        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
58660  sed -n "$gl_absolute_header_sed"`
58661
58662           gl_header=$gl_cv_absolute_wctype_h
58663           gl_cv_next_wctype_h='"'$gl_header'"'
58664          else
58665               gl_cv_next_wctype_h='<'wctype.h'>'
58666             fi
58667
58668
58669fi
58670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
58671$as_echo "$gl_cv_next_wctype_h" >&6; }
58672     fi
58673     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
58674
58675     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
58676       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
58677       gl_next_as_first_directive='<'wctype.h'>'
58678     else
58679       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
58680       gl_next_as_first_directive=$gl_cv_next_wctype_h
58681     fi
58682     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
58683
58684
58685
58686
58687  if test $ac_cv_header_wctype_h = yes; then
58688    if test $ac_cv_func_iswcntrl = yes; then
58689                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
58690$as_echo_n "checking whether iswcntrl works... " >&6; }
58691if ${gl_cv_func_iswcntrl_works+:} false; then :
58692  $as_echo_n "(cached) " >&6
58693else
58694
58695          if test "$cross_compiling" = yes; then :
58696               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58697/* end confdefs.h.  */
58698#include <stdlib.h>
58699                          #if __GNU_LIBRARY__ == 1
58700                          Linux libc5 i18n is broken.
58701                          #endif
58702int
58703main ()
58704{
58705
58706  ;
58707  return 0;
58708}
58709_ACEOF
58710if ac_fn_c_try_compile "$LINENO"; then :
58711  gl_cv_func_iswcntrl_works="guessing yes"
58712else
58713  gl_cv_func_iswcntrl_works="guessing no"
58714fi
58715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58716
58717else
58718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58719/* end confdefs.h.  */
58720
58721               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
58722                  included before <wchar.h>.
58723                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
58724                  must be included before <wchar.h>.  */
58725               #include <stddef.h>
58726               #include <stdio.h>
58727               #include <time.h>
58728               #include <wchar.h>
58729               #include <wctype.h>
58730               int main () { return iswprint ('x') == 0; }
58731
58732_ACEOF
58733if ac_fn_c_try_run "$LINENO"; then :
58734  gl_cv_func_iswcntrl_works=yes
58735else
58736  gl_cv_func_iswcntrl_works=no
58737fi
58738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
58739  conftest.$ac_objext conftest.beam conftest.$ac_ext
58740fi
58741
58742
58743fi
58744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
58745$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
58746    fi
58747    HAVE_WCTYPE_H=1
58748  else
58749    HAVE_WCTYPE_H=0
58750  fi
58751
58752
58753  if test $GNULIB_OVERRIDES_WINT_T = 1; then
58754    REPLACE_ISWCNTRL=1
58755  else
58756    case "$gl_cv_func_iswcntrl_works" in
58757      *yes) REPLACE_ISWCNTRL=0 ;;
58758      *)    REPLACE_ISWCNTRL=1 ;;
58759    esac
58760  fi
58761
58762
58763  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
58764        :
58765  fi
58766
58767  if test $REPLACE_ISWCNTRL = 1; then
58768    REPLACE_TOWLOWER=1
58769  else
58770    for ac_func in towlower
58771do :
58772  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
58773if test "x$ac_cv_func_towlower" = xyes; then :
58774  cat >>confdefs.h <<_ACEOF
58775#define HAVE_TOWLOWER 1
58776_ACEOF
58777
58778fi
58779done
58780
58781    if test $ac_cv_func_towlower = yes; then
58782      REPLACE_TOWLOWER=0
58783    else
58784      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
58785             included before <wchar.h>.
58786             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
58787             must be included before <wchar.h>.  */
58788          #include <stddef.h>
58789          #include <stdio.h>
58790          #include <time.h>
58791          #include <wchar.h>
58792          #if HAVE_WCTYPE_H
58793          # include <wctype.h>
58794          #endif
58795
58796"
58797if test "x$ac_cv_have_decl_towlower" = xyes; then :
58798  ac_have_decl=1
58799else
58800  ac_have_decl=0
58801fi
58802
58803cat >>confdefs.h <<_ACEOF
58804#define HAVE_DECL_TOWLOWER $ac_have_decl
58805_ACEOF
58806
58807      if test $ac_cv_have_decl_towlower = yes; then
58808                                REPLACE_TOWLOWER=1
58809      else
58810        REPLACE_TOWLOWER=0
58811      fi
58812    fi
58813  fi
58814
58815
58816  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
58817        :
58818  fi
58819
58820          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
58821$as_echo_n "checking for wctype_t... " >&6; }
58822if ${gl_cv_type_wctype_t+:} false; then :
58823  $as_echo_n "(cached) " >&6
58824else
58825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58826/* end confdefs.h.  */
58827/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
58828               included before <wchar.h>.
58829               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
58830               must be included before <wchar.h>.  */
58831            #include <stddef.h>
58832            #include <stdio.h>
58833            #include <time.h>
58834            #include <wchar.h>
58835            #if HAVE_WCTYPE_H
58836            # include <wctype.h>
58837            #endif
58838            wctype_t a;
58839
58840int
58841main ()
58842{
58843
58844  ;
58845  return 0;
58846}
58847_ACEOF
58848if ac_fn_c_try_compile "$LINENO"; then :
58849  gl_cv_type_wctype_t=yes
58850else
58851  gl_cv_type_wctype_t=no
58852fi
58853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58854
58855fi
58856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
58857$as_echo "$gl_cv_type_wctype_t" >&6; }
58858  if test $gl_cv_type_wctype_t = no; then
58859    HAVE_WCTYPE_T=0
58860  fi
58861
58862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
58863$as_echo_n "checking for wctrans_t... " >&6; }
58864if ${gl_cv_type_wctrans_t+:} false; then :
58865  $as_echo_n "(cached) " >&6
58866else
58867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58868/* end confdefs.h.  */
58869/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
58870               included before <wchar.h>.
58871               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
58872               must be included before <wchar.h>.  */
58873            #include <stddef.h>
58874            #include <stdio.h>
58875            #include <time.h>
58876            #include <wchar.h>
58877            #include <wctype.h>
58878            wctrans_t a;
58879
58880int
58881main ()
58882{
58883
58884  ;
58885  return 0;
58886}
58887_ACEOF
58888if ac_fn_c_try_compile "$LINENO"; then :
58889  gl_cv_type_wctrans_t=yes
58890else
58891  gl_cv_type_wctrans_t=no
58892fi
58893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58894
58895fi
58896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
58897$as_echo "$gl_cv_type_wctrans_t" >&6; }
58898  if test $gl_cv_type_wctrans_t = no; then
58899    HAVE_WCTRANS_T=0
58900  fi
58901
58902
58903
58904
58905
58906
58907
58908
58909
58910
58911
58912
58913
58914
58915
58916
58917  ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
58918/* AIX 3.2.5 declares wcwidth in <string.h>. */
58919#include <string.h>
58920/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
58921   <wchar.h>.
58922   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
58923   before <wchar.h>.  */
58924#include <stddef.h>
58925#include <stdio.h>
58926#include <time.h>
58927#include <wchar.h>
58928
58929"
58930if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
58931  ac_have_decl=1
58932else
58933  ac_have_decl=0
58934fi
58935
58936cat >>confdefs.h <<_ACEOF
58937#define HAVE_DECL_WCWIDTH $ac_have_decl
58938_ACEOF
58939
58940  if test $ac_cv_have_decl_wcwidth != yes; then
58941    HAVE_DECL_WCWIDTH=0
58942  fi
58943
58944  if test $ac_cv_func_wcwidth != yes; then
58945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
58946$as_echo_n "checking whether wcwidth is a macro... " >&6; }
58947if ${gl_cv_func_wcwidth_macro+:} false; then :
58948  $as_echo_n "(cached) " >&6
58949else
58950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58951/* end confdefs.h.  */
58952
58953#include <wchar.h>
58954#ifdef wcwidth
58955 wchar_header_defines_wcwidth
58956#endif
58957_ACEOF
58958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
58959  $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1; then :
58960  gl_cv_func_wcwidth_macro=yes
58961else
58962  gl_cv_func_wcwidth_macro=no
58963fi
58964rm -f conftest*
58965
58966
58967fi
58968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
58969$as_echo "$gl_cv_func_wcwidth_macro" >&6; }
58970  fi
58971
58972  if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
58973    HAVE_WCWIDTH=1
58974                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
58975$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
58976if ${gl_cv_func_wcwidth_works+:} false; then :
58977  $as_echo_n "(cached) " >&6
58978else
58979
58980        if test "$cross_compiling" = yes; then :
58981
58982           case "$host_os" in
58983                            # Guess yes on glibc systems.
58984             *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
58985                            # Guess yes on musl systems.
58986             *-musl*)       gl_cv_func_wcwidth_works="guessing yes";;
58987                            # Guess yes on AIX 7 systems.
58988             aix[7-9]*)     gl_cv_func_wcwidth_works="guessing yes";;
58989             *)             gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
58990           esac
58991
58992else
58993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58994/* end confdefs.h.  */
58995
58996#include <locale.h>
58997/* AIX 3.2.5 declares wcwidth in <string.h>. */
58998#include <string.h>
58999/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
59000   <wchar.h>.
59001   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
59002   before <wchar.h>.  */
59003#include <stddef.h>
59004#include <stdio.h>
59005#include <time.h>
59006#include <wchar.h>
59007#if !HAVE_DECL_WCWIDTH
59008extern
59009# ifdef __cplusplus
59010"C"
59011# endif
59012int wcwidth (int);
59013#endif
59014int main ()
59015{
59016  int result = 0;
59017  if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
59018    {
59019      if (wcwidth (0x0301) > 0)
59020        result |= 1;
59021      if (wcwidth (0x05B0) > 0)
59022        result |= 2;
59023      if (wcwidth (0x200B) > 0)
59024        result |= 4;
59025      if (wcwidth (0xFF1A) == 0)
59026        result |= 8;
59027      if (wcwidth (0x2202) > 1)
59028        result |= 16;
59029    }
59030  return result;
59031}
59032_ACEOF
59033if ac_fn_c_try_run "$LINENO"; then :
59034  gl_cv_func_wcwidth_works=yes
59035else
59036  gl_cv_func_wcwidth_works=no
59037fi
59038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
59039  conftest.$ac_objext conftest.beam conftest.$ac_ext
59040fi
59041
59042
59043fi
59044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
59045$as_echo "$gl_cv_func_wcwidth_works" >&6; }
59046    case "$gl_cv_func_wcwidth_works" in
59047      *yes) ;;
59048      *no) REPLACE_WCWIDTH=1 ;;
59049    esac
59050  else
59051    HAVE_WCWIDTH=0
59052  fi
59053
59054  if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
59055
59056
59057
59058
59059
59060
59061
59062
59063  gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
59064
59065
59066
59067  :
59068
59069  fi
59070
59071
59072
59073
59074
59075          GNULIB_WCWIDTH=1
59076
59077
59078
59079
59080
59081$as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
59082
59083
59084
59085
59086  case "$host_os" in
59087    mingw*)
59088
59089
59090
59091
59092
59093
59094
59095
59096  gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
59097
59098      ;;
59099  esac
59100
59101  case "$host_os" in
59102    mingw*)
59103
59104
59105
59106
59107
59108
59109
59110
59111  gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
59112
59113      ;;
59114  esac
59115
59116  case "$host_os" in
59117    mingw*)
59118
59119
59120
59121
59122
59123
59124
59125
59126  gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
59127
59128      ;;
59129  esac
59130
59131  case "$host_os" in
59132    mingw*)
59133
59134
59135
59136
59137
59138
59139
59140
59141  gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
59142
59143      ;;
59144  esac
59145
59146  case "$host_os" in
59147    mingw*)
59148
59149
59150
59151
59152
59153
59154
59155
59156  gl_LIBOBJS="$gl_LIBOBJS windows-spin.$ac_objext"
59157
59158      ;;
59159  esac
59160
59161  case "$host_os" in
59162    mingw*)
59163
59164
59165
59166
59167
59168
59169
59170
59171  gl_LIBOBJS="$gl_LIBOBJS windows-tls.$ac_objext"
59172
59173      ;;
59174  esac
59175
59176
59177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
59178$as_echo_n "checking for wmemchr... " >&6; }
59179if ${gl_cv_func_wmemchr+:} false; then :
59180  $as_echo_n "(cached) " >&6
59181else
59182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59183/* end confdefs.h.  */
59184
59185/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
59186   <wchar.h>.
59187   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
59188   before <wchar.h>.  */
59189#include <stddef.h>
59190#include <stdio.h>
59191#include <time.h>
59192#include <wchar.h>
59193
59194int
59195main ()
59196{
59197return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
59198  ;
59199  return 0;
59200}
59201
59202_ACEOF
59203if ac_fn_c_try_link "$LINENO"; then :
59204  gl_cv_func_wmemchr=yes
59205else
59206  gl_cv_func_wmemchr=no
59207fi
59208rm -f core conftest.err conftest.$ac_objext \
59209    conftest$ac_exeext conftest.$ac_ext
59210
59211fi
59212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
59213$as_echo "$gl_cv_func_wmemchr" >&6; }
59214  if test $gl_cv_func_wmemchr = no; then
59215    HAVE_WMEMCHR=0
59216  fi
59217
59218  if test $HAVE_WMEMCHR = 0; then
59219
59220
59221
59222
59223
59224
59225
59226
59227  gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
59228
59229  fi
59230
59231
59232
59233
59234
59235          GNULIB_WMEMCHR=1
59236
59237
59238
59239
59240
59241$as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
59242
59243
59244
59245
59246
59247
59248
59249
59250
59251
59252
59253  if test $ac_cv_func_wmempcpy = no; then
59254    HAVE_WMEMPCPY=0
59255  fi
59256
59257  if test $HAVE_WMEMPCPY = 0; then
59258
59259
59260
59261
59262
59263
59264
59265
59266  gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
59267
59268  fi
59269
59270
59271
59272
59273
59274          GNULIB_WMEMPCPY=1
59275
59276
59277
59278
59279
59280$as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
59281
59282
59283
59284
59285
59286
59287
59288    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
59289      REPLACE_WRITE=1
59290    fi
59291
59292
59293
59294
59295
59296    if test $gl_cv_header_signal_h_SIGPIPE != yes; then
59297      REPLACE_WRITE=1
59298    fi
59299
59300
59301
59302  if test $REPLACE_WRITE = 1; then
59303
59304
59305
59306
59307
59308
59309
59310
59311  gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
59312
59313    :
59314  fi
59315
59316
59317
59318
59319
59320          GNULIB_WRITE=1
59321
59322
59323
59324
59325
59326$as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
59327
59328
59329
59330
59331
59332
59333  for ac_header in stdint.h
59334do :
59335  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
59336if test "x$ac_cv_header_stdint_h" = xyes; then :
59337  cat >>confdefs.h <<_ACEOF
59338#define HAVE_STDINT_H 1
59339_ACEOF
59340
59341fi
59342
59343done
59344
59345
59346  :
59347
59348
59349  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
59350
59351  # End of code from modules
59352
59353
59354
59355
59356
59357
59358
59359
59360
59361  gltests_libdeps=
59362  gltests_ltlibdeps=
59363
59364
59365
59366
59367
59368
59369
59370
59371
59372
59373  gl_source_base='gnulib-tests'
59374  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
59375
59376  gl_module_indicator_condition=$gltests_WITNESS
59377
59378
59379  if test "$ac_cv_header_winsock2_h" = yes; then
59380
59381
59382
59383
59384
59385
59386
59387
59388  gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
59389
59390  fi
59391
59392
59393
59394
59395
59396    if test "$GNULIB_ACCEPT" != 1; then
59397        if test "$GNULIB_ACCEPT" = 0; then
59398      GNULIB_ACCEPT=$gl_module_indicator_condition
59399    else
59400      GNULIB_ACCEPT="($GNULIB_ACCEPT || $gl_module_indicator_condition)"
59401    fi
59402  fi
59403
59404
59405
59406
59407
59408$as_echo "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
59409
59410
59411
59412
59413
59414
59415
59416
59417  if test $ac_cv_header_arpa_inet_h = yes; then
59418    HAVE_ARPA_INET_H=1
59419  else
59420    HAVE_ARPA_INET_H=0
59421  fi
59422
59423
59424
59425
59426
59427
59428
59429
59430
59431
59432     if test $gl_cv_have_include_next = yes; then
59433       gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
59434     else
59435       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
59436$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
59437if ${gl_cv_next_arpa_inet_h+:} false; then :
59438  $as_echo_n "(cached) " >&6
59439else
59440
59441             if test $ac_cv_header_arpa_inet_h = yes; then
59442
59443
59444
59445
59446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59447/* end confdefs.h.  */
59448#include <arpa/inet.h>
59449_ACEOF
59450                case "$host_os" in
59451    aix*) gl_absname_cpp="$ac_cpp -C" ;;
59452    *)    gl_absname_cpp="$ac_cpp" ;;
59453  esac
59454
59455  case "$host_os" in
59456    mingw*)
59457                                          gl_dirsep_regex='[/\\]'
59458      ;;
59459    *)
59460      gl_dirsep_regex='\/'
59461      ;;
59462  esac
59463      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
59464  gl_header_literal_regex=`echo 'arpa/inet.h' \
59465                           | sed -e "$gl_make_literal_regex_sed"`
59466  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
59467      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
59468      s|^/[^/]|//&|
59469      p
59470      q
59471    }'
59472
59473        gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
59474  sed -n "$gl_absolute_header_sed"`
59475
59476           gl_header=$gl_cv_absolute_arpa_inet_h
59477           gl_cv_next_arpa_inet_h='"'$gl_header'"'
59478          else
59479               gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
59480             fi
59481
59482
59483fi
59484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
59485$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
59486     fi
59487     NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
59488
59489     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
59490       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
59491       gl_next_as_first_directive='<'arpa/inet.h'>'
59492     else
59493       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
59494       gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
59495     fi
59496     NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
59497
59498
59499
59500
59501
59502
59503
59504
59505
59506  if test $ac_cv_header_sys_socket_h = yes; then
59507    HAVE_WS2TCPIP_H=0
59508  else
59509    if test $ac_cv_header_ws2tcpip_h = yes; then
59510      HAVE_WS2TCPIP_H=1
59511    else
59512      HAVE_WS2TCPIP_H=0
59513    fi
59514  fi
59515
59516
59517
59518
59519
59520
59521
59522
59523
59524
59525
59526
59527  if test "$ac_cv_header_winsock2_h" = yes; then
59528
59529
59530
59531
59532
59533
59534
59535
59536  gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
59537
59538  fi
59539
59540
59541
59542
59543
59544    if test "$GNULIB_BIND" != 1; then
59545        if test "$GNULIB_BIND" = 0; then
59546      GNULIB_BIND=$gl_module_indicator_condition
59547    else
59548      GNULIB_BIND="($GNULIB_BIND || $gl_module_indicator_condition)"
59549    fi
59550  fi
59551
59552
59553
59554
59555
59556$as_echo "#define GNULIB_TEST_BIND 1" >>confdefs.h
59557
59558
59559
59560
59561
59562
59563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
59564$as_echo_n "checking for a traditional french locale... " >&6; }
59565if ${gt_cv_locale_fr+:} false; then :
59566  $as_echo_n "(cached) " >&6
59567else
59568
59569    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59570/* end confdefs.h.  */
59571
59572#include <locale.h>
59573#include <time.h>
59574#if HAVE_LANGINFO_CODESET
59575# include <langinfo.h>
59576#endif
59577#include <stdlib.h>
59578#include <string.h>
59579struct tm t;
59580char buf[16];
59581int main () {
59582  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
59583     imitates locale dependent behaviour by looking at the environment
59584     variables, and all locales use the UTF-8 encoding.  */
59585#if defined __BEOS__ || defined __HAIKU__
59586  return 1;
59587#else
59588  /* Check whether the given locale name is recognized by the system.  */
59589# if defined _WIN32 && !defined __CYGWIN__
59590  /* On native Windows, setlocale(category, "") looks at the system settings,
59591     not at the environment variables.  Also, when an encoding suffix such
59592     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
59593     category of the locale to "C".  */
59594  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
59595      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
59596    return 1;
59597# else
59598  if (setlocale (LC_ALL, "") == NULL) return 1;
59599# endif
59600  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
59601     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
59602     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
59603     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
59604     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
59605     some unit tests fail.
59606     On MirBSD 10, when an unsupported locale is specified, setlocale()
59607     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
59608# if HAVE_LANGINFO_CODESET
59609  {
59610    const char *cs = nl_langinfo (CODESET);
59611    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
59612        || strcmp (cs, "UTF-8") == 0)
59613      return 1;
59614  }
59615# endif
59616# ifdef __CYGWIN__
59617  /* On Cygwin, avoid locale names without encoding suffix, because the
59618     locale_charset() function relies on the encoding suffix.  Note that
59619     LC_ALL is set on the command line.  */
59620  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
59621# endif
59622  /* Check whether in the abbreviation of the second month, the second
59623     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
59624     one byte long. This excludes the UTF-8 encoding.  */
59625  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
59626  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
59627# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
59628  /* Check whether the decimal separator is a comma.
59629     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
59630     are nl_langinfo(RADIXCHAR) are both ".".  */
59631  if (localeconv () ->decimal_point[0] != ',') return 1;
59632# endif
59633  return 0;
59634#endif
59635}
59636
59637_ACEOF
59638    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
59639  (eval $ac_link) 2>&5
59640  ac_status=$?
59641  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59642  test $ac_status = 0; } && test -s conftest$ac_exeext; then
59643      case "$host_os" in
59644        # Handle native Windows specially, because there setlocale() interprets
59645        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
59646        # "fr" or "fra" as "French" or "French_France.1252",
59647        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
59648        # "ja" as "Japanese" or "Japanese_Japan.932",
59649        # and similar.
59650        mingw*)
59651          # Test for the native Windows locale name.
59652          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59653            gt_cv_locale_fr=French_France.1252
59654          else
59655            # None found.
59656            gt_cv_locale_fr=none
59657          fi
59658          ;;
59659        *)
59660          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
59661          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
59662          # configure script would override the LC_ALL setting. Likewise for
59663          # LC_CTYPE, which is also set at the beginning of the configure script.
59664          # Test for the usual locale name.
59665          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59666            gt_cv_locale_fr=fr_FR
59667          else
59668            # Test for the locale name with explicit encoding suffix.
59669            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59670              gt_cv_locale_fr=fr_FR.ISO-8859-1
59671            else
59672              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
59673              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59674                gt_cv_locale_fr=fr_FR.ISO8859-1
59675              else
59676                # Test for the HP-UX locale name.
59677                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59678                  gt_cv_locale_fr=fr_FR.iso88591
59679                else
59680                  # Test for the Solaris 7 locale name.
59681                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59682                    gt_cv_locale_fr=fr
59683                  else
59684                    # None found.
59685                    gt_cv_locale_fr=none
59686                  fi
59687                fi
59688              fi
59689            fi
59690          fi
59691          ;;
59692      esac
59693    fi
59694    rm -fr conftest*
59695
59696fi
59697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
59698$as_echo "$gt_cv_locale_fr" >&6; }
59699  LOCALE_FR=$gt_cv_locale_fr
59700
59701
59702
59703
59704  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
59705$as_echo_n "checking for a french Unicode locale... " >&6; }
59706if ${gt_cv_locale_fr_utf8+:} false; then :
59707  $as_echo_n "(cached) " >&6
59708else
59709
59710    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59711/* end confdefs.h.  */
59712
59713#include <locale.h>
59714#include <time.h>
59715#if HAVE_LANGINFO_CODESET
59716# include <langinfo.h>
59717#endif
59718#include <stdlib.h>
59719#include <string.h>
59720struct tm t;
59721char buf[16];
59722int main () {
59723  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
59724     imitates locale dependent behaviour by looking at the environment
59725     variables, and all locales use the UTF-8 encoding.  */
59726#if !(defined __BEOS__ || defined __HAIKU__)
59727  /* Check whether the given locale name is recognized by the system.  */
59728# if defined _WIN32 && !defined __CYGWIN__
59729  /* On native Windows, setlocale(category, "") looks at the system settings,
59730     not at the environment variables.  Also, when an encoding suffix such
59731     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
59732     category of the locale to "C".  */
59733  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
59734      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
59735    return 1;
59736# else
59737  if (setlocale (LC_ALL, "") == NULL) return 1;
59738# endif
59739  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
59740     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
59741     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
59742     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
59743     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
59744     some unit tests fail.  */
59745# if HAVE_LANGINFO_CODESET
59746  {
59747    const char *cs = nl_langinfo (CODESET);
59748    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
59749      return 1;
59750  }
59751# endif
59752# ifdef __CYGWIN__
59753  /* On Cygwin, avoid locale names without encoding suffix, because the
59754     locale_charset() function relies on the encoding suffix.  Note that
59755     LC_ALL is set on the command line.  */
59756  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
59757# endif
59758  /* Check whether in the abbreviation of the second month, the second
59759     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
59760     two bytes long, with UTF-8 encoding.  */
59761  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
59762  if (strftime (buf, sizeof (buf), "%b", &t) < 4
59763      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
59764    return 1;
59765#endif
59766#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
59767  /* Check whether the decimal separator is a comma.
59768     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
59769     are nl_langinfo(RADIXCHAR) are both ".".  */
59770  if (localeconv () ->decimal_point[0] != ',') return 1;
59771#endif
59772  return 0;
59773}
59774
59775_ACEOF
59776    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
59777  (eval $ac_link) 2>&5
59778  ac_status=$?
59779  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59780  test $ac_status = 0; } && test -s conftest$ac_exeext; then
59781      case "$host_os" in
59782        # Handle native Windows specially, because there setlocale() interprets
59783        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
59784        # "fr" or "fra" as "French" or "French_France.1252",
59785        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
59786        # "ja" as "Japanese" or "Japanese_Japan.932",
59787        # and similar.
59788        mingw*)
59789          # Test for the hypothetical native Windows locale name.
59790          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59791            gt_cv_locale_fr_utf8=French_France.65001
59792          else
59793            # None found.
59794            gt_cv_locale_fr_utf8=none
59795          fi
59796          ;;
59797        *)
59798          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
59799          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
59800          # configure script would override the LC_ALL setting. Likewise for
59801          # LC_CTYPE, which is also set at the beginning of the configure script.
59802          # Test for the usual locale name.
59803          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59804            gt_cv_locale_fr_utf8=fr_FR
59805          else
59806            # Test for the locale name with explicit encoding suffix.
59807            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59808              gt_cv_locale_fr_utf8=fr_FR.UTF-8
59809            else
59810              # Test for the Solaris 7 locale name.
59811              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59812                gt_cv_locale_fr_utf8=fr.UTF-8
59813              else
59814                # None found.
59815                gt_cv_locale_fr_utf8=none
59816              fi
59817            fi
59818          fi
59819          ;;
59820      esac
59821    fi
59822    rm -fr conftest*
59823
59824fi
59825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
59826$as_echo "$gt_cv_locale_fr_utf8" >&6; }
59827  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
59828
59829
59830
59831
59832
59833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
59834$as_echo_n "checking for a traditional french locale... " >&6; }
59835if ${gt_cv_locale_fr+:} false; then :
59836  $as_echo_n "(cached) " >&6
59837else
59838
59839    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59840/* end confdefs.h.  */
59841
59842#include <locale.h>
59843#include <time.h>
59844#if HAVE_LANGINFO_CODESET
59845# include <langinfo.h>
59846#endif
59847#include <stdlib.h>
59848#include <string.h>
59849struct tm t;
59850char buf[16];
59851int main () {
59852  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
59853     imitates locale dependent behaviour by looking at the environment
59854     variables, and all locales use the UTF-8 encoding.  */
59855#if defined __BEOS__ || defined __HAIKU__
59856  return 1;
59857#else
59858  /* Check whether the given locale name is recognized by the system.  */
59859# if defined _WIN32 && !defined __CYGWIN__
59860  /* On native Windows, setlocale(category, "") looks at the system settings,
59861     not at the environment variables.  Also, when an encoding suffix such
59862     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
59863     category of the locale to "C".  */
59864  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
59865      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
59866    return 1;
59867# else
59868  if (setlocale (LC_ALL, "") == NULL) return 1;
59869# endif
59870  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
59871     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
59872     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
59873     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
59874     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
59875     some unit tests fail.
59876     On MirBSD 10, when an unsupported locale is specified, setlocale()
59877     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
59878# if HAVE_LANGINFO_CODESET
59879  {
59880    const char *cs = nl_langinfo (CODESET);
59881    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
59882        || strcmp (cs, "UTF-8") == 0)
59883      return 1;
59884  }
59885# endif
59886# ifdef __CYGWIN__
59887  /* On Cygwin, avoid locale names without encoding suffix, because the
59888     locale_charset() function relies on the encoding suffix.  Note that
59889     LC_ALL is set on the command line.  */
59890  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
59891# endif
59892  /* Check whether in the abbreviation of the second month, the second
59893     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
59894     one byte long. This excludes the UTF-8 encoding.  */
59895  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
59896  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
59897# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
59898  /* Check whether the decimal separator is a comma.
59899     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
59900     are nl_langinfo(RADIXCHAR) are both ".".  */
59901  if (localeconv () ->decimal_point[0] != ',') return 1;
59902# endif
59903  return 0;
59904#endif
59905}
59906
59907_ACEOF
59908    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
59909  (eval $ac_link) 2>&5
59910  ac_status=$?
59911  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59912  test $ac_status = 0; } && test -s conftest$ac_exeext; then
59913      case "$host_os" in
59914        # Handle native Windows specially, because there setlocale() interprets
59915        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
59916        # "fr" or "fra" as "French" or "French_France.1252",
59917        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
59918        # "ja" as "Japanese" or "Japanese_Japan.932",
59919        # and similar.
59920        mingw*)
59921          # Test for the native Windows locale name.
59922          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59923            gt_cv_locale_fr=French_France.1252
59924          else
59925            # None found.
59926            gt_cv_locale_fr=none
59927          fi
59928          ;;
59929        *)
59930          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
59931          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
59932          # configure script would override the LC_ALL setting. Likewise for
59933          # LC_CTYPE, which is also set at the beginning of the configure script.
59934          # Test for the usual locale name.
59935          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59936            gt_cv_locale_fr=fr_FR
59937          else
59938            # Test for the locale name with explicit encoding suffix.
59939            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59940              gt_cv_locale_fr=fr_FR.ISO-8859-1
59941            else
59942              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
59943              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59944                gt_cv_locale_fr=fr_FR.ISO8859-1
59945              else
59946                # Test for the HP-UX locale name.
59947                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59948                  gt_cv_locale_fr=fr_FR.iso88591
59949                else
59950                  # Test for the Solaris 7 locale name.
59951                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
59952                    gt_cv_locale_fr=fr
59953                  else
59954                    # None found.
59955                    gt_cv_locale_fr=none
59956                  fi
59957                fi
59958              fi
59959            fi
59960          fi
59961          ;;
59962      esac
59963    fi
59964    rm -fr conftest*
59965
59966fi
59967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
59968$as_echo "$gt_cv_locale_fr" >&6; }
59969  LOCALE_FR=$gt_cv_locale_fr
59970
59971
59972
59973
59974
59975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
59976$as_echo_n "checking for a turkish Unicode locale... " >&6; }
59977if ${gt_cv_locale_tr_utf8+:} false; then :
59978  $as_echo_n "(cached) " >&6
59979else
59980
59981    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59982/* end confdefs.h.  */
59983
59984#include <locale.h>
59985#include <time.h>
59986#if HAVE_LANGINFO_CODESET
59987# include <langinfo.h>
59988#endif
59989#include <stdlib.h>
59990#include <string.h>
59991#include <wctype.h>
59992struct tm t;
59993char buf[16];
59994int main () {
59995  /* On BeOS, locales are not implemented in libc.  Rather, libintl
59996     imitates locale dependent behaviour by looking at the environment
59997     variables, and all locales use the UTF-8 encoding.  But BeOS does not
59998     implement the Turkish upper-/lowercase mappings.  Therefore, let this
59999     program return 1 on BeOS.  */
60000  /* Check whether the given locale name is recognized by the system.  */
60001#if defined _WIN32 && !defined __CYGWIN__
60002  /* On native Windows, setlocale(category, "") looks at the system settings,
60003     not at the environment variables.  Also, when an encoding suffix such
60004     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
60005     category of the locale to "C".  */
60006  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
60007      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
60008    return 1;
60009#else
60010  if (setlocale (LC_ALL, "") == NULL) return 1;
60011#endif
60012  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
60013     On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
60014     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
60015     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
60016     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
60017     some unit tests fail.  */
60018#if HAVE_LANGINFO_CODESET
60019  {
60020    const char *cs = nl_langinfo (CODESET);
60021    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
60022      return 1;
60023  }
60024#endif
60025#ifdef __CYGWIN__
60026  /* On Cygwin, avoid locale names without encoding suffix, because the
60027     locale_charset() function relies on the encoding suffix.  Note that
60028     LC_ALL is set on the command line.  */
60029  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
60030#endif
60031  /* Check whether in the abbreviation of the eighth month, the second
60032     character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
60033     two bytes long, with UTF-8 encoding.  */
60034  t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
60035  if (strftime (buf, sizeof (buf), "%b", &t) < 4
60036      || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
60037    return 1;
60038  /* Check whether the upper-/lowercase mappings are as expected for
60039     Turkish.  */
60040  if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
60041      || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
60042    return 1;
60043  return 0;
60044}
60045
60046_ACEOF
60047    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
60048  (eval $ac_link) 2>&5
60049  ac_status=$?
60050  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60051  test $ac_status = 0; } && test -s conftest$ac_exeext; then
60052      case "$host_os" in
60053        # Handle native Windows specially, because there setlocale() interprets
60054        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
60055        # "fr" or "fra" as "French" or "French_France.1252",
60056        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
60057        # "ja" as "Japanese" or "Japanese_Japan.932",
60058        # and similar.
60059        mingw*)
60060          # Test for the hypothetical native Windows locale name.
60061          if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
60062            gt_cv_locale_tr_utf8=Turkish_Turkey.65001
60063          else
60064            # None found.
60065            gt_cv_locale_tr_utf8=none
60066          fi
60067          ;;
60068        *)
60069          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
60070          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
60071          # configure script would override the LC_ALL setting. Likewise for
60072          # LC_CTYPE, which is also set at the beginning of the configure script.
60073          # Test for the usual locale name.
60074          if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
60075            gt_cv_locale_tr_utf8=tr_TR
60076          else
60077            # Test for the locale name with explicit encoding suffix.
60078            if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
60079              gt_cv_locale_tr_utf8=tr_TR.UTF-8
60080            else
60081              # Test for the Solaris 7 locale name.
60082              if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
60083                gt_cv_locale_tr_utf8=tr.UTF-8
60084              else
60085                # None found.
60086                gt_cv_locale_tr_utf8=none
60087              fi
60088            fi
60089          fi
60090          ;;
60091      esac
60092    else
60093      gt_cv_locale_tr_utf8=none
60094    fi
60095    rm -fr conftest*
60096
60097fi
60098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
60099$as_echo "$gt_cv_locale_tr_utf8" >&6; }
60100  LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
60101
60102
60103
60104  if test "$ac_cv_header_winsock2_h" = yes; then
60105
60106
60107
60108
60109
60110
60111
60112
60113  gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
60114
60115  fi
60116
60117
60118
60119
60120
60121    if test "$GNULIB_CONNECT" != 1; then
60122        if test "$GNULIB_CONNECT" = 0; then
60123      GNULIB_CONNECT=$gl_module_indicator_condition
60124    else
60125      GNULIB_CONNECT="($GNULIB_CONNECT || $gl_module_indicator_condition)"
60126    fi
60127  fi
60128
60129
60130
60131
60132
60133$as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
60134
60135
60136
60137
60138
60139  case "$host_os" in
60140    mingw*)
60141      REPLACE_CREAT=1
60142      ;;
60143    *)
60144
60145
60146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
60147$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
60148if ${gl_cv_func_open_slash+:} false; then :
60149  $as_echo_n "(cached) " >&6
60150else
60151  # Assume that if we have lstat, we can also check symlinks.
60152     if test $ac_cv_func_lstat = yes; then
60153       touch conftest.tmp
60154       ln -s conftest.tmp conftest.lnk
60155     fi
60156     if test "$cross_compiling" = yes; then :
60157
60158        case "$host_os" in
60159dragonfly* |           freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
60160            gl_cv_func_open_slash="guessing no" ;;
60161          *)
60162            gl_cv_func_open_slash="guessing yes" ;;
60163        esac
60164
60165else
60166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60167/* end confdefs.h.  */
60168
60169#include <fcntl.h>
60170#if HAVE_UNISTD_H
60171# include <unistd.h>
60172#endif
60173int main ()
60174{
60175  int result = 0;
60176#if HAVE_LSTAT
60177  if (open ("conftest.lnk/", O_RDONLY) != -1)
60178    result |= 1;
60179#endif
60180  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
60181    result |= 2;
60182  return result;
60183}
60184_ACEOF
60185if ac_fn_c_try_run "$LINENO"; then :
60186  gl_cv_func_open_slash=yes
60187else
60188  gl_cv_func_open_slash=no
60189fi
60190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
60191  conftest.$ac_objext conftest.beam conftest.$ac_ext
60192fi
60193
60194     rm -f conftest.sl conftest.tmp conftest.lnk
60195
60196fi
60197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
60198$as_echo "$gl_cv_func_open_slash" >&6; }
60199  case "$gl_cv_func_open_slash" in
60200    *no)
60201
60202$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
60203
60204      ;;
60205  esac
60206
60207      case "$gl_cv_func_open_slash" in
60208        *no)
60209          REPLACE_CREAT=1
60210          ;;
60211      esac
60212      ;;
60213  esac
60214
60215  if test $REPLACE_CREAT = 1; then
60216
60217
60218
60219
60220
60221
60222
60223
60224  gltests_LIBOBJS="$gltests_LIBOBJS creat.$ac_objext"
60225
60226  fi
60227
60228
60229
60230
60231
60232    if test "$GNULIB_CREAT" != 1; then
60233        if test "$GNULIB_CREAT" = 0; then
60234      GNULIB_CREAT=$gl_module_indicator_condition
60235    else
60236      GNULIB_CREAT="($GNULIB_CREAT || $gl_module_indicator_condition)"
60237    fi
60238  fi
60239
60240
60241
60242
60243
60244$as_echo "#define GNULIB_TEST_CREAT 1" >>confdefs.h
60245
60246
60247
60248
60249
60250
60251
60252    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
60253      REPLACE_DUP=1
60254    fi
60255
60256
60257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
60258$as_echo_n "checking whether dup works... " >&6; }
60259if ${gl_cv_func_dup_works+:} false; then :
60260  $as_echo_n "(cached) " >&6
60261else
60262  if test "$cross_compiling" = yes; then :
60263  case "$host_os" in
60264                 # Guess no on native Windows.
60265         mingw*) gl_cv_func_dup_works="guessing no" ;;
60266         *)      gl_cv_func_dup_works="guessing yes" ;;
60267       esac
60268
60269else
60270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60271/* end confdefs.h.  */
60272#include <unistd.h>
60273                         #include <fcntl.h>
60274                         #include <errno.h>
60275int
60276main ()
60277{
60278/* On OS/2 kLIBC, dup does not work on a directory fd.  */
60279           int fd = open (".", O_RDONLY);
60280           return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
60281
60282  ;
60283  return 0;
60284}
60285
60286_ACEOF
60287if ac_fn_c_try_run "$LINENO"; then :
60288  gl_cv_func_dup_works=yes
60289else
60290  gl_cv_func_dup_works=no
60291fi
60292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
60293  conftest.$ac_objext conftest.beam conftest.$ac_ext
60294fi
60295
60296
60297fi
60298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
60299$as_echo "$gl_cv_func_dup_works" >&6; }
60300  case "$gl_cv_func_dup_works" in
60301    *yes) ;;
60302    *)
60303      REPLACE_DUP=1
60304      ;;
60305  esac
60306
60307  if test $REPLACE_DUP = 1; then
60308
60309
60310
60311
60312
60313
60314
60315
60316  gltests_LIBOBJS="$gltests_LIBOBJS dup.$ac_objext"
60317
60318    :
60319  fi
60320
60321
60322
60323
60324
60325    if test "$GNULIB_DUP" != 1; then
60326        if test "$GNULIB_DUP" = 0; then
60327      GNULIB_DUP=$gl_module_indicator_condition
60328    else
60329      GNULIB_DUP="($GNULIB_DUP || $gl_module_indicator_condition)"
60330    fi
60331  fi
60332
60333
60334
60335
60336
60337$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
60338
60339
60340
60341
60342
60343  if test "$enable_acl" != no; then
60344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getxattr with XATTR_NAME_POSIX_ACL macros" >&5
60345$as_echo_n "checking for getxattr with XATTR_NAME_POSIX_ACL macros... " >&6; }
60346if ${gl_cv_getxattr_with_posix_acls+:} false; then :
60347  $as_echo_n "(cached) " >&6
60348else
60349  gl_cv_getxattr_with_posix_acls=no
60350       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60351/* end confdefs.h.  */
60352#include <sys/types.h>
60353              #include <sys/xattr.h>
60354              #include <linux/xattr.h>
60355
60356int
60357main ()
60358{
60359ssize_t a = getxattr (".", XATTR_NAME_POSIX_ACL_ACCESS, 0, 0);
60360              ssize_t b = getxattr (".", XATTR_NAME_POSIX_ACL_DEFAULT, 0, 0);
60361              return a < 0 || b < 0;
60362
60363  ;
60364  return 0;
60365}
60366_ACEOF
60367if ac_fn_c_try_link "$LINENO"; then :
60368  gl_cv_getxattr_with_posix_acls=yes
60369fi
60370rm -f core conftest.err conftest.$ac_objext \
60371    conftest$ac_exeext conftest.$ac_ext
60372fi
60373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_getxattr_with_posix_acls" >&5
60374$as_echo "$gl_cv_getxattr_with_posix_acls" >&6; }
60375  fi
60376  if test "$gl_cv_getxattr_with_posix_acls" = yes; then
60377    LIB_HAS_ACL=
60378
60379$as_echo "#define GETXATTR_WITH_POSIX_ACLS 1" >>confdefs.h
60380
60381  else
60382            gl_need_lib_has_acl=1
60383    LIB_HAS_ACL=$LIB_ACL
60384  fi
60385
60386
60387
60388
60389
60390
60391
60392
60393cat >>confdefs.h <<_ACEOF
60394#define GNULIB_FILENAMECAT $gl_module_indicator_condition
60395_ACEOF
60396
60397
60398
60399
60400
60401
60402
60403
60404
60405
60406  if test $ac_cv_func_ftruncate = yes; then
60407
60408
60409      case "$host_os" in
60410        mingw*)
60411                                                                      REPLACE_FTRUNCATE=1
60412          ;;
60413      esac
60414
60415  else
60416    HAVE_FTRUNCATE=0
60417  fi
60418
60419  if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
60420
60421
60422
60423
60424
60425
60426
60427
60428  gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext"
60429
60430
60431  for ac_func in chsize
60432do :
60433  ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize"
60434if test "x$ac_cv_func_chsize" = xyes; then :
60435  cat >>confdefs.h <<_ACEOF
60436#define HAVE_CHSIZE 1
60437_ACEOF
60438
60439fi
60440done
60441
60442
60443  fi
60444
60445
60446
60447
60448
60449    if test "$GNULIB_FTRUNCATE" != 1; then
60450        if test "$GNULIB_FTRUNCATE" = 0; then
60451      GNULIB_FTRUNCATE=$gl_module_indicator_condition
60452    else
60453      GNULIB_FTRUNCATE="($GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
60454    fi
60455  fi
60456
60457
60458
60459
60460
60461$as_echo "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
60462
60463
60464
60465
60466
60467
60468
60469
60470  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
60471  *yes,yes) ;;
60472  *)
60473        REPLACE_GETCWD=1
60474    ;;
60475  esac
60476
60477  if test $REPLACE_GETCWD = 1; then
60478
60479
60480
60481
60482
60483
60484
60485
60486  gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext"
60487
60488  fi
60489
60490
60491
60492
60493
60494    if test "$GNULIB_GETCWD" != 1; then
60495        if test "$GNULIB_GETCWD" = 0; then
60496      GNULIB_GETCWD=$gl_module_indicator_condition
60497    else
60498      GNULIB_GETCWD="($GNULIB_GETCWD || $gl_module_indicator_condition)"
60499    fi
60500  fi
60501
60502
60503
60504
60505
60506$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
60507
60508
60509
60510
60511
60512
60513
60514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
60515$as_echo_n "checking for getpagesize... " >&6; }
60516if ${gl_cv_func_getpagesize+:} false; then :
60517  $as_echo_n "(cached) " >&6
60518else
60519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60520/* end confdefs.h.  */
60521#include <unistd.h>
60522int
60523main ()
60524{
60525return getpagesize();
60526  ;
60527  return 0;
60528}
60529
60530_ACEOF
60531if ac_fn_c_try_link "$LINENO"; then :
60532  gl_cv_func_getpagesize=yes
60533else
60534  gl_cv_func_getpagesize=no
60535fi
60536rm -f core conftest.err conftest.$ac_objext \
60537    conftest$ac_exeext conftest.$ac_ext
60538
60539fi
60540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
60541$as_echo "$gl_cv_func_getpagesize" >&6; }
60542
60543  if test $gl_cv_func_getpagesize = no; then
60544    HAVE_GETPAGESIZE=0
60545    for ac_header in OS.h
60546do :
60547  ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
60548if test "x$ac_cv_header_OS_h" = xyes; then :
60549  cat >>confdefs.h <<_ACEOF
60550#define HAVE_OS_H 1
60551_ACEOF
60552
60553fi
60554
60555done
60556
60557    if test $ac_cv_header_OS_h = yes; then
60558      HAVE_OS_H=1
60559    fi
60560    for ac_header in sys/param.h
60561do :
60562  ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
60563if test "x$ac_cv_header_sys_param_h" = xyes; then :
60564  cat >>confdefs.h <<_ACEOF
60565#define HAVE_SYS_PARAM_H 1
60566_ACEOF
60567
60568fi
60569
60570done
60571
60572    if test $ac_cv_header_sys_param_h = yes; then
60573      HAVE_SYS_PARAM_H=1
60574    fi
60575  fi
60576  case "$host_os" in
60577    mingw*)
60578      REPLACE_GETPAGESIZE=1
60579      ;;
60580  esac
60581      ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
60582if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
60583
60584else
60585  HAVE_DECL_GETPAGESIZE=0
60586fi
60587
60588
60589  if test $REPLACE_GETPAGESIZE = 1; then
60590
60591
60592
60593
60594
60595
60596
60597
60598  gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext"
60599
60600  fi
60601
60602
60603
60604
60605
60606    if test "$GNULIB_GETPAGESIZE" != 1; then
60607        if test "$GNULIB_GETPAGESIZE" = 0; then
60608      GNULIB_GETPAGESIZE=$gl_module_indicator_condition
60609    else
60610      GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
60611    fi
60612  fi
60613
60614
60615
60616
60617
60618$as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
60619
60620
60621
60622
60623
60624
60625
60626
60627
60628
60629
60630
60631                HAVE_INET_PTON=1
60632  INET_PTON_LIB=
60633
60634
60635
60636
60637  if test $ac_cv_header_sys_socket_h != yes; then
60638                    for ac_header in winsock2.h
60639do :
60640  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
60641if test "x$ac_cv_header_winsock2_h" = xyes; then :
60642  cat >>confdefs.h <<_ACEOF
60643#define HAVE_WINSOCK2_H 1
60644_ACEOF
60645
60646fi
60647
60648done
60649
60650  fi
60651  if test "$ac_cv_header_winsock2_h" = yes; then
60652    HAVE_WINSOCK2_H=1
60653    UNISTD_H_HAVE_WINSOCK2_H=1
60654    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
60655  else
60656    HAVE_WINSOCK2_H=0
60657  fi
60658
60659
60660  if test $HAVE_WINSOCK2_H = 1; then
60661                    REPLACE_INET_PTON=1
60662    ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
60663"
60664if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
60665  ac_have_decl=1
60666else
60667  ac_have_decl=0
60668fi
60669
60670cat >>confdefs.h <<_ACEOF
60671#define HAVE_DECL_INET_PTON $ac_have_decl
60672_ACEOF
60673
60674    if test $ac_cv_have_decl_inet_pton = yes; then
60675      INET_PTON_LIB="-lws2_32"
60676    else
60677      HAVE_DECL_INET_PTON=0
60678    fi
60679  else
60680    gl_save_LIBS=$LIBS
60681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
60682$as_echo_n "checking for library containing inet_pton... " >&6; }
60683if ${ac_cv_search_inet_pton+:} false; then :
60684  $as_echo_n "(cached) " >&6
60685else
60686  ac_func_search_save_LIBS=$LIBS
60687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60688/* end confdefs.h.  */
60689
60690/* Override any GCC internal prototype to avoid an error.
60691   Use char because int might match the return type of a GCC
60692   builtin and then its argument prototype would still apply.  */
60693#ifdef __cplusplus
60694extern "C"
60695#endif
60696char inet_pton ();
60697int
60698main ()
60699{
60700return inet_pton ();
60701  ;
60702  return 0;
60703}
60704_ACEOF
60705for ac_lib in '' nsl resolv network; do
60706  if test -z "$ac_lib"; then
60707    ac_res="none required"
60708  else
60709    ac_res=-l$ac_lib
60710    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
60711  fi
60712  if ac_fn_c_try_link "$LINENO"; then :
60713  ac_cv_search_inet_pton=$ac_res
60714fi
60715rm -f core conftest.err conftest.$ac_objext \
60716    conftest$ac_exeext
60717  if ${ac_cv_search_inet_pton+:} false; then :
60718  break
60719fi
60720done
60721if ${ac_cv_search_inet_pton+:} false; then :
60722
60723else
60724  ac_cv_search_inet_pton=no
60725fi
60726rm conftest.$ac_ext
60727LIBS=$ac_func_search_save_LIBS
60728fi
60729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
60730$as_echo "$ac_cv_search_inet_pton" >&6; }
60731ac_res=$ac_cv_search_inet_pton
60732if test "$ac_res" != no; then :
60733  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
60734
60735else
60736  for ac_func in inet_pton
60737do :
60738  ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
60739if test "x$ac_cv_func_inet_pton" = xyes; then :
60740  cat >>confdefs.h <<_ACEOF
60741#define HAVE_INET_PTON 1
60742_ACEOF
60743
60744fi
60745done
60746
60747       if test $ac_cv_func_inet_pton = no; then
60748         HAVE_INET_PTON=0
60749       fi
60750
60751fi
60752
60753    LIBS=$gl_save_LIBS
60754
60755    if test "$ac_cv_search_inet_pton" != "no" \
60756       && test "$ac_cv_search_inet_pton" != "none required"; then
60757      INET_PTON_LIB="$ac_cv_search_inet_pton"
60758    fi
60759
60760
60761    ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
60762        #if HAVE_NETDB_H
60763        # include <netdb.h>
60764        #endif
60765
60766"
60767if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
60768  ac_have_decl=1
60769else
60770  ac_have_decl=0
60771fi
60772
60773cat >>confdefs.h <<_ACEOF
60774#define HAVE_DECL_INET_PTON $ac_have_decl
60775_ACEOF
60776
60777    if test $ac_cv_have_decl_inet_pton = no; then
60778      HAVE_DECL_INET_PTON=0
60779    fi
60780  fi
60781
60782
60783  if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
60784
60785
60786
60787
60788
60789
60790
60791
60792  gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext"
60793
60794
60795
60796
60797  fi
60798
60799
60800
60801
60802
60803    if test "$GNULIB_INET_PTON" != 1; then
60804        if test "$GNULIB_INET_PTON" = 0; then
60805      GNULIB_INET_PTON=$gl_module_indicator_condition
60806    else
60807      GNULIB_INET_PTON="($GNULIB_INET_PTON || $gl_module_indicator_condition)"
60808    fi
60809  fi
60810
60811
60812
60813
60814   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
60815$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
60816if ${ac_cv_c_bigendian+:} false; then :
60817  $as_echo_n "(cached) " >&6
60818else
60819  ac_cv_c_bigendian=unknown
60820    # See if we're dealing with a universal compiler.
60821    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60822/* end confdefs.h.  */
60823#ifndef __APPLE_CC__
60824	       not a universal capable compiler
60825	     #endif
60826	     typedef int dummy;
60827
60828_ACEOF
60829if ac_fn_c_try_compile "$LINENO"; then :
60830
60831	# Check for potential -arch flags.  It is not universal unless
60832	# there are at least two -arch flags with different values.
60833	ac_arch=
60834	ac_prev=
60835	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
60836	 if test -n "$ac_prev"; then
60837	   case $ac_word in
60838	     i?86 | x86_64 | ppc | ppc64)
60839	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
60840		 ac_arch=$ac_word
60841	       else
60842		 ac_cv_c_bigendian=universal
60843		 break
60844	       fi
60845	       ;;
60846	   esac
60847	   ac_prev=
60848	 elif test "x$ac_word" = "x-arch"; then
60849	   ac_prev=arch
60850	 fi
60851       done
60852fi
60853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60854    if test $ac_cv_c_bigendian = unknown; then
60855      # See if sys/param.h defines the BYTE_ORDER macro.
60856      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60857/* end confdefs.h.  */
60858#include <sys/types.h>
60859	     #include <sys/param.h>
60860
60861int
60862main ()
60863{
60864#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
60865		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
60866		     && LITTLE_ENDIAN)
60867	      bogus endian macros
60868	     #endif
60869
60870  ;
60871  return 0;
60872}
60873_ACEOF
60874if ac_fn_c_try_compile "$LINENO"; then :
60875  # It does; now see whether it defined to BIG_ENDIAN or not.
60876	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60877/* end confdefs.h.  */
60878#include <sys/types.h>
60879		#include <sys/param.h>
60880
60881int
60882main ()
60883{
60884#if BYTE_ORDER != BIG_ENDIAN
60885		 not big endian
60886		#endif
60887
60888  ;
60889  return 0;
60890}
60891_ACEOF
60892if ac_fn_c_try_compile "$LINENO"; then :
60893  ac_cv_c_bigendian=yes
60894else
60895  ac_cv_c_bigendian=no
60896fi
60897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60898fi
60899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60900    fi
60901    if test $ac_cv_c_bigendian = unknown; then
60902      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
60903      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60904/* end confdefs.h.  */
60905#include <limits.h>
60906
60907int
60908main ()
60909{
60910#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
60911	      bogus endian macros
60912	     #endif
60913
60914  ;
60915  return 0;
60916}
60917_ACEOF
60918if ac_fn_c_try_compile "$LINENO"; then :
60919  # It does; now see whether it defined to _BIG_ENDIAN or not.
60920	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60921/* end confdefs.h.  */
60922#include <limits.h>
60923
60924int
60925main ()
60926{
60927#ifndef _BIG_ENDIAN
60928		 not big endian
60929		#endif
60930
60931  ;
60932  return 0;
60933}
60934_ACEOF
60935if ac_fn_c_try_compile "$LINENO"; then :
60936  ac_cv_c_bigendian=yes
60937else
60938  ac_cv_c_bigendian=no
60939fi
60940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60941fi
60942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60943    fi
60944    if test $ac_cv_c_bigendian = unknown; then
60945      # Compile a test program.
60946      if test "$cross_compiling" = yes; then :
60947  # Try to guess by grepping values from an object file.
60948	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60949/* end confdefs.h.  */
60950short int ascii_mm[] =
60951		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
60952		short int ascii_ii[] =
60953		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
60954		int use_ascii (int i) {
60955		  return ascii_mm[i] + ascii_ii[i];
60956		}
60957		short int ebcdic_ii[] =
60958		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
60959		short int ebcdic_mm[] =
60960		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
60961		int use_ebcdic (int i) {
60962		  return ebcdic_mm[i] + ebcdic_ii[i];
60963		}
60964		extern int foo;
60965
60966int
60967main ()
60968{
60969return use_ascii (foo) == use_ebcdic (foo);
60970  ;
60971  return 0;
60972}
60973_ACEOF
60974if ac_fn_c_try_compile "$LINENO"; then :
60975  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
60976	      ac_cv_c_bigendian=yes
60977	    fi
60978	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
60979	      if test "$ac_cv_c_bigendian" = unknown; then
60980		ac_cv_c_bigendian=no
60981	      else
60982		# finding both strings is unlikely to happen, but who knows?
60983		ac_cv_c_bigendian=unknown
60984	      fi
60985	    fi
60986fi
60987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60988else
60989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60990/* end confdefs.h.  */
60991$ac_includes_default
60992int
60993main ()
60994{
60995
60996	     /* Are we little or big endian?  From Harbison&Steele.  */
60997	     union
60998	     {
60999	       long int l;
61000	       char c[sizeof (long int)];
61001	     } u;
61002	     u.l = 1;
61003	     return u.c[sizeof (long int) - 1] == 1;
61004
61005  ;
61006  return 0;
61007}
61008_ACEOF
61009if ac_fn_c_try_run "$LINENO"; then :
61010  ac_cv_c_bigendian=no
61011else
61012  ac_cv_c_bigendian=yes
61013fi
61014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
61015  conftest.$ac_objext conftest.beam conftest.$ac_ext
61016fi
61017
61018    fi
61019fi
61020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
61021$as_echo "$ac_cv_c_bigendian" >&6; }
61022 case $ac_cv_c_bigendian in #(
61023   yes)
61024     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
61025;; #(
61026   no)
61027      ;; #(
61028   universal)
61029
61030$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
61031
61032     ;; #(
61033   *)
61034     as_fn_error $? "unknown endianness
61035 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
61036 esac
61037
61038
61039
61040
61041  :
61042
61043  :
61044  :
61045  :
61046  :
61047
61048
61049
61050
61051  PRIPTR_PREFIX=
61052  if test -n "$STDINT_H"; then
61053            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61054/* end confdefs.h.  */
61055
61056         #ifdef _WIN64
61057         LLP64
61058         #endif
61059
61060int
61061main ()
61062{
61063
61064  ;
61065  return 0;
61066},
61067
61068_ACEOF
61069if ac_fn_c_try_compile "$LINENO"; then :
61070  PRIPTR_PREFIX='"l"'
61071else
61072  PRIPTR_PREFIX='"ll"'
61073fi
61074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61075  else
61076        for glpfx in '' l ll I64; do
61077      case $glpfx in
61078        '')  gltype1='int';;
61079        l)   gltype1='long int';;
61080        ll)  gltype1='long long int';;
61081        I64) gltype1='__int64';;
61082      esac
61083      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61084/* end confdefs.h.  */
61085#include <stdint.h>
61086           extern intptr_t foo;
61087           extern $gltype1 foo;
61088int
61089main ()
61090{
61091
61092  ;
61093  return 0;
61094}
61095_ACEOF
61096if ac_fn_c_try_compile "$LINENO"; then :
61097  PRIPTR_PREFIX='"'$glpfx'"'
61098fi
61099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61100      test -n "$PRIPTR_PREFIX" && break
61101    done
61102  fi
61103
61104
61105
61106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
61107$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
61108if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
61109  $as_echo_n "(cached) " >&6
61110else
61111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61112/* end confdefs.h.  */
61113/* Work also in C++ mode.  */
61114            #define __STDC_LIMIT_MACROS 1
61115
61116            /* Work if build is not clean.  */
61117            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
61118
61119            #include <limits.h>
61120            #if HAVE_STDINT_H
61121             #include <stdint.h>
61122            #endif
61123
61124            #if defined INT32_MAX && defined INTMAX_MAX
61125             #define CONDITION (INT32_MAX < INTMAX_MAX)
61126            #else
61127             #define CONDITION (sizeof (int) < sizeof (long long int))
61128            #endif
61129            int test[CONDITION ? 1 : -1];
61130int
61131main ()
61132{
61133
61134  ;
61135  return 0;
61136}
61137_ACEOF
61138if ac_fn_c_try_compile "$LINENO"; then :
61139  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
61140else
61141  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
61142fi
61143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61144fi
61145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
61146$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
61147  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
61148    INT32_MAX_LT_INTMAX_MAX=1;
61149  else
61150    INT32_MAX_LT_INTMAX_MAX=0;
61151  fi
61152
61153
61154  if test $APPLE_UNIVERSAL_BUILD = 0; then
61155
61156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
61157$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
61158if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
61159  $as_echo_n "(cached) " >&6
61160else
61161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61162/* end confdefs.h.  */
61163/* Work also in C++ mode.  */
61164            #define __STDC_LIMIT_MACROS 1
61165
61166            /* Work if build is not clean.  */
61167            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
61168
61169            #include <limits.h>
61170            #if HAVE_STDINT_H
61171             #include <stdint.h>
61172            #endif
61173
61174            #if defined INT64_MAX
61175             #define CONDITION (INT64_MAX == LONG_MAX)
61176            #else
61177             #define CONDITION (sizeof (long long int) == sizeof (long int))
61178            #endif
61179            int test[CONDITION ? 1 : -1];
61180int
61181main ()
61182{
61183
61184  ;
61185  return 0;
61186}
61187_ACEOF
61188if ac_fn_c_try_compile "$LINENO"; then :
61189  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
61190else
61191  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
61192fi
61193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61194fi
61195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
61196$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
61197  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
61198    INT64_MAX_EQ_LONG_MAX=1;
61199  else
61200    INT64_MAX_EQ_LONG_MAX=0;
61201  fi
61202
61203
61204  else
61205    INT64_MAX_EQ_LONG_MAX=-1
61206  fi
61207
61208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
61209$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
61210if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
61211  $as_echo_n "(cached) " >&6
61212else
61213  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61214/* end confdefs.h.  */
61215/* Work also in C++ mode.  */
61216            #define __STDC_LIMIT_MACROS 1
61217
61218            /* Work if build is not clean.  */
61219            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
61220
61221            #include <limits.h>
61222            #if HAVE_STDINT_H
61223             #include <stdint.h>
61224            #endif
61225
61226            #if defined UINT32_MAX && defined UINTMAX_MAX
61227             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
61228            #else
61229             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
61230            #endif
61231            int test[CONDITION ? 1 : -1];
61232int
61233main ()
61234{
61235
61236  ;
61237  return 0;
61238}
61239_ACEOF
61240if ac_fn_c_try_compile "$LINENO"; then :
61241  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
61242else
61243  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
61244fi
61245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61246fi
61247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
61248$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
61249  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
61250    UINT32_MAX_LT_UINTMAX_MAX=1;
61251  else
61252    UINT32_MAX_LT_UINTMAX_MAX=0;
61253  fi
61254
61255
61256  if test $APPLE_UNIVERSAL_BUILD = 0; then
61257
61258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
61259$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
61260if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
61261  $as_echo_n "(cached) " >&6
61262else
61263  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61264/* end confdefs.h.  */
61265/* Work also in C++ mode.  */
61266            #define __STDC_LIMIT_MACROS 1
61267
61268            /* Work if build is not clean.  */
61269            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
61270
61271            #include <limits.h>
61272            #if HAVE_STDINT_H
61273             #include <stdint.h>
61274            #endif
61275
61276            #if defined UINT64_MAX
61277             #define CONDITION (UINT64_MAX == ULONG_MAX)
61278            #else
61279             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
61280            #endif
61281            int test[CONDITION ? 1 : -1];
61282int
61283main ()
61284{
61285
61286  ;
61287  return 0;
61288}
61289_ACEOF
61290if ac_fn_c_try_compile "$LINENO"; then :
61291  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
61292else
61293  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
61294fi
61295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61296fi
61297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
61298$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
61299  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
61300    UINT64_MAX_EQ_ULONG_MAX=1;
61301  else
61302    UINT64_MAX_EQ_ULONG_MAX=0;
61303  fi
61304
61305
61306  else
61307    UINT64_MAX_EQ_ULONG_MAX=-1
61308  fi
61309
61310
61311
61312
61313
61314  HAVE_IOCTL=1
61315  if test "$ac_cv_header_winsock2_h" = yes; then
61316                HAVE_IOCTL=0
61317  else
61318    for ac_func in ioctl
61319do :
61320  ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
61321if test "x$ac_cv_func_ioctl" = xyes; then :
61322  cat >>confdefs.h <<_ACEOF
61323#define HAVE_IOCTL 1
61324_ACEOF
61325
61326fi
61327done
61328
61329                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
61330$as_echo_n "checking for ioctl with POSIX signature... " >&6; }
61331if ${gl_cv_func_ioctl_posix_signature+:} false; then :
61332  $as_echo_n "(cached) " >&6
61333else
61334  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61335/* end confdefs.h.  */
61336#include <sys/ioctl.h>
61337              /* On some platforms, ioctl() is declared in <unistd.h>.  */
61338              #include <unistd.h>
61339
61340int
61341main ()
61342{
61343extern
61344              #ifdef __cplusplus
61345              "C"
61346              #endif
61347              int ioctl (int, int, ...);
61348
61349  ;
61350  return 0;
61351}
61352
61353_ACEOF
61354if ac_fn_c_try_compile "$LINENO"; then :
61355  gl_cv_func_ioctl_posix_signature=yes
61356else
61357  gl_cv_func_ioctl_posix_signature=no
61358fi
61359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61360
61361fi
61362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
61363$as_echo "$gl_cv_func_ioctl_posix_signature" >&6; }
61364    if test $gl_cv_func_ioctl_posix_signature != yes; then
61365      REPLACE_IOCTL=1
61366    fi
61367  fi
61368
61369  if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
61370
61371
61372
61373
61374
61375
61376
61377
61378  gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
61379
61380  fi
61381
61382
61383
61384
61385
61386    if test "$GNULIB_IOCTL" != 1; then
61387        if test "$GNULIB_IOCTL" = 0; then
61388      GNULIB_IOCTL=$gl_module_indicator_condition
61389    else
61390      GNULIB_IOCTL="($GNULIB_IOCTL || $gl_module_indicator_condition)"
61391    fi
61392  fi
61393
61394
61395
61396
61397
61398$as_echo "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
61399
61400
61401
61402
61403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
61404$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
61405if ${gl_cv_cc_float_expbit0+:} false; then :
61406  $as_echo_n "(cached) " >&6
61407else
61408
61409      if test "$cross_compiling" = yes; then :
61410  gl_cv_cc_float_expbit0="word 0 bit 23"
61411else
61412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61413/* end confdefs.h.  */
61414
61415#include <float.h>
61416#include <stddef.h>
61417#include <stdio.h>
61418#include <string.h>
61419#define NWORDS \
61420  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
61421typedef union { float value; unsigned int word[NWORDS]; } memory_float;
61422static unsigned int ored_words[NWORDS];
61423static unsigned int anded_words[NWORDS];
61424static void add_to_ored_words (float x)
61425{
61426  memory_float m;
61427  size_t i;
61428  /* Clear it first, in case
61429     sizeof (float) < sizeof (memory_float).  */
61430  memset (&m, 0, sizeof (memory_float));
61431  m.value = x;
61432  for (i = 0; i < NWORDS; i++)
61433    {
61434      ored_words[i] |= m.word[i];
61435      anded_words[i] &= m.word[i];
61436    }
61437}
61438int main ()
61439{
61440  size_t j;
61441  FILE *fp = fopen ("conftest.out", "w");
61442  if (fp == NULL)
61443    return 1;
61444  for (j = 0; j < NWORDS; j++)
61445    anded_words[j] = ~ (unsigned int) 0;
61446  add_to_ored_words (0.25f);
61447  add_to_ored_words (0.5f);
61448  add_to_ored_words (1.0f);
61449  add_to_ored_words (2.0f);
61450  add_to_ored_words (4.0f);
61451  /* Remove bits that are common (e.g. if representation of the first mantissa
61452     bit is explicit).  */
61453  for (j = 0; j < NWORDS; j++)
61454    ored_words[j] &= ~anded_words[j];
61455  /* Now find the nonzero word.  */
61456  for (j = 0; j < NWORDS; j++)
61457    if (ored_words[j] != 0)
61458      break;
61459  if (j < NWORDS)
61460    {
61461      size_t i;
61462      for (i = j + 1; i < NWORDS; i++)
61463        if (ored_words[i] != 0)
61464          {
61465            fprintf (fp, "unknown");
61466            return (fclose (fp) != 0);
61467          }
61468      for (i = 0; ; i++)
61469        if ((ored_words[j] >> i) & 1)
61470          {
61471            fprintf (fp, "word %d bit %d", (int) j, (int) i);
61472            return (fclose (fp) != 0);
61473          }
61474    }
61475  fprintf (fp, "unknown");
61476  return (fclose (fp) != 0);
61477}
61478
61479_ACEOF
61480if ac_fn_c_try_run "$LINENO"; then :
61481  gl_cv_cc_float_expbit0=`cat conftest.out`
61482else
61483  gl_cv_cc_float_expbit0="unknown"
61484fi
61485rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
61486  conftest.$ac_objext conftest.beam conftest.$ac_ext
61487fi
61488
61489      rm -f conftest.out
61490
61491fi
61492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
61493$as_echo "$gl_cv_cc_float_expbit0" >&6; }
61494  case "$gl_cv_cc_float_expbit0" in
61495    word*bit*)
61496      word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
61497      bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
61498
61499cat >>confdefs.h <<_ACEOF
61500#define FLT_EXPBIT0_WORD $word
61501_ACEOF
61502
61503
61504cat >>confdefs.h <<_ACEOF
61505#define FLT_EXPBIT0_BIT $bit
61506_ACEOF
61507
61508      ;;
61509  esac
61510
61511
61512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
61513$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
61514if ${gl_cv_cc_double_expbit0+:} false; then :
61515  $as_echo_n "(cached) " >&6
61516else
61517
61518      if test "$cross_compiling" = yes; then :
61519
61520                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61521/* end confdefs.h.  */
61522
61523#if defined arm || defined __arm || defined __arm__
61524  mixed_endianness
61525#endif
61526
61527_ACEOF
61528if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
61529  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
61530  gl_cv_cc_double_expbit0="unknown"
61531else
61532
61533                                                         :
61534if ${ac_cv_c_bigendian+:} false; then :
61535  $as_echo_n "(cached) " >&6
61536else
61537  ac_cv_c_bigendian=unknown
61538    # See if we're dealing with a universal compiler.
61539    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61540/* end confdefs.h.  */
61541#ifndef __APPLE_CC__
61542	       not a universal capable compiler
61543	     #endif
61544	     typedef int dummy;
61545
61546_ACEOF
61547if ac_fn_c_try_compile "$LINENO"; then :
61548
61549	# Check for potential -arch flags.  It is not universal unless
61550	# there are at least two -arch flags with different values.
61551	ac_arch=
61552	ac_prev=
61553	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
61554	 if test -n "$ac_prev"; then
61555	   case $ac_word in
61556	     i?86 | x86_64 | ppc | ppc64)
61557	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
61558		 ac_arch=$ac_word
61559	       else
61560		 ac_cv_c_bigendian=universal
61561		 break
61562	       fi
61563	       ;;
61564	   esac
61565	   ac_prev=
61566	 elif test "x$ac_word" = "x-arch"; then
61567	   ac_prev=arch
61568	 fi
61569       done
61570fi
61571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61572    if test $ac_cv_c_bigendian = unknown; then
61573      # See if sys/param.h defines the BYTE_ORDER macro.
61574      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61575/* end confdefs.h.  */
61576#include <sys/types.h>
61577	     #include <sys/param.h>
61578
61579int
61580main ()
61581{
61582#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
61583		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
61584		     && LITTLE_ENDIAN)
61585	      bogus endian macros
61586	     #endif
61587
61588  ;
61589  return 0;
61590}
61591_ACEOF
61592if ac_fn_c_try_compile "$LINENO"; then :
61593  # It does; now see whether it defined to BIG_ENDIAN or not.
61594	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61595/* end confdefs.h.  */
61596#include <sys/types.h>
61597		#include <sys/param.h>
61598
61599int
61600main ()
61601{
61602#if BYTE_ORDER != BIG_ENDIAN
61603		 not big endian
61604		#endif
61605
61606  ;
61607  return 0;
61608}
61609_ACEOF
61610if ac_fn_c_try_compile "$LINENO"; then :
61611  ac_cv_c_bigendian=yes
61612else
61613  ac_cv_c_bigendian=no
61614fi
61615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61616fi
61617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61618    fi
61619    if test $ac_cv_c_bigendian = unknown; then
61620      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
61621      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61622/* end confdefs.h.  */
61623#include <limits.h>
61624
61625int
61626main ()
61627{
61628#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
61629	      bogus endian macros
61630	     #endif
61631
61632  ;
61633  return 0;
61634}
61635_ACEOF
61636if ac_fn_c_try_compile "$LINENO"; then :
61637  # It does; now see whether it defined to _BIG_ENDIAN or not.
61638	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61639/* end confdefs.h.  */
61640#include <limits.h>
61641
61642int
61643main ()
61644{
61645#ifndef _BIG_ENDIAN
61646		 not big endian
61647		#endif
61648
61649  ;
61650  return 0;
61651}
61652_ACEOF
61653if ac_fn_c_try_compile "$LINENO"; then :
61654  ac_cv_c_bigendian=yes
61655else
61656  ac_cv_c_bigendian=no
61657fi
61658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61659fi
61660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61661    fi
61662    if test $ac_cv_c_bigendian = unknown; then
61663      # Compile a test program.
61664      if test "$cross_compiling" = yes; then :
61665  # Try to guess by grepping values from an object file.
61666	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61667/* end confdefs.h.  */
61668short int ascii_mm[] =
61669		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
61670		short int ascii_ii[] =
61671		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
61672		int use_ascii (int i) {
61673		  return ascii_mm[i] + ascii_ii[i];
61674		}
61675		short int ebcdic_ii[] =
61676		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
61677		short int ebcdic_mm[] =
61678		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
61679		int use_ebcdic (int i) {
61680		  return ebcdic_mm[i] + ebcdic_ii[i];
61681		}
61682		extern int foo;
61683
61684int
61685main ()
61686{
61687return use_ascii (foo) == use_ebcdic (foo);
61688  ;
61689  return 0;
61690}
61691_ACEOF
61692if ac_fn_c_try_compile "$LINENO"; then :
61693  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
61694	      ac_cv_c_bigendian=yes
61695	    fi
61696	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
61697	      if test "$ac_cv_c_bigendian" = unknown; then
61698		ac_cv_c_bigendian=no
61699	      else
61700		# finding both strings is unlikely to happen, but who knows?
61701		ac_cv_c_bigendian=unknown
61702	      fi
61703	    fi
61704fi
61705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61706else
61707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61708/* end confdefs.h.  */
61709$ac_includes_default
61710int
61711main ()
61712{
61713
61714	     /* Are we little or big endian?  From Harbison&Steele.  */
61715	     union
61716	     {
61717	       long int l;
61718	       char c[sizeof (long int)];
61719	     } u;
61720	     u.l = 1;
61721	     return u.c[sizeof (long int) - 1] == 1;
61722
61723  ;
61724  return 0;
61725}
61726_ACEOF
61727if ac_fn_c_try_run "$LINENO"; then :
61728  ac_cv_c_bigendian=no
61729else
61730  ac_cv_c_bigendian=yes
61731fi
61732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
61733  conftest.$ac_objext conftest.beam conftest.$ac_ext
61734fi
61735
61736    fi
61737fi
61738:
61739 case $ac_cv_c_bigendian in #(
61740   yes)
61741     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
61742   no)
61743     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
61744   universal)
61745
61746$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
61747
61748     ;; #(
61749   *)
61750     gl_cv_cc_double_expbit0="unknown" ;;
61751 esac
61752
61753
61754fi
61755rm -f conftest*
61756
61757
61758else
61759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61760/* end confdefs.h.  */
61761
61762#include <float.h>
61763#include <stddef.h>
61764#include <stdio.h>
61765#include <string.h>
61766#define NWORDS \
61767  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
61768typedef union { double value; unsigned int word[NWORDS]; } memory_double;
61769static unsigned int ored_words[NWORDS];
61770static unsigned int anded_words[NWORDS];
61771static void add_to_ored_words (double x)
61772{
61773  memory_double m;
61774  size_t i;
61775  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
61776  memset (&m, 0, sizeof (memory_double));
61777  m.value = x;
61778  for (i = 0; i < NWORDS; i++)
61779    {
61780      ored_words[i] |= m.word[i];
61781      anded_words[i] &= m.word[i];
61782    }
61783}
61784int main ()
61785{
61786  size_t j;
61787  FILE *fp = fopen ("conftest.out", "w");
61788  if (fp == NULL)
61789    return 1;
61790  for (j = 0; j < NWORDS; j++)
61791    anded_words[j] = ~ (unsigned int) 0;
61792  add_to_ored_words (0.25);
61793  add_to_ored_words (0.5);
61794  add_to_ored_words (1.0);
61795  add_to_ored_words (2.0);
61796  add_to_ored_words (4.0);
61797  /* Remove bits that are common (e.g. if representation of the first mantissa
61798     bit is explicit).  */
61799  for (j = 0; j < NWORDS; j++)
61800    ored_words[j] &= ~anded_words[j];
61801  /* Now find the nonzero word.  */
61802  for (j = 0; j < NWORDS; j++)
61803    if (ored_words[j] != 0)
61804      break;
61805  if (j < NWORDS)
61806    {
61807      size_t i;
61808      for (i = j + 1; i < NWORDS; i++)
61809        if (ored_words[i] != 0)
61810          {
61811            fprintf (fp, "unknown");
61812            return (fclose (fp) != 0);
61813          }
61814      for (i = 0; ; i++)
61815        if ((ored_words[j] >> i) & 1)
61816          {
61817            fprintf (fp, "word %d bit %d", (int) j, (int) i);
61818            return (fclose (fp) != 0);
61819          }
61820    }
61821  fprintf (fp, "unknown");
61822  return (fclose (fp) != 0);
61823}
61824
61825_ACEOF
61826if ac_fn_c_try_run "$LINENO"; then :
61827  gl_cv_cc_double_expbit0=`cat conftest.out`
61828else
61829  gl_cv_cc_double_expbit0="unknown"
61830fi
61831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
61832  conftest.$ac_objext conftest.beam conftest.$ac_ext
61833fi
61834
61835      rm -f conftest.out
61836
61837fi
61838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
61839$as_echo "$gl_cv_cc_double_expbit0" >&6; }
61840  case "$gl_cv_cc_double_expbit0" in
61841    word*bit*)
61842      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
61843      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
61844
61845cat >>confdefs.h <<_ACEOF
61846#define DBL_EXPBIT0_WORD $word
61847_ACEOF
61848
61849
61850cat >>confdefs.h <<_ACEOF
61851#define DBL_EXPBIT0_BIT $bit
61852_ACEOF
61853
61854      ;;
61855  esac
61856
61857
61858
61859     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
61860$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
61861if ${gl_cv_cc_long_double_expbit0+:} false; then :
61862  $as_echo_n "(cached) " >&6
61863else
61864
61865      if test "$cross_compiling" = yes; then :
61866
61867                              gl_cv_cc_long_double_expbit0="unknown"
61868          case "$host_os" in
61869            mingw*) # On native Windows (little-endian), we know the result
61870                    # in two cases: mingw, MSVC.
61871              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61872/* end confdefs.h.  */
61873
61874#ifdef __MINGW32__
61875 Known
61876#endif
61877
61878_ACEOF
61879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
61880  $EGREP "Known" >/dev/null 2>&1; then :
61881  gl_cv_cc_long_double_expbit0="word 2 bit 0"
61882fi
61883rm -f conftest*
61884
61885              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61886/* end confdefs.h.  */
61887
61888#ifdef _MSC_VER
61889 Known
61890#endif
61891
61892_ACEOF
61893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
61894  $EGREP "Known" >/dev/null 2>&1; then :
61895  gl_cv_cc_long_double_expbit0="word 1 bit 20"
61896fi
61897rm -f conftest*
61898
61899              ;;
61900          esac
61901
61902else
61903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61904/* end confdefs.h.  */
61905
61906#include <float.h>
61907#include <stddef.h>
61908#include <stdio.h>
61909#include <string.h>
61910#define NWORDS \
61911  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
61912typedef union { long double value; unsigned int word[NWORDS]; }
61913        memory_long_double;
61914static unsigned int ored_words[NWORDS];
61915static unsigned int anded_words[NWORDS];
61916static void add_to_ored_words (long double *x)
61917{
61918  memory_long_double m;
61919  size_t i;
61920  /* Clear it first, in case
61921     sizeof (long double) < sizeof (memory_long_double).  */
61922  memset (&m, 0, sizeof (memory_long_double));
61923  m.value = *x;
61924  for (i = 0; i < NWORDS; i++)
61925    {
61926      ored_words[i] |= m.word[i];
61927      anded_words[i] &= m.word[i];
61928    }
61929}
61930int main ()
61931{
61932  static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
61933  size_t j;
61934  FILE *fp = fopen ("conftest.out", "w");
61935  if (fp == NULL)
61936    return 1;
61937  for (j = 0; j < NWORDS; j++)
61938    anded_words[j] = ~ (unsigned int) 0;
61939  for (j = 0; j < 5; j++)
61940    add_to_ored_words (&samples[j]);
61941  /* Remove bits that are common (e.g. if representation of the first mantissa
61942     bit is explicit).  */
61943  for (j = 0; j < NWORDS; j++)
61944    ored_words[j] &= ~anded_words[j];
61945  /* Now find the nonzero word.  */
61946  for (j = 0; j < NWORDS; j++)
61947    if (ored_words[j] != 0)
61948      break;
61949  if (j < NWORDS)
61950    {
61951      size_t i;
61952      for (i = j + 1; i < NWORDS; i++)
61953        if (ored_words[i] != 0)
61954          {
61955            fprintf (fp, "unknown");
61956            return (fclose (fp) != 0);
61957          }
61958      for (i = 0; ; i++)
61959        if ((ored_words[j] >> i) & 1)
61960          {
61961            fprintf (fp, "word %d bit %d", (int) j, (int) i);
61962            return (fclose (fp) != 0);
61963          }
61964    }
61965  fprintf (fp, "unknown");
61966  return (fclose (fp) != 0);
61967}
61968
61969_ACEOF
61970if ac_fn_c_try_run "$LINENO"; then :
61971  gl_cv_cc_long_double_expbit0=`cat conftest.out`
61972else
61973  gl_cv_cc_long_double_expbit0="unknown"
61974fi
61975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
61976  conftest.$ac_objext conftest.beam conftest.$ac_ext
61977fi
61978
61979      rm -f conftest.out
61980
61981fi
61982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
61983$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
61984  case "$gl_cv_cc_long_double_expbit0" in
61985    word*bit*)
61986      word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
61987      bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
61988
61989cat >>confdefs.h <<_ACEOF
61990#define LDBL_EXPBIT0_WORD $word
61991_ACEOF
61992
61993
61994cat >>confdefs.h <<_ACEOF
61995#define LDBL_EXPBIT0_BIT $bit
61996_ACEOF
61997
61998      ;;
61999  esac
62000
62001
62002
62003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
62004$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
62005if ${gl_cv_cc_float_expbit0+:} false; then :
62006  $as_echo_n "(cached) " >&6
62007else
62008
62009      if test "$cross_compiling" = yes; then :
62010  gl_cv_cc_float_expbit0="word 0 bit 23"
62011else
62012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62013/* end confdefs.h.  */
62014
62015#include <float.h>
62016#include <stddef.h>
62017#include <stdio.h>
62018#include <string.h>
62019#define NWORDS \
62020  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
62021typedef union { float value; unsigned int word[NWORDS]; } memory_float;
62022static unsigned int ored_words[NWORDS];
62023static unsigned int anded_words[NWORDS];
62024static void add_to_ored_words (float x)
62025{
62026  memory_float m;
62027  size_t i;
62028  /* Clear it first, in case
62029     sizeof (float) < sizeof (memory_float).  */
62030  memset (&m, 0, sizeof (memory_float));
62031  m.value = x;
62032  for (i = 0; i < NWORDS; i++)
62033    {
62034      ored_words[i] |= m.word[i];
62035      anded_words[i] &= m.word[i];
62036    }
62037}
62038int main ()
62039{
62040  size_t j;
62041  FILE *fp = fopen ("conftest.out", "w");
62042  if (fp == NULL)
62043    return 1;
62044  for (j = 0; j < NWORDS; j++)
62045    anded_words[j] = ~ (unsigned int) 0;
62046  add_to_ored_words (0.25f);
62047  add_to_ored_words (0.5f);
62048  add_to_ored_words (1.0f);
62049  add_to_ored_words (2.0f);
62050  add_to_ored_words (4.0f);
62051  /* Remove bits that are common (e.g. if representation of the first mantissa
62052     bit is explicit).  */
62053  for (j = 0; j < NWORDS; j++)
62054    ored_words[j] &= ~anded_words[j];
62055  /* Now find the nonzero word.  */
62056  for (j = 0; j < NWORDS; j++)
62057    if (ored_words[j] != 0)
62058      break;
62059  if (j < NWORDS)
62060    {
62061      size_t i;
62062      for (i = j + 1; i < NWORDS; i++)
62063        if (ored_words[i] != 0)
62064          {
62065            fprintf (fp, "unknown");
62066            return (fclose (fp) != 0);
62067          }
62068      for (i = 0; ; i++)
62069        if ((ored_words[j] >> i) & 1)
62070          {
62071            fprintf (fp, "word %d bit %d", (int) j, (int) i);
62072            return (fclose (fp) != 0);
62073          }
62074    }
62075  fprintf (fp, "unknown");
62076  return (fclose (fp) != 0);
62077}
62078
62079_ACEOF
62080if ac_fn_c_try_run "$LINENO"; then :
62081  gl_cv_cc_float_expbit0=`cat conftest.out`
62082else
62083  gl_cv_cc_float_expbit0="unknown"
62084fi
62085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
62086  conftest.$ac_objext conftest.beam conftest.$ac_ext
62087fi
62088
62089      rm -f conftest.out
62090
62091fi
62092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
62093$as_echo "$gl_cv_cc_float_expbit0" >&6; }
62094  case "$gl_cv_cc_float_expbit0" in
62095    word*bit*)
62096      word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
62097      bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
62098
62099cat >>confdefs.h <<_ACEOF
62100#define FLT_EXPBIT0_WORD $word
62101_ACEOF
62102
62103
62104cat >>confdefs.h <<_ACEOF
62105#define FLT_EXPBIT0_BIT $bit
62106_ACEOF
62107
62108      ;;
62109  esac
62110
62111
62112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
62113$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
62114if ${gl_cv_cc_double_expbit0+:} false; then :
62115  $as_echo_n "(cached) " >&6
62116else
62117
62118      if test "$cross_compiling" = yes; then :
62119
62120                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62121/* end confdefs.h.  */
62122
62123#if defined arm || defined __arm || defined __arm__
62124  mixed_endianness
62125#endif
62126
62127_ACEOF
62128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
62129  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
62130  gl_cv_cc_double_expbit0="unknown"
62131else
62132
62133                                                         :
62134if ${ac_cv_c_bigendian+:} false; then :
62135  $as_echo_n "(cached) " >&6
62136else
62137  ac_cv_c_bigendian=unknown
62138    # See if we're dealing with a universal compiler.
62139    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62140/* end confdefs.h.  */
62141#ifndef __APPLE_CC__
62142	       not a universal capable compiler
62143	     #endif
62144	     typedef int dummy;
62145
62146_ACEOF
62147if ac_fn_c_try_compile "$LINENO"; then :
62148
62149	# Check for potential -arch flags.  It is not universal unless
62150	# there are at least two -arch flags with different values.
62151	ac_arch=
62152	ac_prev=
62153	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
62154	 if test -n "$ac_prev"; then
62155	   case $ac_word in
62156	     i?86 | x86_64 | ppc | ppc64)
62157	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
62158		 ac_arch=$ac_word
62159	       else
62160		 ac_cv_c_bigendian=universal
62161		 break
62162	       fi
62163	       ;;
62164	   esac
62165	   ac_prev=
62166	 elif test "x$ac_word" = "x-arch"; then
62167	   ac_prev=arch
62168	 fi
62169       done
62170fi
62171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62172    if test $ac_cv_c_bigendian = unknown; then
62173      # See if sys/param.h defines the BYTE_ORDER macro.
62174      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62175/* end confdefs.h.  */
62176#include <sys/types.h>
62177	     #include <sys/param.h>
62178
62179int
62180main ()
62181{
62182#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
62183		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
62184		     && LITTLE_ENDIAN)
62185	      bogus endian macros
62186	     #endif
62187
62188  ;
62189  return 0;
62190}
62191_ACEOF
62192if ac_fn_c_try_compile "$LINENO"; then :
62193  # It does; now see whether it defined to BIG_ENDIAN or not.
62194	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62195/* end confdefs.h.  */
62196#include <sys/types.h>
62197		#include <sys/param.h>
62198
62199int
62200main ()
62201{
62202#if BYTE_ORDER != BIG_ENDIAN
62203		 not big endian
62204		#endif
62205
62206  ;
62207  return 0;
62208}
62209_ACEOF
62210if ac_fn_c_try_compile "$LINENO"; then :
62211  ac_cv_c_bigendian=yes
62212else
62213  ac_cv_c_bigendian=no
62214fi
62215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62216fi
62217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62218    fi
62219    if test $ac_cv_c_bigendian = unknown; then
62220      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
62221      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62222/* end confdefs.h.  */
62223#include <limits.h>
62224
62225int
62226main ()
62227{
62228#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
62229	      bogus endian macros
62230	     #endif
62231
62232  ;
62233  return 0;
62234}
62235_ACEOF
62236if ac_fn_c_try_compile "$LINENO"; then :
62237  # It does; now see whether it defined to _BIG_ENDIAN or not.
62238	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62239/* end confdefs.h.  */
62240#include <limits.h>
62241
62242int
62243main ()
62244{
62245#ifndef _BIG_ENDIAN
62246		 not big endian
62247		#endif
62248
62249  ;
62250  return 0;
62251}
62252_ACEOF
62253if ac_fn_c_try_compile "$LINENO"; then :
62254  ac_cv_c_bigendian=yes
62255else
62256  ac_cv_c_bigendian=no
62257fi
62258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62259fi
62260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62261    fi
62262    if test $ac_cv_c_bigendian = unknown; then
62263      # Compile a test program.
62264      if test "$cross_compiling" = yes; then :
62265  # Try to guess by grepping values from an object file.
62266	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62267/* end confdefs.h.  */
62268short int ascii_mm[] =
62269		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
62270		short int ascii_ii[] =
62271		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
62272		int use_ascii (int i) {
62273		  return ascii_mm[i] + ascii_ii[i];
62274		}
62275		short int ebcdic_ii[] =
62276		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
62277		short int ebcdic_mm[] =
62278		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
62279		int use_ebcdic (int i) {
62280		  return ebcdic_mm[i] + ebcdic_ii[i];
62281		}
62282		extern int foo;
62283
62284int
62285main ()
62286{
62287return use_ascii (foo) == use_ebcdic (foo);
62288  ;
62289  return 0;
62290}
62291_ACEOF
62292if ac_fn_c_try_compile "$LINENO"; then :
62293  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
62294	      ac_cv_c_bigendian=yes
62295	    fi
62296	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
62297	      if test "$ac_cv_c_bigendian" = unknown; then
62298		ac_cv_c_bigendian=no
62299	      else
62300		# finding both strings is unlikely to happen, but who knows?
62301		ac_cv_c_bigendian=unknown
62302	      fi
62303	    fi
62304fi
62305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62306else
62307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62308/* end confdefs.h.  */
62309$ac_includes_default
62310int
62311main ()
62312{
62313
62314	     /* Are we little or big endian?  From Harbison&Steele.  */
62315	     union
62316	     {
62317	       long int l;
62318	       char c[sizeof (long int)];
62319	     } u;
62320	     u.l = 1;
62321	     return u.c[sizeof (long int) - 1] == 1;
62322
62323  ;
62324  return 0;
62325}
62326_ACEOF
62327if ac_fn_c_try_run "$LINENO"; then :
62328  ac_cv_c_bigendian=no
62329else
62330  ac_cv_c_bigendian=yes
62331fi
62332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
62333  conftest.$ac_objext conftest.beam conftest.$ac_ext
62334fi
62335
62336    fi
62337fi
62338:
62339 case $ac_cv_c_bigendian in #(
62340   yes)
62341     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
62342   no)
62343     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
62344   universal)
62345
62346$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
62347
62348     ;; #(
62349   *)
62350     gl_cv_cc_double_expbit0="unknown" ;;
62351 esac
62352
62353
62354fi
62355rm -f conftest*
62356
62357
62358else
62359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62360/* end confdefs.h.  */
62361
62362#include <float.h>
62363#include <stddef.h>
62364#include <stdio.h>
62365#include <string.h>
62366#define NWORDS \
62367  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
62368typedef union { double value; unsigned int word[NWORDS]; } memory_double;
62369static unsigned int ored_words[NWORDS];
62370static unsigned int anded_words[NWORDS];
62371static void add_to_ored_words (double x)
62372{
62373  memory_double m;
62374  size_t i;
62375  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
62376  memset (&m, 0, sizeof (memory_double));
62377  m.value = x;
62378  for (i = 0; i < NWORDS; i++)
62379    {
62380      ored_words[i] |= m.word[i];
62381      anded_words[i] &= m.word[i];
62382    }
62383}
62384int main ()
62385{
62386  size_t j;
62387  FILE *fp = fopen ("conftest.out", "w");
62388  if (fp == NULL)
62389    return 1;
62390  for (j = 0; j < NWORDS; j++)
62391    anded_words[j] = ~ (unsigned int) 0;
62392  add_to_ored_words (0.25);
62393  add_to_ored_words (0.5);
62394  add_to_ored_words (1.0);
62395  add_to_ored_words (2.0);
62396  add_to_ored_words (4.0);
62397  /* Remove bits that are common (e.g. if representation of the first mantissa
62398     bit is explicit).  */
62399  for (j = 0; j < NWORDS; j++)
62400    ored_words[j] &= ~anded_words[j];
62401  /* Now find the nonzero word.  */
62402  for (j = 0; j < NWORDS; j++)
62403    if (ored_words[j] != 0)
62404      break;
62405  if (j < NWORDS)
62406    {
62407      size_t i;
62408      for (i = j + 1; i < NWORDS; i++)
62409        if (ored_words[i] != 0)
62410          {
62411            fprintf (fp, "unknown");
62412            return (fclose (fp) != 0);
62413          }
62414      for (i = 0; ; i++)
62415        if ((ored_words[j] >> i) & 1)
62416          {
62417            fprintf (fp, "word %d bit %d", (int) j, (int) i);
62418            return (fclose (fp) != 0);
62419          }
62420    }
62421  fprintf (fp, "unknown");
62422  return (fclose (fp) != 0);
62423}
62424
62425_ACEOF
62426if ac_fn_c_try_run "$LINENO"; then :
62427  gl_cv_cc_double_expbit0=`cat conftest.out`
62428else
62429  gl_cv_cc_double_expbit0="unknown"
62430fi
62431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
62432  conftest.$ac_objext conftest.beam conftest.$ac_ext
62433fi
62434
62435      rm -f conftest.out
62436
62437fi
62438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
62439$as_echo "$gl_cv_cc_double_expbit0" >&6; }
62440  case "$gl_cv_cc_double_expbit0" in
62441    word*bit*)
62442      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
62443      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
62444
62445cat >>confdefs.h <<_ACEOF
62446#define DBL_EXPBIT0_WORD $word
62447_ACEOF
62448
62449
62450cat >>confdefs.h <<_ACEOF
62451#define DBL_EXPBIT0_BIT $bit
62452_ACEOF
62453
62454      ;;
62455  esac
62456
62457
62458
62459     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
62460$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
62461if ${gl_cv_cc_long_double_expbit0+:} false; then :
62462  $as_echo_n "(cached) " >&6
62463else
62464
62465      if test "$cross_compiling" = yes; then :
62466
62467                              gl_cv_cc_long_double_expbit0="unknown"
62468          case "$host_os" in
62469            mingw*) # On native Windows (little-endian), we know the result
62470                    # in two cases: mingw, MSVC.
62471              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62472/* end confdefs.h.  */
62473
62474#ifdef __MINGW32__
62475 Known
62476#endif
62477
62478_ACEOF
62479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
62480  $EGREP "Known" >/dev/null 2>&1; then :
62481  gl_cv_cc_long_double_expbit0="word 2 bit 0"
62482fi
62483rm -f conftest*
62484
62485              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62486/* end confdefs.h.  */
62487
62488#ifdef _MSC_VER
62489 Known
62490#endif
62491
62492_ACEOF
62493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
62494  $EGREP "Known" >/dev/null 2>&1; then :
62495  gl_cv_cc_long_double_expbit0="word 1 bit 20"
62496fi
62497rm -f conftest*
62498
62499              ;;
62500          esac
62501
62502else
62503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62504/* end confdefs.h.  */
62505
62506#include <float.h>
62507#include <stddef.h>
62508#include <stdio.h>
62509#include <string.h>
62510#define NWORDS \
62511  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
62512typedef union { long double value; unsigned int word[NWORDS]; }
62513        memory_long_double;
62514static unsigned int ored_words[NWORDS];
62515static unsigned int anded_words[NWORDS];
62516static void add_to_ored_words (long double *x)
62517{
62518  memory_long_double m;
62519  size_t i;
62520  /* Clear it first, in case
62521     sizeof (long double) < sizeof (memory_long_double).  */
62522  memset (&m, 0, sizeof (memory_long_double));
62523  m.value = *x;
62524  for (i = 0; i < NWORDS; i++)
62525    {
62526      ored_words[i] |= m.word[i];
62527      anded_words[i] &= m.word[i];
62528    }
62529}
62530int main ()
62531{
62532  static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
62533  size_t j;
62534  FILE *fp = fopen ("conftest.out", "w");
62535  if (fp == NULL)
62536    return 1;
62537  for (j = 0; j < NWORDS; j++)
62538    anded_words[j] = ~ (unsigned int) 0;
62539  for (j = 0; j < 5; j++)
62540    add_to_ored_words (&samples[j]);
62541  /* Remove bits that are common (e.g. if representation of the first mantissa
62542     bit is explicit).  */
62543  for (j = 0; j < NWORDS; j++)
62544    ored_words[j] &= ~anded_words[j];
62545  /* Now find the nonzero word.  */
62546  for (j = 0; j < NWORDS; j++)
62547    if (ored_words[j] != 0)
62548      break;
62549  if (j < NWORDS)
62550    {
62551      size_t i;
62552      for (i = j + 1; i < NWORDS; i++)
62553        if (ored_words[i] != 0)
62554          {
62555            fprintf (fp, "unknown");
62556            return (fclose (fp) != 0);
62557          }
62558      for (i = 0; ; i++)
62559        if ((ored_words[j] >> i) & 1)
62560          {
62561            fprintf (fp, "word %d bit %d", (int) j, (int) i);
62562            return (fclose (fp) != 0);
62563          }
62564    }
62565  fprintf (fp, "unknown");
62566  return (fclose (fp) != 0);
62567}
62568
62569_ACEOF
62570if ac_fn_c_try_run "$LINENO"; then :
62571  gl_cv_cc_long_double_expbit0=`cat conftest.out`
62572else
62573  gl_cv_cc_long_double_expbit0="unknown"
62574fi
62575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
62576  conftest.$ac_objext conftest.beam conftest.$ac_ext
62577fi
62578
62579      rm -f conftest.out
62580
62581fi
62582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
62583$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
62584  case "$gl_cv_cc_long_double_expbit0" in
62585    word*bit*)
62586      word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
62587      bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
62588
62589cat >>confdefs.h <<_ACEOF
62590#define LDBL_EXPBIT0_WORD $word
62591_ACEOF
62592
62593
62594cat >>confdefs.h <<_ACEOF
62595#define LDBL_EXPBIT0_BIT $bit
62596_ACEOF
62597
62598      ;;
62599  esac
62600
62601
62602
62603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
62604$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
62605if ${gl_cv_cc_double_expbit0+:} false; then :
62606  $as_echo_n "(cached) " >&6
62607else
62608
62609      if test "$cross_compiling" = yes; then :
62610
62611                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62612/* end confdefs.h.  */
62613
62614#if defined arm || defined __arm || defined __arm__
62615  mixed_endianness
62616#endif
62617
62618_ACEOF
62619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
62620  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
62621  gl_cv_cc_double_expbit0="unknown"
62622else
62623
62624                                                         :
62625if ${ac_cv_c_bigendian+:} false; then :
62626  $as_echo_n "(cached) " >&6
62627else
62628  ac_cv_c_bigendian=unknown
62629    # See if we're dealing with a universal compiler.
62630    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62631/* end confdefs.h.  */
62632#ifndef __APPLE_CC__
62633	       not a universal capable compiler
62634	     #endif
62635	     typedef int dummy;
62636
62637_ACEOF
62638if ac_fn_c_try_compile "$LINENO"; then :
62639
62640	# Check for potential -arch flags.  It is not universal unless
62641	# there are at least two -arch flags with different values.
62642	ac_arch=
62643	ac_prev=
62644	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
62645	 if test -n "$ac_prev"; then
62646	   case $ac_word in
62647	     i?86 | x86_64 | ppc | ppc64)
62648	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
62649		 ac_arch=$ac_word
62650	       else
62651		 ac_cv_c_bigendian=universal
62652		 break
62653	       fi
62654	       ;;
62655	   esac
62656	   ac_prev=
62657	 elif test "x$ac_word" = "x-arch"; then
62658	   ac_prev=arch
62659	 fi
62660       done
62661fi
62662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62663    if test $ac_cv_c_bigendian = unknown; then
62664      # See if sys/param.h defines the BYTE_ORDER macro.
62665      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62666/* end confdefs.h.  */
62667#include <sys/types.h>
62668	     #include <sys/param.h>
62669
62670int
62671main ()
62672{
62673#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
62674		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
62675		     && LITTLE_ENDIAN)
62676	      bogus endian macros
62677	     #endif
62678
62679  ;
62680  return 0;
62681}
62682_ACEOF
62683if ac_fn_c_try_compile "$LINENO"; then :
62684  # It does; now see whether it defined to BIG_ENDIAN or not.
62685	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62686/* end confdefs.h.  */
62687#include <sys/types.h>
62688		#include <sys/param.h>
62689
62690int
62691main ()
62692{
62693#if BYTE_ORDER != BIG_ENDIAN
62694		 not big endian
62695		#endif
62696
62697  ;
62698  return 0;
62699}
62700_ACEOF
62701if ac_fn_c_try_compile "$LINENO"; then :
62702  ac_cv_c_bigendian=yes
62703else
62704  ac_cv_c_bigendian=no
62705fi
62706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62707fi
62708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62709    fi
62710    if test $ac_cv_c_bigendian = unknown; then
62711      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
62712      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62713/* end confdefs.h.  */
62714#include <limits.h>
62715
62716int
62717main ()
62718{
62719#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
62720	      bogus endian macros
62721	     #endif
62722
62723  ;
62724  return 0;
62725}
62726_ACEOF
62727if ac_fn_c_try_compile "$LINENO"; then :
62728  # It does; now see whether it defined to _BIG_ENDIAN or not.
62729	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62730/* end confdefs.h.  */
62731#include <limits.h>
62732
62733int
62734main ()
62735{
62736#ifndef _BIG_ENDIAN
62737		 not big endian
62738		#endif
62739
62740  ;
62741  return 0;
62742}
62743_ACEOF
62744if ac_fn_c_try_compile "$LINENO"; then :
62745  ac_cv_c_bigendian=yes
62746else
62747  ac_cv_c_bigendian=no
62748fi
62749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62750fi
62751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62752    fi
62753    if test $ac_cv_c_bigendian = unknown; then
62754      # Compile a test program.
62755      if test "$cross_compiling" = yes; then :
62756  # Try to guess by grepping values from an object file.
62757	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62758/* end confdefs.h.  */
62759short int ascii_mm[] =
62760		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
62761		short int ascii_ii[] =
62762		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
62763		int use_ascii (int i) {
62764		  return ascii_mm[i] + ascii_ii[i];
62765		}
62766		short int ebcdic_ii[] =
62767		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
62768		short int ebcdic_mm[] =
62769		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
62770		int use_ebcdic (int i) {
62771		  return ebcdic_mm[i] + ebcdic_ii[i];
62772		}
62773		extern int foo;
62774
62775int
62776main ()
62777{
62778return use_ascii (foo) == use_ebcdic (foo);
62779  ;
62780  return 0;
62781}
62782_ACEOF
62783if ac_fn_c_try_compile "$LINENO"; then :
62784  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
62785	      ac_cv_c_bigendian=yes
62786	    fi
62787	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
62788	      if test "$ac_cv_c_bigendian" = unknown; then
62789		ac_cv_c_bigendian=no
62790	      else
62791		# finding both strings is unlikely to happen, but who knows?
62792		ac_cv_c_bigendian=unknown
62793	      fi
62794	    fi
62795fi
62796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
62797else
62798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62799/* end confdefs.h.  */
62800$ac_includes_default
62801int
62802main ()
62803{
62804
62805	     /* Are we little or big endian?  From Harbison&Steele.  */
62806	     union
62807	     {
62808	       long int l;
62809	       char c[sizeof (long int)];
62810	     } u;
62811	     u.l = 1;
62812	     return u.c[sizeof (long int) - 1] == 1;
62813
62814  ;
62815  return 0;
62816}
62817_ACEOF
62818if ac_fn_c_try_run "$LINENO"; then :
62819  ac_cv_c_bigendian=no
62820else
62821  ac_cv_c_bigendian=yes
62822fi
62823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
62824  conftest.$ac_objext conftest.beam conftest.$ac_ext
62825fi
62826
62827    fi
62828fi
62829:
62830 case $ac_cv_c_bigendian in #(
62831   yes)
62832     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
62833   no)
62834     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
62835   universal)
62836
62837$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
62838
62839     ;; #(
62840   *)
62841     gl_cv_cc_double_expbit0="unknown" ;;
62842 esac
62843
62844
62845fi
62846rm -f conftest*
62847
62848
62849else
62850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62851/* end confdefs.h.  */
62852
62853#include <float.h>
62854#include <stddef.h>
62855#include <stdio.h>
62856#include <string.h>
62857#define NWORDS \
62858  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
62859typedef union { double value; unsigned int word[NWORDS]; } memory_double;
62860static unsigned int ored_words[NWORDS];
62861static unsigned int anded_words[NWORDS];
62862static void add_to_ored_words (double x)
62863{
62864  memory_double m;
62865  size_t i;
62866  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
62867  memset (&m, 0, sizeof (memory_double));
62868  m.value = x;
62869  for (i = 0; i < NWORDS; i++)
62870    {
62871      ored_words[i] |= m.word[i];
62872      anded_words[i] &= m.word[i];
62873    }
62874}
62875int main ()
62876{
62877  size_t j;
62878  FILE *fp = fopen ("conftest.out", "w");
62879  if (fp == NULL)
62880    return 1;
62881  for (j = 0; j < NWORDS; j++)
62882    anded_words[j] = ~ (unsigned int) 0;
62883  add_to_ored_words (0.25);
62884  add_to_ored_words (0.5);
62885  add_to_ored_words (1.0);
62886  add_to_ored_words (2.0);
62887  add_to_ored_words (4.0);
62888  /* Remove bits that are common (e.g. if representation of the first mantissa
62889     bit is explicit).  */
62890  for (j = 0; j < NWORDS; j++)
62891    ored_words[j] &= ~anded_words[j];
62892  /* Now find the nonzero word.  */
62893  for (j = 0; j < NWORDS; j++)
62894    if (ored_words[j] != 0)
62895      break;
62896  if (j < NWORDS)
62897    {
62898      size_t i;
62899      for (i = j + 1; i < NWORDS; i++)
62900        if (ored_words[i] != 0)
62901          {
62902            fprintf (fp, "unknown");
62903            return (fclose (fp) != 0);
62904          }
62905      for (i = 0; ; i++)
62906        if ((ored_words[j] >> i) & 1)
62907          {
62908            fprintf (fp, "word %d bit %d", (int) j, (int) i);
62909            return (fclose (fp) != 0);
62910          }
62911    }
62912  fprintf (fp, "unknown");
62913  return (fclose (fp) != 0);
62914}
62915
62916_ACEOF
62917if ac_fn_c_try_run "$LINENO"; then :
62918  gl_cv_cc_double_expbit0=`cat conftest.out`
62919else
62920  gl_cv_cc_double_expbit0="unknown"
62921fi
62922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
62923  conftest.$ac_objext conftest.beam conftest.$ac_ext
62924fi
62925
62926      rm -f conftest.out
62927
62928fi
62929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
62930$as_echo "$gl_cv_cc_double_expbit0" >&6; }
62931  case "$gl_cv_cc_double_expbit0" in
62932    word*bit*)
62933      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
62934      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
62935
62936cat >>confdefs.h <<_ACEOF
62937#define DBL_EXPBIT0_WORD $word
62938_ACEOF
62939
62940
62941cat >>confdefs.h <<_ACEOF
62942#define DBL_EXPBIT0_BIT $bit
62943_ACEOF
62944
62945      ;;
62946  esac
62947
62948
62949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
62950$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
62951if ${gl_cv_cc_double_expbit0+:} false; then :
62952  $as_echo_n "(cached) " >&6
62953else
62954
62955      if test "$cross_compiling" = yes; then :
62956
62957                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62958/* end confdefs.h.  */
62959
62960#if defined arm || defined __arm || defined __arm__
62961  mixed_endianness
62962#endif
62963
62964_ACEOF
62965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
62966  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
62967  gl_cv_cc_double_expbit0="unknown"
62968else
62969
62970                                                         :
62971if ${ac_cv_c_bigendian+:} false; then :
62972  $as_echo_n "(cached) " >&6
62973else
62974  ac_cv_c_bigendian=unknown
62975    # See if we're dealing with a universal compiler.
62976    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62977/* end confdefs.h.  */
62978#ifndef __APPLE_CC__
62979	       not a universal capable compiler
62980	     #endif
62981	     typedef int dummy;
62982
62983_ACEOF
62984if ac_fn_c_try_compile "$LINENO"; then :
62985
62986	# Check for potential -arch flags.  It is not universal unless
62987	# there are at least two -arch flags with different values.
62988	ac_arch=
62989	ac_prev=
62990	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
62991	 if test -n "$ac_prev"; then
62992	   case $ac_word in
62993	     i?86 | x86_64 | ppc | ppc64)
62994	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
62995		 ac_arch=$ac_word
62996	       else
62997		 ac_cv_c_bigendian=universal
62998		 break
62999	       fi
63000	       ;;
63001	   esac
63002	   ac_prev=
63003	 elif test "x$ac_word" = "x-arch"; then
63004	   ac_prev=arch
63005	 fi
63006       done
63007fi
63008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63009    if test $ac_cv_c_bigendian = unknown; then
63010      # See if sys/param.h defines the BYTE_ORDER macro.
63011      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63012/* end confdefs.h.  */
63013#include <sys/types.h>
63014	     #include <sys/param.h>
63015
63016int
63017main ()
63018{
63019#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
63020		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
63021		     && LITTLE_ENDIAN)
63022	      bogus endian macros
63023	     #endif
63024
63025  ;
63026  return 0;
63027}
63028_ACEOF
63029if ac_fn_c_try_compile "$LINENO"; then :
63030  # It does; now see whether it defined to BIG_ENDIAN or not.
63031	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63032/* end confdefs.h.  */
63033#include <sys/types.h>
63034		#include <sys/param.h>
63035
63036int
63037main ()
63038{
63039#if BYTE_ORDER != BIG_ENDIAN
63040		 not big endian
63041		#endif
63042
63043  ;
63044  return 0;
63045}
63046_ACEOF
63047if ac_fn_c_try_compile "$LINENO"; then :
63048  ac_cv_c_bigendian=yes
63049else
63050  ac_cv_c_bigendian=no
63051fi
63052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63053fi
63054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63055    fi
63056    if test $ac_cv_c_bigendian = unknown; then
63057      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
63058      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63059/* end confdefs.h.  */
63060#include <limits.h>
63061
63062int
63063main ()
63064{
63065#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
63066	      bogus endian macros
63067	     #endif
63068
63069  ;
63070  return 0;
63071}
63072_ACEOF
63073if ac_fn_c_try_compile "$LINENO"; then :
63074  # It does; now see whether it defined to _BIG_ENDIAN or not.
63075	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63076/* end confdefs.h.  */
63077#include <limits.h>
63078
63079int
63080main ()
63081{
63082#ifndef _BIG_ENDIAN
63083		 not big endian
63084		#endif
63085
63086  ;
63087  return 0;
63088}
63089_ACEOF
63090if ac_fn_c_try_compile "$LINENO"; then :
63091  ac_cv_c_bigendian=yes
63092else
63093  ac_cv_c_bigendian=no
63094fi
63095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63096fi
63097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63098    fi
63099    if test $ac_cv_c_bigendian = unknown; then
63100      # Compile a test program.
63101      if test "$cross_compiling" = yes; then :
63102  # Try to guess by grepping values from an object file.
63103	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63104/* end confdefs.h.  */
63105short int ascii_mm[] =
63106		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
63107		short int ascii_ii[] =
63108		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
63109		int use_ascii (int i) {
63110		  return ascii_mm[i] + ascii_ii[i];
63111		}
63112		short int ebcdic_ii[] =
63113		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
63114		short int ebcdic_mm[] =
63115		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
63116		int use_ebcdic (int i) {
63117		  return ebcdic_mm[i] + ebcdic_ii[i];
63118		}
63119		extern int foo;
63120
63121int
63122main ()
63123{
63124return use_ascii (foo) == use_ebcdic (foo);
63125  ;
63126  return 0;
63127}
63128_ACEOF
63129if ac_fn_c_try_compile "$LINENO"; then :
63130  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
63131	      ac_cv_c_bigendian=yes
63132	    fi
63133	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
63134	      if test "$ac_cv_c_bigendian" = unknown; then
63135		ac_cv_c_bigendian=no
63136	      else
63137		# finding both strings is unlikely to happen, but who knows?
63138		ac_cv_c_bigendian=unknown
63139	      fi
63140	    fi
63141fi
63142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
63143else
63144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63145/* end confdefs.h.  */
63146$ac_includes_default
63147int
63148main ()
63149{
63150
63151	     /* Are we little or big endian?  From Harbison&Steele.  */
63152	     union
63153	     {
63154	       long int l;
63155	       char c[sizeof (long int)];
63156	     } u;
63157	     u.l = 1;
63158	     return u.c[sizeof (long int) - 1] == 1;
63159
63160  ;
63161  return 0;
63162}
63163_ACEOF
63164if ac_fn_c_try_run "$LINENO"; then :
63165  ac_cv_c_bigendian=no
63166else
63167  ac_cv_c_bigendian=yes
63168fi
63169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
63170  conftest.$ac_objext conftest.beam conftest.$ac_ext
63171fi
63172
63173    fi
63174fi
63175:
63176 case $ac_cv_c_bigendian in #(
63177   yes)
63178     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
63179   no)
63180     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
63181   universal)
63182
63183$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
63184
63185     ;; #(
63186   *)
63187     gl_cv_cc_double_expbit0="unknown" ;;
63188 esac
63189
63190
63191fi
63192rm -f conftest*
63193
63194
63195else
63196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63197/* end confdefs.h.  */
63198
63199#include <float.h>
63200#include <stddef.h>
63201#include <stdio.h>
63202#include <string.h>
63203#define NWORDS \
63204  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
63205typedef union { double value; unsigned int word[NWORDS]; } memory_double;
63206static unsigned int ored_words[NWORDS];
63207static unsigned int anded_words[NWORDS];
63208static void add_to_ored_words (double x)
63209{
63210  memory_double m;
63211  size_t i;
63212  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
63213  memset (&m, 0, sizeof (memory_double));
63214  m.value = x;
63215  for (i = 0; i < NWORDS; i++)
63216    {
63217      ored_words[i] |= m.word[i];
63218      anded_words[i] &= m.word[i];
63219    }
63220}
63221int main ()
63222{
63223  size_t j;
63224  FILE *fp = fopen ("conftest.out", "w");
63225  if (fp == NULL)
63226    return 1;
63227  for (j = 0; j < NWORDS; j++)
63228    anded_words[j] = ~ (unsigned int) 0;
63229  add_to_ored_words (0.25);
63230  add_to_ored_words (0.5);
63231  add_to_ored_words (1.0);
63232  add_to_ored_words (2.0);
63233  add_to_ored_words (4.0);
63234  /* Remove bits that are common (e.g. if representation of the first mantissa
63235     bit is explicit).  */
63236  for (j = 0; j < NWORDS; j++)
63237    ored_words[j] &= ~anded_words[j];
63238  /* Now find the nonzero word.  */
63239  for (j = 0; j < NWORDS; j++)
63240    if (ored_words[j] != 0)
63241      break;
63242  if (j < NWORDS)
63243    {
63244      size_t i;
63245      for (i = j + 1; i < NWORDS; i++)
63246        if (ored_words[i] != 0)
63247          {
63248            fprintf (fp, "unknown");
63249            return (fclose (fp) != 0);
63250          }
63251      for (i = 0; ; i++)
63252        if ((ored_words[j] >> i) & 1)
63253          {
63254            fprintf (fp, "word %d bit %d", (int) j, (int) i);
63255            return (fclose (fp) != 0);
63256          }
63257    }
63258  fprintf (fp, "unknown");
63259  return (fclose (fp) != 0);
63260}
63261
63262_ACEOF
63263if ac_fn_c_try_run "$LINENO"; then :
63264  gl_cv_cc_double_expbit0=`cat conftest.out`
63265else
63266  gl_cv_cc_double_expbit0="unknown"
63267fi
63268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
63269  conftest.$ac_objext conftest.beam conftest.$ac_ext
63270fi
63271
63272      rm -f conftest.out
63273
63274fi
63275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
63276$as_echo "$gl_cv_cc_double_expbit0" >&6; }
63277  case "$gl_cv_cc_double_expbit0" in
63278    word*bit*)
63279      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
63280      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
63281
63282cat >>confdefs.h <<_ACEOF
63283#define DBL_EXPBIT0_WORD $word
63284_ACEOF
63285
63286
63287cat >>confdefs.h <<_ACEOF
63288#define DBL_EXPBIT0_BIT $bit
63289_ACEOF
63290
63291      ;;
63292  esac
63293
63294
63295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
63296$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
63297if ${gl_cv_cc_float_expbit0+:} false; then :
63298  $as_echo_n "(cached) " >&6
63299else
63300
63301      if test "$cross_compiling" = yes; then :
63302  gl_cv_cc_float_expbit0="word 0 bit 23"
63303else
63304  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63305/* end confdefs.h.  */
63306
63307#include <float.h>
63308#include <stddef.h>
63309#include <stdio.h>
63310#include <string.h>
63311#define NWORDS \
63312  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
63313typedef union { float value; unsigned int word[NWORDS]; } memory_float;
63314static unsigned int ored_words[NWORDS];
63315static unsigned int anded_words[NWORDS];
63316static void add_to_ored_words (float x)
63317{
63318  memory_float m;
63319  size_t i;
63320  /* Clear it first, in case
63321     sizeof (float) < sizeof (memory_float).  */
63322  memset (&m, 0, sizeof (memory_float));
63323  m.value = x;
63324  for (i = 0; i < NWORDS; i++)
63325    {
63326      ored_words[i] |= m.word[i];
63327      anded_words[i] &= m.word[i];
63328    }
63329}
63330int main ()
63331{
63332  size_t j;
63333  FILE *fp = fopen ("conftest.out", "w");
63334  if (fp == NULL)
63335    return 1;
63336  for (j = 0; j < NWORDS; j++)
63337    anded_words[j] = ~ (unsigned int) 0;
63338  add_to_ored_words (0.25f);
63339  add_to_ored_words (0.5f);
63340  add_to_ored_words (1.0f);
63341  add_to_ored_words (2.0f);
63342  add_to_ored_words (4.0f);
63343  /* Remove bits that are common (e.g. if representation of the first mantissa
63344     bit is explicit).  */
63345  for (j = 0; j < NWORDS; j++)
63346    ored_words[j] &= ~anded_words[j];
63347  /* Now find the nonzero word.  */
63348  for (j = 0; j < NWORDS; j++)
63349    if (ored_words[j] != 0)
63350      break;
63351  if (j < NWORDS)
63352    {
63353      size_t i;
63354      for (i = j + 1; i < NWORDS; i++)
63355        if (ored_words[i] != 0)
63356          {
63357            fprintf (fp, "unknown");
63358            return (fclose (fp) != 0);
63359          }
63360      for (i = 0; ; i++)
63361        if ((ored_words[j] >> i) & 1)
63362          {
63363            fprintf (fp, "word %d bit %d", (int) j, (int) i);
63364            return (fclose (fp) != 0);
63365          }
63366    }
63367  fprintf (fp, "unknown");
63368  return (fclose (fp) != 0);
63369}
63370
63371_ACEOF
63372if ac_fn_c_try_run "$LINENO"; then :
63373  gl_cv_cc_float_expbit0=`cat conftest.out`
63374else
63375  gl_cv_cc_float_expbit0="unknown"
63376fi
63377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
63378  conftest.$ac_objext conftest.beam conftest.$ac_ext
63379fi
63380
63381      rm -f conftest.out
63382
63383fi
63384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
63385$as_echo "$gl_cv_cc_float_expbit0" >&6; }
63386  case "$gl_cv_cc_float_expbit0" in
63387    word*bit*)
63388      word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
63389      bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
63390
63391cat >>confdefs.h <<_ACEOF
63392#define FLT_EXPBIT0_WORD $word
63393_ACEOF
63394
63395
63396cat >>confdefs.h <<_ACEOF
63397#define FLT_EXPBIT0_BIT $bit
63398_ACEOF
63399
63400      ;;
63401  esac
63402
63403
63404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
63405$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
63406if ${gl_cv_cc_float_expbit0+:} false; then :
63407  $as_echo_n "(cached) " >&6
63408else
63409
63410      if test "$cross_compiling" = yes; then :
63411  gl_cv_cc_float_expbit0="word 0 bit 23"
63412else
63413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63414/* end confdefs.h.  */
63415
63416#include <float.h>
63417#include <stddef.h>
63418#include <stdio.h>
63419#include <string.h>
63420#define NWORDS \
63421  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
63422typedef union { float value; unsigned int word[NWORDS]; } memory_float;
63423static unsigned int ored_words[NWORDS];
63424static unsigned int anded_words[NWORDS];
63425static void add_to_ored_words (float x)
63426{
63427  memory_float m;
63428  size_t i;
63429  /* Clear it first, in case
63430     sizeof (float) < sizeof (memory_float).  */
63431  memset (&m, 0, sizeof (memory_float));
63432  m.value = x;
63433  for (i = 0; i < NWORDS; i++)
63434    {
63435      ored_words[i] |= m.word[i];
63436      anded_words[i] &= m.word[i];
63437    }
63438}
63439int main ()
63440{
63441  size_t j;
63442  FILE *fp = fopen ("conftest.out", "w");
63443  if (fp == NULL)
63444    return 1;
63445  for (j = 0; j < NWORDS; j++)
63446    anded_words[j] = ~ (unsigned int) 0;
63447  add_to_ored_words (0.25f);
63448  add_to_ored_words (0.5f);
63449  add_to_ored_words (1.0f);
63450  add_to_ored_words (2.0f);
63451  add_to_ored_words (4.0f);
63452  /* Remove bits that are common (e.g. if representation of the first mantissa
63453     bit is explicit).  */
63454  for (j = 0; j < NWORDS; j++)
63455    ored_words[j] &= ~anded_words[j];
63456  /* Now find the nonzero word.  */
63457  for (j = 0; j < NWORDS; j++)
63458    if (ored_words[j] != 0)
63459      break;
63460  if (j < NWORDS)
63461    {
63462      size_t i;
63463      for (i = j + 1; i < NWORDS; i++)
63464        if (ored_words[i] != 0)
63465          {
63466            fprintf (fp, "unknown");
63467            return (fclose (fp) != 0);
63468          }
63469      for (i = 0; ; i++)
63470        if ((ored_words[j] >> i) & 1)
63471          {
63472            fprintf (fp, "word %d bit %d", (int) j, (int) i);
63473            return (fclose (fp) != 0);
63474          }
63475    }
63476  fprintf (fp, "unknown");
63477  return (fclose (fp) != 0);
63478}
63479
63480_ACEOF
63481if ac_fn_c_try_run "$LINENO"; then :
63482  gl_cv_cc_float_expbit0=`cat conftest.out`
63483else
63484  gl_cv_cc_float_expbit0="unknown"
63485fi
63486rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
63487  conftest.$ac_objext conftest.beam conftest.$ac_ext
63488fi
63489
63490      rm -f conftest.out
63491
63492fi
63493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
63494$as_echo "$gl_cv_cc_float_expbit0" >&6; }
63495  case "$gl_cv_cc_float_expbit0" in
63496    word*bit*)
63497      word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
63498      bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
63499
63500cat >>confdefs.h <<_ACEOF
63501#define FLT_EXPBIT0_WORD $word
63502_ACEOF
63503
63504
63505cat >>confdefs.h <<_ACEOF
63506#define FLT_EXPBIT0_BIT $bit
63507_ACEOF
63508
63509      ;;
63510  esac
63511
63512
63513
63514     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
63515$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
63516if ${gl_cv_cc_long_double_expbit0+:} false; then :
63517  $as_echo_n "(cached) " >&6
63518else
63519
63520      if test "$cross_compiling" = yes; then :
63521
63522                              gl_cv_cc_long_double_expbit0="unknown"
63523          case "$host_os" in
63524            mingw*) # On native Windows (little-endian), we know the result
63525                    # in two cases: mingw, MSVC.
63526              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63527/* end confdefs.h.  */
63528
63529#ifdef __MINGW32__
63530 Known
63531#endif
63532
63533_ACEOF
63534if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
63535  $EGREP "Known" >/dev/null 2>&1; then :
63536  gl_cv_cc_long_double_expbit0="word 2 bit 0"
63537fi
63538rm -f conftest*
63539
63540              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63541/* end confdefs.h.  */
63542
63543#ifdef _MSC_VER
63544 Known
63545#endif
63546
63547_ACEOF
63548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
63549  $EGREP "Known" >/dev/null 2>&1; then :
63550  gl_cv_cc_long_double_expbit0="word 1 bit 20"
63551fi
63552rm -f conftest*
63553
63554              ;;
63555          esac
63556
63557else
63558  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63559/* end confdefs.h.  */
63560
63561#include <float.h>
63562#include <stddef.h>
63563#include <stdio.h>
63564#include <string.h>
63565#define NWORDS \
63566  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
63567typedef union { long double value; unsigned int word[NWORDS]; }
63568        memory_long_double;
63569static unsigned int ored_words[NWORDS];
63570static unsigned int anded_words[NWORDS];
63571static void add_to_ored_words (long double *x)
63572{
63573  memory_long_double m;
63574  size_t i;
63575  /* Clear it first, in case
63576     sizeof (long double) < sizeof (memory_long_double).  */
63577  memset (&m, 0, sizeof (memory_long_double));
63578  m.value = *x;
63579  for (i = 0; i < NWORDS; i++)
63580    {
63581      ored_words[i] |= m.word[i];
63582      anded_words[i] &= m.word[i];
63583    }
63584}
63585int main ()
63586{
63587  static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
63588  size_t j;
63589  FILE *fp = fopen ("conftest.out", "w");
63590  if (fp == NULL)
63591    return 1;
63592  for (j = 0; j < NWORDS; j++)
63593    anded_words[j] = ~ (unsigned int) 0;
63594  for (j = 0; j < 5; j++)
63595    add_to_ored_words (&samples[j]);
63596  /* Remove bits that are common (e.g. if representation of the first mantissa
63597     bit is explicit).  */
63598  for (j = 0; j < NWORDS; j++)
63599    ored_words[j] &= ~anded_words[j];
63600  /* Now find the nonzero word.  */
63601  for (j = 0; j < NWORDS; j++)
63602    if (ored_words[j] != 0)
63603      break;
63604  if (j < NWORDS)
63605    {
63606      size_t i;
63607      for (i = j + 1; i < NWORDS; i++)
63608        if (ored_words[i] != 0)
63609          {
63610            fprintf (fp, "unknown");
63611            return (fclose (fp) != 0);
63612          }
63613      for (i = 0; ; i++)
63614        if ((ored_words[j] >> i) & 1)
63615          {
63616            fprintf (fp, "word %d bit %d", (int) j, (int) i);
63617            return (fclose (fp) != 0);
63618          }
63619    }
63620  fprintf (fp, "unknown");
63621  return (fclose (fp) != 0);
63622}
63623
63624_ACEOF
63625if ac_fn_c_try_run "$LINENO"; then :
63626  gl_cv_cc_long_double_expbit0=`cat conftest.out`
63627else
63628  gl_cv_cc_long_double_expbit0="unknown"
63629fi
63630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
63631  conftest.$ac_objext conftest.beam conftest.$ac_ext
63632fi
63633
63634      rm -f conftest.out
63635
63636fi
63637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
63638$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
63639  case "$gl_cv_cc_long_double_expbit0" in
63640    word*bit*)
63641      word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
63642      bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
63643
63644cat >>confdefs.h <<_ACEOF
63645#define LDBL_EXPBIT0_WORD $word
63646_ACEOF
63647
63648
63649cat >>confdefs.h <<_ACEOF
63650#define LDBL_EXPBIT0_BIT $bit
63651_ACEOF
63652
63653      ;;
63654  esac
63655
63656
63657
63658
63659     { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
63660$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
63661if ${gl_cv_cc_long_double_expbit0+:} false; then :
63662  $as_echo_n "(cached) " >&6
63663else
63664
63665      if test "$cross_compiling" = yes; then :
63666
63667                              gl_cv_cc_long_double_expbit0="unknown"
63668          case "$host_os" in
63669            mingw*) # On native Windows (little-endian), we know the result
63670                    # in two cases: mingw, MSVC.
63671              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63672/* end confdefs.h.  */
63673
63674#ifdef __MINGW32__
63675 Known
63676#endif
63677
63678_ACEOF
63679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
63680  $EGREP "Known" >/dev/null 2>&1; then :
63681  gl_cv_cc_long_double_expbit0="word 2 bit 0"
63682fi
63683rm -f conftest*
63684
63685              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63686/* end confdefs.h.  */
63687
63688#ifdef _MSC_VER
63689 Known
63690#endif
63691
63692_ACEOF
63693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
63694  $EGREP "Known" >/dev/null 2>&1; then :
63695  gl_cv_cc_long_double_expbit0="word 1 bit 20"
63696fi
63697rm -f conftest*
63698
63699              ;;
63700          esac
63701
63702else
63703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63704/* end confdefs.h.  */
63705
63706#include <float.h>
63707#include <stddef.h>
63708#include <stdio.h>
63709#include <string.h>
63710#define NWORDS \
63711  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
63712typedef union { long double value; unsigned int word[NWORDS]; }
63713        memory_long_double;
63714static unsigned int ored_words[NWORDS];
63715static unsigned int anded_words[NWORDS];
63716static void add_to_ored_words (long double *x)
63717{
63718  memory_long_double m;
63719  size_t i;
63720  /* Clear it first, in case
63721     sizeof (long double) < sizeof (memory_long_double).  */
63722  memset (&m, 0, sizeof (memory_long_double));
63723  m.value = *x;
63724  for (i = 0; i < NWORDS; i++)
63725    {
63726      ored_words[i] |= m.word[i];
63727      anded_words[i] &= m.word[i];
63728    }
63729}
63730int main ()
63731{
63732  static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
63733  size_t j;
63734  FILE *fp = fopen ("conftest.out", "w");
63735  if (fp == NULL)
63736    return 1;
63737  for (j = 0; j < NWORDS; j++)
63738    anded_words[j] = ~ (unsigned int) 0;
63739  for (j = 0; j < 5; j++)
63740    add_to_ored_words (&samples[j]);
63741  /* Remove bits that are common (e.g. if representation of the first mantissa
63742     bit is explicit).  */
63743  for (j = 0; j < NWORDS; j++)
63744    ored_words[j] &= ~anded_words[j];
63745  /* Now find the nonzero word.  */
63746  for (j = 0; j < NWORDS; j++)
63747    if (ored_words[j] != 0)
63748      break;
63749  if (j < NWORDS)
63750    {
63751      size_t i;
63752      for (i = j + 1; i < NWORDS; i++)
63753        if (ored_words[i] != 0)
63754          {
63755            fprintf (fp, "unknown");
63756            return (fclose (fp) != 0);
63757          }
63758      for (i = 0; ; i++)
63759        if ((ored_words[j] >> i) & 1)
63760          {
63761            fprintf (fp, "word %d bit %d", (int) j, (int) i);
63762            return (fclose (fp) != 0);
63763          }
63764    }
63765  fprintf (fp, "unknown");
63766  return (fclose (fp) != 0);
63767}
63768
63769_ACEOF
63770if ac_fn_c_try_run "$LINENO"; then :
63771  gl_cv_cc_long_double_expbit0=`cat conftest.out`
63772else
63773  gl_cv_cc_long_double_expbit0="unknown"
63774fi
63775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
63776  conftest.$ac_objext conftest.beam conftest.$ac_ext
63777fi
63778
63779      rm -f conftest.out
63780
63781fi
63782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
63783$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
63784  case "$gl_cv_cc_long_double_expbit0" in
63785    word*bit*)
63786      word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
63787      bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
63788
63789cat >>confdefs.h <<_ACEOF
63790#define LDBL_EXPBIT0_WORD $word
63791_ACEOF
63792
63793
63794cat >>confdefs.h <<_ACEOF
63795#define LDBL_EXPBIT0_BIT $bit
63796_ACEOF
63797
63798      ;;
63799  esac
63800
63801
63802
63803
63804
63805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
63806$as_echo_n "checking for a traditional french locale... " >&6; }
63807if ${gt_cv_locale_fr+:} false; then :
63808  $as_echo_n "(cached) " >&6
63809else
63810
63811    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63812/* end confdefs.h.  */
63813
63814#include <locale.h>
63815#include <time.h>
63816#if HAVE_LANGINFO_CODESET
63817# include <langinfo.h>
63818#endif
63819#include <stdlib.h>
63820#include <string.h>
63821struct tm t;
63822char buf[16];
63823int main () {
63824  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
63825     imitates locale dependent behaviour by looking at the environment
63826     variables, and all locales use the UTF-8 encoding.  */
63827#if defined __BEOS__ || defined __HAIKU__
63828  return 1;
63829#else
63830  /* Check whether the given locale name is recognized by the system.  */
63831# if defined _WIN32 && !defined __CYGWIN__
63832  /* On native Windows, setlocale(category, "") looks at the system settings,
63833     not at the environment variables.  Also, when an encoding suffix such
63834     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
63835     category of the locale to "C".  */
63836  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
63837      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
63838    return 1;
63839# else
63840  if (setlocale (LC_ALL, "") == NULL) return 1;
63841# endif
63842  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
63843     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
63844     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
63845     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
63846     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
63847     some unit tests fail.
63848     On MirBSD 10, when an unsupported locale is specified, setlocale()
63849     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
63850# if HAVE_LANGINFO_CODESET
63851  {
63852    const char *cs = nl_langinfo (CODESET);
63853    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
63854        || strcmp (cs, "UTF-8") == 0)
63855      return 1;
63856  }
63857# endif
63858# ifdef __CYGWIN__
63859  /* On Cygwin, avoid locale names without encoding suffix, because the
63860     locale_charset() function relies on the encoding suffix.  Note that
63861     LC_ALL is set on the command line.  */
63862  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
63863# endif
63864  /* Check whether in the abbreviation of the second month, the second
63865     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
63866     one byte long. This excludes the UTF-8 encoding.  */
63867  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
63868  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
63869# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
63870  /* Check whether the decimal separator is a comma.
63871     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
63872     are nl_langinfo(RADIXCHAR) are both ".".  */
63873  if (localeconv () ->decimal_point[0] != ',') return 1;
63874# endif
63875  return 0;
63876#endif
63877}
63878
63879_ACEOF
63880    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
63881  (eval $ac_link) 2>&5
63882  ac_status=$?
63883  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63884  test $ac_status = 0; } && test -s conftest$ac_exeext; then
63885      case "$host_os" in
63886        # Handle native Windows specially, because there setlocale() interprets
63887        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
63888        # "fr" or "fra" as "French" or "French_France.1252",
63889        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
63890        # "ja" as "Japanese" or "Japanese_Japan.932",
63891        # and similar.
63892        mingw*)
63893          # Test for the native Windows locale name.
63894          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
63895            gt_cv_locale_fr=French_France.1252
63896          else
63897            # None found.
63898            gt_cv_locale_fr=none
63899          fi
63900          ;;
63901        *)
63902          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
63903          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
63904          # configure script would override the LC_ALL setting. Likewise for
63905          # LC_CTYPE, which is also set at the beginning of the configure script.
63906          # Test for the usual locale name.
63907          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
63908            gt_cv_locale_fr=fr_FR
63909          else
63910            # Test for the locale name with explicit encoding suffix.
63911            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
63912              gt_cv_locale_fr=fr_FR.ISO-8859-1
63913            else
63914              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
63915              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
63916                gt_cv_locale_fr=fr_FR.ISO8859-1
63917              else
63918                # Test for the HP-UX locale name.
63919                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
63920                  gt_cv_locale_fr=fr_FR.iso88591
63921                else
63922                  # Test for the Solaris 7 locale name.
63923                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
63924                    gt_cv_locale_fr=fr
63925                  else
63926                    # None found.
63927                    gt_cv_locale_fr=none
63928                  fi
63929                fi
63930              fi
63931            fi
63932          fi
63933          ;;
63934      esac
63935    fi
63936    rm -fr conftest*
63937
63938fi
63939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
63940$as_echo "$gt_cv_locale_fr" >&6; }
63941  LOCALE_FR=$gt_cv_locale_fr
63942
63943
63944
63945
63946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
63947$as_echo_n "checking for a french Unicode locale... " >&6; }
63948if ${gt_cv_locale_fr_utf8+:} false; then :
63949  $as_echo_n "(cached) " >&6
63950else
63951
63952    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63953/* end confdefs.h.  */
63954
63955#include <locale.h>
63956#include <time.h>
63957#if HAVE_LANGINFO_CODESET
63958# include <langinfo.h>
63959#endif
63960#include <stdlib.h>
63961#include <string.h>
63962struct tm t;
63963char buf[16];
63964int main () {
63965  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
63966     imitates locale dependent behaviour by looking at the environment
63967     variables, and all locales use the UTF-8 encoding.  */
63968#if !(defined __BEOS__ || defined __HAIKU__)
63969  /* Check whether the given locale name is recognized by the system.  */
63970# if defined _WIN32 && !defined __CYGWIN__
63971  /* On native Windows, setlocale(category, "") looks at the system settings,
63972     not at the environment variables.  Also, when an encoding suffix such
63973     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
63974     category of the locale to "C".  */
63975  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
63976      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
63977    return 1;
63978# else
63979  if (setlocale (LC_ALL, "") == NULL) return 1;
63980# endif
63981  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
63982     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
63983     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
63984     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
63985     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
63986     some unit tests fail.  */
63987# if HAVE_LANGINFO_CODESET
63988  {
63989    const char *cs = nl_langinfo (CODESET);
63990    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
63991      return 1;
63992  }
63993# endif
63994# ifdef __CYGWIN__
63995  /* On Cygwin, avoid locale names without encoding suffix, because the
63996     locale_charset() function relies on the encoding suffix.  Note that
63997     LC_ALL is set on the command line.  */
63998  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
63999# endif
64000  /* Check whether in the abbreviation of the second month, the second
64001     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
64002     two bytes long, with UTF-8 encoding.  */
64003  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
64004  if (strftime (buf, sizeof (buf), "%b", &t) < 4
64005      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
64006    return 1;
64007#endif
64008#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
64009  /* Check whether the decimal separator is a comma.
64010     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
64011     are nl_langinfo(RADIXCHAR) are both ".".  */
64012  if (localeconv () ->decimal_point[0] != ',') return 1;
64013#endif
64014  return 0;
64015}
64016
64017_ACEOF
64018    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
64019  (eval $ac_link) 2>&5
64020  ac_status=$?
64021  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64022  test $ac_status = 0; } && test -s conftest$ac_exeext; then
64023      case "$host_os" in
64024        # Handle native Windows specially, because there setlocale() interprets
64025        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
64026        # "fr" or "fra" as "French" or "French_France.1252",
64027        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
64028        # "ja" as "Japanese" or "Japanese_Japan.932",
64029        # and similar.
64030        mingw*)
64031          # Test for the hypothetical native Windows locale name.
64032          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64033            gt_cv_locale_fr_utf8=French_France.65001
64034          else
64035            # None found.
64036            gt_cv_locale_fr_utf8=none
64037          fi
64038          ;;
64039        *)
64040          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
64041          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
64042          # configure script would override the LC_ALL setting. Likewise for
64043          # LC_CTYPE, which is also set at the beginning of the configure script.
64044          # Test for the usual locale name.
64045          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64046            gt_cv_locale_fr_utf8=fr_FR
64047          else
64048            # Test for the locale name with explicit encoding suffix.
64049            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64050              gt_cv_locale_fr_utf8=fr_FR.UTF-8
64051            else
64052              # Test for the Solaris 7 locale name.
64053              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64054                gt_cv_locale_fr_utf8=fr.UTF-8
64055              else
64056                # None found.
64057                gt_cv_locale_fr_utf8=none
64058              fi
64059            fi
64060          fi
64061          ;;
64062      esac
64063    fi
64064    rm -fr conftest*
64065
64066fi
64067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
64068$as_echo "$gt_cv_locale_fr_utf8" >&6; }
64069  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
64070
64071
64072
64073
64074
64075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
64076$as_echo_n "checking for a traditional japanese locale... " >&6; }
64077if ${gt_cv_locale_ja+:} false; then :
64078  $as_echo_n "(cached) " >&6
64079else
64080
64081    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64082/* end confdefs.h.  */
64083
64084#include <locale.h>
64085#include <time.h>
64086#if HAVE_LANGINFO_CODESET
64087# include <langinfo.h>
64088#endif
64089#include <stdlib.h>
64090#include <string.h>
64091struct tm t;
64092char buf[16];
64093int main ()
64094{
64095  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
64096     imitates locale dependent behaviour by looking at the environment
64097     variables, and all locales use the UTF-8 encoding.  */
64098#if defined __BEOS__ || defined __HAIKU__
64099  return 1;
64100#else
64101  /* Check whether the given locale name is recognized by the system.  */
64102# if defined _WIN32 && !defined __CYGWIN__
64103  /* On native Windows, setlocale(category, "") looks at the system settings,
64104     not at the environment variables.  Also, when an encoding suffix such
64105     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
64106     category of the locale to "C".  */
64107  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
64108      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
64109    return 1;
64110# else
64111  if (setlocale (LC_ALL, "") == NULL) return 1;
64112# endif
64113  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
64114     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
64115     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
64116     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
64117     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
64118     some unit tests fail.
64119     On MirBSD 10, when an unsupported locale is specified, setlocale()
64120     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
64121# if HAVE_LANGINFO_CODESET
64122  {
64123    const char *cs = nl_langinfo (CODESET);
64124    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
64125        || strcmp (cs, "UTF-8") == 0)
64126      return 1;
64127  }
64128# endif
64129# ifdef __CYGWIN__
64130  /* On Cygwin, avoid locale names without encoding suffix, because the
64131     locale_charset() function relies on the encoding suffix.  Note that
64132     LC_ALL is set on the command line.  */
64133  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
64134# endif
64135  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
64136     on Cygwin 1.5.x.  */
64137  if (MB_CUR_MAX == 1)
64138    return 1;
64139  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
64140     This excludes the UTF-8 encoding (except on MirBSD).  */
64141  {
64142    const char *p;
64143    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
64144    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
64145    for (p = buf; *p != '\0'; p++)
64146      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
64147        return 1;
64148  }
64149  return 0;
64150#endif
64151}
64152
64153_ACEOF
64154    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
64155  (eval $ac_link) 2>&5
64156  ac_status=$?
64157  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64158  test $ac_status = 0; } && test -s conftest$ac_exeext; then
64159      case "$host_os" in
64160        # Handle native Windows specially, because there setlocale() interprets
64161        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
64162        # "fr" or "fra" as "French" or "French_France.1252",
64163        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
64164        # "ja" as "Japanese" or "Japanese_Japan.932",
64165        # and similar.
64166        mingw*)
64167          # Note that on native Windows, the Japanese locale is
64168          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
64169          # cannot use it here.
64170          gt_cv_locale_ja=none
64171          ;;
64172        *)
64173          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
64174          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
64175          # configure script would override the LC_ALL setting. Likewise for
64176          # LC_CTYPE, which is also set at the beginning of the configure script.
64177          # Test for the AIX locale name.
64178          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64179            gt_cv_locale_ja=ja_JP
64180          else
64181            # Test for the locale name with explicit encoding suffix.
64182            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64183              gt_cv_locale_ja=ja_JP.EUC-JP
64184            else
64185              # Test for the HP-UX, OSF/1, NetBSD locale name.
64186              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64187                gt_cv_locale_ja=ja_JP.eucJP
64188              else
64189                # Test for the IRIX, FreeBSD locale name.
64190                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64191                  gt_cv_locale_ja=ja_JP.EUC
64192                else
64193                  # Test for the Solaris 7 locale name.
64194                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64195                    gt_cv_locale_ja=ja
64196                  else
64197                    # Special test for NetBSD 1.6.
64198                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
64199                      gt_cv_locale_ja=ja_JP.eucJP
64200                    else
64201                      # None found.
64202                      gt_cv_locale_ja=none
64203                    fi
64204                  fi
64205                fi
64206              fi
64207            fi
64208          fi
64209          ;;
64210      esac
64211    fi
64212    rm -fr conftest*
64213
64214fi
64215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
64216$as_echo "$gt_cv_locale_ja" >&6; }
64217  LOCALE_JA=$gt_cv_locale_ja
64218
64219
64220
64221
64222
64223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
64224$as_echo_n "checking for a transitional chinese locale... " >&6; }
64225if ${gt_cv_locale_zh_CN+:} false; then :
64226  $as_echo_n "(cached) " >&6
64227else
64228
64229    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64230/* end confdefs.h.  */
64231
64232#include <locale.h>
64233#include <stdlib.h>
64234#include <time.h>
64235#if HAVE_LANGINFO_CODESET
64236# include <langinfo.h>
64237#endif
64238#include <stdlib.h>
64239#include <string.h>
64240struct tm t;
64241char buf[16];
64242int main ()
64243{
64244  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
64245     imitates locale dependent behaviour by looking at the environment
64246     variables, and all locales use the UTF-8 encoding.  */
64247#if defined __BEOS__ || defined __HAIKU__
64248  return 1;
64249#else
64250  /* Check whether the given locale name is recognized by the system.  */
64251# if defined _WIN32 && !defined __CYGWIN__
64252  /* On native Windows, setlocale(category, "") looks at the system settings,
64253     not at the environment variables.  Also, when an encoding suffix such
64254     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
64255     category of the locale to "C".  */
64256  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
64257      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
64258    return 1;
64259# else
64260  if (setlocale (LC_ALL, "") == NULL) return 1;
64261# endif
64262  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
64263     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
64264     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
64265     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
64266     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
64267     some unit tests fail.
64268     On MirBSD 10, when an unsupported locale is specified, setlocale()
64269     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
64270# if HAVE_LANGINFO_CODESET
64271  {
64272    const char *cs = nl_langinfo (CODESET);
64273    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
64274        || strcmp (cs, "UTF-8") == 0)
64275      return 1;
64276  }
64277# endif
64278# ifdef __CYGWIN__
64279  /* On Cygwin, avoid locale names without encoding suffix, because the
64280     locale_charset() function relies on the encoding suffix.  Note that
64281     LC_ALL is set on the command line.  */
64282  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
64283# endif
64284  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
64285     This excludes the UTF-8 encoding (except on MirBSD).  */
64286  {
64287    const char *p;
64288    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
64289    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
64290    for (p = buf; *p != '\0'; p++)
64291      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
64292        return 1;
64293  }
64294  /* Check whether a typical GB18030 multibyte sequence is recognized as a
64295     single wide character.  This excludes the GB2312 and GBK encodings.  */
64296  if (mblen ("\203\062\332\066", 5) != 4)
64297    return 1;
64298  return 0;
64299#endif
64300}
64301
64302_ACEOF
64303    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
64304  (eval $ac_link) 2>&5
64305  ac_status=$?
64306  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64307  test $ac_status = 0; } && test -s conftest$ac_exeext; then
64308      case "$host_os" in
64309        # Handle native Windows specially, because there setlocale() interprets
64310        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
64311        # "fr" or "fra" as "French" or "French_France.1252",
64312        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
64313        # "ja" as "Japanese" or "Japanese_Japan.932",
64314        # and similar.
64315        mingw*)
64316          # Test for the hypothetical native Windows locale name.
64317          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64318            gt_cv_locale_zh_CN=Chinese_China.54936
64319          else
64320            # None found.
64321            gt_cv_locale_zh_CN=none
64322          fi
64323          ;;
64324        solaris2.8)
64325          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
64326          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
64327          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
64328          gt_cv_locale_zh_CN=none
64329          ;;
64330        *)
64331          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
64332          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
64333          # configure script would override the LC_ALL setting. Likewise for
64334          # LC_CTYPE, which is also set at the beginning of the configure script.
64335          # Test for the locale name without encoding suffix.
64336          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64337            gt_cv_locale_zh_CN=zh_CN
64338          else
64339            # Test for the locale name with explicit encoding suffix.
64340            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64341              gt_cv_locale_zh_CN=zh_CN.GB18030
64342            else
64343              # None found.
64344              gt_cv_locale_zh_CN=none
64345            fi
64346          fi
64347          ;;
64348      esac
64349    else
64350      # If there was a link error, due to mblen(), the system is so old that
64351      # it certainly doesn't have a chinese locale.
64352      gt_cv_locale_zh_CN=none
64353    fi
64354    rm -fr conftest*
64355
64356fi
64357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
64358$as_echo "$gt_cv_locale_zh_CN" >&6; }
64359  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
64360
64361
64362
64363
64364
64365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
64366$as_echo_n "checking for a traditional french locale... " >&6; }
64367if ${gt_cv_locale_fr+:} false; then :
64368  $as_echo_n "(cached) " >&6
64369else
64370
64371    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64372/* end confdefs.h.  */
64373
64374#include <locale.h>
64375#include <time.h>
64376#if HAVE_LANGINFO_CODESET
64377# include <langinfo.h>
64378#endif
64379#include <stdlib.h>
64380#include <string.h>
64381struct tm t;
64382char buf[16];
64383int main () {
64384  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
64385     imitates locale dependent behaviour by looking at the environment
64386     variables, and all locales use the UTF-8 encoding.  */
64387#if defined __BEOS__ || defined __HAIKU__
64388  return 1;
64389#else
64390  /* Check whether the given locale name is recognized by the system.  */
64391# if defined _WIN32 && !defined __CYGWIN__
64392  /* On native Windows, setlocale(category, "") looks at the system settings,
64393     not at the environment variables.  Also, when an encoding suffix such
64394     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
64395     category of the locale to "C".  */
64396  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
64397      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
64398    return 1;
64399# else
64400  if (setlocale (LC_ALL, "") == NULL) return 1;
64401# endif
64402  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
64403     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
64404     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
64405     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
64406     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
64407     some unit tests fail.
64408     On MirBSD 10, when an unsupported locale is specified, setlocale()
64409     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
64410# if HAVE_LANGINFO_CODESET
64411  {
64412    const char *cs = nl_langinfo (CODESET);
64413    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
64414        || strcmp (cs, "UTF-8") == 0)
64415      return 1;
64416  }
64417# endif
64418# ifdef __CYGWIN__
64419  /* On Cygwin, avoid locale names without encoding suffix, because the
64420     locale_charset() function relies on the encoding suffix.  Note that
64421     LC_ALL is set on the command line.  */
64422  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
64423# endif
64424  /* Check whether in the abbreviation of the second month, the second
64425     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
64426     one byte long. This excludes the UTF-8 encoding.  */
64427  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
64428  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
64429# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
64430  /* Check whether the decimal separator is a comma.
64431     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
64432     are nl_langinfo(RADIXCHAR) are both ".".  */
64433  if (localeconv () ->decimal_point[0] != ',') return 1;
64434# endif
64435  return 0;
64436#endif
64437}
64438
64439_ACEOF
64440    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
64441  (eval $ac_link) 2>&5
64442  ac_status=$?
64443  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64444  test $ac_status = 0; } && test -s conftest$ac_exeext; then
64445      case "$host_os" in
64446        # Handle native Windows specially, because there setlocale() interprets
64447        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
64448        # "fr" or "fra" as "French" or "French_France.1252",
64449        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
64450        # "ja" as "Japanese" or "Japanese_Japan.932",
64451        # and similar.
64452        mingw*)
64453          # Test for the native Windows locale name.
64454          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64455            gt_cv_locale_fr=French_France.1252
64456          else
64457            # None found.
64458            gt_cv_locale_fr=none
64459          fi
64460          ;;
64461        *)
64462          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
64463          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
64464          # configure script would override the LC_ALL setting. Likewise for
64465          # LC_CTYPE, which is also set at the beginning of the configure script.
64466          # Test for the usual locale name.
64467          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64468            gt_cv_locale_fr=fr_FR
64469          else
64470            # Test for the locale name with explicit encoding suffix.
64471            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64472              gt_cv_locale_fr=fr_FR.ISO-8859-1
64473            else
64474              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
64475              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64476                gt_cv_locale_fr=fr_FR.ISO8859-1
64477              else
64478                # Test for the HP-UX locale name.
64479                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64480                  gt_cv_locale_fr=fr_FR.iso88591
64481                else
64482                  # Test for the Solaris 7 locale name.
64483                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64484                    gt_cv_locale_fr=fr
64485                  else
64486                    # None found.
64487                    gt_cv_locale_fr=none
64488                  fi
64489                fi
64490              fi
64491            fi
64492          fi
64493          ;;
64494      esac
64495    fi
64496    rm -fr conftest*
64497
64498fi
64499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
64500$as_echo "$gt_cv_locale_fr" >&6; }
64501  LOCALE_FR=$gt_cv_locale_fr
64502
64503
64504
64505
64506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
64507$as_echo_n "checking for a french Unicode locale... " >&6; }
64508if ${gt_cv_locale_fr_utf8+:} false; then :
64509  $as_echo_n "(cached) " >&6
64510else
64511
64512    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64513/* end confdefs.h.  */
64514
64515#include <locale.h>
64516#include <time.h>
64517#if HAVE_LANGINFO_CODESET
64518# include <langinfo.h>
64519#endif
64520#include <stdlib.h>
64521#include <string.h>
64522struct tm t;
64523char buf[16];
64524int main () {
64525  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
64526     imitates locale dependent behaviour by looking at the environment
64527     variables, and all locales use the UTF-8 encoding.  */
64528#if !(defined __BEOS__ || defined __HAIKU__)
64529  /* Check whether the given locale name is recognized by the system.  */
64530# if defined _WIN32 && !defined __CYGWIN__
64531  /* On native Windows, setlocale(category, "") looks at the system settings,
64532     not at the environment variables.  Also, when an encoding suffix such
64533     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
64534     category of the locale to "C".  */
64535  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
64536      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
64537    return 1;
64538# else
64539  if (setlocale (LC_ALL, "") == NULL) return 1;
64540# endif
64541  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
64542     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
64543     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
64544     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
64545     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
64546     some unit tests fail.  */
64547# if HAVE_LANGINFO_CODESET
64548  {
64549    const char *cs = nl_langinfo (CODESET);
64550    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
64551      return 1;
64552  }
64553# endif
64554# ifdef __CYGWIN__
64555  /* On Cygwin, avoid locale names without encoding suffix, because the
64556     locale_charset() function relies on the encoding suffix.  Note that
64557     LC_ALL is set on the command line.  */
64558  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
64559# endif
64560  /* Check whether in the abbreviation of the second month, the second
64561     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
64562     two bytes long, with UTF-8 encoding.  */
64563  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
64564  if (strftime (buf, sizeof (buf), "%b", &t) < 4
64565      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
64566    return 1;
64567#endif
64568#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
64569  /* Check whether the decimal separator is a comma.
64570     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
64571     are nl_langinfo(RADIXCHAR) are both ".".  */
64572  if (localeconv () ->decimal_point[0] != ',') return 1;
64573#endif
64574  return 0;
64575}
64576
64577_ACEOF
64578    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
64579  (eval $ac_link) 2>&5
64580  ac_status=$?
64581  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64582  test $ac_status = 0; } && test -s conftest$ac_exeext; then
64583      case "$host_os" in
64584        # Handle native Windows specially, because there setlocale() interprets
64585        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
64586        # "fr" or "fra" as "French" or "French_France.1252",
64587        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
64588        # "ja" as "Japanese" or "Japanese_Japan.932",
64589        # and similar.
64590        mingw*)
64591          # Test for the hypothetical native Windows locale name.
64592          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64593            gt_cv_locale_fr_utf8=French_France.65001
64594          else
64595            # None found.
64596            gt_cv_locale_fr_utf8=none
64597          fi
64598          ;;
64599        *)
64600          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
64601          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
64602          # configure script would override the LC_ALL setting. Likewise for
64603          # LC_CTYPE, which is also set at the beginning of the configure script.
64604          # Test for the usual locale name.
64605          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64606            gt_cv_locale_fr_utf8=fr_FR
64607          else
64608            # Test for the locale name with explicit encoding suffix.
64609            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64610              gt_cv_locale_fr_utf8=fr_FR.UTF-8
64611            else
64612              # Test for the Solaris 7 locale name.
64613              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64614                gt_cv_locale_fr_utf8=fr.UTF-8
64615              else
64616                # None found.
64617                gt_cv_locale_fr_utf8=none
64618              fi
64619            fi
64620          fi
64621          ;;
64622      esac
64623    fi
64624    rm -fr conftest*
64625
64626fi
64627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
64628$as_echo "$gt_cv_locale_fr_utf8" >&6; }
64629  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
64630
64631
64632
64633
64634
64635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
64636$as_echo_n "checking for a traditional japanese locale... " >&6; }
64637if ${gt_cv_locale_ja+:} false; then :
64638  $as_echo_n "(cached) " >&6
64639else
64640
64641    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64642/* end confdefs.h.  */
64643
64644#include <locale.h>
64645#include <time.h>
64646#if HAVE_LANGINFO_CODESET
64647# include <langinfo.h>
64648#endif
64649#include <stdlib.h>
64650#include <string.h>
64651struct tm t;
64652char buf[16];
64653int main ()
64654{
64655  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
64656     imitates locale dependent behaviour by looking at the environment
64657     variables, and all locales use the UTF-8 encoding.  */
64658#if defined __BEOS__ || defined __HAIKU__
64659  return 1;
64660#else
64661  /* Check whether the given locale name is recognized by the system.  */
64662# if defined _WIN32 && !defined __CYGWIN__
64663  /* On native Windows, setlocale(category, "") looks at the system settings,
64664     not at the environment variables.  Also, when an encoding suffix such
64665     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
64666     category of the locale to "C".  */
64667  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
64668      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
64669    return 1;
64670# else
64671  if (setlocale (LC_ALL, "") == NULL) return 1;
64672# endif
64673  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
64674     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
64675     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
64676     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
64677     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
64678     some unit tests fail.
64679     On MirBSD 10, when an unsupported locale is specified, setlocale()
64680     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
64681# if HAVE_LANGINFO_CODESET
64682  {
64683    const char *cs = nl_langinfo (CODESET);
64684    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
64685        || strcmp (cs, "UTF-8") == 0)
64686      return 1;
64687  }
64688# endif
64689# ifdef __CYGWIN__
64690  /* On Cygwin, avoid locale names without encoding suffix, because the
64691     locale_charset() function relies on the encoding suffix.  Note that
64692     LC_ALL is set on the command line.  */
64693  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
64694# endif
64695  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
64696     on Cygwin 1.5.x.  */
64697  if (MB_CUR_MAX == 1)
64698    return 1;
64699  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
64700     This excludes the UTF-8 encoding (except on MirBSD).  */
64701  {
64702    const char *p;
64703    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
64704    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
64705    for (p = buf; *p != '\0'; p++)
64706      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
64707        return 1;
64708  }
64709  return 0;
64710#endif
64711}
64712
64713_ACEOF
64714    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
64715  (eval $ac_link) 2>&5
64716  ac_status=$?
64717  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64718  test $ac_status = 0; } && test -s conftest$ac_exeext; then
64719      case "$host_os" in
64720        # Handle native Windows specially, because there setlocale() interprets
64721        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
64722        # "fr" or "fra" as "French" or "French_France.1252",
64723        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
64724        # "ja" as "Japanese" or "Japanese_Japan.932",
64725        # and similar.
64726        mingw*)
64727          # Note that on native Windows, the Japanese locale is
64728          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
64729          # cannot use it here.
64730          gt_cv_locale_ja=none
64731          ;;
64732        *)
64733          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
64734          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
64735          # configure script would override the LC_ALL setting. Likewise for
64736          # LC_CTYPE, which is also set at the beginning of the configure script.
64737          # Test for the AIX locale name.
64738          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64739            gt_cv_locale_ja=ja_JP
64740          else
64741            # Test for the locale name with explicit encoding suffix.
64742            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64743              gt_cv_locale_ja=ja_JP.EUC-JP
64744            else
64745              # Test for the HP-UX, OSF/1, NetBSD locale name.
64746              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64747                gt_cv_locale_ja=ja_JP.eucJP
64748              else
64749                # Test for the IRIX, FreeBSD locale name.
64750                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64751                  gt_cv_locale_ja=ja_JP.EUC
64752                else
64753                  # Test for the Solaris 7 locale name.
64754                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64755                    gt_cv_locale_ja=ja
64756                  else
64757                    # Special test for NetBSD 1.6.
64758                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
64759                      gt_cv_locale_ja=ja_JP.eucJP
64760                    else
64761                      # None found.
64762                      gt_cv_locale_ja=none
64763                    fi
64764                  fi
64765                fi
64766              fi
64767            fi
64768          fi
64769          ;;
64770      esac
64771    fi
64772    rm -fr conftest*
64773
64774fi
64775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
64776$as_echo "$gt_cv_locale_ja" >&6; }
64777  LOCALE_JA=$gt_cv_locale_ja
64778
64779
64780
64781
64782
64783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
64784$as_echo_n "checking for a transitional chinese locale... " >&6; }
64785if ${gt_cv_locale_zh_CN+:} false; then :
64786  $as_echo_n "(cached) " >&6
64787else
64788
64789    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64790/* end confdefs.h.  */
64791
64792#include <locale.h>
64793#include <stdlib.h>
64794#include <time.h>
64795#if HAVE_LANGINFO_CODESET
64796# include <langinfo.h>
64797#endif
64798#include <stdlib.h>
64799#include <string.h>
64800struct tm t;
64801char buf[16];
64802int main ()
64803{
64804  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
64805     imitates locale dependent behaviour by looking at the environment
64806     variables, and all locales use the UTF-8 encoding.  */
64807#if defined __BEOS__ || defined __HAIKU__
64808  return 1;
64809#else
64810  /* Check whether the given locale name is recognized by the system.  */
64811# if defined _WIN32 && !defined __CYGWIN__
64812  /* On native Windows, setlocale(category, "") looks at the system settings,
64813     not at the environment variables.  Also, when an encoding suffix such
64814     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
64815     category of the locale to "C".  */
64816  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
64817      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
64818    return 1;
64819# else
64820  if (setlocale (LC_ALL, "") == NULL) return 1;
64821# endif
64822  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
64823     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
64824     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
64825     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
64826     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
64827     some unit tests fail.
64828     On MirBSD 10, when an unsupported locale is specified, setlocale()
64829     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
64830# if HAVE_LANGINFO_CODESET
64831  {
64832    const char *cs = nl_langinfo (CODESET);
64833    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
64834        || strcmp (cs, "UTF-8") == 0)
64835      return 1;
64836  }
64837# endif
64838# ifdef __CYGWIN__
64839  /* On Cygwin, avoid locale names without encoding suffix, because the
64840     locale_charset() function relies on the encoding suffix.  Note that
64841     LC_ALL is set on the command line.  */
64842  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
64843# endif
64844  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
64845     This excludes the UTF-8 encoding (except on MirBSD).  */
64846  {
64847    const char *p;
64848    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
64849    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
64850    for (p = buf; *p != '\0'; p++)
64851      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
64852        return 1;
64853  }
64854  /* Check whether a typical GB18030 multibyte sequence is recognized as a
64855     single wide character.  This excludes the GB2312 and GBK encodings.  */
64856  if (mblen ("\203\062\332\066", 5) != 4)
64857    return 1;
64858  return 0;
64859#endif
64860}
64861
64862_ACEOF
64863    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
64864  (eval $ac_link) 2>&5
64865  ac_status=$?
64866  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64867  test $ac_status = 0; } && test -s conftest$ac_exeext; then
64868      case "$host_os" in
64869        # Handle native Windows specially, because there setlocale() interprets
64870        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
64871        # "fr" or "fra" as "French" or "French_France.1252",
64872        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
64873        # "ja" as "Japanese" or "Japanese_Japan.932",
64874        # and similar.
64875        mingw*)
64876          # Test for the hypothetical native Windows locale name.
64877          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64878            gt_cv_locale_zh_CN=Chinese_China.54936
64879          else
64880            # None found.
64881            gt_cv_locale_zh_CN=none
64882          fi
64883          ;;
64884        solaris2.8)
64885          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
64886          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
64887          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
64888          gt_cv_locale_zh_CN=none
64889          ;;
64890        *)
64891          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
64892          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
64893          # configure script would override the LC_ALL setting. Likewise for
64894          # LC_CTYPE, which is also set at the beginning of the configure script.
64895          # Test for the locale name without encoding suffix.
64896          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64897            gt_cv_locale_zh_CN=zh_CN
64898          else
64899            # Test for the locale name with explicit encoding suffix.
64900            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
64901              gt_cv_locale_zh_CN=zh_CN.GB18030
64902            else
64903              # None found.
64904              gt_cv_locale_zh_CN=none
64905            fi
64906          fi
64907          ;;
64908      esac
64909    else
64910      # If there was a link error, due to mblen(), the system is so old that
64911      # it certainly doesn't have a chinese locale.
64912      gt_cv_locale_zh_CN=none
64913    fi
64914    rm -fr conftest*
64915
64916fi
64917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
64918$as_echo "$gt_cv_locale_zh_CN" >&6; }
64919  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
64920
64921
64922
64923  if test "$ac_cv_header_winsock2_h" = yes; then
64924
64925
64926
64927
64928
64929
64930
64931
64932  gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
64933
64934  fi
64935
64936
64937
64938
64939
64940    if test "$GNULIB_LISTEN" != 1; then
64941        if test "$GNULIB_LISTEN" = 0; then
64942      GNULIB_LISTEN=$gl_module_indicator_condition
64943    else
64944      GNULIB_LISTEN="($GNULIB_LISTEN || $gl_module_indicator_condition)"
64945    fi
64946  fi
64947
64948
64949
64950
64951
64952$as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
64953
64954
64955
64956
64957
64958
64959
64960
64961
64962
64963
64964  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
64965$as_echo_n "checking for a traditional french locale... " >&6; }
64966if ${gt_cv_locale_fr+:} false; then :
64967  $as_echo_n "(cached) " >&6
64968else
64969
64970    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64971/* end confdefs.h.  */
64972
64973#include <locale.h>
64974#include <time.h>
64975#if HAVE_LANGINFO_CODESET
64976# include <langinfo.h>
64977#endif
64978#include <stdlib.h>
64979#include <string.h>
64980struct tm t;
64981char buf[16];
64982int main () {
64983  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
64984     imitates locale dependent behaviour by looking at the environment
64985     variables, and all locales use the UTF-8 encoding.  */
64986#if defined __BEOS__ || defined __HAIKU__
64987  return 1;
64988#else
64989  /* Check whether the given locale name is recognized by the system.  */
64990# if defined _WIN32 && !defined __CYGWIN__
64991  /* On native Windows, setlocale(category, "") looks at the system settings,
64992     not at the environment variables.  Also, when an encoding suffix such
64993     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
64994     category of the locale to "C".  */
64995  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
64996      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
64997    return 1;
64998# else
64999  if (setlocale (LC_ALL, "") == NULL) return 1;
65000# endif
65001  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
65002     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
65003     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
65004     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
65005     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
65006     some unit tests fail.
65007     On MirBSD 10, when an unsupported locale is specified, setlocale()
65008     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
65009# if HAVE_LANGINFO_CODESET
65010  {
65011    const char *cs = nl_langinfo (CODESET);
65012    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
65013        || strcmp (cs, "UTF-8") == 0)
65014      return 1;
65015  }
65016# endif
65017# ifdef __CYGWIN__
65018  /* On Cygwin, avoid locale names without encoding suffix, because the
65019     locale_charset() function relies on the encoding suffix.  Note that
65020     LC_ALL is set on the command line.  */
65021  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
65022# endif
65023  /* Check whether in the abbreviation of the second month, the second
65024     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
65025     one byte long. This excludes the UTF-8 encoding.  */
65026  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
65027  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
65028# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
65029  /* Check whether the decimal separator is a comma.
65030     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
65031     are nl_langinfo(RADIXCHAR) are both ".".  */
65032  if (localeconv () ->decimal_point[0] != ',') return 1;
65033# endif
65034  return 0;
65035#endif
65036}
65037
65038_ACEOF
65039    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
65040  (eval $ac_link) 2>&5
65041  ac_status=$?
65042  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65043  test $ac_status = 0; } && test -s conftest$ac_exeext; then
65044      case "$host_os" in
65045        # Handle native Windows specially, because there setlocale() interprets
65046        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
65047        # "fr" or "fra" as "French" or "French_France.1252",
65048        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
65049        # "ja" as "Japanese" or "Japanese_Japan.932",
65050        # and similar.
65051        mingw*)
65052          # Test for the native Windows locale name.
65053          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65054            gt_cv_locale_fr=French_France.1252
65055          else
65056            # None found.
65057            gt_cv_locale_fr=none
65058          fi
65059          ;;
65060        *)
65061          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
65062          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
65063          # configure script would override the LC_ALL setting. Likewise for
65064          # LC_CTYPE, which is also set at the beginning of the configure script.
65065          # Test for the usual locale name.
65066          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65067            gt_cv_locale_fr=fr_FR
65068          else
65069            # Test for the locale name with explicit encoding suffix.
65070            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65071              gt_cv_locale_fr=fr_FR.ISO-8859-1
65072            else
65073              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
65074              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65075                gt_cv_locale_fr=fr_FR.ISO8859-1
65076              else
65077                # Test for the HP-UX locale name.
65078                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65079                  gt_cv_locale_fr=fr_FR.iso88591
65080                else
65081                  # Test for the Solaris 7 locale name.
65082                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65083                    gt_cv_locale_fr=fr
65084                  else
65085                    # None found.
65086                    gt_cv_locale_fr=none
65087                  fi
65088                fi
65089              fi
65090            fi
65091          fi
65092          ;;
65093      esac
65094    fi
65095    rm -fr conftest*
65096
65097fi
65098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
65099$as_echo "$gt_cv_locale_fr" >&6; }
65100  LOCALE_FR=$gt_cv_locale_fr
65101
65102
65103
65104
65105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
65106$as_echo_n "checking for a french Unicode locale... " >&6; }
65107if ${gt_cv_locale_fr_utf8+:} false; then :
65108  $as_echo_n "(cached) " >&6
65109else
65110
65111    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65112/* end confdefs.h.  */
65113
65114#include <locale.h>
65115#include <time.h>
65116#if HAVE_LANGINFO_CODESET
65117# include <langinfo.h>
65118#endif
65119#include <stdlib.h>
65120#include <string.h>
65121struct tm t;
65122char buf[16];
65123int main () {
65124  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
65125     imitates locale dependent behaviour by looking at the environment
65126     variables, and all locales use the UTF-8 encoding.  */
65127#if !(defined __BEOS__ || defined __HAIKU__)
65128  /* Check whether the given locale name is recognized by the system.  */
65129# if defined _WIN32 && !defined __CYGWIN__
65130  /* On native Windows, setlocale(category, "") looks at the system settings,
65131     not at the environment variables.  Also, when an encoding suffix such
65132     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
65133     category of the locale to "C".  */
65134  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
65135      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
65136    return 1;
65137# else
65138  if (setlocale (LC_ALL, "") == NULL) return 1;
65139# endif
65140  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
65141     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
65142     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
65143     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
65144     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
65145     some unit tests fail.  */
65146# if HAVE_LANGINFO_CODESET
65147  {
65148    const char *cs = nl_langinfo (CODESET);
65149    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
65150      return 1;
65151  }
65152# endif
65153# ifdef __CYGWIN__
65154  /* On Cygwin, avoid locale names without encoding suffix, because the
65155     locale_charset() function relies on the encoding suffix.  Note that
65156     LC_ALL is set on the command line.  */
65157  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
65158# endif
65159  /* Check whether in the abbreviation of the second month, the second
65160     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
65161     two bytes long, with UTF-8 encoding.  */
65162  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
65163  if (strftime (buf, sizeof (buf), "%b", &t) < 4
65164      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
65165    return 1;
65166#endif
65167#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
65168  /* Check whether the decimal separator is a comma.
65169     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
65170     are nl_langinfo(RADIXCHAR) are both ".".  */
65171  if (localeconv () ->decimal_point[0] != ',') return 1;
65172#endif
65173  return 0;
65174}
65175
65176_ACEOF
65177    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
65178  (eval $ac_link) 2>&5
65179  ac_status=$?
65180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65181  test $ac_status = 0; } && test -s conftest$ac_exeext; then
65182      case "$host_os" in
65183        # Handle native Windows specially, because there setlocale() interprets
65184        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
65185        # "fr" or "fra" as "French" or "French_France.1252",
65186        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
65187        # "ja" as "Japanese" or "Japanese_Japan.932",
65188        # and similar.
65189        mingw*)
65190          # Test for the hypothetical native Windows locale name.
65191          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65192            gt_cv_locale_fr_utf8=French_France.65001
65193          else
65194            # None found.
65195            gt_cv_locale_fr_utf8=none
65196          fi
65197          ;;
65198        *)
65199          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
65200          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
65201          # configure script would override the LC_ALL setting. Likewise for
65202          # LC_CTYPE, which is also set at the beginning of the configure script.
65203          # Test for the usual locale name.
65204          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65205            gt_cv_locale_fr_utf8=fr_FR
65206          else
65207            # Test for the locale name with explicit encoding suffix.
65208            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65209              gt_cv_locale_fr_utf8=fr_FR.UTF-8
65210            else
65211              # Test for the Solaris 7 locale name.
65212              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65213                gt_cv_locale_fr_utf8=fr.UTF-8
65214              else
65215                # None found.
65216                gt_cv_locale_fr_utf8=none
65217              fi
65218            fi
65219          fi
65220          ;;
65221      esac
65222    fi
65223    rm -fr conftest*
65224
65225fi
65226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
65227$as_echo "$gt_cv_locale_fr_utf8" >&6; }
65228  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
65229
65230
65231
65232
65233
65234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
65235$as_echo_n "checking for a traditional japanese locale... " >&6; }
65236if ${gt_cv_locale_ja+:} false; then :
65237  $as_echo_n "(cached) " >&6
65238else
65239
65240    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65241/* end confdefs.h.  */
65242
65243#include <locale.h>
65244#include <time.h>
65245#if HAVE_LANGINFO_CODESET
65246# include <langinfo.h>
65247#endif
65248#include <stdlib.h>
65249#include <string.h>
65250struct tm t;
65251char buf[16];
65252int main ()
65253{
65254  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
65255     imitates locale dependent behaviour by looking at the environment
65256     variables, and all locales use the UTF-8 encoding.  */
65257#if defined __BEOS__ || defined __HAIKU__
65258  return 1;
65259#else
65260  /* Check whether the given locale name is recognized by the system.  */
65261# if defined _WIN32 && !defined __CYGWIN__
65262  /* On native Windows, setlocale(category, "") looks at the system settings,
65263     not at the environment variables.  Also, when an encoding suffix such
65264     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
65265     category of the locale to "C".  */
65266  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
65267      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
65268    return 1;
65269# else
65270  if (setlocale (LC_ALL, "") == NULL) return 1;
65271# endif
65272  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
65273     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
65274     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
65275     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
65276     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
65277     some unit tests fail.
65278     On MirBSD 10, when an unsupported locale is specified, setlocale()
65279     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
65280# if HAVE_LANGINFO_CODESET
65281  {
65282    const char *cs = nl_langinfo (CODESET);
65283    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
65284        || strcmp (cs, "UTF-8") == 0)
65285      return 1;
65286  }
65287# endif
65288# ifdef __CYGWIN__
65289  /* On Cygwin, avoid locale names without encoding suffix, because the
65290     locale_charset() function relies on the encoding suffix.  Note that
65291     LC_ALL is set on the command line.  */
65292  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
65293# endif
65294  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
65295     on Cygwin 1.5.x.  */
65296  if (MB_CUR_MAX == 1)
65297    return 1;
65298  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
65299     This excludes the UTF-8 encoding (except on MirBSD).  */
65300  {
65301    const char *p;
65302    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
65303    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
65304    for (p = buf; *p != '\0'; p++)
65305      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
65306        return 1;
65307  }
65308  return 0;
65309#endif
65310}
65311
65312_ACEOF
65313    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
65314  (eval $ac_link) 2>&5
65315  ac_status=$?
65316  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65317  test $ac_status = 0; } && test -s conftest$ac_exeext; then
65318      case "$host_os" in
65319        # Handle native Windows specially, because there setlocale() interprets
65320        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
65321        # "fr" or "fra" as "French" or "French_France.1252",
65322        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
65323        # "ja" as "Japanese" or "Japanese_Japan.932",
65324        # and similar.
65325        mingw*)
65326          # Note that on native Windows, the Japanese locale is
65327          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
65328          # cannot use it here.
65329          gt_cv_locale_ja=none
65330          ;;
65331        *)
65332          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
65333          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
65334          # configure script would override the LC_ALL setting. Likewise for
65335          # LC_CTYPE, which is also set at the beginning of the configure script.
65336          # Test for the AIX locale name.
65337          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65338            gt_cv_locale_ja=ja_JP
65339          else
65340            # Test for the locale name with explicit encoding suffix.
65341            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65342              gt_cv_locale_ja=ja_JP.EUC-JP
65343            else
65344              # Test for the HP-UX, OSF/1, NetBSD locale name.
65345              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65346                gt_cv_locale_ja=ja_JP.eucJP
65347              else
65348                # Test for the IRIX, FreeBSD locale name.
65349                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65350                  gt_cv_locale_ja=ja_JP.EUC
65351                else
65352                  # Test for the Solaris 7 locale name.
65353                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65354                    gt_cv_locale_ja=ja
65355                  else
65356                    # Special test for NetBSD 1.6.
65357                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
65358                      gt_cv_locale_ja=ja_JP.eucJP
65359                    else
65360                      # None found.
65361                      gt_cv_locale_ja=none
65362                    fi
65363                  fi
65364                fi
65365              fi
65366            fi
65367          fi
65368          ;;
65369      esac
65370    fi
65371    rm -fr conftest*
65372
65373fi
65374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
65375$as_echo "$gt_cv_locale_ja" >&6; }
65376  LOCALE_JA=$gt_cv_locale_ja
65377
65378
65379
65380
65381
65382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
65383$as_echo_n "checking for a transitional chinese locale... " >&6; }
65384if ${gt_cv_locale_zh_CN+:} false; then :
65385  $as_echo_n "(cached) " >&6
65386else
65387
65388    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65389/* end confdefs.h.  */
65390
65391#include <locale.h>
65392#include <stdlib.h>
65393#include <time.h>
65394#if HAVE_LANGINFO_CODESET
65395# include <langinfo.h>
65396#endif
65397#include <stdlib.h>
65398#include <string.h>
65399struct tm t;
65400char buf[16];
65401int main ()
65402{
65403  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
65404     imitates locale dependent behaviour by looking at the environment
65405     variables, and all locales use the UTF-8 encoding.  */
65406#if defined __BEOS__ || defined __HAIKU__
65407  return 1;
65408#else
65409  /* Check whether the given locale name is recognized by the system.  */
65410# if defined _WIN32 && !defined __CYGWIN__
65411  /* On native Windows, setlocale(category, "") looks at the system settings,
65412     not at the environment variables.  Also, when an encoding suffix such
65413     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
65414     category of the locale to "C".  */
65415  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
65416      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
65417    return 1;
65418# else
65419  if (setlocale (LC_ALL, "") == NULL) return 1;
65420# endif
65421  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
65422     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
65423     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
65424     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
65425     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
65426     some unit tests fail.
65427     On MirBSD 10, when an unsupported locale is specified, setlocale()
65428     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
65429# if HAVE_LANGINFO_CODESET
65430  {
65431    const char *cs = nl_langinfo (CODESET);
65432    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
65433        || strcmp (cs, "UTF-8") == 0)
65434      return 1;
65435  }
65436# endif
65437# ifdef __CYGWIN__
65438  /* On Cygwin, avoid locale names without encoding suffix, because the
65439     locale_charset() function relies on the encoding suffix.  Note that
65440     LC_ALL is set on the command line.  */
65441  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
65442# endif
65443  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
65444     This excludes the UTF-8 encoding (except on MirBSD).  */
65445  {
65446    const char *p;
65447    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
65448    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
65449    for (p = buf; *p != '\0'; p++)
65450      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
65451        return 1;
65452  }
65453  /* Check whether a typical GB18030 multibyte sequence is recognized as a
65454     single wide character.  This excludes the GB2312 and GBK encodings.  */
65455  if (mblen ("\203\062\332\066", 5) != 4)
65456    return 1;
65457  return 0;
65458#endif
65459}
65460
65461_ACEOF
65462    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
65463  (eval $ac_link) 2>&5
65464  ac_status=$?
65465  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65466  test $ac_status = 0; } && test -s conftest$ac_exeext; then
65467      case "$host_os" in
65468        # Handle native Windows specially, because there setlocale() interprets
65469        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
65470        # "fr" or "fra" as "French" or "French_France.1252",
65471        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
65472        # "ja" as "Japanese" or "Japanese_Japan.932",
65473        # and similar.
65474        mingw*)
65475          # Test for the hypothetical native Windows locale name.
65476          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65477            gt_cv_locale_zh_CN=Chinese_China.54936
65478          else
65479            # None found.
65480            gt_cv_locale_zh_CN=none
65481          fi
65482          ;;
65483        solaris2.8)
65484          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
65485          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
65486          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
65487          gt_cv_locale_zh_CN=none
65488          ;;
65489        *)
65490          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
65491          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
65492          # configure script would override the LC_ALL setting. Likewise for
65493          # LC_CTYPE, which is also set at the beginning of the configure script.
65494          # Test for the locale name without encoding suffix.
65495          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65496            gt_cv_locale_zh_CN=zh_CN
65497          else
65498            # Test for the locale name with explicit encoding suffix.
65499            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65500              gt_cv_locale_zh_CN=zh_CN.GB18030
65501            else
65502              # None found.
65503              gt_cv_locale_zh_CN=none
65504            fi
65505          fi
65506          ;;
65507      esac
65508    else
65509      # If there was a link error, due to mblen(), the system is so old that
65510      # it certainly doesn't have a chinese locale.
65511      gt_cv_locale_zh_CN=none
65512    fi
65513    rm -fr conftest*
65514
65515fi
65516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
65517$as_echo "$gt_cv_locale_zh_CN" >&6; }
65518  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
65519
65520
65521
65522
65523  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
65524$as_echo_n "checking for a french Unicode locale... " >&6; }
65525if ${gt_cv_locale_fr_utf8+:} false; then :
65526  $as_echo_n "(cached) " >&6
65527else
65528
65529    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65530/* end confdefs.h.  */
65531
65532#include <locale.h>
65533#include <time.h>
65534#if HAVE_LANGINFO_CODESET
65535# include <langinfo.h>
65536#endif
65537#include <stdlib.h>
65538#include <string.h>
65539struct tm t;
65540char buf[16];
65541int main () {
65542  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
65543     imitates locale dependent behaviour by looking at the environment
65544     variables, and all locales use the UTF-8 encoding.  */
65545#if !(defined __BEOS__ || defined __HAIKU__)
65546  /* Check whether the given locale name is recognized by the system.  */
65547# if defined _WIN32 && !defined __CYGWIN__
65548  /* On native Windows, setlocale(category, "") looks at the system settings,
65549     not at the environment variables.  Also, when an encoding suffix such
65550     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
65551     category of the locale to "C".  */
65552  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
65553      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
65554    return 1;
65555# else
65556  if (setlocale (LC_ALL, "") == NULL) return 1;
65557# endif
65558  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
65559     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
65560     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
65561     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
65562     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
65563     some unit tests fail.  */
65564# if HAVE_LANGINFO_CODESET
65565  {
65566    const char *cs = nl_langinfo (CODESET);
65567    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
65568      return 1;
65569  }
65570# endif
65571# ifdef __CYGWIN__
65572  /* On Cygwin, avoid locale names without encoding suffix, because the
65573     locale_charset() function relies on the encoding suffix.  Note that
65574     LC_ALL is set on the command line.  */
65575  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
65576# endif
65577  /* Check whether in the abbreviation of the second month, the second
65578     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
65579     two bytes long, with UTF-8 encoding.  */
65580  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
65581  if (strftime (buf, sizeof (buf), "%b", &t) < 4
65582      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
65583    return 1;
65584#endif
65585#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
65586  /* Check whether the decimal separator is a comma.
65587     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
65588     are nl_langinfo(RADIXCHAR) are both ".".  */
65589  if (localeconv () ->decimal_point[0] != ',') return 1;
65590#endif
65591  return 0;
65592}
65593
65594_ACEOF
65595    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
65596  (eval $ac_link) 2>&5
65597  ac_status=$?
65598  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65599  test $ac_status = 0; } && test -s conftest$ac_exeext; then
65600      case "$host_os" in
65601        # Handle native Windows specially, because there setlocale() interprets
65602        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
65603        # "fr" or "fra" as "French" or "French_France.1252",
65604        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
65605        # "ja" as "Japanese" or "Japanese_Japan.932",
65606        # and similar.
65607        mingw*)
65608          # Test for the hypothetical native Windows locale name.
65609          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65610            gt_cv_locale_fr_utf8=French_France.65001
65611          else
65612            # None found.
65613            gt_cv_locale_fr_utf8=none
65614          fi
65615          ;;
65616        *)
65617          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
65618          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
65619          # configure script would override the LC_ALL setting. Likewise for
65620          # LC_CTYPE, which is also set at the beginning of the configure script.
65621          # Test for the usual locale name.
65622          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65623            gt_cv_locale_fr_utf8=fr_FR
65624          else
65625            # Test for the locale name with explicit encoding suffix.
65626            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65627              gt_cv_locale_fr_utf8=fr_FR.UTF-8
65628            else
65629              # Test for the Solaris 7 locale name.
65630              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65631                gt_cv_locale_fr_utf8=fr.UTF-8
65632              else
65633                # None found.
65634                gt_cv_locale_fr_utf8=none
65635              fi
65636            fi
65637          fi
65638          ;;
65639      esac
65640    fi
65641    rm -fr conftest*
65642
65643fi
65644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
65645$as_echo "$gt_cv_locale_fr_utf8" >&6; }
65646  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
65647
65648
65649
65650
65651
65652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
65653$as_echo_n "checking for a traditional french locale... " >&6; }
65654if ${gt_cv_locale_fr+:} false; then :
65655  $as_echo_n "(cached) " >&6
65656else
65657
65658    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65659/* end confdefs.h.  */
65660
65661#include <locale.h>
65662#include <time.h>
65663#if HAVE_LANGINFO_CODESET
65664# include <langinfo.h>
65665#endif
65666#include <stdlib.h>
65667#include <string.h>
65668struct tm t;
65669char buf[16];
65670int main () {
65671  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
65672     imitates locale dependent behaviour by looking at the environment
65673     variables, and all locales use the UTF-8 encoding.  */
65674#if defined __BEOS__ || defined __HAIKU__
65675  return 1;
65676#else
65677  /* Check whether the given locale name is recognized by the system.  */
65678# if defined _WIN32 && !defined __CYGWIN__
65679  /* On native Windows, setlocale(category, "") looks at the system settings,
65680     not at the environment variables.  Also, when an encoding suffix such
65681     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
65682     category of the locale to "C".  */
65683  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
65684      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
65685    return 1;
65686# else
65687  if (setlocale (LC_ALL, "") == NULL) return 1;
65688# endif
65689  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
65690     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
65691     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
65692     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
65693     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
65694     some unit tests fail.
65695     On MirBSD 10, when an unsupported locale is specified, setlocale()
65696     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
65697# if HAVE_LANGINFO_CODESET
65698  {
65699    const char *cs = nl_langinfo (CODESET);
65700    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
65701        || strcmp (cs, "UTF-8") == 0)
65702      return 1;
65703  }
65704# endif
65705# ifdef __CYGWIN__
65706  /* On Cygwin, avoid locale names without encoding suffix, because the
65707     locale_charset() function relies on the encoding suffix.  Note that
65708     LC_ALL is set on the command line.  */
65709  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
65710# endif
65711  /* Check whether in the abbreviation of the second month, the second
65712     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
65713     one byte long. This excludes the UTF-8 encoding.  */
65714  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
65715  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
65716# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
65717  /* Check whether the decimal separator is a comma.
65718     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
65719     are nl_langinfo(RADIXCHAR) are both ".".  */
65720  if (localeconv () ->decimal_point[0] != ',') return 1;
65721# endif
65722  return 0;
65723#endif
65724}
65725
65726_ACEOF
65727    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
65728  (eval $ac_link) 2>&5
65729  ac_status=$?
65730  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65731  test $ac_status = 0; } && test -s conftest$ac_exeext; then
65732      case "$host_os" in
65733        # Handle native Windows specially, because there setlocale() interprets
65734        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
65735        # "fr" or "fra" as "French" or "French_France.1252",
65736        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
65737        # "ja" as "Japanese" or "Japanese_Japan.932",
65738        # and similar.
65739        mingw*)
65740          # Test for the native Windows locale name.
65741          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65742            gt_cv_locale_fr=French_France.1252
65743          else
65744            # None found.
65745            gt_cv_locale_fr=none
65746          fi
65747          ;;
65748        *)
65749          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
65750          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
65751          # configure script would override the LC_ALL setting. Likewise for
65752          # LC_CTYPE, which is also set at the beginning of the configure script.
65753          # Test for the usual locale name.
65754          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65755            gt_cv_locale_fr=fr_FR
65756          else
65757            # Test for the locale name with explicit encoding suffix.
65758            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65759              gt_cv_locale_fr=fr_FR.ISO-8859-1
65760            else
65761              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
65762              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65763                gt_cv_locale_fr=fr_FR.ISO8859-1
65764              else
65765                # Test for the HP-UX locale name.
65766                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65767                  gt_cv_locale_fr=fr_FR.iso88591
65768                else
65769                  # Test for the Solaris 7 locale name.
65770                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65771                    gt_cv_locale_fr=fr
65772                  else
65773                    # None found.
65774                    gt_cv_locale_fr=none
65775                  fi
65776                fi
65777              fi
65778            fi
65779          fi
65780          ;;
65781      esac
65782    fi
65783    rm -fr conftest*
65784
65785fi
65786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
65787$as_echo "$gt_cv_locale_fr" >&6; }
65788  LOCALE_FR=$gt_cv_locale_fr
65789
65790
65791
65792
65793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
65794$as_echo_n "checking for a french Unicode locale... " >&6; }
65795if ${gt_cv_locale_fr_utf8+:} false; then :
65796  $as_echo_n "(cached) " >&6
65797else
65798
65799    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65800/* end confdefs.h.  */
65801
65802#include <locale.h>
65803#include <time.h>
65804#if HAVE_LANGINFO_CODESET
65805# include <langinfo.h>
65806#endif
65807#include <stdlib.h>
65808#include <string.h>
65809struct tm t;
65810char buf[16];
65811int main () {
65812  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
65813     imitates locale dependent behaviour by looking at the environment
65814     variables, and all locales use the UTF-8 encoding.  */
65815#if !(defined __BEOS__ || defined __HAIKU__)
65816  /* Check whether the given locale name is recognized by the system.  */
65817# if defined _WIN32 && !defined __CYGWIN__
65818  /* On native Windows, setlocale(category, "") looks at the system settings,
65819     not at the environment variables.  Also, when an encoding suffix such
65820     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
65821     category of the locale to "C".  */
65822  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
65823      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
65824    return 1;
65825# else
65826  if (setlocale (LC_ALL, "") == NULL) return 1;
65827# endif
65828  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
65829     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
65830     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
65831     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
65832     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
65833     some unit tests fail.  */
65834# if HAVE_LANGINFO_CODESET
65835  {
65836    const char *cs = nl_langinfo (CODESET);
65837    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
65838      return 1;
65839  }
65840# endif
65841# ifdef __CYGWIN__
65842  /* On Cygwin, avoid locale names without encoding suffix, because the
65843     locale_charset() function relies on the encoding suffix.  Note that
65844     LC_ALL is set on the command line.  */
65845  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
65846# endif
65847  /* Check whether in the abbreviation of the second month, the second
65848     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
65849     two bytes long, with UTF-8 encoding.  */
65850  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
65851  if (strftime (buf, sizeof (buf), "%b", &t) < 4
65852      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
65853    return 1;
65854#endif
65855#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
65856  /* Check whether the decimal separator is a comma.
65857     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
65858     are nl_langinfo(RADIXCHAR) are both ".".  */
65859  if (localeconv () ->decimal_point[0] != ',') return 1;
65860#endif
65861  return 0;
65862}
65863
65864_ACEOF
65865    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
65866  (eval $ac_link) 2>&5
65867  ac_status=$?
65868  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65869  test $ac_status = 0; } && test -s conftest$ac_exeext; then
65870      case "$host_os" in
65871        # Handle native Windows specially, because there setlocale() interprets
65872        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
65873        # "fr" or "fra" as "French" or "French_France.1252",
65874        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
65875        # "ja" as "Japanese" or "Japanese_Japan.932",
65876        # and similar.
65877        mingw*)
65878          # Test for the hypothetical native Windows locale name.
65879          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65880            gt_cv_locale_fr_utf8=French_France.65001
65881          else
65882            # None found.
65883            gt_cv_locale_fr_utf8=none
65884          fi
65885          ;;
65886        *)
65887          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
65888          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
65889          # configure script would override the LC_ALL setting. Likewise for
65890          # LC_CTYPE, which is also set at the beginning of the configure script.
65891          # Test for the usual locale name.
65892          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65893            gt_cv_locale_fr_utf8=fr_FR
65894          else
65895            # Test for the locale name with explicit encoding suffix.
65896            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65897              gt_cv_locale_fr_utf8=fr_FR.UTF-8
65898            else
65899              # Test for the Solaris 7 locale name.
65900              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
65901                gt_cv_locale_fr_utf8=fr.UTF-8
65902              else
65903                # None found.
65904                gt_cv_locale_fr_utf8=none
65905              fi
65906            fi
65907          fi
65908          ;;
65909      esac
65910    fi
65911    rm -fr conftest*
65912
65913fi
65914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
65915$as_echo "$gt_cv_locale_fr_utf8" >&6; }
65916  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
65917
65918
65919
65920
65921
65922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
65923$as_echo_n "checking for a traditional japanese locale... " >&6; }
65924if ${gt_cv_locale_ja+:} false; then :
65925  $as_echo_n "(cached) " >&6
65926else
65927
65928    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65929/* end confdefs.h.  */
65930
65931#include <locale.h>
65932#include <time.h>
65933#if HAVE_LANGINFO_CODESET
65934# include <langinfo.h>
65935#endif
65936#include <stdlib.h>
65937#include <string.h>
65938struct tm t;
65939char buf[16];
65940int main ()
65941{
65942  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
65943     imitates locale dependent behaviour by looking at the environment
65944     variables, and all locales use the UTF-8 encoding.  */
65945#if defined __BEOS__ || defined __HAIKU__
65946  return 1;
65947#else
65948  /* Check whether the given locale name is recognized by the system.  */
65949# if defined _WIN32 && !defined __CYGWIN__
65950  /* On native Windows, setlocale(category, "") looks at the system settings,
65951     not at the environment variables.  Also, when an encoding suffix such
65952     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
65953     category of the locale to "C".  */
65954  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
65955      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
65956    return 1;
65957# else
65958  if (setlocale (LC_ALL, "") == NULL) return 1;
65959# endif
65960  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
65961     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
65962     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
65963     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
65964     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
65965     some unit tests fail.
65966     On MirBSD 10, when an unsupported locale is specified, setlocale()
65967     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
65968# if HAVE_LANGINFO_CODESET
65969  {
65970    const char *cs = nl_langinfo (CODESET);
65971    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
65972        || strcmp (cs, "UTF-8") == 0)
65973      return 1;
65974  }
65975# endif
65976# ifdef __CYGWIN__
65977  /* On Cygwin, avoid locale names without encoding suffix, because the
65978     locale_charset() function relies on the encoding suffix.  Note that
65979     LC_ALL is set on the command line.  */
65980  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
65981# endif
65982  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
65983     on Cygwin 1.5.x.  */
65984  if (MB_CUR_MAX == 1)
65985    return 1;
65986  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
65987     This excludes the UTF-8 encoding (except on MirBSD).  */
65988  {
65989    const char *p;
65990    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
65991    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
65992    for (p = buf; *p != '\0'; p++)
65993      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
65994        return 1;
65995  }
65996  return 0;
65997#endif
65998}
65999
66000_ACEOF
66001    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
66002  (eval $ac_link) 2>&5
66003  ac_status=$?
66004  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66005  test $ac_status = 0; } && test -s conftest$ac_exeext; then
66006      case "$host_os" in
66007        # Handle native Windows specially, because there setlocale() interprets
66008        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
66009        # "fr" or "fra" as "French" or "French_France.1252",
66010        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
66011        # "ja" as "Japanese" or "Japanese_Japan.932",
66012        # and similar.
66013        mingw*)
66014          # Note that on native Windows, the Japanese locale is
66015          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
66016          # cannot use it here.
66017          gt_cv_locale_ja=none
66018          ;;
66019        *)
66020          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
66021          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
66022          # configure script would override the LC_ALL setting. Likewise for
66023          # LC_CTYPE, which is also set at the beginning of the configure script.
66024          # Test for the AIX locale name.
66025          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66026            gt_cv_locale_ja=ja_JP
66027          else
66028            # Test for the locale name with explicit encoding suffix.
66029            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66030              gt_cv_locale_ja=ja_JP.EUC-JP
66031            else
66032              # Test for the HP-UX, OSF/1, NetBSD locale name.
66033              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66034                gt_cv_locale_ja=ja_JP.eucJP
66035              else
66036                # Test for the IRIX, FreeBSD locale name.
66037                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66038                  gt_cv_locale_ja=ja_JP.EUC
66039                else
66040                  # Test for the Solaris 7 locale name.
66041                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66042                    gt_cv_locale_ja=ja
66043                  else
66044                    # Special test for NetBSD 1.6.
66045                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
66046                      gt_cv_locale_ja=ja_JP.eucJP
66047                    else
66048                      # None found.
66049                      gt_cv_locale_ja=none
66050                    fi
66051                  fi
66052                fi
66053              fi
66054            fi
66055          fi
66056          ;;
66057      esac
66058    fi
66059    rm -fr conftest*
66060
66061fi
66062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
66063$as_echo "$gt_cv_locale_ja" >&6; }
66064  LOCALE_JA=$gt_cv_locale_ja
66065
66066
66067
66068
66069
66070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
66071$as_echo_n "checking for a transitional chinese locale... " >&6; }
66072if ${gt_cv_locale_zh_CN+:} false; then :
66073  $as_echo_n "(cached) " >&6
66074else
66075
66076    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66077/* end confdefs.h.  */
66078
66079#include <locale.h>
66080#include <stdlib.h>
66081#include <time.h>
66082#if HAVE_LANGINFO_CODESET
66083# include <langinfo.h>
66084#endif
66085#include <stdlib.h>
66086#include <string.h>
66087struct tm t;
66088char buf[16];
66089int main ()
66090{
66091  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
66092     imitates locale dependent behaviour by looking at the environment
66093     variables, and all locales use the UTF-8 encoding.  */
66094#if defined __BEOS__ || defined __HAIKU__
66095  return 1;
66096#else
66097  /* Check whether the given locale name is recognized by the system.  */
66098# if defined _WIN32 && !defined __CYGWIN__
66099  /* On native Windows, setlocale(category, "") looks at the system settings,
66100     not at the environment variables.  Also, when an encoding suffix such
66101     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
66102     category of the locale to "C".  */
66103  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
66104      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
66105    return 1;
66106# else
66107  if (setlocale (LC_ALL, "") == NULL) return 1;
66108# endif
66109  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
66110     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
66111     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
66112     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
66113     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
66114     some unit tests fail.
66115     On MirBSD 10, when an unsupported locale is specified, setlocale()
66116     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
66117# if HAVE_LANGINFO_CODESET
66118  {
66119    const char *cs = nl_langinfo (CODESET);
66120    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
66121        || strcmp (cs, "UTF-8") == 0)
66122      return 1;
66123  }
66124# endif
66125# ifdef __CYGWIN__
66126  /* On Cygwin, avoid locale names without encoding suffix, because the
66127     locale_charset() function relies on the encoding suffix.  Note that
66128     LC_ALL is set on the command line.  */
66129  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
66130# endif
66131  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
66132     This excludes the UTF-8 encoding (except on MirBSD).  */
66133  {
66134    const char *p;
66135    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
66136    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
66137    for (p = buf; *p != '\0'; p++)
66138      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
66139        return 1;
66140  }
66141  /* Check whether a typical GB18030 multibyte sequence is recognized as a
66142     single wide character.  This excludes the GB2312 and GBK encodings.  */
66143  if (mblen ("\203\062\332\066", 5) != 4)
66144    return 1;
66145  return 0;
66146#endif
66147}
66148
66149_ACEOF
66150    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
66151  (eval $ac_link) 2>&5
66152  ac_status=$?
66153  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66154  test $ac_status = 0; } && test -s conftest$ac_exeext; then
66155      case "$host_os" in
66156        # Handle native Windows specially, because there setlocale() interprets
66157        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
66158        # "fr" or "fra" as "French" or "French_France.1252",
66159        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
66160        # "ja" as "Japanese" or "Japanese_Japan.932",
66161        # and similar.
66162        mingw*)
66163          # Test for the hypothetical native Windows locale name.
66164          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66165            gt_cv_locale_zh_CN=Chinese_China.54936
66166          else
66167            # None found.
66168            gt_cv_locale_zh_CN=none
66169          fi
66170          ;;
66171        solaris2.8)
66172          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
66173          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
66174          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
66175          gt_cv_locale_zh_CN=none
66176          ;;
66177        *)
66178          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
66179          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
66180          # configure script would override the LC_ALL setting. Likewise for
66181          # LC_CTYPE, which is also set at the beginning of the configure script.
66182          # Test for the locale name without encoding suffix.
66183          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66184            gt_cv_locale_zh_CN=zh_CN
66185          else
66186            # Test for the locale name with explicit encoding suffix.
66187            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66188              gt_cv_locale_zh_CN=zh_CN.GB18030
66189            else
66190              # None found.
66191              gt_cv_locale_zh_CN=none
66192            fi
66193          fi
66194          ;;
66195      esac
66196    else
66197      # If there was a link error, due to mblen(), the system is so old that
66198      # it certainly doesn't have a chinese locale.
66199      gt_cv_locale_zh_CN=none
66200    fi
66201    rm -fr conftest*
66202
66203fi
66204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
66205$as_echo "$gt_cv_locale_zh_CN" >&6; }
66206  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
66207
66208
66209
66210
66211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
66212$as_echo_n "checking for a french Unicode locale... " >&6; }
66213if ${gt_cv_locale_fr_utf8+:} false; then :
66214  $as_echo_n "(cached) " >&6
66215else
66216
66217    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66218/* end confdefs.h.  */
66219
66220#include <locale.h>
66221#include <time.h>
66222#if HAVE_LANGINFO_CODESET
66223# include <langinfo.h>
66224#endif
66225#include <stdlib.h>
66226#include <string.h>
66227struct tm t;
66228char buf[16];
66229int main () {
66230  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
66231     imitates locale dependent behaviour by looking at the environment
66232     variables, and all locales use the UTF-8 encoding.  */
66233#if !(defined __BEOS__ || defined __HAIKU__)
66234  /* Check whether the given locale name is recognized by the system.  */
66235# if defined _WIN32 && !defined __CYGWIN__
66236  /* On native Windows, setlocale(category, "") looks at the system settings,
66237     not at the environment variables.  Also, when an encoding suffix such
66238     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
66239     category of the locale to "C".  */
66240  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
66241      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
66242    return 1;
66243# else
66244  if (setlocale (LC_ALL, "") == NULL) return 1;
66245# endif
66246  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
66247     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
66248     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
66249     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
66250     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
66251     some unit tests fail.  */
66252# if HAVE_LANGINFO_CODESET
66253  {
66254    const char *cs = nl_langinfo (CODESET);
66255    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
66256      return 1;
66257  }
66258# endif
66259# ifdef __CYGWIN__
66260  /* On Cygwin, avoid locale names without encoding suffix, because the
66261     locale_charset() function relies on the encoding suffix.  Note that
66262     LC_ALL is set on the command line.  */
66263  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
66264# endif
66265  /* Check whether in the abbreviation of the second month, the second
66266     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
66267     two bytes long, with UTF-8 encoding.  */
66268  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
66269  if (strftime (buf, sizeof (buf), "%b", &t) < 4
66270      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
66271    return 1;
66272#endif
66273#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
66274  /* Check whether the decimal separator is a comma.
66275     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
66276     are nl_langinfo(RADIXCHAR) are both ".".  */
66277  if (localeconv () ->decimal_point[0] != ',') return 1;
66278#endif
66279  return 0;
66280}
66281
66282_ACEOF
66283    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
66284  (eval $ac_link) 2>&5
66285  ac_status=$?
66286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66287  test $ac_status = 0; } && test -s conftest$ac_exeext; then
66288      case "$host_os" in
66289        # Handle native Windows specially, because there setlocale() interprets
66290        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
66291        # "fr" or "fra" as "French" or "French_France.1252",
66292        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
66293        # "ja" as "Japanese" or "Japanese_Japan.932",
66294        # and similar.
66295        mingw*)
66296          # Test for the hypothetical native Windows locale name.
66297          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66298            gt_cv_locale_fr_utf8=French_France.65001
66299          else
66300            # None found.
66301            gt_cv_locale_fr_utf8=none
66302          fi
66303          ;;
66304        *)
66305          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
66306          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
66307          # configure script would override the LC_ALL setting. Likewise for
66308          # LC_CTYPE, which is also set at the beginning of the configure script.
66309          # Test for the usual locale name.
66310          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66311            gt_cv_locale_fr_utf8=fr_FR
66312          else
66313            # Test for the locale name with explicit encoding suffix.
66314            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66315              gt_cv_locale_fr_utf8=fr_FR.UTF-8
66316            else
66317              # Test for the Solaris 7 locale name.
66318              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66319                gt_cv_locale_fr_utf8=fr.UTF-8
66320              else
66321                # None found.
66322                gt_cv_locale_fr_utf8=none
66323              fi
66324            fi
66325          fi
66326          ;;
66327      esac
66328    fi
66329    rm -fr conftest*
66330
66331fi
66332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
66333$as_echo "$gt_cv_locale_fr_utf8" >&6; }
66334  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
66335
66336
66337
66338
66339
66340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
66341$as_echo_n "checking for a transitional chinese locale... " >&6; }
66342if ${gt_cv_locale_zh_CN+:} false; then :
66343  $as_echo_n "(cached) " >&6
66344else
66345
66346    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66347/* end confdefs.h.  */
66348
66349#include <locale.h>
66350#include <stdlib.h>
66351#include <time.h>
66352#if HAVE_LANGINFO_CODESET
66353# include <langinfo.h>
66354#endif
66355#include <stdlib.h>
66356#include <string.h>
66357struct tm t;
66358char buf[16];
66359int main ()
66360{
66361  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
66362     imitates locale dependent behaviour by looking at the environment
66363     variables, and all locales use the UTF-8 encoding.  */
66364#if defined __BEOS__ || defined __HAIKU__
66365  return 1;
66366#else
66367  /* Check whether the given locale name is recognized by the system.  */
66368# if defined _WIN32 && !defined __CYGWIN__
66369  /* On native Windows, setlocale(category, "") looks at the system settings,
66370     not at the environment variables.  Also, when an encoding suffix such
66371     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
66372     category of the locale to "C".  */
66373  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
66374      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
66375    return 1;
66376# else
66377  if (setlocale (LC_ALL, "") == NULL) return 1;
66378# endif
66379  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
66380     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
66381     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
66382     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
66383     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
66384     some unit tests fail.
66385     On MirBSD 10, when an unsupported locale is specified, setlocale()
66386     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
66387# if HAVE_LANGINFO_CODESET
66388  {
66389    const char *cs = nl_langinfo (CODESET);
66390    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
66391        || strcmp (cs, "UTF-8") == 0)
66392      return 1;
66393  }
66394# endif
66395# ifdef __CYGWIN__
66396  /* On Cygwin, avoid locale names without encoding suffix, because the
66397     locale_charset() function relies on the encoding suffix.  Note that
66398     LC_ALL is set on the command line.  */
66399  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
66400# endif
66401  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
66402     This excludes the UTF-8 encoding (except on MirBSD).  */
66403  {
66404    const char *p;
66405    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
66406    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
66407    for (p = buf; *p != '\0'; p++)
66408      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
66409        return 1;
66410  }
66411  /* Check whether a typical GB18030 multibyte sequence is recognized as a
66412     single wide character.  This excludes the GB2312 and GBK encodings.  */
66413  if (mblen ("\203\062\332\066", 5) != 4)
66414    return 1;
66415  return 0;
66416#endif
66417}
66418
66419_ACEOF
66420    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
66421  (eval $ac_link) 2>&5
66422  ac_status=$?
66423  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66424  test $ac_status = 0; } && test -s conftest$ac_exeext; then
66425      case "$host_os" in
66426        # Handle native Windows specially, because there setlocale() interprets
66427        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
66428        # "fr" or "fra" as "French" or "French_France.1252",
66429        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
66430        # "ja" as "Japanese" or "Japanese_Japan.932",
66431        # and similar.
66432        mingw*)
66433          # Test for the hypothetical native Windows locale name.
66434          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66435            gt_cv_locale_zh_CN=Chinese_China.54936
66436          else
66437            # None found.
66438            gt_cv_locale_zh_CN=none
66439          fi
66440          ;;
66441        solaris2.8)
66442          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
66443          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
66444          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
66445          gt_cv_locale_zh_CN=none
66446          ;;
66447        *)
66448          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
66449          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
66450          # configure script would override the LC_ALL setting. Likewise for
66451          # LC_CTYPE, which is also set at the beginning of the configure script.
66452          # Test for the locale name without encoding suffix.
66453          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66454            gt_cv_locale_zh_CN=zh_CN
66455          else
66456            # Test for the locale name with explicit encoding suffix.
66457            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
66458              gt_cv_locale_zh_CN=zh_CN.GB18030
66459            else
66460              # None found.
66461              gt_cv_locale_zh_CN=none
66462            fi
66463          fi
66464          ;;
66465      esac
66466    else
66467      # If there was a link error, due to mblen(), the system is so old that
66468      # it certainly doesn't have a chinese locale.
66469      gt_cv_locale_zh_CN=none
66470    fi
66471    rm -fr conftest*
66472
66473fi
66474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
66475$as_echo "$gt_cv_locale_zh_CN" >&6; }
66476  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
66477
66478
66479
66480
66481
66482  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
66483  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
66484  # irrelevant for anonymous mappings.
66485  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
66486if test "x$ac_cv_func_mmap" = xyes; then :
66487  gl_have_mmap=yes
66488else
66489  gl_have_mmap=no
66490fi
66491
66492
66493  # Try to allow MAP_ANONYMOUS.
66494  gl_have_mmap_anonymous=no
66495  if test $gl_have_mmap = yes; then
66496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
66497$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
66498    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66499/* end confdefs.h.  */
66500
66501#include <sys/mman.h>
66502#ifdef MAP_ANONYMOUS
66503    I cannot identify this map
66504#endif
66505
66506_ACEOF
66507if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
66508  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
66509  gl_have_mmap_anonymous=yes
66510fi
66511rm -f conftest*
66512
66513    if test $gl_have_mmap_anonymous != yes; then
66514      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66515/* end confdefs.h.  */
66516
66517#include <sys/mman.h>
66518#ifdef MAP_ANON
66519    I cannot identify this map
66520#endif
66521
66522_ACEOF
66523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
66524  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
66525
66526$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
66527
66528         gl_have_mmap_anonymous=yes
66529fi
66530rm -f conftest*
66531
66532    fi
66533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
66534$as_echo "$gl_have_mmap_anonymous" >&6; }
66535    if test $gl_have_mmap_anonymous = yes; then
66536
66537$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
66538
66539    fi
66540  fi
66541
66542
66543
66544
66545
66546
66547
66548
66549
66550
66551
66552
66553
66554 nanosleep_save_libs=$LIBS
66555
66556 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
66557 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
66558 LIB_NANOSLEEP=
66559
66560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
66561$as_echo_n "checking for library containing nanosleep... " >&6; }
66562if ${ac_cv_search_nanosleep+:} false; then :
66563  $as_echo_n "(cached) " >&6
66564else
66565  ac_func_search_save_LIBS=$LIBS
66566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66567/* end confdefs.h.  */
66568
66569/* Override any GCC internal prototype to avoid an error.
66570   Use char because int might match the return type of a GCC
66571   builtin and then its argument prototype would still apply.  */
66572#ifdef __cplusplus
66573extern "C"
66574#endif
66575char nanosleep ();
66576int
66577main ()
66578{
66579return nanosleep ();
66580  ;
66581  return 0;
66582}
66583_ACEOF
66584for ac_lib in '' rt posix4; do
66585  if test -z "$ac_lib"; then
66586    ac_res="none required"
66587  else
66588    ac_res=-l$ac_lib
66589    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
66590  fi
66591  if ac_fn_c_try_link "$LINENO"; then :
66592  ac_cv_search_nanosleep=$ac_res
66593fi
66594rm -f core conftest.err conftest.$ac_objext \
66595    conftest$ac_exeext
66596  if ${ac_cv_search_nanosleep+:} false; then :
66597  break
66598fi
66599done
66600if ${ac_cv_search_nanosleep+:} false; then :
66601
66602else
66603  ac_cv_search_nanosleep=no
66604fi
66605rm conftest.$ac_ext
66606LIBS=$ac_func_search_save_LIBS
66607fi
66608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
66609$as_echo "$ac_cv_search_nanosleep" >&6; }
66610ac_res=$ac_cv_search_nanosleep
66611if test "$ac_res" != no; then :
66612  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
66613  test "$ac_cv_search_nanosleep" = "none required" ||
66614                 LIB_NANOSLEEP=$ac_cv_search_nanosleep
66615fi
66616
66617 if test "x$ac_cv_search_nanosleep" != xno; then
66618
66619
66620   if test $APPLE_UNIVERSAL_BUILD = 1; then
66621     # A universal build on Apple Mac OS X platforms.
66622     # The test result would be 'no (mishandles large arguments)' in 64-bit
66623     # mode but 'yes' in 32-bit mode. But we need a configuration result that
66624     # is valid in both modes.
66625     gl_cv_func_nanosleep='no (mishandles large arguments)'
66626   fi
66627
66628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
66629$as_echo_n "checking for working nanosleep... " >&6; }
66630if ${gl_cv_func_nanosleep+:} false; then :
66631  $as_echo_n "(cached) " >&6
66632else
66633
66634     if test "$cross_compiling" = yes; then :
66635  case "$host_os" in           linux*) # Guess it halfway works when the kernel is Linux.
66636            gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
66637          mingw*) # Guess no on native Windows.
66638            gl_cv_func_nanosleep='guessing no' ;;
66639          *)      # If we don't know, obey --enable-cross-guesses.
66640            gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
66641        esac
66642
66643else
66644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66645/* end confdefs.h.  */
66646
66647          #include <errno.h>
66648          #include <limits.h>
66649          #include <signal.h>
66650          #if HAVE_SYS_TIME_H
66651           #include <sys/time.h>
66652          #endif
66653          #include <time.h>
66654          #include <unistd.h>
66655          #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
66656          #define TYPE_MAXIMUM(t) \
66657            ((t) (! TYPE_SIGNED (t) \
66658                  ? (t) -1 \
66659                  : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
66660
66661          #if HAVE_DECL_ALARM
66662          static void
66663          check_for_SIGALRM (int sig)
66664          {
66665            if (sig != SIGALRM)
66666              _exit (1);
66667          }
66668          #endif
66669
66670          int
66671          main ()
66672          {
66673            static struct timespec ts_sleep;
66674            static struct timespec ts_remaining;
66675            /* Test for major problems first.  */
66676            if (! nanosleep)
66677              return 2;
66678            ts_sleep.tv_sec = 0;
66679            ts_sleep.tv_nsec = 1;
66680            #if HAVE_DECL_ALARM
66681            {
66682              static struct sigaction act;
66683              act.sa_handler = check_for_SIGALRM;
66684              sigemptyset (&act.sa_mask);
66685              sigaction (SIGALRM, &act, NULL);
66686              alarm (1);
66687              if (nanosleep (&ts_sleep, NULL) != 0)
66688                return 3;
66689              /* Test for a minor problem: the handling of large arguments.  */
66690              ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
66691              ts_sleep.tv_nsec = 999999999;
66692              alarm (1);
66693              if (nanosleep (&ts_sleep, &ts_remaining) != -1)
66694                return 4;
66695              if (errno != EINTR)
66696                return 5;
66697              if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
66698                return 6;
66699            }
66700            #else /* A simpler test for native Windows.  */
66701            if (nanosleep (&ts_sleep, &ts_remaining) < 0)
66702              return 3;
66703            #endif
66704            return 0;
66705          }
66706_ACEOF
66707if ac_fn_c_try_run "$LINENO"; then :
66708  gl_cv_func_nanosleep=yes
66709else
66710  case $? in         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';;         *)   gl_cv_func_nanosleep=no;;
66711        esac
66712fi
66713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
66714  conftest.$ac_objext conftest.beam conftest.$ac_ext
66715fi
66716
66717
66718fi
66719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
66720$as_echo "$gl_cv_func_nanosleep" >&6; }
66721   case "$gl_cv_func_nanosleep" in
66722     *yes)
66723       REPLACE_NANOSLEEP=0
66724       ;;
66725     *)
66726       REPLACE_NANOSLEEP=1
66727       case "$gl_cv_func_nanosleep" in
66728         *"mishandles large arguments"*)
66729
66730$as_echo "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
66731
66732           ;;
66733         *)
66734           # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
66735           for ac_lib in $LIBSOCKET; do
66736             case " $LIB_NANOSLEEP " in
66737               *" $ac_lib "*) ;;
66738               *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
66739             esac
66740           done
66741           ;;
66742       esac
66743       ;;
66744   esac
66745 else
66746   HAVE_NANOSLEEP=0
66747 fi
66748 LIBS=$nanosleep_save_libs
66749
66750  if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
66751
66752
66753
66754
66755
66756
66757
66758
66759  gltests_LIBOBJS="$gltests_LIBOBJS nanosleep.$ac_objext"
66760
66761
66762
66763  :
66764
66765  fi
66766
66767
66768
66769
66770
66771    if test "$GNULIB_NANOSLEEP" != 1; then
66772        if test "$GNULIB_NANOSLEEP" = 0; then
66773      GNULIB_NANOSLEEP=$gl_module_indicator_condition
66774    else
66775      GNULIB_NANOSLEEP="($GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
66776    fi
66777  fi
66778
66779
66780
66781
66782
66783$as_echo "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
66784
66785
66786
66787
66788
66789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
66790$as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
66791if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
66792  $as_echo_n "(cached) " >&6
66793else
66794
66795      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66796/* end confdefs.h.  */
66797#include <netinet/in.h>
66798int
66799main ()
66800{
66801
66802  ;
66803  return 0;
66804}
66805_ACEOF
66806if ac_fn_c_try_compile "$LINENO"; then :
66807  gl_cv_header_netinet_in_h_selfcontained=yes
66808else
66809  gl_cv_header_netinet_in_h_selfcontained=no
66810fi
66811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66812
66813fi
66814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
66815$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
66816  if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
66817    NETINET_IN_H=''
66818  else
66819    NETINET_IN_H='netinet/in.h'
66820    for ac_header in netinet/in.h
66821do :
66822  ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
66823if test "x$ac_cv_header_netinet_in_h" = xyes; then :
66824  cat >>confdefs.h <<_ACEOF
66825#define HAVE_NETINET_IN_H 1
66826_ACEOF
66827
66828fi
66829
66830done
66831
66832
66833
66834
66835
66836
66837
66838
66839
66840
66841     if test $gl_cv_have_include_next = yes; then
66842       gl_cv_next_netinet_in_h='<'netinet/in.h'>'
66843     else
66844       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
66845$as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
66846if ${gl_cv_next_netinet_in_h+:} false; then :
66847  $as_echo_n "(cached) " >&6
66848else
66849
66850             if test $ac_cv_header_netinet_in_h = yes; then
66851
66852
66853
66854
66855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66856/* end confdefs.h.  */
66857#include <netinet/in.h>
66858_ACEOF
66859                case "$host_os" in
66860    aix*) gl_absname_cpp="$ac_cpp -C" ;;
66861    *)    gl_absname_cpp="$ac_cpp" ;;
66862  esac
66863
66864  case "$host_os" in
66865    mingw*)
66866                                          gl_dirsep_regex='[/\\]'
66867      ;;
66868    *)
66869      gl_dirsep_regex='\/'
66870      ;;
66871  esac
66872      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
66873  gl_header_literal_regex=`echo 'netinet/in.h' \
66874                           | sed -e "$gl_make_literal_regex_sed"`
66875  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
66876      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
66877      s|^/[^/]|//&|
66878      p
66879      q
66880    }'
66881
66882        gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
66883  sed -n "$gl_absolute_header_sed"`
66884
66885           gl_header=$gl_cv_absolute_netinet_in_h
66886           gl_cv_next_netinet_in_h='"'$gl_header'"'
66887          else
66888               gl_cv_next_netinet_in_h='<'netinet/in.h'>'
66889             fi
66890
66891
66892fi
66893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
66894$as_echo "$gl_cv_next_netinet_in_h" >&6; }
66895     fi
66896     NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
66897
66898     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
66899       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
66900       gl_next_as_first_directive='<'netinet/in.h'>'
66901     else
66902       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
66903       gl_next_as_first_directive=$gl_cv_next_netinet_in_h
66904     fi
66905     NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
66906
66907
66908
66909
66910    if test $ac_cv_header_netinet_in_h = yes; then
66911      HAVE_NETINET_IN_H=1
66912    else
66913      HAVE_NETINET_IN_H=0
66914    fi
66915
66916  fi
66917
66918   if test -n "$NETINET_IN_H"; then
66919  GL_GENERATE_NETINET_IN_H_TRUE=
66920  GL_GENERATE_NETINET_IN_H_FALSE='#'
66921else
66922  GL_GENERATE_NETINET_IN_H_TRUE='#'
66923  GL_GENERATE_NETINET_IN_H_FALSE=
66924fi
66925
66926
66927
66928
66929
66930
66931
66932
66933             if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
66934            REPLACE_PERROR=1
66935  fi
66936  case ${gl_cv_func_strerror_r_works-unset} in
66937    unset|*yes)
66938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
66939$as_echo_n "checking whether perror matches strerror... " >&6; }
66940if ${gl_cv_func_perror_works+:} false; then :
66941  $as_echo_n "(cached) " >&6
66942else
66943  if test "$cross_compiling" = yes; then :
66944  case "$host_os" in
66945                       # Guess yes on musl systems.
66946              *-musl*) gl_cv_func_perror_works="guessing yes" ;;
66947                       # Guess yes on native Windows.
66948              mingw*)  gl_cv_func_perror_works="guessing yes" ;;
66949                       # Otherwise obey --enable-cross-guesses.
66950              *)       gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
66951            esac
66952
66953else
66954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66955/* end confdefs.h.  */
66956#include <errno.h>
66957                #include <stdio.h>
66958                #include <stdlib.h>
66959                #include <string.h>
66960
66961int
66962main ()
66963{
66964char *str = strerror (-1);
66965                if (!getenv("CONFTEST_OUTPUT")) return 0;
66966                if (!str) str = "";
66967                puts (str);
66968                errno = -1;
66969                perror ("");
66970                return 0;
66971
66972  ;
66973  return 0;
66974}
66975_ACEOF
66976if ac_fn_c_try_run "$LINENO"; then :
66977  if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
66978               && cmp conftest.txt1 conftest.txt2 >/dev/null; then
66979              gl_cv_func_perror_works=yes
66980            else
66981              gl_cv_func_perror_works=no
66982            fi
66983            rm -rf conftest.txt1 conftest.txt2
66984else
66985  gl_cv_func_perror_works=no
66986fi
66987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
66988  conftest.$ac_objext conftest.beam conftest.$ac_ext
66989fi
66990
66991
66992fi
66993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
66994$as_echo "$gl_cv_func_perror_works" >&6; }
66995      case "$gl_cv_func_perror_works" in
66996        *yes) ;;
66997        *) REPLACE_PERROR=1 ;;
66998      esac
66999      ;;
67000    *)
67001                  REPLACE_PERROR=1
67002      ;;
67003  esac
67004
67005  if test $REPLACE_PERROR = 1; then
67006
67007
67008
67009
67010
67011
67012
67013
67014  gltests_LIBOBJS="$gltests_LIBOBJS perror.$ac_objext"
67015
67016  fi
67017
67018
67019
67020
67021
67022    if test "$GNULIB_PERROR" != 1; then
67023        if test "$GNULIB_PERROR" = 0; then
67024      GNULIB_PERROR=$gl_module_indicator_condition
67025    else
67026      GNULIB_PERROR="($GNULIB_PERROR || $gl_module_indicator_condition)"
67027    fi
67028  fi
67029
67030
67031
67032
67033
67034$as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h
67035
67036
67037
67038
67039
67040
67041
67042  if test $ac_cv_func_pipe != yes; then
67043    HAVE_PIPE=0
67044  fi
67045
67046  if test $HAVE_PIPE = 0; then
67047
67048
67049
67050
67051
67052
67053
67054
67055  gltests_LIBOBJS="$gltests_LIBOBJS pipe.$ac_objext"
67056
67057  fi
67058
67059
67060
67061
67062
67063    if test "$GNULIB_PIPE" != 1; then
67064        if test "$GNULIB_PIPE" = 0; then
67065      GNULIB_PIPE=$gl_module_indicator_condition
67066    else
67067      GNULIB_PIPE="($GNULIB_PIPE || $gl_module_indicator_condition)"
67068    fi
67069  fi
67070
67071
67072
67073
67074
67075$as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
67076
67077
67078
67079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67080/* end confdefs.h.  */
67081[
67082  #if defined _MSC_VER || defined __MINGW32__
67083    notposix
67084  #endif
67085    ]
67086_ACEOF
67087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
67088  $EGREP "notposix" >/dev/null 2>&1; then :
67089  posix_spawn_ported=no
67090else
67091  posix_spawn_ported=yes
67092fi
67093rm -f conftest*
67094
67095   if test $posix_spawn_ported = yes; then
67096  POSIX_SPAWN_PORTED_TRUE=
67097  POSIX_SPAWN_PORTED_FALSE='#'
67098else
67099  POSIX_SPAWN_PORTED_TRUE='#'
67100  POSIX_SPAWN_PORTED_FALSE=
67101fi
67102
67103
67104  for ac_func in getppriv
67105do :
67106  ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
67107if test "x$ac_cv_func_getppriv" = xyes; then :
67108  cat >>confdefs.h <<_ACEOF
67109#define HAVE_GETPPRIV 1
67110_ACEOF
67111
67112fi
67113done
67114
67115
67116
67117
67118
67119
67120
67121
67122
67123
67124
67125
67126
67127
67128
67129
67130
67131
67132     if test $gl_cv_have_include_next = yes; then
67133       gl_cv_next_pthread_h='<'pthread.h'>'
67134     else
67135       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <pthread.h>" >&5
67136$as_echo_n "checking absolute name of <pthread.h>... " >&6; }
67137if ${gl_cv_next_pthread_h+:} false; then :
67138  $as_echo_n "(cached) " >&6
67139else
67140
67141             if test $ac_cv_header_pthread_h = yes; then
67142
67143
67144
67145
67146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67147/* end confdefs.h.  */
67148#include <pthread.h>
67149_ACEOF
67150                case "$host_os" in
67151    aix*) gl_absname_cpp="$ac_cpp -C" ;;
67152    *)    gl_absname_cpp="$ac_cpp" ;;
67153  esac
67154
67155  case "$host_os" in
67156    mingw*)
67157                                          gl_dirsep_regex='[/\\]'
67158      ;;
67159    *)
67160      gl_dirsep_regex='\/'
67161      ;;
67162  esac
67163      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
67164  gl_header_literal_regex=`echo 'pthread.h' \
67165                           | sed -e "$gl_make_literal_regex_sed"`
67166  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
67167      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
67168      s|^/[^/]|//&|
67169      p
67170      q
67171    }'
67172
67173        gl_cv_absolute_pthread_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
67174  sed -n "$gl_absolute_header_sed"`
67175
67176           gl_header=$gl_cv_absolute_pthread_h
67177           gl_cv_next_pthread_h='"'$gl_header'"'
67178          else
67179               gl_cv_next_pthread_h='<'pthread.h'>'
67180             fi
67181
67182
67183fi
67184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_pthread_h" >&5
67185$as_echo "$gl_cv_next_pthread_h" >&6; }
67186     fi
67187     NEXT_PTHREAD_H=$gl_cv_next_pthread_h
67188
67189     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
67190       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
67191       gl_next_as_first_directive='<'pthread.h'>'
67192     else
67193       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
67194       gl_next_as_first_directive=$gl_cv_next_pthread_h
67195     fi
67196     NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H=$gl_next_as_first_directive
67197
67198
67199
67200
67201  if test $ac_cv_header_pthread_h = yes; then
67202    HAVE_PTHREAD_H=1
67203
67204
67205      if { case "$host_os" in mingw*) true;; *) false;; esac; } \
67206         && test $gl_threads_api = windows; then
67207        HAVE_PTHREAD_H=0
67208      fi
67209
67210  else
67211    HAVE_PTHREAD_H=0
67212  fi
67213
67214
67215  ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "$ac_includes_default
67216     #if HAVE_PTHREAD_H
67217      #include <pthread.h>
67218     #endif
67219"
67220if test "x$ac_cv_type_pthread_t" = xyes; then :
67221
67222cat >>confdefs.h <<_ACEOF
67223#define HAVE_PTHREAD_T 1
67224_ACEOF
67225
67226
67227fi
67228ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "$ac_includes_default
67229     #if HAVE_PTHREAD_H
67230      #include <pthread.h>
67231     #endif
67232"
67233if test "x$ac_cv_type_pthread_spinlock_t" = xyes; then :
67234
67235cat >>confdefs.h <<_ACEOF
67236#define HAVE_PTHREAD_SPINLOCK_T 1
67237_ACEOF
67238
67239
67240fi
67241
67242  if test $ac_cv_type_pthread_t != yes; then
67243    HAVE_PTHREAD_T=0
67244  fi
67245  if test $ac_cv_type_pthread_spinlock_t != yes; then
67246    HAVE_PTHREAD_SPINLOCK_T=0
67247  fi
67248
67249
67250  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_CREATE_DETACHED" >&5
67251$as_echo_n "checking for PTHREAD_CREATE_DETACHED... " >&6; }
67252if ${gl_cv_const_PTHREAD_CREATE_DETACHED+:} false; then :
67253  $as_echo_n "(cached) " >&6
67254else
67255  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67256/* end confdefs.h.  */
67257#include <pthread.h>
67258            int x = PTHREAD_CREATE_DETACHED;
67259
67260int
67261main ()
67262{
67263
67264  ;
67265  return 0;
67266}
67267_ACEOF
67268if ac_fn_c_try_compile "$LINENO"; then :
67269  gl_cv_const_PTHREAD_CREATE_DETACHED=yes
67270else
67271  gl_cv_const_PTHREAD_CREATE_DETACHED=no
67272fi
67273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67274
67275fi
67276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_CREATE_DETACHED" >&5
67277$as_echo "$gl_cv_const_PTHREAD_CREATE_DETACHED" >&6; }
67278  if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
67279    HAVE_PTHREAD_CREATE_DETACHED=0
67280  fi
67281
67282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE" >&5
67283$as_echo_n "checking for PTHREAD_MUTEX_RECURSIVE... " >&6; }
67284if ${gl_cv_const_PTHREAD_MUTEX_RECURSIVE+:} false; then :
67285  $as_echo_n "(cached) " >&6
67286else
67287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67288/* end confdefs.h.  */
67289#include <pthread.h>
67290            int x = PTHREAD_MUTEX_RECURSIVE;
67291
67292int
67293main ()
67294{
67295
67296  ;
67297  return 0;
67298}
67299_ACEOF
67300if ac_fn_c_try_compile "$LINENO"; then :
67301  gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes
67302else
67303  gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no
67304fi
67305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67306
67307fi
67308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&5
67309$as_echo "$gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&6; }
67310  if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
67311    HAVE_PTHREAD_MUTEX_RECURSIVE=0
67312  fi
67313
67314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ROBUST" >&5
67315$as_echo_n "checking for PTHREAD_MUTEX_ROBUST... " >&6; }
67316if ${gl_cv_const_PTHREAD_MUTEX_ROBUST+:} false; then :
67317  $as_echo_n "(cached) " >&6
67318else
67319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67320/* end confdefs.h.  */
67321#include <pthread.h>
67322            int x = PTHREAD_MUTEX_ROBUST;
67323
67324int
67325main ()
67326{
67327
67328  ;
67329  return 0;
67330}
67331_ACEOF
67332if ac_fn_c_try_compile "$LINENO"; then :
67333  gl_cv_const_PTHREAD_MUTEX_ROBUST=yes
67334else
67335  gl_cv_const_PTHREAD_MUTEX_ROBUST=no
67336fi
67337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67338
67339fi
67340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_ROBUST" >&5
67341$as_echo "$gl_cv_const_PTHREAD_MUTEX_ROBUST" >&6; }
67342  if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
67343    HAVE_PTHREAD_MUTEX_ROBUST=0
67344  fi
67345
67346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PROCESS_SHARED" >&5
67347$as_echo_n "checking for PTHREAD_PROCESS_SHARED... " >&6; }
67348if ${gl_cv_const_PTHREAD_PROCESS_SHARED+:} false; then :
67349  $as_echo_n "(cached) " >&6
67350else
67351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67352/* end confdefs.h.  */
67353#include <pthread.h>
67354            int x = PTHREAD_PROCESS_SHARED;
67355
67356int
67357main ()
67358{
67359
67360  ;
67361  return 0;
67362}
67363_ACEOF
67364if ac_fn_c_try_compile "$LINENO"; then :
67365  gl_cv_const_PTHREAD_PROCESS_SHARED=yes
67366else
67367  gl_cv_const_PTHREAD_PROCESS_SHARED=no
67368fi
67369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67370
67371fi
67372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_PROCESS_SHARED" >&5
67373$as_echo "$gl_cv_const_PTHREAD_PROCESS_SHARED" >&6; }
67374  if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
67375    HAVE_PTHREAD_PROCESS_SHARED=0
67376  fi
67377
67378
67379
67380
67381
67382
67383
67384    LIB_PTHREAD="$LIBPMULTITHREAD"
67385
67386
67387
67388
67389
67390
67391  if { case "$host_os" in mingw*) true;; *) false;; esac; } \
67392     && test $gl_threads_api = windows; then
67393            REPLACE_PTHREAD_CREATE=1
67394    REPLACE_PTHREAD_ATTR_INIT=1
67395    REPLACE_PTHREAD_ATTR_GETDETACHSTATE=1
67396    REPLACE_PTHREAD_ATTR_SETDETACHSTATE=1
67397    REPLACE_PTHREAD_ATTR_DESTROY=1
67398    REPLACE_PTHREAD_SELF=1
67399    REPLACE_PTHREAD_EQUAL=1
67400    REPLACE_PTHREAD_DETACH=1
67401    REPLACE_PTHREAD_JOIN=1
67402    REPLACE_PTHREAD_EXIT=1
67403  else
67404    if test $HAVE_PTHREAD_H = 0; then
67405      HAVE_PTHREAD_CREATE=0
67406      HAVE_PTHREAD_ATTR_INIT=0
67407      HAVE_PTHREAD_ATTR_GETDETACHSTATE=0
67408      HAVE_PTHREAD_ATTR_SETDETACHSTATE=0
67409      HAVE_PTHREAD_ATTR_DESTROY=0
67410      HAVE_PTHREAD_SELF=0
67411      HAVE_PTHREAD_EQUAL=0
67412      HAVE_PTHREAD_DETACH=0
67413      HAVE_PTHREAD_JOIN=0
67414      HAVE_PTHREAD_EXIT=0
67415    else
67416                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_create exists as a global function" >&5
67417$as_echo_n "checking whether pthread_create exists as a global function... " >&6; }
67418if ${gl_cv_func_pthread_create+:} false; then :
67419  $as_echo_n "(cached) " >&6
67420else
67421  saved_LIBS="$LIBS"
67422         LIBS="$LIBS $LIBPMULTITHREAD"
67423         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67424/* end confdefs.h.  */
67425extern
67426                #ifdef __cplusplus
67427                "C"
67428                #endif
67429                int pthread_create (void);
67430                int main ()
67431                {
67432                  return pthread_create ();
67433                }
67434
67435_ACEOF
67436if ac_fn_c_try_link "$LINENO"; then :
67437  gl_cv_func_pthread_create=yes
67438else
67439  gl_cv_func_pthread_create=no
67440fi
67441rm -f core conftest.err conftest.$ac_objext \
67442    conftest$ac_exeext conftest.$ac_ext
67443         LIBS="$saved_LIBS"
67444
67445fi
67446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_create" >&5
67447$as_echo "$gl_cv_func_pthread_create" >&6; }
67448      if test $gl_cv_func_pthread_create = no; then
67449        REPLACE_PTHREAD_CREATE=1
67450        REPLACE_PTHREAD_ATTR_INIT=1
67451
67452$as_echo "#define PTHREAD_CREATE_IS_INLINE 1" >>confdefs.h
67453
67454      fi
67455    fi
67456  fi
67457
67458  if test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1; then
67459
67460
67461
67462
67463
67464
67465
67466
67467  gltests_LIBOBJS="$gltests_LIBOBJS pthread-thread.$ac_objext"
67468
67469  fi
67470
67471
67472
67473
67474
67475    if test "$GNULIB_PTHREAD_THREAD" != 1; then
67476        if test "$GNULIB_PTHREAD_THREAD" = 0; then
67477      GNULIB_PTHREAD_THREAD=$gl_module_indicator_condition
67478    else
67479      GNULIB_PTHREAD_THREAD="($GNULIB_PTHREAD_THREAD || $gl_module_indicator_condition)"
67480    fi
67481  fi
67482
67483
67484
67485
67486
67487$as_echo "#define GNULIB_TEST_PTHREAD_THREAD 1" >>confdefs.h
67488
67489
67490
67491
67492
67493
67494
67495
67496      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
67497$as_echo_n "checking whether pthread_sigmask is a macro... " >&6; }
67498if ${gl_cv_func_pthread_sigmask_macro+:} false; then :
67499  $as_echo_n "(cached) " >&6
67500else
67501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67502/* end confdefs.h.  */
67503
67504#include <pthread.h>
67505#include <signal.h>
67506#ifdef pthread_sigmask
67507 headers_define_pthread_sigmask
67508#endif
67509_ACEOF
67510if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
67511  $EGREP "headers_define_pthread_sigmask" >/dev/null 2>&1; then :
67512  gl_cv_func_pthread_sigmask_macro=yes
67513else
67514  gl_cv_func_pthread_sigmask_macro=no
67515fi
67516rm -f conftest*
67517
67518
67519fi
67520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
67521$as_echo "$gl_cv_func_pthread_sigmask_macro" >&6; }
67522
67523  LIB_PTHREAD_SIGMASK=
67524
67525  if test $gl_cv_func_pthread_sigmask_macro = yes; then
67526        HAVE_PTHREAD_SIGMASK=0
67527        REPLACE_PTHREAD_SIGMASK=1
67528  else
67529
67530
67531
67532      if test "$gl_threads_api" = posix; then
67533        if test $ac_cv_func_pthread_sigmask = yes; then
67534                    :
67535        else
67536          if test -n "$LIBMULTITHREAD"; then
67537            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
67538$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
67539if ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+:} false; then :
67540  $as_echo_n "(cached) " >&6
67541else
67542  gl_save_LIBS="$LIBS"
67543               LIBS="$LIBS $LIBMULTITHREAD"
67544               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67545/* end confdefs.h.  */
67546#include <pthread.h>
67547                      #include <signal.h>
67548
67549int
67550main ()
67551{
67552return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
67553  ;
67554  return 0;
67555}
67556
67557_ACEOF
67558if ac_fn_c_try_link "$LINENO"; then :
67559  gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
67560else
67561  gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
67562fi
67563rm -f core conftest.err conftest.$ac_objext \
67564    conftest$ac_exeext conftest.$ac_ext
67565               LIBS="$gl_save_LIBS"
67566
67567fi
67568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
67569$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
67570            if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
67571                            LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
67572            else
67573                            HAVE_PTHREAD_SIGMASK=0
67574            fi
67575          else
67576                        HAVE_PTHREAD_SIGMASK=0
67577          fi
67578        fi
67579      else
67580                        if test $ac_cv_func_pthread_sigmask = yes; then
67581          REPLACE_PTHREAD_SIGMASK=1
67582        else
67583          HAVE_PTHREAD_SIGMASK=0
67584        fi
67585      fi
67586
67587  fi
67588
67589
67590
67591    if test $HAVE_PTHREAD_SIGMASK = 1; then
67592
67593
67594                if test -z "$LIB_PTHREAD_SIGMASK"; then
67595      case " $LIBS " in
67596        *' -pthread '*) ;;
67597        *' -lpthread '*) ;;
67598        *)
67599          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
67600$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
67601if ${gl_cv_func_pthread_sigmask_in_libc_works+:} false; then :
67602  $as_echo_n "(cached) " >&6
67603else
67604
67605              if test "$cross_compiling" = yes; then :
67606
67607                                  case "$host_os" in
67608dragonfly* |                    freebsd* | hpux* | solaris | solaris2.[2-9]*)
67609                     gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
67610                   *)
67611                     gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
67612                 esac
67613
67614else
67615  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67616/* end confdefs.h.  */
67617
67618                   #include <pthread.h>
67619                   #include <signal.h>
67620                   #include <stddef.h>
67621                   int main ()
67622                   {
67623                     sigset_t set;
67624                     sigemptyset (&set);
67625                     return pthread_sigmask (1729, &set, NULL) != 0;
67626                   }
67627_ACEOF
67628if ac_fn_c_try_run "$LINENO"; then :
67629  gl_cv_func_pthread_sigmask_in_libc_works=no
67630else
67631  gl_cv_func_pthread_sigmask_in_libc_works=yes
67632fi
67633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
67634  conftest.$ac_objext conftest.beam conftest.$ac_ext
67635fi
67636
67637
67638fi
67639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
67640$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
67641          case "$gl_cv_func_pthread_sigmask_in_libc_works" in
67642            *no)
67643              REPLACE_PTHREAD_SIGMASK=1
67644
67645$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
67646
67647              ;;
67648          esac;;
67649      esac
67650    fi
67651
67652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
67653$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
67654if ${gl_cv_func_pthread_sigmask_return_works+:} false; then :
67655  $as_echo_n "(cached) " >&6
67656else
67657
67658        gl_save_LIBS="$LIBS"
67659        LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
67660        if test "$cross_compiling" = yes; then :
67661  case "$host_os" in
67662             cygwin*)
67663               gl_cv_func_pthread_sigmask_return_works="guessing no";;
67664             *)
67665               gl_cv_func_pthread_sigmask_return_works="guessing yes";;
67666           esac
67667
67668else
67669  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67670/* end confdefs.h.  */
67671
67672#include <pthread.h>
67673#include <signal.h>
67674#include <stddef.h>
67675int main ()
67676{
67677  sigset_t set;
67678  sigemptyset (&set);
67679  if (pthread_sigmask (1729, &set, NULL) == -1)
67680    return 1;
67681  return 0;
67682}
67683_ACEOF
67684if ac_fn_c_try_run "$LINENO"; then :
67685  gl_cv_func_pthread_sigmask_return_works=yes
67686else
67687  gl_cv_func_pthread_sigmask_return_works=no
67688fi
67689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
67690  conftest.$ac_objext conftest.beam conftest.$ac_ext
67691fi
67692
67693        LIBS="$gl_save_LIBS"
67694
67695fi
67696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
67697$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
67698    case "$gl_cv_func_pthread_sigmask_return_works" in
67699      *no)
67700        REPLACE_PTHREAD_SIGMASK=1
67701
67702$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
67703
67704        ;;
67705    esac
67706
67707                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
67708$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
67709if ${gl_cv_func_pthread_sigmask_unblock_works+:} false; then :
67710  $as_echo_n "(cached) " >&6
67711else
67712
67713        case "$host_os" in
67714          irix*)
67715            gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
67716          *)
67717            gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
67718        esac
67719                                         gl_save_LIBS=$LIBS
67720           LIBS="$LIBS $LIBMULTITHREAD"
67721        if test "$cross_compiling" = yes; then :
67722  :
67723else
67724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67725/* end confdefs.h.  */
67726
67727#include <pthread.h>
67728#include <signal.h>
67729#include <stdio.h>
67730#include <stdlib.h>
67731#include <unistd.h>
67732static volatile int sigint_occurred;
67733static void
67734sigint_handler (int sig)
67735{
67736  sigint_occurred++;
67737}
67738int main ()
67739{
67740  sigset_t set;
67741  int pid = getpid ();
67742  char command[80];
67743  signal (SIGINT, sigint_handler);
67744  sigemptyset (&set);
67745  sigaddset (&set, SIGINT);
67746  if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
67747    return 1;
67748  sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
67749  if (!(system (command) == 0))
67750    return 2;
67751  sleep (2);
67752  if (!(sigint_occurred == 0))
67753    return 3;
67754  if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
67755    return 4;
67756  if (!(sigint_occurred == 1)) /* This fails on IRIX.  */
67757    return 5;
67758  return 0;
67759}
67760_ACEOF
67761if ac_fn_c_try_run "$LINENO"; then :
67762  :
67763else
67764  gl_cv_func_pthread_sigmask_unblock_works=no
67765fi
67766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
67767  conftest.$ac_objext conftest.beam conftest.$ac_ext
67768fi
67769
67770        LIBS=$gl_save_LIBS
67771
67772fi
67773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
67774$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
67775    case "$gl_cv_func_pthread_sigmask_unblock_works" in
67776      *no)
67777        REPLACE_PTHREAD_SIGMASK=1
67778
67779$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
67780
67781        ;;
67782    esac
67783  fi
67784
67785  if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
67786
67787
67788
67789
67790
67791
67792
67793
67794  gltests_LIBOBJS="$gltests_LIBOBJS pthread_sigmask.$ac_objext"
67795
67796
67797  if test $HAVE_PTHREAD_SIGMASK = 1; then
67798
67799$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
67800
67801  fi
67802
67803  fi
67804
67805
67806
67807
67808
67809    if test "$GNULIB_PTHREAD_SIGMASK" != 1; then
67810        if test "$GNULIB_PTHREAD_SIGMASK" = 0; then
67811      GNULIB_PTHREAD_SIGMASK=$gl_module_indicator_condition
67812    else
67813      GNULIB_PTHREAD_SIGMASK="($GNULIB_PTHREAD_SIGMASK || $gl_module_indicator_condition)"
67814    fi
67815  fi
67816
67817
67818
67819
67820
67821$as_echo "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
67822
67823
67824
67825
67826
67827     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
67828$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
67829if ${gl_cv_func_svid_putenv+:} false; then :
67830  $as_echo_n "(cached) " >&6
67831else
67832  if test "$cross_compiling" = yes; then :
67833               case "$host_os" in
67834                               # Guess yes on glibc systems.
67835                *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
67836                               # Guess yes on musl systems.
67837                *-musl*)       gl_cv_func_svid_putenv="guessing yes" ;;
67838                               # Guess no on native Windows.
67839                mingw*)        gl_cv_func_svid_putenv="guessing no" ;;
67840                               # If we don't know, obey --enable-cross-guesses.
67841                *)             gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
67842              esac
67843
67844else
67845  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67846/* end confdefs.h.  */
67847$ac_includes_default
67848int
67849main ()
67850{
67851
67852    /* Put it in env.  */
67853    if (putenv ("CONFTEST_putenv=val"))
67854      return 1;
67855
67856    /* Try to remove it.  */
67857    if (putenv ("CONFTEST_putenv"))
67858      return 2;
67859
67860    /* Make sure it was deleted.  */
67861    if (getenv ("CONFTEST_putenv") != 0)
67862      return 3;
67863
67864    return 0;
67865
67866  ;
67867  return 0;
67868}
67869_ACEOF
67870if ac_fn_c_try_run "$LINENO"; then :
67871  gl_cv_func_svid_putenv=yes
67872else
67873  gl_cv_func_svid_putenv=no
67874fi
67875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
67876  conftest.$ac_objext conftest.beam conftest.$ac_ext
67877fi
67878
67879
67880fi
67881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
67882$as_echo "$gl_cv_func_svid_putenv" >&6; }
67883  case "$gl_cv_func_svid_putenv" in
67884    *yes) ;;
67885    *)
67886      REPLACE_PUTENV=1
67887      ;;
67888  esac
67889
67890  if test $REPLACE_PUTENV = 1; then
67891
67892
67893
67894
67895
67896
67897
67898
67899  gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
67900
67901
67902  ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
67903if test "x$ac_cv_have_decl__putenv" = xyes; then :
67904  ac_have_decl=1
67905else
67906  ac_have_decl=0
67907fi
67908
67909cat >>confdefs.h <<_ACEOF
67910#define HAVE_DECL__PUTENV $ac_have_decl
67911_ACEOF
67912
67913
67914  fi
67915
67916
67917
67918
67919
67920    if test "$GNULIB_PUTENV" != 1; then
67921        if test "$GNULIB_PUTENV" = 0; then
67922      GNULIB_PUTENV=$gl_module_indicator_condition
67923    else
67924      GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
67925    fi
67926  fi
67927
67928
67929
67930
67931
67932$as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
67933
67934
67935
67936
67937
67938
67939  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
67940  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
67941  # irrelevant for anonymous mappings.
67942  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
67943if test "x$ac_cv_func_mmap" = xyes; then :
67944  gl_have_mmap=yes
67945else
67946  gl_have_mmap=no
67947fi
67948
67949
67950  # Try to allow MAP_ANONYMOUS.
67951  gl_have_mmap_anonymous=no
67952  if test $gl_have_mmap = yes; then
67953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
67954$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
67955    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67956/* end confdefs.h.  */
67957
67958#include <sys/mman.h>
67959#ifdef MAP_ANONYMOUS
67960    I cannot identify this map
67961#endif
67962
67963_ACEOF
67964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
67965  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
67966  gl_have_mmap_anonymous=yes
67967fi
67968rm -f conftest*
67969
67970    if test $gl_have_mmap_anonymous != yes; then
67971      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67972/* end confdefs.h.  */
67973
67974#include <sys/mman.h>
67975#ifdef MAP_ANON
67976    I cannot identify this map
67977#endif
67978
67979_ACEOF
67980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
67981  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
67982
67983$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
67984
67985         gl_have_mmap_anonymous=yes
67986fi
67987rm -f conftest*
67988
67989    fi
67990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
67991$as_echo "$gl_have_mmap_anonymous" >&6; }
67992    if test $gl_have_mmap_anonymous = yes; then
67993
67994$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
67995
67996    fi
67997  fi
67998
67999
68000
68001
68002
68003
68004  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
68005  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
68006  # irrelevant for anonymous mappings.
68007  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
68008if test "x$ac_cv_func_mmap" = xyes; then :
68009  gl_have_mmap=yes
68010else
68011  gl_have_mmap=no
68012fi
68013
68014
68015  # Try to allow MAP_ANONYMOUS.
68016  gl_have_mmap_anonymous=no
68017  if test $gl_have_mmap = yes; then
68018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
68019$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
68020    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68021/* end confdefs.h.  */
68022
68023#include <sys/mman.h>
68024#ifdef MAP_ANONYMOUS
68025    I cannot identify this map
68026#endif
68027
68028_ACEOF
68029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
68030  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
68031  gl_have_mmap_anonymous=yes
68032fi
68033rm -f conftest*
68034
68035    if test $gl_have_mmap_anonymous != yes; then
68036      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68037/* end confdefs.h.  */
68038
68039#include <sys/mman.h>
68040#ifdef MAP_ANON
68041    I cannot identify this map
68042#endif
68043
68044_ACEOF
68045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
68046  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
68047
68048$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
68049
68050         gl_have_mmap_anonymous=yes
68051fi
68052rm -f conftest*
68053
68054    fi
68055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
68056$as_echo "$gl_have_mmap_anonymous" >&6; }
68057    if test $gl_have_mmap_anonymous = yes; then
68058
68059$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
68060
68061    fi
68062  fi
68063
68064
68065
68066
68067
68068
68069
68070  if test "$ac_cv_header_winsock2_h" = yes; then
68071    REPLACE_SELECT=1
68072  else
68073
68074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
68075$as_echo_n "checking whether select supports a 0 argument... " >&6; }
68076if ${gl_cv_func_select_supports0+:} false; then :
68077  $as_echo_n "(cached) " >&6
68078else
68079
68080        if test "$cross_compiling" = yes; then :
68081
68082           case "$host_os" in
68083                       # Guess no on Interix.
68084             interix*) gl_cv_func_select_supports0="guessing no";;
68085                       # Guess yes otherwise.
68086             *)        gl_cv_func_select_supports0="guessing yes";;
68087           esac
68088
68089else
68090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68091/* end confdefs.h.  */
68092
68093#include <sys/types.h>
68094#include <sys/time.h>
68095#if HAVE_SYS_SELECT_H
68096#include <sys/select.h>
68097#endif
68098int main ()
68099{
68100  struct timeval timeout;
68101  timeout.tv_sec = 0;
68102  timeout.tv_usec = 5;
68103  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
68104}
68105_ACEOF
68106if ac_fn_c_try_run "$LINENO"; then :
68107  gl_cv_func_select_supports0=yes
68108else
68109  gl_cv_func_select_supports0=no
68110fi
68111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
68112  conftest.$ac_objext conftest.beam conftest.$ac_ext
68113fi
68114
68115
68116fi
68117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
68118$as_echo "$gl_cv_func_select_supports0" >&6; }
68119    case "$gl_cv_func_select_supports0" in
68120      *yes) ;;
68121      *) REPLACE_SELECT=1 ;;
68122    esac
68123
68124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
68125$as_echo_n "checking whether select detects invalid fds... " >&6; }
68126if ${gl_cv_func_select_detects_ebadf+:} false; then :
68127  $as_echo_n "(cached) " >&6
68128else
68129
68130        if test "$cross_compiling" = yes; then :
68131
68132           case "$host_os" in
68133                             # Guess yes on Linux systems.
68134            linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
68135                             # Guess yes on glibc systems.
68136            *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
68137                             # If we don't know, obey --enable-cross-guesses.
68138            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
68139           esac
68140
68141else
68142  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68143/* end confdefs.h.  */
68144
68145#include <sys/types.h>
68146#include <sys/time.h>
68147#if HAVE_SYS_SELECT_H
68148# include <sys/select.h>
68149#endif
68150#include <unistd.h>
68151#include <errno.h>
68152
68153int
68154main ()
68155{
68156
68157  fd_set set;
68158  dup2(0, 16);
68159  FD_ZERO(&set);
68160  FD_SET(16, &set);
68161  close(16);
68162  struct timeval timeout;
68163  timeout.tv_sec = 0;
68164  timeout.tv_usec = 5;
68165  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
68166
68167  ;
68168  return 0;
68169}
68170_ACEOF
68171if ac_fn_c_try_run "$LINENO"; then :
68172  gl_cv_func_select_detects_ebadf=yes
68173else
68174  gl_cv_func_select_detects_ebadf=no
68175fi
68176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
68177  conftest.$ac_objext conftest.beam conftest.$ac_ext
68178fi
68179
68180
68181fi
68182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
68183$as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
68184    case $gl_cv_func_select_detects_ebadf in
68185      *yes) ;;
68186      *) REPLACE_SELECT=1 ;;
68187    esac
68188  fi
68189
68190    LIB_SELECT="$LIBSOCKET"
68191  if test $REPLACE_SELECT = 1; then
68192    case "$host_os" in
68193      mingw*)
68194                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68195/* end confdefs.h.  */
68196
68197#define WIN32_LEAN_AND_MEAN
68198#include <windows.h>
68199int
68200main ()
68201{
68202  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
68203  return 0;
68204}
68205_ACEOF
68206if ac_fn_c_try_link "$LINENO"; then :
68207
68208else
68209  LIB_SELECT="$LIB_SELECT -luser32"
68210fi
68211rm -f core conftest.err conftest.$ac_objext \
68212    conftest$ac_exeext conftest.$ac_ext
68213        ;;
68214    esac
68215  fi
68216
68217
68218  if test $REPLACE_SELECT = 1; then
68219
68220
68221
68222
68223
68224
68225
68226
68227  gltests_LIBOBJS="$gltests_LIBOBJS select.$ac_objext"
68228
68229  fi
68230
68231
68232
68233
68234
68235    if test "$GNULIB_SELECT" != 1; then
68236        if test "$GNULIB_SELECT" = 0; then
68237      GNULIB_SELECT=$gl_module_indicator_condition
68238    else
68239      GNULIB_SELECT="($GNULIB_SELECT || $gl_module_indicator_condition)"
68240    fi
68241  fi
68242
68243
68244
68245
68246
68247$as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h
68248
68249
68250
68251
68252
68253
68254
68255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
68256$as_echo_n "checking for a traditional french locale... " >&6; }
68257if ${gt_cv_locale_fr+:} false; then :
68258  $as_echo_n "(cached) " >&6
68259else
68260
68261    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68262/* end confdefs.h.  */
68263
68264#include <locale.h>
68265#include <time.h>
68266#if HAVE_LANGINFO_CODESET
68267# include <langinfo.h>
68268#endif
68269#include <stdlib.h>
68270#include <string.h>
68271struct tm t;
68272char buf[16];
68273int main () {
68274  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
68275     imitates locale dependent behaviour by looking at the environment
68276     variables, and all locales use the UTF-8 encoding.  */
68277#if defined __BEOS__ || defined __HAIKU__
68278  return 1;
68279#else
68280  /* Check whether the given locale name is recognized by the system.  */
68281# if defined _WIN32 && !defined __CYGWIN__
68282  /* On native Windows, setlocale(category, "") looks at the system settings,
68283     not at the environment variables.  Also, when an encoding suffix such
68284     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
68285     category of the locale to "C".  */
68286  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
68287      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
68288    return 1;
68289# else
68290  if (setlocale (LC_ALL, "") == NULL) return 1;
68291# endif
68292  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
68293     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
68294     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
68295     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
68296     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
68297     some unit tests fail.
68298     On MirBSD 10, when an unsupported locale is specified, setlocale()
68299     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
68300# if HAVE_LANGINFO_CODESET
68301  {
68302    const char *cs = nl_langinfo (CODESET);
68303    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
68304        || strcmp (cs, "UTF-8") == 0)
68305      return 1;
68306  }
68307# endif
68308# ifdef __CYGWIN__
68309  /* On Cygwin, avoid locale names without encoding suffix, because the
68310     locale_charset() function relies on the encoding suffix.  Note that
68311     LC_ALL is set on the command line.  */
68312  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
68313# endif
68314  /* Check whether in the abbreviation of the second month, the second
68315     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
68316     one byte long. This excludes the UTF-8 encoding.  */
68317  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
68318  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
68319# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
68320  /* Check whether the decimal separator is a comma.
68321     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
68322     are nl_langinfo(RADIXCHAR) are both ".".  */
68323  if (localeconv () ->decimal_point[0] != ',') return 1;
68324# endif
68325  return 0;
68326#endif
68327}
68328
68329_ACEOF
68330    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
68331  (eval $ac_link) 2>&5
68332  ac_status=$?
68333  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
68334  test $ac_status = 0; } && test -s conftest$ac_exeext; then
68335      case "$host_os" in
68336        # Handle native Windows specially, because there setlocale() interprets
68337        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
68338        # "fr" or "fra" as "French" or "French_France.1252",
68339        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
68340        # "ja" as "Japanese" or "Japanese_Japan.932",
68341        # and similar.
68342        mingw*)
68343          # Test for the native Windows locale name.
68344          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68345            gt_cv_locale_fr=French_France.1252
68346          else
68347            # None found.
68348            gt_cv_locale_fr=none
68349          fi
68350          ;;
68351        *)
68352          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
68353          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
68354          # configure script would override the LC_ALL setting. Likewise for
68355          # LC_CTYPE, which is also set at the beginning of the configure script.
68356          # Test for the usual locale name.
68357          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68358            gt_cv_locale_fr=fr_FR
68359          else
68360            # Test for the locale name with explicit encoding suffix.
68361            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68362              gt_cv_locale_fr=fr_FR.ISO-8859-1
68363            else
68364              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
68365              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68366                gt_cv_locale_fr=fr_FR.ISO8859-1
68367              else
68368                # Test for the HP-UX locale name.
68369                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68370                  gt_cv_locale_fr=fr_FR.iso88591
68371                else
68372                  # Test for the Solaris 7 locale name.
68373                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68374                    gt_cv_locale_fr=fr
68375                  else
68376                    # None found.
68377                    gt_cv_locale_fr=none
68378                  fi
68379                fi
68380              fi
68381            fi
68382          fi
68383          ;;
68384      esac
68385    fi
68386    rm -fr conftest*
68387
68388fi
68389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
68390$as_echo "$gt_cv_locale_fr" >&6; }
68391  LOCALE_FR=$gt_cv_locale_fr
68392
68393
68394
68395
68396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
68397$as_echo_n "checking for a french Unicode locale... " >&6; }
68398if ${gt_cv_locale_fr_utf8+:} false; then :
68399  $as_echo_n "(cached) " >&6
68400else
68401
68402    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68403/* end confdefs.h.  */
68404
68405#include <locale.h>
68406#include <time.h>
68407#if HAVE_LANGINFO_CODESET
68408# include <langinfo.h>
68409#endif
68410#include <stdlib.h>
68411#include <string.h>
68412struct tm t;
68413char buf[16];
68414int main () {
68415  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
68416     imitates locale dependent behaviour by looking at the environment
68417     variables, and all locales use the UTF-8 encoding.  */
68418#if !(defined __BEOS__ || defined __HAIKU__)
68419  /* Check whether the given locale name is recognized by the system.  */
68420# if defined _WIN32 && !defined __CYGWIN__
68421  /* On native Windows, setlocale(category, "") looks at the system settings,
68422     not at the environment variables.  Also, when an encoding suffix such
68423     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
68424     category of the locale to "C".  */
68425  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
68426      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
68427    return 1;
68428# else
68429  if (setlocale (LC_ALL, "") == NULL) return 1;
68430# endif
68431  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
68432     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
68433     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
68434     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
68435     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
68436     some unit tests fail.  */
68437# if HAVE_LANGINFO_CODESET
68438  {
68439    const char *cs = nl_langinfo (CODESET);
68440    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
68441      return 1;
68442  }
68443# endif
68444# ifdef __CYGWIN__
68445  /* On Cygwin, avoid locale names without encoding suffix, because the
68446     locale_charset() function relies on the encoding suffix.  Note that
68447     LC_ALL is set on the command line.  */
68448  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
68449# endif
68450  /* Check whether in the abbreviation of the second month, the second
68451     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
68452     two bytes long, with UTF-8 encoding.  */
68453  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
68454  if (strftime (buf, sizeof (buf), "%b", &t) < 4
68455      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
68456    return 1;
68457#endif
68458#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
68459  /* Check whether the decimal separator is a comma.
68460     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
68461     are nl_langinfo(RADIXCHAR) are both ".".  */
68462  if (localeconv () ->decimal_point[0] != ',') return 1;
68463#endif
68464  return 0;
68465}
68466
68467_ACEOF
68468    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
68469  (eval $ac_link) 2>&5
68470  ac_status=$?
68471  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
68472  test $ac_status = 0; } && test -s conftest$ac_exeext; then
68473      case "$host_os" in
68474        # Handle native Windows specially, because there setlocale() interprets
68475        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
68476        # "fr" or "fra" as "French" or "French_France.1252",
68477        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
68478        # "ja" as "Japanese" or "Japanese_Japan.932",
68479        # and similar.
68480        mingw*)
68481          # Test for the hypothetical native Windows locale name.
68482          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68483            gt_cv_locale_fr_utf8=French_France.65001
68484          else
68485            # None found.
68486            gt_cv_locale_fr_utf8=none
68487          fi
68488          ;;
68489        *)
68490          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
68491          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
68492          # configure script would override the LC_ALL setting. Likewise for
68493          # LC_CTYPE, which is also set at the beginning of the configure script.
68494          # Test for the usual locale name.
68495          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68496            gt_cv_locale_fr_utf8=fr_FR
68497          else
68498            # Test for the locale name with explicit encoding suffix.
68499            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68500              gt_cv_locale_fr_utf8=fr_FR.UTF-8
68501            else
68502              # Test for the Solaris 7 locale name.
68503              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68504                gt_cv_locale_fr_utf8=fr.UTF-8
68505              else
68506                # None found.
68507                gt_cv_locale_fr_utf8=none
68508              fi
68509            fi
68510          fi
68511          ;;
68512      esac
68513    fi
68514    rm -fr conftest*
68515
68516fi
68517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
68518$as_echo "$gt_cv_locale_fr_utf8" >&6; }
68519  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
68520
68521
68522
68523
68524
68525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
68526$as_echo_n "checking for a traditional japanese locale... " >&6; }
68527if ${gt_cv_locale_ja+:} false; then :
68528  $as_echo_n "(cached) " >&6
68529else
68530
68531    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68532/* end confdefs.h.  */
68533
68534#include <locale.h>
68535#include <time.h>
68536#if HAVE_LANGINFO_CODESET
68537# include <langinfo.h>
68538#endif
68539#include <stdlib.h>
68540#include <string.h>
68541struct tm t;
68542char buf[16];
68543int main ()
68544{
68545  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
68546     imitates locale dependent behaviour by looking at the environment
68547     variables, and all locales use the UTF-8 encoding.  */
68548#if defined __BEOS__ || defined __HAIKU__
68549  return 1;
68550#else
68551  /* Check whether the given locale name is recognized by the system.  */
68552# if defined _WIN32 && !defined __CYGWIN__
68553  /* On native Windows, setlocale(category, "") looks at the system settings,
68554     not at the environment variables.  Also, when an encoding suffix such
68555     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
68556     category of the locale to "C".  */
68557  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
68558      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
68559    return 1;
68560# else
68561  if (setlocale (LC_ALL, "") == NULL) return 1;
68562# endif
68563  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
68564     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
68565     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
68566     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
68567     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
68568     some unit tests fail.
68569     On MirBSD 10, when an unsupported locale is specified, setlocale()
68570     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
68571# if HAVE_LANGINFO_CODESET
68572  {
68573    const char *cs = nl_langinfo (CODESET);
68574    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
68575        || strcmp (cs, "UTF-8") == 0)
68576      return 1;
68577  }
68578# endif
68579# ifdef __CYGWIN__
68580  /* On Cygwin, avoid locale names without encoding suffix, because the
68581     locale_charset() function relies on the encoding suffix.  Note that
68582     LC_ALL is set on the command line.  */
68583  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
68584# endif
68585  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
68586     on Cygwin 1.5.x.  */
68587  if (MB_CUR_MAX == 1)
68588    return 1;
68589  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
68590     This excludes the UTF-8 encoding (except on MirBSD).  */
68591  {
68592    const char *p;
68593    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
68594    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
68595    for (p = buf; *p != '\0'; p++)
68596      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
68597        return 1;
68598  }
68599  return 0;
68600#endif
68601}
68602
68603_ACEOF
68604    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
68605  (eval $ac_link) 2>&5
68606  ac_status=$?
68607  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
68608  test $ac_status = 0; } && test -s conftest$ac_exeext; then
68609      case "$host_os" in
68610        # Handle native Windows specially, because there setlocale() interprets
68611        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
68612        # "fr" or "fra" as "French" or "French_France.1252",
68613        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
68614        # "ja" as "Japanese" or "Japanese_Japan.932",
68615        # and similar.
68616        mingw*)
68617          # Note that on native Windows, the Japanese locale is
68618          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
68619          # cannot use it here.
68620          gt_cv_locale_ja=none
68621          ;;
68622        *)
68623          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
68624          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
68625          # configure script would override the LC_ALL setting. Likewise for
68626          # LC_CTYPE, which is also set at the beginning of the configure script.
68627          # Test for the AIX locale name.
68628          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68629            gt_cv_locale_ja=ja_JP
68630          else
68631            # Test for the locale name with explicit encoding suffix.
68632            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68633              gt_cv_locale_ja=ja_JP.EUC-JP
68634            else
68635              # Test for the HP-UX, OSF/1, NetBSD locale name.
68636              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68637                gt_cv_locale_ja=ja_JP.eucJP
68638              else
68639                # Test for the IRIX, FreeBSD locale name.
68640                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68641                  gt_cv_locale_ja=ja_JP.EUC
68642                else
68643                  # Test for the Solaris 7 locale name.
68644                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68645                    gt_cv_locale_ja=ja
68646                  else
68647                    # Special test for NetBSD 1.6.
68648                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
68649                      gt_cv_locale_ja=ja_JP.eucJP
68650                    else
68651                      # None found.
68652                      gt_cv_locale_ja=none
68653                    fi
68654                  fi
68655                fi
68656              fi
68657            fi
68658          fi
68659          ;;
68660      esac
68661    fi
68662    rm -fr conftest*
68663
68664fi
68665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
68666$as_echo "$gt_cv_locale_ja" >&6; }
68667  LOCALE_JA=$gt_cv_locale_ja
68668
68669
68670
68671
68672
68673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
68674$as_echo_n "checking for a transitional chinese locale... " >&6; }
68675if ${gt_cv_locale_zh_CN+:} false; then :
68676  $as_echo_n "(cached) " >&6
68677else
68678
68679    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68680/* end confdefs.h.  */
68681
68682#include <locale.h>
68683#include <stdlib.h>
68684#include <time.h>
68685#if HAVE_LANGINFO_CODESET
68686# include <langinfo.h>
68687#endif
68688#include <stdlib.h>
68689#include <string.h>
68690struct tm t;
68691char buf[16];
68692int main ()
68693{
68694  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
68695     imitates locale dependent behaviour by looking at the environment
68696     variables, and all locales use the UTF-8 encoding.  */
68697#if defined __BEOS__ || defined __HAIKU__
68698  return 1;
68699#else
68700  /* Check whether the given locale name is recognized by the system.  */
68701# if defined _WIN32 && !defined __CYGWIN__
68702  /* On native Windows, setlocale(category, "") looks at the system settings,
68703     not at the environment variables.  Also, when an encoding suffix such
68704     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
68705     category of the locale to "C".  */
68706  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
68707      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
68708    return 1;
68709# else
68710  if (setlocale (LC_ALL, "") == NULL) return 1;
68711# endif
68712  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
68713     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
68714     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
68715     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
68716     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
68717     some unit tests fail.
68718     On MirBSD 10, when an unsupported locale is specified, setlocale()
68719     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
68720# if HAVE_LANGINFO_CODESET
68721  {
68722    const char *cs = nl_langinfo (CODESET);
68723    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
68724        || strcmp (cs, "UTF-8") == 0)
68725      return 1;
68726  }
68727# endif
68728# ifdef __CYGWIN__
68729  /* On Cygwin, avoid locale names without encoding suffix, because the
68730     locale_charset() function relies on the encoding suffix.  Note that
68731     LC_ALL is set on the command line.  */
68732  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
68733# endif
68734  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
68735     This excludes the UTF-8 encoding (except on MirBSD).  */
68736  {
68737    const char *p;
68738    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
68739    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
68740    for (p = buf; *p != '\0'; p++)
68741      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
68742        return 1;
68743  }
68744  /* Check whether a typical GB18030 multibyte sequence is recognized as a
68745     single wide character.  This excludes the GB2312 and GBK encodings.  */
68746  if (mblen ("\203\062\332\066", 5) != 4)
68747    return 1;
68748  return 0;
68749#endif
68750}
68751
68752_ACEOF
68753    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
68754  (eval $ac_link) 2>&5
68755  ac_status=$?
68756  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
68757  test $ac_status = 0; } && test -s conftest$ac_exeext; then
68758      case "$host_os" in
68759        # Handle native Windows specially, because there setlocale() interprets
68760        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
68761        # "fr" or "fra" as "French" or "French_France.1252",
68762        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
68763        # "ja" as "Japanese" or "Japanese_Japan.932",
68764        # and similar.
68765        mingw*)
68766          # Test for the hypothetical native Windows locale name.
68767          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68768            gt_cv_locale_zh_CN=Chinese_China.54936
68769          else
68770            # None found.
68771            gt_cv_locale_zh_CN=none
68772          fi
68773          ;;
68774        solaris2.8)
68775          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
68776          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
68777          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
68778          gt_cv_locale_zh_CN=none
68779          ;;
68780        *)
68781          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
68782          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
68783          # configure script would override the LC_ALL setting. Likewise for
68784          # LC_CTYPE, which is also set at the beginning of the configure script.
68785          # Test for the locale name without encoding suffix.
68786          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68787            gt_cv_locale_zh_CN=zh_CN
68788          else
68789            # Test for the locale name with explicit encoding suffix.
68790            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
68791              gt_cv_locale_zh_CN=zh_CN.GB18030
68792            else
68793              # None found.
68794              gt_cv_locale_zh_CN=none
68795            fi
68796          fi
68797          ;;
68798      esac
68799    else
68800      # If there was a link error, due to mblen(), the system is so old that
68801      # it certainly doesn't have a chinese locale.
68802      gt_cv_locale_zh_CN=none
68803    fi
68804    rm -fr conftest*
68805
68806fi
68807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
68808$as_echo "$gt_cv_locale_zh_CN" >&6; }
68809  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
68810
68811
68812
68813  if test "$ac_cv_header_winsock2_h" = yes; then
68814
68815
68816
68817
68818
68819
68820
68821
68822  gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
68823
68824  fi
68825
68826
68827
68828
68829
68830    if test "$GNULIB_SETSOCKOPT" != 1; then
68831        if test "$GNULIB_SETSOCKOPT" = 0; then
68832      GNULIB_SETSOCKOPT=$gl_module_indicator_condition
68833    else
68834      GNULIB_SETSOCKOPT="($GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
68835    fi
68836  fi
68837
68838
68839
68840
68841
68842$as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
68843
68844
68845
68846
68847
68848
68849
68850
68851               ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
68852"
68853if test "x$ac_cv_have_decl_sleep" = xyes; then :
68854  ac_have_decl=1
68855else
68856  ac_have_decl=0
68857fi
68858
68859cat >>confdefs.h <<_ACEOF
68860#define HAVE_DECL_SLEEP $ac_have_decl
68861_ACEOF
68862
68863
68864  if test $ac_cv_have_decl_sleep != yes; then
68865    HAVE_SLEEP=0
68866  else
68867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
68868$as_echo_n "checking for working sleep... " >&6; }
68869if ${gl_cv_func_sleep_works+:} false; then :
68870  $as_echo_n "(cached) " >&6
68871else
68872  if test "$cross_compiling" = yes; then :
68873  case "$host_os" in
68874                        # Guess yes on glibc systems.
68875         *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
68876                        # Guess yes on musl systems.
68877         *-musl*)       gl_cv_func_sleep_works="guessing yes" ;;
68878                        # Guess no on native Windows.
68879         mingw*)        gl_cv_func_sleep_works="guessing no" ;;
68880                        # If we don't know, obey --enable-cross-guesses.
68881         *)             gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
68882       esac
68883
68884else
68885  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68886/* end confdefs.h.  */
68887
68888#include <errno.h>
68889#include <unistd.h>
68890#include <signal.h>
68891static void
68892handle_alarm (int sig)
68893{
68894  if (sig != SIGALRM)
68895    _exit (2);
68896}
68897
68898int
68899main ()
68900{
68901
68902    /* Failure to compile this test due to missing alarm is okay,
68903       since all such platforms (mingw) also lack sleep.  */
68904    unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
68905    unsigned int remaining;
68906    signal (SIGALRM, handle_alarm);
68907    alarm (1);
68908    remaining = sleep (pentecost);
68909    if (remaining > pentecost)
68910      return 3;
68911    if (remaining <= pentecost - 10)
68912      return 4;
68913    return 0;
68914
68915  ;
68916  return 0;
68917}
68918_ACEOF
68919if ac_fn_c_try_run "$LINENO"; then :
68920  gl_cv_func_sleep_works=yes
68921else
68922  gl_cv_func_sleep_works=no
68923fi
68924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
68925  conftest.$ac_objext conftest.beam conftest.$ac_ext
68926fi
68927
68928fi
68929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
68930$as_echo "$gl_cv_func_sleep_works" >&6; }
68931    case "$gl_cv_func_sleep_works" in
68932      *yes) ;;
68933      *)
68934        REPLACE_SLEEP=1
68935        ;;
68936    esac
68937  fi
68938
68939  if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
68940
68941
68942
68943
68944
68945
68946
68947
68948  gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
68949
68950  fi
68951
68952
68953
68954
68955
68956    if test "$GNULIB_SLEEP" != 1; then
68957        if test "$GNULIB_SLEEP" = 0; then
68958      GNULIB_SLEEP=$gl_module_indicator_condition
68959    else
68960      GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
68961    fi
68962  fi
68963
68964
68965
68966
68967
68968$as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
68969
68970
68971
68972
68973
68974  if test "$ac_cv_header_winsock2_h" = yes; then
68975
68976
68977
68978
68979
68980
68981
68982
68983  gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext"
68984
68985  fi
68986  # When this module is used, sockets may actually occur as file descriptors,
68987  # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
68988
68989
68990
68991  if test "$ac_cv_header_winsock2_h" = yes; then
68992    UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
68993    SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
68994  fi
68995
68996
68997
68998
68999
69000    if test "$GNULIB_SOCKET" != 1; then
69001        if test "$GNULIB_SOCKET" = 0; then
69002      GNULIB_SOCKET=$gl_module_indicator_condition
69003    else
69004      GNULIB_SOCKET="($GNULIB_SOCKET || $gl_module_indicator_condition)"
69005    fi
69006  fi
69007
69008
69009
69010
69011
69012$as_echo "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
69013
69014
69015
69016
69017
69018     ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
69019/* <sys/types.h> is not needed according to POSIX, but the
69020   <sys/socket.h> in i386-unknown-freebsd4.10 and
69021   powerpc-apple-darwin5.5 required it. */
69022#include <sys/types.h>
69023#if HAVE_SYS_SOCKET_H
69024# include <sys/socket.h>
69025#elif HAVE_WS2TCPIP_H
69026# include <ws2tcpip.h>
69027#endif
69028
69029"
69030if test "x$ac_cv_type_socklen_t" = xyes; then :
69031
69032else
69033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
69034$as_echo_n "checking for socklen_t equivalent... " >&6; }
69035if ${gl_cv_socklen_t_equiv+:} false; then :
69036  $as_echo_n "(cached) " >&6
69037else
69038  # Systems have either "struct sockaddr *" or
69039         # "void *" as the second argument to getpeername
69040         gl_cv_socklen_t_equiv=
69041         for arg2 in "struct sockaddr" void; do
69042           for t in int size_t "unsigned int" "long int" "unsigned long int"; do
69043             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69044/* end confdefs.h.  */
69045#include <sys/types.h>
69046                   #include <sys/socket.h>
69047
69048                   int getpeername (int, $arg2 *, $t *);
69049int
69050main ()
69051{
69052$t len;
69053                  getpeername (0, 0, &len);
69054  ;
69055  return 0;
69056}
69057_ACEOF
69058if ac_fn_c_try_compile "$LINENO"; then :
69059  gl_cv_socklen_t_equiv="$t"
69060fi
69061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
69062             test "$gl_cv_socklen_t_equiv" != "" && break
69063           done
69064           test "$gl_cv_socklen_t_equiv" != "" && break
69065         done
69066         if test "$gl_cv_socklen_t_equiv" = ""; then
69067           as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
69068         fi
69069
69070fi
69071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
69072$as_echo "$gl_cv_socklen_t_equiv" >&6; }
69073
69074cat >>confdefs.h <<_ACEOF
69075#define socklen_t $gl_cv_socklen_t_equiv
69076_ACEOF
69077
69078fi
69079
69080
69081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
69082$as_echo_n "checking for working stdalign.h... " >&6; }
69083if ${gl_cv_header_working_stdalign_h+:} false; then :
69084  $as_echo_n "(cached) " >&6
69085else
69086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69087/* end confdefs.h.  */
69088#include <stdalign.h>
69089            #include <stddef.h>
69090
69091            /* Test that alignof yields a result consistent with offsetof.
69092               This catches GCC bug 52023
69093               <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
69094            #ifdef __cplusplus
69095               template <class t> struct alignof_helper { char a; t b; };
69096            # define ao(type) offsetof (alignof_helper<type>, b)
69097            #else
69098            # define ao(type) offsetof (struct { char a; type b; }, b)
69099            #endif
69100            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
69101            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
69102            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
69103
69104            /* Test _Alignas only on platforms where gnulib can help.  */
69105            #if \
69106                ((defined __cplusplus && 201103 <= __cplusplus) \
69107                 || (defined __APPLE__ && defined __MACH__ \
69108                     ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
69109                     : __GNUC__) \
69110                 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
69111                 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
69112                 || 1300 <= _MSC_VER)
69113              struct alignas_test { char c; char alignas (8) alignas_8; };
69114              char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
69115                                ? 1 : -1];
69116            #endif
69117
69118int
69119main ()
69120{
69121
69122  ;
69123  return 0;
69124}
69125_ACEOF
69126if ac_fn_c_try_compile "$LINENO"; then :
69127  gl_cv_header_working_stdalign_h=yes
69128else
69129  gl_cv_header_working_stdalign_h=no
69130fi
69131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
69132fi
69133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
69134$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
69135
69136  if test $gl_cv_header_working_stdalign_h = yes; then
69137    STDALIGN_H=''
69138  else
69139    STDALIGN_H='stdalign.h'
69140  fi
69141
69142
69143   if test -n "$STDALIGN_H"; then
69144  GL_GENERATE_STDALIGN_H_TRUE=
69145  GL_GENERATE_STDALIGN_H_FALSE='#'
69146else
69147  GL_GENERATE_STDALIGN_H_TRUE='#'
69148  GL_GENERATE_STDALIGN_H_FALSE=
69149fi
69150
69151
69152
69153
69154
69155
69156
69157
69158
69159
69160
69161  if test $ac_cv_have_decl_strerror_r = no; then
69162    HAVE_DECL_STRERROR_R=0
69163  fi
69164
69165  if test $ac_cv_func_strerror_r = yes; then
69166    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
69167      if test $gl_cv_func_strerror_r_posix_signature = yes; then
69168        case "$gl_cv_func_strerror_r_works" in
69169                    *no) REPLACE_STRERROR_R=1 ;;
69170        esac
69171      else
69172                REPLACE_STRERROR_R=1
69173      fi
69174    else
69175                  REPLACE_STRERROR_R=1
69176    fi
69177  fi
69178
69179  if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
69180
69181
69182
69183
69184
69185
69186
69187
69188  gltests_LIBOBJS="$gltests_LIBOBJS strerror_r.$ac_objext"
69189
69190
69191
69192
69193
69194
69195  fi
69196
69197
69198
69199
69200
69201    if test "$GNULIB_STRERROR_R" != 1; then
69202        if test "$GNULIB_STRERROR_R" = 0; then
69203      GNULIB_STRERROR_R=$gl_module_indicator_condition
69204    else
69205      GNULIB_STRERROR_R="($GNULIB_STRERROR_R || $gl_module_indicator_condition)"
69206    fi
69207  fi
69208
69209
69210
69211
69212
69213$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
69214
69215
69216
69217
69218
69219cat >>confdefs.h <<_ACEOF
69220#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition
69221_ACEOF
69222
69223
69224
69225
69226
69227  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
69228  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
69229  # irrelevant for anonymous mappings.
69230  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
69231if test "x$ac_cv_func_mmap" = xyes; then :
69232  gl_have_mmap=yes
69233else
69234  gl_have_mmap=no
69235fi
69236
69237
69238  # Try to allow MAP_ANONYMOUS.
69239  gl_have_mmap_anonymous=no
69240  if test $gl_have_mmap = yes; then
69241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
69242$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
69243    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69244/* end confdefs.h.  */
69245
69246#include <sys/mman.h>
69247#ifdef MAP_ANONYMOUS
69248    I cannot identify this map
69249#endif
69250
69251_ACEOF
69252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
69253  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
69254  gl_have_mmap_anonymous=yes
69255fi
69256rm -f conftest*
69257
69258    if test $gl_have_mmap_anonymous != yes; then
69259      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69260/* end confdefs.h.  */
69261
69262#include <sys/mman.h>
69263#ifdef MAP_ANON
69264    I cannot identify this map
69265#endif
69266
69267_ACEOF
69268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
69269  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
69270
69271$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
69272
69273         gl_have_mmap_anonymous=yes
69274fi
69275rm -f conftest*
69276
69277    fi
69278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
69279$as_echo "$gl_have_mmap_anonymous" >&6; }
69280    if test $gl_have_mmap_anonymous = yes; then
69281
69282$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
69283
69284    fi
69285  fi
69286
69287
69288
69289
69290
69291
69292
69293  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
69294  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
69295  # irrelevant for anonymous mappings.
69296  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
69297if test "x$ac_cv_func_mmap" = xyes; then :
69298  gl_have_mmap=yes
69299else
69300  gl_have_mmap=no
69301fi
69302
69303
69304  # Try to allow MAP_ANONYMOUS.
69305  gl_have_mmap_anonymous=no
69306  if test $gl_have_mmap = yes; then
69307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
69308$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
69309    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69310/* end confdefs.h.  */
69311
69312#include <sys/mman.h>
69313#ifdef MAP_ANONYMOUS
69314    I cannot identify this map
69315#endif
69316
69317_ACEOF
69318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
69319  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
69320  gl_have_mmap_anonymous=yes
69321fi
69322rm -f conftest*
69323
69324    if test $gl_have_mmap_anonymous != yes; then
69325      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69326/* end confdefs.h.  */
69327
69328#include <sys/mman.h>
69329#ifdef MAP_ANON
69330    I cannot identify this map
69331#endif
69332
69333_ACEOF
69334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
69335  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
69336
69337$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
69338
69339         gl_have_mmap_anonymous=yes
69340fi
69341rm -f conftest*
69342
69343    fi
69344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
69345$as_echo "$gl_have_mmap_anonymous" >&6; }
69346    if test $gl_have_mmap_anonymous = yes; then
69347
69348$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
69349
69350    fi
69351  fi
69352
69353
69354
69355
69356
69357
69358        if test $ac_cv_func_symlink = no; then
69359    HAVE_SYMLINK=0
69360  else
69361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
69362$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
69363if ${gl_cv_func_symlink_works+:} false; then :
69364  $as_echo_n "(cached) " >&6
69365else
69366  if test "$cross_compiling" = yes; then :
69367  case "$host_os" in
69368                             # Guess yes on Linux systems.
69369            linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
69370                             # Guess yes on glibc systems.
69371            *-gnu* | gnu*)   gl_cv_func_symlink_works="guessing yes" ;;
69372                             # If we don't know, obey --enable-cross-guesses.
69373            *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
69374          esac
69375
69376else
69377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69378/* end confdefs.h.  */
69379#include <unistd.h>
69380
69381int
69382main ()
69383{
69384int result = 0;
69385             if (!symlink ("a", "conftest.link/"))
69386               result |= 1;
69387             if (symlink ("conftest.f", "conftest.lnk2"))
69388               result |= 2;
69389             else if (!symlink ("a", "conftest.lnk2/"))
69390               result |= 4;
69391             return result;
69392
69393  ;
69394  return 0;
69395}
69396_ACEOF
69397if ac_fn_c_try_run "$LINENO"; then :
69398  gl_cv_func_symlink_works=yes
69399else
69400  gl_cv_func_symlink_works=no
69401fi
69402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
69403  conftest.$ac_objext conftest.beam conftest.$ac_ext
69404fi
69405
69406      rm -f conftest.f conftest.link conftest.lnk2
69407fi
69408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
69409$as_echo "$gl_cv_func_symlink_works" >&6; }
69410    case "$gl_cv_func_symlink_works" in
69411      *yes) ;;
69412      *)
69413        REPLACE_SYMLINK=1
69414        ;;
69415    esac
69416  fi
69417
69418  if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
69419
69420
69421
69422
69423
69424
69425
69426
69427  gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
69428
69429  fi
69430
69431
69432
69433
69434
69435    if test "$GNULIB_SYMLINK" != 1; then
69436        if test "$GNULIB_SYMLINK" = 0; then
69437      GNULIB_SYMLINK=$gl_module_indicator_condition
69438    else
69439      GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
69440    fi
69441  fi
69442
69443
69444
69445
69446
69447$as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
69448
69449
69450
69451
69452
69453
69454
69455  if test $ac_cv_header_sys_ioctl_h = yes; then
69456    HAVE_SYS_IOCTL_H=1
69457            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
69458$as_echo_n "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
69459if ${gl_cv_decl_ioctl_in_sys_ioctl_h+:} false; then :
69460  $as_echo_n "(cached) " >&6
69461else
69462         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69463/* end confdefs.h.  */
69464#include <sys/ioctl.h>
69465
69466int
69467main ()
69468{
69469(void) ioctl;
69470  ;
69471  return 0;
69472}
69473_ACEOF
69474if ac_fn_c_try_compile "$LINENO"; then :
69475  gl_cv_decl_ioctl_in_sys_ioctl_h=yes
69476else
69477  gl_cv_decl_ioctl_in_sys_ioctl_h=no
69478fi
69479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
69480
69481fi
69482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
69483$as_echo "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
69484  else
69485    HAVE_SYS_IOCTL_H=0
69486  fi
69487
69488
69489
69490
69491
69492
69493
69494
69495
69496
69497     if test $gl_cv_have_include_next = yes; then
69498       gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
69499     else
69500       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
69501$as_echo_n "checking absolute name of <sys/ioctl.h>... " >&6; }
69502if ${gl_cv_next_sys_ioctl_h+:} false; then :
69503  $as_echo_n "(cached) " >&6
69504else
69505
69506             if test $ac_cv_header_sys_ioctl_h = yes; then
69507
69508
69509
69510
69511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69512/* end confdefs.h.  */
69513#include <sys/ioctl.h>
69514_ACEOF
69515                case "$host_os" in
69516    aix*) gl_absname_cpp="$ac_cpp -C" ;;
69517    *)    gl_absname_cpp="$ac_cpp" ;;
69518  esac
69519
69520  case "$host_os" in
69521    mingw*)
69522                                          gl_dirsep_regex='[/\\]'
69523      ;;
69524    *)
69525      gl_dirsep_regex='\/'
69526      ;;
69527  esac
69528      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
69529  gl_header_literal_regex=`echo 'sys/ioctl.h' \
69530                           | sed -e "$gl_make_literal_regex_sed"`
69531  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
69532      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
69533      s|^/[^/]|//&|
69534      p
69535      q
69536    }'
69537
69538        gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
69539  sed -n "$gl_absolute_header_sed"`
69540
69541           gl_header=$gl_cv_absolute_sys_ioctl_h
69542           gl_cv_next_sys_ioctl_h='"'$gl_header'"'
69543          else
69544               gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
69545             fi
69546
69547
69548fi
69549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
69550$as_echo "$gl_cv_next_sys_ioctl_h" >&6; }
69551     fi
69552     NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
69553
69554     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
69555       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
69556       gl_next_as_first_directive='<'sys/ioctl.h'>'
69557     else
69558       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
69559       gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
69560     fi
69561     NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
69562
69563
69564
69565
69566
69567
69568
69569
69570
69571
69572
69573
69574
69575
69576
69577
69578
69579
69580
69581
69582
69583
69584
69585
69586     if test $gl_cv_have_include_next = yes; then
69587       gl_cv_next_sys_uio_h='<'sys/uio.h'>'
69588     else
69589       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
69590$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
69591if ${gl_cv_next_sys_uio_h+:} false; then :
69592  $as_echo_n "(cached) " >&6
69593else
69594
69595             if test $ac_cv_header_sys_uio_h = yes; then
69596
69597
69598
69599
69600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69601/* end confdefs.h.  */
69602#include <sys/uio.h>
69603_ACEOF
69604                case "$host_os" in
69605    aix*) gl_absname_cpp="$ac_cpp -C" ;;
69606    *)    gl_absname_cpp="$ac_cpp" ;;
69607  esac
69608
69609  case "$host_os" in
69610    mingw*)
69611                                          gl_dirsep_regex='[/\\]'
69612      ;;
69613    *)
69614      gl_dirsep_regex='\/'
69615      ;;
69616  esac
69617      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
69618  gl_header_literal_regex=`echo 'sys/uio.h' \
69619                           | sed -e "$gl_make_literal_regex_sed"`
69620  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
69621      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
69622      s|^/[^/]|//&|
69623      p
69624      q
69625    }'
69626
69627        gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
69628  sed -n "$gl_absolute_header_sed"`
69629
69630           gl_header=$gl_cv_absolute_sys_uio_h
69631           gl_cv_next_sys_uio_h='"'$gl_header'"'
69632          else
69633               gl_cv_next_sys_uio_h='<'sys/uio.h'>'
69634             fi
69635
69636
69637fi
69638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
69639$as_echo "$gl_cv_next_sys_uio_h" >&6; }
69640     fi
69641     NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
69642
69643     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
69644       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
69645       gl_next_as_first_directive='<'sys/uio.h'>'
69646     else
69647       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
69648       gl_next_as_first_directive=$gl_cv_next_sys_uio_h
69649     fi
69650     NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
69651
69652
69653
69654
69655  if test $ac_cv_header_sys_uio_h = yes; then
69656    HAVE_SYS_UIO_H=1
69657  else
69658    HAVE_SYS_UIO_H=0
69659  fi
69660
69661
69662
69663
69664
69665
69666  if test $gl_threads_api = posix; then
69667    gl_save_LIBS="$LIBS"
69668    LIBS="$LIBS $LIBMULTITHREAD"
69669    for ac_func in pthread_atfork
69670do :
69671  ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
69672if test "x$ac_cv_func_pthread_atfork" = xyes; then :
69673  cat >>confdefs.h <<_ACEOF
69674#define HAVE_PTHREAD_ATFORK 1
69675_ACEOF
69676
69677fi
69678done
69679
69680    LIBS="$gl_save_LIBS"
69681  fi
69682
69683
69684
69685
69686       if  { test "$HAVE_LIBUNISTRING" != yes \
69687    || {
69688
69689
69690
69691            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
69692            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
69693                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
69694                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
69695                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
69696                         }
69697                    }
69698               }
69699
69700
69701
69702
69703       }
69704  }; then
69705  LIBUNISTRING_COMPILE_UNISTR_U8_CMP_TRUE=
69706  LIBUNISTRING_COMPILE_UNISTR_U8_CMP_FALSE='#'
69707else
69708  LIBUNISTRING_COMPILE_UNISTR_U8_CMP_TRUE='#'
69709  LIBUNISTRING_COMPILE_UNISTR_U8_CMP_FALSE=
69710fi
69711
69712
69713
69714
69715
69716  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
69717  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
69718  # irrelevant for anonymous mappings.
69719  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
69720if test "x$ac_cv_func_mmap" = xyes; then :
69721  gl_have_mmap=yes
69722else
69723  gl_have_mmap=no
69724fi
69725
69726
69727  # Try to allow MAP_ANONYMOUS.
69728  gl_have_mmap_anonymous=no
69729  if test $gl_have_mmap = yes; then
69730    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
69731$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
69732    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69733/* end confdefs.h.  */
69734
69735#include <sys/mman.h>
69736#ifdef MAP_ANONYMOUS
69737    I cannot identify this map
69738#endif
69739
69740_ACEOF
69741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
69742  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
69743  gl_have_mmap_anonymous=yes
69744fi
69745rm -f conftest*
69746
69747    if test $gl_have_mmap_anonymous != yes; then
69748      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69749/* end confdefs.h.  */
69750
69751#include <sys/mman.h>
69752#ifdef MAP_ANON
69753    I cannot identify this map
69754#endif
69755
69756_ACEOF
69757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
69758  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
69759
69760$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
69761
69762         gl_have_mmap_anonymous=yes
69763fi
69764rm -f conftest*
69765
69766    fi
69767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
69768$as_echo "$gl_have_mmap_anonymous" >&6; }
69769    if test $gl_have_mmap_anonymous = yes; then
69770
69771$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
69772
69773    fi
69774  fi
69775
69776
69777
69778
69779
69780       if  { test "$HAVE_LIBUNISTRING" != yes \
69781    || {
69782
69783
69784
69785            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
69786            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
69787                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
69788                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
69789                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
69790                         }
69791                    }
69792               }
69793
69794
69795
69796
69797       }
69798  }; then
69799  LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_TRUE=
69800  LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_FALSE='#'
69801else
69802  LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_TRUE='#'
69803  LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_FALSE=
69804fi
69805
69806
69807
69808
69809
69810
69811  # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
69812  # Cygwin, and mingw never let anyone (even root) unlink directories.
69813  # If anyone knows of another system for which unlink can never
69814  # remove a directory, please report it to <bug-coreutils@gnu.org>.
69815  # Unfortunately this is difficult to test for, since it requires root access
69816  # and might create garbage in the file system,
69817  # so the code below simply relies on the kernel name and version number.
69818  case $host_os in
69819  gnu[0-9]* | \
69820  linux-* | linux | \
69821  freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
69822  cygwin | \
69823  mingw*)
69824
69825$as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
69826;;
69827  esac
69828
69829
69830
69831
69832
69833  ac_fn_c_check_type "$LINENO" "useconds_t" "ac_cv_type_useconds_t" "$ac_includes_default"
69834if test "x$ac_cv_type_useconds_t" = xyes; then :
69835
69836else
69837
69838$as_echo "#define useconds_t unsigned int" >>confdefs.h
69839
69840fi
69841
69842  if test $ac_cv_func_usleep = no; then
69843    HAVE_USLEEP=0
69844  else
69845            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usleep allows large arguments" >&5
69846$as_echo_n "checking whether usleep allows large arguments... " >&6; }
69847if ${gl_cv_func_usleep_works+:} false; then :
69848  $as_echo_n "(cached) " >&6
69849else
69850  if test "$cross_compiling" = yes; then :
69851  case "$host_os" in
69852                          # Guess yes on glibc systems.
69853           *-gnu* | gnu*) gl_cv_func_usleep_works="guessing yes" ;;
69854                          # Guess yes on musl systems.
69855           *-musl*)       gl_cv_func_usleep_works="guessing yes" ;;
69856                          # Guess no on native Windows.
69857           mingw*)        gl_cv_func_usleep_works="guessing no" ;;
69858                          # If we don't know, obey --enable-cross-guesses.
69859           *)             gl_cv_func_usleep_works="$gl_cross_guess_normal" ;;
69860         esac
69861
69862else
69863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69864/* end confdefs.h.  */
69865
69866#include <unistd.h>
69867
69868int
69869main ()
69870{
69871return !!usleep (1000000);
69872  ;
69873  return 0;
69874}
69875_ACEOF
69876if ac_fn_c_try_run "$LINENO"; then :
69877  gl_cv_func_usleep_works=yes
69878else
69879  gl_cv_func_usleep_works=no
69880fi
69881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
69882  conftest.$ac_objext conftest.beam conftest.$ac_ext
69883fi
69884
69885fi
69886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_usleep_works" >&5
69887$as_echo "$gl_cv_func_usleep_works" >&6; }
69888    case "$gl_cv_func_usleep_works" in
69889      *yes) ;;
69890      *)
69891        REPLACE_USLEEP=1
69892        ;;
69893    esac
69894  fi
69895
69896  if test $HAVE_USLEEP = 0 || test $REPLACE_USLEEP = 1; then
69897
69898
69899
69900
69901
69902
69903
69904
69905  gltests_LIBOBJS="$gltests_LIBOBJS usleep.$ac_objext"
69906
69907  fi
69908
69909
69910
69911
69912
69913    if test "$GNULIB_USLEEP" != 1; then
69914        if test "$GNULIB_USLEEP" = 0; then
69915      GNULIB_USLEEP=$gl_module_indicator_condition
69916    else
69917      GNULIB_USLEEP="($GNULIB_USLEEP || $gl_module_indicator_condition)"
69918    fi
69919  fi
69920
69921
69922
69923
69924
69925$as_echo "#define GNULIB_TEST_USLEEP 1" >>confdefs.h
69926
69927
69928
69929
69930
69931
69932  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
69933  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
69934  # irrelevant for anonymous mappings.
69935  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
69936if test "x$ac_cv_func_mmap" = xyes; then :
69937  gl_have_mmap=yes
69938else
69939  gl_have_mmap=no
69940fi
69941
69942
69943  # Try to allow MAP_ANONYMOUS.
69944  gl_have_mmap_anonymous=no
69945  if test $gl_have_mmap = yes; then
69946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
69947$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
69948    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69949/* end confdefs.h.  */
69950
69951#include <sys/mman.h>
69952#ifdef MAP_ANONYMOUS
69953    I cannot identify this map
69954#endif
69955
69956_ACEOF
69957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
69958  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
69959  gl_have_mmap_anonymous=yes
69960fi
69961rm -f conftest*
69962
69963    if test $gl_have_mmap_anonymous != yes; then
69964      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69965/* end confdefs.h.  */
69966
69967#include <sys/mman.h>
69968#ifdef MAP_ANON
69969    I cannot identify this map
69970#endif
69971
69972_ACEOF
69973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
69974  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
69975
69976$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
69977
69978         gl_have_mmap_anonymous=yes
69979fi
69980rm -f conftest*
69981
69982    fi
69983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
69984$as_echo "$gl_have_mmap_anonymous" >&6; }
69985    if test $gl_have_mmap_anonymous = yes; then
69986
69987$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
69988
69989    fi
69990  fi
69991
69992
69993
69994
69995
69996
69997
69998
69999
70000
70001
70002
70003
70004
70005        if case "$host_os" in
70006       mingw*) true ;;
70007       *) test $ac_cv_func_mbsinit = yes ;;
70008     esac \
70009    && test $ac_cv_func_mbrtowc = yes; then
70010
70011
70012
70013
70014     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
70015$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
70016if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
70017  $as_echo_n "(cached) " >&6
70018else
70019
70020                  case "$host_os" in
70021                     # Guess no on AIX and OSF/1.
70022        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
70023                     # Guess yes otherwise.
70024        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
70025      esac
70026      if test $LOCALE_JA != none; then
70027        if test "$cross_compiling" = yes; then :
70028  :
70029else
70030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70031/* end confdefs.h.  */
70032
70033#include <locale.h>
70034#include <string.h>
70035/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
70036   <wchar.h>.
70037   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
70038   included before <wchar.h>.  */
70039#include <stddef.h>
70040#include <stdio.h>
70041#include <time.h>
70042#include <wchar.h>
70043int main ()
70044{
70045  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
70046    {
70047      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
70048      mbstate_t state;
70049      wchar_t wc;
70050
70051      memset (&state, '\0', sizeof (mbstate_t));
70052      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
70053        if (mbsinit (&state))
70054          return 2;
70055    }
70056  return 0;
70057}
70058_ACEOF
70059if ac_fn_c_try_run "$LINENO"; then :
70060  gl_cv_func_mbrtowc_incomplete_state=yes
70061else
70062  gl_cv_func_mbrtowc_incomplete_state=no
70063fi
70064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
70065  conftest.$ac_objext conftest.beam conftest.$ac_ext
70066fi
70067
70068      else
70069        if test $LOCALE_FR_UTF8 != none; then
70070          if test "$cross_compiling" = yes; then :
70071  :
70072else
70073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70074/* end confdefs.h.  */
70075
70076#include <locale.h>
70077#include <string.h>
70078/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
70079   <wchar.h>.
70080   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
70081   included before <wchar.h>.  */
70082#include <stddef.h>
70083#include <stdio.h>
70084#include <time.h>
70085#include <wchar.h>
70086int main ()
70087{
70088  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
70089    {
70090      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
70091      mbstate_t state;
70092      wchar_t wc;
70093
70094      memset (&state, '\0', sizeof (mbstate_t));
70095      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
70096        if (mbsinit (&state))
70097          return 2;
70098    }
70099  return 0;
70100}
70101_ACEOF
70102if ac_fn_c_try_run "$LINENO"; then :
70103  gl_cv_func_mbrtowc_incomplete_state=yes
70104else
70105  gl_cv_func_mbrtowc_incomplete_state=no
70106fi
70107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
70108  conftest.$ac_objext conftest.beam conftest.$ac_ext
70109fi
70110
70111        fi
70112      fi
70113
70114fi
70115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
70116$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
70117
70118
70119
70120
70121     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
70122$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
70123if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
70124  $as_echo_n "(cached) " >&6
70125else
70126
70127                  case "$host_os" in
70128                    # Guess no on Solaris 8.
70129        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
70130                    # Guess yes otherwise.
70131        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
70132      esac
70133      if test $LOCALE_ZH_CN != none; then
70134        if test "$cross_compiling" = yes; then :
70135  :
70136else
70137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70138/* end confdefs.h.  */
70139
70140#include <locale.h>
70141#include <stdlib.h>
70142#include <string.h>
70143/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
70144   <wchar.h>.
70145   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
70146   included before <wchar.h>.  */
70147#include <stddef.h>
70148#include <stdio.h>
70149#include <time.h>
70150#include <wchar.h>
70151int main ()
70152{
70153  /* This fails on Solaris 8:
70154     mbrtowc returns 2, and sets wc to 0x00F0.
70155     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
70156  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
70157    {
70158      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
70159      mbstate_t state;
70160      wchar_t wc;
70161
70162      memset (&state, '\0', sizeof (mbstate_t));
70163      if (mbrtowc (&wc, input + 3, 6, &state) != 4
70164          && mbtowc (&wc, input + 3, 6) == 4)
70165        return 2;
70166    }
70167  return 0;
70168}
70169_ACEOF
70170if ac_fn_c_try_run "$LINENO"; then :
70171  gl_cv_func_mbrtowc_sanitycheck=yes
70172else
70173  gl_cv_func_mbrtowc_sanitycheck=no
70174fi
70175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
70176  conftest.$ac_objext conftest.beam conftest.$ac_ext
70177fi
70178
70179      fi
70180
70181fi
70182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
70183$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
70184
70185    REPLACE_MBSTATE_T=0
70186    case "$gl_cv_func_mbrtowc_incomplete_state" in
70187      *yes) ;;
70188      *) REPLACE_MBSTATE_T=1 ;;
70189    esac
70190    case "$gl_cv_func_mbrtowc_sanitycheck" in
70191      *yes) ;;
70192      *) REPLACE_MBSTATE_T=1 ;;
70193    esac
70194  else
70195    REPLACE_MBSTATE_T=1
70196  fi
70197
70198
70199
70200  if test $ac_cv_func_wcrtomb = no; then
70201    HAVE_WCRTOMB=0
70202    ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
70203/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
70204   <wchar.h>.
70205   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
70206   included before <wchar.h>.  */
70207#include <stddef.h>
70208#include <stdio.h>
70209#include <time.h>
70210#include <wchar.h>
70211
70212"
70213if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
70214  ac_have_decl=1
70215else
70216  ac_have_decl=0
70217fi
70218
70219cat >>confdefs.h <<_ACEOF
70220#define HAVE_DECL_WCRTOMB $ac_have_decl
70221_ACEOF
70222
70223    if test $ac_cv_have_decl_wcrtomb = yes; then
70224                        REPLACE_WCRTOMB=1
70225    fi
70226  else
70227                        if test $REPLACE_WCRTOMB = 0; then
70228
70229
70230
70231
70232
70233             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
70234$as_echo_n "checking whether wcrtomb works in the C locale... " >&6; }
70235if ${gl_cv_func_wcrtomb_works+:} false; then :
70236  $as_echo_n "(cached) " >&6
70237else
70238  if test "$cross_compiling" = yes; then :
70239  case "$host_os" in
70240                               # Guess no on Android.
70241              linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
70242                               # Guess yes otherwise.
70243              *)               gl_cv_func_wcrtomb_works="guessing yes";;
70244            esac
70245
70246else
70247  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70248/* end confdefs.h.  */
70249
70250#include <string.h>
70251#include <stdlib.h>
70252/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
70253   <wchar.h>.
70254   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
70255   included before <wchar.h>.  */
70256#include <stddef.h>
70257#include <stdio.h>
70258#include <wchar.h>
70259int main ()
70260{
70261  mbstate_t state;
70262  char out[64];
70263  int count;
70264  memset (&state, 0, sizeof (state));
70265  out[0] = 'x';
70266  count = wcrtomb (out, L'a', &state);
70267  return !(count == 1 && out[0] == 'a');
70268}
70269_ACEOF
70270if ac_fn_c_try_run "$LINENO"; then :
70271  gl_cv_func_wcrtomb_works=yes
70272else
70273  gl_cv_func_wcrtomb_works=no
70274fi
70275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
70276  conftest.$ac_objext conftest.beam conftest.$ac_ext
70277fi
70278
70279
70280fi
70281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
70282$as_echo "$gl_cv_func_wcrtomb_works" >&6; }
70283      case "$gl_cv_func_wcrtomb_works" in
70284        *yes) ;;
70285        *)
70286$as_echo "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
70287
70288           REPLACE_WCRTOMB=1 ;;
70289      esac
70290    fi
70291    if test $REPLACE_WCRTOMB = 0; then
70292      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
70293$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
70294if ${gl_cv_func_wcrtomb_retval+:} false; then :
70295  $as_echo_n "(cached) " >&6
70296else
70297
70298                              case "$host_os" in
70299            # Guess no on AIX 4, OSF/1, Solaris, native Windows.
70300            aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
70301            # Guess yes otherwise.
70302            *)                                gl_cv_func_wcrtomb_retval="guessing yes" ;;
70303          esac
70304          if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
70305            if test "$cross_compiling" = yes; then :
70306  :
70307else
70308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70309/* end confdefs.h.  */
70310
70311#include <locale.h>
70312#include <string.h>
70313/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
70314   <wchar.h>.
70315   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
70316   included before <wchar.h>.  */
70317#include <stddef.h>
70318#include <stdio.h>
70319#include <time.h>
70320#include <wchar.h>
70321#include <stdlib.h>
70322int main ()
70323{
70324  int result = 0;
70325  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
70326    {
70327      if (wcrtomb (NULL, 0, NULL) != 1)
70328        result |= 1;
70329    }
70330  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
70331    {
70332      if (wcrtomb (NULL, 0, NULL) != 1)
70333        result |= 2;
70334      {
70335        wchar_t wc = (wchar_t) 0xBADFACE;
70336        if (mbtowc (&wc, "\303\274", 2) == 2)
70337          if (wcrtomb (NULL, wc, NULL) != 1)
70338            result |= 2;
70339      }
70340    }
70341  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
70342    {
70343      if (wcrtomb (NULL, 0, NULL) != 1)
70344        result |= 4;
70345    }
70346  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
70347    {
70348      if (wcrtomb (NULL, 0, NULL) != 1)
70349        result |= 8;
70350    }
70351  return result;
70352}
70353_ACEOF
70354if ac_fn_c_try_run "$LINENO"; then :
70355  gl_cv_func_wcrtomb_retval=yes
70356else
70357  gl_cv_func_wcrtomb_retval=no
70358fi
70359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
70360  conftest.$ac_objext conftest.beam conftest.$ac_ext
70361fi
70362
70363          fi
70364
70365fi
70366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
70367$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
70368      case "$gl_cv_func_wcrtomb_retval" in
70369        *yes) ;;
70370        *)
70371$as_echo "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
70372
70373           REPLACE_WCRTOMB=1 ;;
70374      esac
70375    fi
70376  fi
70377
70378  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
70379
70380
70381
70382
70383
70384
70385
70386
70387  gltests_LIBOBJS="$gltests_LIBOBJS wcrtomb.$ac_objext"
70388
70389
70390  :
70391
70392  fi
70393
70394
70395
70396
70397
70398    if test "$GNULIB_WCRTOMB" != 1; then
70399        if test "$GNULIB_WCRTOMB" = 0; then
70400      GNULIB_WCRTOMB=$gl_module_indicator_condition
70401    else
70402      GNULIB_WCRTOMB="($GNULIB_WCRTOMB || $gl_module_indicator_condition)"
70403    fi
70404  fi
70405
70406
70407
70408
70409
70410$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
70411
70412
70413
70414
70415
70416
70417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
70418$as_echo_n "checking for a traditional french locale... " >&6; }
70419if ${gt_cv_locale_fr+:} false; then :
70420  $as_echo_n "(cached) " >&6
70421else
70422
70423    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70424/* end confdefs.h.  */
70425
70426#include <locale.h>
70427#include <time.h>
70428#if HAVE_LANGINFO_CODESET
70429# include <langinfo.h>
70430#endif
70431#include <stdlib.h>
70432#include <string.h>
70433struct tm t;
70434char buf[16];
70435int main () {
70436  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
70437     imitates locale dependent behaviour by looking at the environment
70438     variables, and all locales use the UTF-8 encoding.  */
70439#if defined __BEOS__ || defined __HAIKU__
70440  return 1;
70441#else
70442  /* Check whether the given locale name is recognized by the system.  */
70443# if defined _WIN32 && !defined __CYGWIN__
70444  /* On native Windows, setlocale(category, "") looks at the system settings,
70445     not at the environment variables.  Also, when an encoding suffix such
70446     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
70447     category of the locale to "C".  */
70448  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
70449      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
70450    return 1;
70451# else
70452  if (setlocale (LC_ALL, "") == NULL) return 1;
70453# endif
70454  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
70455     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
70456     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
70457     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
70458     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
70459     some unit tests fail.
70460     On MirBSD 10, when an unsupported locale is specified, setlocale()
70461     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
70462# if HAVE_LANGINFO_CODESET
70463  {
70464    const char *cs = nl_langinfo (CODESET);
70465    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
70466        || strcmp (cs, "UTF-8") == 0)
70467      return 1;
70468  }
70469# endif
70470# ifdef __CYGWIN__
70471  /* On Cygwin, avoid locale names without encoding suffix, because the
70472     locale_charset() function relies on the encoding suffix.  Note that
70473     LC_ALL is set on the command line.  */
70474  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
70475# endif
70476  /* Check whether in the abbreviation of the second month, the second
70477     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
70478     one byte long. This excludes the UTF-8 encoding.  */
70479  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
70480  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
70481# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
70482  /* Check whether the decimal separator is a comma.
70483     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
70484     are nl_langinfo(RADIXCHAR) are both ".".  */
70485  if (localeconv () ->decimal_point[0] != ',') return 1;
70486# endif
70487  return 0;
70488#endif
70489}
70490
70491_ACEOF
70492    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
70493  (eval $ac_link) 2>&5
70494  ac_status=$?
70495  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
70496  test $ac_status = 0; } && test -s conftest$ac_exeext; then
70497      case "$host_os" in
70498        # Handle native Windows specially, because there setlocale() interprets
70499        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
70500        # "fr" or "fra" as "French" or "French_France.1252",
70501        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
70502        # "ja" as "Japanese" or "Japanese_Japan.932",
70503        # and similar.
70504        mingw*)
70505          # Test for the native Windows locale name.
70506          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70507            gt_cv_locale_fr=French_France.1252
70508          else
70509            # None found.
70510            gt_cv_locale_fr=none
70511          fi
70512          ;;
70513        *)
70514          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
70515          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
70516          # configure script would override the LC_ALL setting. Likewise for
70517          # LC_CTYPE, which is also set at the beginning of the configure script.
70518          # Test for the usual locale name.
70519          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70520            gt_cv_locale_fr=fr_FR
70521          else
70522            # Test for the locale name with explicit encoding suffix.
70523            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70524              gt_cv_locale_fr=fr_FR.ISO-8859-1
70525            else
70526              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
70527              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70528                gt_cv_locale_fr=fr_FR.ISO8859-1
70529              else
70530                # Test for the HP-UX locale name.
70531                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70532                  gt_cv_locale_fr=fr_FR.iso88591
70533                else
70534                  # Test for the Solaris 7 locale name.
70535                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70536                    gt_cv_locale_fr=fr
70537                  else
70538                    # None found.
70539                    gt_cv_locale_fr=none
70540                  fi
70541                fi
70542              fi
70543            fi
70544          fi
70545          ;;
70546      esac
70547    fi
70548    rm -fr conftest*
70549
70550fi
70551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
70552$as_echo "$gt_cv_locale_fr" >&6; }
70553  LOCALE_FR=$gt_cv_locale_fr
70554
70555
70556
70557
70558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
70559$as_echo_n "checking for a french Unicode locale... " >&6; }
70560if ${gt_cv_locale_fr_utf8+:} false; then :
70561  $as_echo_n "(cached) " >&6
70562else
70563
70564    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70565/* end confdefs.h.  */
70566
70567#include <locale.h>
70568#include <time.h>
70569#if HAVE_LANGINFO_CODESET
70570# include <langinfo.h>
70571#endif
70572#include <stdlib.h>
70573#include <string.h>
70574struct tm t;
70575char buf[16];
70576int main () {
70577  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
70578     imitates locale dependent behaviour by looking at the environment
70579     variables, and all locales use the UTF-8 encoding.  */
70580#if !(defined __BEOS__ || defined __HAIKU__)
70581  /* Check whether the given locale name is recognized by the system.  */
70582# if defined _WIN32 && !defined __CYGWIN__
70583  /* On native Windows, setlocale(category, "") looks at the system settings,
70584     not at the environment variables.  Also, when an encoding suffix such
70585     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
70586     category of the locale to "C".  */
70587  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
70588      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
70589    return 1;
70590# else
70591  if (setlocale (LC_ALL, "") == NULL) return 1;
70592# endif
70593  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
70594     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
70595     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
70596     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
70597     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
70598     some unit tests fail.  */
70599# if HAVE_LANGINFO_CODESET
70600  {
70601    const char *cs = nl_langinfo (CODESET);
70602    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
70603      return 1;
70604  }
70605# endif
70606# ifdef __CYGWIN__
70607  /* On Cygwin, avoid locale names without encoding suffix, because the
70608     locale_charset() function relies on the encoding suffix.  Note that
70609     LC_ALL is set on the command line.  */
70610  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
70611# endif
70612  /* Check whether in the abbreviation of the second month, the second
70613     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
70614     two bytes long, with UTF-8 encoding.  */
70615  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
70616  if (strftime (buf, sizeof (buf), "%b", &t) < 4
70617      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
70618    return 1;
70619#endif
70620#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
70621  /* Check whether the decimal separator is a comma.
70622     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
70623     are nl_langinfo(RADIXCHAR) are both ".".  */
70624  if (localeconv () ->decimal_point[0] != ',') return 1;
70625#endif
70626  return 0;
70627}
70628
70629_ACEOF
70630    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
70631  (eval $ac_link) 2>&5
70632  ac_status=$?
70633  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
70634  test $ac_status = 0; } && test -s conftest$ac_exeext; then
70635      case "$host_os" in
70636        # Handle native Windows specially, because there setlocale() interprets
70637        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
70638        # "fr" or "fra" as "French" or "French_France.1252",
70639        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
70640        # "ja" as "Japanese" or "Japanese_Japan.932",
70641        # and similar.
70642        mingw*)
70643          # Test for the hypothetical native Windows locale name.
70644          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70645            gt_cv_locale_fr_utf8=French_France.65001
70646          else
70647            # None found.
70648            gt_cv_locale_fr_utf8=none
70649          fi
70650          ;;
70651        *)
70652          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
70653          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
70654          # configure script would override the LC_ALL setting. Likewise for
70655          # LC_CTYPE, which is also set at the beginning of the configure script.
70656          # Test for the usual locale name.
70657          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70658            gt_cv_locale_fr_utf8=fr_FR
70659          else
70660            # Test for the locale name with explicit encoding suffix.
70661            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70662              gt_cv_locale_fr_utf8=fr_FR.UTF-8
70663            else
70664              # Test for the Solaris 7 locale name.
70665              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70666                gt_cv_locale_fr_utf8=fr.UTF-8
70667              else
70668                # None found.
70669                gt_cv_locale_fr_utf8=none
70670              fi
70671            fi
70672          fi
70673          ;;
70674      esac
70675    fi
70676    rm -fr conftest*
70677
70678fi
70679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
70680$as_echo "$gt_cv_locale_fr_utf8" >&6; }
70681  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
70682
70683
70684
70685
70686
70687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
70688$as_echo_n "checking for a traditional japanese locale... " >&6; }
70689if ${gt_cv_locale_ja+:} false; then :
70690  $as_echo_n "(cached) " >&6
70691else
70692
70693    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70694/* end confdefs.h.  */
70695
70696#include <locale.h>
70697#include <time.h>
70698#if HAVE_LANGINFO_CODESET
70699# include <langinfo.h>
70700#endif
70701#include <stdlib.h>
70702#include <string.h>
70703struct tm t;
70704char buf[16];
70705int main ()
70706{
70707  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
70708     imitates locale dependent behaviour by looking at the environment
70709     variables, and all locales use the UTF-8 encoding.  */
70710#if defined __BEOS__ || defined __HAIKU__
70711  return 1;
70712#else
70713  /* Check whether the given locale name is recognized by the system.  */
70714# if defined _WIN32 && !defined __CYGWIN__
70715  /* On native Windows, setlocale(category, "") looks at the system settings,
70716     not at the environment variables.  Also, when an encoding suffix such
70717     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
70718     category of the locale to "C".  */
70719  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
70720      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
70721    return 1;
70722# else
70723  if (setlocale (LC_ALL, "") == NULL) return 1;
70724# endif
70725  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
70726     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
70727     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
70728     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
70729     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
70730     some unit tests fail.
70731     On MirBSD 10, when an unsupported locale is specified, setlocale()
70732     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
70733# if HAVE_LANGINFO_CODESET
70734  {
70735    const char *cs = nl_langinfo (CODESET);
70736    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
70737        || strcmp (cs, "UTF-8") == 0)
70738      return 1;
70739  }
70740# endif
70741# ifdef __CYGWIN__
70742  /* On Cygwin, avoid locale names without encoding suffix, because the
70743     locale_charset() function relies on the encoding suffix.  Note that
70744     LC_ALL is set on the command line.  */
70745  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
70746# endif
70747  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
70748     on Cygwin 1.5.x.  */
70749  if (MB_CUR_MAX == 1)
70750    return 1;
70751  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
70752     This excludes the UTF-8 encoding (except on MirBSD).  */
70753  {
70754    const char *p;
70755    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
70756    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
70757    for (p = buf; *p != '\0'; p++)
70758      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
70759        return 1;
70760  }
70761  return 0;
70762#endif
70763}
70764
70765_ACEOF
70766    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
70767  (eval $ac_link) 2>&5
70768  ac_status=$?
70769  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
70770  test $ac_status = 0; } && test -s conftest$ac_exeext; then
70771      case "$host_os" in
70772        # Handle native Windows specially, because there setlocale() interprets
70773        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
70774        # "fr" or "fra" as "French" or "French_France.1252",
70775        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
70776        # "ja" as "Japanese" or "Japanese_Japan.932",
70777        # and similar.
70778        mingw*)
70779          # Note that on native Windows, the Japanese locale is
70780          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
70781          # cannot use it here.
70782          gt_cv_locale_ja=none
70783          ;;
70784        *)
70785          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
70786          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
70787          # configure script would override the LC_ALL setting. Likewise for
70788          # LC_CTYPE, which is also set at the beginning of the configure script.
70789          # Test for the AIX locale name.
70790          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70791            gt_cv_locale_ja=ja_JP
70792          else
70793            # Test for the locale name with explicit encoding suffix.
70794            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70795              gt_cv_locale_ja=ja_JP.EUC-JP
70796            else
70797              # Test for the HP-UX, OSF/1, NetBSD locale name.
70798              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70799                gt_cv_locale_ja=ja_JP.eucJP
70800              else
70801                # Test for the IRIX, FreeBSD locale name.
70802                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70803                  gt_cv_locale_ja=ja_JP.EUC
70804                else
70805                  # Test for the Solaris 7 locale name.
70806                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70807                    gt_cv_locale_ja=ja
70808                  else
70809                    # Special test for NetBSD 1.6.
70810                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
70811                      gt_cv_locale_ja=ja_JP.eucJP
70812                    else
70813                      # None found.
70814                      gt_cv_locale_ja=none
70815                    fi
70816                  fi
70817                fi
70818              fi
70819            fi
70820          fi
70821          ;;
70822      esac
70823    fi
70824    rm -fr conftest*
70825
70826fi
70827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
70828$as_echo "$gt_cv_locale_ja" >&6; }
70829  LOCALE_JA=$gt_cv_locale_ja
70830
70831
70832
70833
70834
70835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
70836$as_echo_n "checking for a transitional chinese locale... " >&6; }
70837if ${gt_cv_locale_zh_CN+:} false; then :
70838  $as_echo_n "(cached) " >&6
70839else
70840
70841    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70842/* end confdefs.h.  */
70843
70844#include <locale.h>
70845#include <stdlib.h>
70846#include <time.h>
70847#if HAVE_LANGINFO_CODESET
70848# include <langinfo.h>
70849#endif
70850#include <stdlib.h>
70851#include <string.h>
70852struct tm t;
70853char buf[16];
70854int main ()
70855{
70856  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
70857     imitates locale dependent behaviour by looking at the environment
70858     variables, and all locales use the UTF-8 encoding.  */
70859#if defined __BEOS__ || defined __HAIKU__
70860  return 1;
70861#else
70862  /* Check whether the given locale name is recognized by the system.  */
70863# if defined _WIN32 && !defined __CYGWIN__
70864  /* On native Windows, setlocale(category, "") looks at the system settings,
70865     not at the environment variables.  Also, when an encoding suffix such
70866     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
70867     category of the locale to "C".  */
70868  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
70869      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
70870    return 1;
70871# else
70872  if (setlocale (LC_ALL, "") == NULL) return 1;
70873# endif
70874  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
70875     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
70876     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
70877     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
70878     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
70879     some unit tests fail.
70880     On MirBSD 10, when an unsupported locale is specified, setlocale()
70881     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
70882# if HAVE_LANGINFO_CODESET
70883  {
70884    const char *cs = nl_langinfo (CODESET);
70885    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
70886        || strcmp (cs, "UTF-8") == 0)
70887      return 1;
70888  }
70889# endif
70890# ifdef __CYGWIN__
70891  /* On Cygwin, avoid locale names without encoding suffix, because the
70892     locale_charset() function relies on the encoding suffix.  Note that
70893     LC_ALL is set on the command line.  */
70894  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
70895# endif
70896  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
70897     This excludes the UTF-8 encoding (except on MirBSD).  */
70898  {
70899    const char *p;
70900    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
70901    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
70902    for (p = buf; *p != '\0'; p++)
70903      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
70904        return 1;
70905  }
70906  /* Check whether a typical GB18030 multibyte sequence is recognized as a
70907     single wide character.  This excludes the GB2312 and GBK encodings.  */
70908  if (mblen ("\203\062\332\066", 5) != 4)
70909    return 1;
70910  return 0;
70911#endif
70912}
70913
70914_ACEOF
70915    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
70916  (eval $ac_link) 2>&5
70917  ac_status=$?
70918  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
70919  test $ac_status = 0; } && test -s conftest$ac_exeext; then
70920      case "$host_os" in
70921        # Handle native Windows specially, because there setlocale() interprets
70922        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
70923        # "fr" or "fra" as "French" or "French_France.1252",
70924        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
70925        # "ja" as "Japanese" or "Japanese_Japan.932",
70926        # and similar.
70927        mingw*)
70928          # Test for the hypothetical native Windows locale name.
70929          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70930            gt_cv_locale_zh_CN=Chinese_China.54936
70931          else
70932            # None found.
70933            gt_cv_locale_zh_CN=none
70934          fi
70935          ;;
70936        solaris2.8)
70937          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
70938          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
70939          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
70940          gt_cv_locale_zh_CN=none
70941          ;;
70942        *)
70943          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
70944          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
70945          # configure script would override the LC_ALL setting. Likewise for
70946          # LC_CTYPE, which is also set at the beginning of the configure script.
70947          # Test for the locale name without encoding suffix.
70948          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70949            gt_cv_locale_zh_CN=zh_CN
70950          else
70951            # Test for the locale name with explicit encoding suffix.
70952            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
70953              gt_cv_locale_zh_CN=zh_CN.GB18030
70954            else
70955              # None found.
70956              gt_cv_locale_zh_CN=none
70957            fi
70958          fi
70959          ;;
70960      esac
70961    else
70962      # If there was a link error, due to mblen(), the system is so old that
70963      # it certainly doesn't have a chinese locale.
70964      gt_cv_locale_zh_CN=none
70965    fi
70966    rm -fr conftest*
70967
70968fi
70969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
70970$as_echo "$gt_cv_locale_zh_CN" >&6; }
70971  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
70972
70973
70974
70975
70976
70977
70978  if test $ac_cv_func_wctob = no; then
70979    HAVE_WCTOB=0
70980    HAVE_DECL_WCTOB=0
70981  else
70982    HAVE_WCTOB=1
70983
70984
70985
70986         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
70987$as_echo_n "checking whether wctob works... " >&6; }
70988if ${gl_cv_func_wctob_works+:} false; then :
70989  $as_echo_n "(cached) " >&6
70990else
70991
70992                        case "$host_os" in
70993            # Guess no on Solaris <= 9 and Cygwin.
70994          solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
70995            gl_cv_func_wctob_works="guessing no" ;;
70996            # Guess no on native Windows.
70997          mingw*)
70998            gl_cv_func_wctob_works="guessing no" ;;
70999            # Guess yes otherwise.
71000          *) gl_cv_func_wctob_works="guessing yes" ;;
71001        esac
71002        case "$host_os" in
71003          cygwin*)
71004            if test "$cross_compiling" = yes; then :
71005  :
71006else
71007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71008/* end confdefs.h.  */
71009
71010#include <locale.h>
71011/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
71012   <wchar.h>.
71013   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
71014   included before <wchar.h>.  */
71015#include <stddef.h>
71016#include <stdio.h>
71017#include <time.h>
71018#include <wchar.h>
71019
71020register long global __asm__ ("%ebx");
71021
71022int main ()
71023{
71024  setlocale (LC_ALL, "en_US.UTF-8");
71025
71026  global = 0x12345678;
71027  if (wctob (0x00FC) != -1)
71028    return 1;
71029  if (global != 0x12345678)
71030    return 2;
71031  return 0;
71032}
71033_ACEOF
71034if ac_fn_c_try_run "$LINENO"; then :
71035  :
71036else
71037  gl_cv_func_wctob_works=no
71038fi
71039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
71040  conftest.$ac_objext conftest.beam conftest.$ac_ext
71041fi
71042
71043            ;;
71044        esac
71045        if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
71046          if test "$cross_compiling" = yes; then :
71047  :
71048else
71049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71050/* end confdefs.h.  */
71051
71052#include <locale.h>
71053#include <stdlib.h>
71054#include <string.h>
71055/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
71056   <wchar.h>.
71057   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
71058   included before <wchar.h>.  */
71059#include <stddef.h>
71060#include <stdio.h>
71061#include <time.h>
71062#include <wchar.h>
71063int main ()
71064{
71065  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
71066    {
71067      wchar_t wc;
71068
71069      if (mbtowc (&wc, "\374", 1) == 1)
71070        if (wctob (wc) != (unsigned char) '\374')
71071          return 1;
71072    }
71073  return 0;
71074}
71075_ACEOF
71076if ac_fn_c_try_run "$LINENO"; then :
71077  gl_cv_func_wctob_works=yes
71078else
71079  gl_cv_func_wctob_works=no
71080fi
71081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
71082  conftest.$ac_objext conftest.beam conftest.$ac_ext
71083fi
71084
71085        fi
71086
71087fi
71088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
71089$as_echo "$gl_cv_func_wctob_works" >&6; }
71090    case "$gl_cv_func_wctob_works" in
71091      *yes) ;;
71092      *) REPLACE_WCTOB=1 ;;
71093    esac
71094    if test $REPLACE_WCTOB = 0; then
71095
71096            ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
71097/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
71098   <wchar.h>.
71099   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
71100   before <wchar.h>.  */
71101#include <stddef.h>
71102#include <stdio.h>
71103#include <time.h>
71104#include <wchar.h>
71105
71106"
71107if test "x$ac_cv_have_decl_wctob" = xyes; then :
71108  ac_have_decl=1
71109else
71110  ac_have_decl=0
71111fi
71112
71113cat >>confdefs.h <<_ACEOF
71114#define HAVE_DECL_WCTOB $ac_have_decl
71115_ACEOF
71116
71117      if test $ac_cv_have_decl_wctob != yes; then
71118        HAVE_DECL_WCTOB=0
71119      fi
71120    fi
71121  fi
71122
71123  if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
71124
71125
71126
71127
71128
71129
71130
71131
71132  gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
71133
71134
71135  :
71136
71137  fi
71138
71139
71140
71141
71142
71143    if test "$GNULIB_WCTOB" != 1; then
71144        if test "$GNULIB_WCTOB" = 0; then
71145      GNULIB_WCTOB=$gl_module_indicator_condition
71146    else
71147      GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)"
71148    fi
71149  fi
71150
71151
71152
71153
71154
71155$as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
71156
71157
71158
71159
71160
71161
71162  if false; then
71163    REPLACE_WCTOMB=1
71164  fi
71165
71166  if test $REPLACE_WCTOMB = 1; then
71167
71168
71169
71170
71171
71172
71173
71174
71175  gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext"
71176
71177
71178  :
71179
71180  fi
71181
71182
71183
71184
71185
71186    if test "$GNULIB_WCTOMB" != 1; then
71187        if test "$GNULIB_WCTOMB" = 0; then
71188      GNULIB_WCTOMB=$gl_module_indicator_condition
71189    else
71190      GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)"
71191    fi
71192  fi
71193
71194
71195
71196
71197
71198$as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
71199
71200
71201
71202
71203  case "$host_os" in
71204    mingw*)
71205
71206
71207
71208
71209
71210
71211
71212
71213  gltests_LIBOBJS="$gltests_LIBOBJS windows-thread.$ac_objext"
71214
71215      ;;
71216  esac
71217
71218
71219
71220
71221
71222
71223
71224
71225
71226
71227
71228  LIBTESTS_LIBDEPS="$gltests_libdeps"
71229
71230
71231
71232
71233
71234
71235
71236
71237
71238
71239
71240   if false; then
71241  GL_COND_LIBTOOL_TRUE=
71242  GL_COND_LIBTOOL_FALSE='#'
71243else
71244  GL_COND_LIBTOOL_TRUE='#'
71245  GL_COND_LIBTOOL_FALSE=
71246fi
71247
71248  gl_cond_libtool=false
71249  gl_libdeps=
71250  gl_ltlibdeps=
71251  gl_m4_base='libgrep/gnulib-m4'
71252
71253
71254
71255
71256
71257
71258
71259
71260
71261
71262  gl_source_base='libgrep'
71263
71264
71265
71266
71267
71268
71269
71270  if test $ac_cv_func_btowc = no; then
71271    HAVE_BTOWC=0
71272  else
71273
71274
71275
71276
71277        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
71278$as_echo_n "checking whether btowc(0) is correct... " >&6; }
71279if ${gl_cv_func_btowc_nul+:} false; then :
71280  $as_echo_n "(cached) " >&6
71281else
71282
71283        if test "$cross_compiling" = yes; then :
71284
71285           case "$host_os" in
71286                      # Guess no on Cygwin.
71287             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
71288                      # Guess yes on native Windows.
71289             mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
71290                      # Guess yes otherwise.
71291             *)       gl_cv_func_btowc_nul="guessing yes" ;;
71292           esac
71293
71294else
71295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71296/* end confdefs.h.  */
71297
71298#include <string.h>
71299/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
71300   <wchar.h>.
71301   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
71302   included before <wchar.h>.  */
71303#include <stddef.h>
71304#include <stdio.h>
71305#include <time.h>
71306#include <wchar.h>
71307int main ()
71308{
71309  if (btowc ('\0') != 0)
71310    return 1;
71311  return 0;
71312}
71313_ACEOF
71314if ac_fn_c_try_run "$LINENO"; then :
71315  gl_cv_func_btowc_nul=yes
71316else
71317  gl_cv_func_btowc_nul=no
71318fi
71319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
71320  conftest.$ac_objext conftest.beam conftest.$ac_ext
71321fi
71322
71323
71324fi
71325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
71326$as_echo "$gl_cv_func_btowc_nul" >&6; }
71327
71328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
71329$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
71330if ${gl_cv_func_btowc_eof+:} false; then :
71331  $as_echo_n "(cached) " >&6
71332else
71333
71334                        case "$host_os" in
71335                  # Guess no on IRIX.
71336          irix*)  gl_cv_func_btowc_eof="guessing no" ;;
71337                  # Guess yes on native Windows.
71338          mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
71339                  # Guess yes otherwise.
71340          *)      gl_cv_func_btowc_eof="guessing yes" ;;
71341        esac
71342        if test $LOCALE_FR != none; then
71343          if test "$cross_compiling" = yes; then :
71344  :
71345else
71346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71347/* end confdefs.h.  */
71348
71349#include <locale.h>
71350#include <string.h>
71351/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
71352   <wchar.h>.
71353   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
71354   included before <wchar.h>.  */
71355#include <stddef.h>
71356#include <stdio.h>
71357#include <time.h>
71358#include <wchar.h>
71359int main ()
71360{
71361  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
71362    {
71363      if (btowc (EOF) != WEOF)
71364        return 1;
71365    }
71366  return 0;
71367}
71368_ACEOF
71369if ac_fn_c_try_run "$LINENO"; then :
71370  gl_cv_func_btowc_eof=yes
71371else
71372  gl_cv_func_btowc_eof=no
71373fi
71374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
71375  conftest.$ac_objext conftest.beam conftest.$ac_ext
71376fi
71377
71378        fi
71379
71380fi
71381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
71382$as_echo "$gl_cv_func_btowc_eof" >&6; }
71383
71384    case "$gl_cv_func_btowc_nul" in
71385      *yes) ;;
71386      *) REPLACE_BTOWC=1 ;;
71387    esac
71388    case "$gl_cv_func_btowc_eof" in
71389      *yes) ;;
71390      *) REPLACE_BTOWC=1 ;;
71391    esac
71392  fi
71393
71394  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
71395
71396
71397
71398
71399
71400
71401
71402
71403  grgl_LIBOBJS="$grgl_LIBOBJS btowc.$ac_objext"
71404
71405
71406  :
71407
71408  fi
71409
71410
71411
71412
71413
71414    if test "$GNULIB_BTOWC" != 1; then
71415        if test "$GNULIB_BTOWC" = 0; then
71416      GNULIB_BTOWC=IN_GETTEXT_TOOLS_LIBGREP
71417    else
71418      GNULIB_BTOWC="($GNULIB_BTOWC || IN_GETTEXT_TOOLS_LIBGREP)"
71419    fi
71420  fi
71421
71422
71423
71424
71425
71426$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
71427
71428
71429
71430
71431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
71432$as_echo_n "checking for __builtin_expect... " >&6; }
71433if ${gl_cv___builtin_expect+:} false; then :
71434  $as_echo_n "(cached) " >&6
71435else
71436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71437/* end confdefs.h.  */
71438
71439         int
71440         main (int argc, char **argv)
71441         {
71442           argc = __builtin_expect (argc, 100);
71443           return argv[argc != 100][0];
71444         }
71445_ACEOF
71446if ac_fn_c_try_link "$LINENO"; then :
71447  gl_cv___builtin_expect=yes
71448else
71449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71450/* end confdefs.h.  */
71451
71452             #include <builtins.h>
71453             int
71454             main (int argc, char **argv)
71455             {
71456               argc = __builtin_expect (argc, 100);
71457               return argv[argc != 100][0];
71458             }
71459_ACEOF
71460if ac_fn_c_try_link "$LINENO"; then :
71461  gl_cv___builtin_expect="in <builtins.h>"
71462else
71463  gl_cv___builtin_expect=no
71464fi
71465rm -f core conftest.err conftest.$ac_objext \
71466    conftest$ac_exeext conftest.$ac_ext
71467fi
71468rm -f core conftest.err conftest.$ac_objext \
71469    conftest$ac_exeext conftest.$ac_ext
71470fi
71471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
71472$as_echo "$gl_cv___builtin_expect" >&6; }
71473  if test "$gl_cv___builtin_expect" = yes; then
71474    $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
71475
71476  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
71477    $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
71478
71479  fi
71480
71481
71482
71483
71484
71485
71486
71487
71488
71489
71490
71491
71492
71493
71494
71495
71496     if test $gl_cv_have_include_next = yes; then
71497       gl_cv_next_langinfo_h='<'langinfo.h'>'
71498     else
71499       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
71500$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
71501if ${gl_cv_next_langinfo_h+:} false; then :
71502  $as_echo_n "(cached) " >&6
71503else
71504
71505             if test $ac_cv_header_langinfo_h = yes; then
71506
71507
71508
71509
71510  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71511/* end confdefs.h.  */
71512#include <langinfo.h>
71513_ACEOF
71514                case "$host_os" in
71515    aix*) gl_absname_cpp="$ac_cpp -C" ;;
71516    *)    gl_absname_cpp="$ac_cpp" ;;
71517  esac
71518
71519  case "$host_os" in
71520    mingw*)
71521                                          gl_dirsep_regex='[/\\]'
71522      ;;
71523    *)
71524      gl_dirsep_regex='\/'
71525      ;;
71526  esac
71527      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
71528  gl_header_literal_regex=`echo 'langinfo.h' \
71529                           | sed -e "$gl_make_literal_regex_sed"`
71530  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
71531      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
71532      s|^/[^/]|//&|
71533      p
71534      q
71535    }'
71536
71537        gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
71538  sed -n "$gl_absolute_header_sed"`
71539
71540           gl_header=$gl_cv_absolute_langinfo_h
71541           gl_cv_next_langinfo_h='"'$gl_header'"'
71542          else
71543               gl_cv_next_langinfo_h='<'langinfo.h'>'
71544             fi
71545
71546
71547fi
71548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
71549$as_echo "$gl_cv_next_langinfo_h" >&6; }
71550     fi
71551     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
71552
71553     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
71554       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
71555       gl_next_as_first_directive='<'langinfo.h'>'
71556     else
71557       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
71558       gl_next_as_first_directive=$gl_cv_next_langinfo_h
71559     fi
71560     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
71561
71562
71563
71564
71565
71566    HAVE_LANGINFO_CODESET=0
71567  HAVE_LANGINFO_T_FMT_AMPM=0
71568  HAVE_LANGINFO_ALTMON=0
71569  HAVE_LANGINFO_ERA=0
71570  HAVE_LANGINFO_YESEXPR=0
71571
71572  if test $ac_cv_header_langinfo_h = yes; then
71573    HAVE_LANGINFO_H=1
71574                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
71575$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
71576if ${gl_cv_header_langinfo_codeset+:} false; then :
71577  $as_echo_n "(cached) " >&6
71578else
71579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71580/* end confdefs.h.  */
71581#include <langinfo.h>
71582int a = CODESET;
71583
71584int
71585main ()
71586{
71587
71588  ;
71589  return 0;
71590}
71591_ACEOF
71592if ac_fn_c_try_compile "$LINENO"; then :
71593  gl_cv_header_langinfo_codeset=yes
71594else
71595  gl_cv_header_langinfo_codeset=no
71596fi
71597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
71598
71599fi
71600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
71601$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
71602    if test $gl_cv_header_langinfo_codeset = yes; then
71603      HAVE_LANGINFO_CODESET=1
71604    fi
71605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
71606$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
71607if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
71608  $as_echo_n "(cached) " >&6
71609else
71610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71611/* end confdefs.h.  */
71612#include <langinfo.h>
71613int a = T_FMT_AMPM;
71614
71615int
71616main ()
71617{
71618
71619  ;
71620  return 0;
71621}
71622_ACEOF
71623if ac_fn_c_try_compile "$LINENO"; then :
71624  gl_cv_header_langinfo_t_fmt_ampm=yes
71625else
71626  gl_cv_header_langinfo_t_fmt_ampm=no
71627fi
71628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
71629
71630fi
71631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
71632$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
71633    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
71634      HAVE_LANGINFO_T_FMT_AMPM=1
71635    fi
71636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
71637$as_echo_n "checking whether langinfo.h defines ALTMON_1... " >&6; }
71638if ${gl_cv_header_langinfo_altmon+:} false; then :
71639  $as_echo_n "(cached) " >&6
71640else
71641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71642/* end confdefs.h.  */
71643#include <langinfo.h>
71644int a = ALTMON_1;
71645
71646int
71647main ()
71648{
71649
71650  ;
71651  return 0;
71652}
71653_ACEOF
71654if ac_fn_c_try_compile "$LINENO"; then :
71655  gl_cv_header_langinfo_altmon=yes
71656else
71657  gl_cv_header_langinfo_altmon=no
71658fi
71659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
71660
71661fi
71662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
71663$as_echo "$gl_cv_header_langinfo_altmon" >&6; }
71664    if test $gl_cv_header_langinfo_altmon = yes; then
71665      HAVE_LANGINFO_ALTMON=1
71666    fi
71667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
71668$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
71669if ${gl_cv_header_langinfo_era+:} false; then :
71670  $as_echo_n "(cached) " >&6
71671else
71672  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71673/* end confdefs.h.  */
71674#include <langinfo.h>
71675int a = ERA;
71676
71677int
71678main ()
71679{
71680
71681  ;
71682  return 0;
71683}
71684_ACEOF
71685if ac_fn_c_try_compile "$LINENO"; then :
71686  gl_cv_header_langinfo_era=yes
71687else
71688  gl_cv_header_langinfo_era=no
71689fi
71690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
71691
71692fi
71693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
71694$as_echo "$gl_cv_header_langinfo_era" >&6; }
71695    if test $gl_cv_header_langinfo_era = yes; then
71696      HAVE_LANGINFO_ERA=1
71697    fi
71698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
71699$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
71700if ${gl_cv_header_langinfo_yesexpr+:} false; then :
71701  $as_echo_n "(cached) " >&6
71702else
71703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71704/* end confdefs.h.  */
71705#include <langinfo.h>
71706int a = YESEXPR;
71707
71708int
71709main ()
71710{
71711
71712  ;
71713  return 0;
71714}
71715_ACEOF
71716if ac_fn_c_try_compile "$LINENO"; then :
71717  gl_cv_header_langinfo_yesexpr=yes
71718else
71719  gl_cv_header_langinfo_yesexpr=no
71720fi
71721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
71722
71723fi
71724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
71725$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
71726    if test $gl_cv_header_langinfo_yesexpr = yes; then
71727      HAVE_LANGINFO_YESEXPR=1
71728    fi
71729  else
71730    HAVE_LANGINFO_H=0
71731  fi
71732
71733
71734
71735
71736
71737
71738
71739
71740
71741
71742
71743
71744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
71745$as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
71746if ${gl_cv_c___inline+:} false; then :
71747  $as_echo_n "(cached) " >&6
71748else
71749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71750/* end confdefs.h.  */
71751typedef int foo_t;
71752           static __inline foo_t foo (void) { return 0; }
71753int
71754main ()
71755{
71756return foo ();
71757  ;
71758  return 0;
71759}
71760_ACEOF
71761if ac_fn_c_try_compile "$LINENO"; then :
71762  gl_cv_c___inline=yes
71763else
71764  gl_cv_c___inline=no
71765fi
71766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
71767fi
71768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
71769$as_echo "$gl_cv_c___inline" >&6; }
71770  if test $gl_cv_c___inline = yes; then
71771
71772$as_echo "#define HAVE___INLINE 1" >>confdefs.h
71773
71774  fi
71775
71776
71777
71778
71779
71780  if test $REPLACE_STRUCT_LCONV = 1; then
71781    REPLACE_LOCALECONV=1
71782  fi
71783
71784  if test $REPLACE_LOCALECONV = 1; then
71785
71786
71787
71788
71789
71790
71791
71792
71793  grgl_LIBOBJS="$grgl_LIBOBJS localeconv.$ac_objext"
71794
71795
71796  ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
71797"
71798if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
71799
71800cat >>confdefs.h <<_ACEOF
71801#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
71802_ACEOF
71803
71804
71805fi
71806
71807
71808  fi
71809
71810
71811
71812
71813
71814    if test "$GNULIB_LOCALECONV" != 1; then
71815        if test "$GNULIB_LOCALECONV" = 0; then
71816      GNULIB_LOCALECONV=IN_GETTEXT_TOOLS_LIBGREP
71817    else
71818      GNULIB_LOCALECONV="($GNULIB_LOCALECONV || IN_GETTEXT_TOOLS_LIBGREP)"
71819    fi
71820  fi
71821
71822
71823
71824
71825
71826$as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
71827
71828
71829
71830
71831
71832  if test "$gl_threads_api" = posix; then
71833    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
71834    # pthread_rwlock_* functions.
71835    has_rwlock=false
71836    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
71837"
71838if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
71839  has_rwlock=true
71840
71841$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
71842
71843fi
71844
71845    if $has_rwlock; then
71846
71847
71848     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
71849$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
71850if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
71851  $as_echo_n "(cached) " >&6
71852else
71853  save_LIBS="$LIBS"
71854     LIBS="$LIBS $LIBMULTITHREAD"
71855     if test "$cross_compiling" = yes; then :
71856  case "$host_os" in
71857                         # Guess no on glibc systems.
71858          *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
71859                         # Guess no on musl systems.
71860          *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
71861                         # Guess no on bionic systems.
71862          *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
71863                         # Guess yes on native Windows with the mingw-w64 winpthreads library.
71864                         # Guess no on native Windows with the gnulib windows-rwlock module.
71865          mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
71866                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
71867                         else
71868                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
71869                         fi
71870                         ;;
71871                         # If we don't know, obey --enable-cross-guesses.
71872          *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
71873         esac
71874
71875else
71876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71877/* end confdefs.h.  */
71878
71879#include <errno.h>
71880#include <pthread.h>
71881#include <stdlib.h>
71882#include <unistd.h>
71883
71884#define SUCCEED() exit (0)
71885#define FAILURE() exit (1)
71886#define UNEXPECTED(n) (exit (10 + (n)))
71887
71888/* The main thread creates the waiting writer and the requesting reader threads
71889   in the default way; this guarantees that they have the same priority.
71890   We can reuse the main thread as first reader thread.  */
71891
71892static pthread_rwlock_t lock;
71893static pthread_t reader1;
71894static pthread_t writer;
71895static pthread_t reader2;
71896static pthread_t timer;
71897/* Used to pass control from writer to reader2 and from reader2 to timer,
71898   as in a relay race.
71899   Passing control from one running thread to another running thread
71900   is most likely faster than to create the second thread.  */
71901static pthread_mutex_t baton;
71902
71903static void *
71904timer_func (void *ignored)
71905{
71906  /* Step 13 (can be before or after step 12):
71907     The timer thread takes the baton, then waits a moment to make sure
71908     it can tell whether the second reader thread is blocked at step 12.  */
71909  if (pthread_mutex_lock (&baton))
71910    UNEXPECTED (13);
71911  usleep (100000);
71912  /* By the time we get here, it's clear that the second reader thread is
71913     blocked at step 12.  This is the desired behaviour.  */
71914  SUCCEED ();
71915}
71916
71917static void *
71918reader2_func (void *ignored)
71919{
71920  int err;
71921
71922  /* Step 8 (can be before or after step 7):
71923     The second reader thread takes the baton, then waits a moment to make sure
71924     the writer thread has reached step 7.  */
71925  if (pthread_mutex_lock (&baton))
71926    UNEXPECTED (8);
71927  usleep (100000);
71928  /* Step 9: The second reader thread requests the lock.  */
71929  err = pthread_rwlock_tryrdlock (&lock);
71930  if (err == 0)
71931    FAILURE ();
71932  else if (err != EBUSY)
71933    UNEXPECTED (9);
71934  /* Step 10: Launch a timer, to test whether the next call blocks.  */
71935  if (pthread_create (&timer, NULL, timer_func, NULL))
71936    UNEXPECTED (10);
71937  /* Step 11: Release the baton.  */
71938  if (pthread_mutex_unlock (&baton))
71939    UNEXPECTED (11);
71940  /* Step 12: The second reader thread requests the lock.  */
71941  err = pthread_rwlock_rdlock (&lock);
71942  if (err == 0)
71943    FAILURE ();
71944  else
71945    UNEXPECTED (12);
71946}
71947
71948static void *
71949writer_func (void *ignored)
71950{
71951  /* Step 4: Take the baton, so that the second reader thread does not go ahead
71952     too early.  */
71953  if (pthread_mutex_lock (&baton))
71954    UNEXPECTED (4);
71955  /* Step 5: Create the second reader thread.  */
71956  if (pthread_create (&reader2, NULL, reader2_func, NULL))
71957    UNEXPECTED (5);
71958  /* Step 6: Release the baton.  */
71959  if (pthread_mutex_unlock (&baton))
71960    UNEXPECTED (6);
71961  /* Step 7: The writer thread requests the lock.  */
71962  if (pthread_rwlock_wrlock (&lock))
71963    UNEXPECTED (7);
71964  return NULL;
71965}
71966
71967int
71968main ()
71969{
71970  reader1 = pthread_self ();
71971
71972  /* Step 1: The main thread initializes the lock and the baton.  */
71973  if (pthread_rwlock_init (&lock, NULL))
71974    UNEXPECTED (1);
71975  if (pthread_mutex_init (&baton, NULL))
71976    UNEXPECTED (1);
71977  /* Step 2: The main thread acquires the lock as a reader.  */
71978  if (pthread_rwlock_rdlock (&lock))
71979    UNEXPECTED (2);
71980  /* Step 3: Create the writer thread.  */
71981  if (pthread_create (&writer, NULL, writer_func, NULL))
71982    UNEXPECTED (3);
71983  /* Job done.  Go to sleep.  */
71984  for (;;)
71985    {
71986      sleep (1);
71987    }
71988}
71989
71990_ACEOF
71991if ac_fn_c_try_run "$LINENO"; then :
71992  gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
71993else
71994  gl_cv_pthread_rwlock_rdlock_prefer_writer=no
71995fi
71996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
71997  conftest.$ac_objext conftest.beam conftest.$ac_ext
71998fi
71999
72000     LIBS="$save_LIBS"
72001
72002fi
72003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
72004$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
72005  case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
72006    *yes)
72007
72008$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
72009
72010      ;;
72011  esac
72012
72013    fi
72014    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
72015    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72016/* end confdefs.h.  */
72017
72018      #include <pthread.h>
72019int
72020main ()
72021{
72022
72023#if __FreeBSD__ == 4
72024error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
72025#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
72026       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
72027error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
72028#else
72029int x = (int)PTHREAD_MUTEX_RECURSIVE;
72030return !x;
72031#endif
72032
72033  ;
72034  return 0;
72035}
72036_ACEOF
72037if ac_fn_c_try_compile "$LINENO"; then :
72038
72039$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
72040
72041fi
72042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
72043  fi
72044  :
72045
72046
72047
72048cat >>confdefs.h <<_ACEOF
72049#define GNULIB_LOCK IN_GETTEXT_TOOLS_LIBGREP
72050_ACEOF
72051
72052
72053
72054
72055
72056
72057
72058
72059  if test $ac_cv_func_mbrlen = no; then
72060    HAVE_MBRLEN=0
72061    ac_fn_c_check_decl "$LINENO" "mbrlen" "ac_cv_have_decl_mbrlen" "
72062/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
72063   <wchar.h>.
72064   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
72065   included before <wchar.h>.  */
72066#include <stddef.h>
72067#include <stdio.h>
72068#include <time.h>
72069#include <wchar.h>
72070
72071"
72072if test "x$ac_cv_have_decl_mbrlen" = xyes; then :
72073  ac_have_decl=1
72074else
72075  ac_have_decl=0
72076fi
72077
72078cat >>confdefs.h <<_ACEOF
72079#define HAVE_DECL_MBRLEN $ac_have_decl
72080_ACEOF
72081
72082    if test $ac_cv_have_decl_mbrlen = yes; then
72083                        REPLACE_MBRLEN=1
72084    fi
72085  else
72086                    if test $REPLACE_MBRTOWC = 1; then
72087      REPLACE_MBRLEN=1
72088    fi
72089  fi
72090
72091  if test $HAVE_MBRLEN = 0 || test $REPLACE_MBRLEN = 1; then
72092
72093
72094
72095
72096
72097
72098
72099
72100  grgl_LIBOBJS="$grgl_LIBOBJS mbrlen.$ac_objext"
72101
72102
72103  :
72104
72105  fi
72106
72107
72108
72109
72110
72111    if test "$GNULIB_MBRLEN" != 1; then
72112        if test "$GNULIB_MBRLEN" = 0; then
72113      GNULIB_MBRLEN=IN_GETTEXT_TOOLS_LIBGREP
72114    else
72115      GNULIB_MBRLEN="($GNULIB_MBRLEN || IN_GETTEXT_TOOLS_LIBGREP)"
72116    fi
72117  fi
72118
72119
72120
72121
72122
72123$as_echo "#define GNULIB_TEST_MBRLEN 1" >>confdefs.h
72124
72125
72126
72127
72128
72129
72130  for ac_func in mbtowc
72131do :
72132  ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
72133if test "x$ac_cv_func_mbtowc" = xyes; then :
72134  cat >>confdefs.h <<_ACEOF
72135#define HAVE_MBTOWC 1
72136_ACEOF
72137
72138fi
72139done
72140
72141  if test $ac_cv_func_mbtowc = no; then
72142    HAVE_MBTOWC=0
72143  else
72144    if false; then
72145      REPLACE_MBTOWC=1
72146    fi
72147  fi
72148
72149  if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
72150
72151
72152
72153
72154
72155
72156
72157
72158  grgl_LIBOBJS="$grgl_LIBOBJS mbtowc.$ac_objext"
72159
72160
72161  :
72162
72163  fi
72164
72165
72166
72167
72168
72169    if test "$GNULIB_MBTOWC" != 1; then
72170        if test "$GNULIB_MBTOWC" = 0; then
72171      GNULIB_MBTOWC=IN_GETTEXT_TOOLS_LIBGREP
72172    else
72173      GNULIB_MBTOWC="($GNULIB_MBTOWC || IN_GETTEXT_TOOLS_LIBGREP)"
72174    fi
72175  fi
72176
72177
72178
72179
72180
72181$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
72182
72183
72184
72185
72186
72187
72188
72189
72190  if test $ac_cv_func_nl_langinfo = yes; then
72191    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
72192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
72193$as_echo_n "checking whether YESEXPR works... " >&6; }
72194if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
72195  $as_echo_n "(cached) " >&6
72196else
72197  if test "$cross_compiling" = yes; then :
72198
72199         case "$host_os" in
72200                   # Guess no on irix systems.
72201           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
72202                   # Guess yes elsewhere.
72203           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
72204         esac
72205
72206else
72207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72208/* end confdefs.h.  */
72209#include <langinfo.h>
72210
72211int
72212main ()
72213{
72214return !*nl_langinfo(YESEXPR);
72215
72216  ;
72217  return 0;
72218}
72219_ACEOF
72220if ac_fn_c_try_run "$LINENO"; then :
72221  gl_cv_func_nl_langinfo_yesexpr_works=yes
72222else
72223  gl_cv_func_nl_langinfo_yesexpr_works=no
72224fi
72225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
72226  conftest.$ac_objext conftest.beam conftest.$ac_ext
72227fi
72228
72229
72230fi
72231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
72232$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
72233    case $gl_cv_func_nl_langinfo_yesexpr_works in
72234      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
72235      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
72236    esac
72237
72238cat >>confdefs.h <<_ACEOF
72239#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
72240_ACEOF
72241
72242    if test $HAVE_LANGINFO_CODESET = 1 \
72243       && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
72244       && test $HAVE_LANGINFO_ALTMON = 1 \
72245       && test $HAVE_LANGINFO_ERA = 1 \
72246       && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
72247      :
72248    else
72249      REPLACE_NL_LANGINFO=1
72250
72251$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
72252
72253    fi
72254  else
72255    HAVE_NL_LANGINFO=0
72256  fi
72257  if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
72258    LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
72259  else
72260    LIB_NL_LANGINFO=
72261  fi
72262
72263
72264  if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
72265
72266
72267
72268
72269
72270
72271
72272
72273  grgl_LIBOBJS="$grgl_LIBOBJS nl_langinfo.$ac_objext"
72274
72275  fi
72276
72277
72278
72279
72280
72281    if test "$GNULIB_NL_LANGINFO" != 1; then
72282        if test "$GNULIB_NL_LANGINFO" = 0; then
72283      GNULIB_NL_LANGINFO=IN_GETTEXT_TOOLS_LIBGREP
72284    else
72285      GNULIB_NL_LANGINFO="($GNULIB_NL_LANGINFO || IN_GETTEXT_TOOLS_LIBGREP)"
72286    fi
72287  fi
72288
72289
72290
72291
72292
72293$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
72294
72295
72296
72297
72298
72299# Check whether --with-included-regex was given.
72300if test "${with_included_regex+set}" = set; then :
72301  withval=$with_included_regex;
72302fi
72303
72304
72305  case $with_included_regex in #(
72306  yes|no) ac_use_included_regex=$with_included_regex
72307        ;;
72308  '')
72309    # If the system regex support is good enough that it passes the
72310    # following run test, then default to *not* using the included regex.c.
72311    # If cross compiling, assume the test would fail and use the included
72312    # regex.c.
72313
72314
72315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
72316$as_echo_n "checking for working re_compile_pattern... " >&6; }
72317if ${gl_cv_func_re_compile_pattern_working+:} false; then :
72318  $as_echo_n "(cached) " >&6
72319else
72320  if test "$cross_compiling" = yes; then :
72321  case "$host_os" in
72322                   # Guess no on native Windows.
72323           mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
72324                   # Otherwise obey --enable-cross-guesses.
72325           *)      gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
72326         esac
72327
72328else
72329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72330/* end confdefs.h.  */
72331#include <regex.h>
72332
72333            #include <locale.h>
72334            #include <limits.h>
72335            #include <string.h>
72336
72337            #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
72338            # include <signal.h>
72339            # include <unistd.h>
72340            #endif
72341
72342            #if HAVE_MALLOC_H
72343            # include <malloc.h>
72344            #endif
72345
72346            #ifdef M_CHECK_ACTION
72347            /* Exit with distinguishable exit code.  */
72348            static void sigabrt_no_core (int sig) { raise (SIGTERM); }
72349            #endif
72350
72351int
72352main ()
72353{
72354int result = 0;
72355            static struct re_pattern_buffer regex;
72356            unsigned char folded_chars[UCHAR_MAX + 1];
72357            int i;
72358            const char *s;
72359            struct re_registers regs;
72360
72361            /* Some builds of glibc go into an infinite loop on this
72362               test.  Use alarm to force death, and mallopt to avoid
72363               malloc recursion in diagnosing the corrupted heap. */
72364#if HAVE_DECL_ALARM
72365            signal (SIGALRM, SIG_DFL);
72366            alarm (2);
72367#endif
72368#ifdef M_CHECK_ACTION
72369            signal (SIGABRT, sigabrt_no_core);
72370            mallopt (M_CHECK_ACTION, 2);
72371#endif
72372
72373            if (setlocale (LC_ALL, "en_US.UTF-8"))
72374              {
72375                {
72376                  /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
72377                     This test needs valgrind to catch the bug on Debian
72378                     GNU/Linux 3.1 x86, but it might catch the bug better
72379                     on other platforms and it shouldn't hurt to try the
72380                     test here.  */
72381                  static char const pat[] = "insert into";
72382                  static char const data[] =
72383                    "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
72384                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
72385                                 | RE_ICASE);
72386                  memset (&regex, 0, sizeof regex);
72387                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
72388                  if (s)
72389                    result |= 1;
72390                  else
72391                    {
72392                      if (re_search (&regex, data, sizeof data - 1,
72393                                     0, sizeof data - 1, &regs)
72394                          != -1)
72395                        result |= 1;
72396                      regfree (&regex);
72397                    }
72398                }
72399
72400                {
72401                  /* This test is from glibc bug 15078.
72402                     The test case is from Andreas Schwab in
72403                     <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
72404                     */
72405                  static char const pat[] = "[^x]x";
72406                  static char const data[] =
72407                    /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
72408                    "\xe1\x80\x80"
72409                    "\xe1\x80\xbb"
72410                    "\xe1\x80\xbd"
72411                    "\xe1\x80\x94"
72412                    "\xe1\x80\xba"
72413                    "\xe1\x80\xaf"
72414                    "\xe1\x80\x95"
72415                    "\xe1\x80\xba"
72416                    "x";
72417                  re_set_syntax (0);
72418                  memset (&regex, 0, sizeof regex);
72419                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
72420                  if (s)
72421                    result |= 1;
72422                  else
72423                    {
72424                      i = re_search (&regex, data, sizeof data - 1,
72425                                     0, sizeof data - 1, 0);
72426                      if (i != 0 && i != 21)
72427                        result |= 1;
72428                      regfree (&regex);
72429                    }
72430                }
72431
72432                if (! setlocale (LC_ALL, "C"))
72433                  return 1;
72434              }
72435
72436            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
72437            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
72438            memset (&regex, 0, sizeof regex);
72439            s = re_compile_pattern ("a[^x]b", 6, &regex);
72440            if (s)
72441              result |= 2;
72442            else
72443              {
72444                /* This should fail, but succeeds for glibc-2.5.  */
72445                if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
72446                  result |= 2;
72447                regfree (&regex);
72448              }
72449
72450            /* This regular expression is from Spencer ere test number 75
72451               in grep-2.3.  */
72452            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
72453            memset (&regex, 0, sizeof regex);
72454            for (i = 0; i <= UCHAR_MAX; i++)
72455              folded_chars[i] = i;
72456            regex.translate = folded_chars;
72457            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
72458            /* This should fail with _Invalid character class name_ error.  */
72459            if (!s)
72460              {
72461                result |= 4;
72462                regfree (&regex);
72463              }
72464
72465            /* Ensure that [b-a] is diagnosed as invalid, when
72466               using RE_NO_EMPTY_RANGES. */
72467            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
72468            memset (&regex, 0, sizeof regex);
72469            s = re_compile_pattern ("a[b-a]", 6, &regex);
72470            if (s == 0)
72471              {
72472                result |= 8;
72473                regfree (&regex);
72474              }
72475
72476            /* This should succeed, but does not for glibc-2.1.3.  */
72477            memset (&regex, 0, sizeof regex);
72478            s = re_compile_pattern ("{1", 2, &regex);
72479            if (s)
72480              result |= 8;
72481            else
72482              regfree (&regex);
72483
72484            /* The following example is derived from a problem report
72485               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
72486            memset (&regex, 0, sizeof regex);
72487            s = re_compile_pattern ("[an\371]*n", 7, &regex);
72488            if (s)
72489              result |= 8;
72490            else
72491              {
72492                /* This should match, but does not for glibc-2.2.1.  */
72493                if (re_match (&regex, "an", 2, 0, &regs) != 2)
72494                  result |= 8;
72495                else
72496                  {
72497                    free (regs.start);
72498                    free (regs.end);
72499                  }
72500                regfree (&regex);
72501              }
72502
72503            memset (&regex, 0, sizeof regex);
72504            s = re_compile_pattern ("x", 1, &regex);
72505            if (s)
72506              result |= 8;
72507            else
72508              {
72509                /* glibc-2.2.93 does not work with a negative RANGE argument.  */
72510                if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
72511                  result |= 8;
72512                else
72513                  {
72514                    free (regs.start);
72515                    free (regs.end);
72516                  }
72517                regfree (&regex);
72518              }
72519
72520            /* The version of regex.c in older versions of gnulib
72521               ignored RE_ICASE.  Detect that problem too.  */
72522            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
72523            memset (&regex, 0, sizeof regex);
72524            s = re_compile_pattern ("x", 1, &regex);
72525            if (s)
72526              result |= 16;
72527            else
72528              {
72529                if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
72530                  result |= 16;
72531                else
72532                  {
72533                    free (regs.start);
72534                    free (regs.end);
72535                  }
72536                regfree (&regex);
72537              }
72538
72539            /* Catch a bug reported by Vin Shelton in
72540               https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
72541               */
72542            re_set_syntax (RE_SYNTAX_POSIX_BASIC
72543                           & ~RE_CONTEXT_INVALID_DUP
72544                           & ~RE_NO_EMPTY_RANGES);
72545            memset (&regex, 0, sizeof regex);
72546            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
72547            if (s)
72548              result |= 32;
72549            else
72550              regfree (&regex);
72551
72552            /* REG_STARTEND was added to glibc on 2004-01-15.
72553               Reject older versions.  */
72554            if (! REG_STARTEND)
72555              result |= 64;
72556
72557            /* Matching with the compiled form of this regexp would provoke
72558               an assertion failure prior to glibc-2.28:
72559                 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
72560               With glibc-2.28, compilation fails and reports the invalid
72561               back reference.  */
72562            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
72563            memset (&regex, 0, sizeof regex);
72564            s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
72565            if (!s)
72566              result |= 64;
72567            else
72568              {
72569                if (strcmp (s, "Invalid back reference"))
72570                  result |= 64;
72571                regfree (&regex);
72572              }
72573
72574#if 0
72575            /* It would be nice to reject hosts whose regoff_t values are too
72576               narrow (including glibc on hosts with 64-bit ptrdiff_t and
72577               32-bit int), but we should wait until glibc implements this
72578               feature.  Otherwise, support for equivalence classes and
72579               multibyte collation symbols would always be broken except
72580               when compiling --without-included-regex.   */
72581            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
72582                || sizeof (regoff_t) < sizeof (ssize_t))
72583              result |= 64;
72584#endif
72585
72586            return result;
72587
72588  ;
72589  return 0;
72590}
72591_ACEOF
72592if ac_fn_c_try_run "$LINENO"; then :
72593  gl_cv_func_re_compile_pattern_working=yes
72594else
72595  gl_cv_func_re_compile_pattern_working=no
72596fi
72597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
72598  conftest.$ac_objext conftest.beam conftest.$ac_ext
72599fi
72600
72601
72602fi
72603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
72604$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
72605    case "$gl_cv_func_re_compile_pattern_working" in #(
72606      *yes) ac_use_included_regex=no;; #(
72607      *no) ac_use_included_regex=yes;;
72608    esac
72609    ;;
72610  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
72611    ;;
72612  esac
72613
72614  if test $ac_use_included_regex = yes; then
72615
72616$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
72617
72618
72619$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
72620
72621
72622$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
72623
72624
72625$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
72626
72627
72628$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
72629
72630
72631$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
72632
72633
72634$as_echo "#define re_search rpl_re_search" >>confdefs.h
72635
72636
72637$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
72638
72639
72640$as_echo "#define re_match rpl_re_match" >>confdefs.h
72641
72642
72643$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
72644
72645
72646$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
72647
72648
72649$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
72650
72651
72652$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
72653
72654
72655$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
72656
72657
72658$as_echo "#define regexec rpl_regexec" >>confdefs.h
72659
72660
72661$as_echo "#define regerror rpl_regerror" >>confdefs.h
72662
72663
72664$as_echo "#define regfree rpl_regfree" >>confdefs.h
72665
72666  fi
72667
72668  if test $ac_use_included_regex = yes; then
72669
72670
72671
72672
72673
72674
72675
72676
72677  grgl_LIBOBJS="$grgl_LIBOBJS regex.$ac_objext"
72678
72679
72680
72681
72682
72683
72684
72685
72686  for ac_header in libintl.h
72687do :
72688  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
72689if test "x$ac_cv_header_libintl_h" = xyes; then :
72690  cat >>confdefs.h <<_ACEOF
72691#define HAVE_LIBINTL_H 1
72692_ACEOF
72693
72694fi
72695
72696done
72697
72698
72699  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
72700"
72701if test "x$ac_cv_have_decl_isblank" = xyes; then :
72702  ac_have_decl=1
72703else
72704  ac_have_decl=0
72705fi
72706
72707cat >>confdefs.h <<_ACEOF
72708#define HAVE_DECL_ISBLANK $ac_have_decl
72709_ACEOF
72710
72711
72712  fi
72713
72714
72715
72716
72717
72718
72719
72720
72721
72722
72723
72724
72725        if case "$host_os" in
72726       mingw*) true ;;
72727       *) test $ac_cv_func_mbsinit = yes ;;
72728     esac \
72729    && test $ac_cv_func_mbrtowc = yes; then
72730
72731
72732
72733
72734     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
72735$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
72736if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
72737  $as_echo_n "(cached) " >&6
72738else
72739
72740                  case "$host_os" in
72741                     # Guess no on AIX and OSF/1.
72742        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
72743                     # Guess yes otherwise.
72744        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
72745      esac
72746      if test $LOCALE_JA != none; then
72747        if test "$cross_compiling" = yes; then :
72748  :
72749else
72750  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72751/* end confdefs.h.  */
72752
72753#include <locale.h>
72754#include <string.h>
72755/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
72756   <wchar.h>.
72757   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
72758   included before <wchar.h>.  */
72759#include <stddef.h>
72760#include <stdio.h>
72761#include <time.h>
72762#include <wchar.h>
72763int main ()
72764{
72765  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
72766    {
72767      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
72768      mbstate_t state;
72769      wchar_t wc;
72770
72771      memset (&state, '\0', sizeof (mbstate_t));
72772      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
72773        if (mbsinit (&state))
72774          return 2;
72775    }
72776  return 0;
72777}
72778_ACEOF
72779if ac_fn_c_try_run "$LINENO"; then :
72780  gl_cv_func_mbrtowc_incomplete_state=yes
72781else
72782  gl_cv_func_mbrtowc_incomplete_state=no
72783fi
72784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
72785  conftest.$ac_objext conftest.beam conftest.$ac_ext
72786fi
72787
72788      else
72789        if test $LOCALE_FR_UTF8 != none; then
72790          if test "$cross_compiling" = yes; then :
72791  :
72792else
72793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72794/* end confdefs.h.  */
72795
72796#include <locale.h>
72797#include <string.h>
72798/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
72799   <wchar.h>.
72800   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
72801   included before <wchar.h>.  */
72802#include <stddef.h>
72803#include <stdio.h>
72804#include <time.h>
72805#include <wchar.h>
72806int main ()
72807{
72808  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
72809    {
72810      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
72811      mbstate_t state;
72812      wchar_t wc;
72813
72814      memset (&state, '\0', sizeof (mbstate_t));
72815      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
72816        if (mbsinit (&state))
72817          return 2;
72818    }
72819  return 0;
72820}
72821_ACEOF
72822if ac_fn_c_try_run "$LINENO"; then :
72823  gl_cv_func_mbrtowc_incomplete_state=yes
72824else
72825  gl_cv_func_mbrtowc_incomplete_state=no
72826fi
72827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
72828  conftest.$ac_objext conftest.beam conftest.$ac_ext
72829fi
72830
72831        fi
72832      fi
72833
72834fi
72835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
72836$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
72837
72838
72839
72840
72841     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
72842$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
72843if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
72844  $as_echo_n "(cached) " >&6
72845else
72846
72847                  case "$host_os" in
72848                    # Guess no on Solaris 8.
72849        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
72850                    # Guess yes otherwise.
72851        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
72852      esac
72853      if test $LOCALE_ZH_CN != none; then
72854        if test "$cross_compiling" = yes; then :
72855  :
72856else
72857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72858/* end confdefs.h.  */
72859
72860#include <locale.h>
72861#include <stdlib.h>
72862#include <string.h>
72863/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
72864   <wchar.h>.
72865   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
72866   included before <wchar.h>.  */
72867#include <stddef.h>
72868#include <stdio.h>
72869#include <time.h>
72870#include <wchar.h>
72871int main ()
72872{
72873  /* This fails on Solaris 8:
72874     mbrtowc returns 2, and sets wc to 0x00F0.
72875     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
72876  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
72877    {
72878      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
72879      mbstate_t state;
72880      wchar_t wc;
72881
72882      memset (&state, '\0', sizeof (mbstate_t));
72883      if (mbrtowc (&wc, input + 3, 6, &state) != 4
72884          && mbtowc (&wc, input + 3, 6) == 4)
72885        return 2;
72886    }
72887  return 0;
72888}
72889_ACEOF
72890if ac_fn_c_try_run "$LINENO"; then :
72891  gl_cv_func_mbrtowc_sanitycheck=yes
72892else
72893  gl_cv_func_mbrtowc_sanitycheck=no
72894fi
72895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
72896  conftest.$ac_objext conftest.beam conftest.$ac_ext
72897fi
72898
72899      fi
72900
72901fi
72902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
72903$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
72904
72905    REPLACE_MBSTATE_T=0
72906    case "$gl_cv_func_mbrtowc_incomplete_state" in
72907      *yes) ;;
72908      *) REPLACE_MBSTATE_T=1 ;;
72909    esac
72910    case "$gl_cv_func_mbrtowc_sanitycheck" in
72911      *yes) ;;
72912      *) REPLACE_MBSTATE_T=1 ;;
72913    esac
72914  else
72915    REPLACE_MBSTATE_T=1
72916  fi
72917
72918
72919
72920  if test $ac_cv_func_wcrtomb = no; then
72921    HAVE_WCRTOMB=0
72922    ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
72923/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
72924   <wchar.h>.
72925   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
72926   included before <wchar.h>.  */
72927#include <stddef.h>
72928#include <stdio.h>
72929#include <time.h>
72930#include <wchar.h>
72931
72932"
72933if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
72934  ac_have_decl=1
72935else
72936  ac_have_decl=0
72937fi
72938
72939cat >>confdefs.h <<_ACEOF
72940#define HAVE_DECL_WCRTOMB $ac_have_decl
72941_ACEOF
72942
72943    if test $ac_cv_have_decl_wcrtomb = yes; then
72944                        REPLACE_WCRTOMB=1
72945    fi
72946  else
72947                        if test $REPLACE_WCRTOMB = 0; then
72948
72949
72950
72951
72952
72953             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
72954$as_echo_n "checking whether wcrtomb works in the C locale... " >&6; }
72955if ${gl_cv_func_wcrtomb_works+:} false; then :
72956  $as_echo_n "(cached) " >&6
72957else
72958  if test "$cross_compiling" = yes; then :
72959  case "$host_os" in
72960                               # Guess no on Android.
72961              linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
72962                               # Guess yes otherwise.
72963              *)               gl_cv_func_wcrtomb_works="guessing yes";;
72964            esac
72965
72966else
72967  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72968/* end confdefs.h.  */
72969
72970#include <string.h>
72971#include <stdlib.h>
72972/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
72973   <wchar.h>.
72974   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
72975   included before <wchar.h>.  */
72976#include <stddef.h>
72977#include <stdio.h>
72978#include <wchar.h>
72979int main ()
72980{
72981  mbstate_t state;
72982  char out[64];
72983  int count;
72984  memset (&state, 0, sizeof (state));
72985  out[0] = 'x';
72986  count = wcrtomb (out, L'a', &state);
72987  return !(count == 1 && out[0] == 'a');
72988}
72989_ACEOF
72990if ac_fn_c_try_run "$LINENO"; then :
72991  gl_cv_func_wcrtomb_works=yes
72992else
72993  gl_cv_func_wcrtomb_works=no
72994fi
72995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
72996  conftest.$ac_objext conftest.beam conftest.$ac_ext
72997fi
72998
72999
73000fi
73001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
73002$as_echo "$gl_cv_func_wcrtomb_works" >&6; }
73003      case "$gl_cv_func_wcrtomb_works" in
73004        *yes) ;;
73005        *)
73006$as_echo "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
73007
73008           REPLACE_WCRTOMB=1 ;;
73009      esac
73010    fi
73011    if test $REPLACE_WCRTOMB = 0; then
73012      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
73013$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
73014if ${gl_cv_func_wcrtomb_retval+:} false; then :
73015  $as_echo_n "(cached) " >&6
73016else
73017
73018                              case "$host_os" in
73019            # Guess no on AIX 4, OSF/1, Solaris, native Windows.
73020            aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
73021            # Guess yes otherwise.
73022            *)                                gl_cv_func_wcrtomb_retval="guessing yes" ;;
73023          esac
73024          if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
73025            if test "$cross_compiling" = yes; then :
73026  :
73027else
73028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73029/* end confdefs.h.  */
73030
73031#include <locale.h>
73032#include <string.h>
73033/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
73034   <wchar.h>.
73035   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
73036   included before <wchar.h>.  */
73037#include <stddef.h>
73038#include <stdio.h>
73039#include <time.h>
73040#include <wchar.h>
73041#include <stdlib.h>
73042int main ()
73043{
73044  int result = 0;
73045  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
73046    {
73047      if (wcrtomb (NULL, 0, NULL) != 1)
73048        result |= 1;
73049    }
73050  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
73051    {
73052      if (wcrtomb (NULL, 0, NULL) != 1)
73053        result |= 2;
73054      {
73055        wchar_t wc = (wchar_t) 0xBADFACE;
73056        if (mbtowc (&wc, "\303\274", 2) == 2)
73057          if (wcrtomb (NULL, wc, NULL) != 1)
73058            result |= 2;
73059      }
73060    }
73061  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
73062    {
73063      if (wcrtomb (NULL, 0, NULL) != 1)
73064        result |= 4;
73065    }
73066  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
73067    {
73068      if (wcrtomb (NULL, 0, NULL) != 1)
73069        result |= 8;
73070    }
73071  return result;
73072}
73073_ACEOF
73074if ac_fn_c_try_run "$LINENO"; then :
73075  gl_cv_func_wcrtomb_retval=yes
73076else
73077  gl_cv_func_wcrtomb_retval=no
73078fi
73079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
73080  conftest.$ac_objext conftest.beam conftest.$ac_ext
73081fi
73082
73083          fi
73084
73085fi
73086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
73087$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
73088      case "$gl_cv_func_wcrtomb_retval" in
73089        *yes) ;;
73090        *)
73091$as_echo "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
73092
73093           REPLACE_WCRTOMB=1 ;;
73094      esac
73095    fi
73096  fi
73097
73098  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
73099
73100
73101
73102
73103
73104
73105
73106
73107  grgl_LIBOBJS="$grgl_LIBOBJS wcrtomb.$ac_objext"
73108
73109
73110  :
73111
73112  fi
73113
73114
73115
73116
73117
73118    if test "$GNULIB_WCRTOMB" != 1; then
73119        if test "$GNULIB_WCRTOMB" = 0; then
73120      GNULIB_WCRTOMB=IN_GETTEXT_TOOLS_LIBGREP
73121    else
73122      GNULIB_WCRTOMB="($GNULIB_WCRTOMB || IN_GETTEXT_TOOLS_LIBGREP)"
73123    fi
73124  fi
73125
73126
73127
73128
73129
73130$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
73131
73132
73133
73134
73135  # End of code from modules
73136
73137
73138
73139
73140
73141
73142
73143
73144
73145  gltests_libdeps=
73146  gltests_ltlibdeps=
73147
73148
73149
73150
73151
73152
73153
73154
73155
73156
73157  gl_source_base='tests'
73158  grgltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
73159
73160  gl_module_indicator_condition=$grgltests_WITNESS
73161
73162
73163
73164
73165
73166
73167
73168
73169
73170  LIBGREP_LIBDEPS="$gl_libdeps"
73171
73172  LIBGREP_LTLIBDEPS="$gl_ltlibdeps"
73173
73174
73175
73176
73177
73178
73179
73180   if true; then
73181  GL_COND_LIBTOOL_TRUE=
73182  GL_COND_LIBTOOL_FALSE='#'
73183else
73184  GL_COND_LIBTOOL_TRUE='#'
73185  GL_COND_LIBTOOL_FALSE=
73186fi
73187
73188  gl_cond_libtool=true
73189  gl_m4_base='libgettextpo/gnulib-m4'
73190
73191
73192
73193
73194
73195
73196
73197
73198
73199
73200  gl_source_base='libgettextpo'
73201
73202
73203  if test $ac_cv_func_alloca_works = no; then
73204    :
73205  fi
73206
73207  # Define an additional variable used in the Makefile substitution.
73208  if test $ac_cv_working_alloca_h = yes; then
73209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
73210$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
73211if ${gl_cv_rpl_alloca+:} false; then :
73212  $as_echo_n "(cached) " >&6
73213else
73214
73215      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73216/* end confdefs.h.  */
73217
73218#if defined __GNUC__ || defined _AIX || defined _MSC_VER
73219        Need own alloca
73220#endif
73221
73222_ACEOF
73223if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
73224  $EGREP "Need own alloca" >/dev/null 2>&1; then :
73225  gl_cv_rpl_alloca=yes
73226else
73227  gl_cv_rpl_alloca=no
73228fi
73229rm -f conftest*
73230
73231
73232fi
73233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
73234$as_echo "$gl_cv_rpl_alloca" >&6; }
73235    if test $gl_cv_rpl_alloca = yes; then
73236
73237$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
73238
73239      ALLOCA_H=alloca.h
73240    else
73241                  ALLOCA_H=
73242    fi
73243  else
73244    ALLOCA_H=alloca.h
73245  fi
73246
73247   if test -n "$ALLOCA_H"; then
73248  GL_GENERATE_ALLOCA_H_TRUE=
73249  GL_GENERATE_ALLOCA_H_FALSE='#'
73250else
73251  GL_GENERATE_ALLOCA_H_TRUE='#'
73252  GL_GENERATE_ALLOCA_H_FALSE=
73253fi
73254
73255
73256  if test $ac_cv_working_alloca_h = yes; then
73257    HAVE_ALLOCA_H=1
73258  else
73259    HAVE_ALLOCA_H=0
73260  fi
73261
73262
73263
73264  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
73265$as_echo_n "checking for __builtin_expect... " >&6; }
73266if ${gl_cv___builtin_expect+:} false; then :
73267  $as_echo_n "(cached) " >&6
73268else
73269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73270/* end confdefs.h.  */
73271
73272         int
73273         main (int argc, char **argv)
73274         {
73275           argc = __builtin_expect (argc, 100);
73276           return argv[argc != 100][0];
73277         }
73278_ACEOF
73279if ac_fn_c_try_link "$LINENO"; then :
73280  gl_cv___builtin_expect=yes
73281else
73282  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73283/* end confdefs.h.  */
73284
73285             #include <builtins.h>
73286             int
73287             main (int argc, char **argv)
73288             {
73289               argc = __builtin_expect (argc, 100);
73290               return argv[argc != 100][0];
73291             }
73292_ACEOF
73293if ac_fn_c_try_link "$LINENO"; then :
73294  gl_cv___builtin_expect="in <builtins.h>"
73295else
73296  gl_cv___builtin_expect=no
73297fi
73298rm -f core conftest.err conftest.$ac_objext \
73299    conftest$ac_exeext conftest.$ac_ext
73300fi
73301rm -f core conftest.err conftest.$ac_objext \
73302    conftest$ac_exeext conftest.$ac_ext
73303fi
73304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
73305$as_echo "$gl_cv___builtin_expect" >&6; }
73306  if test "$gl_cv___builtin_expect" = yes; then
73307    $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
73308
73309  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
73310    $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
73311
73312  fi
73313
73314
73315
73316
73317$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
73318
73319
73320
73321
73322
73323
73324    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
73325      REPLACE_CLOSE=1
73326    fi
73327
73328
73329
73330
73331
73332
73333  if test $ac_cv_header_sys_socket_h != yes; then
73334                    for ac_header in winsock2.h
73335do :
73336  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
73337if test "x$ac_cv_header_winsock2_h" = xyes; then :
73338  cat >>confdefs.h <<_ACEOF
73339#define HAVE_WINSOCK2_H 1
73340_ACEOF
73341
73342fi
73343
73344done
73345
73346  fi
73347  if test "$ac_cv_header_winsock2_h" = yes; then
73348    HAVE_WINSOCK2_H=1
73349    UNISTD_H_HAVE_WINSOCK2_H=1
73350    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
73351  else
73352    HAVE_WINSOCK2_H=0
73353  fi
73354
73355
73356    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
73357                        REPLACE_CLOSE=1
73358    fi
73359
73360
73361
73362  if test $REPLACE_CLOSE = 1; then
73363
73364
73365
73366
73367
73368
73369
73370
73371  gtpo_LIBOBJS="$gtpo_LIBOBJS close.$ac_objext"
73372
73373  fi
73374
73375
73376
73377
73378
73379          GNULIB_CLOSE=1
73380
73381
73382
73383
73384
73385$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
73386
73387
73388
73389
73390
73391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
73392$as_echo_n "checking whether // is distinct from /... " >&6; }
73393if ${gl_cv_double_slash_root+:} false; then :
73394  $as_echo_n "(cached) " >&6
73395else
73396   if test x"$cross_compiling" = xyes ; then
73397        # When cross-compiling, there is no way to tell whether // is special
73398        # short of a list of hosts.  However, the only known hosts to date
73399        # that have a distinct // are Apollo DomainOS (too old to port to),
73400        # Cygwin, and z/OS.  If anyone knows of another system for which // has
73401        # special semantics and is distinct from /, please report it to
73402        # <bug-gnulib@gnu.org>.
73403        case $host in
73404          *-cygwin | i370-ibm-openedition)
73405            gl_cv_double_slash_root=yes ;;
73406          *)
73407            # Be optimistic and assume that / and // are the same when we
73408            # don't know.
73409            gl_cv_double_slash_root='unknown, assuming no' ;;
73410        esac
73411      else
73412        set x `ls -di / // 2>/dev/null`
73413        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
73414          gl_cv_double_slash_root=no
73415        else
73416          gl_cv_double_slash_root=yes
73417        fi
73418      fi
73419fi
73420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
73421$as_echo "$gl_cv_double_slash_root" >&6; }
73422  if test "$gl_cv_double_slash_root" = yes; then
73423
73424$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
73425
73426  fi
73427
73428
73429
73430
73431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
73432$as_echo_n "checking whether dup2 works... " >&6; }
73433if ${gl_cv_func_dup2_works+:} false; then :
73434  $as_echo_n "(cached) " >&6
73435else
73436  if test "$cross_compiling" = yes; then :
73437  case "$host_os" in
73438         mingw*) # on this platform, dup2 always returns 0 for success
73439           gl_cv_func_dup2_works="guessing no" ;;
73440         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
73441           gl_cv_func_dup2_works="guessing no" ;;
73442         aix* | freebsd*)
73443                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
73444                 # not EBADF.
73445           gl_cv_func_dup2_works="guessing no" ;;
73446         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
73447           gl_cv_func_dup2_works="guessing no" ;;
73448         *-android*) # implemented using dup3(), which fails if oldfd == newfd
73449           gl_cv_func_dup2_works="guessing no" ;;
73450         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
73451           gl_cv_func_dup2_works="guessing no" ;;
73452         *) gl_cv_func_dup2_works="guessing yes" ;;
73453       esac
73454else
73455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73456/* end confdefs.h.  */
73457
73458       #include <errno.h>
73459           #include <fcntl.h>
73460           #include <limits.h>
73461           #include <sys/resource.h>
73462           #include <unistd.h>
73463           #ifndef RLIM_SAVED_CUR
73464           # define RLIM_SAVED_CUR RLIM_INFINITY
73465           #endif
73466           #ifndef RLIM_SAVED_MAX
73467           # define RLIM_SAVED_MAX RLIM_INFINITY
73468           #endif
73469
73470int
73471main ()
73472{
73473int result = 0;
73474           int bad_fd = INT_MAX;
73475           struct rlimit rlim;
73476           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
73477               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
73478               && rlim.rlim_cur != RLIM_INFINITY
73479               && rlim.rlim_cur != RLIM_SAVED_MAX
73480               && rlim.rlim_cur != RLIM_SAVED_CUR)
73481             bad_fd = rlim.rlim_cur;
73482           #ifdef FD_CLOEXEC
73483             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
73484               result |= 1;
73485           #endif
73486           if (dup2 (1, 1) != 1)
73487             result |= 2;
73488           #ifdef FD_CLOEXEC
73489             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
73490               result |= 4;
73491           #endif
73492           close (0);
73493           if (dup2 (0, 0) != -1)
73494             result |= 8;
73495           /* Many gnulib modules require POSIX conformance of EBADF.  */
73496           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
73497             result |= 16;
73498           /* Flush out some cygwin core dumps.  */
73499           if (dup2 (2, -1) != -1 || errno != EBADF)
73500             result |= 32;
73501           dup2 (2, 255);
73502           dup2 (2, 256);
73503           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
73504           {
73505             int fd = open (".", O_RDONLY);
73506             if (fd == -1)
73507               result |= 64;
73508             else if (dup2 (fd, fd + 1) == -1)
73509               result |= 128;
73510             close (fd);
73511           }
73512           return result;
73513  ;
73514  return 0;
73515}
73516
73517_ACEOF
73518if ac_fn_c_try_run "$LINENO"; then :
73519  gl_cv_func_dup2_works=yes
73520else
73521  gl_cv_func_dup2_works=no
73522fi
73523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
73524  conftest.$ac_objext conftest.beam conftest.$ac_ext
73525fi
73526
73527
73528fi
73529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
73530$as_echo "$gl_cv_func_dup2_works" >&6; }
73531  case "$gl_cv_func_dup2_works" in
73532    *yes) ;;
73533    *)
73534      REPLACE_DUP2=1
73535      for ac_func in setdtablesize
73536do :
73537  ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
73538if test "x$ac_cv_func_setdtablesize" = xyes; then :
73539  cat >>confdefs.h <<_ACEOF
73540#define HAVE_SETDTABLESIZE 1
73541_ACEOF
73542
73543fi
73544done
73545
73546      ;;
73547  esac
73548
73549
73550  if test $REPLACE_DUP2 = 1; then
73551
73552
73553
73554
73555
73556
73557
73558
73559  gtpo_LIBOBJS="$gtpo_LIBOBJS dup2.$ac_objext"
73560
73561
73562  fi
73563
73564
73565
73566
73567
73568          GNULIB_DUP2=1
73569
73570
73571
73572
73573
73574$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
73575
73576
73577
73578
73579
73580      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
73581$as_echo_n "checking for error_at_line... " >&6; }
73582if ${ac_cv_lib_error_at_line+:} false; then :
73583  $as_echo_n "(cached) " >&6
73584else
73585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73586/* end confdefs.h.  */
73587#include <error.h>
73588int
73589main ()
73590{
73591error_at_line (0, 0, "", 0, "an error occurred");
73592  ;
73593  return 0;
73594}
73595_ACEOF
73596if ac_fn_c_try_link "$LINENO"; then :
73597  ac_cv_lib_error_at_line=yes
73598else
73599  ac_cv_lib_error_at_line=no
73600fi
73601rm -f core conftest.err conftest.$ac_objext \
73602    conftest$ac_exeext conftest.$ac_ext
73603fi
73604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
73605$as_echo "$ac_cv_lib_error_at_line" >&6; }
73606
73607  if test $ac_cv_lib_error_at_line = no; then
73608
73609
73610
73611
73612
73613
73614
73615
73616  gtpo_LIBOBJS="$gtpo_LIBOBJS error.$ac_objext"
73617
73618
73619
73620  :
73621
73622  fi
73623
73624
73625  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
73626
73627
73628
73629  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
73630
73631
73632
73633
73634
73635
73636
73637  if test $ac_cv_func_fcntl = no; then
73638
73639
73640
73641  if test $ac_cv_func_fcntl = no; then
73642    HAVE_FCNTL=0
73643  else
73644    REPLACE_FCNTL=1
73645  fi
73646
73647  else
73648            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
73649$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
73650if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
73651  $as_echo_n "(cached) " >&6
73652else
73653  if test "$cross_compiling" = yes; then :
73654  case $host_os in
73655            aix* | cygwin* | haiku*)
73656               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
73657            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
73658          esac
73659else
73660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73661/* end confdefs.h.  */
73662#include <errno.h>
73663              #include <fcntl.h>
73664              #include <limits.h>
73665              #include <sys/resource.h>
73666              #include <unistd.h>
73667              #ifndef RLIM_SAVED_CUR
73668              # define RLIM_SAVED_CUR RLIM_INFINITY
73669              #endif
73670              #ifndef RLIM_SAVED_MAX
73671              # define RLIM_SAVED_MAX RLIM_INFINITY
73672              #endif
73673
73674int
73675main ()
73676{
73677int result = 0;
73678              int bad_fd = INT_MAX;
73679              struct rlimit rlim;
73680              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
73681                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
73682                  && rlim.rlim_cur != RLIM_INFINITY
73683                  && rlim.rlim_cur != RLIM_SAVED_MAX
73684                  && rlim.rlim_cur != RLIM_SAVED_CUR)
73685                bad_fd = rlim.rlim_cur;
73686              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
73687              if (errno != EINVAL) result |= 2;
73688              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
73689              if (errno != EINVAL) result |= 8;
73690              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
73691              {
73692                int fd;
73693                fd = open (".", O_RDONLY);
73694                if (fd == -1)
73695                  result |= 16;
73696                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
73697                  result |= 32;
73698
73699                close (fd);
73700              }
73701              return result;
73702  ;
73703  return 0;
73704}
73705_ACEOF
73706if ac_fn_c_try_run "$LINENO"; then :
73707  gl_cv_func_fcntl_f_dupfd_works=yes
73708else
73709  gl_cv_func_fcntl_f_dupfd_works=no
73710fi
73711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
73712  conftest.$ac_objext conftest.beam conftest.$ac_ext
73713fi
73714
73715fi
73716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
73717$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
73718    case $gl_cv_func_fcntl_f_dupfd_works in
73719      *yes) ;;
73720      *)
73721
73722
73723  if test $ac_cv_func_fcntl = no; then
73724    HAVE_FCNTL=0
73725  else
73726    REPLACE_FCNTL=1
73727  fi
73728
73729
73730$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
73731 ;;
73732    esac
73733
73734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
73735$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
73736if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
73737  $as_echo_n "(cached) " >&6
73738else
73739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73740/* end confdefs.h.  */
73741
73742#include <fcntl.h>
73743#ifndef F_DUPFD_CLOEXEC
73744choke me
73745#endif
73746
73747int
73748main ()
73749{
73750
73751  ;
73752  return 0;
73753}
73754_ACEOF
73755if ac_fn_c_try_compile "$LINENO"; then :
73756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73757/* end confdefs.h.  */
73758
73759#ifdef __linux__
73760/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
73761   it to support the semantics on older kernels that failed with EINVAL.  */
73762choke me
73763#endif
73764
73765int
73766main ()
73767{
73768
73769  ;
73770  return 0;
73771}
73772_ACEOF
73773if ac_fn_c_try_compile "$LINENO"; then :
73774  gl_cv_func_fcntl_f_dupfd_cloexec=yes
73775else
73776  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
73777fi
73778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
73779else
73780  gl_cv_func_fcntl_f_dupfd_cloexec=no
73781fi
73782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
73783fi
73784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
73785$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
73786    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
73787
73788
73789
73790  if test $ac_cv_func_fcntl = no; then
73791    HAVE_FCNTL=0
73792  else
73793    REPLACE_FCNTL=1
73794  fi
73795
73796          fi
73797  fi
73798
73799
73800  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
73801
73802
73803
73804
73805
73806
73807
73808
73809  gtpo_LIBOBJS="$gtpo_LIBOBJS fcntl.$ac_objext"
73810
73811  fi
73812
73813
73814
73815
73816
73817          GNULIB_FCNTL=1
73818
73819
73820
73821
73822
73823$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
73824
73825
73826
73827
73828
73829
73830
73831
73832
73833
73834
73835
73836
73837
73838     if test $gl_cv_have_include_next = yes; then
73839       gl_cv_next_fcntl_h='<'fcntl.h'>'
73840     else
73841       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
73842$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
73843if ${gl_cv_next_fcntl_h+:} false; then :
73844  $as_echo_n "(cached) " >&6
73845else
73846
73847
73848
73849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73850/* end confdefs.h.  */
73851#include <fcntl.h>
73852_ACEOF
73853                case "$host_os" in
73854    aix*) gl_absname_cpp="$ac_cpp -C" ;;
73855    *)    gl_absname_cpp="$ac_cpp" ;;
73856  esac
73857
73858  case "$host_os" in
73859    mingw*)
73860                                          gl_dirsep_regex='[/\\]'
73861      ;;
73862    *)
73863      gl_dirsep_regex='\/'
73864      ;;
73865  esac
73866      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
73867  gl_header_literal_regex=`echo 'fcntl.h' \
73868                           | sed -e "$gl_make_literal_regex_sed"`
73869  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
73870      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
73871      s|^/[^/]|//&|
73872      p
73873      q
73874    }'
73875
73876        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
73877  sed -n "$gl_absolute_header_sed"`
73878
73879           gl_header=$gl_cv_absolute_fcntl_h
73880           gl_cv_next_fcntl_h='"'$gl_header'"'
73881
73882
73883fi
73884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
73885$as_echo "$gl_cv_next_fcntl_h" >&6; }
73886     fi
73887     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
73888
73889     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
73890       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
73891       gl_next_as_first_directive='<'fcntl.h'>'
73892     else
73893       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
73894       gl_next_as_first_directive=$gl_cv_next_fcntl_h
73895     fi
73896     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
73897
73898
73899
73900
73901
73902
73903
73904
73905
73906
73907
73908
73909
73910
73911
73912
73913
73914    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
73915      REPLACE_FDOPEN=1
73916    fi
73917
73918  if test $REPLACE_FDOPEN = 0; then
73919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
73920$as_echo_n "checking whether fdopen sets errno... " >&6; }
73921if ${gl_cv_func_fdopen_works+:} false; then :
73922  $as_echo_n "(cached) " >&6
73923else
73924
73925        if test "$cross_compiling" = yes; then :
73926  case "$host_os" in
73927             mingw*) gl_cv_func_fdopen_works="guessing no" ;;
73928             *)      gl_cv_func_fdopen_works="guessing yes" ;;
73929           esac
73930
73931else
73932  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73933/* end confdefs.h.  */
73934
73935#include <stdio.h>
73936#include <errno.h>
73937int
73938main (void)
73939{
73940  FILE *fp;
73941  errno = 0;
73942  fp = fdopen (-1, "r");
73943  if (fp == NULL && errno == 0)
73944    return 1;
73945  return 0;
73946}
73947_ACEOF
73948if ac_fn_c_try_run "$LINENO"; then :
73949  gl_cv_func_fdopen_works=yes
73950else
73951  gl_cv_func_fdopen_works=no
73952fi
73953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
73954  conftest.$ac_objext conftest.beam conftest.$ac_ext
73955fi
73956
73957
73958fi
73959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
73960$as_echo "$gl_cv_func_fdopen_works" >&6; }
73961    case "$gl_cv_func_fdopen_works" in
73962      *no) REPLACE_FDOPEN=1 ;;
73963    esac
73964  fi
73965
73966  if test $REPLACE_FDOPEN = 1; then
73967
73968
73969
73970
73971
73972
73973
73974
73975  gtpo_LIBOBJS="$gtpo_LIBOBJS fdopen.$ac_objext"
73976
73977
73978  fi
73979
73980
73981
73982
73983
73984          GNULIB_FDOPEN=1
73985
73986
73987
73988
73989
73990$as_echo "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
73991
73992
73993
73994
73995
73996
73997  FLOAT_H=
73998  REPLACE_FLOAT_LDBL=0
73999  case "$host_os" in
74000    aix* | beos* | openbsd* | mirbsd* | irix*)
74001      FLOAT_H=float.h
74002      ;;
74003    freebsd* | dragonfly*)
74004      case "$host_cpu" in
74005        i[34567]86 )
74006          FLOAT_H=float.h
74007          ;;
74008        x86_64 )
74009          # On x86_64 systems, the C compiler may still be generating
74010          # 32-bit code.
74011          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74012/* end confdefs.h.  */
74013#if defined __LP64__ || defined __x86_64__ || defined __amd64__
74014                  int ok;
74015                 #else
74016                  error fail
74017                 #endif
74018
74019_ACEOF
74020if ac_fn_c_try_compile "$LINENO"; then :
74021
74022else
74023  FLOAT_H=float.h
74024fi
74025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
74026          ;;
74027      esac
74028      ;;
74029    linux*)
74030      case "$host_cpu" in
74031        powerpc*)
74032          FLOAT_H=float.h
74033          ;;
74034      esac
74035      ;;
74036  esac
74037  case "$host_os" in
74038    aix* | freebsd* | dragonfly* | linux*)
74039      if test -n "$FLOAT_H"; then
74040        REPLACE_FLOAT_LDBL=1
74041      fi
74042      ;;
74043  esac
74044
74045    REPLACE_ITOLD=0
74046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
74047$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
74048if ${gl_cv_func_itold_works+:} false; then :
74049  $as_echo_n "(cached) " >&6
74050else
74051
74052      if test "$cross_compiling" = yes; then :
74053  case "$host" in
74054           sparc*-*-linux*)
74055             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74056/* end confdefs.h.  */
74057#if defined __LP64__ || defined __arch64__
74058                    int ok;
74059                   #else
74060                    error fail
74061                   #endif
74062
74063_ACEOF
74064if ac_fn_c_try_compile "$LINENO"; then :
74065  gl_cv_func_itold_works="guessing no"
74066else
74067  gl_cv_func_itold_works="guessing yes"
74068fi
74069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
74070             ;;
74071                   # Guess yes on native Windows.
74072           mingw*) gl_cv_func_itold_works="guessing yes" ;;
74073           *)      gl_cv_func_itold_works="guessing yes" ;;
74074         esac
74075
74076else
74077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74078/* end confdefs.h.  */
74079
74080int i = -1;
74081volatile long double ld;
74082int main ()
74083{
74084  ld += i * 1.0L;
74085  if (ld > 0)
74086    return 1;
74087  return 0;
74088}
74089_ACEOF
74090if ac_fn_c_try_run "$LINENO"; then :
74091  gl_cv_func_itold_works=yes
74092else
74093  gl_cv_func_itold_works=no
74094fi
74095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
74096  conftest.$ac_objext conftest.beam conftest.$ac_ext
74097fi
74098
74099
74100fi
74101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
74102$as_echo "$gl_cv_func_itold_works" >&6; }
74103  case "$gl_cv_func_itold_works" in
74104    *no)
74105      REPLACE_ITOLD=1
74106                  FLOAT_H=float.h
74107      ;;
74108  esac
74109
74110  if test -n "$FLOAT_H"; then
74111
74112
74113
74114
74115
74116
74117
74118
74119     if test $gl_cv_have_include_next = yes; then
74120       gl_cv_next_float_h='<'float.h'>'
74121     else
74122       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
74123$as_echo_n "checking absolute name of <float.h>... " >&6; }
74124if ${gl_cv_next_float_h+:} false; then :
74125  $as_echo_n "(cached) " >&6
74126else
74127
74128
74129
74130  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74131/* end confdefs.h.  */
74132#include <float.h>
74133_ACEOF
74134                case "$host_os" in
74135    aix*) gl_absname_cpp="$ac_cpp -C" ;;
74136    *)    gl_absname_cpp="$ac_cpp" ;;
74137  esac
74138
74139  case "$host_os" in
74140    mingw*)
74141                                          gl_dirsep_regex='[/\\]'
74142      ;;
74143    *)
74144      gl_dirsep_regex='\/'
74145      ;;
74146  esac
74147      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
74148  gl_header_literal_regex=`echo 'float.h' \
74149                           | sed -e "$gl_make_literal_regex_sed"`
74150  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
74151      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
74152      s|^/[^/]|//&|
74153      p
74154      q
74155    }'
74156
74157        gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
74158  sed -n "$gl_absolute_header_sed"`
74159
74160           gl_header=$gl_cv_absolute_float_h
74161           gl_cv_next_float_h='"'$gl_header'"'
74162
74163
74164fi
74165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
74166$as_echo "$gl_cv_next_float_h" >&6; }
74167     fi
74168     NEXT_FLOAT_H=$gl_cv_next_float_h
74169
74170     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
74171       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
74172       gl_next_as_first_directive='<'float.h'>'
74173     else
74174       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
74175       gl_next_as_first_directive=$gl_cv_next_float_h
74176     fi
74177     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
74178
74179
74180
74181
74182  fi
74183
74184   if test -n "$FLOAT_H"; then
74185  GL_GENERATE_FLOAT_H_TRUE=
74186  GL_GENERATE_FLOAT_H_FALSE='#'
74187else
74188  GL_GENERATE_FLOAT_H_TRUE='#'
74189  GL_GENERATE_FLOAT_H_FALSE=
74190fi
74191
74192
74193
74194  if test $REPLACE_FLOAT_LDBL = 1; then
74195
74196
74197
74198
74199
74200
74201
74202
74203  gtpo_LIBOBJS="$gtpo_LIBOBJS float.$ac_objext"
74204
74205  fi
74206  if test $REPLACE_ITOLD = 1; then
74207
74208
74209
74210
74211
74212
74213
74214
74215  gtpo_LIBOBJS="$gtpo_LIBOBJS itold.$ac_objext"
74216
74217  fi
74218
74219
74220
74221  case "$host_os" in
74222    mingw* | pw*)
74223            REPLACE_FOPEN=1
74224            gl_cv_func_fopen_slash="guessing no"
74225      ;;
74226    *)
74227                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
74228$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
74229if ${gl_cv_func_fopen_slash+:} false; then :
74230  $as_echo_n "(cached) " >&6
74231else
74232
74233          if test "$cross_compiling" = yes; then :
74234
74235             case "$host_os" in
74236               aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
74237                 gl_cv_func_fopen_slash="guessing no" ;;
74238               *)
74239                 gl_cv_func_fopen_slash="guessing yes" ;;
74240             esac
74241
74242else
74243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74244/* end confdefs.h.  */
74245
74246#include <stddef.h>
74247#include <stdio.h>
74248int main ()
74249{
74250  FILE *fp = fopen ("conftest.sl/", "w");
74251  int result = (fp != NULL);
74252  if (fp != NULL)
74253    fclose (fp);
74254  return result;
74255}
74256_ACEOF
74257if ac_fn_c_try_run "$LINENO"; then :
74258  gl_cv_func_fopen_slash=yes
74259else
74260  gl_cv_func_fopen_slash=no
74261fi
74262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
74263  conftest.$ac_objext conftest.beam conftest.$ac_ext
74264fi
74265
74266          rm -f conftest.sl
74267
74268fi
74269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
74270$as_echo "$gl_cv_func_fopen_slash" >&6; }
74271      ;;
74272  esac
74273  case "$gl_cv_func_fopen_slash" in
74274    *no)
74275
74276$as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
74277
74278      REPLACE_FOPEN=1
74279      ;;
74280  esac
74281
74282  if test $REPLACE_FOPEN = 1; then
74283
74284
74285
74286
74287
74288
74289
74290
74291  gtpo_LIBOBJS="$gtpo_LIBOBJS fopen.$ac_objext"
74292
74293    :
74294  fi
74295
74296
74297
74298
74299
74300          GNULIB_FOPEN=1
74301
74302
74303
74304
74305
74306$as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
74307
74308
74309
74310
74311
74312
74313
74314  case "$host_os" in
74315    mingw* | solaris*)
74316                        REPLACE_FSTAT=1
74317      ;;
74318  esac
74319
74320
74321
74322  if test $REPLACE_FSTAT = 1; then
74323
74324
74325
74326
74327
74328
74329
74330
74331  gtpo_LIBOBJS="$gtpo_LIBOBJS fstat.$ac_objext"
74332
74333    case "$host_os" in
74334      mingw*)
74335
74336
74337
74338
74339
74340
74341
74342
74343  gtpo_LIBOBJS="$gtpo_LIBOBJS stat-w32.$ac_objext"
74344
74345        ;;
74346    esac
74347
74348
74349  :
74350
74351  fi
74352
74353
74354
74355
74356
74357          GNULIB_FSTAT=1
74358
74359
74360
74361
74362
74363$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
74364
74365
74366
74367
74368
74369
74370  if test $ac_cv_func_fsync = no; then
74371    HAVE_FSYNC=0
74372  fi
74373
74374  if test $HAVE_FSYNC = 0; then
74375
74376
74377
74378
74379
74380
74381
74382
74383  gtpo_LIBOBJS="$gtpo_LIBOBJS fsync.$ac_objext"
74384
74385    :
74386  fi
74387
74388
74389
74390
74391
74392          GNULIB_FSYNC=1
74393
74394
74395
74396
74397
74398$as_echo "#define GNULIB_TEST_FSYNC 1" >>confdefs.h
74399
74400
74401
74402
74403
74404cat >>confdefs.h <<_ACEOF
74405#define GNULIB_FWRITEERROR 1
74406_ACEOF
74407
74408
74409
74410
74411
74412
74413
74414
74415
74416
74417  if test $ac_cv_func_getdelim = yes; then
74418    HAVE_GETDELIM=1
74419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
74420$as_echo_n "checking for working getdelim function... " >&6; }
74421if ${gl_cv_func_working_getdelim+:} false; then :
74422  $as_echo_n "(cached) " >&6
74423else
74424  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
74425       if test "$cross_compiling" = yes; then :
74426                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74427/* end confdefs.h.  */
74428
74429#include <features.h>
74430#ifdef __GNU_LIBRARY__
74431 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
74432  Lucky GNU user
74433 #endif
74434#endif
74435
74436_ACEOF
74437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74438  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
74439  gl_cv_func_working_getdelim="guessing yes"
74440else
74441  case "$host_os" in
74442               *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
74443               *)       gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
74444             esac
74445
74446fi
74447rm -f conftest*
74448
74449
74450else
74451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74452/* end confdefs.h.  */
74453
74454#    include <stdio.h>
74455#    include <stdlib.h>
74456#    include <string.h>
74457    int main ()
74458    {
74459      FILE *in = fopen ("./conftest.data", "r");
74460      if (!in)
74461        return 1;
74462      {
74463        /* Test result for a NULL buffer and a zero size.
74464           Based on a test program from Karl Heuer.  */
74465        char *line = NULL;
74466        size_t siz = 0;
74467        int len = getdelim (&line, &siz, '\n', in);
74468        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
74469          { free (line); fclose (in); return 2; }
74470        free (line);
74471      }
74472      {
74473        /* Test result for a NULL buffer and a non-zero size.
74474           This crashes on FreeBSD 8.0.  */
74475        char *line = NULL;
74476        size_t siz = (size_t)(~0) / 4;
74477        if (getdelim (&line, &siz, '\n', in) == -1)
74478          { fclose (in); return 3; }
74479        free (line);
74480      }
74481      fclose (in);
74482      return 0;
74483    }
74484
74485_ACEOF
74486if ac_fn_c_try_run "$LINENO"; then :
74487  gl_cv_func_working_getdelim=yes
74488else
74489  gl_cv_func_working_getdelim=no
74490fi
74491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
74492  conftest.$ac_objext conftest.beam conftest.$ac_ext
74493fi
74494
74495
74496fi
74497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
74498$as_echo "$gl_cv_func_working_getdelim" >&6; }
74499    case "$gl_cv_func_working_getdelim" in
74500      *yes) ;;
74501      *) REPLACE_GETDELIM=1 ;;
74502    esac
74503  else
74504    HAVE_GETDELIM=0
74505  fi
74506
74507  if test $ac_cv_have_decl_getdelim = no; then
74508    HAVE_DECL_GETDELIM=0
74509  fi
74510
74511  if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
74512
74513
74514
74515
74516
74517
74518
74519
74520  gtpo_LIBOBJS="$gtpo_LIBOBJS getdelim.$ac_objext"
74521
74522
74523  for ac_func in flockfile funlockfile
74524do :
74525  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
74526ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
74527if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
74528  cat >>confdefs.h <<_ACEOF
74529#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
74530_ACEOF
74531
74532fi
74533done
74534
74535  ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
74536if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
74537  ac_have_decl=1
74538else
74539  ac_have_decl=0
74540fi
74541
74542cat >>confdefs.h <<_ACEOF
74543#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
74544_ACEOF
74545
74546
74547  fi
74548
74549
74550
74551
74552
74553          GNULIB_GETDELIM=1
74554
74555
74556
74557
74558
74559$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
74560
74561
74562
74563
74564
74565
74566
74567
74568  if test $ac_cv_func_getdtablesize = yes &&
74569     test $ac_cv_have_decl_getdtablesize = yes; then
74570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
74571$as_echo_n "checking whether getdtablesize works... " >&6; }
74572if ${gl_cv_func_getdtablesize_works+:} false; then :
74573  $as_echo_n "(cached) " >&6
74574else
74575                                                   case "$host_os" in
74576         vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
74577         *)
74578                                                       if test "$cross_compiling" = yes; then :
74579  case "$host_os" in
74580                cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
74581                  gl_cv_func_getdtablesize_works="guessing no" ;;
74582                *) gl_cv_func_getdtablesize_works="guessing yes" ;;
74583              esac
74584
74585else
74586  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74587/* end confdefs.h.  */
74588
74589             #include <unistd.h>
74590int
74591main ()
74592{
74593int size = getdtablesize();
74594                if (dup2 (0, getdtablesize()) != -1)
74595                  return 1;
74596                if (size != getdtablesize())
74597                  return 2;
74598
74599  ;
74600  return 0;
74601}
74602_ACEOF
74603if ac_fn_c_try_run "$LINENO"; then :
74604  gl_cv_func_getdtablesize_works=yes
74605else
74606  gl_cv_func_getdtablesize_works=no
74607fi
74608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
74609  conftest.$ac_objext conftest.beam conftest.$ac_ext
74610fi
74611
74612           ;;
74613       esac
74614
74615fi
74616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
74617$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
74618    case "$gl_cv_func_getdtablesize_works" in
74619      *yes | "no (limitation)") ;;
74620      *) REPLACE_GETDTABLESIZE=1 ;;
74621    esac
74622  else
74623    HAVE_GETDTABLESIZE=0
74624  fi
74625
74626  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
74627
74628
74629
74630
74631
74632
74633
74634
74635  gtpo_LIBOBJS="$gtpo_LIBOBJS getdtablesize.$ac_objext"
74636
74637    :
74638  fi
74639
74640
74641
74642
74643
74644          GNULIB_GETDTABLESIZE=1
74645
74646
74647
74648
74649
74650$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
74651
74652
74653
74654
74655
74656
74657
74658
74659
74660
74661  gl_getline_needs_run_time_check=no
74662  ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
74663if test "x$ac_cv_func_getline" = xyes; then :
74664                   gl_getline_needs_run_time_check=yes
74665else
74666  am_cv_func_working_getline=no
74667fi
74668
74669  if test $gl_getline_needs_run_time_check = yes; then
74670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
74671$as_echo_n "checking for working getline function... " >&6; }
74672if ${am_cv_func_working_getline+:} false; then :
74673  $as_echo_n "(cached) " >&6
74674else
74675  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
74676       if test "$cross_compiling" = yes; then :
74677                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74678/* end confdefs.h.  */
74679
74680#include <features.h>
74681#ifdef __GNU_LIBRARY__
74682 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
74683  Lucky GNU user
74684 #endif
74685#endif
74686
74687_ACEOF
74688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74689  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
74690  am_cv_func_working_getline="guessing yes"
74691else
74692  case "$host_os" in
74693               *-musl*) am_cv_func_working_getline="guessing yes" ;;
74694               *)       am_cv_func_working_getline="$gl_cross_guess_normal" ;;
74695             esac
74696
74697fi
74698rm -f conftest*
74699
74700
74701else
74702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74703/* end confdefs.h.  */
74704
74705#    include <stdio.h>
74706#    include <stdlib.h>
74707#    include <string.h>
74708    int main ()
74709    {
74710      FILE *in = fopen ("./conftest.data", "r");
74711      if (!in)
74712        return 1;
74713      {
74714        /* Test result for a NULL buffer and a zero size.
74715           Based on a test program from Karl Heuer.  */
74716        char *line = NULL;
74717        size_t siz = 0;
74718        int len = getline (&line, &siz, in);
74719        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
74720          { free (line); fclose (in); return 2; }
74721        free (line);
74722      }
74723      {
74724        /* Test result for a NULL buffer and a non-zero size.
74725           This crashes on FreeBSD 8.0.  */
74726        char *line = NULL;
74727        size_t siz = (size_t)(~0) / 4;
74728        if (getline (&line, &siz, in) == -1)
74729          { fclose (in); return 3; }
74730        free (line);
74731      }
74732      fclose (in);
74733      return 0;
74734    }
74735
74736_ACEOF
74737if ac_fn_c_try_run "$LINENO"; then :
74738  am_cv_func_working_getline=yes
74739else
74740  am_cv_func_working_getline=no
74741fi
74742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
74743  conftest.$ac_objext conftest.beam conftest.$ac_ext
74744fi
74745
74746
74747fi
74748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
74749$as_echo "$am_cv_func_working_getline" >&6; }
74750  fi
74751
74752  if test $ac_cv_have_decl_getline = no; then
74753    HAVE_DECL_GETLINE=0
74754  fi
74755
74756  case "$am_cv_func_working_getline" in
74757    *yes) ;;
74758    *)
74759                        REPLACE_GETLINE=1
74760      ;;
74761  esac
74762
74763  if test $REPLACE_GETLINE = 1; then
74764
74765
74766
74767
74768
74769
74770
74771
74772  gtpo_LIBOBJS="$gtpo_LIBOBJS getline.$ac_objext"
74773
74774
74775  :
74776
74777  fi
74778
74779
74780
74781
74782
74783          GNULIB_GETLINE=1
74784
74785
74786
74787
74788
74789$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
74790
74791
74792
74793
74794
74795
74796  ac_found=0
74797  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
74798"
74799if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
74800  ac_have_decl=1
74801else
74802  ac_have_decl=0
74803fi
74804
74805cat >>confdefs.h <<_ACEOF
74806#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
74807_ACEOF
74808if test $ac_have_decl = 1; then :
74809  ac_found=1
74810fi
74811
74812  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
74813"
74814if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
74815  ac_have_decl=1
74816else
74817  ac_have_decl=0
74818fi
74819
74820cat >>confdefs.h <<_ACEOF
74821#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
74822_ACEOF
74823if test $ac_have_decl = 1; then :
74824  ac_found=1
74825fi
74826
74827  ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
74828"
74829if test "x$ac_cv_have_decl___argv" = xyes; then :
74830  ac_have_decl=1
74831else
74832  ac_have_decl=0
74833fi
74834
74835cat >>confdefs.h <<_ACEOF
74836#define HAVE_DECL___ARGV $ac_have_decl
74837_ACEOF
74838if test $ac_have_decl = 1; then :
74839  ac_found=1
74840fi
74841
74842
74843  # Incur the cost of this test only if none of the above worked.
74844  if test $ac_found = 0; then
74845    # On OpenBSD 5.1, using the global __progname variable appears to be
74846    # the only way to implement getprogname.
74847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
74848$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
74849if ${gl_cv_var___progname+:} false; then :
74850  $as_echo_n "(cached) " >&6
74851else
74852
74853        gl_cv_var___progname=
74854        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74855/* end confdefs.h.  */
74856extern char *__progname;
74857int
74858main ()
74859{
74860return *__progname;
74861
74862  ;
74863  return 0;
74864}
74865_ACEOF
74866if ac_fn_c_try_link "$LINENO"; then :
74867  gl_cv_var___progname=yes
74868
74869fi
74870rm -f core conftest.err conftest.$ac_objext \
74871    conftest$ac_exeext conftest.$ac_ext
74872
74873
74874fi
74875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
74876$as_echo "$gl_cv_var___progname" >&6; }
74877    if test "$gl_cv_var___progname" = yes; then
74878
74879$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
74880
74881    fi
74882  fi
74883
74884
74885
74886
74887  LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
74888
74889
74890
74891
74892
74893
74894
74895          GNULIB_ICONV=1
74896
74897
74898
74899
74900
74901
74902
74903
74904
74905
74906
74907
74908
74909
74910
74911
74912     if test $gl_cv_have_include_next = yes; then
74913       gl_cv_next_iconv_h='<'iconv.h'>'
74914     else
74915       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
74916$as_echo_n "checking absolute name of <iconv.h>... " >&6; }
74917if ${gl_cv_next_iconv_h+:} false; then :
74918  $as_echo_n "(cached) " >&6
74919else
74920
74921             if test $ac_cv_header_iconv_h = yes; then
74922
74923
74924
74925
74926  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74927/* end confdefs.h.  */
74928#include <iconv.h>
74929_ACEOF
74930                case "$host_os" in
74931    aix*) gl_absname_cpp="$ac_cpp -C" ;;
74932    *)    gl_absname_cpp="$ac_cpp" ;;
74933  esac
74934
74935  case "$host_os" in
74936    mingw*)
74937                                          gl_dirsep_regex='[/\\]'
74938      ;;
74939    *)
74940      gl_dirsep_regex='\/'
74941      ;;
74942  esac
74943      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
74944  gl_header_literal_regex=`echo 'iconv.h' \
74945                           | sed -e "$gl_make_literal_regex_sed"`
74946  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
74947      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
74948      s|^/[^/]|//&|
74949      p
74950      q
74951    }'
74952
74953        gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
74954  sed -n "$gl_absolute_header_sed"`
74955
74956           gl_header=$gl_cv_absolute_iconv_h
74957           gl_cv_next_iconv_h='"'$gl_header'"'
74958          else
74959               gl_cv_next_iconv_h='<'iconv.h'>'
74960             fi
74961
74962
74963fi
74964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
74965$as_echo "$gl_cv_next_iconv_h" >&6; }
74966     fi
74967     NEXT_ICONV_H=$gl_cv_next_iconv_h
74968
74969     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
74970       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
74971       gl_next_as_first_directive='<'iconv.h'>'
74972     else
74973       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
74974       gl_next_as_first_directive=$gl_cv_next_iconv_h
74975     fi
74976     NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
74977
74978
74979
74980
74981
74982
74983
74984
74985
74986
74987
74988
74989
74990
74991
74992  if test "$am_cv_func_iconv" = yes; then
74993
74994
74995  ICONV_H='iconv.h'
74996   if test -n "$ICONV_H"; then
74997  GL_GENERATE_ICONV_H_TRUE=
74998  GL_GENERATE_ICONV_H_FALSE='#'
74999else
75000  GL_GENERATE_ICONV_H_TRUE='#'
75001  GL_GENERATE_ICONV_H_FALSE=
75002fi
75003
75004
75005            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75006/* end confdefs.h.  */
75007
75008      #include <iconv.h>
75009      #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
75010       gnu_iconv
75011      #endif
75012
75013_ACEOF
75014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
75015  $EGREP "gnu_iconv" >/dev/null 2>&1; then :
75016  gl_func_iconv_gnu=yes
75017else
75018  gl_func_iconv_gnu=no
75019fi
75020rm -f conftest*
75021
75022    if test $gl_func_iconv_gnu = no; then
75023      iconv_flavor=
75024      case "$host_os" in
75025        aix*)         iconv_flavor=ICONV_FLAVOR_AIX ;;
75026        irix*)        iconv_flavor=ICONV_FLAVOR_IRIX ;;
75027        hpux*)        iconv_flavor=ICONV_FLAVOR_HPUX ;;
75028        osf*)         iconv_flavor=ICONV_FLAVOR_OSF ;;
75029        solaris*)     iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
75030        openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
75031      esac
75032      if test -n "$iconv_flavor"; then
75033
75034cat >>confdefs.h <<_ACEOF
75035#define ICONV_FLAVOR $iconv_flavor
75036_ACEOF
75037
75038
75039
75040
75041  ICONV_H='iconv.h'
75042   if test -n "$ICONV_H"; then
75043  GL_GENERATE_ICONV_H_TRUE=
75044  GL_GENERATE_ICONV_H_FALSE='#'
75045else
75046  GL_GENERATE_ICONV_H_TRUE='#'
75047  GL_GENERATE_ICONV_H_FALSE=
75048fi
75049
75050
75051  REPLACE_ICONV_OPEN=1
75052
75053      fi
75054    fi
75055
75056  fi
75057
75058  if test $REPLACE_ICONV_OPEN = 1; then
75059
75060
75061
75062
75063
75064
75065
75066
75067  gtpo_LIBOBJS="$gtpo_LIBOBJS iconv_open.$ac_objext"
75068
75069  fi
75070  if test $REPLACE_ICONV = 1; then
75071
75072
75073
75074
75075
75076
75077
75078
75079  gtpo_LIBOBJS="$gtpo_LIBOBJS iconv.$ac_objext"
75080
75081
75082
75083
75084
75085
75086
75087
75088
75089  gtpo_LIBOBJS="$gtpo_LIBOBJS iconv_close.$ac_objext"
75090
75091  fi
75092
75093
75094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
75095$as_echo_n "checking whether the compiler generally respects inline... " >&6; }
75096if ${gl_cv_c_inline_effective+:} false; then :
75097  $as_echo_n "(cached) " >&6
75098else
75099  if test $ac_cv_c_inline = no; then
75100       gl_cv_c_inline_effective=no
75101     else
75102                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75103/* end confdefs.h.  */
75104
75105int
75106main ()
75107{
75108#ifdef __NO_INLINE__
75109               #error "inline is not effective"
75110             #endif
75111  ;
75112  return 0;
75113}
75114_ACEOF
75115if ac_fn_c_try_compile "$LINENO"; then :
75116  gl_cv_c_inline_effective=yes
75117else
75118  gl_cv_c_inline_effective=no
75119fi
75120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75121     fi
75122
75123fi
75124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
75125$as_echo "$gl_cv_c_inline_effective" >&6; }
75126  if test $gl_cv_c_inline_effective = yes; then
75127
75128$as_echo "#define HAVE_INLINE 1" >>confdefs.h
75129
75130  fi
75131
75132
75133
75134
75135
75136
75137
75138
75139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the included libunistring" >&5
75140$as_echo_n "checking whether to use the included libunistring... " >&6; }
75141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_libunistring_use_included" >&5
75142$as_echo "$gl_libunistring_use_included" >&6; }
75143
75144
75145
75146
75147
75148    LOCALCHARSET_TESTS_ENVIRONMENT=
75149
75150
75151
75152
75153
75154
75155
75156
75157
75158
75159
75160  case "$host_os" in
75161    solaris*)
75162
75163$as_echo "#define _LCONV_C99 1" >>confdefs.h
75164
75165      ;;
75166  esac
75167
75168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
75169$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
75170if ${gl_cv_header_locale_h_posix2001+:} false; then :
75171  $as_echo_n "(cached) " >&6
75172else
75173  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75174/* end confdefs.h.  */
75175#include <locale.h>
75176            int x = LC_MESSAGES;
75177            int y = sizeof (((struct lconv *) 0)->decimal_point);
75178int
75179main ()
75180{
75181
75182  ;
75183  return 0;
75184}
75185_ACEOF
75186if ac_fn_c_try_compile "$LINENO"; then :
75187  gl_cv_header_locale_h_posix2001=yes
75188else
75189  gl_cv_header_locale_h_posix2001=no
75190fi
75191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75192fi
75193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
75194$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
75195
75196          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
75197$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
75198if ${gl_cv_sys_struct_lconv_ok+:} false; then :
75199  $as_echo_n "(cached) " >&6
75200else
75201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75202/* end confdefs.h.  */
75203#include <locale.h>
75204            struct lconv l;
75205            int x = sizeof (l.decimal_point);
75206            int y = sizeof (l.int_p_cs_precedes);
75207int
75208main ()
75209{
75210
75211  ;
75212  return 0;
75213}
75214_ACEOF
75215if ac_fn_c_try_compile "$LINENO"; then :
75216  gl_cv_sys_struct_lconv_ok=yes
75217else
75218  gl_cv_sys_struct_lconv_ok=no
75219fi
75220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75221
75222fi
75223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
75224$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
75225  if test $gl_cv_sys_struct_lconv_ok = no; then
75226            case "$host_os" in
75227      mingw*)
75228        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75229/* end confdefs.h.  */
75230
75231#ifdef _MSC_VER
75232 Special
75233#endif
75234
75235_ACEOF
75236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
75237  $EGREP "Special" >/dev/null 2>&1; then :
75238
75239else
75240  REPLACE_STRUCT_LCONV=1
75241fi
75242rm -f conftest*
75243
75244        ;;
75245      *) REPLACE_STRUCT_LCONV=1 ;;
75246    esac
75247  fi
75248
75249
75250
75251
75252
75253
75254
75255
75256
75257     if test $gl_cv_have_include_next = yes; then
75258       gl_cv_next_locale_h='<'locale.h'>'
75259     else
75260       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
75261$as_echo_n "checking absolute name of <locale.h>... " >&6; }
75262if ${gl_cv_next_locale_h+:} false; then :
75263  $as_echo_n "(cached) " >&6
75264else
75265
75266
75267
75268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75269/* end confdefs.h.  */
75270#include <locale.h>
75271_ACEOF
75272                case "$host_os" in
75273    aix*) gl_absname_cpp="$ac_cpp -C" ;;
75274    *)    gl_absname_cpp="$ac_cpp" ;;
75275  esac
75276
75277  case "$host_os" in
75278    mingw*)
75279                                          gl_dirsep_regex='[/\\]'
75280      ;;
75281    *)
75282      gl_dirsep_regex='\/'
75283      ;;
75284  esac
75285      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
75286  gl_header_literal_regex=`echo 'locale.h' \
75287                           | sed -e "$gl_make_literal_regex_sed"`
75288  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
75289      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
75290      s|^/[^/]|//&|
75291      p
75292      q
75293    }'
75294
75295        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
75296  sed -n "$gl_absolute_header_sed"`
75297
75298           gl_header=$gl_cv_absolute_locale_h
75299           gl_cv_next_locale_h='"'$gl_header'"'
75300
75301
75302fi
75303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
75304$as_echo "$gl_cv_next_locale_h" >&6; }
75305     fi
75306     NEXT_LOCALE_H=$gl_cv_next_locale_h
75307
75308     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
75309       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
75310       gl_next_as_first_directive='<'locale.h'>'
75311     else
75312       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
75313       gl_next_as_first_directive=$gl_cv_next_locale_h
75314     fi
75315     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
75316
75317
75318
75319
75320
75321
75322
75323
75324
75325
75326
75327  if test "$gl_threads_api" = posix; then
75328    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
75329    # pthread_rwlock_* functions.
75330    has_rwlock=false
75331    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
75332"
75333if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
75334  has_rwlock=true
75335
75336$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
75337
75338fi
75339
75340    if $has_rwlock; then
75341
75342
75343     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
75344$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
75345if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
75346  $as_echo_n "(cached) " >&6
75347else
75348  save_LIBS="$LIBS"
75349     LIBS="$LIBS $LIBMULTITHREAD"
75350     if test "$cross_compiling" = yes; then :
75351  case "$host_os" in
75352                         # Guess no on glibc systems.
75353          *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
75354                         # Guess no on musl systems.
75355          *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
75356                         # Guess no on bionic systems.
75357          *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
75358                         # Guess yes on native Windows with the mingw-w64 winpthreads library.
75359                         # Guess no on native Windows with the gnulib windows-rwlock module.
75360          mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
75361                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
75362                         else
75363                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
75364                         fi
75365                         ;;
75366                         # If we don't know, obey --enable-cross-guesses.
75367          *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
75368         esac
75369
75370else
75371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75372/* end confdefs.h.  */
75373
75374#include <errno.h>
75375#include <pthread.h>
75376#include <stdlib.h>
75377#include <unistd.h>
75378
75379#define SUCCEED() exit (0)
75380#define FAILURE() exit (1)
75381#define UNEXPECTED(n) (exit (10 + (n)))
75382
75383/* The main thread creates the waiting writer and the requesting reader threads
75384   in the default way; this guarantees that they have the same priority.
75385   We can reuse the main thread as first reader thread.  */
75386
75387static pthread_rwlock_t lock;
75388static pthread_t reader1;
75389static pthread_t writer;
75390static pthread_t reader2;
75391static pthread_t timer;
75392/* Used to pass control from writer to reader2 and from reader2 to timer,
75393   as in a relay race.
75394   Passing control from one running thread to another running thread
75395   is most likely faster than to create the second thread.  */
75396static pthread_mutex_t baton;
75397
75398static void *
75399timer_func (void *ignored)
75400{
75401  /* Step 13 (can be before or after step 12):
75402     The timer thread takes the baton, then waits a moment to make sure
75403     it can tell whether the second reader thread is blocked at step 12.  */
75404  if (pthread_mutex_lock (&baton))
75405    UNEXPECTED (13);
75406  usleep (100000);
75407  /* By the time we get here, it's clear that the second reader thread is
75408     blocked at step 12.  This is the desired behaviour.  */
75409  SUCCEED ();
75410}
75411
75412static void *
75413reader2_func (void *ignored)
75414{
75415  int err;
75416
75417  /* Step 8 (can be before or after step 7):
75418     The second reader thread takes the baton, then waits a moment to make sure
75419     the writer thread has reached step 7.  */
75420  if (pthread_mutex_lock (&baton))
75421    UNEXPECTED (8);
75422  usleep (100000);
75423  /* Step 9: The second reader thread requests the lock.  */
75424  err = pthread_rwlock_tryrdlock (&lock);
75425  if (err == 0)
75426    FAILURE ();
75427  else if (err != EBUSY)
75428    UNEXPECTED (9);
75429  /* Step 10: Launch a timer, to test whether the next call blocks.  */
75430  if (pthread_create (&timer, NULL, timer_func, NULL))
75431    UNEXPECTED (10);
75432  /* Step 11: Release the baton.  */
75433  if (pthread_mutex_unlock (&baton))
75434    UNEXPECTED (11);
75435  /* Step 12: The second reader thread requests the lock.  */
75436  err = pthread_rwlock_rdlock (&lock);
75437  if (err == 0)
75438    FAILURE ();
75439  else
75440    UNEXPECTED (12);
75441}
75442
75443static void *
75444writer_func (void *ignored)
75445{
75446  /* Step 4: Take the baton, so that the second reader thread does not go ahead
75447     too early.  */
75448  if (pthread_mutex_lock (&baton))
75449    UNEXPECTED (4);
75450  /* Step 5: Create the second reader thread.  */
75451  if (pthread_create (&reader2, NULL, reader2_func, NULL))
75452    UNEXPECTED (5);
75453  /* Step 6: Release the baton.  */
75454  if (pthread_mutex_unlock (&baton))
75455    UNEXPECTED (6);
75456  /* Step 7: The writer thread requests the lock.  */
75457  if (pthread_rwlock_wrlock (&lock))
75458    UNEXPECTED (7);
75459  return NULL;
75460}
75461
75462int
75463main ()
75464{
75465  reader1 = pthread_self ();
75466
75467  /* Step 1: The main thread initializes the lock and the baton.  */
75468  if (pthread_rwlock_init (&lock, NULL))
75469    UNEXPECTED (1);
75470  if (pthread_mutex_init (&baton, NULL))
75471    UNEXPECTED (1);
75472  /* Step 2: The main thread acquires the lock as a reader.  */
75473  if (pthread_rwlock_rdlock (&lock))
75474    UNEXPECTED (2);
75475  /* Step 3: Create the writer thread.  */
75476  if (pthread_create (&writer, NULL, writer_func, NULL))
75477    UNEXPECTED (3);
75478  /* Job done.  Go to sleep.  */
75479  for (;;)
75480    {
75481      sleep (1);
75482    }
75483}
75484
75485_ACEOF
75486if ac_fn_c_try_run "$LINENO"; then :
75487  gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
75488else
75489  gl_cv_pthread_rwlock_rdlock_prefer_writer=no
75490fi
75491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
75492  conftest.$ac_objext conftest.beam conftest.$ac_ext
75493fi
75494
75495     LIBS="$save_LIBS"
75496
75497fi
75498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
75499$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
75500  case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
75501    *yes)
75502
75503$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
75504
75505      ;;
75506  esac
75507
75508    fi
75509    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
75510    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75511/* end confdefs.h.  */
75512
75513      #include <pthread.h>
75514int
75515main ()
75516{
75517
75518#if __FreeBSD__ == 4
75519error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
75520#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
75521       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
75522error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
75523#else
75524int x = (int)PTHREAD_MUTEX_RECURSIVE;
75525return !x;
75526#endif
75527
75528  ;
75529  return 0;
75530}
75531_ACEOF
75532if ac_fn_c_try_compile "$LINENO"; then :
75533
75534$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
75535
75536fi
75537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
75538  fi
75539  :
75540
75541
75542
75543cat >>confdefs.h <<_ACEOF
75544#define GNULIB_LOCK 1
75545_ACEOF
75546
75547
75548
75549
75550
75551  if test $gl_cv_func_malloc_posix = yes; then
75552
75553$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
75554
75555  else
75556    REPLACE_MALLOC=1
75557  fi
75558
75559  if test $REPLACE_MALLOC = 1; then
75560
75561
75562
75563
75564
75565
75566
75567
75568  gtpo_LIBOBJS="$gtpo_LIBOBJS malloc.$ac_objext"
75569
75570  fi
75571
75572
75573
75574
75575
75576          GNULIB_MALLOC_POSIX=1
75577
75578
75579
75580
75581
75582$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
75583
75584
75585
75586
75587
75588
75589
75590
75591
75592
75593
75594
75595
75596
75597
75598
75599
75600
75601
75602        if case "$host_os" in
75603       mingw*) true ;;
75604       *) test $ac_cv_func_mbsinit = yes ;;
75605     esac \
75606    && test $ac_cv_func_mbrtowc = yes; then
75607
75608
75609
75610
75611     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
75612$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
75613if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
75614  $as_echo_n "(cached) " >&6
75615else
75616
75617                  case "$host_os" in
75618                     # Guess no on AIX and OSF/1.
75619        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
75620                     # Guess yes otherwise.
75621        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
75622      esac
75623      if test $LOCALE_JA != none; then
75624        if test "$cross_compiling" = yes; then :
75625  :
75626else
75627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75628/* end confdefs.h.  */
75629
75630#include <locale.h>
75631#include <string.h>
75632/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
75633   <wchar.h>.
75634   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
75635   included before <wchar.h>.  */
75636#include <stddef.h>
75637#include <stdio.h>
75638#include <time.h>
75639#include <wchar.h>
75640int main ()
75641{
75642  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
75643    {
75644      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
75645      mbstate_t state;
75646      wchar_t wc;
75647
75648      memset (&state, '\0', sizeof (mbstate_t));
75649      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
75650        if (mbsinit (&state))
75651          return 2;
75652    }
75653  return 0;
75654}
75655_ACEOF
75656if ac_fn_c_try_run "$LINENO"; then :
75657  gl_cv_func_mbrtowc_incomplete_state=yes
75658else
75659  gl_cv_func_mbrtowc_incomplete_state=no
75660fi
75661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
75662  conftest.$ac_objext conftest.beam conftest.$ac_ext
75663fi
75664
75665      else
75666        if test $LOCALE_FR_UTF8 != none; then
75667          if test "$cross_compiling" = yes; then :
75668  :
75669else
75670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75671/* end confdefs.h.  */
75672
75673#include <locale.h>
75674#include <string.h>
75675/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
75676   <wchar.h>.
75677   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
75678   included before <wchar.h>.  */
75679#include <stddef.h>
75680#include <stdio.h>
75681#include <time.h>
75682#include <wchar.h>
75683int main ()
75684{
75685  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
75686    {
75687      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
75688      mbstate_t state;
75689      wchar_t wc;
75690
75691      memset (&state, '\0', sizeof (mbstate_t));
75692      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
75693        if (mbsinit (&state))
75694          return 2;
75695    }
75696  return 0;
75697}
75698_ACEOF
75699if ac_fn_c_try_run "$LINENO"; then :
75700  gl_cv_func_mbrtowc_incomplete_state=yes
75701else
75702  gl_cv_func_mbrtowc_incomplete_state=no
75703fi
75704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
75705  conftest.$ac_objext conftest.beam conftest.$ac_ext
75706fi
75707
75708        fi
75709      fi
75710
75711fi
75712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
75713$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
75714
75715
75716
75717
75718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
75719$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
75720if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
75721  $as_echo_n "(cached) " >&6
75722else
75723
75724                  case "$host_os" in
75725                    # Guess no on Solaris 8.
75726        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
75727                    # Guess yes otherwise.
75728        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
75729      esac
75730      if test $LOCALE_ZH_CN != none; then
75731        if test "$cross_compiling" = yes; then :
75732  :
75733else
75734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75735/* end confdefs.h.  */
75736
75737#include <locale.h>
75738#include <stdlib.h>
75739#include <string.h>
75740/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
75741   <wchar.h>.
75742   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
75743   included before <wchar.h>.  */
75744#include <stddef.h>
75745#include <stdio.h>
75746#include <time.h>
75747#include <wchar.h>
75748int main ()
75749{
75750  /* This fails on Solaris 8:
75751     mbrtowc returns 2, and sets wc to 0x00F0.
75752     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
75753  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
75754    {
75755      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
75756      mbstate_t state;
75757      wchar_t wc;
75758
75759      memset (&state, '\0', sizeof (mbstate_t));
75760      if (mbrtowc (&wc, input + 3, 6, &state) != 4
75761          && mbtowc (&wc, input + 3, 6) == 4)
75762        return 2;
75763    }
75764  return 0;
75765}
75766_ACEOF
75767if ac_fn_c_try_run "$LINENO"; then :
75768  gl_cv_func_mbrtowc_sanitycheck=yes
75769else
75770  gl_cv_func_mbrtowc_sanitycheck=no
75771fi
75772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
75773  conftest.$ac_objext conftest.beam conftest.$ac_ext
75774fi
75775
75776      fi
75777
75778fi
75779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
75780$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
75781
75782    REPLACE_MBSTATE_T=0
75783    case "$gl_cv_func_mbrtowc_incomplete_state" in
75784      *yes) ;;
75785      *) REPLACE_MBSTATE_T=1 ;;
75786    esac
75787    case "$gl_cv_func_mbrtowc_sanitycheck" in
75788      *yes) ;;
75789      *) REPLACE_MBSTATE_T=1 ;;
75790    esac
75791  else
75792    REPLACE_MBSTATE_T=1
75793  fi
75794
75795
75796
75797  if test $ac_cv_func_mbrtowc = no; then
75798    HAVE_MBRTOWC=0
75799    ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
75800/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
75801   <wchar.h>.
75802   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
75803   included before <wchar.h>.  */
75804#include <stddef.h>
75805#include <stdio.h>
75806#include <time.h>
75807#include <wchar.h>
75808
75809"
75810if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
75811  ac_have_decl=1
75812else
75813  ac_have_decl=0
75814fi
75815
75816cat >>confdefs.h <<_ACEOF
75817#define HAVE_DECL_MBRTOWC $ac_have_decl
75818_ACEOF
75819
75820    if test $ac_cv_have_decl_mbrtowc = yes; then
75821                        REPLACE_MBRTOWC=1
75822    fi
75823  else
75824    if test $REPLACE_MBSTATE_T = 1; then
75825      REPLACE_MBRTOWC=1
75826    else
75827
75828
75829
75830     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
75831$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
75832if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
75833  $as_echo_n "(cached) " >&6
75834else
75835
75836                  case "$host_os" in
75837                  # Guess no on Solaris.
75838        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
75839                  # Guess yes otherwise.
75840        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
75841      esac
75842      if test $LOCALE_FR_UTF8 != none; then
75843        if test "$cross_compiling" = yes; then :
75844  :
75845else
75846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75847/* end confdefs.h.  */
75848
75849#include <locale.h>
75850#include <stdlib.h>
75851#include <string.h>
75852/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
75853   <wchar.h>.
75854   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
75855   included before <wchar.h>.  */
75856#include <stddef.h>
75857#include <stdio.h>
75858#include <time.h>
75859#include <wchar.h>
75860int main ()
75861{
75862  int result = 0;
75863
75864  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
75865    {
75866      char input[] = "\303\237er";
75867      mbstate_t state;
75868      wchar_t wc;
75869      size_t ret;
75870
75871      memset (&state, '\0', sizeof (mbstate_t));
75872      wc = (wchar_t) 0xBADFACE;
75873      ret = mbrtowc (&wc, input, 5, &state);
75874      if (ret != 2)
75875        result |= 1;
75876      if (!mbsinit (&state))
75877        result |= 2;
75878
75879      memset (&state, '\0', sizeof (mbstate_t));
75880      ret = mbrtowc (NULL, input, 5, &state);
75881      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
75882        result |= 4;
75883      if (!mbsinit (&state))
75884        result |= 8;
75885    }
75886  return result;
75887}
75888_ACEOF
75889if ac_fn_c_try_run "$LINENO"; then :
75890  gl_cv_func_mbrtowc_null_arg1=yes
75891else
75892  gl_cv_func_mbrtowc_null_arg1=no
75893fi
75894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
75895  conftest.$ac_objext conftest.beam conftest.$ac_ext
75896fi
75897
75898      fi
75899
75900fi
75901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
75902$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
75903
75904
75905
75906
75907     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
75908$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
75909if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
75910  $as_echo_n "(cached) " >&6
75911else
75912
75913                  case "$host_os" in
75914              # Guess no on OSF/1.
75915        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
75916              # Guess yes otherwise.
75917        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
75918      esac
75919      if test $LOCALE_FR_UTF8 != none; then
75920        if test "$cross_compiling" = yes; then :
75921  :
75922else
75923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75924/* end confdefs.h.  */
75925
75926#include <locale.h>
75927#include <string.h>
75928/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
75929   <wchar.h>.
75930   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
75931   included before <wchar.h>.  */
75932#include <stddef.h>
75933#include <stdio.h>
75934#include <time.h>
75935#include <wchar.h>
75936int main ()
75937{
75938  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
75939    {
75940      mbstate_t state;
75941      wchar_t wc;
75942      int ret;
75943
75944      memset (&state, '\0', sizeof (mbstate_t));
75945      wc = (wchar_t) 0xBADFACE;
75946      mbrtowc (&wc, NULL, 5, &state);
75947      /* Check that wc was not modified.  */
75948      if (wc != (wchar_t) 0xBADFACE)
75949        return 2;
75950    }
75951  return 0;
75952}
75953_ACEOF
75954if ac_fn_c_try_run "$LINENO"; then :
75955  gl_cv_func_mbrtowc_null_arg2=yes
75956else
75957  gl_cv_func_mbrtowc_null_arg2=no
75958fi
75959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
75960  conftest.$ac_objext conftest.beam conftest.$ac_ext
75961fi
75962
75963      fi
75964
75965fi
75966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
75967$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
75968
75969
75970
75971
75972
75973
75974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
75975$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
75976if ${gl_cv_func_mbrtowc_retval+:} false; then :
75977  $as_echo_n "(cached) " >&6
75978else
75979
75980                  case "$host_os" in
75981                                   # Guess no on HP-UX, Solaris, native Windows.
75982        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
75983                                   # Guess yes otherwise.
75984        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
75985      esac
75986      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
75987         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
75988        if test "$cross_compiling" = yes; then :
75989  :
75990else
75991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75992/* end confdefs.h.  */
75993
75994#include <locale.h>
75995#include <string.h>
75996/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
75997   <wchar.h>.
75998   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
75999   included before <wchar.h>.  */
76000#include <stddef.h>
76001#include <stdio.h>
76002#include <time.h>
76003#include <wchar.h>
76004int main ()
76005{
76006  int result = 0;
76007  int found_some_locale = 0;
76008  /* This fails on Solaris.  */
76009  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
76010    {
76011      char input[] = "B\303\274\303\237er"; /* "Büßer" */
76012      mbstate_t state;
76013      wchar_t wc;
76014
76015      memset (&state, '\0', sizeof (mbstate_t));
76016      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
76017        {
76018          input[1] = '\0';
76019          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
76020            result |= 1;
76021        }
76022      found_some_locale = 1;
76023    }
76024  /* This fails on HP-UX 11.11.  */
76025  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
76026    {
76027      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
76028      mbstate_t state;
76029      wchar_t wc;
76030
76031      memset (&state, '\0', sizeof (mbstate_t));
76032      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
76033        {
76034          input[1] = '\0';
76035          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
76036            result |= 2;
76037        }
76038      found_some_locale = 1;
76039    }
76040  /* This fails on native Windows.  */
76041  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
76042    {
76043      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
76044      mbstate_t state;
76045      wchar_t wc;
76046
76047      memset (&state, '\0', sizeof (mbstate_t));
76048      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
76049        {
76050          input[3] = '\0';
76051          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
76052            result |= 4;
76053        }
76054      found_some_locale = 1;
76055    }
76056  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
76057    {
76058      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
76059      mbstate_t state;
76060      wchar_t wc;
76061
76062      memset (&state, '\0', sizeof (mbstate_t));
76063      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
76064        {
76065          input[3] = '\0';
76066          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
76067            result |= 8;
76068        }
76069      found_some_locale = 1;
76070    }
76071  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
76072    {
76073      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
76074      mbstate_t state;
76075      wchar_t wc;
76076
76077      memset (&state, '\0', sizeof (mbstate_t));
76078      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
76079        {
76080          input[3] = '\0';
76081          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
76082            result |= 16;
76083        }
76084      found_some_locale = 1;
76085    }
76086  return (found_some_locale ? result : 77);
76087}
76088_ACEOF
76089if ac_fn_c_try_run "$LINENO"; then :
76090  gl_cv_func_mbrtowc_retval=yes
76091else
76092  if test $? != 77; then
76093             gl_cv_func_mbrtowc_retval=no
76094           fi
76095
76096fi
76097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
76098  conftest.$ac_objext conftest.beam conftest.$ac_ext
76099fi
76100
76101      fi
76102
76103fi
76104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
76105$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
76106
76107
76108
76109
76110     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
76111$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
76112if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
76113  $as_echo_n "(cached) " >&6
76114else
76115
76116                  case "$host_os" in
76117                       # Guess no on Solaris 8 and 9.
76118        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
76119                       # Guess yes otherwise.
76120        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
76121      esac
76122      if test $LOCALE_ZH_CN != none; then
76123        if test "$cross_compiling" = yes; then :
76124  :
76125else
76126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76127/* end confdefs.h.  */
76128
76129#include <locale.h>
76130#include <string.h>
76131/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
76132   <wchar.h>.
76133   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
76134   included before <wchar.h>.  */
76135#include <stddef.h>
76136#include <stdio.h>
76137#include <time.h>
76138#include <wchar.h>
76139int main ()
76140{
76141  /* This fails on Solaris 8 and 9.  */
76142  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
76143    {
76144      mbstate_t state;
76145      wchar_t wc;
76146
76147      memset (&state, '\0', sizeof (mbstate_t));
76148      if (mbrtowc (&wc, "", 1, &state) != 0)
76149        return 2;
76150    }
76151  return 0;
76152}
76153_ACEOF
76154if ac_fn_c_try_run "$LINENO"; then :
76155  gl_cv_func_mbrtowc_nul_retval=yes
76156else
76157  gl_cv_func_mbrtowc_nul_retval=no
76158fi
76159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
76160  conftest.$ac_objext conftest.beam conftest.$ac_ext
76161fi
76162
76163      fi
76164
76165fi
76166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
76167$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
76168
76169
76170
76171     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
76172$as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
76173if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
76174  $as_echo_n "(cached) " >&6
76175else
76176
76177               case "$host_os" in
76178               # Guess yes on native Windows.
76179       mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
76180       *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
76181     esac
76182     case "$host_os" in
76183       mingw*)
76184         if test "$cross_compiling" = yes; then :
76185  :
76186else
76187  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76188/* end confdefs.h.  */
76189
76190#include <locale.h>
76191#include <string.h>
76192/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
76193   <wchar.h>.
76194   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
76195   included before <wchar.h>.  */
76196#include <stddef.h>
76197#include <stdio.h>
76198#include <time.h>
76199#include <wchar.h>
76200int main ()
76201{
76202  int result = 0;
76203  if (setlocale (LC_ALL, "French_France.65001") != NULL)
76204    {
76205      wchar_t wc = (wchar_t) 0xBADFACE;
76206      mbstate_t state;
76207
76208      memset (&state, '\0', sizeof (mbstate_t));
76209      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
76210          && wc != (wchar_t) 0xBADFACE)
76211        result |= 1;
76212    }
76213  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
76214    {
76215      wchar_t wc = (wchar_t) 0xBADFACE;
76216      mbstate_t state;
76217
76218      memset (&state, '\0', sizeof (mbstate_t));
76219      if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
76220          && wc != (wchar_t) 0xBADFACE)
76221        result |= 2;
76222    }
76223  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
76224    {
76225      wchar_t wc = (wchar_t) 0xBADFACE;
76226      mbstate_t state;
76227
76228      memset (&state, '\0', sizeof (mbstate_t));
76229      if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
76230          && wc != (wchar_t) 0xBADFACE)
76231        result |= 4;
76232    }
76233  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
76234    {
76235      wchar_t wc = (wchar_t) 0xBADFACE;
76236      mbstate_t state;
76237
76238      memset (&state, '\0', sizeof (mbstate_t));
76239      if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
76240          && wc != (wchar_t) 0xBADFACE)
76241        result |= 8;
76242    }
76243  return result;
76244}
76245_ACEOF
76246if ac_fn_c_try_run "$LINENO"; then :
76247  gl_cv_func_mbrtowc_stores_incomplete=no
76248else
76249  gl_cv_func_mbrtowc_stores_incomplete=yes
76250fi
76251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
76252  conftest.$ac_objext conftest.beam conftest.$ac_ext
76253fi
76254
76255         ;;
76256       *)
76257
76258         if test $LOCALE_FR_UTF8 != none; then
76259           if test "$cross_compiling" = yes; then :
76260  :
76261else
76262  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76263/* end confdefs.h.  */
76264
76265#include <locale.h>
76266#include <string.h>
76267/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
76268   <wchar.h>.
76269   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
76270   included before <wchar.h>.  */
76271#include <stddef.h>
76272#include <stdio.h>
76273#include <time.h>
76274#include <wchar.h>
76275int main ()
76276{
76277  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
76278    {
76279      wchar_t wc = (wchar_t) 0xBADFACE;
76280      mbstate_t state;
76281
76282      memset (&state, '\0', sizeof (mbstate_t));
76283      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
76284          && wc != (wchar_t) 0xBADFACE)
76285        return 1;
76286    }
76287  return 0;
76288}
76289_ACEOF
76290if ac_fn_c_try_run "$LINENO"; then :
76291  gl_cv_func_mbrtowc_stores_incomplete=no
76292else
76293  gl_cv_func_mbrtowc_stores_incomplete=yes
76294fi
76295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
76296  conftest.$ac_objext conftest.beam conftest.$ac_ext
76297fi
76298
76299         fi
76300         ;;
76301     esac
76302
76303fi
76304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
76305$as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
76306
76307
76308
76309     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
76310$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
76311if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
76312  $as_echo_n "(cached) " >&6
76313else
76314
76315                  case "$host_os" in
76316                              # Guess no on AIX and glibc systems.
76317        aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
76318                              # Guess yes on native Windows.
76319        mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
76320        *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
76321      esac
76322      if test "$cross_compiling" = yes; then :
76323  :
76324else
76325  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76326/* end confdefs.h.  */
76327
76328           #include <wchar.h>
76329           static wchar_t wc;
76330           static mbstate_t mbs;
76331           int
76332           main (void)
76333           {
76334             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
76335           }
76336_ACEOF
76337if ac_fn_c_try_run "$LINENO"; then :
76338  gl_cv_func_mbrtowc_empty_input=yes
76339else
76340  gl_cv_func_mbrtowc_empty_input=no
76341fi
76342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
76343  conftest.$ac_objext conftest.beam conftest.$ac_ext
76344fi
76345
76346
76347fi
76348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
76349$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
76350
76351
76352     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
76353$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
76354if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
76355  $as_echo_n "(cached) " >&6
76356else
76357
76358               gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
76359
76360     if test "$cross_compiling" = yes; then :
76361  case "$host_os" in
76362                 # Guess yes on native Windows.
76363         mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
76364       esac
76365
76366else
76367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76368/* end confdefs.h.  */
76369#include <limits.h>
76370            #include <locale.h>
76371            #include <wchar.h>
76372
76373int
76374main ()
76375{
76376
76377            int i;
76378            char *locale = setlocale (LC_ALL, "C");
76379            if (! locale)
76380              return 2;
76381            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
76382              {
76383                char c = i;
76384                wchar_t wc;
76385                mbstate_t mbs = { 0, };
76386                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
76387                if (1 < ss)
76388                  return 3;
76389              }
76390            return 0;
76391
76392  ;
76393  return 0;
76394}
76395_ACEOF
76396if ac_fn_c_try_run "$LINENO"; then :
76397  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
76398else
76399  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
76400fi
76401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
76402  conftest.$ac_objext conftest.beam conftest.$ac_ext
76403fi
76404
76405
76406fi
76407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
76408$as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
76409
76410      case "$gl_cv_func_mbrtowc_null_arg1" in
76411        *yes) ;;
76412        *)
76413$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
76414
76415           REPLACE_MBRTOWC=1
76416           ;;
76417      esac
76418      case "$gl_cv_func_mbrtowc_null_arg2" in
76419        *yes) ;;
76420        *)
76421$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
76422
76423           REPLACE_MBRTOWC=1
76424           ;;
76425      esac
76426      case "$gl_cv_func_mbrtowc_retval" in
76427        *yes) ;;
76428        *)
76429$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
76430
76431           REPLACE_MBRTOWC=1
76432           ;;
76433      esac
76434      case "$gl_cv_func_mbrtowc_nul_retval" in
76435        *yes) ;;
76436        *)
76437$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
76438
76439           REPLACE_MBRTOWC=1
76440           ;;
76441      esac
76442      case "$gl_cv_func_mbrtowc_stores_incomplete" in
76443        *no) ;;
76444        *)
76445$as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
76446
76447           REPLACE_MBRTOWC=1
76448           ;;
76449      esac
76450      case "$gl_cv_func_mbrtowc_empty_input" in
76451        *yes) ;;
76452        *)
76453$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
76454
76455           REPLACE_MBRTOWC=1
76456           ;;
76457      esac
76458      case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
76459        *yes) ;;
76460        *)
76461$as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
76462
76463           REPLACE_MBRTOWC=1
76464           ;;
76465      esac
76466    fi
76467  fi
76468  if test $REPLACE_MBSTATE_T = 1; then
76469    case "$host_os" in
76470      mingw*) LIB_MBRTOWC= ;;
76471      *)
76472
76473
76474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
76475$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
76476if ${gl_cv_have_weak+:} false; then :
76477  $as_echo_n "(cached) " >&6
76478else
76479  gl_cv_have_weak=no
76480          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76481/* end confdefs.h.  */
76482extern void xyzzy ();
76483#pragma weak xyzzy
76484int
76485main ()
76486{
76487xyzzy();
76488  ;
76489  return 0;
76490}
76491_ACEOF
76492if ac_fn_c_try_link "$LINENO"; then :
76493  gl_cv_have_weak=maybe
76494fi
76495rm -f core conftest.err conftest.$ac_objext \
76496    conftest$ac_exeext conftest.$ac_ext
76497     if test $gl_cv_have_weak = maybe; then
76498                     if test "$cross_compiling" = yes; then :
76499                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76500/* end confdefs.h.  */
76501#ifdef __ELF__
76502             Extensible Linking Format
76503             #endif
76504
76505_ACEOF
76506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
76507  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
76508  gl_cv_have_weak="guessing yes"
76509else
76510  gl_cv_have_weak="guessing no"
76511fi
76512rm -f conftest*
76513
76514
76515else
76516  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76517/* end confdefs.h.  */
76518
76519#include <stdio.h>
76520#pragma weak fputs
76521int main ()
76522{
76523  return (fputs == NULL);
76524}
76525_ACEOF
76526if ac_fn_c_try_run "$LINENO"; then :
76527  gl_cv_have_weak=yes
76528else
76529  gl_cv_have_weak=no
76530fi
76531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
76532  conftest.$ac_objext conftest.beam conftest.$ac_ext
76533fi
76534
76535     fi
76536          case " $LDFLAGS " in
76537       *" -static "*) gl_cv_have_weak=no ;;
76538     esac
76539                    case "$gl_cv_have_weak" in
76540       *yes)
76541         case "$host_os" in
76542           freebsd* | dragonfly*)
76543             : > conftest1.c
76544             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
76545             cat <<EOF > conftest2.c
76546#include <pthread.h>
76547#pragma weak pthread_mutexattr_gettype
76548int main ()
76549{
76550  return (pthread_mutexattr_gettype != NULL);
76551}
76552EOF
76553             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
76554               || gl_cv_have_weak=no
76555             rm -f conftest1.c libempty.so conftest2.c conftest
76556             ;;
76557         esac
76558         ;;
76559     esac
76560
76561fi
76562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
76563$as_echo "$gl_cv_have_weak" >&6; }
76564  case "$gl_cv_have_weak" in
76565    *yes)
76566
76567$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
76568
76569      ;;
76570  esac
76571
76572        case "$gl_cv_have_weak" in
76573          *yes) LIB_MBRTOWC= ;;
76574          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
76575        esac
76576        ;;
76577    esac
76578  else
76579    LIB_MBRTOWC=
76580  fi
76581
76582
76583  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
76584
76585
76586
76587
76588
76589
76590
76591
76592  gtpo_LIBOBJS="$gtpo_LIBOBJS mbrtowc.$ac_objext"
76593
76594    if test $REPLACE_MBSTATE_T = 1; then
76595
76596
76597
76598
76599
76600
76601
76602
76603  gtpo_LIBOBJS="$gtpo_LIBOBJS lc-charset-dispatch.$ac_objext"
76604
76605
76606
76607
76608
76609
76610
76611
76612
76613  gtpo_LIBOBJS="$gtpo_LIBOBJS mbtowc-lock.$ac_objext"
76614
76615
76616
76617
76618  CFLAG_VISIBILITY=
76619  HAVE_VISIBILITY=0
76620  if test -n "$GCC"; then
76621                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
76622$as_echo_n "checking whether the -Werror option is usable... " >&6; }
76623if ${gl_cv_cc_vis_werror+:} false; then :
76624  $as_echo_n "(cached) " >&6
76625else
76626  gl_save_CFLAGS="$CFLAGS"
76627       CFLAGS="$CFLAGS -Werror"
76628       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76629/* end confdefs.h.  */
76630
76631int
76632main ()
76633{
76634
76635  ;
76636  return 0;
76637}
76638_ACEOF
76639if ac_fn_c_try_compile "$LINENO"; then :
76640  gl_cv_cc_vis_werror=yes
76641else
76642  gl_cv_cc_vis_werror=no
76643fi
76644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
76645       CFLAGS="$gl_save_CFLAGS"
76646
76647fi
76648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
76649$as_echo "$gl_cv_cc_vis_werror" >&6; }
76650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
76651$as_echo_n "checking for simple visibility declarations... " >&6; }
76652if ${gl_cv_cc_visibility+:} false; then :
76653  $as_echo_n "(cached) " >&6
76654else
76655  gl_save_CFLAGS="$CFLAGS"
76656       CFLAGS="$CFLAGS -fvisibility=hidden"
76657                                          if test $gl_cv_cc_vis_werror = yes; then
76658         CFLAGS="$CFLAGS -Werror"
76659       fi
76660       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76661/* end confdefs.h.  */
76662extern __attribute__((__visibility__("hidden"))) int hiddenvar;
76663              extern __attribute__((__visibility__("default"))) int exportedvar;
76664              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
76665              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
76666              void dummyfunc (void) {}
76667
76668int
76669main ()
76670{
76671
76672  ;
76673  return 0;
76674}
76675_ACEOF
76676if ac_fn_c_try_compile "$LINENO"; then :
76677  gl_cv_cc_visibility=yes
76678else
76679  gl_cv_cc_visibility=no
76680fi
76681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
76682       CFLAGS="$gl_save_CFLAGS"
76683
76684fi
76685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
76686$as_echo "$gl_cv_cc_visibility" >&6; }
76687    if test $gl_cv_cc_visibility = yes; then
76688      CFLAG_VISIBILITY="-fvisibility=hidden"
76689      HAVE_VISIBILITY=1
76690    fi
76691  fi
76692
76693
76694
76695cat >>confdefs.h <<_ACEOF
76696#define HAVE_VISIBILITY $HAVE_VISIBILITY
76697_ACEOF
76698
76699
76700
76701    fi
76702
76703
76704  :
76705
76706  fi
76707
76708
76709
76710
76711
76712          GNULIB_MBRTOWC=1
76713
76714
76715
76716
76717
76718$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
76719
76720
76721
76722
76723
76724
76725
76726
76727
76728
76729
76730
76731
76732
76733
76734        if case "$host_os" in
76735       mingw*) true ;;
76736       *) test $ac_cv_func_mbsinit = yes ;;
76737     esac \
76738    && test $ac_cv_func_mbrtowc = yes; then
76739
76740
76741
76742
76743     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
76744$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
76745if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
76746  $as_echo_n "(cached) " >&6
76747else
76748
76749                  case "$host_os" in
76750                     # Guess no on AIX and OSF/1.
76751        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
76752                     # Guess yes otherwise.
76753        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
76754      esac
76755      if test $LOCALE_JA != none; then
76756        if test "$cross_compiling" = yes; then :
76757  :
76758else
76759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76760/* end confdefs.h.  */
76761
76762#include <locale.h>
76763#include <string.h>
76764/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
76765   <wchar.h>.
76766   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
76767   included before <wchar.h>.  */
76768#include <stddef.h>
76769#include <stdio.h>
76770#include <time.h>
76771#include <wchar.h>
76772int main ()
76773{
76774  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
76775    {
76776      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
76777      mbstate_t state;
76778      wchar_t wc;
76779
76780      memset (&state, '\0', sizeof (mbstate_t));
76781      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
76782        if (mbsinit (&state))
76783          return 2;
76784    }
76785  return 0;
76786}
76787_ACEOF
76788if ac_fn_c_try_run "$LINENO"; then :
76789  gl_cv_func_mbrtowc_incomplete_state=yes
76790else
76791  gl_cv_func_mbrtowc_incomplete_state=no
76792fi
76793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
76794  conftest.$ac_objext conftest.beam conftest.$ac_ext
76795fi
76796
76797      else
76798        if test $LOCALE_FR_UTF8 != none; then
76799          if test "$cross_compiling" = yes; then :
76800  :
76801else
76802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76803/* end confdefs.h.  */
76804
76805#include <locale.h>
76806#include <string.h>
76807/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
76808   <wchar.h>.
76809   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
76810   included before <wchar.h>.  */
76811#include <stddef.h>
76812#include <stdio.h>
76813#include <time.h>
76814#include <wchar.h>
76815int main ()
76816{
76817  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
76818    {
76819      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
76820      mbstate_t state;
76821      wchar_t wc;
76822
76823      memset (&state, '\0', sizeof (mbstate_t));
76824      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
76825        if (mbsinit (&state))
76826          return 2;
76827    }
76828  return 0;
76829}
76830_ACEOF
76831if ac_fn_c_try_run "$LINENO"; then :
76832  gl_cv_func_mbrtowc_incomplete_state=yes
76833else
76834  gl_cv_func_mbrtowc_incomplete_state=no
76835fi
76836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
76837  conftest.$ac_objext conftest.beam conftest.$ac_ext
76838fi
76839
76840        fi
76841      fi
76842
76843fi
76844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
76845$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
76846
76847
76848
76849
76850     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
76851$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
76852if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
76853  $as_echo_n "(cached) " >&6
76854else
76855
76856                  case "$host_os" in
76857                    # Guess no on Solaris 8.
76858        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
76859                    # Guess yes otherwise.
76860        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
76861      esac
76862      if test $LOCALE_ZH_CN != none; then
76863        if test "$cross_compiling" = yes; then :
76864  :
76865else
76866  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76867/* end confdefs.h.  */
76868
76869#include <locale.h>
76870#include <stdlib.h>
76871#include <string.h>
76872/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
76873   <wchar.h>.
76874   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
76875   included before <wchar.h>.  */
76876#include <stddef.h>
76877#include <stdio.h>
76878#include <time.h>
76879#include <wchar.h>
76880int main ()
76881{
76882  /* This fails on Solaris 8:
76883     mbrtowc returns 2, and sets wc to 0x00F0.
76884     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
76885  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
76886    {
76887      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
76888      mbstate_t state;
76889      wchar_t wc;
76890
76891      memset (&state, '\0', sizeof (mbstate_t));
76892      if (mbrtowc (&wc, input + 3, 6, &state) != 4
76893          && mbtowc (&wc, input + 3, 6) == 4)
76894        return 2;
76895    }
76896  return 0;
76897}
76898_ACEOF
76899if ac_fn_c_try_run "$LINENO"; then :
76900  gl_cv_func_mbrtowc_sanitycheck=yes
76901else
76902  gl_cv_func_mbrtowc_sanitycheck=no
76903fi
76904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
76905  conftest.$ac_objext conftest.beam conftest.$ac_ext
76906fi
76907
76908      fi
76909
76910fi
76911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
76912$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
76913
76914    REPLACE_MBSTATE_T=0
76915    case "$gl_cv_func_mbrtowc_incomplete_state" in
76916      *yes) ;;
76917      *) REPLACE_MBSTATE_T=1 ;;
76918    esac
76919    case "$gl_cv_func_mbrtowc_sanitycheck" in
76920      *yes) ;;
76921      *) REPLACE_MBSTATE_T=1 ;;
76922    esac
76923  else
76924    REPLACE_MBSTATE_T=1
76925  fi
76926
76927
76928
76929  if test $ac_cv_func_mbsinit = no; then
76930    HAVE_MBSINIT=0
76931    ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
76932/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
76933   <wchar.h>.
76934   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
76935   included before <wchar.h>.  */
76936#include <stddef.h>
76937#include <stdio.h>
76938#include <time.h>
76939#include <wchar.h>
76940
76941"
76942if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
76943  ac_have_decl=1
76944else
76945  ac_have_decl=0
76946fi
76947
76948cat >>confdefs.h <<_ACEOF
76949#define HAVE_DECL_MBSINIT $ac_have_decl
76950_ACEOF
76951
76952    if test $ac_cv_have_decl_mbsinit = yes; then
76953                        REPLACE_MBSINIT=1
76954    fi
76955  else
76956    if test $REPLACE_MBSTATE_T = 1; then
76957      REPLACE_MBSINIT=1
76958    else
76959                        case "$host_os" in
76960        mingw*) REPLACE_MBSINIT=1 ;;
76961      esac
76962    fi
76963  fi
76964
76965  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
76966
76967
76968
76969
76970
76971
76972
76973
76974  gtpo_LIBOBJS="$gtpo_LIBOBJS mbsinit.$ac_objext"
76975
76976
76977  :
76978
76979  fi
76980
76981
76982
76983
76984
76985          GNULIB_MBSINIT=1
76986
76987
76988
76989
76990
76991$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
76992
76993
76994
76995
76996
76997
76998
76999      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbswidth is declared in <wchar.h>" >&5
77000$as_echo_n "checking whether mbswidth is declared in <wchar.h>... " >&6; }
77001if ${ac_cv_have_decl_mbswidth+:} false; then :
77002  $as_echo_n "(cached) " >&6
77003else
77004  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77005/* end confdefs.h.  */
77006
77007/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
77008   <wchar.h>.
77009   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
77010   before <wchar.h>.  */
77011#include <stddef.h>
77012#include <stdio.h>
77013#include <time.h>
77014#include <wchar.h>
77015
77016int
77017main ()
77018{
77019
77020  char *p = (char *) mbswidth;
77021  return !p;
77022
77023  ;
77024  return 0;
77025}
77026_ACEOF
77027if ac_fn_c_try_compile "$LINENO"; then :
77028  ac_cv_have_decl_mbswidth=yes
77029else
77030  ac_cv_have_decl_mbswidth=no
77031fi
77032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
77033fi
77034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_mbswidth" >&5
77035$as_echo "$ac_cv_have_decl_mbswidth" >&6; }
77036  if test $ac_cv_have_decl_mbswidth = yes; then
77037    ac_val=1
77038  else
77039    ac_val=0
77040  fi
77041
77042cat >>confdefs.h <<_ACEOF
77043#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H $ac_val
77044_ACEOF
77045
77046
77047
77048
77049   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
77050$as_echo_n "checking for mbstate_t... " >&6; }
77051if ${ac_cv_type_mbstate_t+:} false; then :
77052  $as_echo_n "(cached) " >&6
77053else
77054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77055/* end confdefs.h.  */
77056$ac_includes_default
77057/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
77058   <wchar.h>.
77059   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
77060   included before <wchar.h>.  */
77061#include <stddef.h>
77062#include <stdio.h>
77063#include <time.h>
77064#include <wchar.h>
77065int
77066main ()
77067{
77068mbstate_t x; return sizeof x;
77069  ;
77070  return 0;
77071}
77072_ACEOF
77073if ac_fn_c_try_compile "$LINENO"; then :
77074  ac_cv_type_mbstate_t=yes
77075else
77076  ac_cv_type_mbstate_t=no
77077fi
77078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
77079fi
77080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
77081$as_echo "$ac_cv_type_mbstate_t" >&6; }
77082   if test $ac_cv_type_mbstate_t = yes; then
77083
77084$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
77085
77086   else
77087
77088$as_echo "#define mbstate_t int" >>confdefs.h
77089
77090   fi
77091
77092
77093
77094  if test $REPLACE_MEMCHR = 1; then
77095
77096
77097
77098
77099
77100
77101
77102
77103  gtpo_LIBOBJS="$gtpo_LIBOBJS memchr.$ac_objext"
77104
77105
77106  for ac_header in bp-sym.h
77107do :
77108  ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
77109if test "x$ac_cv_header_bp_sym_h" = xyes; then :
77110  cat >>confdefs.h <<_ACEOF
77111#define HAVE_BP_SYM_H 1
77112_ACEOF
77113
77114fi
77115
77116done
77117
77118
77119  fi
77120
77121
77122
77123
77124
77125          GNULIB_MEMCHR=1
77126
77127
77128
77129
77130
77131$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
77132
77133
77134
77135
77136
77137
77138
77139  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
77140
77141
77142
77143
77144
77145
77146
77147
77148  gtpo_LIBOBJS="$gtpo_LIBOBJS msvc-inval.$ac_objext"
77149
77150  fi
77151
77152  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
77153
77154
77155
77156
77157
77158
77159
77160
77161  gtpo_LIBOBJS="$gtpo_LIBOBJS msvc-nothrow.$ac_objext"
77162
77163  fi
77164
77165
77166cat >>confdefs.h <<_ACEOF
77167#define GNULIB_MSVC_NOTHROW 1
77168_ACEOF
77169
77170
77171
77172
77173
77174
77175
77176
77177
77178
77179
77180
77181
77182
77183
77184   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
77185$as_echo_n "checking for obstacks that work with any size object... " >&6; }
77186if ${ac_cv_func_obstack+:} false; then :
77187  $as_echo_n "(cached) " >&6
77188else
77189  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77190/* end confdefs.h.  */
77191#include "obstack.h"
77192             void *obstack_chunk_alloc (size_t n) { return 0; }
77193             void obstack_chunk_free (void *p) { }
77194             /* Check that an internal function returns size_t, not int.  */
77195             size_t _obstack_memory_used (struct obstack *);
77196
77197int
77198main ()
77199{
77200struct obstack mem;
77201             obstack_init (&mem);
77202             obstack_free (&mem, 0);
77203
77204  ;
77205  return 0;
77206}
77207_ACEOF
77208if ac_fn_c_try_link "$LINENO"; then :
77209  ac_cv_func_obstack=yes
77210else
77211  ac_cv_func_obstack=no
77212fi
77213rm -f core conftest.err conftest.$ac_objext \
77214    conftest$ac_exeext conftest.$ac_ext
77215fi
77216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
77217$as_echo "$ac_cv_func_obstack" >&6; }
77218   if test "$ac_cv_func_obstack" = yes; then
77219
77220$as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
77221
77222   else
77223
77224
77225
77226
77227
77228
77229
77230
77231  gtpo_LIBOBJS="$gtpo_LIBOBJS obstack.$ac_objext"
77232
77233   fi
77234
77235
77236
77237
77238  case "$host_os" in
77239    mingw* | pw*)
77240      REPLACE_OPEN=1
77241      ;;
77242    *)
77243
77244      if test "$gl_cv_macro_O_CLOEXEC" != yes; then
77245        REPLACE_OPEN=1
77246      fi
77247
77248
77249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
77250$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
77251if ${gl_cv_func_open_slash+:} false; then :
77252  $as_echo_n "(cached) " >&6
77253else
77254  # Assume that if we have lstat, we can also check symlinks.
77255     if test $ac_cv_func_lstat = yes; then
77256       touch conftest.tmp
77257       ln -s conftest.tmp conftest.lnk
77258     fi
77259     if test "$cross_compiling" = yes; then :
77260
77261        case "$host_os" in
77262dragonfly* |           freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
77263            gl_cv_func_open_slash="guessing no" ;;
77264          *)
77265            gl_cv_func_open_slash="guessing yes" ;;
77266        esac
77267
77268else
77269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77270/* end confdefs.h.  */
77271
77272#include <fcntl.h>
77273#if HAVE_UNISTD_H
77274# include <unistd.h>
77275#endif
77276int main ()
77277{
77278  int result = 0;
77279#if HAVE_LSTAT
77280  if (open ("conftest.lnk/", O_RDONLY) != -1)
77281    result |= 1;
77282#endif
77283  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
77284    result |= 2;
77285  return result;
77286}
77287_ACEOF
77288if ac_fn_c_try_run "$LINENO"; then :
77289  gl_cv_func_open_slash=yes
77290else
77291  gl_cv_func_open_slash=no
77292fi
77293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
77294  conftest.$ac_objext conftest.beam conftest.$ac_ext
77295fi
77296
77297     rm -f conftest.sl conftest.tmp conftest.lnk
77298
77299fi
77300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
77301$as_echo "$gl_cv_func_open_slash" >&6; }
77302  case "$gl_cv_func_open_slash" in
77303    *no)
77304
77305$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
77306
77307      ;;
77308  esac
77309
77310      case "$gl_cv_func_open_slash" in
77311        *no)
77312          REPLACE_OPEN=1
77313          ;;
77314      esac
77315      ;;
77316  esac
77317
77318
77319
77320  if test $REPLACE_OPEN = 1; then
77321
77322
77323
77324
77325
77326
77327
77328
77329  gtpo_LIBOBJS="$gtpo_LIBOBJS open.$ac_objext"
77330
77331
77332
77333  :
77334
77335  fi
77336
77337
77338
77339
77340
77341          GNULIB_OPEN=1
77342
77343
77344
77345
77346
77347$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
77348
77349
77350
77351
77352
77353
77354
77355
77356
77357  for ac_func in raise
77358do :
77359  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
77360if test "x$ac_cv_func_raise" = xyes; then :
77361  cat >>confdefs.h <<_ACEOF
77362#define HAVE_RAISE 1
77363_ACEOF
77364
77365fi
77366done
77367
77368  if test $ac_cv_func_raise = no; then
77369    HAVE_RAISE=0
77370  else
77371
77372
77373      if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
77374        REPLACE_RAISE=1
77375      fi
77376
77377
77378
77379
77380
77381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigprocmask" >&5
77382$as_echo_n "checking for sigprocmask... " >&6; }
77383if ${gl_cv_func_sigprocmask+:} false; then :
77384  $as_echo_n "(cached) " >&6
77385else
77386  if test $gl_cv_type_sigset_t = yes; then
77387
77388  {
77389
77390         ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
77391if test "x$ac_cv_func_sigprocmask" = xyes; then :
77392  gl_cv_func_sigprocmask=yes
77393else
77394  gl_cv_func_sigprocmask=no
77395fi
77396
77397
77398  } 6>/dev/null
77399
77400     else
77401       gl_cv_func_sigprocmask=no
77402     fi
77403
77404fi
77405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sigprocmask" >&5
77406$as_echo "$gl_cv_func_sigprocmask" >&6; }
77407  if test $gl_cv_func_sigprocmask != yes; then
77408    HAVE_POSIX_SIGNALBLOCKING=0
77409  fi
77410
77411      if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
77412
77413
77414
77415
77416          if test $gl_cv_header_signal_h_SIGPIPE != yes; then
77417            REPLACE_RAISE=1
77418          fi
77419
77420      fi
77421
77422  fi
77423
77424  if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
77425
77426
77427
77428
77429
77430
77431
77432
77433  gtpo_LIBOBJS="$gtpo_LIBOBJS raise.$ac_objext"
77434
77435    :
77436  fi
77437
77438
77439
77440
77441
77442          GNULIB_RAISE=1
77443
77444
77445
77446
77447
77448$as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
77449
77450
77451
77452
77453
77454
77455
77456  for ac_func in rawmemchr
77457do :
77458  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
77459if test "x$ac_cv_func_rawmemchr" = xyes; then :
77460  cat >>confdefs.h <<_ACEOF
77461#define HAVE_RAWMEMCHR 1
77462_ACEOF
77463
77464fi
77465done
77466
77467  if test $ac_cv_func_rawmemchr = no; then
77468    HAVE_RAWMEMCHR=0
77469  fi
77470
77471  if test $HAVE_RAWMEMCHR = 0; then
77472
77473
77474
77475
77476
77477
77478
77479
77480  gtpo_LIBOBJS="$gtpo_LIBOBJS rawmemchr.$ac_objext"
77481
77482    :
77483  fi
77484
77485
77486
77487
77488
77489          GNULIB_RAWMEMCHR=1
77490
77491
77492
77493
77494
77495$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
77496
77497
77498
77499
77500
77501
77502  if test $gl_cv_func_malloc_posix = yes; then
77503
77504$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
77505
77506  else
77507    REPLACE_REALLOC=1
77508  fi
77509
77510  if test $REPLACE_REALLOC = 1; then
77511
77512
77513
77514
77515
77516
77517
77518
77519  gtpo_LIBOBJS="$gtpo_LIBOBJS realloc.$ac_objext"
77520
77521  fi
77522
77523
77524
77525
77526
77527          GNULIB_REALLOC_POSIX=1
77528
77529
77530
77531
77532
77533$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
77534
77535
77536
77537
77538
77539
77540  if test $RELOCATABLE = yes; then
77541
77542
77543
77544
77545
77546
77547
77548
77549  gtpo_LIBOBJS="$gtpo_LIBOBJS relocatable.$ac_objext"
77550
77551  fi
77552
77553
77554
77555
77556
77557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
77558$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
77559if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
77560  $as_echo_n "(cached) " >&6
77561else
77562  case "$host_os" in
77563       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
77564       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
77565         gl_cv_func_setlocale_null_all_mtsafe=no ;;
77566       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
77567       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
77568         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
77569       # If we don't know, obey --enable-cross-guesses.
77570       *)
77571         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
77572     esac
77573
77574fi
77575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
77576$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
77577    case "$host_os" in
77578    mingw*) ;;
77579    *)
77580      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
77581        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
77582      fi
77583      ;;
77584  esac
77585  case "$gl_cv_func_setlocale_null_all_mtsafe" in
77586    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
77587    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
77588  esac
77589
77590cat >>confdefs.h <<_ACEOF
77591#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
77592_ACEOF
77593
77594
77595    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
77596$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
77597if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
77598  $as_echo_n "(cached) " >&6
77599else
77600  case "$host_os" in
77601       # Guess no on OpenBSD, AIX.
77602       openbsd* | aix*)
77603         gl_cv_func_setlocale_null_one_mtsafe=no ;;
77604       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
77605       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
77606         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
77607       # If we don't know, obey --enable-cross-guesses.
77608       *)
77609         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
77610     esac
77611
77612fi
77613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
77614$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
77615    case "$host_os" in
77616    mingw*) ;;
77617    *)
77618      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
77619        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
77620      fi
77621      ;;
77622  esac
77623  case "$gl_cv_func_setlocale_null_one_mtsafe" in
77624    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
77625    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
77626  esac
77627
77628cat >>confdefs.h <<_ACEOF
77629#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
77630_ACEOF
77631
77632
77633    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
77634    case "$host_os" in
77635      mingw*) LIB_SETLOCALE_NULL= ;;
77636      *)
77637
77638
77639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
77640$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
77641if ${gl_cv_have_weak+:} false; then :
77642  $as_echo_n "(cached) " >&6
77643else
77644  gl_cv_have_weak=no
77645          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77646/* end confdefs.h.  */
77647extern void xyzzy ();
77648#pragma weak xyzzy
77649int
77650main ()
77651{
77652xyzzy();
77653  ;
77654  return 0;
77655}
77656_ACEOF
77657if ac_fn_c_try_link "$LINENO"; then :
77658  gl_cv_have_weak=maybe
77659fi
77660rm -f core conftest.err conftest.$ac_objext \
77661    conftest$ac_exeext conftest.$ac_ext
77662     if test $gl_cv_have_weak = maybe; then
77663                     if test "$cross_compiling" = yes; then :
77664                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77665/* end confdefs.h.  */
77666#ifdef __ELF__
77667             Extensible Linking Format
77668             #endif
77669
77670_ACEOF
77671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
77672  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
77673  gl_cv_have_weak="guessing yes"
77674else
77675  gl_cv_have_weak="guessing no"
77676fi
77677rm -f conftest*
77678
77679
77680else
77681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77682/* end confdefs.h.  */
77683
77684#include <stdio.h>
77685#pragma weak fputs
77686int main ()
77687{
77688  return (fputs == NULL);
77689}
77690_ACEOF
77691if ac_fn_c_try_run "$LINENO"; then :
77692  gl_cv_have_weak=yes
77693else
77694  gl_cv_have_weak=no
77695fi
77696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
77697  conftest.$ac_objext conftest.beam conftest.$ac_ext
77698fi
77699
77700     fi
77701          case " $LDFLAGS " in
77702       *" -static "*) gl_cv_have_weak=no ;;
77703     esac
77704                    case "$gl_cv_have_weak" in
77705       *yes)
77706         case "$host_os" in
77707           freebsd* | dragonfly*)
77708             : > conftest1.c
77709             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
77710             cat <<EOF > conftest2.c
77711#include <pthread.h>
77712#pragma weak pthread_mutexattr_gettype
77713int main ()
77714{
77715  return (pthread_mutexattr_gettype != NULL);
77716}
77717EOF
77718             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
77719               || gl_cv_have_weak=no
77720             rm -f conftest1.c libempty.so conftest2.c conftest
77721             ;;
77722         esac
77723         ;;
77724     esac
77725
77726fi
77727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
77728$as_echo "$gl_cv_have_weak" >&6; }
77729  case "$gl_cv_have_weak" in
77730    *yes)
77731
77732$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
77733
77734      ;;
77735  esac
77736
77737        case "$gl_cv_have_weak" in
77738          *yes) LIB_SETLOCALE_NULL= ;;
77739          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
77740        esac
77741        ;;
77742    esac
77743  else
77744    LIB_SETLOCALE_NULL=
77745  fi
77746
77747
77748  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
77749
77750
77751
77752
77753
77754
77755
77756
77757  gtpo_LIBOBJS="$gtpo_LIBOBJS setlocale-lock.$ac_objext"
77758
77759
77760
77761
77762  CFLAG_VISIBILITY=
77763  HAVE_VISIBILITY=0
77764  if test -n "$GCC"; then
77765                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
77766$as_echo_n "checking whether the -Werror option is usable... " >&6; }
77767if ${gl_cv_cc_vis_werror+:} false; then :
77768  $as_echo_n "(cached) " >&6
77769else
77770  gl_save_CFLAGS="$CFLAGS"
77771       CFLAGS="$CFLAGS -Werror"
77772       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77773/* end confdefs.h.  */
77774
77775int
77776main ()
77777{
77778
77779  ;
77780  return 0;
77781}
77782_ACEOF
77783if ac_fn_c_try_compile "$LINENO"; then :
77784  gl_cv_cc_vis_werror=yes
77785else
77786  gl_cv_cc_vis_werror=no
77787fi
77788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
77789       CFLAGS="$gl_save_CFLAGS"
77790
77791fi
77792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
77793$as_echo "$gl_cv_cc_vis_werror" >&6; }
77794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
77795$as_echo_n "checking for simple visibility declarations... " >&6; }
77796if ${gl_cv_cc_visibility+:} false; then :
77797  $as_echo_n "(cached) " >&6
77798else
77799  gl_save_CFLAGS="$CFLAGS"
77800       CFLAGS="$CFLAGS -fvisibility=hidden"
77801                                          if test $gl_cv_cc_vis_werror = yes; then
77802         CFLAGS="$CFLAGS -Werror"
77803       fi
77804       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77805/* end confdefs.h.  */
77806extern __attribute__((__visibility__("hidden"))) int hiddenvar;
77807              extern __attribute__((__visibility__("default"))) int exportedvar;
77808              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
77809              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
77810              void dummyfunc (void) {}
77811
77812int
77813main ()
77814{
77815
77816  ;
77817  return 0;
77818}
77819_ACEOF
77820if ac_fn_c_try_compile "$LINENO"; then :
77821  gl_cv_cc_visibility=yes
77822else
77823  gl_cv_cc_visibility=no
77824fi
77825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
77826       CFLAGS="$gl_save_CFLAGS"
77827
77828fi
77829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
77830$as_echo "$gl_cv_cc_visibility" >&6; }
77831    if test $gl_cv_cc_visibility = yes; then
77832      CFLAG_VISIBILITY="-fvisibility=hidden"
77833      HAVE_VISIBILITY=1
77834    fi
77835  fi
77836
77837
77838
77839cat >>confdefs.h <<_ACEOF
77840#define HAVE_VISIBILITY $HAVE_VISIBILITY
77841_ACEOF
77842
77843
77844
77845  fi
77846
77847
77848
77849
77850
77851          GNULIB_SETLOCALE_NULL=1
77852
77853
77854
77855
77856
77857$as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
77858
77859
77860
77861
77862
77863
77864
77865
77866
77867
77868
77869
77870
77871
77872     if test $gl_cv_have_include_next = yes; then
77873       gl_cv_next_signal_h='<'signal.h'>'
77874     else
77875       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
77876$as_echo_n "checking absolute name of <signal.h>... " >&6; }
77877if ${gl_cv_next_signal_h+:} false; then :
77878  $as_echo_n "(cached) " >&6
77879else
77880
77881
77882
77883  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77884/* end confdefs.h.  */
77885#include <signal.h>
77886_ACEOF
77887                case "$host_os" in
77888    aix*) gl_absname_cpp="$ac_cpp -C" ;;
77889    *)    gl_absname_cpp="$ac_cpp" ;;
77890  esac
77891
77892  case "$host_os" in
77893    mingw*)
77894                                          gl_dirsep_regex='[/\\]'
77895      ;;
77896    *)
77897      gl_dirsep_regex='\/'
77898      ;;
77899  esac
77900      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
77901  gl_header_literal_regex=`echo 'signal.h' \
77902                           | sed -e "$gl_make_literal_regex_sed"`
77903  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
77904      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
77905      s|^/[^/]|//&|
77906      p
77907      q
77908    }'
77909
77910        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
77911  sed -n "$gl_absolute_header_sed"`
77912
77913           gl_header=$gl_cv_absolute_signal_h
77914           gl_cv_next_signal_h='"'$gl_header'"'
77915
77916
77917fi
77918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
77919$as_echo "$gl_cv_next_signal_h" >&6; }
77920     fi
77921     NEXT_SIGNAL_H=$gl_cv_next_signal_h
77922
77923     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
77924       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
77925       gl_next_as_first_directive='<'signal.h'>'
77926     else
77927       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
77928       gl_next_as_first_directive=$gl_cv_next_signal_h
77929     fi
77930     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
77931
77932
77933
77934
77935
77936# AIX declares sig_atomic_t to already include volatile, and C89 compilers
77937# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
77938  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
77939#include <signal.h>
77940
77941"
77942if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
77943
77944else
77945  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
77946fi
77947
77948
77949
77950
77951
77952
77953
77954  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
77955#include <signal.h>
77956
77957"
77958if test "x$ac_cv_type_sighandler_t" = xyes; then :
77959
77960else
77961  HAVE_SIGHANDLER_T=0
77962fi
77963
77964
77965
77966
77967
77968
77969
77970
77971
77972
77973
77974
77975
77976cat >>confdefs.h <<_ACEOF
77977#define GNULIB_SIGPIPE 1
77978_ACEOF
77979
77980
77981
77982  GNULIB_SIGNAL_H_SIGPIPE=1
77983
77984
77985  GNULIB_STDIO_H_SIGPIPE=1
77986
77987  GNULIB_UNISTD_H_SIGPIPE=1
77988
77989
77990
77991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigprocmask" >&5
77992$as_echo_n "checking for sigprocmask... " >&6; }
77993if ${gl_cv_func_sigprocmask+:} false; then :
77994  $as_echo_n "(cached) " >&6
77995else
77996  if test $gl_cv_type_sigset_t = yes; then
77997
77998  {
77999
78000         ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
78001if test "x$ac_cv_func_sigprocmask" = xyes; then :
78002  gl_cv_func_sigprocmask=yes
78003else
78004  gl_cv_func_sigprocmask=no
78005fi
78006
78007
78008  } 6>/dev/null
78009
78010     else
78011       gl_cv_func_sigprocmask=no
78012     fi
78013
78014fi
78015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sigprocmask" >&5
78016$as_echo "$gl_cv_func_sigprocmask" >&6; }
78017  if test $gl_cv_func_sigprocmask != yes; then
78018    HAVE_POSIX_SIGNALBLOCKING=0
78019  fi
78020
78021  if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
78022
78023
78024
78025
78026
78027
78028
78029
78030  gtpo_LIBOBJS="$gtpo_LIBOBJS sigprocmask.$ac_objext"
78031
78032    :
78033  fi
78034
78035
78036
78037
78038
78039          GNULIB_SIGPROCMASK=1
78040
78041
78042
78043
78044
78045$as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
78046
78047
78048
78049
78050  for ac_header in stdint.h
78051do :
78052  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
78053if test "x$ac_cv_header_stdint_h" = xyes; then :
78054  cat >>confdefs.h <<_ACEOF
78055#define HAVE_STDINT_H 1
78056_ACEOF
78057
78058fi
78059
78060done
78061
78062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
78063$as_echo_n "checking for SIZE_MAX... " >&6; }
78064if ${gl_cv_size_max+:} false; then :
78065  $as_echo_n "(cached) " >&6
78066else
78067
78068    gl_cv_size_max=no
78069    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78070/* end confdefs.h.  */
78071
78072#include <limits.h>
78073#if HAVE_STDINT_H
78074#include <stdint.h>
78075#endif
78076#ifdef SIZE_MAX
78077Found it
78078#endif
78079
78080_ACEOF
78081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
78082  $EGREP "Found it" >/dev/null 2>&1; then :
78083  gl_cv_size_max=yes
78084fi
78085rm -f conftest*
78086
78087    if test $gl_cv_size_max != yes; then
78088                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
78089#include <limits.h>"; then :
78090
78091else
78092  size_t_bits_minus_1=
78093fi
78094
78095      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
78096
78097else
78098  fits_in_uint=
78099fi
78100
78101      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
78102        if test $fits_in_uint = 1; then
78103                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78104/* end confdefs.h.  */
78105#include <stddef.h>
78106                 extern size_t foo;
78107                 extern unsigned long foo;
78108
78109int
78110main ()
78111{
78112
78113  ;
78114  return 0;
78115}
78116_ACEOF
78117if ac_fn_c_try_compile "$LINENO"; then :
78118  fits_in_uint=0
78119fi
78120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78121        fi
78122                                if test $fits_in_uint = 1; then
78123          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
78124        else
78125          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
78126        fi
78127      else
78128                gl_cv_size_max='((size_t)~(size_t)0)'
78129      fi
78130    fi
78131
78132fi
78133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
78134$as_echo "$gl_cv_size_max" >&6; }
78135  if test "$gl_cv_size_max" != yes; then
78136
78137cat >>confdefs.h <<_ACEOF
78138#define SIZE_MAX $gl_cv_size_max
78139_ACEOF
78140
78141  fi
78142
78143
78144
78145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
78146$as_echo_n "checking for ssize_t... " >&6; }
78147if ${gt_cv_ssize_t+:} false; then :
78148  $as_echo_n "(cached) " >&6
78149else
78150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78151/* end confdefs.h.  */
78152#include <sys/types.h>
78153int
78154main ()
78155{
78156int x = sizeof (ssize_t *) + sizeof (ssize_t);
78157            return !x;
78158  ;
78159  return 0;
78160}
78161_ACEOF
78162if ac_fn_c_try_compile "$LINENO"; then :
78163  gt_cv_ssize_t=yes
78164else
78165  gt_cv_ssize_t=no
78166fi
78167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78168fi
78169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
78170$as_echo "$gt_cv_ssize_t" >&6; }
78171  if test $gt_cv_ssize_t = no; then
78172
78173$as_echo "#define ssize_t int" >>confdefs.h
78174
78175  fi
78176
78177
78178
78179
78180
78181  case "$host_os" in
78182    mingw*)
78183                  REPLACE_STAT=1
78184      ;;
78185    *)
78186                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
78187$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
78188if ${gl_cv_func_stat_file_slash+:} false; then :
78189  $as_echo_n "(cached) " >&6
78190else
78191  touch conftest.tmp
78192         # Assume that if we have lstat, we can also check symlinks.
78193         if test $ac_cv_func_lstat = yes; then
78194           ln -s conftest.tmp conftest.lnk
78195         fi
78196         if test "$cross_compiling" = yes; then :
78197  case "$host_os" in
78198                               # Guess yes on Linux systems.
78199              linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
78200                               # Guess yes on glibc systems.
78201              *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
78202                               # If we don't know, obey --enable-cross-guesses.
78203              *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
78204            esac
78205
78206else
78207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78208/* end confdefs.h.  */
78209#include <sys/stat.h>
78210
78211int
78212main ()
78213{
78214int result = 0;
78215               struct stat st;
78216               if (!stat ("conftest.tmp/", &st))
78217                 result |= 1;
78218#if HAVE_LSTAT
78219               if (!stat ("conftest.lnk/", &st))
78220                 result |= 2;
78221#endif
78222               return result;
78223
78224  ;
78225  return 0;
78226}
78227_ACEOF
78228if ac_fn_c_try_run "$LINENO"; then :
78229  gl_cv_func_stat_file_slash=yes
78230else
78231  gl_cv_func_stat_file_slash=no
78232fi
78233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
78234  conftest.$ac_objext conftest.beam conftest.$ac_ext
78235fi
78236
78237         rm -f conftest.tmp conftest.lnk
78238fi
78239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
78240$as_echo "$gl_cv_func_stat_file_slash" >&6; }
78241      case $gl_cv_func_stat_file_slash in
78242        *no)
78243          REPLACE_STAT=1
78244
78245$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
78246;;
78247      esac
78248      case $host_os in
78249                solaris*)
78250          REPLACE_FSTAT=1 ;;
78251      esac
78252      ;;
78253  esac
78254
78255  if test $REPLACE_STAT = 1; then
78256
78257
78258
78259
78260
78261
78262
78263
78264  gtpo_LIBOBJS="$gtpo_LIBOBJS stat.$ac_objext"
78265
78266    case "$host_os" in
78267      mingw*)
78268
78269
78270
78271
78272
78273
78274
78275
78276  gtpo_LIBOBJS="$gtpo_LIBOBJS stat-w32.$ac_objext"
78277
78278        ;;
78279    esac
78280
78281
78282  :
78283
78284  fi
78285
78286
78287
78288
78289
78290          GNULIB_STAT=1
78291
78292
78293
78294
78295
78296$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
78297
78298
78299
78300
78301
78302
78303
78304  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
78305     #include <sys/stat.h>
78306"
78307if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
78308
78309cat >>confdefs.h <<_ACEOF
78310#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
78311_ACEOF
78312
78313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
78314$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
78315if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
78316  $as_echo_n "(cached) " >&6
78317else
78318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78319/* end confdefs.h.  */
78320
78321            #include <sys/types.h>
78322            #include <sys/stat.h>
78323            #if HAVE_SYS_TIME_H
78324            # include <sys/time.h>
78325            #endif
78326            #include <time.h>
78327            struct timespec ts;
78328            struct stat st;
78329
78330int
78331main ()
78332{
78333
78334            st.st_atim = ts;
78335
78336  ;
78337  return 0;
78338}
78339_ACEOF
78340if ac_fn_c_try_compile "$LINENO"; then :
78341  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
78342else
78343  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
78344fi
78345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78346fi
78347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
78348$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
78349     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
78350
78351$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
78352
78353     fi
78354else
78355  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
78356        #include <sys/stat.h>
78357"
78358if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
78359
78360cat >>confdefs.h <<_ACEOF
78361#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
78362_ACEOF
78363
78364
78365else
78366  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
78367           #include <sys/stat.h>
78368"
78369if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
78370
78371cat >>confdefs.h <<_ACEOF
78372#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
78373_ACEOF
78374
78375
78376else
78377  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
78378              #include <sys/stat.h>
78379"
78380if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
78381
78382cat >>confdefs.h <<_ACEOF
78383#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
78384_ACEOF
78385
78386
78387fi
78388
78389fi
78390
78391fi
78392
78393fi
78394
78395
78396
78397
78398
78399  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
78400     #include <sys/stat.h>
78401"
78402if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
78403
78404cat >>confdefs.h <<_ACEOF
78405#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
78406_ACEOF
78407
78408
78409else
78410  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
78411        #include <sys/stat.h>
78412"
78413if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
78414
78415cat >>confdefs.h <<_ACEOF
78416#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
78417_ACEOF
78418
78419
78420else
78421  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
78422          #include <sys/stat.h>
78423"
78424if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
78425
78426cat >>confdefs.h <<_ACEOF
78427#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
78428_ACEOF
78429
78430
78431fi
78432
78433fi
78434
78435fi
78436
78437
78438
78439  STDARG_H=''
78440  NEXT_STDARG_H='<stdarg.h>'
78441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
78442$as_echo_n "checking for va_copy... " >&6; }
78443if ${gl_cv_func_va_copy+:} false; then :
78444  $as_echo_n "(cached) " >&6
78445else
78446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78447/* end confdefs.h.  */
78448#include <stdarg.h>
78449int
78450main ()
78451{
78452
78453#ifndef va_copy
78454void (*func) (va_list, va_list) = va_copy;
78455#endif
78456
78457  ;
78458  return 0;
78459}
78460_ACEOF
78461if ac_fn_c_try_compile "$LINENO"; then :
78462  gl_cv_func_va_copy=yes
78463else
78464  gl_cv_func_va_copy=no
78465fi
78466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78467
78468fi
78469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
78470$as_echo "$gl_cv_func_va_copy" >&6; }
78471  if test $gl_cv_func_va_copy = no; then
78472                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78473/* end confdefs.h.  */
78474#if defined _AIX && !defined __GNUC__
78475        AIX vaccine
78476       #endif
78477
78478_ACEOF
78479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
78480  $EGREP "vaccine" >/dev/null 2>&1; then :
78481  gl_aixcc=yes
78482else
78483  gl_aixcc=no
78484fi
78485rm -f conftest*
78486
78487    if test $gl_aixcc = yes; then
78488            STDARG_H=stdarg.h
78489
78490
78491
78492
78493
78494
78495
78496
78497     if test $gl_cv_have_include_next = yes; then
78498       gl_cv_next_stdarg_h='<'stdarg.h'>'
78499     else
78500       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
78501$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
78502if ${gl_cv_next_stdarg_h+:} false; then :
78503  $as_echo_n "(cached) " >&6
78504else
78505
78506
78507
78508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78509/* end confdefs.h.  */
78510#include <stdarg.h>
78511_ACEOF
78512                case "$host_os" in
78513    aix*) gl_absname_cpp="$ac_cpp -C" ;;
78514    *)    gl_absname_cpp="$ac_cpp" ;;
78515  esac
78516
78517  case "$host_os" in
78518    mingw*)
78519                                          gl_dirsep_regex='[/\\]'
78520      ;;
78521    *)
78522      gl_dirsep_regex='\/'
78523      ;;
78524  esac
78525      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
78526  gl_header_literal_regex=`echo 'stdarg.h' \
78527                           | sed -e "$gl_make_literal_regex_sed"`
78528  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
78529      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
78530      s|^/[^/]|//&|
78531      p
78532      q
78533    }'
78534
78535        gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
78536  sed -n "$gl_absolute_header_sed"`
78537
78538           gl_header=$gl_cv_absolute_stdarg_h
78539           gl_cv_next_stdarg_h='"'$gl_header'"'
78540
78541
78542fi
78543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
78544$as_echo "$gl_cv_next_stdarg_h" >&6; }
78545     fi
78546     NEXT_STDARG_H=$gl_cv_next_stdarg_h
78547
78548     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
78549       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
78550       gl_next_as_first_directive='<'stdarg.h'>'
78551     else
78552       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
78553       gl_next_as_first_directive=$gl_cv_next_stdarg_h
78554     fi
78555     NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
78556
78557
78558
78559
78560            if test "$gl_cv_next_stdarg_h" = '""'; then
78561        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
78562        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
78563      fi
78564    else
78565
78566  saved_as_echo_n="$as_echo_n"
78567  as_echo_n=':'
78568  if ${gl_cv_func___va_copy+:} false; then :
78569  $as_echo_n "(cached) " >&6
78570else
78571
78572        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78573/* end confdefs.h.  */
78574#include <stdarg.h>
78575int
78576main ()
78577{
78578
78579#ifndef __va_copy
78580error, bail out
78581#endif
78582
78583  ;
78584  return 0;
78585}
78586_ACEOF
78587if ac_fn_c_try_compile "$LINENO"; then :
78588  gl_cv_func___va_copy=yes
78589else
78590  gl_cv_func___va_copy=no
78591fi
78592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78593fi
78594
78595  as_echo_n="$saved_as_echo_n"
78596
78597      if test $gl_cv_func___va_copy = yes; then
78598
78599$as_echo "#define va_copy __va_copy" >>confdefs.h
78600
78601      else
78602
78603
78604$as_echo "#define va_copy gl_va_copy" >>confdefs.h
78605
78606      fi
78607    fi
78608  fi
78609
78610   if test -n "$STDARG_H"; then
78611  GL_GENERATE_STDARG_H_TRUE=
78612  GL_GENERATE_STDARG_H_FALSE='#'
78613else
78614  GL_GENERATE_STDARG_H_TRUE='#'
78615  GL_GENERATE_STDARG_H_FALSE=
78616fi
78617
78618
78619
78620
78621
78622
78623
78624          if test "$ac_cv_header_stdbool_h" = yes; then
78625    case "$host_os" in
78626      solaris*)
78627        if test -z "$GCC"; then
78628          STDBOOL_H='stdbool.h'
78629        else
78630          STDBOOL_H=''
78631        fi
78632        ;;
78633      *)
78634        STDBOOL_H=''
78635        ;;
78636    esac
78637  else
78638    STDBOOL_H='stdbool.h'
78639  fi
78640
78641   if test -n "$STDBOOL_H"; then
78642  GL_GENERATE_STDBOOL_H_TRUE=
78643  GL_GENERATE_STDBOOL_H_FALSE='#'
78644else
78645  GL_GENERATE_STDBOOL_H_TRUE='#'
78646  GL_GENERATE_STDBOOL_H_FALSE=
78647fi
78648
78649
78650  if test "$ac_cv_type__Bool" = yes; then
78651    HAVE__BOOL=1
78652  else
78653    HAVE__BOOL=0
78654  fi
78655
78656
78657
78658
78659
78660  STDDEF_H=
78661
78662      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
78663$as_echo_n "checking for good max_align_t... " >&6; }
78664if ${gl_cv_type_max_align_t+:} false; then :
78665  $as_echo_n "(cached) " >&6
78666else
78667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78668/* end confdefs.h.  */
78669#include <stddef.h>
78670            unsigned int s = sizeof (max_align_t);
78671            #if defined __GNUC__ || defined __IBM__ALIGNOF__
78672            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
78673            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
78674            #endif
78675
78676int
78677main ()
78678{
78679
78680  ;
78681  return 0;
78682}
78683_ACEOF
78684if ac_fn_c_try_compile "$LINENO"; then :
78685  gl_cv_type_max_align_t=yes
78686else
78687  gl_cv_type_max_align_t=no
78688fi
78689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78690
78691fi
78692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
78693$as_echo "$gl_cv_type_max_align_t" >&6; }
78694  if test $gl_cv_type_max_align_t = no; then
78695    HAVE_MAX_ALIGN_T=0
78696    STDDEF_H=stddef.h
78697  fi
78698
78699  if test $gt_cv_c_wchar_t = no; then
78700    HAVE_WCHAR_T=0
78701    STDDEF_H=stddef.h
78702  fi
78703
78704  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
78705$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
78706if ${gl_cv_decl_null_works+:} false; then :
78707  $as_echo_n "(cached) " >&6
78708else
78709  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78710/* end confdefs.h.  */
78711#include <stddef.h>
78712      int test[2 * (sizeof NULL == sizeof (void *)) -1];
78713
78714int
78715main ()
78716{
78717
78718  ;
78719  return 0;
78720}
78721_ACEOF
78722if ac_fn_c_try_compile "$LINENO"; then :
78723  gl_cv_decl_null_works=yes
78724else
78725  gl_cv_decl_null_works=no
78726fi
78727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78728fi
78729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
78730$as_echo "$gl_cv_decl_null_works" >&6; }
78731  if test $gl_cv_decl_null_works = no; then
78732    REPLACE_NULL=1
78733    STDDEF_H=stddef.h
78734  fi
78735
78736
78737   if test -n "$STDDEF_H"; then
78738  GL_GENERATE_STDDEF_H_TRUE=
78739  GL_GENERATE_STDDEF_H_FALSE='#'
78740else
78741  GL_GENERATE_STDDEF_H_TRUE='#'
78742  GL_GENERATE_STDDEF_H_FALSE=
78743fi
78744
78745  if test -n "$STDDEF_H"; then
78746
78747
78748
78749
78750
78751
78752
78753
78754     if test $gl_cv_have_include_next = yes; then
78755       gl_cv_next_stddef_h='<'stddef.h'>'
78756     else
78757       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
78758$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
78759if ${gl_cv_next_stddef_h+:} false; then :
78760  $as_echo_n "(cached) " >&6
78761else
78762
78763
78764
78765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78766/* end confdefs.h.  */
78767#include <stddef.h>
78768_ACEOF
78769                case "$host_os" in
78770    aix*) gl_absname_cpp="$ac_cpp -C" ;;
78771    *)    gl_absname_cpp="$ac_cpp" ;;
78772  esac
78773
78774  case "$host_os" in
78775    mingw*)
78776                                          gl_dirsep_regex='[/\\]'
78777      ;;
78778    *)
78779      gl_dirsep_regex='\/'
78780      ;;
78781  esac
78782      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
78783  gl_header_literal_regex=`echo 'stddef.h' \
78784                           | sed -e "$gl_make_literal_regex_sed"`
78785  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
78786      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
78787      s|^/[^/]|//&|
78788      p
78789      q
78790    }'
78791
78792        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
78793  sed -n "$gl_absolute_header_sed"`
78794
78795           gl_header=$gl_cv_absolute_stddef_h
78796           gl_cv_next_stddef_h='"'$gl_header'"'
78797
78798
78799fi
78800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
78801$as_echo "$gl_cv_next_stddef_h" >&6; }
78802     fi
78803     NEXT_STDDEF_H=$gl_cv_next_stddef_h
78804
78805     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
78806       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
78807       gl_next_as_first_directive='<'stddef.h'>'
78808     else
78809       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
78810       gl_next_as_first_directive=$gl_cv_next_stddef_h
78811     fi
78812     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
78813
78814
78815
78816
78817  fi
78818
78819
78820
78821
78822  $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
78823
78824
78825
78826
78827
78828
78829
78830
78831
78832
78833     if test $gl_cv_have_include_next = yes; then
78834       gl_cv_next_stdio_h='<'stdio.h'>'
78835     else
78836       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
78837$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
78838if ${gl_cv_next_stdio_h+:} false; then :
78839  $as_echo_n "(cached) " >&6
78840else
78841
78842
78843
78844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78845/* end confdefs.h.  */
78846#include <stdio.h>
78847_ACEOF
78848                case "$host_os" in
78849    aix*) gl_absname_cpp="$ac_cpp -C" ;;
78850    *)    gl_absname_cpp="$ac_cpp" ;;
78851  esac
78852
78853  case "$host_os" in
78854    mingw*)
78855                                          gl_dirsep_regex='[/\\]'
78856      ;;
78857    *)
78858      gl_dirsep_regex='\/'
78859      ;;
78860  esac
78861      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
78862  gl_header_literal_regex=`echo 'stdio.h' \
78863                           | sed -e "$gl_make_literal_regex_sed"`
78864  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
78865      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
78866      s|^/[^/]|//&|
78867      p
78868      q
78869    }'
78870
78871        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
78872  sed -n "$gl_absolute_header_sed"`
78873
78874           gl_header=$gl_cv_absolute_stdio_h
78875           gl_cv_next_stdio_h='"'$gl_header'"'
78876
78877
78878fi
78879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
78880$as_echo "$gl_cv_next_stdio_h" >&6; }
78881     fi
78882     NEXT_STDIO_H=$gl_cv_next_stdio_h
78883
78884     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
78885       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
78886       gl_next_as_first_directive='<'stdio.h'>'
78887     else
78888       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
78889       gl_next_as_first_directive=$gl_cv_next_stdio_h
78890     fi
78891     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
78892
78893
78894
78895
78896
78897        { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
78898$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
78899if ${gl_cv_func_printf_attribute_flavor+:} false; then :
78900  $as_echo_n "(cached) " >&6
78901else
78902  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78903/* end confdefs.h.  */
78904
78905       #define __STDC_FORMAT_MACROS 1
78906       #include <stdio.h>
78907       #include <inttypes.h>
78908       /* For non-mingw systems, compilation will trivially succeed.
78909          For mingw, compilation will succeed for older mingw (system
78910          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
78911       #if (defined _WIN32 && ! defined __CYGWIN__) && \
78912         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
78913       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
78914       #endif
78915
78916int
78917main ()
78918{
78919
78920  ;
78921  return 0;
78922}
78923_ACEOF
78924if ac_fn_c_try_compile "$LINENO"; then :
78925  gl_cv_func_printf_attribute_flavor=system
78926else
78927  gl_cv_func_printf_attribute_flavor=gnu
78928fi
78929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
78930fi
78931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
78932$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
78933  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
78934
78935$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
78936
78937  fi
78938
78939      GNULIB_FSCANF=1
78940
78941
78942cat >>confdefs.h <<_ACEOF
78943#define GNULIB_FSCANF 1
78944_ACEOF
78945
78946
78947  GNULIB_SCANF=1
78948
78949
78950cat >>confdefs.h <<_ACEOF
78951#define GNULIB_SCANF 1
78952_ACEOF
78953
78954
78955  GNULIB_FGETC=1
78956  GNULIB_GETC=1
78957  GNULIB_GETCHAR=1
78958  GNULIB_FGETS=1
78959  GNULIB_FREAD=1
78960
78961
78962      GNULIB_FPRINTF=1
78963  GNULIB_PRINTF=1
78964  GNULIB_VFPRINTF=1
78965  GNULIB_VPRINTF=1
78966  GNULIB_FPUTC=1
78967  GNULIB_PUTC=1
78968  GNULIB_PUTCHAR=1
78969  GNULIB_FPUTS=1
78970  GNULIB_PUTS=1
78971  GNULIB_FWRITE=1
78972
78973
78974
78975
78976    if test $gl_cv_header_signal_h_SIGPIPE != yes; then
78977      REPLACE_STDIO_WRITE_FUNCS=1
78978
78979
78980
78981
78982
78983
78984
78985
78986  gtpo_LIBOBJS="$gtpo_LIBOBJS stdio-write.$ac_objext"
78987
78988    fi
78989
78990
78991
78992
78993
78994
78995
78996
78997
78998
78999
79000
79001
79002
79003
79004
79005
79006
79007
79008     if test $gl_cv_have_include_next = yes; then
79009       gl_cv_next_stdlib_h='<'stdlib.h'>'
79010     else
79011       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
79012$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
79013if ${gl_cv_next_stdlib_h+:} false; then :
79014  $as_echo_n "(cached) " >&6
79015else
79016
79017
79018
79019  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79020/* end confdefs.h.  */
79021#include <stdlib.h>
79022_ACEOF
79023                case "$host_os" in
79024    aix*) gl_absname_cpp="$ac_cpp -C" ;;
79025    *)    gl_absname_cpp="$ac_cpp" ;;
79026  esac
79027
79028  case "$host_os" in
79029    mingw*)
79030                                          gl_dirsep_regex='[/\\]'
79031      ;;
79032    *)
79033      gl_dirsep_regex='\/'
79034      ;;
79035  esac
79036      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
79037  gl_header_literal_regex=`echo 'stdlib.h' \
79038                           | sed -e "$gl_make_literal_regex_sed"`
79039  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
79040      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
79041      s|^/[^/]|//&|
79042      p
79043      q
79044    }'
79045
79046        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
79047  sed -n "$gl_absolute_header_sed"`
79048
79049           gl_header=$gl_cv_absolute_stdlib_h
79050           gl_cv_next_stdlib_h='"'$gl_header'"'
79051
79052
79053fi
79054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
79055$as_echo "$gl_cv_next_stdlib_h" >&6; }
79056     fi
79057     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
79058
79059     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
79060       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
79061       gl_next_as_first_directive='<'stdlib.h'>'
79062     else
79063       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
79064       gl_next_as_first_directive=$gl_cv_next_stdlib_h
79065     fi
79066     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
79067
79068
79069
79070
79071
79072
79073
79074
79075
79076
79077
79078
79079
79080
79081
79082
79083
79084  for ac_func in stpcpy
79085do :
79086  ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
79087if test "x$ac_cv_func_stpcpy" = xyes; then :
79088  cat >>confdefs.h <<_ACEOF
79089#define HAVE_STPCPY 1
79090_ACEOF
79091
79092fi
79093done
79094
79095  if test $ac_cv_func_stpcpy = no; then
79096    HAVE_STPCPY=0
79097  fi
79098
79099  if test $HAVE_STPCPY = 0; then
79100
79101
79102
79103
79104
79105
79106
79107
79108  gtpo_LIBOBJS="$gtpo_LIBOBJS stpcpy.$ac_objext"
79109
79110
79111  :
79112
79113  fi
79114
79115
79116
79117
79118
79119          GNULIB_STPCPY=1
79120
79121
79122
79123
79124
79125$as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
79126
79127
79128
79129
79130
79131
79132
79133
79134
79135
79136
79137
79138
79139
79140  if test $ac_cv_func_stpncpy = yes; then
79141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stpncpy" >&5
79142$as_echo_n "checking for working stpncpy... " >&6; }
79143if ${gl_cv_func_stpncpy+:} false; then :
79144  $as_echo_n "(cached) " >&6
79145else
79146
79147      if test "$cross_compiling" = yes; then :
79148           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79149/* end confdefs.h.  */
79150
79151#include <features.h>
79152#ifdef __GNU_LIBRARY__
79153  Thanks for using GNU
79154#endif
79155
79156_ACEOF
79157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
79158  $EGREP "Thanks for using GNU" >/dev/null 2>&1; then :
79159  gl_cv_func_stpncpy="guessing yes"
79160else
79161  case "$host_os" in
79162              *-musl*) gl_cv_func_stpncpy="guessing yes" ;;
79163              *)       gl_cv_func_stpncpy="$gl_cross_guess_normal" ;;
79164            esac
79165
79166fi
79167rm -f conftest*
79168
79169
79170else
79171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79172/* end confdefs.h.  */
79173
79174#include <stdlib.h>
79175#include <string.h> /* for strcpy */
79176/* The stpncpy prototype is missing in <string.h> on AIX 4.  */
79177#if !HAVE_DECL_STPNCPY
79178extern
79179# ifdef __cplusplus
79180"C"
79181# endif
79182char *stpncpy (char *dest, const char *src, size_t n);
79183#endif
79184int main ()
79185{
79186  int result = 0;
79187  const char *src = "Hello";
79188  char dest[10];
79189  /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+1 here.  */
79190  {
79191    strcpy (dest, "\377\377\377\377\377\377");
79192    if (stpncpy (dest, src, 2) != dest + 2)
79193      result |= 1;
79194  }
79195  /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+4 here.  */
79196  {
79197    strcpy (dest, "\377\377\377\377\377\377");
79198    if (stpncpy (dest, src, 5) != dest + 5)
79199      result |= 2;
79200  }
79201  /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+6 here.  */
79202  {
79203    strcpy (dest, "\377\377\377\377\377\377");
79204    if (stpncpy (dest, src, 7) != dest + 5)
79205      result |= 4;
79206  }
79207  return result;
79208}
79209
79210_ACEOF
79211if ac_fn_c_try_run "$LINENO"; then :
79212  gl_cv_func_stpncpy=yes
79213else
79214  gl_cv_func_stpncpy=no
79215fi
79216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
79217  conftest.$ac_objext conftest.beam conftest.$ac_ext
79218fi
79219
79220
79221fi
79222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stpncpy" >&5
79223$as_echo "$gl_cv_func_stpncpy" >&6; }
79224    case "$gl_cv_func_stpncpy" in
79225      *yes)
79226
79227$as_echo "#define HAVE_STPNCPY 1" >>confdefs.h
79228
79229        ;;
79230      *)
79231        REPLACE_STPNCPY=1
79232        ;;
79233    esac
79234  else
79235    HAVE_STPNCPY=0
79236  fi
79237
79238  if test $HAVE_STPNCPY = 0 || test $REPLACE_STPNCPY = 1; then
79239
79240
79241
79242
79243
79244
79245
79246
79247  gtpo_LIBOBJS="$gtpo_LIBOBJS stpncpy.$ac_objext"
79248
79249
79250  :
79251
79252  fi
79253
79254
79255
79256
79257
79258          GNULIB_STPNCPY=1
79259
79260
79261
79262
79263
79264$as_echo "#define GNULIB_TEST_STPNCPY 1" >>confdefs.h
79265
79266
79267
79268
79269
79270
79271
79272  for ac_func in strchrnul
79273do :
79274  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
79275if test "x$ac_cv_func_strchrnul" = xyes; then :
79276  cat >>confdefs.h <<_ACEOF
79277#define HAVE_STRCHRNUL 1
79278_ACEOF
79279
79280fi
79281done
79282
79283  if test $ac_cv_func_strchrnul = no; then
79284    HAVE_STRCHRNUL=0
79285  else
79286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
79287$as_echo_n "checking whether strchrnul works... " >&6; }
79288if ${gl_cv_func_strchrnul_works+:} false; then :
79289  $as_echo_n "(cached) " >&6
79290else
79291  if test "$cross_compiling" = yes; then :
79292           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79293/* end confdefs.h.  */
79294
79295#if defined __CYGWIN__
79296 #include <cygwin/version.h>
79297 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
79298  Lucky user
79299 #endif
79300#else
79301  Lucky user
79302#endif
79303
79304_ACEOF
79305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
79306  $EGREP "Lucky user" >/dev/null 2>&1; then :
79307  gl_cv_func_strchrnul_works="guessing yes"
79308else
79309  gl_cv_func_strchrnul_works="guessing no"
79310fi
79311rm -f conftest*
79312
79313
79314else
79315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79316/* end confdefs.h.  */
79317
79318#include <string.h> /* for strchrnul */
79319
79320int
79321main ()
79322{
79323const char *buf = "a";
79324      return strchrnul (buf, 'b') != buf + 1;
79325
79326  ;
79327  return 0;
79328}
79329_ACEOF
79330if ac_fn_c_try_run "$LINENO"; then :
79331  gl_cv_func_strchrnul_works=yes
79332else
79333  gl_cv_func_strchrnul_works=no
79334fi
79335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
79336  conftest.$ac_objext conftest.beam conftest.$ac_ext
79337fi
79338
79339
79340fi
79341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
79342$as_echo "$gl_cv_func_strchrnul_works" >&6; }
79343    case "$gl_cv_func_strchrnul_works" in
79344      *yes) ;;
79345      *) REPLACE_STRCHRNUL=1 ;;
79346    esac
79347  fi
79348
79349  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
79350
79351
79352
79353
79354
79355
79356
79357
79358  gtpo_LIBOBJS="$gtpo_LIBOBJS strchrnul.$ac_objext"
79359
79360    :
79361  fi
79362
79363
79364
79365
79366
79367          GNULIB_STRCHRNUL=1
79368
79369
79370
79371
79372
79373$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
79374
79375
79376
79377
79378
79379
79380
79381
79382
79383
79384  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
79385    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
79386$as_echo_n "checking for working strerror function... " >&6; }
79387if ${gl_cv_func_working_strerror+:} false; then :
79388  $as_echo_n "(cached) " >&6
79389else
79390  if test "$cross_compiling" = yes; then :
79391  case "$host_os" in
79392                          # Guess yes on glibc systems.
79393           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
79394                          # Guess yes on musl systems.
79395           *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
79396                          # If we don't know, obey --enable-cross-guesses.
79397           *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
79398         esac
79399
79400else
79401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79402/* end confdefs.h.  */
79403#include <string.h>
79404
79405int
79406main ()
79407{
79408if (!*strerror (-2)) return 1;
79409  ;
79410  return 0;
79411}
79412_ACEOF
79413if ac_fn_c_try_run "$LINENO"; then :
79414  gl_cv_func_working_strerror=yes
79415else
79416  gl_cv_func_working_strerror=no
79417fi
79418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
79419  conftest.$ac_objext conftest.beam conftest.$ac_ext
79420fi
79421
79422
79423fi
79424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
79425$as_echo "$gl_cv_func_working_strerror" >&6; }
79426    case "$gl_cv_func_working_strerror" in
79427      *yes) ;;
79428      *)
79429                        REPLACE_STRERROR=1
79430        ;;
79431    esac
79432
79433                  case "$gl_cv_func_strerror_r_works" in
79434        *no) REPLACE_STRERROR=1 ;;
79435      esac
79436
79437  else
79438            REPLACE_STRERROR=1
79439  fi
79440
79441  if test $REPLACE_STRERROR = 1; then
79442
79443
79444
79445
79446
79447
79448
79449
79450  gtpo_LIBOBJS="$gtpo_LIBOBJS strerror.$ac_objext"
79451
79452  fi
79453
79454
79455cat >>confdefs.h <<_ACEOF
79456#define GNULIB_STRERROR 1
79457_ACEOF
79458
79459
79460
79461
79462
79463
79464
79465          GNULIB_STRERROR=1
79466
79467
79468
79469
79470
79471$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
79472
79473
79474
79475
79476
79477  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
79478
79479
79480
79481
79482
79483
79484
79485
79486  gtpo_LIBOBJS="$gtpo_LIBOBJS strerror-override.$ac_objext"
79487
79488
79489
79490
79491
79492  if test $ac_cv_header_sys_socket_h != yes; then
79493                    for ac_header in winsock2.h
79494do :
79495  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
79496if test "x$ac_cv_header_winsock2_h" = xyes; then :
79497  cat >>confdefs.h <<_ACEOF
79498#define HAVE_WINSOCK2_H 1
79499_ACEOF
79500
79501fi
79502
79503done
79504
79505  fi
79506  if test "$ac_cv_header_winsock2_h" = yes; then
79507    HAVE_WINSOCK2_H=1
79508    UNISTD_H_HAVE_WINSOCK2_H=1
79509    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
79510  else
79511    HAVE_WINSOCK2_H=0
79512  fi
79513
79514
79515  fi
79516  if test $gl_cond_libtool = false; then
79517    gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
79518    gl_libdeps="$gl_libdeps $LIBICONV"
79519  fi
79520  if test $gl_cond_libtool = false; then
79521    gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
79522    gl_libdeps="$gl_libdeps $LIBICONV"
79523  fi
79524
79525
79526
79527
79528
79529  if test $REPLACE_STRSTR = 0; then
79530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
79531$as_echo_n "checking whether strstr works in linear time... " >&6; }
79532if ${gl_cv_func_strstr_linear+:} false; then :
79533  $as_echo_n "(cached) " >&6
79534else
79535  if test "$cross_compiling" = yes; then :
79536                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79537/* end confdefs.h.  */
79538
79539#include <features.h>
79540#ifdef __GNU_LIBRARY__
79541 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
79542     && !(defined __i386__ || defined __x86_64__) \
79543     && !defined __UCLIBC__
79544  Lucky user
79545 #endif
79546#endif
79547#ifdef __CYGWIN__
79548 #include <cygwin/version.h>
79549 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
79550  Lucky user
79551 #endif
79552#endif
79553
79554_ACEOF
79555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
79556  $EGREP "Lucky user" >/dev/null 2>&1; then :
79557  gl_cv_func_strstr_linear="guessing yes"
79558else
79559  gl_cv_func_strstr_linear="$gl_cross_guess_normal"
79560fi
79561rm -f conftest*
79562
79563
79564else
79565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79566/* end confdefs.h.  */
79567
79568#ifdef __MVS__
79569/* z/OS does not deliver signals while strstr() is running (thanks to
79570   restrictions on its LE runtime), which prevents us from limiting the
79571   running time of this test.  */
79572# error "This test does not work properly on z/OS"
79573#endif
79574#include <signal.h> /* for signal */
79575#include <string.h> /* for strstr */
79576#include <stdlib.h> /* for malloc */
79577#include <unistd.h> /* for alarm */
79578static void quit (int sig) { _exit (sig + 128); }
79579
79580int
79581main ()
79582{
79583
79584    int result = 0;
79585    size_t m = 1000000;
79586    char *haystack = (char *) malloc (2 * m + 2);
79587    char *needle = (char *) malloc (m + 2);
79588    /* Failure to compile this test due to missing alarm is okay,
79589       since all such platforms (mingw) also have quadratic strstr.  */
79590    signal (SIGALRM, quit);
79591    alarm (5);
79592    /* Check for quadratic performance.  */
79593    if (haystack && needle)
79594      {
79595        memset (haystack, 'A', 2 * m);
79596        haystack[2 * m] = 'B';
79597        haystack[2 * m + 1] = 0;
79598        memset (needle, 'A', m);
79599        needle[m] = 'B';
79600        needle[m + 1] = 0;
79601        if (!strstr (haystack, needle))
79602          result |= 1;
79603      }
79604    /* Free allocated memory, in case some sanitizer is watching.  */
79605    free (haystack);
79606    free (needle);
79607    return result;
79608
79609  ;
79610  return 0;
79611}
79612_ACEOF
79613if ac_fn_c_try_run "$LINENO"; then :
79614  gl_cv_func_strstr_linear=yes
79615else
79616  gl_cv_func_strstr_linear=no
79617fi
79618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
79619  conftest.$ac_objext conftest.beam conftest.$ac_ext
79620fi
79621
79622
79623fi
79624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
79625$as_echo "$gl_cv_func_strstr_linear" >&6; }
79626    case "$gl_cv_func_strstr_linear" in
79627      *yes) ;;
79628      *)
79629        REPLACE_STRSTR=1
79630        ;;
79631    esac
79632  fi
79633
79634  if test $REPLACE_STRSTR = 1; then
79635
79636
79637
79638
79639
79640
79641
79642
79643  gtpo_LIBOBJS="$gtpo_LIBOBJS strstr.$ac_objext"
79644
79645  fi
79646
79647
79648
79649  if test $REPLACE_MEMCHR = 1; then
79650    REPLACE_STRSTR=1
79651  else
79652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
79653$as_echo_n "checking whether strstr works... " >&6; }
79654if ${gl_cv_func_strstr_works_always+:} false; then :
79655  $as_echo_n "(cached) " >&6
79656else
79657  if test "$cross_compiling" = yes; then :
79658                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79659/* end confdefs.h.  */
79660
79661#ifdef __GNU_LIBRARY__
79662 #include <features.h>
79663 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
79664     || defined __UCLIBC__
79665  Lucky user
79666 #endif
79667#elif defined __CYGWIN__
79668 #include <cygwin/version.h>
79669 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
79670  Lucky user
79671 #endif
79672#else
79673  Lucky user
79674#endif
79675
79676_ACEOF
79677if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
79678  $EGREP "Lucky user" >/dev/null 2>&1; then :
79679  gl_cv_func_strstr_works_always="guessing yes"
79680else
79681  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
79682fi
79683rm -f conftest*
79684
79685
79686else
79687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79688/* end confdefs.h.  */
79689
79690#include <string.h> /* for strstr */
79691#ifdef __GNU_LIBRARY__
79692 #include <features.h>
79693 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
79694  Unlucky user
79695 #endif
79696#endif
79697#define P "_EF_BF_BD"
79698#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
79699#define NEEDLE P P P P P
79700
79701int
79702main ()
79703{
79704return !!strstr (HAYSTACK, NEEDLE);
79705
79706  ;
79707  return 0;
79708}
79709_ACEOF
79710if ac_fn_c_try_run "$LINENO"; then :
79711  gl_cv_func_strstr_works_always=yes
79712else
79713  gl_cv_func_strstr_works_always=no
79714fi
79715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
79716  conftest.$ac_objext conftest.beam conftest.$ac_ext
79717fi
79718
79719
79720fi
79721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
79722$as_echo "$gl_cv_func_strstr_works_always" >&6; }
79723    case "$gl_cv_func_strstr_works_always" in
79724      *yes) ;;
79725      *)
79726        REPLACE_STRSTR=1
79727        ;;
79728    esac
79729  fi
79730
79731  if test $REPLACE_STRSTR = 1; then
79732
79733
79734
79735
79736
79737
79738
79739
79740  gtpo_LIBOBJS="$gtpo_LIBOBJS strstr.$ac_objext"
79741
79742  fi
79743
79744
79745
79746
79747
79748          GNULIB_STRSTR=1
79749
79750
79751
79752
79753
79754$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
79755
79756
79757
79758
79759
79760
79761
79762
79763
79764
79765
79766
79767
79768
79769
79770
79771
79772     if test $gl_cv_have_include_next = yes; then
79773       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
79774     else
79775       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
79776$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
79777if ${gl_cv_next_sys_stat_h+:} false; then :
79778  $as_echo_n "(cached) " >&6
79779else
79780
79781             if test $ac_cv_header_sys_stat_h = yes; then
79782
79783
79784
79785
79786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79787/* end confdefs.h.  */
79788#include <sys/stat.h>
79789_ACEOF
79790                case "$host_os" in
79791    aix*) gl_absname_cpp="$ac_cpp -C" ;;
79792    *)    gl_absname_cpp="$ac_cpp" ;;
79793  esac
79794
79795  case "$host_os" in
79796    mingw*)
79797                                          gl_dirsep_regex='[/\\]'
79798      ;;
79799    *)
79800      gl_dirsep_regex='\/'
79801      ;;
79802  esac
79803      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
79804  gl_header_literal_regex=`echo 'sys/stat.h' \
79805                           | sed -e "$gl_make_literal_regex_sed"`
79806  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
79807      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
79808      s|^/[^/]|//&|
79809      p
79810      q
79811    }'
79812
79813        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
79814  sed -n "$gl_absolute_header_sed"`
79815
79816           gl_header=$gl_cv_absolute_sys_stat_h
79817           gl_cv_next_sys_stat_h='"'$gl_header'"'
79818          else
79819               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
79820             fi
79821
79822
79823fi
79824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
79825$as_echo "$gl_cv_next_sys_stat_h" >&6; }
79826     fi
79827     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
79828
79829     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
79830       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
79831       gl_next_as_first_directive='<'sys/stat.h'>'
79832     else
79833       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
79834       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
79835     fi
79836     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
79837
79838
79839
79840
79841
79842
79843
79844
79845    WINDOWS_STAT_TIMESPEC=0
79846
79847
79848
79849
79850
79851
79852
79853
79854      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
79855     #include <sys/stat.h>
79856"
79857if test "x$ac_cv_type_nlink_t" = xyes; then :
79858
79859else
79860
79861$as_echo "#define nlink_t int" >>confdefs.h
79862
79863fi
79864
79865
79866
79867
79868
79869
79870
79871
79872
79873
79874
79875
79876
79877
79878
79879
79880
79881
79882
79883
79884      if  { test "$HAVE_LIBUNISTRING" != yes \
79885    || {
79886
79887
79888
79889            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
79890            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
79891                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
79892                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
79893                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
79894                         }
79895                    }
79896               }
79897
79898
79899
79900
79901       }
79902  }; then
79903    LIBUNISTRING_UNICONV_H='uniconv.h'
79904  else
79905    LIBUNISTRING_UNICONV_H=
79906  fi
79907
79908
79909
79910
79911       if  { test "$HAVE_LIBUNISTRING" != yes \
79912    || {
79913
79914
79915
79916            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
79917            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
79918                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
79919                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
79920                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
79921                         }
79922                    }
79923               }
79924
79925
79926
79927
79928       }
79929  }; then
79930  LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_TRUE=
79931  LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_FALSE='#'
79932else
79933  LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_TRUE='#'
79934  LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_FALSE=
79935fi
79936
79937
79938
79939
79940      if  { test "$HAVE_LIBUNISTRING" != yes \
79941    || {
79942
79943
79944
79945            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
79946            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
79947                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
79948                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
79949                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
79950                         }
79951                    }
79952               }
79953
79954
79955
79956
79957       }
79958  }; then
79959    LIBUNISTRING_UNICTYPE_H='unictype.h'
79960  else
79961    LIBUNISTRING_UNICTYPE_H=
79962  fi
79963
79964
79965
79966
79967
79968       if  { test "$HAVE_LIBUNISTRING" != yes \
79969    || {
79970
79971
79972
79973            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
79974            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
79975                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
79976                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
79977                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
79978                         }
79979                    }
79980               }
79981
79982
79983
79984
79985       }
79986  }; then
79987  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_ALPHA_TRUE=
79988  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_ALPHA_FALSE='#'
79989else
79990  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_ALPHA_TRUE='#'
79991  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_ALPHA_FALSE=
79992fi
79993
79994
79995
79996
79997
79998       if  { test "$HAVE_LIBUNISTRING" != yes \
79999    || {
80000
80001
80002
80003            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80004            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80005                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80006                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80007                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
80008                         }
80009                    }
80010               }
80011
80012
80013
80014
80015       }
80016  }; then
80017  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_TRUE=
80018  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_FALSE='#'
80019else
80020  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_TRUE='#'
80021  LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_FALSE=
80022fi
80023
80024
80025
80026
80027      if  { test "$HAVE_LIBUNISTRING" != yes \
80028    || {
80029
80030
80031
80032            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80033            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80034                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80035                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80036                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
80037                         }
80038                    }
80039               }
80040
80041
80042
80043
80044       }
80045  }; then
80046    LIBUNISTRING_UNILBRK_H='unilbrk.h'
80047  else
80048    LIBUNISTRING_UNILBRK_H=
80049  fi
80050
80051
80052
80053
80054
80055       if  { test "$HAVE_LIBUNISTRING" != yes \
80056    || {
80057
80058
80059
80060            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80061            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80062                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80063                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80064                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
80065                         }
80066                    }
80067               }
80068
80069
80070
80071
80072       }
80073  }; then
80074  LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_TRUE=
80075  LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_FALSE='#'
80076else
80077  LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_TRUE='#'
80078  LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_FALSE=
80079fi
80080
80081
80082
80083
80084       if  { test "$HAVE_LIBUNISTRING" != yes \
80085    || {
80086
80087
80088
80089            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80090            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80091                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80092                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80093                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
80094                         }
80095                    }
80096               }
80097
80098
80099
80100
80101       }
80102  }; then
80103  LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_TRUE=
80104  LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_FALSE='#'
80105else
80106  LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_TRUE='#'
80107  LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_FALSE=
80108fi
80109
80110
80111
80112
80113       if  { test "$HAVE_LIBUNISTRING" != yes \
80114    || {
80115
80116
80117
80118            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80119            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80120                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80121                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80122                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
80123                         }
80124                    }
80125               }
80126
80127
80128
80129
80130       }
80131  }; then
80132  LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_TRUE=
80133  LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_FALSE='#'
80134else
80135  LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_TRUE='#'
80136  LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_FALSE=
80137fi
80138
80139
80140
80141
80142
80143
80144
80145
80146
80147
80148
80149
80150
80151
80152     if test $gl_cv_have_include_next = yes; then
80153       gl_cv_next_unistd_h='<'unistd.h'>'
80154     else
80155       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
80156$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
80157if ${gl_cv_next_unistd_h+:} false; then :
80158  $as_echo_n "(cached) " >&6
80159else
80160
80161             if test $ac_cv_header_unistd_h = yes; then
80162
80163
80164
80165
80166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
80167/* end confdefs.h.  */
80168#include <unistd.h>
80169_ACEOF
80170                case "$host_os" in
80171    aix*) gl_absname_cpp="$ac_cpp -C" ;;
80172    *)    gl_absname_cpp="$ac_cpp" ;;
80173  esac
80174
80175  case "$host_os" in
80176    mingw*)
80177                                          gl_dirsep_regex='[/\\]'
80178      ;;
80179    *)
80180      gl_dirsep_regex='\/'
80181      ;;
80182  esac
80183      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
80184  gl_header_literal_regex=`echo 'unistd.h' \
80185                           | sed -e "$gl_make_literal_regex_sed"`
80186  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
80187      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
80188      s|^/[^/]|//&|
80189      p
80190      q
80191    }'
80192
80193        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
80194  sed -n "$gl_absolute_header_sed"`
80195
80196           gl_header=$gl_cv_absolute_unistd_h
80197           gl_cv_next_unistd_h='"'$gl_header'"'
80198          else
80199               gl_cv_next_unistd_h='<'unistd.h'>'
80200             fi
80201
80202
80203fi
80204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
80205$as_echo "$gl_cv_next_unistd_h" >&6; }
80206     fi
80207     NEXT_UNISTD_H=$gl_cv_next_unistd_h
80208
80209     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
80210       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
80211       gl_next_as_first_directive='<'unistd.h'>'
80212     else
80213       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
80214       gl_next_as_first_directive=$gl_cv_next_unistd_h
80215     fi
80216     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
80217
80218
80219
80220
80221  if test $ac_cv_header_unistd_h = yes; then
80222    HAVE_UNISTD_H=1
80223  else
80224    HAVE_UNISTD_H=0
80225  fi
80226
80227
80228
80229
80230
80231
80232
80233
80234
80235
80236
80237
80238
80239
80240      if  { test "$HAVE_LIBUNISTRING" != yes \
80241    || {
80242
80243
80244
80245            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80246            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80247                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80248                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80249                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
80250                         }
80251                    }
80252               }
80253
80254
80255
80256
80257       }
80258  }; then
80259    LIBUNISTRING_UNISTR_H='unistr.h'
80260  else
80261    LIBUNISTRING_UNISTR_H=
80262  fi
80263
80264
80265
80266
80267cat >>confdefs.h <<_ACEOF
80268#define GNULIB_UNISTR_U16_MBTOUC 1
80269_ACEOF
80270
80271
80272
80273
80274       if  { test "$HAVE_LIBUNISTRING" != yes \
80275    || {
80276
80277
80278
80279            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80280            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80281                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80282                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80283                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
80284                         }
80285                    }
80286               }
80287
80288
80289
80290
80291       }
80292  }; then
80293  LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_TRUE=
80294  LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_FALSE='#'
80295else
80296  LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_TRUE='#'
80297  LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_FALSE=
80298fi
80299
80300
80301
80302
80303       if  { test "$HAVE_LIBUNISTRING" != yes \
80304    || {
80305
80306
80307
80308            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80309            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80310                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80311                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80312                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
80313                         }
80314                    }
80315               }
80316
80317
80318
80319
80320       }
80321  }; then
80322  LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_TRUE=
80323  LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_FALSE='#'
80324else
80325  LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_TRUE='#'
80326  LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_FALSE=
80327fi
80328
80329
80330
80331
80332       if  { test "$HAVE_LIBUNISTRING" != yes \
80333    || {
80334
80335
80336
80337            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80338            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80339                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80340                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80341                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
80342                         }
80343                    }
80344               }
80345
80346
80347
80348
80349       }
80350  }; then
80351  LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_TRUE=
80352  LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_FALSE='#'
80353else
80354  LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_TRUE='#'
80355  LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_FALSE=
80356fi
80357
80358
80359
80360
80361cat >>confdefs.h <<_ACEOF
80362#define GNULIB_UNISTR_U8_MBTOUC 1
80363_ACEOF
80364
80365
80366
80367
80368       if  { test "$HAVE_LIBUNISTRING" != yes \
80369    || {
80370
80371
80372
80373            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80374            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80375                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80376                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80377                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
80378                         }
80379                    }
80380               }
80381
80382
80383
80384
80385       }
80386  }; then
80387  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_TRUE=
80388  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_FALSE='#'
80389else
80390  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_TRUE='#'
80391  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_FALSE=
80392fi
80393
80394
80395
80396
80397cat >>confdefs.h <<_ACEOF
80398#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1
80399_ACEOF
80400
80401
80402
80403
80404       if  { test "$HAVE_LIBUNISTRING" != yes \
80405    || {
80406
80407
80408
80409            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80410            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80411                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80412                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80413                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
80414                         }
80415                    }
80416               }
80417
80418
80419
80420
80421       }
80422  }; then
80423  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE=
80424  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE='#'
80425else
80426  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE='#'
80427  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE=
80428fi
80429
80430
80431
80432
80433cat >>confdefs.h <<_ACEOF
80434#define GNULIB_UNISTR_U8_MBTOUCR 1
80435_ACEOF
80436
80437
80438
80439
80440       if  { test "$HAVE_LIBUNISTRING" != yes \
80441    || {
80442
80443
80444
80445            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80446            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80447                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80448                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80449                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
80450                         }
80451                    }
80452               }
80453
80454
80455
80456
80457       }
80458  }; then
80459  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
80460  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
80461else
80462  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
80463  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
80464fi
80465
80466
80467
80468
80469       if  { test "$HAVE_LIBUNISTRING" != yes \
80470    || {
80471
80472
80473
80474            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80475            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80476                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80477                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80478                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
80479                         }
80480                    }
80481               }
80482
80483
80484
80485
80486       }
80487  }; then
80488  LIBUNISTRING_COMPILE_UNISTR_U8_NEXT_TRUE=
80489  LIBUNISTRING_COMPILE_UNISTR_U8_NEXT_FALSE='#'
80490else
80491  LIBUNISTRING_COMPILE_UNISTR_U8_NEXT_TRUE='#'
80492  LIBUNISTRING_COMPILE_UNISTR_U8_NEXT_FALSE=
80493fi
80494
80495
80496
80497
80498       if  { test "$HAVE_LIBUNISTRING" != yes \
80499    || {
80500
80501
80502
80503            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80504            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80505                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80506                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80507                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
80508                         }
80509                    }
80510               }
80511
80512
80513
80514
80515       }
80516  }; then
80517  LIBUNISTRING_COMPILE_UNISTR_U8_PREV_TRUE=
80518  LIBUNISTRING_COMPILE_UNISTR_U8_PREV_FALSE='#'
80519else
80520  LIBUNISTRING_COMPILE_UNISTR_U8_PREV_TRUE='#'
80521  LIBUNISTRING_COMPILE_UNISTR_U8_PREV_FALSE=
80522fi
80523
80524
80525
80526
80527       if  { test "$HAVE_LIBUNISTRING" != yes \
80528    || {
80529
80530
80531
80532            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80533            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80534                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80535                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80536                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
80537                         }
80538                    }
80539               }
80540
80541
80542
80543
80544       }
80545  }; then
80546  LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC_TRUE=
80547  LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC_FALSE='#'
80548else
80549  LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC_TRUE='#'
80550  LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC_FALSE=
80551fi
80552
80553
80554
80555
80556cat >>confdefs.h <<_ACEOF
80557#define GNULIB_UNISTR_U8_UCTOMB 1
80558_ACEOF
80559
80560
80561
80562
80563       if  { test "$HAVE_LIBUNISTRING" != yes \
80564    || {
80565
80566
80567
80568            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80569            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80570                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80571                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80572                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
80573                         }
80574                    }
80575               }
80576
80577
80578
80579
80580       }
80581  }; then
80582  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
80583  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
80584else
80585  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
80586  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
80587fi
80588
80589
80590
80591
80592      if  { test "$HAVE_LIBUNISTRING" != yes \
80593    || {
80594
80595
80596
80597            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80598            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80599                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80600                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80601                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
80602                         }
80603                    }
80604               }
80605
80606
80607
80608
80609       }
80610  }; then
80611    LIBUNISTRING_UNITYPES_H='unitypes.h'
80612  else
80613    LIBUNISTRING_UNITYPES_H=
80614  fi
80615
80616
80617
80618
80619      if  { test "$HAVE_LIBUNISTRING" != yes \
80620    || {
80621
80622
80623
80624            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80625            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80626                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80627                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80628                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
80629                         }
80630                    }
80631               }
80632
80633
80634
80635
80636       }
80637  }; then
80638    LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
80639  else
80640    LIBUNISTRING_UNIWIDTH_H=
80641  fi
80642
80643
80644
80645
80646       if  { test "$HAVE_LIBUNISTRING" != yes \
80647    || {
80648
80649
80650
80651            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
80652            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
80653                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
80654                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
80655                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
80656                         }
80657                    }
80658               }
80659
80660
80661
80662
80663       }
80664  }; then
80665  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
80666  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
80667else
80668  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
80669  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
80670fi
80671
80672
80673
80674
80675$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
80676
80677
80678
80679
80680
80681
80682
80683
80684
80685
80686
80687
80688
80689
80690
80691
80692
80693
80694
80695
80696
80697  if test $ac_cv_func_vasnprintf = no; then
80698
80699
80700
80701
80702
80703
80704
80705
80706
80707
80708  gtpo_LIBOBJS="$gtpo_LIBOBJS vasnprintf.$ac_objext"
80709
80710
80711
80712
80713
80714
80715
80716
80717
80718  gtpo_LIBOBJS="$gtpo_LIBOBJS printf-args.$ac_objext"
80719
80720
80721
80722
80723
80724
80725
80726
80727
80728  gtpo_LIBOBJS="$gtpo_LIBOBJS printf-parse.$ac_objext"
80729
80730
80731
80732
80733
80734
80735
80736
80737
80738  gtpo_LIBOBJS="$gtpo_LIBOBJS asnprintf.$ac_objext"
80739
80740  if test $ac_cv_func_vasnprintf = yes; then
80741
80742$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
80743
80744  fi
80745
80746
80747
80748
80749
80750
80751
80752
80753
80754  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
80755if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
80756
80757else
80758
80759$as_echo "#define ptrdiff_t long" >>confdefs.h
80760
80761
80762fi
80763
80764
80765
80766
80767
80768
80769
80770  fi
80771
80772
80773  for ac_func in vasprintf
80774do :
80775  ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
80776if test "x$ac_cv_func_vasprintf" = xyes; then :
80777  cat >>confdefs.h <<_ACEOF
80778#define HAVE_VASPRINTF 1
80779_ACEOF
80780
80781fi
80782done
80783
80784  if test $ac_cv_func_vasprintf = no; then
80785
80786
80787
80788
80789
80790
80791
80792
80793
80794  gtpo_LIBOBJS="$gtpo_LIBOBJS vasprintf.$ac_objext"
80795
80796
80797
80798
80799
80800
80801
80802
80803
80804  gtpo_LIBOBJS="$gtpo_LIBOBJS asprintf.$ac_objext"
80805
80806
80807  if test $ac_cv_func_vasprintf = yes; then
80808    REPLACE_VASPRINTF=1
80809  else
80810    HAVE_VASPRINTF=0
80811  fi
80812
80813
80814
80815
80816
80817
80818
80819
80820  fi
80821
80822
80823
80824
80825
80826
80827          GNULIB_VASPRINTF=1
80828
80829
80830
80831
80832
80833$as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
80834
80835
80836
80837
80838
80839  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
80840
80841
80842
80843  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
80844
80845
80846
80847
80848
80849
80850
80851
80852
80853
80854
80855
80856
80857     if test $gl_cv_have_include_next = yes; then
80858       gl_cv_next_wchar_h='<'wchar.h'>'
80859     else
80860       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
80861$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
80862if ${gl_cv_next_wchar_h+:} false; then :
80863  $as_echo_n "(cached) " >&6
80864else
80865
80866             if test $ac_cv_header_wchar_h = yes; then
80867
80868
80869
80870
80871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
80872/* end confdefs.h.  */
80873#include <wchar.h>
80874_ACEOF
80875                case "$host_os" in
80876    aix*) gl_absname_cpp="$ac_cpp -C" ;;
80877    *)    gl_absname_cpp="$ac_cpp" ;;
80878  esac
80879
80880  case "$host_os" in
80881    mingw*)
80882                                          gl_dirsep_regex='[/\\]'
80883      ;;
80884    *)
80885      gl_dirsep_regex='\/'
80886      ;;
80887  esac
80888      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
80889  gl_header_literal_regex=`echo 'wchar.h' \
80890                           | sed -e "$gl_make_literal_regex_sed"`
80891  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
80892      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
80893      s|^/[^/]|//&|
80894      p
80895      q
80896    }'
80897
80898        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
80899  sed -n "$gl_absolute_header_sed"`
80900
80901           gl_header=$gl_cv_absolute_wchar_h
80902           gl_cv_next_wchar_h='"'$gl_header'"'
80903          else
80904               gl_cv_next_wchar_h='<'wchar.h'>'
80905             fi
80906
80907
80908fi
80909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
80910$as_echo "$gl_cv_next_wchar_h" >&6; }
80911     fi
80912     NEXT_WCHAR_H=$gl_cv_next_wchar_h
80913
80914     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
80915       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
80916       gl_next_as_first_directive='<'wchar.h'>'
80917     else
80918       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
80919       gl_next_as_first_directive=$gl_cv_next_wchar_h
80920     fi
80921     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
80922
80923
80924
80925
80926  if test $ac_cv_header_wchar_h = yes; then
80927    HAVE_WCHAR_H=1
80928  else
80929    HAVE_WCHAR_H=0
80930  fi
80931
80932
80933
80934
80935
80936  if test $gt_cv_c_wint_t = yes; then
80937    HAVE_WINT_T=1
80938  else
80939    HAVE_WINT_T=0
80940  fi
80941
80942
80943
80944
80945
80946
80947
80948
80949
80950
80951
80952
80953
80954
80955
80956  if test $ac_cv_func_iswcntrl = yes; then
80957    HAVE_ISWCNTRL=1
80958  else
80959    HAVE_ISWCNTRL=0
80960  fi
80961
80962
80963
80964  if test $gt_cv_c_wint_t = yes; then
80965    HAVE_WINT_T=1
80966  else
80967    HAVE_WINT_T=0
80968  fi
80969
80970
80971
80972
80973
80974
80975
80976
80977
80978
80979
80980
80981
80982     if test $gl_cv_have_include_next = yes; then
80983       gl_cv_next_wctype_h='<'wctype.h'>'
80984     else
80985       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
80986$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
80987if ${gl_cv_next_wctype_h+:} false; then :
80988  $as_echo_n "(cached) " >&6
80989else
80990
80991             if test $ac_cv_header_wctype_h = yes; then
80992
80993
80994
80995
80996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
80997/* end confdefs.h.  */
80998#include <wctype.h>
80999_ACEOF
81000                case "$host_os" in
81001    aix*) gl_absname_cpp="$ac_cpp -C" ;;
81002    *)    gl_absname_cpp="$ac_cpp" ;;
81003  esac
81004
81005  case "$host_os" in
81006    mingw*)
81007                                          gl_dirsep_regex='[/\\]'
81008      ;;
81009    *)
81010      gl_dirsep_regex='\/'
81011      ;;
81012  esac
81013      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
81014  gl_header_literal_regex=`echo 'wctype.h' \
81015                           | sed -e "$gl_make_literal_regex_sed"`
81016  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
81017      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
81018      s|^/[^/]|//&|
81019      p
81020      q
81021    }'
81022
81023        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
81024  sed -n "$gl_absolute_header_sed"`
81025
81026           gl_header=$gl_cv_absolute_wctype_h
81027           gl_cv_next_wctype_h='"'$gl_header'"'
81028          else
81029               gl_cv_next_wctype_h='<'wctype.h'>'
81030             fi
81031
81032
81033fi
81034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
81035$as_echo "$gl_cv_next_wctype_h" >&6; }
81036     fi
81037     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
81038
81039     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
81040       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
81041       gl_next_as_first_directive='<'wctype.h'>'
81042     else
81043       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
81044       gl_next_as_first_directive=$gl_cv_next_wctype_h
81045     fi
81046     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
81047
81048
81049
81050
81051  if test $ac_cv_header_wctype_h = yes; then
81052    if test $ac_cv_func_iswcntrl = yes; then
81053                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
81054$as_echo_n "checking whether iswcntrl works... " >&6; }
81055if ${gl_cv_func_iswcntrl_works+:} false; then :
81056  $as_echo_n "(cached) " >&6
81057else
81058
81059          if test "$cross_compiling" = yes; then :
81060               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81061/* end confdefs.h.  */
81062#include <stdlib.h>
81063                          #if __GNU_LIBRARY__ == 1
81064                          Linux libc5 i18n is broken.
81065                          #endif
81066int
81067main ()
81068{
81069
81070  ;
81071  return 0;
81072}
81073_ACEOF
81074if ac_fn_c_try_compile "$LINENO"; then :
81075  gl_cv_func_iswcntrl_works="guessing yes"
81076else
81077  gl_cv_func_iswcntrl_works="guessing no"
81078fi
81079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81080
81081else
81082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81083/* end confdefs.h.  */
81084
81085               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
81086                  included before <wchar.h>.
81087                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
81088                  must be included before <wchar.h>.  */
81089               #include <stddef.h>
81090               #include <stdio.h>
81091               #include <time.h>
81092               #include <wchar.h>
81093               #include <wctype.h>
81094               int main () { return iswprint ('x') == 0; }
81095
81096_ACEOF
81097if ac_fn_c_try_run "$LINENO"; then :
81098  gl_cv_func_iswcntrl_works=yes
81099else
81100  gl_cv_func_iswcntrl_works=no
81101fi
81102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
81103  conftest.$ac_objext conftest.beam conftest.$ac_ext
81104fi
81105
81106
81107fi
81108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
81109$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
81110    fi
81111    HAVE_WCTYPE_H=1
81112  else
81113    HAVE_WCTYPE_H=0
81114  fi
81115
81116
81117  if test $GNULIB_OVERRIDES_WINT_T = 1; then
81118    REPLACE_ISWCNTRL=1
81119  else
81120    case "$gl_cv_func_iswcntrl_works" in
81121      *yes) REPLACE_ISWCNTRL=0 ;;
81122      *)    REPLACE_ISWCNTRL=1 ;;
81123    esac
81124  fi
81125
81126
81127  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
81128        :
81129  fi
81130
81131  if test $REPLACE_ISWCNTRL = 1; then
81132    REPLACE_TOWLOWER=1
81133  else
81134    for ac_func in towlower
81135do :
81136  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
81137if test "x$ac_cv_func_towlower" = xyes; then :
81138  cat >>confdefs.h <<_ACEOF
81139#define HAVE_TOWLOWER 1
81140_ACEOF
81141
81142fi
81143done
81144
81145    if test $ac_cv_func_towlower = yes; then
81146      REPLACE_TOWLOWER=0
81147    else
81148      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
81149             included before <wchar.h>.
81150             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
81151             must be included before <wchar.h>.  */
81152          #include <stddef.h>
81153          #include <stdio.h>
81154          #include <time.h>
81155          #include <wchar.h>
81156          #if HAVE_WCTYPE_H
81157          # include <wctype.h>
81158          #endif
81159
81160"
81161if test "x$ac_cv_have_decl_towlower" = xyes; then :
81162  ac_have_decl=1
81163else
81164  ac_have_decl=0
81165fi
81166
81167cat >>confdefs.h <<_ACEOF
81168#define HAVE_DECL_TOWLOWER $ac_have_decl
81169_ACEOF
81170
81171      if test $ac_cv_have_decl_towlower = yes; then
81172                                REPLACE_TOWLOWER=1
81173      else
81174        REPLACE_TOWLOWER=0
81175      fi
81176    fi
81177  fi
81178
81179
81180  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
81181        :
81182  fi
81183
81184          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
81185$as_echo_n "checking for wctype_t... " >&6; }
81186if ${gl_cv_type_wctype_t+:} false; then :
81187  $as_echo_n "(cached) " >&6
81188else
81189  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81190/* end confdefs.h.  */
81191/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
81192               included before <wchar.h>.
81193               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
81194               must be included before <wchar.h>.  */
81195            #include <stddef.h>
81196            #include <stdio.h>
81197            #include <time.h>
81198            #include <wchar.h>
81199            #if HAVE_WCTYPE_H
81200            # include <wctype.h>
81201            #endif
81202            wctype_t a;
81203
81204int
81205main ()
81206{
81207
81208  ;
81209  return 0;
81210}
81211_ACEOF
81212if ac_fn_c_try_compile "$LINENO"; then :
81213  gl_cv_type_wctype_t=yes
81214else
81215  gl_cv_type_wctype_t=no
81216fi
81217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81218
81219fi
81220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
81221$as_echo "$gl_cv_type_wctype_t" >&6; }
81222  if test $gl_cv_type_wctype_t = no; then
81223    HAVE_WCTYPE_T=0
81224  fi
81225
81226      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
81227$as_echo_n "checking for wctrans_t... " >&6; }
81228if ${gl_cv_type_wctrans_t+:} false; then :
81229  $as_echo_n "(cached) " >&6
81230else
81231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81232/* end confdefs.h.  */
81233/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
81234               included before <wchar.h>.
81235               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
81236               must be included before <wchar.h>.  */
81237            #include <stddef.h>
81238            #include <stdio.h>
81239            #include <time.h>
81240            #include <wchar.h>
81241            #include <wctype.h>
81242            wctrans_t a;
81243
81244int
81245main ()
81246{
81247
81248  ;
81249  return 0;
81250}
81251_ACEOF
81252if ac_fn_c_try_compile "$LINENO"; then :
81253  gl_cv_type_wctrans_t=yes
81254else
81255  gl_cv_type_wctrans_t=no
81256fi
81257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81258
81259fi
81260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
81261$as_echo "$gl_cv_type_wctrans_t" >&6; }
81262  if test $gl_cv_type_wctrans_t = no; then
81263    HAVE_WCTRANS_T=0
81264  fi
81265
81266
81267
81268
81269
81270
81271
81272
81273
81274
81275
81276
81277
81278
81279
81280
81281  ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
81282/* AIX 3.2.5 declares wcwidth in <string.h>. */
81283#include <string.h>
81284/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
81285   <wchar.h>.
81286   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
81287   before <wchar.h>.  */
81288#include <stddef.h>
81289#include <stdio.h>
81290#include <time.h>
81291#include <wchar.h>
81292
81293"
81294if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
81295  ac_have_decl=1
81296else
81297  ac_have_decl=0
81298fi
81299
81300cat >>confdefs.h <<_ACEOF
81301#define HAVE_DECL_WCWIDTH $ac_have_decl
81302_ACEOF
81303
81304  if test $ac_cv_have_decl_wcwidth != yes; then
81305    HAVE_DECL_WCWIDTH=0
81306  fi
81307
81308  if test $ac_cv_func_wcwidth != yes; then
81309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
81310$as_echo_n "checking whether wcwidth is a macro... " >&6; }
81311if ${gl_cv_func_wcwidth_macro+:} false; then :
81312  $as_echo_n "(cached) " >&6
81313else
81314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81315/* end confdefs.h.  */
81316
81317#include <wchar.h>
81318#ifdef wcwidth
81319 wchar_header_defines_wcwidth
81320#endif
81321_ACEOF
81322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81323  $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1; then :
81324  gl_cv_func_wcwidth_macro=yes
81325else
81326  gl_cv_func_wcwidth_macro=no
81327fi
81328rm -f conftest*
81329
81330
81331fi
81332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
81333$as_echo "$gl_cv_func_wcwidth_macro" >&6; }
81334  fi
81335
81336  if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
81337    HAVE_WCWIDTH=1
81338                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
81339$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
81340if ${gl_cv_func_wcwidth_works+:} false; then :
81341  $as_echo_n "(cached) " >&6
81342else
81343
81344        if test "$cross_compiling" = yes; then :
81345
81346           case "$host_os" in
81347                            # Guess yes on glibc systems.
81348             *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
81349                            # Guess yes on musl systems.
81350             *-musl*)       gl_cv_func_wcwidth_works="guessing yes";;
81351                            # Guess yes on AIX 7 systems.
81352             aix[7-9]*)     gl_cv_func_wcwidth_works="guessing yes";;
81353             *)             gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
81354           esac
81355
81356else
81357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81358/* end confdefs.h.  */
81359
81360#include <locale.h>
81361/* AIX 3.2.5 declares wcwidth in <string.h>. */
81362#include <string.h>
81363/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
81364   <wchar.h>.
81365   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
81366   before <wchar.h>.  */
81367#include <stddef.h>
81368#include <stdio.h>
81369#include <time.h>
81370#include <wchar.h>
81371#if !HAVE_DECL_WCWIDTH
81372extern
81373# ifdef __cplusplus
81374"C"
81375# endif
81376int wcwidth (int);
81377#endif
81378int main ()
81379{
81380  int result = 0;
81381  if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
81382    {
81383      if (wcwidth (0x0301) > 0)
81384        result |= 1;
81385      if (wcwidth (0x05B0) > 0)
81386        result |= 2;
81387      if (wcwidth (0x200B) > 0)
81388        result |= 4;
81389      if (wcwidth (0xFF1A) == 0)
81390        result |= 8;
81391      if (wcwidth (0x2202) > 1)
81392        result |= 16;
81393    }
81394  return result;
81395}
81396_ACEOF
81397if ac_fn_c_try_run "$LINENO"; then :
81398  gl_cv_func_wcwidth_works=yes
81399else
81400  gl_cv_func_wcwidth_works=no
81401fi
81402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
81403  conftest.$ac_objext conftest.beam conftest.$ac_ext
81404fi
81405
81406
81407fi
81408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
81409$as_echo "$gl_cv_func_wcwidth_works" >&6; }
81410    case "$gl_cv_func_wcwidth_works" in
81411      *yes) ;;
81412      *no) REPLACE_WCWIDTH=1 ;;
81413    esac
81414  else
81415    HAVE_WCWIDTH=0
81416  fi
81417
81418  if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
81419
81420
81421
81422
81423
81424
81425
81426
81427  gtpo_LIBOBJS="$gtpo_LIBOBJS wcwidth.$ac_objext"
81428
81429
81430
81431  :
81432
81433  fi
81434
81435
81436
81437
81438
81439          GNULIB_WCWIDTH=1
81440
81441
81442
81443
81444
81445$as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
81446
81447
81448
81449
81450  case "$host_os" in
81451    mingw*)
81452
81453
81454
81455
81456
81457
81458
81459
81460  gtpo_LIBOBJS="$gtpo_LIBOBJS windows-mutex.$ac_objext"
81461
81462      ;;
81463  esac
81464
81465  case "$host_os" in
81466    mingw*)
81467
81468
81469
81470
81471
81472
81473
81474
81475  gtpo_LIBOBJS="$gtpo_LIBOBJS windows-once.$ac_objext"
81476
81477      ;;
81478  esac
81479
81480  case "$host_os" in
81481    mingw*)
81482
81483
81484
81485
81486
81487
81488
81489
81490  gtpo_LIBOBJS="$gtpo_LIBOBJS windows-recmutex.$ac_objext"
81491
81492      ;;
81493  esac
81494
81495  case "$host_os" in
81496    mingw*)
81497
81498
81499
81500
81501
81502
81503
81504
81505  gtpo_LIBOBJS="$gtpo_LIBOBJS windows-rwlock.$ac_objext"
81506
81507      ;;
81508  esac
81509
81510  case "$host_os" in
81511    mingw*)
81512
81513
81514
81515
81516
81517
81518
81519
81520  gtpo_LIBOBJS="$gtpo_LIBOBJS windows-tls.$ac_objext"
81521
81522      ;;
81523  esac
81524
81525
81526
81527  for ac_header in stdint.h
81528do :
81529  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
81530if test "x$ac_cv_header_stdint_h" = xyes; then :
81531  cat >>confdefs.h <<_ACEOF
81532#define HAVE_STDINT_H 1
81533_ACEOF
81534
81535fi
81536
81537done
81538
81539
81540  :
81541
81542
81543  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
81544
81545  # End of code from modules
81546
81547
81548
81549
81550
81551
81552
81553
81554
81555  gltests_libdeps=
81556  gltests_ltlibdeps=
81557
81558
81559
81560
81561
81562
81563
81564
81565
81566
81567  gl_source_base='tests'
81568  gtpotests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
81569
81570  gl_module_indicator_condition=$gtpotests_WITNESS
81571
81572
81573
81574
81575
81576
81577
81578
81579
81580
81581
81582for ac_header in pwd.h
81583do :
81584  ac_fn_c_check_header_mongrel "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
81585if test "x$ac_cv_header_pwd_h" = xyes; then :
81586  cat >>confdefs.h <<_ACEOF
81587#define HAVE_PWD_H 1
81588_ACEOF
81589
81590fi
81591
81592done
81593
81594
81595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
81596$as_echo_n "checking for inline... " >&6; }
81597if ${ac_cv_c_inline+:} false; then :
81598  $as_echo_n "(cached) " >&6
81599else
81600  ac_cv_c_inline=no
81601for ac_kw in inline __inline__ __inline; do
81602  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81603/* end confdefs.h.  */
81604#ifndef __cplusplus
81605typedef int foo_t;
81606static $ac_kw foo_t static_foo () {return 0; }
81607$ac_kw foo_t foo () {return 0; }
81608#endif
81609
81610_ACEOF
81611if ac_fn_c_try_compile "$LINENO"; then :
81612  ac_cv_c_inline=$ac_kw
81613fi
81614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81615  test "$ac_cv_c_inline" != no && break
81616done
81617
81618fi
81619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
81620$as_echo "$ac_cv_c_inline" >&6; }
81621
81622case $ac_cv_c_inline in
81623  inline | yes) ;;
81624  *)
81625    case $ac_cv_c_inline in
81626      no) ac_val=;;
81627      *) ac_val=$ac_cv_c_inline;;
81628    esac
81629    cat >>confdefs.h <<_ACEOF
81630#ifndef __cplusplus
81631#define inline $ac_val
81632#endif
81633_ACEOF
81634    ;;
81635esac
81636
81637
81638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
81639$as_echo_n "checking for unsigned long long int... " >&6; }
81640if ${ac_cv_type_unsigned_long_long_int+:} false; then :
81641  $as_echo_n "(cached) " >&6
81642else
81643  ac_cv_type_unsigned_long_long_int=yes
81644     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
81645       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81646/* end confdefs.h.  */
81647
81648  /* For now, do not test the preprocessor; as of 2007 there are too many
81649	 implementations with broken preprocessors.  Perhaps this can
81650	 be revisited in 2012.  In the meantime, code should not expect
81651	 #if to work with literals wider than 32 bits.  */
81652      /* Test literals.  */
81653      long long int ll = 9223372036854775807ll;
81654      long long int nll = -9223372036854775807LL;
81655      unsigned long long int ull = 18446744073709551615ULL;
81656      /* Test constant expressions.   */
81657      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
81658		     ? 1 : -1)];
81659      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
81660		     ? 1 : -1)];
81661      int i = 63;
81662int
81663main ()
81664{
81665/* Test availability of runtime routines for shift and division.  */
81666      long long int llmax = 9223372036854775807ll;
81667      unsigned long long int ullmax = 18446744073709551615ull;
81668      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
81669	      | (llmax / ll) | (llmax % ll)
81670	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
81671	      | (ullmax / ull) | (ullmax % ull));
81672  ;
81673  return 0;
81674}
81675
81676_ACEOF
81677if ac_fn_c_try_link "$LINENO"; then :
81678
81679else
81680  ac_cv_type_unsigned_long_long_int=no
81681fi
81682rm -f core conftest.err conftest.$ac_objext \
81683    conftest$ac_exeext conftest.$ac_ext
81684     fi
81685fi
81686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
81687$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
81688  if test $ac_cv_type_unsigned_long_long_int = yes; then
81689
81690$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
81691
81692  fi
81693
81694ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
81695if test "x$ac_cv_type_size_t" = xyes; then :
81696
81697else
81698
81699cat >>confdefs.h <<_ACEOF
81700#define size_t unsigned int
81701_ACEOF
81702
81703fi
81704
81705ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
81706if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
81707
81708cat >>confdefs.h <<_ACEOF
81709#define HAVE_PTRDIFF_T 1
81710_ACEOF
81711
81712
81713fi
81714
81715
81716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
81717$as_echo_n "checking for ssize_t... " >&6; }
81718if ${gt_cv_ssize_t+:} false; then :
81719  $as_echo_n "(cached) " >&6
81720else
81721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81722/* end confdefs.h.  */
81723#include <sys/types.h>
81724int
81725main ()
81726{
81727int x = sizeof (ssize_t *) + sizeof (ssize_t);
81728            return !x;
81729  ;
81730  return 0;
81731}
81732_ACEOF
81733if ac_fn_c_try_compile "$LINENO"; then :
81734  gt_cv_ssize_t=yes
81735else
81736  gt_cv_ssize_t=no
81737fi
81738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
81739fi
81740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
81741$as_echo "$gt_cv_ssize_t" >&6; }
81742  if test $gt_cv_ssize_t = no; then
81743
81744$as_echo "#define ssize_t int" >>confdefs.h
81745
81746  fi
81747
81748ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
81749if test "x$ac_cv_type_pid_t" = xyes; then :
81750
81751else
81752
81753cat >>confdefs.h <<_ACEOF
81754#define pid_t int
81755_ACEOF
81756
81757fi
81758
81759
81760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
81761$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
81762if ${ac_cv_gnu_library_2_1+:} false; then :
81763  $as_echo_n "(cached) " >&6
81764else
81765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81766/* end confdefs.h.  */
81767
81768#include <features.h>
81769#ifdef __GNU_LIBRARY__
81770 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
81771  Lucky GNU user
81772 #endif
81773#endif
81774#ifdef __UCLIBC__
81775 Lucky user
81776#endif
81777
81778_ACEOF
81779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
81780  $EGREP "Lucky" >/dev/null 2>&1; then :
81781  ac_cv_gnu_library_2_1=yes
81782else
81783  ac_cv_gnu_library_2_1=no
81784fi
81785rm -f conftest*
81786
81787
81788
81789fi
81790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
81791$as_echo "$ac_cv_gnu_library_2_1" >&6; }
81792
81793    GLIBC21="$ac_cv_gnu_library_2_1"
81794
81795
81796
81797for ac_func in select
81798do :
81799  ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
81800if test "x$ac_cv_func_select" = xyes; then :
81801  cat >>confdefs.h <<_ACEOF
81802#define HAVE_SELECT 1
81803_ACEOF
81804
81805fi
81806done
81807
81808for ac_header in vfork.h
81809do :
81810  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
81811if test "x$ac_cv_header_vfork_h" = xyes; then :
81812  cat >>confdefs.h <<_ACEOF
81813#define HAVE_VFORK_H 1
81814_ACEOF
81815
81816fi
81817
81818done
81819
81820for ac_func in fork vfork
81821do :
81822  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
81823ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
81824if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
81825  cat >>confdefs.h <<_ACEOF
81826#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
81827_ACEOF
81828
81829fi
81830done
81831
81832if test "x$ac_cv_func_fork" = xyes; then
81833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
81834$as_echo_n "checking for working fork... " >&6; }
81835if ${ac_cv_func_fork_works+:} false; then :
81836  $as_echo_n "(cached) " >&6
81837else
81838  if test "$cross_compiling" = yes; then :
81839  ac_cv_func_fork_works=cross
81840else
81841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81842/* end confdefs.h.  */
81843$ac_includes_default
81844int
81845main ()
81846{
81847
81848	  /* By Ruediger Kuhlmann. */
81849	  return fork () < 0;
81850
81851  ;
81852  return 0;
81853}
81854_ACEOF
81855if ac_fn_c_try_run "$LINENO"; then :
81856  ac_cv_func_fork_works=yes
81857else
81858  ac_cv_func_fork_works=no
81859fi
81860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
81861  conftest.$ac_objext conftest.beam conftest.$ac_ext
81862fi
81863
81864fi
81865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
81866$as_echo "$ac_cv_func_fork_works" >&6; }
81867
81868else
81869  ac_cv_func_fork_works=$ac_cv_func_fork
81870fi
81871if test "x$ac_cv_func_fork_works" = xcross; then
81872  case $host in
81873    *-*-amigaos* | *-*-msdosdjgpp*)
81874      # Override, as these systems have only a dummy fork() stub
81875      ac_cv_func_fork_works=no
81876      ;;
81877    *)
81878      ac_cv_func_fork_works=yes
81879      ;;
81880  esac
81881  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
81882$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
81883fi
81884ac_cv_func_vfork_works=$ac_cv_func_vfork
81885if test "x$ac_cv_func_vfork" = xyes; then
81886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
81887$as_echo_n "checking for working vfork... " >&6; }
81888if ${ac_cv_func_vfork_works+:} false; then :
81889  $as_echo_n "(cached) " >&6
81890else
81891  if test "$cross_compiling" = yes; then :
81892  ac_cv_func_vfork_works=cross
81893else
81894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81895/* end confdefs.h.  */
81896/* Thanks to Paul Eggert for this test.  */
81897$ac_includes_default
81898#include <sys/wait.h>
81899#ifdef HAVE_VFORK_H
81900# include <vfork.h>
81901#endif
81902/* On some sparc systems, changes by the child to local and incoming
81903   argument registers are propagated back to the parent.  The compiler
81904   is told about this with #include <vfork.h>, but some compilers
81905   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
81906   static variable whose address is put into a register that is
81907   clobbered by the vfork.  */
81908static void
81909#ifdef __cplusplus
81910sparc_address_test (int arg)
81911# else
81912sparc_address_test (arg) int arg;
81913#endif
81914{
81915  static pid_t child;
81916  if (!child) {
81917    child = vfork ();
81918    if (child < 0) {
81919      perror ("vfork");
81920      _exit(2);
81921    }
81922    if (!child) {
81923      arg = getpid();
81924      write(-1, "", 0);
81925      _exit (arg);
81926    }
81927  }
81928}
81929
81930int
81931main ()
81932{
81933  pid_t parent = getpid ();
81934  pid_t child;
81935
81936  sparc_address_test (0);
81937
81938  child = vfork ();
81939
81940  if (child == 0) {
81941    /* Here is another test for sparc vfork register problems.  This
81942       test uses lots of local variables, at least as many local
81943       variables as main has allocated so far including compiler
81944       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
81945       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
81946       reuse the register of parent for one of the local variables,
81947       since it will think that parent can't possibly be used any more
81948       in this routine.  Assigning to the local variable will thus
81949       munge parent in the parent process.  */
81950    pid_t
81951      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
81952      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
81953    /* Convince the compiler that p..p7 are live; otherwise, it might
81954       use the same hardware register for all 8 local variables.  */
81955    if (p != p1 || p != p2 || p != p3 || p != p4
81956	|| p != p5 || p != p6 || p != p7)
81957      _exit(1);
81958
81959    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
81960       from child file descriptors.  If the child closes a descriptor
81961       before it execs or exits, this munges the parent's descriptor
81962       as well.  Test for this by closing stdout in the child.  */
81963    _exit(close(fileno(stdout)) != 0);
81964  } else {
81965    int status;
81966    struct stat st;
81967
81968    while (wait(&status) != child)
81969      ;
81970    return (
81971	 /* Was there some problem with vforking?  */
81972	 child < 0
81973
81974	 /* Did the child fail?  (This shouldn't happen.)  */
81975	 || status
81976
81977	 /* Did the vfork/compiler bug occur?  */
81978	 || parent != getpid()
81979
81980	 /* Did the file descriptor bug occur?  */
81981	 || fstat(fileno(stdout), &st) != 0
81982	 );
81983  }
81984}
81985_ACEOF
81986if ac_fn_c_try_run "$LINENO"; then :
81987  ac_cv_func_vfork_works=yes
81988else
81989  ac_cv_func_vfork_works=no
81990fi
81991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
81992  conftest.$ac_objext conftest.beam conftest.$ac_ext
81993fi
81994
81995fi
81996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
81997$as_echo "$ac_cv_func_vfork_works" >&6; }
81998
81999fi;
82000if test "x$ac_cv_func_fork_works" = xcross; then
82001  ac_cv_func_vfork_works=$ac_cv_func_vfork
82002  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
82003$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
82004fi
82005
82006if test "x$ac_cv_func_vfork_works" = xyes; then
82007
82008$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
82009
82010else
82011
82012$as_echo "#define vfork fork" >>confdefs.h
82013
82014fi
82015if test "x$ac_cv_func_fork_works" = xyes; then
82016
82017$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
82018
82019fi
82020
82021
82022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signal handlers with siginfo_t" >&5
82023$as_echo_n "checking for signal handlers with siginfo_t... " >&6; }
82024if ${gt_cv_siginfo_t+:} false; then :
82025  $as_echo_n "(cached) " >&6
82026else
82027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82028/* end confdefs.h.  */
82029
82030#include <signal.h>
82031int
82032main ()
82033{
82034
82035struct sigaction action;
82036siginfo_t info;
82037action.sa_flags = SA_SIGINFO;
82038action.sa_sigaction = (void *) 0;
82039
82040  ;
82041  return 0;
82042}
82043_ACEOF
82044if ac_fn_c_try_compile "$LINENO"; then :
82045  gt_cv_siginfo_t=yes
82046else
82047  gt_cv_siginfo_t=no
82048fi
82049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
82050fi
82051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_siginfo_t" >&5
82052$as_echo "$gt_cv_siginfo_t" >&6; }
82053  if test $gt_cv_siginfo_t = yes; then
82054
82055$as_echo "#define HAVE_SIGINFO 1" >>confdefs.h
82056
82057  fi
82058
82059
82060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setlocale declaration" >&5
82061$as_echo_n "checking for setlocale declaration... " >&6; }
82062if ${gt_cv_proto_setlocale+:} false; then :
82063  $as_echo_n "(cached) " >&6
82064else
82065
82066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82067/* end confdefs.h.  */
82068
82069#include <stdlib.h>
82070#include <locale.h>
82071extern
82072#ifdef __cplusplus
82073"C"
82074#endif
82075#if defined(__STDC__) || defined(__cplusplus)
82076char *setlocale (int category, char *locale);
82077#else
82078char *setlocale();
82079#endif
82080
82081int
82082main ()
82083{
82084
82085  ;
82086  return 0;
82087}
82088_ACEOF
82089if ac_fn_c_try_compile "$LINENO"; then :
82090  gt_cv_proto_setlocale_arg1=""
82091else
82092  gt_cv_proto_setlocale_arg1="const"
82093fi
82094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
82095gt_cv_proto_setlocale="extern char *setlocale (int category, $gt_cv_proto_setlocale_arg1 char *locale);"
82096fi
82097
82098gt_cv_proto_setlocale=`echo "$gt_cv_proto_setlocale" | tr -s ' ' | sed -e 's/( /(/'`
82099{ $as_echo "$as_me:${as_lineno-$LINENO}: result:
82100         $gt_cv_proto_setlocale" >&5
82101$as_echo "
82102         $gt_cv_proto_setlocale" >&6; }
82103
82104cat >>confdefs.h <<_ACEOF
82105#define SETLOCALE_CONST $gt_cv_proto_setlocale_arg1
82106_ACEOF
82107
82108
82109
82110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
82111$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
82112if ${ac_cv_c_bigendian+:} false; then :
82113  $as_echo_n "(cached) " >&6
82114else
82115  ac_cv_c_bigendian=unknown
82116    # See if we're dealing with a universal compiler.
82117    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82118/* end confdefs.h.  */
82119#ifndef __APPLE_CC__
82120	       not a universal capable compiler
82121	     #endif
82122	     typedef int dummy;
82123
82124_ACEOF
82125if ac_fn_c_try_compile "$LINENO"; then :
82126
82127	# Check for potential -arch flags.  It is not universal unless
82128	# there are at least two -arch flags with different values.
82129	ac_arch=
82130	ac_prev=
82131	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
82132	 if test -n "$ac_prev"; then
82133	   case $ac_word in
82134	     i?86 | x86_64 | ppc | ppc64)
82135	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
82136		 ac_arch=$ac_word
82137	       else
82138		 ac_cv_c_bigendian=universal
82139		 break
82140	       fi
82141	       ;;
82142	   esac
82143	   ac_prev=
82144	 elif test "x$ac_word" = "x-arch"; then
82145	   ac_prev=arch
82146	 fi
82147       done
82148fi
82149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
82150    if test $ac_cv_c_bigendian = unknown; then
82151      # See if sys/param.h defines the BYTE_ORDER macro.
82152      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82153/* end confdefs.h.  */
82154#include <sys/types.h>
82155	     #include <sys/param.h>
82156
82157int
82158main ()
82159{
82160#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
82161		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
82162		     && LITTLE_ENDIAN)
82163	      bogus endian macros
82164	     #endif
82165
82166  ;
82167  return 0;
82168}
82169_ACEOF
82170if ac_fn_c_try_compile "$LINENO"; then :
82171  # It does; now see whether it defined to BIG_ENDIAN or not.
82172	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82173/* end confdefs.h.  */
82174#include <sys/types.h>
82175		#include <sys/param.h>
82176
82177int
82178main ()
82179{
82180#if BYTE_ORDER != BIG_ENDIAN
82181		 not big endian
82182		#endif
82183
82184  ;
82185  return 0;
82186}
82187_ACEOF
82188if ac_fn_c_try_compile "$LINENO"; then :
82189  ac_cv_c_bigendian=yes
82190else
82191  ac_cv_c_bigendian=no
82192fi
82193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
82194fi
82195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
82196    fi
82197    if test $ac_cv_c_bigendian = unknown; then
82198      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
82199      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82200/* end confdefs.h.  */
82201#include <limits.h>
82202
82203int
82204main ()
82205{
82206#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
82207	      bogus endian macros
82208	     #endif
82209
82210  ;
82211  return 0;
82212}
82213_ACEOF
82214if ac_fn_c_try_compile "$LINENO"; then :
82215  # It does; now see whether it defined to _BIG_ENDIAN or not.
82216	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82217/* end confdefs.h.  */
82218#include <limits.h>
82219
82220int
82221main ()
82222{
82223#ifndef _BIG_ENDIAN
82224		 not big endian
82225		#endif
82226
82227  ;
82228  return 0;
82229}
82230_ACEOF
82231if ac_fn_c_try_compile "$LINENO"; then :
82232  ac_cv_c_bigendian=yes
82233else
82234  ac_cv_c_bigendian=no
82235fi
82236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
82237fi
82238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
82239    fi
82240    if test $ac_cv_c_bigendian = unknown; then
82241      # Compile a test program.
82242      if test "$cross_compiling" = yes; then :
82243  # Try to guess by grepping values from an object file.
82244	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82245/* end confdefs.h.  */
82246short int ascii_mm[] =
82247		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
82248		short int ascii_ii[] =
82249		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
82250		int use_ascii (int i) {
82251		  return ascii_mm[i] + ascii_ii[i];
82252		}
82253		short int ebcdic_ii[] =
82254		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
82255		short int ebcdic_mm[] =
82256		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
82257		int use_ebcdic (int i) {
82258		  return ebcdic_mm[i] + ebcdic_ii[i];
82259		}
82260		extern int foo;
82261
82262int
82263main ()
82264{
82265return use_ascii (foo) == use_ebcdic (foo);
82266  ;
82267  return 0;
82268}
82269_ACEOF
82270if ac_fn_c_try_compile "$LINENO"; then :
82271  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
82272	      ac_cv_c_bigendian=yes
82273	    fi
82274	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
82275	      if test "$ac_cv_c_bigendian" = unknown; then
82276		ac_cv_c_bigendian=no
82277	      else
82278		# finding both strings is unlikely to happen, but who knows?
82279		ac_cv_c_bigendian=unknown
82280	      fi
82281	    fi
82282fi
82283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
82284else
82285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82286/* end confdefs.h.  */
82287$ac_includes_default
82288int
82289main ()
82290{
82291
82292	     /* Are we little or big endian?  From Harbison&Steele.  */
82293	     union
82294	     {
82295	       long int l;
82296	       char c[sizeof (long int)];
82297	     } u;
82298	     u.l = 1;
82299	     return u.c[sizeof (long int) - 1] == 1;
82300
82301  ;
82302  return 0;
82303}
82304_ACEOF
82305if ac_fn_c_try_run "$LINENO"; then :
82306  ac_cv_c_bigendian=no
82307else
82308  ac_cv_c_bigendian=yes
82309fi
82310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
82311  conftest.$ac_objext conftest.beam conftest.$ac_ext
82312fi
82313
82314    fi
82315fi
82316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
82317$as_echo "$ac_cv_c_bigendian" >&6; }
82318 case $ac_cv_c_bigendian in #(
82319   yes)
82320     endianness=1;; #(
82321   no)
82322     endianness=0 ;; #(
82323   universal)
82324     endianness=universal
82325     ;; #(
82326   *)
82327     echo "AC-C-BIGENDIAN fails to work on your system." | sed -e 's,-,_,g' 1>&2
82328   echo "Please report this as a bug to bug-autoconf@gnu.org" 1>&2
82329   exit 1 ;;
82330 esac
82331
82332if test $endianness != universal; then
82333
82334cat >>confdefs.h <<_ACEOF
82335#define ENDIANNESS $endianness
82336_ACEOF
82337
82338fi
82339
82340
82341
82342  for ac_header in arpa/inet.h
82343do :
82344  ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
82345if test "x$ac_cv_header_arpa_inet_h" = xyes; then :
82346  cat >>confdefs.h <<_ACEOF
82347#define HAVE_ARPA_INET_H 1
82348_ACEOF
82349
82350fi
82351
82352done
82353
82354  for ac_func in gethostname gethostbyname inet_ntop
82355do :
82356  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
82357ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
82358if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
82359  cat >>confdefs.h <<_ACEOF
82360#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
82361_ACEOF
82362
82363fi
82364done
82365
82366
82367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
82368$as_echo_n "checking for IPv6 sockets... " >&6; }
82369  if ${gt_cv_socket_ipv6+:} false; then :
82370  $as_echo_n "(cached) " >&6
82371else
82372
82373    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82374/* end confdefs.h.  */
82375
82376#include <sys/types.h>
82377#include <sys/socket.h>
82378#include <netinet/in.h>
82379int
82380main ()
82381{
82382int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
82383  ;
82384  return 0;
82385}
82386_ACEOF
82387if ac_fn_c_try_compile "$LINENO"; then :
82388  gt_cv_socket_ipv6=yes
82389else
82390  gt_cv_socket_ipv6=no
82391fi
82392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
82393
82394fi
82395
82396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_socket_ipv6" >&5
82397$as_echo "$gt_cv_socket_ipv6" >&6; }
82398  if test $gt_cv_socket_ipv6 = yes; then
82399
82400$as_echo "#define HAVE_IPV6 1" >>confdefs.h
82401
82402  fi
82403
82404
82405if test "$gl_cv_libxml_use_included" = yes && test "$enable_shared" != yes; then
82406
82407$as_echo "#define LIBXML_STATIC 1" >>confdefs.h
82408
82409fi
82410
82411if test "$enable_shared" = yes; then
82412  case "$host_os" in
82413    mingw* | cygwin*) is_woe32dll=yes ;;
82414    *) is_woe32dll=no ;;
82415  esac
82416else
82417  is_woe32dll=no
82418fi
82419 if test $is_woe32dll = yes; then
82420  WOE32DLL_TRUE=
82421  WOE32DLL_FALSE='#'
82422else
82423  WOE32DLL_TRUE='#'
82424  WOE32DLL_FALSE=
82425fi
82426
82427if test $is_woe32dll = yes; then
82428
82429$as_echo "#define WOE32DLL 1" >>confdefs.h
82430
82431fi
82432
82433GETTEXTLIB_EXPORTS_FLAGS=
82434if test -n "$GETOPT_H"; then
82435  GETTEXTLIB_EXPORTS_FLAGS="-DGNULIB_DEFINED_GETOPT $GETTEXTLIB_EXPORTS_FLAGS"
82436fi
82437if test "$ac_cv_lib_error_at_line" = no; then
82438  GETTEXTLIB_EXPORTS_FLAGS="-DGNULIB_DEFINED_ERROR $GETTEXTLIB_EXPORTS_FLAGS"
82439fi
82440
82441if test "$USER_LABEL_PREFIX" = _; then
82442  GETTEXTLIB_EXPORTS_FLAGS="-DUSER_LABEL_PREFIX_UNDERSCORE $GETTEXTLIB_EXPORTS_FLAGS"
82443fi
82444
82445
82446if test "$ac_cv_lib_error_at_line" = no; then
82447
82448$as_echo "#define GNULIB_REPLACE_ERROR 1" >>confdefs.h
82449
82450fi
82451
82452
82453
82454
82455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
82456$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
82457if ${lt_cv_path_NM+:} false; then :
82458  $as_echo_n "(cached) " >&6
82459else
82460  if test -n "$NM"; then
82461  # Let the user override the test.
82462  lt_cv_path_NM=$NM
82463else
82464  lt_nm_to_check=${ac_tool_prefix}nm
82465  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
82466    lt_nm_to_check="$lt_nm_to_check nm"
82467  fi
82468  for lt_tmp_nm in $lt_nm_to_check; do
82469    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
82470    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
82471      IFS=$lt_save_ifs
82472      test -z "$ac_dir" && ac_dir=.
82473      tmp_nm=$ac_dir/$lt_tmp_nm
82474      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
82475	# Check to see if the nm accepts a BSD-compat flag.
82476	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
82477	#   nm: unknown option "B" ignored
82478	# Tru64's nm complains that /dev/null is an invalid object file
82479	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
82480	case $build_os in
82481	mingw*) lt_bad_file=conftest.nm/nofile ;;
82482	*) lt_bad_file=/dev/null ;;
82483	esac
82484	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
82485	*$lt_bad_file* | *'Invalid file or object type'*)
82486	  lt_cv_path_NM="$tmp_nm -B"
82487	  break 2
82488	  ;;
82489	*)
82490	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
82491	  */dev/null*)
82492	    lt_cv_path_NM="$tmp_nm -p"
82493	    break 2
82494	    ;;
82495	  *)
82496	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
82497	    continue # so that we can try to find one that supports BSD flags
82498	    ;;
82499	  esac
82500	  ;;
82501	esac
82502      fi
82503    done
82504    IFS=$lt_save_ifs
82505  done
82506  : ${lt_cv_path_NM=no}
82507fi
82508fi
82509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
82510$as_echo "$lt_cv_path_NM" >&6; }
82511if test no != "$lt_cv_path_NM"; then
82512  NM=$lt_cv_path_NM
82513else
82514  # Didn't find any BSD compatible name lister, look for dumpbin.
82515  if test -n "$DUMPBIN"; then :
82516    # Let the user override the test.
82517  else
82518    if test -n "$ac_tool_prefix"; then
82519  for ac_prog in dumpbin "link -dump"
82520  do
82521    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
82522set dummy $ac_tool_prefix$ac_prog; ac_word=$2
82523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
82524$as_echo_n "checking for $ac_word... " >&6; }
82525if ${ac_cv_prog_DUMPBIN+:} false; then :
82526  $as_echo_n "(cached) " >&6
82527else
82528  if test -n "$DUMPBIN"; then
82529  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
82530else
82531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82532for as_dir in $PATH
82533do
82534  IFS=$as_save_IFS
82535  test -z "$as_dir" && as_dir=.
82536    for ac_exec_ext in '' $ac_executable_extensions; do
82537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
82538    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
82539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
82540    break 2
82541  fi
82542done
82543  done
82544IFS=$as_save_IFS
82545
82546fi
82547fi
82548DUMPBIN=$ac_cv_prog_DUMPBIN
82549if test -n "$DUMPBIN"; then
82550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
82551$as_echo "$DUMPBIN" >&6; }
82552else
82553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
82554$as_echo "no" >&6; }
82555fi
82556
82557
82558    test -n "$DUMPBIN" && break
82559  done
82560fi
82561if test -z "$DUMPBIN"; then
82562  ac_ct_DUMPBIN=$DUMPBIN
82563  for ac_prog in dumpbin "link -dump"
82564do
82565  # Extract the first word of "$ac_prog", so it can be a program name with args.
82566set dummy $ac_prog; ac_word=$2
82567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
82568$as_echo_n "checking for $ac_word... " >&6; }
82569if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
82570  $as_echo_n "(cached) " >&6
82571else
82572  if test -n "$ac_ct_DUMPBIN"; then
82573  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
82574else
82575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82576for as_dir in $PATH
82577do
82578  IFS=$as_save_IFS
82579  test -z "$as_dir" && as_dir=.
82580    for ac_exec_ext in '' $ac_executable_extensions; do
82581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
82582    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
82583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
82584    break 2
82585  fi
82586done
82587  done
82588IFS=$as_save_IFS
82589
82590fi
82591fi
82592ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
82593if test -n "$ac_ct_DUMPBIN"; then
82594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
82595$as_echo "$ac_ct_DUMPBIN" >&6; }
82596else
82597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
82598$as_echo "no" >&6; }
82599fi
82600
82601
82602  test -n "$ac_ct_DUMPBIN" && break
82603done
82604
82605  if test "x$ac_ct_DUMPBIN" = x; then
82606    DUMPBIN=":"
82607  else
82608    case $cross_compiling:$ac_tool_warned in
82609yes:)
82610{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
82611$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
82612ac_tool_warned=yes ;;
82613esac
82614    DUMPBIN=$ac_ct_DUMPBIN
82615  fi
82616fi
82617
82618    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
82619    *COFF*)
82620      DUMPBIN="$DUMPBIN -symbols -headers"
82621      ;;
82622    *)
82623      DUMPBIN=:
82624      ;;
82625    esac
82626  fi
82627
82628  if test : != "$DUMPBIN"; then
82629    NM=$DUMPBIN
82630  fi
82631fi
82632test -z "$NM" && NM=nm
82633
82634
82635
82636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
82637$as_echo_n "checking the name lister ($NM) interface... " >&6; }
82638if ${lt_cv_nm_interface+:} false; then :
82639  $as_echo_n "(cached) " >&6
82640else
82641  lt_cv_nm_interface="BSD nm"
82642  echo "int some_variable = 0;" > conftest.$ac_ext
82643  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
82644  (eval "$ac_compile" 2>conftest.err)
82645  cat conftest.err >&5
82646  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
82647  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
82648  cat conftest.err >&5
82649  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
82650  cat conftest.out >&5
82651  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
82652    lt_cv_nm_interface="MS dumpbin"
82653  fi
82654  rm -f conftest*
82655fi
82656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
82657$as_echo "$lt_cv_nm_interface" >&6; }
82658
82659
82660
82661     GLOBAL_SYMBOL_PIPE=$lt_cv_sys_global_symbol_pipe
82662
82663  if test -n "$GLOBAL_SYMBOL_PIPE"; then
82664    HAVE_GLOBAL_SYMBOL_PIPE=1
82665  else
82666    HAVE_GLOBAL_SYMBOL_PIPE=
82667  fi
82668
82669
82670
82671
82672# Check whether --with-emacs was given.
82673if test "${with_emacs+set}" = set; then :
82674  withval=$with_emacs; gt_use_emacs=$withval
82675else
82676  gt_use_emacs=yes
82677fi
82678
82679if test "$EMACS" != no; then
82680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Emacs support is requested" >&5
82681$as_echo_n "checking whether Emacs support is requested... " >&6; }
82682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_use_emacs" >&5
82683$as_echo "$gt_use_emacs" >&6; }
82684  if test "$gt_use_emacs" = no; then
82685    EMACS=no
82686  fi
82687fi
82688if test "$EMACS" != no; then
82689   # If set to t, that means we are running in a shell under Emacs.
82690 # If you have an Emacs named "t", then use the full path.
82691 test x"$EMACS" = xt && EMACS=
82692 for ac_prog in emacs xemacs
82693do
82694  # Extract the first word of "$ac_prog", so it can be a program name with args.
82695set dummy $ac_prog; ac_word=$2
82696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
82697$as_echo_n "checking for $ac_word... " >&6; }
82698if ${ac_cv_prog_EMACS+:} false; then :
82699  $as_echo_n "(cached) " >&6
82700else
82701  if test -n "$EMACS"; then
82702  ac_cv_prog_EMACS="$EMACS" # Let the user override the test.
82703else
82704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82705for as_dir in $PATH
82706do
82707  IFS=$as_save_IFS
82708  test -z "$as_dir" && as_dir=.
82709    for ac_exec_ext in '' $ac_executable_extensions; do
82710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
82711    ac_cv_prog_EMACS="$ac_prog"
82712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
82713    break 2
82714  fi
82715done
82716  done
82717IFS=$as_save_IFS
82718
82719fi
82720fi
82721EMACS=$ac_cv_prog_EMACS
82722if test -n "$EMACS"; then
82723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5
82724$as_echo "$EMACS" >&6; }
82725else
82726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
82727$as_echo "no" >&6; }
82728fi
82729
82730
82731  test -n "$EMACS" && break
82732done
82733test -n "$EMACS" || EMACS="no"
82734
82735
82736
82737
82738# Check whether --with-lispdir was given.
82739if test "${with_lispdir+set}" = set; then :
82740  withval=$with_lispdir;  lispdir="$withval"
82741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5
82742$as_echo_n "checking where .elc files should go... " >&6; }
82743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lispdir" >&5
82744$as_echo "$lispdir" >&6; }
82745else
82746
82747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5
82748$as_echo_n "checking where .elc files should go... " >&6; }
82749if ${am_cv_lispdir+:} false; then :
82750  $as_echo_n "(cached) " >&6
82751else
82752
82753   if test $EMACS != "no"; then
82754     if test x${lispdir+set} != xset; then
82755  # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly
82756  # Some emacsen will start up in interactive mode, requiring C-x C-c to exit,
82757  #  which is non-obvious for non-emacs users.
82758  # Redirecting /dev/null should help a bit; pity we can't detect "broken"
82759  #  emacsen earlier and avoid running this altogether.
82760  { { $as_echo "$as_me:${as_lineno-$LINENO}: \$EMACS -batch -Q -eval '(while load-path (princ (concat (car load-path) \"\\n\")) (setq load-path (cdr load-path)))' </dev/null >conftest.out"; } >&5
82761  ($EMACS -batch -Q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out) 2>&5
82762  ac_status=$?
82763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
82764  test $ac_status = 0; }
82765	am_cv_lispdir=`sed -n \
82766       -e 's,/$,,' \
82767       -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \
82768       -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;}' \
82769       conftest.out`
82770       rm conftest.out
82771     fi
82772   fi
82773   test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp'
82774
82775fi
82776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_lispdir" >&5
82777$as_echo "$am_cv_lispdir" >&6; }
82778  lispdir="$am_cv_lispdir"
82779
82780fi
82781
82782
82783
82784fi
82785
82786aclocaldir='${datadir}/aclocal'
82787
82788
82789
82790# Check whether --with-git was given.
82791if test "${with_git+set}" = set; then :
82792  withval=$with_git; gt_use_git=$withval
82793else
82794  gt_use_git=maybe
82795fi
82796
82797
82798# Check whether --with-cvs was given.
82799if test "${with_cvs+set}" = set; then :
82800  withval=$with_cvs; gt_use_cvs=$withval
82801else
82802  gt_use_cvs=no
82803fi
82804
82805
82806# Check whether --with-bzip2 was given.
82807if test "${with_bzip2+set}" = set; then :
82808  withval=$with_bzip2; gt_use_bzip2=$withval
82809else
82810  gt_use_bzip2=maybe
82811fi
82812
82813
82814# Check whether --with-xz was given.
82815if test "${with_xz+set}" = set; then :
82816  withval=$with_xz; gt_use_xz=$withval
82817else
82818  gt_use_xz=maybe
82819fi
82820
82821# The CVS format is deprecated, because "cvs init" does not work in all
82822# circumstances
82823# (see <https://lists.gnu.org/archive/html/bug-cvs/2010-05/msg00003.html>)
82824# and we are not allowed to distribute the cvs infrastructure files ourselves
82825# (see <https://lists.gnu.org/archive/html/bug-cvs/2010-06/msg00011.html>).
82826#
82827# With the archive from version 0.18.1, we can observe the following
82828# compression rates:
82829#    Size           File
82830#  16916480   archive.dir.tar
82831#   3528757   archive.dir.tar.gz
82832#   2621440   archive.cvs.tar
82833#   2082492   archive.dir.tar.bz2
82834#    696320   archive.git.tar
82835#    599046   archive.git.tar.bz2
82836#    592989   archive.git.tar.gz
82837#    588124   archive.git.tar.xz
82838#    457190   archive.cvs.tar.gz
82839#    335808   archive.cvs.tar.bz2
82840#    308880   archive.dir.tar.xz
82841#    299124   archive.cvs.tar.xz
82842# Among these:
82843#   - We don't offer the uncompressed ones, because at least gzip can be
82844#     assumed to be present everywhere.
82845#   - Among archive.git.tar.*, all have approximately the same size, because
82846#     git already compresses most of its repository data. Offer only .gz here.
82847#   - Among archive.cvs.tar.*, offer only .gz, for simplicity, since --with-cvs
82848#     is deprecated.
82849# The remaining ones are:
82850#    Size           File            ARCHIVE_FORMAT
82851#   3528757   archive.dir.tar.gz      dirgz
82852#   2082492   archive.dir.tar.bz2     dirbz2
82853#    592989   archive.git.tar.gz      git
82854#    457190   archive.cvs.tar.gz      cvs
82855#    308880   archive.dir.tar.xz      dirxz
82856if test "$gt_use_xz" != no && test "$gt_use_xz" != maybe; then
82857  # --with-xz is specified. Even if --with-git or --with-cvs or --with-bzip2 is
82858  # also specified, we use the dirxz format.
82859  ARCHIVE_FORMAT=dirxz
82860else
82861  if test "$gt_use_git" != no && test "$gt_use_git" != maybe; then
82862    # --with-git is specified. Even if --with-cvs or --with-bzip2 is also
82863    # specified, we use the git format.
82864    ARCHIVE_FORMAT=git
82865  else
82866    if test "$gt_use_cvs" != no; then
82867      # --with-cvs is specified. Even if --with-bzip2 is also specified, we use
82868      # the cvs format.
82869      ARCHIVE_FORMAT=cvs
82870    else
82871      if test "$gt_use_bzip2" != no && test "$gt_use_bzip2" != maybe; then
82872        # --with-bzip2 is specified. We use the dirbz2 format.
82873        ARCHIVE_FORMAT=dirbz2
82874      else
82875        # Neither --with-git nor --with-cvs nor --with-bzip2 nor --with-xz is
82876        # specified. Determine which programs are present.
82877        if test "$gt_use_xz" != no \
82878           && (xz --version) >/dev/null 2>&1 \
82879           && xz --version | grep lzma >/dev/null; then
82880          # --without-xz is not specified, and the xz program exists.
82881          ARCHIVE_FORMAT=dirxz
82882        else
82883          # --without-xz is specified, or the xz program is missing.
82884          if test "$gt_use_git" != no \
82885             && (git --version) >/dev/null 2>&1 \
82886             && { case `git --version | sed -e 's/^[^0-9]*//'` in
82887                    0.* | 1.[0-5].*) false ;;
82888                    *) true ;;
82889                  esac
82890                }; then
82891            # --without-git is not specified, and the git program exists
82892            # in version 1.6 or newer. Use git format.
82893            ARCHIVE_FORMAT=git
82894          else
82895            # --without-git is specified, or the git program is missing.
82896            if test "$gt_use_bzip2" != no \
82897               && (: | bzip2 --version) >/dev/null 2>&1 \
82898               && { sed_bzip2_version1='s/ \([0-9][0-9.]*\).*/ \1/'
82899                    sed_bzip2_version2='s/^.* //'
82900                    case `(: | bzip2 --version) 2>&1 \
82901                          | sed -e 1q \
82902                          | sed -e "$sed_bzip2_version1" -e "$sed_bzip2_version2"` in
82903                      0.*) false ;;
82904                      *) true ;;
82905                    esac
82906                  }; then
82907              # --without-bzip2 is not specified, and the bzip2 program exists
82908              # in version 1.0 or newer. Use dirbz2 format.
82909              ARCHIVE_FORMAT=dirbz2
82910            else
82911              # --without-bzip2 is specified, or the bzip2 program is missing.
82912              ARCHIVE_FORMAT=dirgz
82913            fi
82914          fi
82915        fi
82916      fi
82917    fi
82918  fi
82919fi
82920
82921
82922ARCHIVE_VERSION=0.21
82923
82924
82925PACKAGE_SUFFIX="-$ARCHIVE_VERSION"
82926
82927
82928cat >>confdefs.h <<_ACEOF
82929#define PACKAGE_SUFFIX "$PACKAGE_SUFFIX"
82930_ACEOF
82931
82932
82933ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
82934# Extract the first word of "dvips", so it can be a program name with args.
82935set dummy dvips; ac_word=$2
82936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
82937$as_echo_n "checking for $ac_word... " >&6; }
82938if ${ac_cv_path_DVIPS+:} false; then :
82939  $as_echo_n "(cached) " >&6
82940else
82941  case $DVIPS in
82942  [\\/]* | ?:[\\/]*)
82943  ac_cv_path_DVIPS="$DVIPS" # Let the user override the test with a path.
82944  ;;
82945  *)
82946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82947for as_dir in $PATH
82948do
82949  IFS=$as_save_IFS
82950  test -z "$as_dir" && as_dir=.
82951    for ac_exec_ext in '' $ac_executable_extensions; do
82952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
82953    ac_cv_path_DVIPS="$as_dir/$ac_word$ac_exec_ext"
82954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
82955    break 2
82956  fi
82957done
82958  done
82959IFS=$as_save_IFS
82960
82961  test -z "$ac_cv_path_DVIPS" && ac_cv_path_DVIPS="$ac_aux_dir_abs/missing dvips"
82962  ;;
82963esac
82964fi
82965DVIPS=$ac_cv_path_DVIPS
82966if test -n "$DVIPS"; then
82967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DVIPS" >&5
82968$as_echo "$DVIPS" >&6; }
82969else
82970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
82971$as_echo "no" >&6; }
82972fi
82973
82974
82975# Extract the first word of "texi2pdf", so it can be a program name with args.
82976set dummy texi2pdf; ac_word=$2
82977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
82978$as_echo_n "checking for $ac_word... " >&6; }
82979if ${ac_cv_path_TEXI2PDF+:} false; then :
82980  $as_echo_n "(cached) " >&6
82981else
82982  case $TEXI2PDF in
82983  [\\/]* | ?:[\\/]*)
82984  ac_cv_path_TEXI2PDF="$TEXI2PDF" # Let the user override the test with a path.
82985  ;;
82986  *)
82987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
82988for as_dir in $PATH
82989do
82990  IFS=$as_save_IFS
82991  test -z "$as_dir" && as_dir=.
82992    for ac_exec_ext in '' $ac_executable_extensions; do
82993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
82994    ac_cv_path_TEXI2PDF="$as_dir/$ac_word$ac_exec_ext"
82995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
82996    break 2
82997  fi
82998done
82999  done
83000IFS=$as_save_IFS
83001
83002  test -z "$ac_cv_path_TEXI2PDF" && ac_cv_path_TEXI2PDF="$ac_aux_dir_abs/missing texi2pdf"
83003  ;;
83004esac
83005fi
83006TEXI2PDF=$ac_cv_path_TEXI2PDF
83007if test -n "$TEXI2PDF"; then
83008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEXI2PDF" >&5
83009$as_echo "$TEXI2PDF" >&6; }
83010else
83011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
83012$as_echo "no" >&6; }
83013fi
83014
83015
83016# Extract the first word of "perl", so it can be a program name with args.
83017set dummy perl; ac_word=$2
83018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
83019$as_echo_n "checking for $ac_word... " >&6; }
83020if ${ac_cv_path_PERL+:} false; then :
83021  $as_echo_n "(cached) " >&6
83022else
83023  case $PERL in
83024  [\\/]* | ?:[\\/]*)
83025  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
83026  ;;
83027  *)
83028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
83029for as_dir in $PATH
83030do
83031  IFS=$as_save_IFS
83032  test -z "$as_dir" && as_dir=.
83033    for ac_exec_ext in '' $ac_executable_extensions; do
83034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
83035    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
83036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
83037    break 2
83038  fi
83039done
83040  done
83041IFS=$as_save_IFS
83042
83043  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="$ac_aux_dir_abs/missing perl"
83044  ;;
83045esac
83046fi
83047PERL=$ac_cv_path_PERL
83048if test -n "$PERL"; then
83049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
83050$as_echo "$PERL" >&6; }
83051else
83052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
83053$as_echo "no" >&6; }
83054fi
83055
83056
83057
83058CROSS_COMPILING=$cross_compiling
83059
83060
83061
83062
83063
83064  if test "$CXX_CHOICE" = no; then
83065    CXX=no
83066  fi
83067  if test -z "$CXX"; then
83068    if test -n "$CCC"; then
83069      CXX="$CCC"
83070    else
83071      if test -n "$ac_tool_prefix"; then
83072  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
83073  do
83074    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
83075set dummy $ac_tool_prefix$ac_prog; ac_word=$2
83076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
83077$as_echo_n "checking for $ac_word... " >&6; }
83078if ${ac_cv_prog_CXX+:} false; then :
83079  $as_echo_n "(cached) " >&6
83080else
83081  if test -n "$CXX"; then
83082  ac_cv_prog_CXX="$CXX" # Let the user override the test.
83083else
83084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
83085for as_dir in $PATH
83086do
83087  IFS=$as_save_IFS
83088  test -z "$as_dir" && as_dir=.
83089    for ac_exec_ext in '' $ac_executable_extensions; do
83090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
83091    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
83092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
83093    break 2
83094  fi
83095done
83096  done
83097IFS=$as_save_IFS
83098
83099fi
83100fi
83101CXX=$ac_cv_prog_CXX
83102if test -n "$CXX"; then
83103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
83104$as_echo "$CXX" >&6; }
83105else
83106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
83107$as_echo "no" >&6; }
83108fi
83109
83110
83111    test -n "$CXX" && break
83112  done
83113fi
83114if test -z "$CXX"; then
83115  ac_ct_CXX=$CXX
83116  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
83117do
83118  # Extract the first word of "$ac_prog", so it can be a program name with args.
83119set dummy $ac_prog; ac_word=$2
83120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
83121$as_echo_n "checking for $ac_word... " >&6; }
83122if ${ac_cv_prog_ac_ct_CXX+:} false; then :
83123  $as_echo_n "(cached) " >&6
83124else
83125  if test -n "$ac_ct_CXX"; then
83126  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
83127else
83128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
83129for as_dir in $PATH
83130do
83131  IFS=$as_save_IFS
83132  test -z "$as_dir" && as_dir=.
83133    for ac_exec_ext in '' $ac_executable_extensions; do
83134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
83135    ac_cv_prog_ac_ct_CXX="$ac_prog"
83136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
83137    break 2
83138  fi
83139done
83140  done
83141IFS=$as_save_IFS
83142
83143fi
83144fi
83145ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
83146if test -n "$ac_ct_CXX"; then
83147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
83148$as_echo "$ac_ct_CXX" >&6; }
83149else
83150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
83151$as_echo "no" >&6; }
83152fi
83153
83154
83155  test -n "$ac_ct_CXX" && break
83156done
83157
83158  if test "x$ac_ct_CXX" = x; then
83159    CXX=":"
83160  else
83161    case $cross_compiling:$ac_tool_warned in
83162yes:)
83163{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
83164$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
83165ac_tool_warned=yes ;;
83166esac
83167    CXX=$ac_ct_CXX
83168  fi
83169fi
83170
83171    fi
83172  fi
83173  if test "$CXX" != no; then
83174            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
83175$as_echo_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works... " >&6; }
83176    ac_ext=cpp
83177ac_cpp='$CXXCPP $CPPFLAGS'
83178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
83179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
83180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
83181
83182
83183
83184    echo 'int main () { return 0; }' > conftest.$ac_ext
83185    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
83186  (eval $ac_link) 2>&5
83187  ac_status=$?
83188  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
83189  test $ac_status = 0; } && test -s conftest$ac_exeext; then
83190      gl_cv_prog_ansicxx_works=yes
83191      if (./conftest; exit) 2>/dev/null; then
83192        gl_cv_prog_ansicxx_cross=no
83193      else
83194        gl_cv_prog_ansicxx_cross=yes
83195      fi
83196    else
83197      gl_cv_prog_ansicxx_works=no
83198    fi
83199    rm -fr conftest*
83200    ac_ext=c
83201ac_cpp='$CPP $CPPFLAGS'
83202ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
83203ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
83204ac_compiler_gnu=$ac_cv_c_compiler_gnu
83205
83206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_works" >&5
83207$as_echo "$gl_cv_prog_ansicxx_works" >&6; }
83208    if test $gl_cv_prog_ansicxx_works = no; then
83209      CXX=no
83210    else
83211                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports namespaces" >&5
83212$as_echo_n "checking whether the C++ compiler supports namespaces... " >&6; }
83213      ac_ext=cpp
83214ac_cpp='$CXXCPP $CPPFLAGS'
83215ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
83216ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
83217ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
83218
83219      cat <<EOF > conftest.$ac_ext
83220#include <iostream>
83221namespace test { using namespace std; }
83222std::ostream* ptr;
83223int main () { return 0; }
83224EOF
83225      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
83226  (eval $ac_link) 2>&5
83227  ac_status=$?
83228  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
83229  test $ac_status = 0; } && test -s conftest$ac_exeext; then
83230        gl_cv_prog_ansicxx_namespaces=yes
83231      else
83232        gl_cv_prog_ansicxx_namespaces=no
83233      fi
83234      rm -fr conftest*
83235      ac_ext=c
83236ac_cpp='$CPP $CPPFLAGS'
83237ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
83238ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
83239ac_compiler_gnu=$ac_cv_c_compiler_gnu
83240
83241      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_namespaces" >&5
83242$as_echo "$gl_cv_prog_ansicxx_namespaces" >&6; }
83243      if test $gl_cv_prog_ansicxx_namespaces = no; then
83244        CXX=no
83245      fi
83246    fi
83247  fi
83248
83249
83250
83251   if test "$CXX" != no; then
83252  ANSICXX_TRUE=
83253  ANSICXX_FALSE='#'
83254else
83255  ANSICXX_TRUE='#'
83256  ANSICXX_FALSE=
83257fi
83258
83259
83260  if test "$CXX" != no; then
83261
83262depcc="$CXX"  am_compiler_list=
83263
83264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
83265$as_echo_n "checking dependency style of $depcc... " >&6; }
83266if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
83267  $as_echo_n "(cached) " >&6
83268else
83269  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
83270  # We make a subdir and do the tests there.  Otherwise we can end up
83271  # making bogus files that we don't know about and never remove.  For
83272  # instance it was reported that on HP-UX the gcc test will end up
83273  # making a dummy file named 'D' -- because '-MD' means "put the output
83274  # in D".
83275  rm -rf conftest.dir
83276  mkdir conftest.dir
83277  # Copy depcomp to subdir because otherwise we won't find it if we're
83278  # using a relative directory.
83279  cp "$am_depcomp" conftest.dir
83280  cd conftest.dir
83281  # We will build objects and dependencies in a subdirectory because
83282  # it helps to detect inapplicable dependency modes.  For instance
83283  # both Tru64's cc and ICC support -MD to output dependencies as a
83284  # side effect of compilation, but ICC will put the dependencies in
83285  # the current directory while Tru64 will put them in the object
83286  # directory.
83287  mkdir sub
83288
83289  am_cv_CXX_dependencies_compiler_type=none
83290  if test "$am_compiler_list" = ""; then
83291     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
83292  fi
83293  am__universal=false
83294  case " $depcc " in #(
83295     *\ -arch\ *\ -arch\ *) am__universal=true ;;
83296     esac
83297
83298  for depmode in $am_compiler_list; do
83299    # Setup a source with many dependencies, because some compilers
83300    # like to wrap large dependency lists on column 80 (with \), and
83301    # we should not choose a depcomp mode which is confused by this.
83302    #
83303    # We need to recreate these files for each test, as the compiler may
83304    # overwrite some of them when testing with obscure command lines.
83305    # This happens at least with the AIX C compiler.
83306    : > sub/conftest.c
83307    for i in 1 2 3 4 5 6; do
83308      echo '#include "conftst'$i'.h"' >> sub/conftest.c
83309      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
83310      # Solaris 10 /bin/sh.
83311      echo '/* dummy */' > sub/conftst$i.h
83312    done
83313    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
83314
83315    # We check with '-c' and '-o' for the sake of the "dashmstdout"
83316    # mode.  It turns out that the SunPro C++ compiler does not properly
83317    # handle '-M -o', and we need to detect this.  Also, some Intel
83318    # versions had trouble with output in subdirs.
83319    am__obj=sub/conftest.${OBJEXT-o}
83320    am__minus_obj="-o $am__obj"
83321    case $depmode in
83322    gcc)
83323      # This depmode causes a compiler race in universal mode.
83324      test "$am__universal" = false || continue
83325      ;;
83326    nosideeffect)
83327      # After this tag, mechanisms are not by side-effect, so they'll
83328      # only be used when explicitly requested.
83329      if test "x$enable_dependency_tracking" = xyes; then
83330	continue
83331      else
83332	break
83333      fi
83334      ;;
83335    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
83336      # This compiler won't grok '-c -o', but also, the minuso test has
83337      # not run yet.  These depmodes are late enough in the game, and
83338      # so weak that their functioning should not be impacted.
83339      am__obj=conftest.${OBJEXT-o}
83340      am__minus_obj=
83341      ;;
83342    none) break ;;
83343    esac
83344    if depmode=$depmode \
83345       source=sub/conftest.c object=$am__obj \
83346       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
83347       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
83348         >/dev/null 2>conftest.err &&
83349       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
83350       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
83351       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
83352       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
83353      # icc doesn't choke on unknown options, it will just issue warnings
83354      # or remarks (even with -Werror).  So we grep stderr for any message
83355      # that says an option was ignored or not supported.
83356      # When given -MP, icc 7.0 and 7.1 complain thusly:
83357      #   icc: Command line warning: ignoring option '-M'; no argument required
83358      # The diagnosis changed in icc 8.0:
83359      #   icc: Command line remark: option '-MP' not supported
83360      if (grep 'ignoring option' conftest.err ||
83361          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
83362        am_cv_CXX_dependencies_compiler_type=$depmode
83363        break
83364      fi
83365    fi
83366  done
83367
83368  cd ..
83369  rm -rf conftest.dir
83370else
83371  am_cv_CXX_dependencies_compiler_type=none
83372fi
83373
83374fi
83375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
83376$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
83377CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
83378
83379 if
83380  test "x$enable_dependency_tracking" != xno \
83381  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
83382  am__fastdepCXX_TRUE=
83383  am__fastdepCXX_FALSE='#'
83384else
83385  am__fastdepCXX_TRUE='#'
83386  am__fastdepCXX_FALSE=
83387fi
83388
83389
83390        ac_ext=cpp
83391ac_cpp='$CXXCPP $CPPFLAGS'
83392ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
83393ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
83394ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
83395
83396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
83397$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
83398if ${ac_cv_cxx_compiler_gnu+:} false; then :
83399  $as_echo_n "(cached) " >&6
83400else
83401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83402/* end confdefs.h.  */
83403
83404int
83405main ()
83406{
83407#ifndef __GNUC__
83408       choke me
83409#endif
83410
83411  ;
83412  return 0;
83413}
83414_ACEOF
83415if ac_fn_cxx_try_compile "$LINENO"; then :
83416  ac_compiler_gnu=yes
83417else
83418  ac_compiler_gnu=no
83419fi
83420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
83421ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
83422
83423fi
83424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
83425$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
83426    if test $ac_compiler_gnu = yes; then
83427      GXX=yes
83428    else
83429      GXX=
83430    fi
83431    ac_test_CXXFLAGS=${CXXFLAGS+set}
83432ac_save_CXXFLAGS=$CXXFLAGS
83433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
83434$as_echo_n "checking whether $CXX accepts -g... " >&6; }
83435if ${ac_cv_prog_cxx_g+:} false; then :
83436  $as_echo_n "(cached) " >&6
83437else
83438  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
83439   ac_cxx_werror_flag=yes
83440   ac_cv_prog_cxx_g=no
83441   CXXFLAGS="-g"
83442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83443/* end confdefs.h.  */
83444
83445int
83446main ()
83447{
83448
83449  ;
83450  return 0;
83451}
83452_ACEOF
83453if ac_fn_cxx_try_compile "$LINENO"; then :
83454  ac_cv_prog_cxx_g=yes
83455else
83456  CXXFLAGS=""
83457      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83458/* end confdefs.h.  */
83459
83460int
83461main ()
83462{
83463
83464  ;
83465  return 0;
83466}
83467_ACEOF
83468if ac_fn_cxx_try_compile "$LINENO"; then :
83469
83470else
83471  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
83472	 CXXFLAGS="-g"
83473	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83474/* end confdefs.h.  */
83475
83476int
83477main ()
83478{
83479
83480  ;
83481  return 0;
83482}
83483_ACEOF
83484if ac_fn_cxx_try_compile "$LINENO"; then :
83485  ac_cv_prog_cxx_g=yes
83486fi
83487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
83488fi
83489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
83490fi
83491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
83492   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
83493fi
83494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
83495$as_echo "$ac_cv_prog_cxx_g" >&6; }
83496if test "$ac_test_CXXFLAGS" = set; then
83497  CXXFLAGS=$ac_save_CXXFLAGS
83498elif test $ac_cv_prog_cxx_g = yes; then
83499  if test "$GXX" = yes; then
83500    CXXFLAGS="-g -O2"
83501  else
83502    CXXFLAGS="-g"
83503  fi
83504else
83505  if test "$GXX" = yes; then
83506    CXXFLAGS="-O2"
83507  else
83508    CXXFLAGS=
83509  fi
83510fi
83511    ac_ext=c
83512ac_cpp='$CPP $CPPFLAGS'
83513ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
83514ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
83515ac_compiler_gnu=$ac_cv_c_compiler_gnu
83516
83517  else
83518     if false; then
83519  am__fastdepCXX_TRUE=
83520  am__fastdepCXX_FALSE='#'
83521else
83522  am__fastdepCXX_TRUE='#'
83523  am__fastdepCXX_FALSE=
83524fi
83525
83526  fi
83527
83528
83529
83530
83531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
83532$as_echo_n "checking for a traditional french locale... " >&6; }
83533if ${gt_cv_locale_fr+:} false; then :
83534  $as_echo_n "(cached) " >&6
83535else
83536
83537    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83538/* end confdefs.h.  */
83539
83540#include <locale.h>
83541#include <time.h>
83542#if HAVE_LANGINFO_CODESET
83543# include <langinfo.h>
83544#endif
83545#include <stdlib.h>
83546#include <string.h>
83547struct tm t;
83548char buf[16];
83549int main () {
83550  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
83551     imitates locale dependent behaviour by looking at the environment
83552     variables, and all locales use the UTF-8 encoding.  */
83553#if defined __BEOS__ || defined __HAIKU__
83554  return 1;
83555#else
83556  /* Check whether the given locale name is recognized by the system.  */
83557# if defined _WIN32 && !defined __CYGWIN__
83558  /* On native Windows, setlocale(category, "") looks at the system settings,
83559     not at the environment variables.  Also, when an encoding suffix such
83560     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
83561     category of the locale to "C".  */
83562  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
83563      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
83564    return 1;
83565# else
83566  if (setlocale (LC_ALL, "") == NULL) return 1;
83567# endif
83568  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
83569     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
83570     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
83571     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
83572     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
83573     some unit tests fail.
83574     On MirBSD 10, when an unsupported locale is specified, setlocale()
83575     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
83576# if HAVE_LANGINFO_CODESET
83577  {
83578    const char *cs = nl_langinfo (CODESET);
83579    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
83580        || strcmp (cs, "UTF-8") == 0)
83581      return 1;
83582  }
83583# endif
83584# ifdef __CYGWIN__
83585  /* On Cygwin, avoid locale names without encoding suffix, because the
83586     locale_charset() function relies on the encoding suffix.  Note that
83587     LC_ALL is set on the command line.  */
83588  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
83589# endif
83590  /* Check whether in the abbreviation of the second month, the second
83591     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
83592     one byte long. This excludes the UTF-8 encoding.  */
83593  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
83594  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
83595# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
83596  /* Check whether the decimal separator is a comma.
83597     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
83598     are nl_langinfo(RADIXCHAR) are both ".".  */
83599  if (localeconv () ->decimal_point[0] != ',') return 1;
83600# endif
83601  return 0;
83602#endif
83603}
83604
83605_ACEOF
83606    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
83607  (eval $ac_link) 2>&5
83608  ac_status=$?
83609  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
83610  test $ac_status = 0; } && test -s conftest$ac_exeext; then
83611      case "$host_os" in
83612        # Handle native Windows specially, because there setlocale() interprets
83613        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
83614        # "fr" or "fra" as "French" or "French_France.1252",
83615        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
83616        # "ja" as "Japanese" or "Japanese_Japan.932",
83617        # and similar.
83618        mingw*)
83619          # Test for the native Windows locale name.
83620          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83621            gt_cv_locale_fr=French_France.1252
83622          else
83623            # None found.
83624            gt_cv_locale_fr=none
83625          fi
83626          ;;
83627        *)
83628          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
83629          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
83630          # configure script would override the LC_ALL setting. Likewise for
83631          # LC_CTYPE, which is also set at the beginning of the configure script.
83632          # Test for the usual locale name.
83633          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83634            gt_cv_locale_fr=fr_FR
83635          else
83636            # Test for the locale name with explicit encoding suffix.
83637            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83638              gt_cv_locale_fr=fr_FR.ISO-8859-1
83639            else
83640              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
83641              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83642                gt_cv_locale_fr=fr_FR.ISO8859-1
83643              else
83644                # Test for the HP-UX locale name.
83645                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83646                  gt_cv_locale_fr=fr_FR.iso88591
83647                else
83648                  # Test for the Solaris 7 locale name.
83649                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83650                    gt_cv_locale_fr=fr
83651                  else
83652                    # None found.
83653                    gt_cv_locale_fr=none
83654                  fi
83655                fi
83656              fi
83657            fi
83658          fi
83659          ;;
83660      esac
83661    fi
83662    rm -fr conftest*
83663
83664fi
83665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
83666$as_echo "$gt_cv_locale_fr" >&6; }
83667  LOCALE_FR=$gt_cv_locale_fr
83668
83669
83670
83671
83672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
83673$as_echo_n "checking for a french Unicode locale... " >&6; }
83674if ${gt_cv_locale_fr_utf8+:} false; then :
83675  $as_echo_n "(cached) " >&6
83676else
83677
83678    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83679/* end confdefs.h.  */
83680
83681#include <locale.h>
83682#include <time.h>
83683#if HAVE_LANGINFO_CODESET
83684# include <langinfo.h>
83685#endif
83686#include <stdlib.h>
83687#include <string.h>
83688struct tm t;
83689char buf[16];
83690int main () {
83691  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
83692     imitates locale dependent behaviour by looking at the environment
83693     variables, and all locales use the UTF-8 encoding.  */
83694#if !(defined __BEOS__ || defined __HAIKU__)
83695  /* Check whether the given locale name is recognized by the system.  */
83696# if defined _WIN32 && !defined __CYGWIN__
83697  /* On native Windows, setlocale(category, "") looks at the system settings,
83698     not at the environment variables.  Also, when an encoding suffix such
83699     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
83700     category of the locale to "C".  */
83701  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
83702      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
83703    return 1;
83704# else
83705  if (setlocale (LC_ALL, "") == NULL) return 1;
83706# endif
83707  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
83708     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
83709     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
83710     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
83711     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
83712     some unit tests fail.  */
83713# if HAVE_LANGINFO_CODESET
83714  {
83715    const char *cs = nl_langinfo (CODESET);
83716    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
83717      return 1;
83718  }
83719# endif
83720# ifdef __CYGWIN__
83721  /* On Cygwin, avoid locale names without encoding suffix, because the
83722     locale_charset() function relies on the encoding suffix.  Note that
83723     LC_ALL is set on the command line.  */
83724  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
83725# endif
83726  /* Check whether in the abbreviation of the second month, the second
83727     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
83728     two bytes long, with UTF-8 encoding.  */
83729  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
83730  if (strftime (buf, sizeof (buf), "%b", &t) < 4
83731      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
83732    return 1;
83733#endif
83734#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
83735  /* Check whether the decimal separator is a comma.
83736     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
83737     are nl_langinfo(RADIXCHAR) are both ".".  */
83738  if (localeconv () ->decimal_point[0] != ',') return 1;
83739#endif
83740  return 0;
83741}
83742
83743_ACEOF
83744    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
83745  (eval $ac_link) 2>&5
83746  ac_status=$?
83747  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
83748  test $ac_status = 0; } && test -s conftest$ac_exeext; then
83749      case "$host_os" in
83750        # Handle native Windows specially, because there setlocale() interprets
83751        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
83752        # "fr" or "fra" as "French" or "French_France.1252",
83753        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
83754        # "ja" as "Japanese" or "Japanese_Japan.932",
83755        # and similar.
83756        mingw*)
83757          # Test for the hypothetical native Windows locale name.
83758          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83759            gt_cv_locale_fr_utf8=French_France.65001
83760          else
83761            # None found.
83762            gt_cv_locale_fr_utf8=none
83763          fi
83764          ;;
83765        *)
83766          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
83767          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
83768          # configure script would override the LC_ALL setting. Likewise for
83769          # LC_CTYPE, which is also set at the beginning of the configure script.
83770          # Test for the usual locale name.
83771          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83772            gt_cv_locale_fr_utf8=fr_FR
83773          else
83774            # Test for the locale name with explicit encoding suffix.
83775            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83776              gt_cv_locale_fr_utf8=fr_FR.UTF-8
83777            else
83778              # Test for the Solaris 7 locale name.
83779              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83780                gt_cv_locale_fr_utf8=fr.UTF-8
83781              else
83782                # None found.
83783                gt_cv_locale_fr_utf8=none
83784              fi
83785            fi
83786          fi
83787          ;;
83788      esac
83789    fi
83790    rm -fr conftest*
83791
83792fi
83793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
83794$as_echo "$gt_cv_locale_fr_utf8" >&6; }
83795  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
83796
83797
83798
83799
83800
83801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
83802$as_echo_n "checking for a traditional japanese locale... " >&6; }
83803if ${gt_cv_locale_ja+:} false; then :
83804  $as_echo_n "(cached) " >&6
83805else
83806
83807    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83808/* end confdefs.h.  */
83809
83810#include <locale.h>
83811#include <time.h>
83812#if HAVE_LANGINFO_CODESET
83813# include <langinfo.h>
83814#endif
83815#include <stdlib.h>
83816#include <string.h>
83817struct tm t;
83818char buf[16];
83819int main ()
83820{
83821  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
83822     imitates locale dependent behaviour by looking at the environment
83823     variables, and all locales use the UTF-8 encoding.  */
83824#if defined __BEOS__ || defined __HAIKU__
83825  return 1;
83826#else
83827  /* Check whether the given locale name is recognized by the system.  */
83828# if defined _WIN32 && !defined __CYGWIN__
83829  /* On native Windows, setlocale(category, "") looks at the system settings,
83830     not at the environment variables.  Also, when an encoding suffix such
83831     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
83832     category of the locale to "C".  */
83833  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
83834      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
83835    return 1;
83836# else
83837  if (setlocale (LC_ALL, "") == NULL) return 1;
83838# endif
83839  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
83840     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
83841     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
83842     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
83843     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
83844     some unit tests fail.
83845     On MirBSD 10, when an unsupported locale is specified, setlocale()
83846     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
83847# if HAVE_LANGINFO_CODESET
83848  {
83849    const char *cs = nl_langinfo (CODESET);
83850    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
83851        || strcmp (cs, "UTF-8") == 0)
83852      return 1;
83853  }
83854# endif
83855# ifdef __CYGWIN__
83856  /* On Cygwin, avoid locale names without encoding suffix, because the
83857     locale_charset() function relies on the encoding suffix.  Note that
83858     LC_ALL is set on the command line.  */
83859  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
83860# endif
83861  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
83862     on Cygwin 1.5.x.  */
83863  if (MB_CUR_MAX == 1)
83864    return 1;
83865  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
83866     This excludes the UTF-8 encoding (except on MirBSD).  */
83867  {
83868    const char *p;
83869    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
83870    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
83871    for (p = buf; *p != '\0'; p++)
83872      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
83873        return 1;
83874  }
83875  return 0;
83876#endif
83877}
83878
83879_ACEOF
83880    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
83881  (eval $ac_link) 2>&5
83882  ac_status=$?
83883  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
83884  test $ac_status = 0; } && test -s conftest$ac_exeext; then
83885      case "$host_os" in
83886        # Handle native Windows specially, because there setlocale() interprets
83887        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
83888        # "fr" or "fra" as "French" or "French_France.1252",
83889        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
83890        # "ja" as "Japanese" or "Japanese_Japan.932",
83891        # and similar.
83892        mingw*)
83893          # Note that on native Windows, the Japanese locale is
83894          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
83895          # cannot use it here.
83896          gt_cv_locale_ja=none
83897          ;;
83898        *)
83899          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
83900          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
83901          # configure script would override the LC_ALL setting. Likewise for
83902          # LC_CTYPE, which is also set at the beginning of the configure script.
83903          # Test for the AIX locale name.
83904          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83905            gt_cv_locale_ja=ja_JP
83906          else
83907            # Test for the locale name with explicit encoding suffix.
83908            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83909              gt_cv_locale_ja=ja_JP.EUC-JP
83910            else
83911              # Test for the HP-UX, OSF/1, NetBSD locale name.
83912              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83913                gt_cv_locale_ja=ja_JP.eucJP
83914              else
83915                # Test for the IRIX, FreeBSD locale name.
83916                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83917                  gt_cv_locale_ja=ja_JP.EUC
83918                else
83919                  # Test for the Solaris 7 locale name.
83920                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
83921                    gt_cv_locale_ja=ja
83922                  else
83923                    # Special test for NetBSD 1.6.
83924                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
83925                      gt_cv_locale_ja=ja_JP.eucJP
83926                    else
83927                      # None found.
83928                      gt_cv_locale_ja=none
83929                    fi
83930                  fi
83931                fi
83932              fi
83933            fi
83934          fi
83935          ;;
83936      esac
83937    fi
83938    rm -fr conftest*
83939
83940fi
83941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
83942$as_echo "$gt_cv_locale_ja" >&6; }
83943  LOCALE_JA=$gt_cv_locale_ja
83944
83945
83946
83947
83948  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a german Unicode locale" >&5
83949$as_echo_n "checking for a german Unicode locale... " >&6; }
83950if ${gt_cv_locale_de_utf8+:} false; then :
83951  $as_echo_n "(cached) " >&6
83952else
83953
83954    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83955/* end confdefs.h.  */
83956
83957#include <locale.h>
83958#include <time.h>
83959#if HAVE_LANGINFO_CODESET
83960# include <langinfo.h>
83961#endif
83962#include <stdlib.h>
83963#include <string.h>
83964struct tm t;
83965char buf[16];
83966int main () {
83967  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
83968     imitates locale dependent behaviour by looking at the environment
83969     variables, and all locales use the UTF-8 encoding.  */
83970#if !(defined __BEOS__ || defined __HAIKU__)
83971  /* Check whether the given locale name is recognized by the system.  */
83972# if defined _WIN32 && !defined __CYGWIN__
83973  /* On native Windows, setlocale(category, "") looks at the system settings,
83974     not at the environment variables.  Also, when an encoding suffix such
83975     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
83976     category of the locale to "C".  */
83977  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
83978      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
83979    return 1;
83980# else
83981  if (setlocale (LC_ALL, "") == NULL) return 1;
83982# endif
83983  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
83984     On Mac OS X 10.3.5 (Darwin 7.5) in the de_DE locale, nl_langinfo(CODESET)
83985     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
83986     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
83987     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
83988     some unit tests fail.  */
83989# if HAVE_LANGINFO_CODESET
83990  {
83991    const char *cs = nl_langinfo (CODESET);
83992    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
83993      return 1;
83994  }
83995# endif
83996# ifdef __CYGWIN__
83997  /* On Cygwin, avoid locale names without encoding suffix, because the
83998     locale_charset() function relies on the encoding suffix.  Note that
83999     LC_ALL is set on the command line.  */
84000  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
84001# endif
84002  /* Check whether in the name of the third month, the second character
84003     (should be U+00E4: LATIN SMALL LETTER A WITH DIAERESIS) is two bytes
84004     long, with UTF-8 encoding.  */
84005  t.tm_year = 1965 - 1900; t.tm_mon = 3 - 1; t.tm_mday = 29;
84006  if (strftime (buf, sizeof (buf), "%B", &t) < 5
84007      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa4)
84008    return 1;
84009#endif
84010#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
84011  /* Check whether the decimal separator is a comma.
84012     On NetBSD 3.0 in the de_DE.ISO8859-1 locale, localeconv()->decimal_point
84013     are nl_langinfo(RADIXCHAR) are both ".".  */
84014  if (localeconv () ->decimal_point[0] != ',') return 1;
84015#endif
84016  return 0;
84017}
84018
84019_ACEOF
84020    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
84021  (eval $ac_link) 2>&5
84022  ac_status=$?
84023  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
84024  test $ac_status = 0; } && test -s conftest$ac_exeext; then
84025      case "$host_os" in
84026        # Handle native Windows specially, because there setlocale() interprets
84027        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
84028        # "fr" or "fra" as "French" or "French_France.1252",
84029        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
84030        # "ja" as "Japanese" or "Japanese_Japan.932",
84031        # and similar.
84032        mingw*)
84033          # Test for the hypothetical native Windows locale name.
84034          if (LC_ALL=German_Germany.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
84035            gt_cv_locale_de_utf8=German_Germany.65001
84036          else
84037            # None found.
84038            gt_cv_locale_de_utf8=none
84039          fi
84040          ;;
84041        *)
84042          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
84043          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
84044          # configure script would override the LC_ALL setting. Likewise for
84045          # LC_CTYPE, which is also set at the beginning of the configure script.
84046          # Test for the usual locale name.
84047          if (LC_ALL=de_DE LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
84048            gt_cv_locale_de_utf8=de_DE
84049          else
84050            # Test for the locale name with explicit encoding suffix.
84051            if (LC_ALL=de_DE.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
84052              gt_cv_locale_de_utf8=de_DE.UTF-8
84053            else
84054              # Test for the Solaris 7 locale name.
84055              if (LC_ALL=de.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
84056                gt_cv_locale_de_utf8=de.UTF-8
84057              else
84058                # None found.
84059                gt_cv_locale_de_utf8=none
84060              fi
84061            fi
84062          fi
84063          ;;
84064      esac
84065    fi
84066    rm -fr conftest*
84067
84068fi
84069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_de_utf8" >&5
84070$as_echo "$gt_cv_locale_de_utf8" >&6; }
84071  LOCALE_DE_UTF8=$gt_cv_locale_de_utf8
84072
84073
84074
84075
84076
84077
84078
84079
84080
84081ac_ext=cpp
84082ac_cpp='$CXXCPP $CPPFLAGS'
84083ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
84084ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
84085ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
84086if test -z "$CXX"; then
84087  if test -n "$CCC"; then
84088    CXX=$CCC
84089  else
84090    if test -n "$ac_tool_prefix"; then
84091  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
84092  do
84093    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
84094set dummy $ac_tool_prefix$ac_prog; ac_word=$2
84095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
84096$as_echo_n "checking for $ac_word... " >&6; }
84097if ${ac_cv_prog_CXX+:} false; then :
84098  $as_echo_n "(cached) " >&6
84099else
84100  if test -n "$CXX"; then
84101  ac_cv_prog_CXX="$CXX" # Let the user override the test.
84102else
84103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
84104for as_dir in $PATH
84105do
84106  IFS=$as_save_IFS
84107  test -z "$as_dir" && as_dir=.
84108    for ac_exec_ext in '' $ac_executable_extensions; do
84109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
84110    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
84111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
84112    break 2
84113  fi
84114done
84115  done
84116IFS=$as_save_IFS
84117
84118fi
84119fi
84120CXX=$ac_cv_prog_CXX
84121if test -n "$CXX"; then
84122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
84123$as_echo "$CXX" >&6; }
84124else
84125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
84126$as_echo "no" >&6; }
84127fi
84128
84129
84130    test -n "$CXX" && break
84131  done
84132fi
84133if test -z "$CXX"; then
84134  ac_ct_CXX=$CXX
84135  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
84136do
84137  # Extract the first word of "$ac_prog", so it can be a program name with args.
84138set dummy $ac_prog; ac_word=$2
84139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
84140$as_echo_n "checking for $ac_word... " >&6; }
84141if ${ac_cv_prog_ac_ct_CXX+:} false; then :
84142  $as_echo_n "(cached) " >&6
84143else
84144  if test -n "$ac_ct_CXX"; then
84145  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
84146else
84147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
84148for as_dir in $PATH
84149do
84150  IFS=$as_save_IFS
84151  test -z "$as_dir" && as_dir=.
84152    for ac_exec_ext in '' $ac_executable_extensions; do
84153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
84154    ac_cv_prog_ac_ct_CXX="$ac_prog"
84155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
84156    break 2
84157  fi
84158done
84159  done
84160IFS=$as_save_IFS
84161
84162fi
84163fi
84164ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
84165if test -n "$ac_ct_CXX"; then
84166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
84167$as_echo "$ac_ct_CXX" >&6; }
84168else
84169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
84170$as_echo "no" >&6; }
84171fi
84172
84173
84174  test -n "$ac_ct_CXX" && break
84175done
84176
84177  if test "x$ac_ct_CXX" = x; then
84178    CXX="g++"
84179  else
84180    case $cross_compiling:$ac_tool_warned in
84181yes:)
84182{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
84183$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
84184ac_tool_warned=yes ;;
84185esac
84186    CXX=$ac_ct_CXX
84187  fi
84188fi
84189
84190  fi
84191fi
84192# Provide some information about the compiler.
84193$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
84194set X $ac_compile
84195ac_compiler=$2
84196for ac_option in --version -v -V -qversion; do
84197  { { ac_try="$ac_compiler $ac_option >&5"
84198case "(($ac_try" in
84199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
84200  *) ac_try_echo=$ac_try;;
84201esac
84202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
84203$as_echo "$ac_try_echo"; } >&5
84204  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
84205  ac_status=$?
84206  if test -s conftest.err; then
84207    sed '10a\
84208... rest of stderr output deleted ...
84209         10q' conftest.err >conftest.er1
84210    cat conftest.er1 >&5
84211  fi
84212  rm -f conftest.er1 conftest.err
84213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
84214  test $ac_status = 0; }
84215done
84216
84217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
84218$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
84219if ${ac_cv_cxx_compiler_gnu+:} false; then :
84220  $as_echo_n "(cached) " >&6
84221else
84222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84223/* end confdefs.h.  */
84224
84225int
84226main ()
84227{
84228#ifndef __GNUC__
84229       choke me
84230#endif
84231
84232  ;
84233  return 0;
84234}
84235_ACEOF
84236if ac_fn_cxx_try_compile "$LINENO"; then :
84237  ac_compiler_gnu=yes
84238else
84239  ac_compiler_gnu=no
84240fi
84241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84242ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
84243
84244fi
84245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
84246$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
84247if test $ac_compiler_gnu = yes; then
84248  GXX=yes
84249else
84250  GXX=
84251fi
84252ac_test_CXXFLAGS=${CXXFLAGS+set}
84253ac_save_CXXFLAGS=$CXXFLAGS
84254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
84255$as_echo_n "checking whether $CXX accepts -g... " >&6; }
84256if ${ac_cv_prog_cxx_g+:} false; then :
84257  $as_echo_n "(cached) " >&6
84258else
84259  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
84260   ac_cxx_werror_flag=yes
84261   ac_cv_prog_cxx_g=no
84262   CXXFLAGS="-g"
84263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84264/* end confdefs.h.  */
84265
84266int
84267main ()
84268{
84269
84270  ;
84271  return 0;
84272}
84273_ACEOF
84274if ac_fn_cxx_try_compile "$LINENO"; then :
84275  ac_cv_prog_cxx_g=yes
84276else
84277  CXXFLAGS=""
84278      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84279/* end confdefs.h.  */
84280
84281int
84282main ()
84283{
84284
84285  ;
84286  return 0;
84287}
84288_ACEOF
84289if ac_fn_cxx_try_compile "$LINENO"; then :
84290
84291else
84292  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
84293	 CXXFLAGS="-g"
84294	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84295/* end confdefs.h.  */
84296
84297int
84298main ()
84299{
84300
84301  ;
84302  return 0;
84303}
84304_ACEOF
84305if ac_fn_cxx_try_compile "$LINENO"; then :
84306  ac_cv_prog_cxx_g=yes
84307fi
84308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84309fi
84310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84311fi
84312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
84313   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
84314fi
84315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
84316$as_echo "$ac_cv_prog_cxx_g" >&6; }
84317if test "$ac_test_CXXFLAGS" = set; then
84318  CXXFLAGS=$ac_save_CXXFLAGS
84319elif test $ac_cv_prog_cxx_g = yes; then
84320  if test "$GXX" = yes; then
84321    CXXFLAGS="-g -O2"
84322  else
84323    CXXFLAGS="-g"
84324  fi
84325else
84326  if test "$GXX" = yes; then
84327    CXXFLAGS="-O2"
84328  else
84329    CXXFLAGS=
84330  fi
84331fi
84332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
84333$as_echo_n "checking for $CXX option to enable C++11 features... " >&6; }
84334ac_ext=cpp
84335ac_cpp='$CXXCPP $CPPFLAGS'
84336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
84337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
84338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
84339if ${ac_cv_prog_cxx_cxx11+:} false; then :
84340  $as_echo_n "(cached) " >&6
84341else
84342  ac_cv_prog_cxx_cxx11=no
84343ac_save_CXX=$CXX
84344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84345/* end confdefs.h.  */
84346
84347#include <deque>
84348#include <functional>
84349#include <memory>
84350#include <tuple>
84351#include <array>
84352#include <regex>
84353#include <iostream>
84354
84355namespace cxx11test
84356{
84357  typedef std::shared_ptr<std::string> sptr;
84358  typedef std::weak_ptr<std::string> wptr;
84359
84360  typedef std::tuple<std::string,int,double> tp;
84361  typedef std::array<int, 20> int_array;
84362
84363  constexpr int get_val() { return 20; }
84364
84365  struct testinit
84366  {
84367    int i;
84368    double d;
84369  };
84370
84371  class delegate  {
84372  public:
84373    delegate(int n) : n(n) {}
84374    delegate(): delegate(2354) {}
84375
84376    virtual int getval() { return this->n; };
84377  protected:
84378    int n;
84379  };
84380
84381  class overridden : public delegate {
84382  public:
84383    overridden(int n): delegate(n) {}
84384    virtual int getval() override final { return this->n * 2; }
84385  };
84386
84387  class nocopy {
84388  public:
84389    nocopy(int i): i(i) {}
84390    nocopy() = default;
84391    nocopy(const nocopy&) = delete;
84392    nocopy & operator=(const nocopy&) = delete;
84393  private:
84394    int i;
84395  };
84396}
84397
84398
84399#include <algorithm>
84400#include <cstdlib>
84401#include <fstream>
84402#include <iomanip>
84403#include <iostream>
84404#include <list>
84405#include <map>
84406#include <set>
84407#include <sstream>
84408#include <stdexcept>
84409#include <string>
84410#include <utility>
84411#include <vector>
84412
84413namespace test {
84414  typedef std::vector<std::string> string_vec;
84415  typedef std::pair<int,bool> map_value;
84416  typedef std::map<std::string,map_value> map_type;
84417  typedef std::set<int> set_type;
84418
84419  template<typename T>
84420  class printer {
84421  public:
84422    printer(std::ostringstream& os): os(os) {}
84423    void operator() (T elem) { os << elem << std::endl; }
84424  private:
84425    std::ostringstream& os;
84426  };
84427}
84428
84429int
84430main ()
84431{
84432
84433{
84434  // Test auto and decltype
84435  std::deque<int> d;
84436  d.push_front(43);
84437  d.push_front(484);
84438  d.push_front(3);
84439  d.push_front(844);
84440  int total = 0;
84441  for (auto i = d.begin(); i != d.end(); ++i) { total += *i; }
84442
84443  auto a1 = 6538;
84444  auto a2 = 48573953.4;
84445  auto a3 = "String literal";
84446
84447  decltype(a2) a4 = 34895.034;
84448}
84449{
84450  // Test constexpr
84451  short sa[cxx11test::get_val()] = { 0 };
84452}
84453{
84454  // Test initializer lists
84455  cxx11test::testinit il = { 4323, 435234.23544 };
84456}
84457{
84458  // Test range-based for and lambda
84459  cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
84460  for (int &x : array) { x += 23; }
84461  std::for_each(array.begin(), array.end(), [](int v1){ std::cout << v1; });
84462}
84463{
84464  using cxx11test::sptr;
84465  using cxx11test::wptr;
84466
84467  sptr sp(new std::string("ASCII string"));
84468  wptr wp(sp);
84469  sptr sp2(wp);
84470}
84471{
84472  cxx11test::tp tuple("test", 54, 45.53434);
84473  double d = std::get<2>(tuple);
84474  std::string s;
84475  int i;
84476  std::tie(s,i,d) = tuple;
84477}
84478{
84479  static std::regex filename_regex("^_?([a-z0-9_.]+-)+[a-z0-9]+$");
84480  std::string testmatch("Test if this string matches");
84481  bool match = std::regex_search(testmatch, filename_regex);
84482}
84483{
84484  cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
84485  cxx11test::int_array::size_type size = array.size();
84486}
84487{
84488  // Test constructor delegation
84489  cxx11test::delegate d1;
84490  cxx11test::delegate d2();
84491  cxx11test::delegate d3(45);
84492}
84493{
84494  // Test override and final
84495  cxx11test::overridden o1(55464);
84496}
84497{
84498  // Test nullptr
84499  char *c = nullptr;
84500}
84501{
84502  // Test template brackets
84503  std::vector<std::pair<int,char*>> v1;
84504}
84505{
84506  // Unicode literals
84507  char const *utf8 = u8"UTF-8 string \u2500";
84508  char16_t const *utf16 = u"UTF-8 string \u2500";
84509  char32_t const *utf32 = U"UTF-32 string \u2500";
84510}
84511
84512
84513
84514try {
84515  // Basic string.
84516  std::string teststr("ASCII text");
84517  teststr += " string";
84518
84519  // Simple vector.
84520  test::string_vec testvec;
84521  testvec.push_back(teststr);
84522  testvec.push_back("foo");
84523  testvec.push_back("bar");
84524  if (testvec.size() != 3) {
84525    throw std::runtime_error("vector size is not 1");
84526  }
84527
84528  // Dump vector into stringstream and obtain string.
84529  std::ostringstream os;
84530  for (test::string_vec::const_iterator i = testvec.begin();
84531       i != testvec.end(); ++i) {
84532    if (i + 1 != testvec.end()) {
84533      os << teststr << '\n';
84534    }
84535  }
84536  // Check algorithms work.
84537  std::for_each(testvec.begin(), testvec.end(), test::printer<std::string>(os));
84538  std::string os_out = os.str();
84539
84540  // Test pair and map.
84541  test::map_type testmap;
84542  testmap.insert(std::make_pair(std::string("key"),
84543                                std::make_pair(53,false)));
84544
84545  // Test set.
84546  int values[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
84547  test::set_type testset(values, values + sizeof(values)/sizeof(values[0]));
84548  std::list<int> testlist(testset.begin(), testset.end());
84549  std::copy(testset.begin(), testset.end(), std::back_inserter(testlist));
84550} catch (const std::exception& e) {
84551  std::cerr << "Caught exception: " << e.what() << std::endl;
84552
84553  // Test fstream
84554  std::ofstream of("test.txt");
84555  of << "Test ASCII text\n" << std::flush;
84556  of << "N= " << std::hex << std::setw(8) << std::left << 534 << std::endl;
84557  of.close();
84558}
84559std::exit(0);
84560
84561  ;
84562  return 0;
84563}
84564_ACEOF
84565for ac_arg in '' -std=gnu++11 -std=c++11 -std=gnu++0x -std=c++0x -qlanglvl=extended0x -AA
84566do
84567  CXX="$ac_save_CXX $ac_arg"
84568  if ac_fn_cxx_try_compile "$LINENO"; then :
84569  ac_cv_prog_cxx_cxx11=$ac_arg
84570fi
84571rm -f core conftest.err conftest.$ac_objext
84572  test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
84573done
84574rm -f conftest.$ac_ext
84575CXX=$ac_save_CXX
84576
84577fi
84578# AC_CACHE_VAL
84579ac_prog_cxx_stdcxx_options=
84580case "x$ac_cv_prog_cxx_cxx11" in
84581  x)
84582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
84583$as_echo "none needed" >&6; } ;;
84584  xno)
84585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
84586$as_echo "unsupported" >&6; } ;;
84587  *)
84588    ac_prog_cxx_stdcxx_options=" $ac_cv_prog_cxx_cxx11"
84589    CXX=$CXX$ac_prog_cxx_stdcxx_options
84590    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
84591$as_echo "$ac_cv_prog_cxx_cxx11" >&6; } ;;
84592esac
84593ac_ext=cpp
84594ac_cpp='$CXXCPP $CPPFLAGS'
84595ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
84596ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
84597ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
84598if test "x$ac_cv_prog_cxx_cxx11" != xno; then :
84599  ac_prog_cxx_stdcxx=cxx11
84600		    ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
84601		    ac_cv_prog_cxx_cxx98=$ac_cv_prog_cxx_cxx11
84602else
84603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
84604$as_echo_n "checking for $CXX option to enable C++98 features... " >&6; }
84605ac_ext=cpp
84606ac_cpp='$CXXCPP $CPPFLAGS'
84607ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
84608ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
84609ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
84610if ${ac_cv_prog_cxx_cxx98+:} false; then :
84611  $as_echo_n "(cached) " >&6
84612else
84613  ac_cv_prog_cxx_cxx98=no
84614ac_save_CXX=$CXX
84615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84616/* end confdefs.h.  */
84617
84618#include <algorithm>
84619#include <cstdlib>
84620#include <fstream>
84621#include <iomanip>
84622#include <iostream>
84623#include <list>
84624#include <map>
84625#include <set>
84626#include <sstream>
84627#include <stdexcept>
84628#include <string>
84629#include <utility>
84630#include <vector>
84631
84632namespace test {
84633  typedef std::vector<std::string> string_vec;
84634  typedef std::pair<int,bool> map_value;
84635  typedef std::map<std::string,map_value> map_type;
84636  typedef std::set<int> set_type;
84637
84638  template<typename T>
84639  class printer {
84640  public:
84641    printer(std::ostringstream& os): os(os) {}
84642    void operator() (T elem) { os << elem << std::endl; }
84643  private:
84644    std::ostringstream& os;
84645  };
84646}
84647
84648int
84649main ()
84650{
84651
84652
84653try {
84654  // Basic string.
84655  std::string teststr("ASCII text");
84656  teststr += " string";
84657
84658  // Simple vector.
84659  test::string_vec testvec;
84660  testvec.push_back(teststr);
84661  testvec.push_back("foo");
84662  testvec.push_back("bar");
84663  if (testvec.size() != 3) {
84664    throw std::runtime_error("vector size is not 1");
84665  }
84666
84667  // Dump vector into stringstream and obtain string.
84668  std::ostringstream os;
84669  for (test::string_vec::const_iterator i = testvec.begin();
84670       i != testvec.end(); ++i) {
84671    if (i + 1 != testvec.end()) {
84672      os << teststr << '\n';
84673    }
84674  }
84675  // Check algorithms work.
84676  std::for_each(testvec.begin(), testvec.end(), test::printer<std::string>(os));
84677  std::string os_out = os.str();
84678
84679  // Test pair and map.
84680  test::map_type testmap;
84681  testmap.insert(std::make_pair(std::string("key"),
84682                                std::make_pair(53,false)));
84683
84684  // Test set.
84685  int values[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
84686  test::set_type testset(values, values + sizeof(values)/sizeof(values[0]));
84687  std::list<int> testlist(testset.begin(), testset.end());
84688  std::copy(testset.begin(), testset.end(), std::back_inserter(testlist));
84689} catch (const std::exception& e) {
84690  std::cerr << "Caught exception: " << e.what() << std::endl;
84691
84692  // Test fstream
84693  std::ofstream of("test.txt");
84694  of << "Test ASCII text\n" << std::flush;
84695  of << "N= " << std::hex << std::setw(8) << std::left << 534 << std::endl;
84696  of.close();
84697}
84698std::exit(0);
84699
84700  ;
84701  return 0;
84702}
84703_ACEOF
84704for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
84705do
84706  CXX="$ac_save_CXX $ac_arg"
84707  if ac_fn_cxx_try_compile "$LINENO"; then :
84708  ac_cv_prog_cxx_cxx98=$ac_arg
84709fi
84710rm -f core conftest.err conftest.$ac_objext
84711  test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
84712done
84713rm -f conftest.$ac_ext
84714CXX=$ac_save_CXX
84715
84716fi
84717# AC_CACHE_VAL
84718ac_prog_cxx_stdcxx_options=
84719case "x$ac_cv_prog_cxx_cxx98" in
84720  x)
84721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
84722$as_echo "none needed" >&6; } ;;
84723  xno)
84724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
84725$as_echo "unsupported" >&6; } ;;
84726  *)
84727    ac_prog_cxx_stdcxx_options=" $ac_cv_prog_cxx_cxx98"
84728    CXX=$CXX$ac_prog_cxx_stdcxx_options
84729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
84730$as_echo "$ac_cv_prog_cxx_cxx98" >&6; } ;;
84731esac
84732ac_ext=cpp
84733ac_cpp='$CXXCPP $CPPFLAGS'
84734ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
84735ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
84736ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
84737if test "x$ac_cv_prog_cxx_cxx98" != xno; then :
84738  ac_prog_cxx_stdcxx=cxx98
84739		        ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
84740else
84741  ac_prog_cxx_stdcxx=no
84742		        ac_cv_prog_cxx_stdcxx=no
84743fi
84744
84745fi
84746
84747ac_ext=c
84748ac_cpp='$CPP $CPPFLAGS'
84749ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
84750ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
84751ac_compiler_gnu=$ac_cv_c_compiler_gnu
84752
84753depcc="$CXX"  am_compiler_list=
84754
84755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
84756$as_echo_n "checking dependency style of $depcc... " >&6; }
84757if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
84758  $as_echo_n "(cached) " >&6
84759else
84760  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
84761  # We make a subdir and do the tests there.  Otherwise we can end up
84762  # making bogus files that we don't know about and never remove.  For
84763  # instance it was reported that on HP-UX the gcc test will end up
84764  # making a dummy file named 'D' -- because '-MD' means "put the output
84765  # in D".
84766  rm -rf conftest.dir
84767  mkdir conftest.dir
84768  # Copy depcomp to subdir because otherwise we won't find it if we're
84769  # using a relative directory.
84770  cp "$am_depcomp" conftest.dir
84771  cd conftest.dir
84772  # We will build objects and dependencies in a subdirectory because
84773  # it helps to detect inapplicable dependency modes.  For instance
84774  # both Tru64's cc and ICC support -MD to output dependencies as a
84775  # side effect of compilation, but ICC will put the dependencies in
84776  # the current directory while Tru64 will put them in the object
84777  # directory.
84778  mkdir sub
84779
84780  am_cv_CXX_dependencies_compiler_type=none
84781  if test "$am_compiler_list" = ""; then
84782     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
84783  fi
84784  am__universal=false
84785  case " $depcc " in #(
84786     *\ -arch\ *\ -arch\ *) am__universal=true ;;
84787     esac
84788
84789  for depmode in $am_compiler_list; do
84790    # Setup a source with many dependencies, because some compilers
84791    # like to wrap large dependency lists on column 80 (with \), and
84792    # we should not choose a depcomp mode which is confused by this.
84793    #
84794    # We need to recreate these files for each test, as the compiler may
84795    # overwrite some of them when testing with obscure command lines.
84796    # This happens at least with the AIX C compiler.
84797    : > sub/conftest.c
84798    for i in 1 2 3 4 5 6; do
84799      echo '#include "conftst'$i'.h"' >> sub/conftest.c
84800      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
84801      # Solaris 10 /bin/sh.
84802      echo '/* dummy */' > sub/conftst$i.h
84803    done
84804    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
84805
84806    # We check with '-c' and '-o' for the sake of the "dashmstdout"
84807    # mode.  It turns out that the SunPro C++ compiler does not properly
84808    # handle '-M -o', and we need to detect this.  Also, some Intel
84809    # versions had trouble with output in subdirs.
84810    am__obj=sub/conftest.${OBJEXT-o}
84811    am__minus_obj="-o $am__obj"
84812    case $depmode in
84813    gcc)
84814      # This depmode causes a compiler race in universal mode.
84815      test "$am__universal" = false || continue
84816      ;;
84817    nosideeffect)
84818      # After this tag, mechanisms are not by side-effect, so they'll
84819      # only be used when explicitly requested.
84820      if test "x$enable_dependency_tracking" = xyes; then
84821	continue
84822      else
84823	break
84824      fi
84825      ;;
84826    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
84827      # This compiler won't grok '-c -o', but also, the minuso test has
84828      # not run yet.  These depmodes are late enough in the game, and
84829      # so weak that their functioning should not be impacted.
84830      am__obj=conftest.${OBJEXT-o}
84831      am__minus_obj=
84832      ;;
84833    none) break ;;
84834    esac
84835    if depmode=$depmode \
84836       source=sub/conftest.c object=$am__obj \
84837       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
84838       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
84839         >/dev/null 2>conftest.err &&
84840       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
84841       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
84842       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
84843       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
84844      # icc doesn't choke on unknown options, it will just issue warnings
84845      # or remarks (even with -Werror).  So we grep stderr for any message
84846      # that says an option was ignored or not supported.
84847      # When given -MP, icc 7.0 and 7.1 complain thusly:
84848      #   icc: Command line warning: ignoring option '-M'; no argument required
84849      # The diagnosis changed in icc 8.0:
84850      #   icc: Command line remark: option '-MP' not supported
84851      if (grep 'ignoring option' conftest.err ||
84852          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
84853        am_cv_CXX_dependencies_compiler_type=$depmode
84854        break
84855      fi
84856    fi
84857  done
84858
84859  cd ..
84860  rm -rf conftest.dir
84861else
84862  am_cv_CXX_dependencies_compiler_type=none
84863fi
84864
84865fi
84866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
84867$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
84868CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
84869
84870 if
84871  test "x$enable_dependency_tracking" != xno \
84872  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
84873  am__fastdepCXX_TRUE=
84874  am__fastdepCXX_FALSE='#'
84875else
84876  am__fastdepCXX_TRUE='#'
84877  am__fastdepCXX_FALSE=
84878fi
84879
84880
84881
84882
84883
84884func_stripname_cnf ()
84885{
84886  case $2 in
84887  .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
84888  *)  func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
84889  esac
84890} # func_stripname_cnf
84891
84892      if test -n "$CXX" && ( test no != "$CXX" &&
84893    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
84894    (test g++ != "$CXX"))); then
84895  ac_ext=cpp
84896ac_cpp='$CXXCPP $CPPFLAGS'
84897ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
84898ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
84899ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
84900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
84901$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
84902if test -z "$CXXCPP"; then
84903  if ${ac_cv_prog_CXXCPP+:} false; then :
84904  $as_echo_n "(cached) " >&6
84905else
84906      # Double quotes because CXXCPP needs to be expanded
84907    for CXXCPP in "$CXX -E" "/lib/cpp"
84908    do
84909      ac_preproc_ok=false
84910for ac_cxx_preproc_warn_flag in '' yes
84911do
84912  # Use a header file that comes with gcc, so configuring glibc
84913  # with a fresh cross-compiler works.
84914  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
84915  # <limits.h> exists even on freestanding compilers.
84916  # On the NeXT, cc -E runs the code through the compiler's parser,
84917  # not just through cpp. "Syntax error" is here to catch this case.
84918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84919/* end confdefs.h.  */
84920#ifdef __STDC__
84921# include <limits.h>
84922#else
84923# include <assert.h>
84924#endif
84925		     Syntax error
84926_ACEOF
84927if ac_fn_cxx_try_cpp "$LINENO"; then :
84928
84929else
84930  # Broken: fails on valid input.
84931continue
84932fi
84933rm -f conftest.err conftest.i conftest.$ac_ext
84934
84935  # OK, works on sane cases.  Now check whether nonexistent headers
84936  # can be detected and how.
84937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84938/* end confdefs.h.  */
84939#include <ac_nonexistent.h>
84940_ACEOF
84941if ac_fn_cxx_try_cpp "$LINENO"; then :
84942  # Broken: success on invalid input.
84943continue
84944else
84945  # Passes both tests.
84946ac_preproc_ok=:
84947break
84948fi
84949rm -f conftest.err conftest.i conftest.$ac_ext
84950
84951done
84952# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
84953rm -f conftest.i conftest.err conftest.$ac_ext
84954if $ac_preproc_ok; then :
84955  break
84956fi
84957
84958    done
84959    ac_cv_prog_CXXCPP=$CXXCPP
84960
84961fi
84962  CXXCPP=$ac_cv_prog_CXXCPP
84963else
84964  ac_cv_prog_CXXCPP=$CXXCPP
84965fi
84966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
84967$as_echo "$CXXCPP" >&6; }
84968ac_preproc_ok=false
84969for ac_cxx_preproc_warn_flag in '' yes
84970do
84971  # Use a header file that comes with gcc, so configuring glibc
84972  # with a fresh cross-compiler works.
84973  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
84974  # <limits.h> exists even on freestanding compilers.
84975  # On the NeXT, cc -E runs the code through the compiler's parser,
84976  # not just through cpp. "Syntax error" is here to catch this case.
84977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84978/* end confdefs.h.  */
84979#ifdef __STDC__
84980# include <limits.h>
84981#else
84982# include <assert.h>
84983#endif
84984		     Syntax error
84985_ACEOF
84986if ac_fn_cxx_try_cpp "$LINENO"; then :
84987
84988else
84989  # Broken: fails on valid input.
84990continue
84991fi
84992rm -f conftest.err conftest.i conftest.$ac_ext
84993
84994  # OK, works on sane cases.  Now check whether nonexistent headers
84995  # can be detected and how.
84996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84997/* end confdefs.h.  */
84998#include <ac_nonexistent.h>
84999_ACEOF
85000if ac_fn_cxx_try_cpp "$LINENO"; then :
85001  # Broken: success on invalid input.
85002continue
85003else
85004  # Passes both tests.
85005ac_preproc_ok=:
85006break
85007fi
85008rm -f conftest.err conftest.i conftest.$ac_ext
85009
85010done
85011# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
85012rm -f conftest.i conftest.err conftest.$ac_ext
85013if $ac_preproc_ok; then :
85014
85015else
85016  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
85017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
85018as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
85019See \`config.log' for more details" "$LINENO" 5; }
85020fi
85021
85022ac_ext=c
85023ac_cpp='$CPP $CPPFLAGS'
85024ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
85025ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
85026ac_compiler_gnu=$ac_cv_c_compiler_gnu
85027
85028else
85029  _lt_caught_CXX_error=yes
85030fi
85031
85032ac_ext=cpp
85033ac_cpp='$CXXCPP $CPPFLAGS'
85034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
85035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
85036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
85037
85038archive_cmds_need_lc_CXX=no
85039allow_undefined_flag_CXX=
85040always_export_symbols_CXX=no
85041archive_expsym_cmds_CXX=
85042compiler_needs_object_CXX=no
85043export_dynamic_flag_spec_CXX=
85044hardcode_direct_CXX=no
85045hardcode_direct_absolute_CXX=no
85046hardcode_libdir_flag_spec_CXX=
85047hardcode_libdir_separator_CXX=
85048hardcode_minus_L_CXX=no
85049hardcode_shlibpath_var_CXX=unsupported
85050hardcode_automatic_CXX=no
85051inherit_rpath_CXX=no
85052module_cmds_CXX=
85053module_expsym_cmds_CXX=
85054link_all_deplibs_CXX=no
85055old_archive_cmds_CXX=$old_archive_cmds
85056reload_flag_CXX=$reload_flag
85057reload_cmds_CXX=$reload_cmds
85058no_undefined_flag_CXX=
85059whole_archive_flag_spec_CXX=
85060enable_shared_with_static_runtimes_CXX=no
85061
85062# Source file extension for C++ test sources.
85063ac_ext=cpp
85064
85065# Object file extension for compiled C++ test sources.
85066objext=o
85067objext_CXX=$objext
85068
85069# No sense in running all these tests if we already determined that
85070# the CXX compiler isn't working.  Some variables (like enable_shared)
85071# are currently assumed to apply to all compilers on this platform,
85072# and will be corrupted by setting them based on a non-working compiler.
85073if test yes != "$_lt_caught_CXX_error"; then
85074  # Code to be used in simple compile tests
85075  lt_simple_compile_test_code="int some_variable = 0;"
85076
85077  # Code to be used in simple link tests
85078  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
85079
85080  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
85081
85082
85083
85084
85085
85086
85087# If no C compiler was specified, use CC.
85088LTCC=${LTCC-"$CC"}
85089
85090# If no C compiler flags were specified, use CFLAGS.
85091LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
85092
85093# Allow CC to be a program name with arguments.
85094compiler=$CC
85095
85096
85097  # save warnings/boilerplate of simple test code
85098  ac_outfile=conftest.$ac_objext
85099echo "$lt_simple_compile_test_code" >conftest.$ac_ext
85100eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
85101_lt_compiler_boilerplate=`cat conftest.err`
85102$RM conftest*
85103
85104  ac_outfile=conftest.$ac_objext
85105echo "$lt_simple_link_test_code" >conftest.$ac_ext
85106eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
85107_lt_linker_boilerplate=`cat conftest.err`
85108$RM -r conftest*
85109
85110
85111  # Allow CC to be a program name with arguments.
85112  lt_save_CC=$CC
85113  lt_save_CFLAGS=$CFLAGS
85114  lt_save_LD=$LD
85115  lt_save_GCC=$GCC
85116  GCC=$GXX
85117  lt_save_with_gnu_ld=$with_gnu_ld
85118  lt_save_path_LD=$lt_cv_path_LD
85119  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
85120    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
85121  else
85122    $as_unset lt_cv_prog_gnu_ld
85123  fi
85124  if test -n "${lt_cv_path_LDCXX+set}"; then
85125    lt_cv_path_LD=$lt_cv_path_LDCXX
85126  else
85127    $as_unset lt_cv_path_LD
85128  fi
85129  test -z "${LDCXX+set}" || LD=$LDCXX
85130  CC=${CXX-"c++"}
85131  CFLAGS=$CXXFLAGS
85132  compiler=$CC
85133  compiler_CXX=$CC
85134  func_cc_basename $compiler
85135cc_basename=$func_cc_basename_result
85136
85137
85138  if test -n "$compiler"; then
85139    # We don't want -fno-exception when compiling C++ code, so set the
85140    # no_builtin_flag separately
85141    if test yes = "$GXX"; then
85142      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
85143    else
85144      lt_prog_compiler_no_builtin_flag_CXX=
85145    fi
85146
85147    if test yes = "$GXX"; then
85148      # Set up default GNU C++ configuration
85149
85150
85151
85152# Check whether --with-gnu-ld was given.
85153if test "${with_gnu_ld+set}" = set; then :
85154  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
85155else
85156  with_gnu_ld=no
85157fi
85158
85159ac_prog=ld
85160if test yes = "$GCC"; then
85161  # Check if gcc -print-prog-name=ld gives a path.
85162  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
85163$as_echo_n "checking for ld used by $CC... " >&6; }
85164  case $host in
85165  *-*-mingw*)
85166    # gcc leaves a trailing carriage return, which upsets mingw
85167    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
85168  *)
85169    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
85170  esac
85171  case $ac_prog in
85172    # Accept absolute paths.
85173    [\\/]* | ?:[\\/]*)
85174      re_direlt='/[^/][^/]*/\.\./'
85175      # Canonicalize the pathname of ld
85176      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
85177      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
85178	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
85179      done
85180      test -z "$LD" && LD=$ac_prog
85181      ;;
85182  "")
85183    # If it fails, then pretend we aren't using GCC.
85184    ac_prog=ld
85185    ;;
85186  *)
85187    # If it is relative, then search for the first ld in PATH.
85188    with_gnu_ld=unknown
85189    ;;
85190  esac
85191elif test yes = "$with_gnu_ld"; then
85192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
85193$as_echo_n "checking for GNU ld... " >&6; }
85194else
85195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
85196$as_echo_n "checking for non-GNU ld... " >&6; }
85197fi
85198if ${lt_cv_path_LD+:} false; then :
85199  $as_echo_n "(cached) " >&6
85200else
85201  if test -z "$LD"; then
85202  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
85203  for ac_dir in $PATH; do
85204    IFS=$lt_save_ifs
85205    test -z "$ac_dir" && ac_dir=.
85206    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
85207      lt_cv_path_LD=$ac_dir/$ac_prog
85208      # Check to see if the program is GNU ld.  I'd rather use --version,
85209      # but apparently some variants of GNU ld only accept -v.
85210      # Break only if it was the GNU/non-GNU ld that we prefer.
85211      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
85212      *GNU* | *'with BFD'*)
85213	test no != "$with_gnu_ld" && break
85214	;;
85215      *)
85216	test yes != "$with_gnu_ld" && break
85217	;;
85218      esac
85219    fi
85220  done
85221  IFS=$lt_save_ifs
85222else
85223  lt_cv_path_LD=$LD # Let the user override the test with a path.
85224fi
85225fi
85226
85227LD=$lt_cv_path_LD
85228if test -n "$LD"; then
85229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
85230$as_echo "$LD" >&6; }
85231else
85232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
85233$as_echo "no" >&6; }
85234fi
85235test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
85236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
85237$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
85238if ${lt_cv_prog_gnu_ld+:} false; then :
85239  $as_echo_n "(cached) " >&6
85240else
85241  # I'd rather use --version here, but apparently some GNU lds only accept -v.
85242case `$LD -v 2>&1 </dev/null` in
85243*GNU* | *'with BFD'*)
85244  lt_cv_prog_gnu_ld=yes
85245  ;;
85246*)
85247  lt_cv_prog_gnu_ld=no
85248  ;;
85249esac
85250fi
85251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
85252$as_echo "$lt_cv_prog_gnu_ld" >&6; }
85253with_gnu_ld=$lt_cv_prog_gnu_ld
85254
85255
85256
85257
85258
85259
85260
85261      # Check if GNU C++ uses GNU ld as the underlying linker, since the
85262      # archiving commands below assume that GNU ld is being used.
85263      if test yes = "$with_gnu_ld"; then
85264        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
85265        archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
85266
85267        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
85268        export_dynamic_flag_spec_CXX='$wl--export-dynamic'
85269
85270        # If archive_cmds runs LD, not CC, wlarc should be empty
85271        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
85272        #     investigate it a little bit more. (MM)
85273        wlarc='$wl'
85274
85275        # ancient GNU ld didn't support --whole-archive et. al.
85276        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
85277	  $GREP 'no-whole-archive' > /dev/null; then
85278          whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
85279        else
85280          whole_archive_flag_spec_CXX=
85281        fi
85282      else
85283        with_gnu_ld=no
85284        wlarc=
85285
85286        # A generic and very simple default shared library creation
85287        # command for GNU C++ for the case where it uses the native
85288        # linker, instead of GNU ld.  If possible, this setting should
85289        # overridden to take advantage of the native linker features on
85290        # the platform it is being used on.
85291        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
85292      fi
85293
85294      # Commands to make compiler produce verbose output that lists
85295      # what "hidden" libraries, object files and flags are used when
85296      # linking a shared library.
85297      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
85298
85299    else
85300      GXX=no
85301      with_gnu_ld=no
85302      wlarc=
85303    fi
85304
85305    # PORTME: fill in a description of your system's C++ link characteristics
85306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
85307$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
85308    ld_shlibs_CXX=yes
85309    case $host_os in
85310      aix3*)
85311        # FIXME: insert proper C++ library support
85312        ld_shlibs_CXX=no
85313        ;;
85314      aix[4-9]*)
85315        if test ia64 = "$host_cpu"; then
85316          # On IA64, the linker does run time linking by default, so we don't
85317          # have to do anything special.
85318          aix_use_runtimelinking=no
85319          exp_sym_flag='-Bexport'
85320          no_entry_flag=
85321        else
85322          aix_use_runtimelinking=no
85323
85324          # Test if we are trying to use run time linking or normal
85325          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
85326          # have runtime linking enabled, and use it for executables.
85327          # For shared libraries, we enable/disable runtime linking
85328          # depending on the kind of the shared library created -
85329          # when "with_aix_soname,aix_use_runtimelinking" is:
85330          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
85331          # "aix,yes"  lib.so          shared, rtl:yes, for executables
85332          #            lib.a           static archive
85333          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
85334          #            lib.a(lib.so.V) shared, rtl:no,  for executables
85335          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
85336          #            lib.a(lib.so.V) shared, rtl:no
85337          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
85338          #            lib.a           static archive
85339          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
85340	    for ld_flag in $LDFLAGS; do
85341	      case $ld_flag in
85342	      *-brtl*)
85343	        aix_use_runtimelinking=yes
85344	        break
85345	        ;;
85346	      esac
85347	    done
85348	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
85349	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
85350	      # so we don't have lib.a shared libs to link our executables.
85351	      # We have to force runtime linking in this case.
85352	      aix_use_runtimelinking=yes
85353	      LDFLAGS="$LDFLAGS -Wl,-brtl"
85354	    fi
85355	    ;;
85356          esac
85357
85358          exp_sym_flag='-bexport'
85359          no_entry_flag='-bnoentry'
85360        fi
85361
85362        # When large executables or shared objects are built, AIX ld can
85363        # have problems creating the table of contents.  If linking a library
85364        # or program results in "error TOC overflow" add -mminimal-toc to
85365        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
85366        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
85367
85368        archive_cmds_CXX=''
85369        hardcode_direct_CXX=yes
85370        hardcode_direct_absolute_CXX=yes
85371        hardcode_libdir_separator_CXX=':'
85372        link_all_deplibs_CXX=yes
85373        file_list_spec_CXX='$wl-f,'
85374        case $with_aix_soname,$aix_use_runtimelinking in
85375        aix,*) ;;	# no import file
85376        svr4,* | *,yes) # use import file
85377          # The Import File defines what to hardcode.
85378          hardcode_direct_CXX=no
85379          hardcode_direct_absolute_CXX=no
85380          ;;
85381        esac
85382
85383        if test yes = "$GXX"; then
85384          case $host_os in aix4.[012]|aix4.[012].*)
85385          # We only want to do this on AIX 4.2 and lower, the check
85386          # below for broken collect2 doesn't work under 4.3+
85387	  collect2name=`$CC -print-prog-name=collect2`
85388	  if test -f "$collect2name" &&
85389	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
85390	  then
85391	    # We have reworked collect2
85392	    :
85393	  else
85394	    # We have old collect2
85395	    hardcode_direct_CXX=unsupported
85396	    # It fails to find uninstalled libraries when the uninstalled
85397	    # path is not listed in the libpath.  Setting hardcode_minus_L
85398	    # to unsupported forces relinking
85399	    hardcode_minus_L_CXX=yes
85400	    hardcode_libdir_flag_spec_CXX='-L$libdir'
85401	    hardcode_libdir_separator_CXX=
85402	  fi
85403          esac
85404          shared_flag='-shared'
85405	  if test yes = "$aix_use_runtimelinking"; then
85406	    shared_flag=$shared_flag' $wl-G'
85407	  fi
85408	  # Need to ensure runtime linking is disabled for the traditional
85409	  # shared library, or the linker may eventually find shared libraries
85410	  # /with/ Import File - we do not want to mix them.
85411	  shared_flag_aix='-shared'
85412	  shared_flag_svr4='-shared $wl-G'
85413        else
85414          # not using gcc
85415          if test ia64 = "$host_cpu"; then
85416	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
85417	  # chokes on -Wl,-G. The following line is correct:
85418	  shared_flag='-G'
85419          else
85420	    if test yes = "$aix_use_runtimelinking"; then
85421	      shared_flag='$wl-G'
85422	    else
85423	      shared_flag='$wl-bM:SRE'
85424	    fi
85425	    shared_flag_aix='$wl-bM:SRE'
85426	    shared_flag_svr4='$wl-G'
85427          fi
85428        fi
85429
85430        export_dynamic_flag_spec_CXX='$wl-bexpall'
85431        # It seems that -bexpall does not export symbols beginning with
85432        # underscore (_), so it is better to generate a list of symbols to
85433	# export.
85434        always_export_symbols_CXX=yes
85435	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
85436          # Warning - without using the other runtime loading flags (-brtl),
85437          # -berok will link without error, but may produce a broken library.
85438          # The "-G" linker flag allows undefined symbols.
85439          no_undefined_flag_CXX='-bernotok'
85440          # Determine the default libpath from the value encoded in an empty
85441          # executable.
85442          if test set = "${lt_cv_aix_libpath+set}"; then
85443  aix_libpath=$lt_cv_aix_libpath
85444else
85445  if ${lt_cv_aix_libpath__CXX+:} false; then :
85446  $as_echo_n "(cached) " >&6
85447else
85448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85449/* end confdefs.h.  */
85450
85451int
85452main ()
85453{
85454
85455  ;
85456  return 0;
85457}
85458_ACEOF
85459if ac_fn_cxx_try_link "$LINENO"; then :
85460
85461  lt_aix_libpath_sed='
85462      /Import File Strings/,/^$/ {
85463	  /^0/ {
85464	      s/^0  *\([^ ]*\) *$/\1/
85465	      p
85466	  }
85467      }'
85468  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
85469  # Check for a 64-bit object if we didn't find anything.
85470  if test -z "$lt_cv_aix_libpath__CXX"; then
85471    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
85472  fi
85473fi
85474rm -f core conftest.err conftest.$ac_objext \
85475    conftest$ac_exeext conftest.$ac_ext
85476  if test -z "$lt_cv_aix_libpath__CXX"; then
85477    lt_cv_aix_libpath__CXX=/usr/lib:/lib
85478  fi
85479
85480fi
85481
85482  aix_libpath=$lt_cv_aix_libpath__CXX
85483fi
85484
85485          hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
85486
85487          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
85488        else
85489          if test ia64 = "$host_cpu"; then
85490	    hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
85491	    allow_undefined_flag_CXX="-z nodefs"
85492	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
85493          else
85494	    # Determine the default libpath from the value encoded in an
85495	    # empty executable.
85496	    if test set = "${lt_cv_aix_libpath+set}"; then
85497  aix_libpath=$lt_cv_aix_libpath
85498else
85499  if ${lt_cv_aix_libpath__CXX+:} false; then :
85500  $as_echo_n "(cached) " >&6
85501else
85502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85503/* end confdefs.h.  */
85504
85505int
85506main ()
85507{
85508
85509  ;
85510  return 0;
85511}
85512_ACEOF
85513if ac_fn_cxx_try_link "$LINENO"; then :
85514
85515  lt_aix_libpath_sed='
85516      /Import File Strings/,/^$/ {
85517	  /^0/ {
85518	      s/^0  *\([^ ]*\) *$/\1/
85519	      p
85520	  }
85521      }'
85522  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
85523  # Check for a 64-bit object if we didn't find anything.
85524  if test -z "$lt_cv_aix_libpath__CXX"; then
85525    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
85526  fi
85527fi
85528rm -f core conftest.err conftest.$ac_objext \
85529    conftest$ac_exeext conftest.$ac_ext
85530  if test -z "$lt_cv_aix_libpath__CXX"; then
85531    lt_cv_aix_libpath__CXX=/usr/lib:/lib
85532  fi
85533
85534fi
85535
85536  aix_libpath=$lt_cv_aix_libpath__CXX
85537fi
85538
85539	    hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
85540	    # Warning - without using the other run time loading flags,
85541	    # -berok will link without error, but may produce a broken library.
85542	    no_undefined_flag_CXX=' $wl-bernotok'
85543	    allow_undefined_flag_CXX=' $wl-berok'
85544	    if test yes = "$with_gnu_ld"; then
85545	      # We only use this code for GNU lds that support --whole-archive.
85546	      whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
85547	    else
85548	      # Exported symbols can be pulled into shared objects from archives
85549	      whole_archive_flag_spec_CXX='$convenience'
85550	    fi
85551	    archive_cmds_need_lc_CXX=yes
85552	    archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
85553	    # -brtl affects multiple linker settings, -berok does not and is overridden later
85554	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
85555	    if test svr4 != "$with_aix_soname"; then
85556	      # This is similar to how AIX traditionally builds its shared
85557	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
85558	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
85559	    fi
85560	    if test aix != "$with_aix_soname"; then
85561	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
85562	    else
85563	      # used by -dlpreopen to get the symbols
85564	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
85565	    fi
85566	    archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
85567          fi
85568        fi
85569        ;;
85570
85571      beos*)
85572	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
85573	  allow_undefined_flag_CXX=unsupported
85574	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
85575	  # support --undefined.  This deserves some investigation.  FIXME
85576	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
85577	else
85578	  ld_shlibs_CXX=no
85579	fi
85580	;;
85581
85582      chorus*)
85583        case $cc_basename in
85584          *)
85585	  # FIXME: insert proper C++ library support
85586	  ld_shlibs_CXX=no
85587	  ;;
85588        esac
85589        ;;
85590
85591      cygwin* | mingw* | pw32* | cegcc*)
85592	case $GXX,$cc_basename in
85593	,cl* | no,cl*)
85594	  # Native MSVC
85595	  # hardcode_libdir_flag_spec is actually meaningless, as there is
85596	  # no search path for DLLs.
85597	  hardcode_libdir_flag_spec_CXX=' '
85598	  allow_undefined_flag_CXX=unsupported
85599	  always_export_symbols_CXX=yes
85600	  file_list_spec_CXX='@'
85601	  # Tell ltmain to make .lib files, not .a files.
85602	  libext=lib
85603	  # Tell ltmain to make .dll files, not .so files.
85604	  shrext_cmds=.dll
85605	  # FIXME: Setting linknames here is a bad hack.
85606	  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
85607	  archive_expsym_cmds_CXX='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
85608              cp "$export_symbols" "$output_objdir/$soname.def";
85609              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
85610            else
85611              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
85612            fi~
85613            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
85614            linknames='
85615	  # The linker will not automatically build a static lib if we build a DLL.
85616	  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
85617	  enable_shared_with_static_runtimes_CXX=yes
85618	  # Don't use ranlib
85619	  old_postinstall_cmds_CXX='chmod 644 $oldlib'
85620	  postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
85621            lt_tool_outputfile="@TOOL_OUTPUT@"~
85622            case $lt_outputfile in
85623              *.exe|*.EXE) ;;
85624              *)
85625                lt_outputfile=$lt_outputfile.exe
85626                lt_tool_outputfile=$lt_tool_outputfile.exe
85627                ;;
85628            esac~
85629            func_to_tool_file "$lt_outputfile"~
85630            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
85631              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
85632              $RM "$lt_outputfile.manifest";
85633            fi'
85634	  ;;
85635	*)
85636	  # g++
85637	  # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
85638	  # as there is no search path for DLLs.
85639	  hardcode_libdir_flag_spec_CXX='-L$libdir'
85640	  export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
85641	  allow_undefined_flag_CXX=unsupported
85642	  always_export_symbols_CXX=no
85643	  enable_shared_with_static_runtimes_CXX=yes
85644
85645	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
85646	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
85647	    # If the export-symbols file already is a .def file, use it as
85648	    # is; otherwise, prepend EXPORTS...
85649	    archive_expsym_cmds_CXX='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
85650              cp $export_symbols $output_objdir/$soname.def;
85651            else
85652              echo EXPORTS > $output_objdir/$soname.def;
85653              cat $export_symbols >> $output_objdir/$soname.def;
85654            fi~
85655            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
85656	  else
85657	    ld_shlibs_CXX=no
85658	  fi
85659	  ;;
85660	esac
85661	;;
85662      darwin* | rhapsody*)
85663
85664
85665  archive_cmds_need_lc_CXX=no
85666  hardcode_direct_CXX=no
85667  hardcode_automatic_CXX=yes
85668  hardcode_shlibpath_var_CXX=unsupported
85669  if test yes = "$lt_cv_ld_force_load"; then
85670    whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
85671
85672  else
85673    whole_archive_flag_spec_CXX=''
85674  fi
85675  link_all_deplibs_CXX=yes
85676  allow_undefined_flag_CXX=$_lt_dar_allow_undefined
85677  case $cc_basename in
85678     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
85679     *) _lt_dar_can_shared=$GCC ;;
85680  esac
85681  if test yes = "$_lt_dar_can_shared"; then
85682    output_verbose_link_cmd=func_echo_all
85683    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
85684    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
85685    archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
85686    module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
85687       if test yes != "$lt_cv_apple_cc_single_mod"; then
85688      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
85689      archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
85690    fi
85691
85692  else
85693  ld_shlibs_CXX=no
85694  fi
85695
85696	;;
85697
85698      os2*)
85699	hardcode_libdir_flag_spec_CXX='-L$libdir'
85700	hardcode_minus_L_CXX=yes
85701	allow_undefined_flag_CXX=unsupported
85702	shrext_cmds=.dll
85703	archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
85704	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
85705	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
85706	  $ECHO EXPORTS >> $output_objdir/$libname.def~
85707	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
85708	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
85709	  emximp -o $lib $output_objdir/$libname.def'
85710	archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
85711	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
85712	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
85713	  $ECHO EXPORTS >> $output_objdir/$libname.def~
85714	  prefix_cmds="$SED"~
85715	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
85716	    prefix_cmds="$prefix_cmds -e 1d";
85717	  fi~
85718	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
85719	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
85720	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
85721	  emximp -o $lib $output_objdir/$libname.def'
85722	old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
85723	enable_shared_with_static_runtimes_CXX=yes
85724	;;
85725
85726      dgux*)
85727        case $cc_basename in
85728          ec++*)
85729	    # FIXME: insert proper C++ library support
85730	    ld_shlibs_CXX=no
85731	    ;;
85732          ghcx*)
85733	    # Green Hills C++ Compiler
85734	    # FIXME: insert proper C++ library support
85735	    ld_shlibs_CXX=no
85736	    ;;
85737          *)
85738	    # FIXME: insert proper C++ library support
85739	    ld_shlibs_CXX=no
85740	    ;;
85741        esac
85742        ;;
85743
85744      freebsd2.*)
85745        # C++ shared libraries reported to be fairly broken before
85746	# switch to ELF
85747        ld_shlibs_CXX=no
85748        ;;
85749
85750      freebsd-elf*)
85751        archive_cmds_need_lc_CXX=no
85752        ;;
85753
85754      freebsd* | dragonfly*)
85755        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
85756        # conventions
85757        ld_shlibs_CXX=yes
85758        ;;
85759
85760      haiku*)
85761        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
85762        link_all_deplibs_CXX=yes
85763        ;;
85764
85765      hpux9*)
85766        hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
85767        hardcode_libdir_separator_CXX=:
85768        export_dynamic_flag_spec_CXX='$wl-E'
85769        hardcode_direct_CXX=yes
85770        hardcode_minus_L_CXX=yes # Not in the search PATH,
85771				             # but as the default
85772				             # location of the library.
85773
85774        case $cc_basename in
85775          CC*)
85776            # FIXME: insert proper C++ library support
85777            ld_shlibs_CXX=no
85778            ;;
85779          aCC*)
85780            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
85781            # Commands to make compiler produce verbose output that lists
85782            # what "hidden" libraries, object files and flags are used when
85783            # linking a shared library.
85784            #
85785            # There doesn't appear to be a way to prevent this compiler from
85786            # explicitly linking system object files so we need to strip them
85787            # from the output so that they don't get included in the library
85788            # dependencies.
85789            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
85790            ;;
85791          *)
85792            if test yes = "$GXX"; then
85793              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
85794            else
85795              # FIXME: insert proper C++ library support
85796              ld_shlibs_CXX=no
85797            fi
85798            ;;
85799        esac
85800        ;;
85801
85802      hpux10*|hpux11*)
85803        if test no = "$with_gnu_ld"; then
85804	  hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
85805	  hardcode_libdir_separator_CXX=:
85806
85807          case $host_cpu in
85808            hppa*64*|ia64*)
85809              ;;
85810            *)
85811	      export_dynamic_flag_spec_CXX='$wl-E'
85812              ;;
85813          esac
85814        fi
85815        case $host_cpu in
85816          hppa*64*|ia64*)
85817            hardcode_direct_CXX=no
85818            hardcode_shlibpath_var_CXX=no
85819            ;;
85820          *)
85821            hardcode_direct_CXX=yes
85822            hardcode_direct_absolute_CXX=yes
85823            hardcode_minus_L_CXX=yes # Not in the search PATH,
85824					         # but as the default
85825					         # location of the library.
85826            ;;
85827        esac
85828
85829        case $cc_basename in
85830          CC*)
85831	    # FIXME: insert proper C++ library support
85832	    ld_shlibs_CXX=no
85833	    ;;
85834          aCC*)
85835	    case $host_cpu in
85836	      hppa*64*)
85837	        archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
85838	        ;;
85839	      ia64*)
85840	        archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
85841	        ;;
85842	      *)
85843	        archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
85844	        ;;
85845	    esac
85846	    # Commands to make compiler produce verbose output that lists
85847	    # what "hidden" libraries, object files and flags are used when
85848	    # linking a shared library.
85849	    #
85850	    # There doesn't appear to be a way to prevent this compiler from
85851	    # explicitly linking system object files so we need to strip them
85852	    # from the output so that they don't get included in the library
85853	    # dependencies.
85854	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
85855	    ;;
85856          *)
85857	    if test yes = "$GXX"; then
85858	      if test no = "$with_gnu_ld"; then
85859	        case $host_cpu in
85860	          hppa*64*)
85861	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
85862	            ;;
85863	          ia64*)
85864	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
85865	            ;;
85866	          *)
85867	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
85868	            ;;
85869	        esac
85870	      fi
85871	    else
85872	      # FIXME: insert proper C++ library support
85873	      ld_shlibs_CXX=no
85874	    fi
85875	    ;;
85876        esac
85877        ;;
85878
85879      interix[3-9]*)
85880	hardcode_direct_CXX=no
85881	hardcode_shlibpath_var_CXX=no
85882	hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
85883	export_dynamic_flag_spec_CXX='$wl-E'
85884	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
85885	# Instead, shared libraries are loaded at an image base (0x10000000 by
85886	# default) and relocated if they conflict, which is a slow very memory
85887	# consuming and fragmenting process.  To avoid this, we pick a random,
85888	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
85889	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
85890	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
85891	archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
85892	;;
85893      irix5* | irix6*)
85894        case $cc_basename in
85895          CC*)
85896	    # SGI C++
85897	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
85898
85899	    # Archives containing C++ object files must be created using
85900	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
85901	    # necessary to make sure instantiated templates are included
85902	    # in the archive.
85903	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
85904	    ;;
85905          *)
85906	    if test yes = "$GXX"; then
85907	      if test no = "$with_gnu_ld"; then
85908	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
85909	      else
85910	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
85911	      fi
85912	    fi
85913	    link_all_deplibs_CXX=yes
85914	    ;;
85915        esac
85916        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
85917        hardcode_libdir_separator_CXX=:
85918        inherit_rpath_CXX=yes
85919        ;;
85920
85921      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
85922        case $cc_basename in
85923          KCC*)
85924	    # Kuck and Associates, Inc. (KAI) C++ Compiler
85925
85926	    # KCC will only create a shared library if the output file
85927	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
85928	    # to its proper name (with version) after linking.
85929	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
85930	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
85931	    # Commands to make compiler produce verbose output that lists
85932	    # what "hidden" libraries, object files and flags are used when
85933	    # linking a shared library.
85934	    #
85935	    # There doesn't appear to be a way to prevent this compiler from
85936	    # explicitly linking system object files so we need to strip them
85937	    # from the output so that they don't get included in the library
85938	    # dependencies.
85939	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
85940
85941	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
85942	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
85943
85944	    # Archives containing C++ object files must be created using
85945	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
85946	    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
85947	    ;;
85948	  icpc* | ecpc* )
85949	    # Intel C++
85950	    with_gnu_ld=yes
85951	    # version 8.0 and above of icpc choke on multiply defined symbols
85952	    # if we add $predep_objects and $postdep_objects, however 7.1 and
85953	    # earlier do not add the objects themselves.
85954	    case `$CC -V 2>&1` in
85955	      *"Version 7."*)
85956	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
85957		archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
85958		;;
85959	      *)  # Version 8.0 or newer
85960	        tmp_idyn=
85961	        case $host_cpu in
85962		  ia64*) tmp_idyn=' -i_dynamic';;
85963		esac
85964	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
85965		archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
85966		;;
85967	    esac
85968	    archive_cmds_need_lc_CXX=no
85969	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
85970	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
85971	    whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
85972	    ;;
85973          pgCC* | pgcpp*)
85974            # Portland Group C++ compiler
85975	    case `$CC -V` in
85976	    *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
85977	      prelink_cmds_CXX='tpldir=Template.dir~
85978               rm -rf $tpldir~
85979               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
85980               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
85981	      old_archive_cmds_CXX='tpldir=Template.dir~
85982                rm -rf $tpldir~
85983                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
85984                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
85985                $RANLIB $oldlib'
85986	      archive_cmds_CXX='tpldir=Template.dir~
85987                rm -rf $tpldir~
85988                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
85989                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
85990	      archive_expsym_cmds_CXX='tpldir=Template.dir~
85991                rm -rf $tpldir~
85992                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
85993                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
85994	      ;;
85995	    *) # Version 6 and above use weak symbols
85996	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
85997	      archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$lib-ver -o $lib'
85998	      ;;
85999	    esac
86000
86001	    hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
86002	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
86003	    whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
86004            ;;
86005	  cxx*)
86006	    # Compaq C++
86007	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
86008	    archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-version-script $wl$lib-ver'
86009
86010	    runpath_var=LD_RUN_PATH
86011	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
86012	    hardcode_libdir_separator_CXX=:
86013
86014	    # Commands to make compiler produce verbose output that lists
86015	    # what "hidden" libraries, object files and flags are used when
86016	    # linking a shared library.
86017	    #
86018	    # There doesn't appear to be a way to prevent this compiler from
86019	    # explicitly linking system object files so we need to strip them
86020	    # from the output so that they don't get included in the library
86021	    # dependencies.
86022	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
86023	    ;;
86024	  xl* | mpixl* | bgxl*)
86025	    # IBM XL 8.0 on PPC, with GNU ld
86026	    hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
86027	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
86028	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
86029	    if test yes = "$supports_anon_versioning"; then
86030	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
86031                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
86032                echo "local: *; };" >> $output_objdir/$libname.ver~
86033                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
86034	    fi
86035	    ;;
86036	  *)
86037	    case `$CC -V 2>&1 | sed 5q` in
86038	    *Sun\ C*)
86039	      # Sun C++ 5.9
86040	      no_undefined_flag_CXX=' -zdefs'
86041	      archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
86042	      archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-version-script $wl$lib-ver'
86043	      hardcode_libdir_flag_spec_CXX='-R$libdir'
86044	      whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
86045	      compiler_needs_object_CXX=yes
86046
86047	      # Not sure whether something based on
86048	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
86049	      # would be better.
86050	      output_verbose_link_cmd='func_echo_all'
86051
86052	      # Archives containing C++ object files must be created using
86053	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
86054	      # necessary to make sure instantiated templates are included
86055	      # in the archive.
86056	      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
86057	      ;;
86058	    esac
86059	    ;;
86060	esac
86061	;;
86062
86063      lynxos*)
86064        # FIXME: insert proper C++ library support
86065	ld_shlibs_CXX=no
86066	;;
86067
86068      m88k*)
86069        # FIXME: insert proper C++ library support
86070        ld_shlibs_CXX=no
86071	;;
86072
86073      mvs*)
86074        case $cc_basename in
86075          cxx*)
86076	    # FIXME: insert proper C++ library support
86077	    ld_shlibs_CXX=no
86078	    ;;
86079	  *)
86080	    # FIXME: insert proper C++ library support
86081	    ld_shlibs_CXX=no
86082	    ;;
86083	esac
86084	;;
86085
86086      netbsd*)
86087        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
86088	  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
86089	  wlarc=
86090	  hardcode_libdir_flag_spec_CXX='-R$libdir'
86091	  hardcode_direct_CXX=yes
86092	  hardcode_shlibpath_var_CXX=no
86093	fi
86094	# Workaround some broken pre-1.5 toolchains
86095	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
86096	;;
86097
86098      *nto* | *qnx*)
86099        ld_shlibs_CXX=yes
86100	;;
86101
86102      openbsd* | bitrig*)
86103	if test -f /usr/libexec/ld.so; then
86104	  hardcode_direct_CXX=yes
86105	  hardcode_shlibpath_var_CXX=no
86106	  hardcode_direct_absolute_CXX=yes
86107	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
86108	  hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
86109	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
86110	    archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~		 sed -e "s|$|;|" < $export_symbols >> $lib-ver~	 echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-version-script,$lib-ver -o $lib'
86111	    export_dynamic_flag_spec_CXX='$wl-E'
86112	    whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
86113	  fi
86114	  output_verbose_link_cmd=func_echo_all
86115	else
86116	  ld_shlibs_CXX=no
86117	fi
86118	;;
86119
86120      osf3* | osf4* | osf5*)
86121        case $cc_basename in
86122          KCC*)
86123	    # Kuck and Associates, Inc. (KAI) C++ Compiler
86124
86125	    # KCC will only create a shared library if the output file
86126	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
86127	    # to its proper name (with version) after linking.
86128	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
86129
86130	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
86131	    hardcode_libdir_separator_CXX=:
86132
86133	    # Archives containing C++ object files must be created using
86134	    # the KAI C++ compiler.
86135	    case $host in
86136	      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
86137	      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
86138	    esac
86139	    ;;
86140          RCC*)
86141	    # Rational C++ 2.4.1
86142	    # FIXME: insert proper C++ library support
86143	    ld_shlibs_CXX=no
86144	    ;;
86145          cxx*)
86146	    case $host in
86147	      osf3*)
86148	        allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
86149	        archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
86150	        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
86151		;;
86152	      *)
86153	        allow_undefined_flag_CXX=' -expect_unresolved \*'
86154	        archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
86155	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
86156                  echo "-hidden">> $lib.exp~
86157                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
86158                  $RM $lib.exp'
86159	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
86160		;;
86161	    esac
86162
86163	    hardcode_libdir_separator_CXX=:
86164
86165	    # Commands to make compiler produce verbose output that lists
86166	    # what "hidden" libraries, object files and flags are used when
86167	    # linking a shared library.
86168	    #
86169	    # There doesn't appear to be a way to prevent this compiler from
86170	    # explicitly linking system object files so we need to strip them
86171	    # from the output so that they don't get included in the library
86172	    # dependencies.
86173	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
86174	    ;;
86175	  *)
86176	    if test yes,no = "$GXX,$with_gnu_ld"; then
86177	      allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
86178	      case $host in
86179	        osf3*)
86180	          archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
86181		  ;;
86182	        *)
86183	          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
86184		  ;;
86185	      esac
86186
86187	      hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
86188	      hardcode_libdir_separator_CXX=:
86189
86190	      # Commands to make compiler produce verbose output that lists
86191	      # what "hidden" libraries, object files and flags are used when
86192	      # linking a shared library.
86193	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
86194
86195	    else
86196	      # FIXME: insert proper C++ library support
86197	      ld_shlibs_CXX=no
86198	    fi
86199	    ;;
86200        esac
86201        ;;
86202
86203      psos*)
86204        # FIXME: insert proper C++ library support
86205        ld_shlibs_CXX=no
86206        ;;
86207
86208      sunos4*)
86209        case $cc_basename in
86210          CC*)
86211	    # Sun C++ 4.x
86212	    # FIXME: insert proper C++ library support
86213	    ld_shlibs_CXX=no
86214	    ;;
86215          lcc*)
86216	    # Lucid
86217	    # FIXME: insert proper C++ library support
86218	    ld_shlibs_CXX=no
86219	    ;;
86220          *)
86221	    # FIXME: insert proper C++ library support
86222	    ld_shlibs_CXX=no
86223	    ;;
86224        esac
86225        ;;
86226
86227      solaris*)
86228        case $cc_basename in
86229          CC* | sunCC*)
86230	    # Sun C++ 4.2, 5.x and Centerline C++
86231            archive_cmds_need_lc_CXX=yes
86232	    no_undefined_flag_CXX=' -zdefs'
86233	    archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
86234	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
86235              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
86236
86237	    hardcode_libdir_flag_spec_CXX='-R$libdir'
86238	    hardcode_shlibpath_var_CXX=no
86239	    case $host_os in
86240	      solaris2.[0-5] | solaris2.[0-5].*) ;;
86241	      *)
86242		# The compiler driver will combine and reorder linker options,
86243		# but understands '-z linker_flag'.
86244	        # Supported since Solaris 2.6 (maybe 2.5.1?)
86245		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
86246	        ;;
86247	    esac
86248	    link_all_deplibs_CXX=yes
86249
86250	    output_verbose_link_cmd='func_echo_all'
86251
86252	    # Archives containing C++ object files must be created using
86253	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
86254	    # necessary to make sure instantiated templates are included
86255	    # in the archive.
86256	    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
86257	    ;;
86258          gcx*)
86259	    # Green Hills C++ Compiler
86260	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
86261
86262	    # The C++ compiler must be used to create the archive.
86263	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
86264	    ;;
86265          *)
86266	    # GNU C++ compiler with Solaris linker
86267	    if test yes,no = "$GXX,$with_gnu_ld"; then
86268	      no_undefined_flag_CXX=' $wl-z ${wl}defs'
86269	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
86270	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
86271	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
86272                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
86273
86274	        # Commands to make compiler produce verbose output that lists
86275	        # what "hidden" libraries, object files and flags are used when
86276	        # linking a shared library.
86277	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
86278	      else
86279	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
86280	        # platform.
86281	        archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
86282	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
86283                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
86284
86285	        # Commands to make compiler produce verbose output that lists
86286	        # what "hidden" libraries, object files and flags are used when
86287	        # linking a shared library.
86288	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
86289	      fi
86290
86291	      hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
86292	      case $host_os in
86293		solaris2.[0-5] | solaris2.[0-5].*) ;;
86294		*)
86295		  whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
86296		  ;;
86297	      esac
86298	    fi
86299	    ;;
86300        esac
86301        ;;
86302
86303    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
86304      no_undefined_flag_CXX='$wl-z,text'
86305      archive_cmds_need_lc_CXX=no
86306      hardcode_shlibpath_var_CXX=no
86307      runpath_var='LD_RUN_PATH'
86308
86309      case $cc_basename in
86310        CC*)
86311	  archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
86312	  archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
86313	  ;;
86314	*)
86315	  archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
86316	  archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
86317	  ;;
86318      esac
86319      ;;
86320
86321      sysv5* | sco3.2v5* | sco5v6*)
86322	# Note: We CANNOT use -z defs as we might desire, because we do not
86323	# link with -lc, and that would cause any symbols used from libc to
86324	# always be unresolved, which means just about no library would
86325	# ever link correctly.  If we're not using GNU ld we use -z text
86326	# though, which does catch some bad symbols but isn't as heavy-handed
86327	# as -z defs.
86328	no_undefined_flag_CXX='$wl-z,text'
86329	allow_undefined_flag_CXX='$wl-z,nodefs'
86330	archive_cmds_need_lc_CXX=no
86331	hardcode_shlibpath_var_CXX=no
86332	hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
86333	hardcode_libdir_separator_CXX=':'
86334	link_all_deplibs_CXX=yes
86335	export_dynamic_flag_spec_CXX='$wl-Bexport'
86336	runpath_var='LD_RUN_PATH'
86337
86338	case $cc_basename in
86339          CC*)
86340	    archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
86341	    archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
86342	    old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
86343              '"$old_archive_cmds_CXX"
86344	    reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
86345              '"$reload_cmds_CXX"
86346	    ;;
86347	  *)
86348	    archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
86349	    archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
86350	    ;;
86351	esac
86352      ;;
86353
86354      tandem*)
86355        case $cc_basename in
86356          NCC*)
86357	    # NonStop-UX NCC 3.20
86358	    # FIXME: insert proper C++ library support
86359	    ld_shlibs_CXX=no
86360	    ;;
86361          *)
86362	    # FIXME: insert proper C++ library support
86363	    ld_shlibs_CXX=no
86364	    ;;
86365        esac
86366        ;;
86367
86368      vxworks*)
86369        # FIXME: insert proper C++ library support
86370        ld_shlibs_CXX=no
86371        ;;
86372
86373      *)
86374        # FIXME: insert proper C++ library support
86375        ld_shlibs_CXX=no
86376        ;;
86377    esac
86378
86379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
86380$as_echo "$ld_shlibs_CXX" >&6; }
86381    test no = "$ld_shlibs_CXX" && can_build_shared=no
86382
86383    GCC_CXX=$GXX
86384    LD_CXX=$LD
86385
86386    ## CAVEAT EMPTOR:
86387    ## There is no encapsulation within the following macros, do not change
86388    ## the running order or otherwise move them around unless you know exactly
86389    ## what you are doing...
86390    # Dependencies to place before and after the object being linked:
86391predep_objects_CXX=
86392postdep_objects_CXX=
86393predeps_CXX=
86394postdeps_CXX=
86395compiler_lib_search_path_CXX=
86396
86397cat > conftest.$ac_ext <<_LT_EOF
86398class Foo
86399{
86400public:
86401  Foo (void) { a = 0; }
86402private:
86403  int a;
86404};
86405_LT_EOF
86406
86407
86408_lt_libdeps_save_CFLAGS=$CFLAGS
86409case "$CC $CFLAGS " in #(
86410*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
86411*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
86412*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
86413esac
86414
86415if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
86416  (eval $ac_compile) 2>&5
86417  ac_status=$?
86418  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
86419  test $ac_status = 0; }; then
86420  # Parse the compiler output and extract the necessary
86421  # objects, libraries and library flags.
86422
86423  # Sentinel used to keep track of whether or not we are before
86424  # the conftest object file.
86425  pre_test_object_deps_done=no
86426
86427  for p in `eval "$output_verbose_link_cmd"`; do
86428    case $prev$p in
86429
86430    -L* | -R* | -l*)
86431       # Some compilers place space between "-{L,R}" and the path.
86432       # Remove the space.
86433       if test x-L = "$p" ||
86434          test x-R = "$p"; then
86435	 prev=$p
86436	 continue
86437       fi
86438
86439       # Expand the sysroot to ease extracting the directories later.
86440       if test -z "$prev"; then
86441         case $p in
86442         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
86443         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
86444         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
86445         esac
86446       fi
86447       case $p in
86448       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
86449       esac
86450       if test no = "$pre_test_object_deps_done"; then
86451	 case $prev in
86452	 -L | -R)
86453	   # Internal compiler library paths should come after those
86454	   # provided the user.  The postdeps already come after the
86455	   # user supplied libs so there is no need to process them.
86456	   if test -z "$compiler_lib_search_path_CXX"; then
86457	     compiler_lib_search_path_CXX=$prev$p
86458	   else
86459	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
86460	   fi
86461	   ;;
86462	 # The "-l" case would never come before the object being
86463	 # linked, so don't bother handling this case.
86464	 esac
86465       else
86466	 if test -z "$postdeps_CXX"; then
86467	   postdeps_CXX=$prev$p
86468	 else
86469	   postdeps_CXX="${postdeps_CXX} $prev$p"
86470	 fi
86471       fi
86472       prev=
86473       ;;
86474
86475    *.lto.$objext) ;; # Ignore GCC LTO objects
86476    *.$objext)
86477       # This assumes that the test object file only shows up
86478       # once in the compiler output.
86479       if test "$p" = "conftest.$objext"; then
86480	 pre_test_object_deps_done=yes
86481	 continue
86482       fi
86483
86484       if test no = "$pre_test_object_deps_done"; then
86485	 if test -z "$predep_objects_CXX"; then
86486	   predep_objects_CXX=$p
86487	 else
86488	   predep_objects_CXX="$predep_objects_CXX $p"
86489	 fi
86490       else
86491	 if test -z "$postdep_objects_CXX"; then
86492	   postdep_objects_CXX=$p
86493	 else
86494	   postdep_objects_CXX="$postdep_objects_CXX $p"
86495	 fi
86496       fi
86497       ;;
86498
86499    *) ;; # Ignore the rest.
86500
86501    esac
86502  done
86503
86504  # Clean up.
86505  rm -f a.out a.exe
86506else
86507  echo "libtool.m4: error: problem compiling CXX test program"
86508fi
86509
86510$RM -f confest.$objext
86511CFLAGS=$_lt_libdeps_save_CFLAGS
86512
86513# PORTME: override above test on systems where it is broken
86514case $host_os in
86515interix[3-9]*)
86516  # Interix 3.5 installs completely hosed .la files for C++, so rather than
86517  # hack all around it, let's just trust "g++" to DTRT.
86518  predep_objects_CXX=
86519  postdep_objects_CXX=
86520  postdeps_CXX=
86521  ;;
86522esac
86523
86524
86525case " $postdeps_CXX " in
86526*" -lc "*) archive_cmds_need_lc_CXX=no ;;
86527esac
86528 compiler_lib_search_dirs_CXX=
86529if test -n "${compiler_lib_search_path_CXX}"; then
86530 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
86531fi
86532
86533
86534
86535
86536
86537
86538
86539
86540
86541
86542
86543
86544
86545
86546
86547
86548
86549
86550
86551
86552
86553
86554
86555
86556
86557
86558
86559
86560
86561
86562
86563    lt_prog_compiler_wl_CXX=
86564lt_prog_compiler_pic_CXX=
86565lt_prog_compiler_static_CXX=
86566
86567
86568  # C++ specific cases for pic, static, wl, etc.
86569  if test yes = "$GXX"; then
86570    lt_prog_compiler_wl_CXX='-Wl,'
86571    lt_prog_compiler_static_CXX='-static'
86572
86573    case $host_os in
86574    aix*)
86575      # All AIX code is PIC.
86576      if test ia64 = "$host_cpu"; then
86577	# AIX 5 now supports IA64 processor
86578	lt_prog_compiler_static_CXX='-Bstatic'
86579      fi
86580      lt_prog_compiler_pic_CXX='-fPIC'
86581      ;;
86582
86583    amigaos*)
86584      case $host_cpu in
86585      powerpc)
86586            # see comment about AmigaOS4 .so support
86587            lt_prog_compiler_pic_CXX='-fPIC'
86588        ;;
86589      m68k)
86590            # FIXME: we need at least 68020 code to build shared libraries, but
86591            # adding the '-m68020' flag to GCC prevents building anything better,
86592            # like '-m68040'.
86593            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
86594        ;;
86595      esac
86596      ;;
86597
86598    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
86599      # PIC is the default for these OSes.
86600      ;;
86601    mingw* | cygwin* | os2* | pw32* | cegcc*)
86602      # This hack is so that the source file can tell whether it is being
86603      # built for inclusion in a dll (and should export symbols for example).
86604      # Although the cygwin gcc ignores -fPIC, still need this for old-style
86605      # (--disable-auto-import) libraries
86606      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
86607      case $host_os in
86608      os2*)
86609	lt_prog_compiler_static_CXX='$wl-static'
86610	;;
86611      esac
86612      ;;
86613    darwin* | rhapsody*)
86614      # PIC is the default on this platform
86615      # Common symbols not allowed in MH_DYLIB files
86616      lt_prog_compiler_pic_CXX='-fno-common'
86617      ;;
86618    *djgpp*)
86619      # DJGPP does not support shared libraries at all
86620      lt_prog_compiler_pic_CXX=
86621      ;;
86622    haiku*)
86623      # PIC is the default for Haiku.
86624      # The "-static" flag exists, but is broken.
86625      lt_prog_compiler_static_CXX=
86626      ;;
86627    interix[3-9]*)
86628      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
86629      # Instead, we relocate shared libraries at runtime.
86630      ;;
86631    sysv4*MP*)
86632      if test -d /usr/nec; then
86633	lt_prog_compiler_pic_CXX=-Kconform_pic
86634      fi
86635      ;;
86636    hpux*)
86637      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
86638      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
86639      # sets the default TLS model and affects inlining.
86640      case $host_cpu in
86641      hppa*64*)
86642	;;
86643      *)
86644	lt_prog_compiler_pic_CXX='-fPIC'
86645	;;
86646      esac
86647      ;;
86648    *qnx* | *nto*)
86649      # QNX uses GNU C++, but need to define -shared option too, otherwise
86650      # it will coredump.
86651      lt_prog_compiler_pic_CXX='-fPIC -shared'
86652      ;;
86653    *)
86654      lt_prog_compiler_pic_CXX='-fPIC'
86655      ;;
86656    esac
86657  else
86658    case $host_os in
86659      aix[4-9]*)
86660	# All AIX code is PIC.
86661	if test ia64 = "$host_cpu"; then
86662	  # AIX 5 now supports IA64 processor
86663	  lt_prog_compiler_static_CXX='-Bstatic'
86664	else
86665	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
86666	fi
86667	;;
86668      chorus*)
86669	case $cc_basename in
86670	cxch68*)
86671	  # Green Hills C++ Compiler
86672	  # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
86673	  ;;
86674	esac
86675	;;
86676      mingw* | cygwin* | os2* | pw32* | cegcc*)
86677	# This hack is so that the source file can tell whether it is being
86678	# built for inclusion in a dll (and should export symbols for example).
86679	lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
86680	;;
86681      dgux*)
86682	case $cc_basename in
86683	  ec++*)
86684	    lt_prog_compiler_pic_CXX='-KPIC'
86685	    ;;
86686	  ghcx*)
86687	    # Green Hills C++ Compiler
86688	    lt_prog_compiler_pic_CXX='-pic'
86689	    ;;
86690	  *)
86691	    ;;
86692	esac
86693	;;
86694      freebsd* | dragonfly*)
86695	# FreeBSD uses GNU C++
86696	;;
86697      hpux9* | hpux10* | hpux11*)
86698	case $cc_basename in
86699	  CC*)
86700	    lt_prog_compiler_wl_CXX='-Wl,'
86701	    lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
86702	    if test ia64 != "$host_cpu"; then
86703	      lt_prog_compiler_pic_CXX='+Z'
86704	    fi
86705	    ;;
86706	  aCC*)
86707	    lt_prog_compiler_wl_CXX='-Wl,'
86708	    lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
86709	    case $host_cpu in
86710	    hppa*64*|ia64*)
86711	      # +Z the default
86712	      ;;
86713	    *)
86714	      lt_prog_compiler_pic_CXX='+Z'
86715	      ;;
86716	    esac
86717	    ;;
86718	  *)
86719	    ;;
86720	esac
86721	;;
86722      interix*)
86723	# This is c89, which is MS Visual C++ (no shared libs)
86724	# Anyone wants to do a port?
86725	;;
86726      irix5* | irix6* | nonstopux*)
86727	case $cc_basename in
86728	  CC*)
86729	    lt_prog_compiler_wl_CXX='-Wl,'
86730	    lt_prog_compiler_static_CXX='-non_shared'
86731	    # CC pic flag -KPIC is the default.
86732	    ;;
86733	  *)
86734	    ;;
86735	esac
86736	;;
86737      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
86738	case $cc_basename in
86739	  KCC*)
86740	    # KAI C++ Compiler
86741	    lt_prog_compiler_wl_CXX='--backend -Wl,'
86742	    lt_prog_compiler_pic_CXX='-fPIC'
86743	    ;;
86744	  ecpc* )
86745	    # old Intel C++ for x86_64, which still supported -KPIC.
86746	    lt_prog_compiler_wl_CXX='-Wl,'
86747	    lt_prog_compiler_pic_CXX='-KPIC'
86748	    lt_prog_compiler_static_CXX='-static'
86749	    ;;
86750	  icpc* )
86751	    # Intel C++, used to be incompatible with GCC.
86752	    # ICC 10 doesn't accept -KPIC any more.
86753	    lt_prog_compiler_wl_CXX='-Wl,'
86754	    lt_prog_compiler_pic_CXX='-fPIC'
86755	    lt_prog_compiler_static_CXX='-static'
86756	    ;;
86757	  pgCC* | pgcpp*)
86758	    # Portland Group C++ compiler
86759	    lt_prog_compiler_wl_CXX='-Wl,'
86760	    lt_prog_compiler_pic_CXX='-fpic'
86761	    lt_prog_compiler_static_CXX='-Bstatic'
86762	    ;;
86763	  cxx*)
86764	    # Compaq C++
86765	    # Make sure the PIC flag is empty.  It appears that all Alpha
86766	    # Linux and Compaq Tru64 Unix objects are PIC.
86767	    lt_prog_compiler_pic_CXX=
86768	    lt_prog_compiler_static_CXX='-non_shared'
86769	    ;;
86770	  xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
86771	    # IBM XL 8.0, 9.0 on PPC and BlueGene
86772	    lt_prog_compiler_wl_CXX='-Wl,'
86773	    lt_prog_compiler_pic_CXX='-qpic'
86774	    lt_prog_compiler_static_CXX='-qstaticlink'
86775	    ;;
86776	  *)
86777	    case `$CC -V 2>&1 | sed 5q` in
86778	    *Sun\ C*)
86779	      # Sun C++ 5.9
86780	      lt_prog_compiler_pic_CXX='-KPIC'
86781	      lt_prog_compiler_static_CXX='-Bstatic'
86782	      lt_prog_compiler_wl_CXX='-Qoption ld '
86783	      ;;
86784	    esac
86785	    ;;
86786	esac
86787	;;
86788      lynxos*)
86789	;;
86790      m88k*)
86791	;;
86792      mvs*)
86793	case $cc_basename in
86794	  cxx*)
86795	    lt_prog_compiler_pic_CXX='-W c,exportall'
86796	    ;;
86797	  *)
86798	    ;;
86799	esac
86800	;;
86801      netbsd*)
86802	;;
86803      *qnx* | *nto*)
86804        # QNX uses GNU C++, but need to define -shared option too, otherwise
86805        # it will coredump.
86806        lt_prog_compiler_pic_CXX='-fPIC -shared'
86807        ;;
86808      osf3* | osf4* | osf5*)
86809	case $cc_basename in
86810	  KCC*)
86811	    lt_prog_compiler_wl_CXX='--backend -Wl,'
86812	    ;;
86813	  RCC*)
86814	    # Rational C++ 2.4.1
86815	    lt_prog_compiler_pic_CXX='-pic'
86816	    ;;
86817	  cxx*)
86818	    # Digital/Compaq C++
86819	    lt_prog_compiler_wl_CXX='-Wl,'
86820	    # Make sure the PIC flag is empty.  It appears that all Alpha
86821	    # Linux and Compaq Tru64 Unix objects are PIC.
86822	    lt_prog_compiler_pic_CXX=
86823	    lt_prog_compiler_static_CXX='-non_shared'
86824	    ;;
86825	  *)
86826	    ;;
86827	esac
86828	;;
86829      psos*)
86830	;;
86831      solaris*)
86832	case $cc_basename in
86833	  CC* | sunCC*)
86834	    # Sun C++ 4.2, 5.x and Centerline C++
86835	    lt_prog_compiler_pic_CXX='-KPIC'
86836	    lt_prog_compiler_static_CXX='-Bstatic'
86837	    lt_prog_compiler_wl_CXX='-Qoption ld '
86838	    ;;
86839	  gcx*)
86840	    # Green Hills C++ Compiler
86841	    lt_prog_compiler_pic_CXX='-PIC'
86842	    ;;
86843	  *)
86844	    ;;
86845	esac
86846	;;
86847      sunos4*)
86848	case $cc_basename in
86849	  CC*)
86850	    # Sun C++ 4.x
86851	    lt_prog_compiler_pic_CXX='-pic'
86852	    lt_prog_compiler_static_CXX='-Bstatic'
86853	    ;;
86854	  lcc*)
86855	    # Lucid
86856	    lt_prog_compiler_pic_CXX='-pic'
86857	    ;;
86858	  *)
86859	    ;;
86860	esac
86861	;;
86862      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
86863	case $cc_basename in
86864	  CC*)
86865	    lt_prog_compiler_wl_CXX='-Wl,'
86866	    lt_prog_compiler_pic_CXX='-KPIC'
86867	    lt_prog_compiler_static_CXX='-Bstatic'
86868	    ;;
86869	esac
86870	;;
86871      tandem*)
86872	case $cc_basename in
86873	  NCC*)
86874	    # NonStop-UX NCC 3.20
86875	    lt_prog_compiler_pic_CXX='-KPIC'
86876	    ;;
86877	  *)
86878	    ;;
86879	esac
86880	;;
86881      vxworks*)
86882	;;
86883      *)
86884	lt_prog_compiler_can_build_shared_CXX=no
86885	;;
86886    esac
86887  fi
86888
86889case $host_os in
86890  # For platforms that do not support PIC, -DPIC is meaningless:
86891  *djgpp*)
86892    lt_prog_compiler_pic_CXX=
86893    ;;
86894  *)
86895    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
86896    ;;
86897esac
86898
86899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
86900$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
86901if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
86902  $as_echo_n "(cached) " >&6
86903else
86904  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
86905fi
86906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
86907$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
86908lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
86909
86910#
86911# Check to make sure the PIC flag actually works.
86912#
86913if test -n "$lt_prog_compiler_pic_CXX"; then
86914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
86915$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
86916if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
86917  $as_echo_n "(cached) " >&6
86918else
86919  lt_cv_prog_compiler_pic_works_CXX=no
86920   ac_outfile=conftest.$ac_objext
86921   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
86922   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"  ## exclude from sc_useless_quotes_in_assignment
86923   # Insert the option either (1) after the last *FLAGS variable, or
86924   # (2) before a word containing "conftest.", or (3) at the end.
86925   # Note that $ac_compile itself does not contain backslashes and begins
86926   # with a dollar sign (not a hyphen), so the echo should work correctly.
86927   # The option is referenced via a variable to avoid confusing sed.
86928   lt_compile=`echo "$ac_compile" | $SED \
86929   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
86930   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
86931   -e 's:$: $lt_compiler_flag:'`
86932   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
86933   (eval "$lt_compile" 2>conftest.err)
86934   ac_status=$?
86935   cat conftest.err >&5
86936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
86937   if (exit $ac_status) && test -s "$ac_outfile"; then
86938     # The compiler can only warn and ignore the option if not recognized
86939     # So say no if there are warnings other than the usual output.
86940     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
86941     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
86942     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
86943       lt_cv_prog_compiler_pic_works_CXX=yes
86944     fi
86945   fi
86946   $RM conftest*
86947
86948fi
86949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
86950$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
86951
86952if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
86953    case $lt_prog_compiler_pic_CXX in
86954     "" | " "*) ;;
86955     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
86956     esac
86957else
86958    lt_prog_compiler_pic_CXX=
86959     lt_prog_compiler_can_build_shared_CXX=no
86960fi
86961
86962fi
86963
86964
86965
86966
86967
86968#
86969# Check to make sure the static flag actually works.
86970#
86971wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
86972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
86973$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
86974if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
86975  $as_echo_n "(cached) " >&6
86976else
86977  lt_cv_prog_compiler_static_works_CXX=no
86978   save_LDFLAGS=$LDFLAGS
86979   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
86980   echo "$lt_simple_link_test_code" > conftest.$ac_ext
86981   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
86982     # The linker can only warn and ignore the option if not recognized
86983     # So say no if there are warnings
86984     if test -s conftest.err; then
86985       # Append any errors to the config.log.
86986       cat conftest.err 1>&5
86987       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
86988       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
86989       if diff conftest.exp conftest.er2 >/dev/null; then
86990         lt_cv_prog_compiler_static_works_CXX=yes
86991       fi
86992     else
86993       lt_cv_prog_compiler_static_works_CXX=yes
86994     fi
86995   fi
86996   $RM -r conftest*
86997   LDFLAGS=$save_LDFLAGS
86998
86999fi
87000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
87001$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
87002
87003if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
87004    :
87005else
87006    lt_prog_compiler_static_CXX=
87007fi
87008
87009
87010
87011
87012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
87013$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
87014if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
87015  $as_echo_n "(cached) " >&6
87016else
87017  lt_cv_prog_compiler_c_o_CXX=no
87018   $RM -r conftest 2>/dev/null
87019   mkdir conftest
87020   cd conftest
87021   mkdir out
87022   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
87023
87024   lt_compiler_flag="-o out/conftest2.$ac_objext"
87025   # Insert the option either (1) after the last *FLAGS variable, or
87026   # (2) before a word containing "conftest.", or (3) at the end.
87027   # Note that $ac_compile itself does not contain backslashes and begins
87028   # with a dollar sign (not a hyphen), so the echo should work correctly.
87029   lt_compile=`echo "$ac_compile" | $SED \
87030   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
87031   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
87032   -e 's:$: $lt_compiler_flag:'`
87033   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
87034   (eval "$lt_compile" 2>out/conftest.err)
87035   ac_status=$?
87036   cat out/conftest.err >&5
87037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
87038   if (exit $ac_status) && test -s out/conftest2.$ac_objext
87039   then
87040     # The compiler can only warn and ignore the option if not recognized
87041     # So say no if there are warnings
87042     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
87043     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
87044     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
87045       lt_cv_prog_compiler_c_o_CXX=yes
87046     fi
87047   fi
87048   chmod u+w . 2>&5
87049   $RM conftest*
87050   # SGI C++ compiler will create directory out/ii_files/ for
87051   # template instantiation
87052   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
87053   $RM out/* && rmdir out
87054   cd ..
87055   $RM -r conftest
87056   $RM conftest*
87057
87058fi
87059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
87060$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
87061
87062
87063
87064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
87065$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
87066if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
87067  $as_echo_n "(cached) " >&6
87068else
87069  lt_cv_prog_compiler_c_o_CXX=no
87070   $RM -r conftest 2>/dev/null
87071   mkdir conftest
87072   cd conftest
87073   mkdir out
87074   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
87075
87076   lt_compiler_flag="-o out/conftest2.$ac_objext"
87077   # Insert the option either (1) after the last *FLAGS variable, or
87078   # (2) before a word containing "conftest.", or (3) at the end.
87079   # Note that $ac_compile itself does not contain backslashes and begins
87080   # with a dollar sign (not a hyphen), so the echo should work correctly.
87081   lt_compile=`echo "$ac_compile" | $SED \
87082   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
87083   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
87084   -e 's:$: $lt_compiler_flag:'`
87085   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
87086   (eval "$lt_compile" 2>out/conftest.err)
87087   ac_status=$?
87088   cat out/conftest.err >&5
87089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
87090   if (exit $ac_status) && test -s out/conftest2.$ac_objext
87091   then
87092     # The compiler can only warn and ignore the option if not recognized
87093     # So say no if there are warnings
87094     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
87095     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
87096     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
87097       lt_cv_prog_compiler_c_o_CXX=yes
87098     fi
87099   fi
87100   chmod u+w . 2>&5
87101   $RM conftest*
87102   # SGI C++ compiler will create directory out/ii_files/ for
87103   # template instantiation
87104   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
87105   $RM out/* && rmdir out
87106   cd ..
87107   $RM -r conftest
87108   $RM conftest*
87109
87110fi
87111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
87112$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
87113
87114
87115
87116
87117hard_links=nottested
87118if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
87119  # do not overwrite the value of need_locks provided by the user
87120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
87121$as_echo_n "checking if we can lock with hard links... " >&6; }
87122  hard_links=yes
87123  $RM conftest*
87124  ln conftest.a conftest.b 2>/dev/null && hard_links=no
87125  touch conftest.a
87126  ln conftest.a conftest.b 2>&5 || hard_links=no
87127  ln conftest.a conftest.b 2>/dev/null && hard_links=no
87128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
87129$as_echo "$hard_links" >&6; }
87130  if test no = "$hard_links"; then
87131    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
87132$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
87133    need_locks=warn
87134  fi
87135else
87136  need_locks=no
87137fi
87138
87139
87140
87141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
87142$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
87143
87144  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
87145  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
87146  case $host_os in
87147  aix[4-9]*)
87148    # If we're using GNU nm, then we don't want the "-C" option.
87149    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
87150    # Without the "-l" option, or with the "-B" option, AIX nm treats
87151    # weak defined symbols like other global defined symbols, whereas
87152    # GNU nm marks them as "W".
87153    # While the 'weak' keyword is ignored in the Export File, we need
87154    # it in the Import File for the 'aix-soname' feature, so we have
87155    # to replace the "-B" option with "-P" for AIX nm.
87156    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
87157      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
87158    else
87159      export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
87160    fi
87161    ;;
87162  pw32*)
87163    export_symbols_cmds_CXX=$ltdll_cmds
87164    ;;
87165  cygwin* | mingw* | cegcc*)
87166    case $cc_basename in
87167    cl*)
87168      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
87169      ;;
87170    *)
87171      export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
87172      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
87173      ;;
87174    esac
87175    ;;
87176  *)
87177    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
87178    ;;
87179  esac
87180
87181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
87182$as_echo "$ld_shlibs_CXX" >&6; }
87183test no = "$ld_shlibs_CXX" && can_build_shared=no
87184
87185with_gnu_ld_CXX=$with_gnu_ld
87186
87187
87188
87189
87190
87191
87192#
87193# Do we need to explicitly link libc?
87194#
87195case "x$archive_cmds_need_lc_CXX" in
87196x|xyes)
87197  # Assume -lc should be added
87198  archive_cmds_need_lc_CXX=yes
87199
87200  if test yes,yes = "$GCC,$enable_shared"; then
87201    case $archive_cmds_CXX in
87202    *'~'*)
87203      # FIXME: we may have to deal with multi-command sequences.
87204      ;;
87205    '$CC '*)
87206      # Test whether the compiler implicitly links with -lc since on some
87207      # systems, -lgcc has to come before -lc. If gcc already passes -lc
87208      # to ld, don't add -lc before -lgcc.
87209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
87210$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
87211if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
87212  $as_echo_n "(cached) " >&6
87213else
87214  $RM conftest*
87215	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
87216
87217	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
87218  (eval $ac_compile) 2>&5
87219  ac_status=$?
87220  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
87221  test $ac_status = 0; } 2>conftest.err; then
87222	  soname=conftest
87223	  lib=conftest
87224	  libobjs=conftest.$ac_objext
87225	  deplibs=
87226	  wl=$lt_prog_compiler_wl_CXX
87227	  pic_flag=$lt_prog_compiler_pic_CXX
87228	  compiler_flags=-v
87229	  linker_flags=-v
87230	  verstring=
87231	  output_objdir=.
87232	  libname=conftest
87233	  lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
87234	  allow_undefined_flag_CXX=
87235	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
87236  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
87237  ac_status=$?
87238  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
87239  test $ac_status = 0; }
87240	  then
87241	    lt_cv_archive_cmds_need_lc_CXX=no
87242	  else
87243	    lt_cv_archive_cmds_need_lc_CXX=yes
87244	  fi
87245	  allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
87246	else
87247	  cat conftest.err 1>&5
87248	fi
87249	$RM conftest*
87250
87251fi
87252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
87253$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
87254      archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
87255      ;;
87256    esac
87257  fi
87258  ;;
87259esac
87260
87261
87262
87263
87264
87265
87266
87267
87268
87269
87270
87271
87272
87273
87274
87275
87276
87277
87278
87279
87280
87281
87282
87283
87284
87285
87286
87287
87288
87289
87290
87291
87292
87293
87294
87295
87296
87297
87298
87299
87300
87301
87302
87303
87304
87305
87306
87307
87308
87309
87310
87311
87312
87313
87314
87315
87316
87317
87318
87319
87320
87321
87322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
87323$as_echo_n "checking dynamic linker characteristics... " >&6; }
87324
87325library_names_spec=
87326libname_spec='lib$name'
87327soname_spec=
87328shrext_cmds=.so
87329postinstall_cmds=
87330postuninstall_cmds=
87331finish_cmds=
87332finish_eval=
87333shlibpath_var=
87334shlibpath_overrides_runpath=unknown
87335version_type=none
87336dynamic_linker="$host_os ld.so"
87337sys_lib_dlsearch_path_spec="/lib /usr/lib"
87338need_lib_prefix=unknown
87339hardcode_into_libs=no
87340
87341# when you set need_version to no, make sure it does not cause -set_version
87342# flags to be left without arguments
87343need_version=unknown
87344
87345
87346
87347case $host_os in
87348aix3*)
87349  version_type=linux # correct to gnu/linux during the next big refactor
87350  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
87351  shlibpath_var=LIBPATH
87352
87353  # AIX 3 has no versioning support, so we append a major version to the name.
87354  soname_spec='$libname$release$shared_ext$major'
87355  ;;
87356
87357aix[4-9]*)
87358  version_type=linux # correct to gnu/linux during the next big refactor
87359  need_lib_prefix=no
87360  need_version=no
87361  hardcode_into_libs=yes
87362  if test ia64 = "$host_cpu"; then
87363    # AIX 5 supports IA64
87364    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
87365    shlibpath_var=LD_LIBRARY_PATH
87366  else
87367    # With GCC up to 2.95.x, collect2 would create an import file
87368    # for dependence libraries.  The import file would start with
87369    # the line '#! .'.  This would cause the generated library to
87370    # depend on '.', always an invalid library.  This was fixed in
87371    # development snapshots of GCC prior to 3.0.
87372    case $host_os in
87373      aix4 | aix4.[01] | aix4.[01].*)
87374      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
87375	   echo ' yes '
87376	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
87377	:
87378      else
87379	can_build_shared=no
87380      fi
87381      ;;
87382    esac
87383    # Using Import Files as archive members, it is possible to support
87384    # filename-based versioning of shared library archives on AIX. While
87385    # this would work for both with and without runtime linking, it will
87386    # prevent static linking of such archives. So we do filename-based
87387    # shared library versioning with .so extension only, which is used
87388    # when both runtime linking and shared linking is enabled.
87389    # Unfortunately, runtime linking may impact performance, so we do
87390    # not want this to be the default eventually. Also, we use the
87391    # versioned .so libs for executables only if there is the -brtl
87392    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
87393    # To allow for filename-based versioning support, we need to create
87394    # libNAME.so.V as an archive file, containing:
87395    # *) an Import File, referring to the versioned filename of the
87396    #    archive as well as the shared archive member, telling the
87397    #    bitwidth (32 or 64) of that shared object, and providing the
87398    #    list of exported symbols of that shared object, eventually
87399    #    decorated with the 'weak' keyword
87400    # *) the shared object with the F_LOADONLY flag set, to really avoid
87401    #    it being seen by the linker.
87402    # At run time we better use the real file rather than another symlink,
87403    # but for link time we create the symlink libNAME.so -> libNAME.so.V
87404
87405    case $with_aix_soname,$aix_use_runtimelinking in
87406    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
87407    # soname into executable. Probably we can add versioning support to
87408    # collect2, so additional links can be useful in future.
87409    aix,yes) # traditional libtool
87410      dynamic_linker='AIX unversionable lib.so'
87411      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
87412      # instead of lib<name>.a to let people know that these are not
87413      # typical AIX shared libraries.
87414      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87415      ;;
87416    aix,no) # traditional AIX only
87417      dynamic_linker='AIX lib.a(lib.so.V)'
87418      # We preserve .a as extension for shared libraries through AIX4.2
87419      # and later when we are not doing run time linking.
87420      library_names_spec='$libname$release.a $libname.a'
87421      soname_spec='$libname$release$shared_ext$major'
87422      ;;
87423    svr4,*) # full svr4 only
87424      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
87425      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
87426      # We do not specify a path in Import Files, so LIBPATH fires.
87427      shlibpath_overrides_runpath=yes
87428      ;;
87429    *,yes) # both, prefer svr4
87430      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
87431      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
87432      # unpreferred sharedlib libNAME.a needs extra handling
87433      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
87434      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
87435      # We do not specify a path in Import Files, so LIBPATH fires.
87436      shlibpath_overrides_runpath=yes
87437      ;;
87438    *,no) # both, prefer aix
87439      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
87440      library_names_spec='$libname$release.a $libname.a'
87441      soname_spec='$libname$release$shared_ext$major'
87442      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
87443      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
87444      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
87445      ;;
87446    esac
87447    shlibpath_var=LIBPATH
87448  fi
87449  ;;
87450
87451amigaos*)
87452  case $host_cpu in
87453  powerpc)
87454    # Since July 2007 AmigaOS4 officially supports .so libraries.
87455    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
87456    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87457    ;;
87458  m68k)
87459    library_names_spec='$libname.ixlibrary $libname.a'
87460    # Create ${libname}_ixlibrary.a entries in /sys/libs.
87461    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
87462    ;;
87463  esac
87464  ;;
87465
87466beos*)
87467  library_names_spec='$libname$shared_ext'
87468  dynamic_linker="$host_os ld.so"
87469  shlibpath_var=LIBRARY_PATH
87470  ;;
87471
87472bsdi[45]*)
87473  version_type=linux # correct to gnu/linux during the next big refactor
87474  need_version=no
87475  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87476  soname_spec='$libname$release$shared_ext$major'
87477  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
87478  shlibpath_var=LD_LIBRARY_PATH
87479  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
87480  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
87481  # the default ld.so.conf also contains /usr/contrib/lib and
87482  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
87483  # libtool to hard-code these into programs
87484  ;;
87485
87486cygwin* | mingw* | pw32* | cegcc*)
87487  version_type=windows
87488  shrext_cmds=.dll
87489  need_version=no
87490  need_lib_prefix=no
87491
87492  case $GCC,$cc_basename in
87493  yes,*)
87494    # gcc
87495    library_names_spec='$libname.dll.a'
87496    # DLL is installed to $(libdir)/../bin by postinstall_cmds
87497    postinstall_cmds='base_file=`basename \$file`~
87498      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
87499      dldir=$destdir/`dirname \$dlpath`~
87500      test -d \$dldir || mkdir -p \$dldir~
87501      $install_prog $dir/$dlname \$dldir/$dlname~
87502      chmod a+x \$dldir/$dlname~
87503      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
87504        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
87505      fi'
87506    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
87507      dlpath=$dir/\$dldll~
87508       $RM \$dlpath'
87509    shlibpath_overrides_runpath=yes
87510
87511    case $host_os in
87512    cygwin*)
87513      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
87514      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
87515
87516      ;;
87517    mingw* | cegcc*)
87518      # MinGW DLLs use traditional 'lib' prefix
87519      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
87520      ;;
87521    pw32*)
87522      # pw32 DLLs use 'pw' prefix rather than 'lib'
87523      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
87524      ;;
87525    esac
87526    dynamic_linker='Win32 ld.exe'
87527    ;;
87528
87529  *,cl*)
87530    # Native MSVC
87531    libname_spec='$name'
87532    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
87533    library_names_spec='$libname.dll.lib'
87534
87535    case $build_os in
87536    mingw*)
87537      sys_lib_search_path_spec=
87538      lt_save_ifs=$IFS
87539      IFS=';'
87540      for lt_path in $LIB
87541      do
87542        IFS=$lt_save_ifs
87543        # Let DOS variable expansion print the short 8.3 style file name.
87544        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
87545        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
87546      done
87547      IFS=$lt_save_ifs
87548      # Convert to MSYS style.
87549      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
87550      ;;
87551    cygwin*)
87552      # Convert to unix form, then to dos form, then back to unix form
87553      # but this time dos style (no spaces!) so that the unix form looks
87554      # like /cygdrive/c/PROGRA~1:/cygdr...
87555      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
87556      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
87557      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
87558      ;;
87559    *)
87560      sys_lib_search_path_spec=$LIB
87561      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
87562        # It is most probably a Windows format PATH.
87563        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
87564      else
87565        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
87566      fi
87567      # FIXME: find the short name or the path components, as spaces are
87568      # common. (e.g. "Program Files" -> "PROGRA~1")
87569      ;;
87570    esac
87571
87572    # DLL is installed to $(libdir)/../bin by postinstall_cmds
87573    postinstall_cmds='base_file=`basename \$file`~
87574      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
87575      dldir=$destdir/`dirname \$dlpath`~
87576      test -d \$dldir || mkdir -p \$dldir~
87577      $install_prog $dir/$dlname \$dldir/$dlname'
87578    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
87579      dlpath=$dir/\$dldll~
87580       $RM \$dlpath'
87581    shlibpath_overrides_runpath=yes
87582    dynamic_linker='Win32 link.exe'
87583    ;;
87584
87585  *)
87586    # Assume MSVC wrapper
87587    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
87588    dynamic_linker='Win32 ld.exe'
87589    ;;
87590  esac
87591  # FIXME: first we should search . and the directory the executable is in
87592  shlibpath_var=PATH
87593  ;;
87594
87595darwin* | rhapsody*)
87596  dynamic_linker="$host_os dyld"
87597  version_type=darwin
87598  need_lib_prefix=no
87599  need_version=no
87600  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
87601  soname_spec='$libname$release$major$shared_ext'
87602  shlibpath_overrides_runpath=yes
87603  shlibpath_var=DYLD_LIBRARY_PATH
87604  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
87605
87606  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
87607  ;;
87608
87609dgux*)
87610  version_type=linux # correct to gnu/linux during the next big refactor
87611  need_lib_prefix=no
87612  need_version=no
87613  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87614  soname_spec='$libname$release$shared_ext$major'
87615  shlibpath_var=LD_LIBRARY_PATH
87616  ;;
87617
87618freebsd* | dragonfly*)
87619  # DragonFly does not have aout.  When/if they implement a new
87620  # versioning mechanism, adjust this.
87621  if test -x /usr/bin/objformat; then
87622    objformat=`/usr/bin/objformat`
87623  else
87624    case $host_os in
87625    freebsd[23].*) objformat=aout ;;
87626    *) objformat=elf ;;
87627    esac
87628  fi
87629  version_type=freebsd-$objformat
87630  case $version_type in
87631    freebsd-elf*)
87632      library_names_spec='$libname$release$shared_ext$versuffix  $libname$release$shared_ext$major	 $libname$shared_ext'			 soname_spec='$libname$release$shared_ext$major'
87633      soname_spec='$libname$release$shared_ext$major'
87634      need_version=no
87635      need_lib_prefix=no
87636      ;;
87637    freebsd-*)
87638      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
87639      need_version=yes
87640      ;;
87641  esac
87642  shlibpath_var=LD_LIBRARY_PATH
87643  case $host_os in
87644  freebsd2.*)
87645    shlibpath_overrides_runpath=yes
87646    ;;
87647  freebsd3.[01]* | freebsdelf3.[01]*)
87648    shlibpath_overrides_runpath=yes
87649    hardcode_into_libs=yes
87650    ;;
87651  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
87652  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
87653    shlibpath_overrides_runpath=no
87654    hardcode_into_libs=yes
87655    ;;
87656  *) # from 4.6 on, and DragonFly
87657    shlibpath_overrides_runpath=yes
87658    hardcode_into_libs=yes
87659    ;;
87660  esac
87661  ;;
87662
87663haiku*)
87664  version_type=linux # correct to gnu/linux during the next big refactor
87665  need_lib_prefix=no
87666  need_version=no
87667  dynamic_linker="$host_os runtime_loader"
87668  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87669  soname_spec='$libname$release$shared_ext$major'
87670  shlibpath_var=LIBRARY_PATH
87671  shlibpath_overrides_runpath=no
87672  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
87673  hardcode_into_libs=yes
87674  ;;
87675
87676hpux9* | hpux10* | hpux11*)
87677  # Give a soname corresponding to the major version so that dld.sl refuses to
87678  # link against other versions.
87679  version_type=sunos
87680  need_lib_prefix=no
87681  need_version=no
87682  case $host_cpu in
87683  ia64*)
87684    shrext_cmds='.so'
87685    hardcode_into_libs=yes
87686    dynamic_linker="$host_os dld.so"
87687    shlibpath_var=LD_LIBRARY_PATH
87688    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
87689    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87690    soname_spec='$libname$release$shared_ext$major'
87691    if test 32 = "$HPUX_IA64_MODE"; then
87692      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
87693      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
87694    else
87695      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
87696      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
87697    fi
87698    ;;
87699  hppa*64*)
87700    shrext_cmds='.sl'
87701    hardcode_into_libs=yes
87702    dynamic_linker="$host_os dld.sl"
87703    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
87704    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
87705    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87706    soname_spec='$libname$release$shared_ext$major'
87707    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
87708    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
87709    ;;
87710  *)
87711    shrext_cmds='.sl'
87712    dynamic_linker="$host_os dld.sl"
87713    shlibpath_var=SHLIB_PATH
87714    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
87715    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87716    soname_spec='$libname$release$shared_ext$major'
87717    ;;
87718  esac
87719  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
87720  postinstall_cmds='chmod 555 $lib'
87721  # or fails outright, so override atomically:
87722  install_override_mode=555
87723  ;;
87724
87725interix[3-9]*)
87726  version_type=linux # correct to gnu/linux during the next big refactor
87727  need_lib_prefix=no
87728  need_version=no
87729  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87730  soname_spec='$libname$release$shared_ext$major'
87731  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
87732  shlibpath_var=LD_LIBRARY_PATH
87733  shlibpath_overrides_runpath=no
87734  hardcode_into_libs=yes
87735  ;;
87736
87737irix5* | irix6* | nonstopux*)
87738  case $host_os in
87739    nonstopux*) version_type=nonstopux ;;
87740    *)
87741	if test yes = "$lt_cv_prog_gnu_ld"; then
87742		version_type=linux # correct to gnu/linux during the next big refactor
87743	else
87744		version_type=irix
87745	fi ;;
87746  esac
87747  need_lib_prefix=no
87748  need_version=no
87749  soname_spec='$libname$release$shared_ext$major'
87750  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
87751  case $host_os in
87752  irix5* | nonstopux*)
87753    libsuff= shlibsuff=
87754    ;;
87755  *)
87756    case $LD in # libtool.m4 will add one of these switches to LD
87757    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
87758      libsuff= shlibsuff= libmagic=32-bit;;
87759    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
87760      libsuff=32 shlibsuff=N32 libmagic=N32;;
87761    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
87762      libsuff=64 shlibsuff=64 libmagic=64-bit;;
87763    *) libsuff= shlibsuff= libmagic=never-match;;
87764    esac
87765    ;;
87766  esac
87767  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
87768  shlibpath_overrides_runpath=no
87769  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
87770  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
87771  hardcode_into_libs=yes
87772  ;;
87773
87774# No shared lib support for Linux oldld, aout, or coff.
87775linux*oldld* | linux*aout* | linux*coff*)
87776  dynamic_linker=no
87777  ;;
87778
87779linux*android*)
87780  version_type=none # Android doesn't support versioned libraries.
87781  need_lib_prefix=no
87782  need_version=no
87783  library_names_spec='$libname$release$shared_ext'
87784  soname_spec='$libname$release$shared_ext'
87785  finish_cmds=
87786  shlibpath_var=LD_LIBRARY_PATH
87787  shlibpath_overrides_runpath=yes
87788
87789  # This implies no fast_install, which is unacceptable.
87790  # Some rework will be needed to allow for fast_install
87791  # before this can be enabled.
87792  hardcode_into_libs=yes
87793
87794  dynamic_linker='Android linker'
87795  # Don't embed -rpath directories since the linker doesn't support them.
87796  hardcode_libdir_flag_spec_CXX='-L$libdir'
87797  ;;
87798
87799# This must be glibc/ELF.
87800linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
87801  version_type=linux # correct to gnu/linux during the next big refactor
87802  need_lib_prefix=no
87803  need_version=no
87804  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87805  soname_spec='$libname$release$shared_ext$major'
87806  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
87807  shlibpath_var=LD_LIBRARY_PATH
87808  shlibpath_overrides_runpath=no
87809
87810  # Some binutils ld are patched to set DT_RUNPATH
87811  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
87812  $as_echo_n "(cached) " >&6
87813else
87814  lt_cv_shlibpath_overrides_runpath=no
87815    save_LDFLAGS=$LDFLAGS
87816    save_libdir=$libdir
87817    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
87818	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
87819    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
87820/* end confdefs.h.  */
87821
87822int
87823main ()
87824{
87825
87826  ;
87827  return 0;
87828}
87829_ACEOF
87830if ac_fn_cxx_try_link "$LINENO"; then :
87831  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
87832  lt_cv_shlibpath_overrides_runpath=yes
87833fi
87834fi
87835rm -f core conftest.err conftest.$ac_objext \
87836    conftest$ac_exeext conftest.$ac_ext
87837    LDFLAGS=$save_LDFLAGS
87838    libdir=$save_libdir
87839
87840fi
87841
87842  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
87843
87844  # This implies no fast_install, which is unacceptable.
87845  # Some rework will be needed to allow for fast_install
87846  # before this can be enabled.
87847  hardcode_into_libs=yes
87848
87849  # Ideally, we could use ldconfig to report *all* directores which are
87850  # searched for libraries, however this is still not possible.  Aside from not
87851  # being certain /sbin/ldconfig is available, command
87852  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
87853  # even though it is searched at run-time.  Try to do the best guess by
87854  # appending ld.so.conf contents (and includes) to the search path.
87855  if test -f /etc/ld.so.conf; then
87856    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
87857    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
87858  fi
87859
87860  # We used to test for /lib/ld.so.1 and disable shared libraries on
87861  # powerpc, because MkLinux only supported shared libraries with the
87862  # GNU dynamic linker.  Since this was broken with cross compilers,
87863  # most powerpc-linux boxes support dynamic linking these days and
87864  # people can always --disable-shared, the test was removed, and we
87865  # assume the GNU/Linux dynamic linker is in use.
87866  dynamic_linker='GNU/Linux ld.so'
87867  ;;
87868
87869netbsd*)
87870  version_type=sunos
87871  need_lib_prefix=no
87872  need_version=no
87873  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
87874    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
87875    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
87876    dynamic_linker='NetBSD (a.out) ld.so'
87877  else
87878    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87879    soname_spec='$libname$release$shared_ext$major'
87880    dynamic_linker='NetBSD ld.elf_so'
87881  fi
87882  shlibpath_var=LD_LIBRARY_PATH
87883  shlibpath_overrides_runpath=yes
87884  hardcode_into_libs=yes
87885  ;;
87886
87887newsos6)
87888  version_type=linux # correct to gnu/linux during the next big refactor
87889  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87890  shlibpath_var=LD_LIBRARY_PATH
87891  shlibpath_overrides_runpath=yes
87892  ;;
87893
87894*nto* | *qnx*)
87895  version_type=qnx
87896  need_lib_prefix=no
87897  need_version=no
87898  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87899  soname_spec='$libname$release$shared_ext$major'
87900  shlibpath_var=LD_LIBRARY_PATH
87901  shlibpath_overrides_runpath=no
87902  hardcode_into_libs=yes
87903  dynamic_linker='ldqnx.so'
87904  ;;
87905
87906openbsd* | bitrig*)
87907  version_type=sunos
87908  sys_lib_dlsearch_path_spec=/usr/lib
87909  need_lib_prefix=no
87910  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
87911    need_version=no
87912  else
87913    need_version=yes
87914  fi
87915  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
87916  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
87917  shlibpath_var=LD_LIBRARY_PATH
87918  shlibpath_overrides_runpath=yes
87919  ;;
87920
87921os2*)
87922  libname_spec='$name'
87923  version_type=windows
87924  shrext_cmds=.dll
87925  need_version=no
87926  need_lib_prefix=no
87927  # OS/2 can only load a DLL with a base name of 8 characters or less.
87928  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
87929    v=$($ECHO $release$versuffix | tr -d .-);
87930    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
87931    $ECHO $n$v`$shared_ext'
87932  library_names_spec='${libname}_dll.$libext'
87933  dynamic_linker='OS/2 ld.exe'
87934  shlibpath_var=BEGINLIBPATH
87935  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
87936  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
87937  postinstall_cmds='base_file=`basename \$file`~
87938    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
87939    dldir=$destdir/`dirname \$dlpath`~
87940    test -d \$dldir || mkdir -p \$dldir~
87941    $install_prog $dir/$dlname \$dldir/$dlname~
87942    chmod a+x \$dldir/$dlname~
87943    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
87944      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
87945    fi'
87946  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
87947    dlpath=$dir/\$dldll~
87948    $RM \$dlpath'
87949  ;;
87950
87951osf3* | osf4* | osf5*)
87952  version_type=osf
87953  need_lib_prefix=no
87954  need_version=no
87955  soname_spec='$libname$release$shared_ext$major'
87956  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87957  shlibpath_var=LD_LIBRARY_PATH
87958  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
87959  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
87960  ;;
87961
87962rdos*)
87963  dynamic_linker=no
87964  ;;
87965
87966solaris*)
87967  version_type=linux # correct to gnu/linux during the next big refactor
87968  need_lib_prefix=no
87969  need_version=no
87970  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87971  soname_spec='$libname$release$shared_ext$major'
87972  shlibpath_var=LD_LIBRARY_PATH
87973  shlibpath_overrides_runpath=yes
87974  hardcode_into_libs=yes
87975  # ldd complains unless libraries are executable
87976  postinstall_cmds='chmod +x $lib'
87977  ;;
87978
87979sunos4*)
87980  version_type=sunos
87981  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
87982  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
87983  shlibpath_var=LD_LIBRARY_PATH
87984  shlibpath_overrides_runpath=yes
87985  if test yes = "$with_gnu_ld"; then
87986    need_lib_prefix=no
87987  fi
87988  need_version=yes
87989  ;;
87990
87991sysv4 | sysv4.3*)
87992  version_type=linux # correct to gnu/linux during the next big refactor
87993  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
87994  soname_spec='$libname$release$shared_ext$major'
87995  shlibpath_var=LD_LIBRARY_PATH
87996  case $host_vendor in
87997    sni)
87998      shlibpath_overrides_runpath=no
87999      need_lib_prefix=no
88000      runpath_var=LD_RUN_PATH
88001      ;;
88002    siemens)
88003      need_lib_prefix=no
88004      ;;
88005    motorola)
88006      need_lib_prefix=no
88007      need_version=no
88008      shlibpath_overrides_runpath=no
88009      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
88010      ;;
88011  esac
88012  ;;
88013
88014sysv4*MP*)
88015  if test -d /usr/nec; then
88016    version_type=linux # correct to gnu/linux during the next big refactor
88017    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
88018    soname_spec='$libname$shared_ext.$major'
88019    shlibpath_var=LD_LIBRARY_PATH
88020  fi
88021  ;;
88022
88023sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
88024  version_type=sco
88025  need_lib_prefix=no
88026  need_version=no
88027  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
88028  soname_spec='$libname$release$shared_ext$major'
88029  shlibpath_var=LD_LIBRARY_PATH
88030  shlibpath_overrides_runpath=yes
88031  hardcode_into_libs=yes
88032  if test yes = "$with_gnu_ld"; then
88033    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
88034  else
88035    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
88036    case $host_os in
88037      sco3.2v5*)
88038        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
88039	;;
88040    esac
88041  fi
88042  sys_lib_dlsearch_path_spec='/usr/lib'
88043  ;;
88044
88045tpf*)
88046  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
88047  version_type=linux # correct to gnu/linux during the next big refactor
88048  need_lib_prefix=no
88049  need_version=no
88050  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
88051  shlibpath_var=LD_LIBRARY_PATH
88052  shlibpath_overrides_runpath=no
88053  hardcode_into_libs=yes
88054  ;;
88055
88056uts4*)
88057  version_type=linux # correct to gnu/linux during the next big refactor
88058  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
88059  soname_spec='$libname$release$shared_ext$major'
88060  shlibpath_var=LD_LIBRARY_PATH
88061  ;;
88062
88063*)
88064  dynamic_linker=no
88065  ;;
88066esac
88067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
88068$as_echo "$dynamic_linker" >&6; }
88069test no = "$dynamic_linker" && can_build_shared=no
88070
88071variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
88072if test yes = "$GCC"; then
88073  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
88074fi
88075
88076if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
88077  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
88078fi
88079
88080if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
88081  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
88082fi
88083
88084# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
88085configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
88086
88087# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
88088func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
88089
88090# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
88091configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
88092
88093
88094
88095
88096
88097
88098
88099
88100
88101
88102
88103
88104
88105
88106
88107
88108
88109
88110
88111
88112
88113
88114
88115
88116
88117
88118
88119
88120
88121
88122
88123
88124
88125
88126
88127
88128
88129
88130
88131
88132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
88133$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
88134hardcode_action_CXX=
88135if test -n "$hardcode_libdir_flag_spec_CXX" ||
88136   test -n "$runpath_var_CXX" ||
88137   test yes = "$hardcode_automatic_CXX"; then
88138
88139  # We can hardcode non-existent directories.
88140  if test no != "$hardcode_direct_CXX" &&
88141     # If the only mechanism to avoid hardcoding is shlibpath_var, we
88142     # have to relink, otherwise we might link with an installed library
88143     # when we should be linking with a yet-to-be-installed one
88144     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
88145     test no != "$hardcode_minus_L_CXX"; then
88146    # Linking always hardcodes the temporary library directory.
88147    hardcode_action_CXX=relink
88148  else
88149    # We can link without hardcoding, and we can hardcode nonexisting dirs.
88150    hardcode_action_CXX=immediate
88151  fi
88152else
88153  # We cannot hardcode anything, or else we can only hardcode existing
88154  # directories.
88155  hardcode_action_CXX=unsupported
88156fi
88157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
88158$as_echo "$hardcode_action_CXX" >&6; }
88159
88160if test relink = "$hardcode_action_CXX" ||
88161   test yes = "$inherit_rpath_CXX"; then
88162  # Fast installation is not supported
88163  enable_fast_install=no
88164elif test yes = "$shlibpath_overrides_runpath" ||
88165     test no = "$enable_shared"; then
88166  # Fast installation is not necessary
88167  enable_fast_install=needless
88168fi
88169
88170
88171
88172
88173
88174
88175
88176  fi # test -n "$compiler"
88177
88178  CC=$lt_save_CC
88179  CFLAGS=$lt_save_CFLAGS
88180  LDCXX=$LD
88181  LD=$lt_save_LD
88182  GCC=$lt_save_GCC
88183  with_gnu_ld=$lt_save_with_gnu_ld
88184  lt_cv_path_LDCXX=$lt_cv_path_LD
88185  lt_cv_path_LD=$lt_save_path_LD
88186  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
88187  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
88188fi # test yes != "$_lt_caught_CXX_error"
88189
88190ac_ext=c
88191ac_cpp='$CPP $CPPFLAGS'
88192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
88193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
88194ac_compiler_gnu=$ac_cv_c_compiler_gnu
88195
88196
88197
88198if test "${enable_libasprintf+set}" = set; then
88199  if test "$enable_libasprintf" != no; then
88200    TESTLIBASPRINTF=yes
88201  else
88202    TESTLIBASPRINTF=no
88203  fi
88204else
88205  TESTLIBASPRINTF=yes
88206fi
88207if test "$CXX" = no; then
88208  TESTLIBASPRINTF=no
88209fi
88210
88211
88212 if test $USE_INCLUDED_LIBINTL = no; then
88213  TEST_SYSTEM_LIBINTL_TRUE=
88214  TEST_SYSTEM_LIBINTL_FALSE='#'
88215else
88216  TEST_SYSTEM_LIBINTL_TRUE='#'
88217  TEST_SYSTEM_LIBINTL_FALSE=
88218fi
88219
88220
88221
88222
88223subdirs="$subdirs examples"
88224
88225
88226ac_config_files="$ac_config_files Makefile"
88227
88228
88229ac_config_files="$ac_config_files doc/Makefile"
88230
88231
88232ac_config_files="$ac_config_files intl/Makefile"
88233
88234
88235ac_config_files="$ac_config_files its/Makefile"
88236
88237
88238ac_config_files="$ac_config_files gnulib-lib/Makefile"
88239
88240
88241ac_config_files="$ac_config_files libgrep/Makefile"
88242
88243
88244ac_config_files="$ac_config_files src/Makefile"
88245
88246ac_config_files="$ac_config_files src/user-email:src/user-email.sh.in"
88247
88248
88249ac_config_files="$ac_config_files libgettextpo/Makefile"
88250
88251ac_config_files="$ac_config_files libgettextpo/exported.sh"
88252
88253
88254ac_config_files="$ac_config_files po/Makefile.in"
88255
88256
88257ac_config_files="$ac_config_files projects/Makefile"
88258
88259
88260ac_config_files="$ac_config_files styles/Makefile"
88261
88262
88263ac_config_files="$ac_config_files emacs/Makefile"
88264
88265
88266ac_config_files="$ac_config_files misc/Makefile"
88267
88268ac_config_files="$ac_config_files misc/gettextize"
88269
88270ac_config_files="$ac_config_files misc/autopoint"
88271
88272ac_config_files="$ac_config_files misc/convert-archive"
88273
88274
88275ac_config_files="$ac_config_files man/Makefile"
88276
88277ac_config_files="$ac_config_files man/x-to-1"
88278
88279
88280ac_config_files="$ac_config_files m4/Makefile"
88281
88282
88283ac_config_files="$ac_config_files tests/Makefile"
88284
88285ac_config_files="$ac_config_files tests/init-env"
88286
88287
88288ac_config_files="$ac_config_files system-tests/Makefile"
88289
88290
88291ac_config_files="$ac_config_files gnulib-tests/Makefile"
88292
88293
88294cat >confcache <<\_ACEOF
88295# This file is a shell script that caches the results of configure
88296# tests run on this system so they can be shared between configure
88297# scripts and configure runs, see configure's option --config-cache.
88298# It is not useful on other systems.  If it contains results you don't
88299# want to keep, you may remove or edit it.
88300#
88301# config.status only pays attention to the cache file if you give it
88302# the --recheck option to rerun configure.
88303#
88304# `ac_cv_env_foo' variables (set or unset) will be overridden when
88305# loading this file, other *unset* `ac_cv_foo' will be assigned the
88306# following values.
88307
88308_ACEOF
88309
88310# The following way of writing the cache mishandles newlines in values,
88311# but we know of no workaround that is simple, portable, and efficient.
88312# So, we kill variables containing newlines.
88313# Ultrix sh set writes to stderr and can't be redirected directly,
88314# and sets the high bit in the cache file unless we assign to the vars.
88315(
88316  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
88317    eval ac_val=\$$ac_var
88318    case $ac_val in #(
88319    *${as_nl}*)
88320      case $ac_var in #(
88321      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
88322$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
88323      esac
88324      case $ac_var in #(
88325      _ | IFS | as_nl) ;; #(
88326      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
88327      *) { eval $ac_var=; unset $ac_var;} ;;
88328      esac ;;
88329    esac
88330  done
88331
88332  (set) 2>&1 |
88333    case $as_nl`(ac_space=' '; set) 2>&1` in #(
88334    *${as_nl}ac_space=\ *)
88335      # `set' does not quote correctly, so add quotes: double-quote
88336      # substitution turns \\\\ into \\, and sed turns \\ into \.
88337      sed -n \
88338	"s/'/'\\\\''/g;
88339	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
88340      ;; #(
88341    *)
88342      # `set' quotes correctly as required by POSIX, so do not add quotes.
88343      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
88344      ;;
88345    esac |
88346    sort
88347) |
88348  sed '
88349     /^ac_cv_env_/b end
88350     t clear
88351     :clear
88352     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
88353     t end
88354     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
88355     :end' >>confcache
88356if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
88357  if test -w "$cache_file"; then
88358    if test "x$cache_file" != "x/dev/null"; then
88359      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
88360$as_echo "$as_me: updating cache $cache_file" >&6;}
88361      if test ! -f "$cache_file" || test -h "$cache_file"; then
88362	cat confcache >"$cache_file"
88363      else
88364        case $cache_file in #(
88365        */* | ?:*)
88366	  mv -f confcache "$cache_file"$$ &&
88367	  mv -f "$cache_file"$$ "$cache_file" ;; #(
88368        *)
88369	  mv -f confcache "$cache_file" ;;
88370	esac
88371      fi
88372    fi
88373  else
88374    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
88375$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
88376  fi
88377fi
88378rm -f confcache
88379
88380test "x$prefix" = xNONE && prefix=$ac_default_prefix
88381# Let make expand exec_prefix.
88382test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
88383
88384DEFS=-DHAVE_CONFIG_H
88385
88386ac_libobjs=
88387ac_ltlibobjs=
88388U=
88389for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
88390  # 1. Remove the extension, and $U if already installed.
88391  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
88392  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
88393  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
88394  #    will be set to the directory where LIBOBJS objects are built.
88395  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
88396  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
88397done
88398LIBOBJS=$ac_libobjs
88399
88400LTLIBOBJS=$ac_ltlibobjs
88401
88402
88403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
88404$as_echo_n "checking that generated files are newer than configure... " >&6; }
88405   if test -n "$am_sleep_pid"; then
88406     # Hide warnings about reused PIDs.
88407     wait $am_sleep_pid 2>/dev/null
88408   fi
88409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
88410$as_echo "done" >&6; }
88411 if test -n "$EXEEXT"; then
88412  am__EXEEXT_TRUE=
88413  am__EXEEXT_FALSE='#'
88414else
88415  am__EXEEXT_TRUE='#'
88416  am__EXEEXT_FALSE=
88417fi
88418
88419if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
88420  as_fn_error $? "conditional \"AMDEP\" was never defined.
88421Usually this means the macro was only invoked conditionally." "$LINENO" 5
88422fi
88423if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
88424  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
88425Usually this means the macro was only invoked conditionally." "$LINENO" 5
88426fi
88427if test -z "${WOE32_TRUE}" && test -z "${WOE32_FALSE}"; then
88428  as_fn_error $? "conditional \"WOE32\" was never defined.
88429Usually this means the macro was only invoked conditionally." "$LINENO" 5
88430fi
88431if test -z "${OS2_TRUE}" && test -z "${OS2_FALSE}"; then
88432  as_fn_error $? "conditional \"OS2\" was never defined.
88433Usually this means the macro was only invoked conditionally." "$LINENO" 5
88434fi
88435if test -z "${WINDOWS_NATIVE_TRUE}" && test -z "${WINDOWS_NATIVE_FALSE}"; then
88436  as_fn_error $? "conditional \"WINDOWS_NATIVE\" was never defined.
88437Usually this means the macro was only invoked conditionally." "$LINENO" 5
88438fi
88439if test -z "${ANSICXX_TRUE}" && test -z "${ANSICXX_FALSE}"; then
88440  as_fn_error $? "conditional \"ANSICXX\" was never defined.
88441Usually this means the macro was only invoked conditionally." "$LINENO" 5
88442fi
88443if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
88444  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
88445Usually this means the macro was only invoked conditionally." "$LINENO" 5
88446fi
88447if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
88448  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
88449Usually this means the macro was only invoked conditionally." "$LINENO" 5
88450fi
88451if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
88452  as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
88453Usually this means the macro was only invoked conditionally." "$LINENO" 5
88454fi
88455if test -z "${USE_INCLUDED_LIBINTL_TRUE}" && test -z "${USE_INCLUDED_LIBINTL_FALSE}"; then
88456  as_fn_error $? "conditional \"USE_INCLUDED_LIBINTL\" was never defined.
88457Usually this means the macro was only invoked conditionally." "$LINENO" 5
88458fi
88459if test -z "${BUILD_INCLUDED_LIBINTL_TRUE}" && test -z "${BUILD_INCLUDED_LIBINTL_FALSE}"; then
88460  as_fn_error $? "conditional \"BUILD_INCLUDED_LIBINTL\" was never defined.
88461Usually this means the macro was only invoked conditionally." "$LINENO" 5
88462fi
88463if test -z "${PACKAGE_IS_GETTEXT_TOOLS_TRUE}" && test -z "${PACKAGE_IS_GETTEXT_TOOLS_FALSE}"; then
88464  as_fn_error $? "conditional \"PACKAGE_IS_GETTEXT_TOOLS\" was never defined.
88465Usually this means the macro was only invoked conditionally." "$LINENO" 5
88466fi
88467if test -z "${PRELOADABLE_LIBINTL_TRUE}" && test -z "${PRELOADABLE_LIBINTL_FALSE}"; then
88468  as_fn_error $? "conditional \"PRELOADABLE_LIBINTL\" was never defined.
88469Usually this means the macro was only invoked conditionally." "$LINENO" 5
88470fi
88471if test -z "${USE_INSTALLED_LIBTEXTSTYLE_TRUE}" && test -z "${USE_INSTALLED_LIBTEXTSTYLE_FALSE}"; then
88472  as_fn_error $? "conditional \"USE_INSTALLED_LIBTEXTSTYLE\" was never defined.
88473Usually this means the macro was only invoked conditionally." "$LINENO" 5
88474fi
88475if test -z "${USE_INSTALLED_CSHARP_DLL_TRUE}" && test -z "${USE_INSTALLED_CSHARP_DLL_FALSE}"; then
88476  as_fn_error $? "conditional \"USE_INSTALLED_CSHARP_DLL\" was never defined.
88477Usually this means the macro was only invoked conditionally." "$LINENO" 5
88478fi
88479if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
88480  as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
88481Usually this means the macro was only invoked conditionally." "$LINENO" 5
88482fi
88483if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
88484  as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
88485Usually this means the macro was only invoked conditionally." "$LINENO" 5
88486fi
88487if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then
88488  as_fn_error $? "conditional \"GL_GENERATE_BYTESWAP_H\" was never defined.
88489Usually this means the macro was only invoked conditionally." "$LINENO" 5
88490fi
88491if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
88492  as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
88493Usually this means the macro was only invoked conditionally." "$LINENO" 5
88494fi
88495if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
88496  as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88497Usually this means the macro was only invoked conditionally." "$LINENO" 5
88498fi
88499if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
88500  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
88501Usually this means the macro was only invoked conditionally." "$LINENO" 5
88502fi
88503if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
88504  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
88505Usually this means the macro was only invoked conditionally." "$LINENO" 5
88506fi
88507if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
88508  as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
88509Usually this means the macro was only invoked conditionally." "$LINENO" 5
88510fi
88511if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
88512  as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
88513Usually this means the macro was only invoked conditionally." "$LINENO" 5
88514fi
88515if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
88516  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
88517Usually this means the macro was only invoked conditionally." "$LINENO" 5
88518fi
88519if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
88520  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
88521Usually this means the macro was only invoked conditionally." "$LINENO" 5
88522fi
88523if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
88524  as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
88525Usually this means the macro was only invoked conditionally." "$LINENO" 5
88526fi
88527
88528
88529if test -z "${INCLUDED_LIBXML_TRUE}" && test -z "${INCLUDED_LIBXML_FALSE}"; then
88530  as_fn_error $? "conditional \"INCLUDED_LIBXML\" was never defined.
88531Usually this means the macro was only invoked conditionally." "$LINENO" 5
88532fi
88533if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
88534  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
88535Usually this means the macro was only invoked conditionally." "$LINENO" 5
88536fi
88537if test -z "${RELOCATABLE_VIA_LD_TRUE}" && test -z "${RELOCATABLE_VIA_LD_FALSE}"; then
88538  as_fn_error $? "conditional \"RELOCATABLE_VIA_LD\" was never defined.
88539Usually this means the macro was only invoked conditionally." "$LINENO" 5
88540fi
88541if test -z "${RELOCATABLE_VIA_WRAPPER_TRUE}" && test -z "${RELOCATABLE_VIA_WRAPPER_FALSE}"; then
88542  as_fn_error $? "conditional \"RELOCATABLE_VIA_WRAPPER\" was never defined.
88543Usually this means the macro was only invoked conditionally." "$LINENO" 5
88544fi
88545if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
88546  as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
88547Usually this means the macro was only invoked conditionally." "$LINENO" 5
88548fi
88549if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
88550  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
88551Usually this means the macro was only invoked conditionally." "$LINENO" 5
88552fi
88553if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
88554  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
88555Usually this means the macro was only invoked conditionally." "$LINENO" 5
88556fi
88557if test -z "${LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_FALSE}"; then
88558  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC\" was never defined.
88559Usually this means the macro was only invoked conditionally." "$LINENO" 5
88560fi
88561if test -z "${LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_FALSE}"; then
88562  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE\" was never defined.
88563Usually this means the macro was only invoked conditionally." "$LINENO" 5
88564fi
88565if test -z "${LIBUNISTRING_COMPILE_UNICTYPE_SYNTAX_JAVA_WHITESPACE_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICTYPE_SYNTAX_JAVA_WHITESPACE_FALSE}"; then
88566  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICTYPE_SYNTAX_JAVA_WHITESPACE\" was never defined.
88567Usually this means the macro was only invoked conditionally." "$LINENO" 5
88568fi
88569if test -z "${LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_FALSE}"; then
88570  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS\" was never defined.
88571Usually this means the macro was only invoked conditionally." "$LINENO" 5
88572fi
88573if test -z "${LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_FALSE}"; then
88574  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS\" was never defined.
88575Usually this means the macro was only invoked conditionally." "$LINENO" 5
88576fi
88577if test -z "${LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_FALSE}"; then
88578  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS\" was never defined.
88579Usually this means the macro was only invoked conditionally." "$LINENO" 5
88580fi
88581if test -z "${LIBUNISTRING_COMPILE_UNINAME_UNINAME_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNINAME_UNINAME_FALSE}"; then
88582  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNINAME_UNINAME\" was never defined.
88583Usually this means the macro was only invoked conditionally." "$LINENO" 5
88584fi
88585if test -z "${LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_FALSE}"; then
88586  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC\" was never defined.
88587Usually this means the macro was only invoked conditionally." "$LINENO" 5
88588fi
88589if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_FALSE}"; then
88590  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_CHECK\" was never defined.
88591Usually this means the macro was only invoked conditionally." "$LINENO" 5
88592fi
88593if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_FALSE}"; then
88594  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN\" was never defined.
88595Usually this means the macro was only invoked conditionally." "$LINENO" 5
88596fi
88597if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_FALSE}"; then
88598  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC\" was never defined.
88599Usually this means the macro was only invoked conditionally." "$LINENO" 5
88600fi
88601if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE}"; then
88602  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE\" was never defined.
88603Usually this means the macro was only invoked conditionally." "$LINENO" 5
88604fi
88605if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
88606  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined.
88607Usually this means the macro was only invoked conditionally." "$LINENO" 5
88608fi
88609if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_PREV_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_PREV_FALSE}"; then
88610  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_PREV\" was never defined.
88611Usually this means the macro was only invoked conditionally." "$LINENO" 5
88612fi
88613if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
88614  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB\" was never defined.
88615Usually this means the macro was only invoked conditionally." "$LINENO" 5
88616fi
88617if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
88618  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
88619Usually this means the macro was only invoked conditionally." "$LINENO" 5
88620fi
88621if test -z "${GL_GENERATE_UTIME_H_TRUE}" && test -z "${GL_GENERATE_UTIME_H_FALSE}"; then
88622  as_fn_error $? "conditional \"GL_GENERATE_UTIME_H\" was never defined.
88623Usually this means the macro was only invoked conditionally." "$LINENO" 5
88624fi
88625
88626    gl_libobjs=
88627    gl_ltlibobjs=
88628    if test -n "$gl_LIBOBJS"; then
88629      # Remove the extension.
88630      sed_drop_objext='s/\.o$//;s/\.obj$//'
88631      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
88632        gl_libobjs="$gl_libobjs $i.$ac_objext"
88633        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
88634      done
88635    fi
88636    gl_LIBOBJS=$gl_libobjs
88637
88638    gl_LTLIBOBJS=$gl_ltlibobjs
88639
88640
88641
88642
88643
88644
88645
88646if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
88647  as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
88648Usually this means the macro was only invoked conditionally." "$LINENO" 5
88649fi
88650if test -z "${POSIX_SPAWN_PORTED_TRUE}" && test -z "${POSIX_SPAWN_PORTED_FALSE}"; then
88651  as_fn_error $? "conditional \"POSIX_SPAWN_PORTED\" was never defined.
88652Usually this means the macro was only invoked conditionally." "$LINENO" 5
88653fi
88654if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
88655  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
88656Usually this means the macro was only invoked conditionally." "$LINENO" 5
88657fi
88658if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_CMP_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_CMP_FALSE}"; then
88659  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_CMP\" was never defined.
88660Usually this means the macro was only invoked conditionally." "$LINENO" 5
88661fi
88662if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN_FALSE}"; then
88663  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_STRLEN\" was never defined.
88664Usually this means the macro was only invoked conditionally." "$LINENO" 5
88665fi
88666
88667    gltests_libobjs=
88668    gltests_ltlibobjs=
88669    if test -n "$gltests_LIBOBJS"; then
88670      # Remove the extension.
88671      sed_drop_objext='s/\.o$//;s/\.obj$//'
88672      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
88673        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
88674        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
88675      done
88676    fi
88677    gltests_LIBOBJS=$gltests_libobjs
88678
88679    gltests_LTLIBOBJS=$gltests_ltlibobjs
88680
88681
88682if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
88683  as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
88684Usually this means the macro was only invoked conditionally." "$LINENO" 5
88685fi
88686
88687    grgl_libobjs=
88688    grgl_ltlibobjs=
88689    if test -n "$grgl_LIBOBJS"; then
88690      # Remove the extension.
88691      sed_drop_objext='s/\.o$//;s/\.obj$//'
88692      for i in `for i in $grgl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
88693        grgl_libobjs="$grgl_libobjs $i.$ac_objext"
88694        grgl_ltlibobjs="$grgl_ltlibobjs $i.lo"
88695      done
88696    fi
88697    grgl_LIBOBJS=$grgl_libobjs
88698
88699    grgl_LTLIBOBJS=$grgl_ltlibobjs
88700
88701
88702
88703    grgltests_libobjs=
88704    grgltests_ltlibobjs=
88705    if test -n "$grgltests_LIBOBJS"; then
88706      # Remove the extension.
88707      sed_drop_objext='s/\.o$//;s/\.obj$//'
88708      for i in `for i in $grgltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
88709        grgltests_libobjs="$grgltests_libobjs $i.$ac_objext"
88710        grgltests_ltlibobjs="$grgltests_ltlibobjs $i.lo"
88711      done
88712    fi
88713    grgltests_LIBOBJS=$grgltests_libobjs
88714
88715    grgltests_LTLIBOBJS=$grgltests_ltlibobjs
88716
88717
88718if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
88719  as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
88720Usually this means the macro was only invoked conditionally." "$LINENO" 5
88721fi
88722if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
88723  as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
88724Usually this means the macro was only invoked conditionally." "$LINENO" 5
88725fi
88726if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
88727  as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88728Usually this means the macro was only invoked conditionally." "$LINENO" 5
88729fi
88730if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
88731  as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
88732Usually this means the macro was only invoked conditionally." "$LINENO" 5
88733fi
88734if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
88735  as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
88736Usually this means the macro was only invoked conditionally." "$LINENO" 5
88737fi
88738if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
88739  as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
88740Usually this means the macro was only invoked conditionally." "$LINENO" 5
88741fi
88742if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
88743  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
88744Usually this means the macro was only invoked conditionally." "$LINENO" 5
88745fi
88746if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
88747  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
88748Usually this means the macro was only invoked conditionally." "$LINENO" 5
88749fi
88750if test -z "${LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC_FALSE}"; then
88751  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICONV_U8_CONV_FROM_ENC\" was never defined.
88752Usually this means the macro was only invoked conditionally." "$LINENO" 5
88753fi
88754if test -z "${LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_ALPHA_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_ALPHA_FALSE}"; then
88755  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_ALPHA\" was never defined.
88756Usually this means the macro was only invoked conditionally." "$LINENO" 5
88757fi
88758if test -z "${LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE_FALSE}"; then
88759  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNICTYPE_CTYPE_SPACE\" was never defined.
88760Usually this means the macro was only invoked conditionally." "$LINENO" 5
88761fi
88762if test -z "${LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS_FALSE}"; then
88763  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNILBRK_U8_POSSIBLE_LINEBREAKS\" was never defined.
88764Usually this means the macro was only invoked conditionally." "$LINENO" 5
88765fi
88766if test -z "${LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS_FALSE}"; then
88767  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNILBRK_U8_WIDTH_LINEBREAKS\" was never defined.
88768Usually this means the macro was only invoked conditionally." "$LINENO" 5
88769fi
88770if test -z "${LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS_FALSE}"; then
88771  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNILBRK_ULC_WIDTH_LINEBREAKS\" was never defined.
88772Usually this means the macro was only invoked conditionally." "$LINENO" 5
88773fi
88774if test -z "${LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC_FALSE}"; then
88775  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U16_MBTOUC\" was never defined.
88776Usually this means the macro was only invoked conditionally." "$LINENO" 5
88777fi
88778if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_CHECK_FALSE}"; then
88779  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_CHECK\" was never defined.
88780Usually this means the macro was only invoked conditionally." "$LINENO" 5
88781fi
88782if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN_FALSE}"; then
88783  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBLEN\" was never defined.
88784Usually this means the macro was only invoked conditionally." "$LINENO" 5
88785fi
88786if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_FALSE}"; then
88787  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC\" was never defined.
88788Usually this means the macro was only invoked conditionally." "$LINENO" 5
88789fi
88790if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE_FALSE}"; then
88791  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUC_UNSAFE\" was never defined.
88792Usually this means the macro was only invoked conditionally." "$LINENO" 5
88793fi
88794if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
88795  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined.
88796Usually this means the macro was only invoked conditionally." "$LINENO" 5
88797fi
88798if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_NEXT_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_NEXT_FALSE}"; then
88799  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_NEXT\" was never defined.
88800Usually this means the macro was only invoked conditionally." "$LINENO" 5
88801fi
88802if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_PREV_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_PREV_FALSE}"; then
88803  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_PREV\" was never defined.
88804Usually this means the macro was only invoked conditionally." "$LINENO" 5
88805fi
88806if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC_FALSE}"; then
88807  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_STRMBTOUC\" was never defined.
88808Usually this means the macro was only invoked conditionally." "$LINENO" 5
88809fi
88810if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
88811  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB\" was never defined.
88812Usually this means the macro was only invoked conditionally." "$LINENO" 5
88813fi
88814if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
88815  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
88816Usually this means the macro was only invoked conditionally." "$LINENO" 5
88817fi
88818
88819    gtpo_libobjs=
88820    gtpo_ltlibobjs=
88821    if test -n "$gtpo_LIBOBJS"; then
88822      # Remove the extension.
88823      sed_drop_objext='s/\.o$//;s/\.obj$//'
88824      for i in `for i in $gtpo_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
88825        gtpo_libobjs="$gtpo_libobjs $i.$ac_objext"
88826        gtpo_ltlibobjs="$gtpo_ltlibobjs $i.lo"
88827      done
88828    fi
88829    gtpo_LIBOBJS=$gtpo_libobjs
88830
88831    gtpo_LTLIBOBJS=$gtpo_ltlibobjs
88832
88833
88834
88835    gtpotests_libobjs=
88836    gtpotests_ltlibobjs=
88837    if test -n "$gtpotests_LIBOBJS"; then
88838      # Remove the extension.
88839      sed_drop_objext='s/\.o$//;s/\.obj$//'
88840      for i in `for i in $gtpotests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
88841        gtpotests_libobjs="$gtpotests_libobjs $i.$ac_objext"
88842        gtpotests_ltlibobjs="$gtpotests_ltlibobjs $i.lo"
88843      done
88844    fi
88845    gtpotests_LIBOBJS=$gtpotests_libobjs
88846
88847    gtpotests_LTLIBOBJS=$gtpotests_ltlibobjs
88848
88849
88850if test -z "${WOE32DLL_TRUE}" && test -z "${WOE32DLL_FALSE}"; then
88851  as_fn_error $? "conditional \"WOE32DLL\" was never defined.
88852Usually this means the macro was only invoked conditionally." "$LINENO" 5
88853fi
88854if test -z "${ANSICXX_TRUE}" && test -z "${ANSICXX_FALSE}"; then
88855  as_fn_error $? "conditional \"ANSICXX\" was never defined.
88856Usually this means the macro was only invoked conditionally." "$LINENO" 5
88857fi
88858if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
88859  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
88860Usually this means the macro was only invoked conditionally." "$LINENO" 5
88861fi
88862if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
88863  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
88864Usually this means the macro was only invoked conditionally." "$LINENO" 5
88865fi
88866if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
88867  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
88868Usually this means the macro was only invoked conditionally." "$LINENO" 5
88869fi
88870if test -z "${TEST_SYSTEM_LIBINTL_TRUE}" && test -z "${TEST_SYSTEM_LIBINTL_FALSE}"; then
88871  as_fn_error $? "conditional \"TEST_SYSTEM_LIBINTL\" was never defined.
88872Usually this means the macro was only invoked conditionally." "$LINENO" 5
88873fi
88874
88875: "${CONFIG_STATUS=./config.status}"
88876ac_write_fail=0
88877ac_clean_files_save=$ac_clean_files
88878ac_clean_files="$ac_clean_files $CONFIG_STATUS"
88879{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
88880$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
88881as_write_fail=0
88882cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
88883#! $SHELL
88884# Generated by $as_me.
88885# Run this file to recreate the current configuration.
88886# Compiler output produced by configure, useful for debugging
88887# configure, is in config.log if it exists.
88888
88889debug=false
88890ac_cs_recheck=false
88891ac_cs_silent=false
88892
88893SHELL=\${CONFIG_SHELL-$SHELL}
88894export SHELL
88895_ASEOF
88896cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
88897## -------------------- ##
88898## M4sh Initialization. ##
88899## -------------------- ##
88900
88901# Be more Bourne compatible
88902DUALCASE=1; export DUALCASE # for MKS sh
88903if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
88904  emulate sh
88905  NULLCMD=:
88906  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
88907  # is contrary to our usage.  Disable this feature.
88908  alias -g '${1+"$@"}'='"$@"'
88909  setopt NO_GLOB_SUBST
88910else
88911  case `(set -o) 2>/dev/null` in #(
88912  *posix*) :
88913    set -o posix ;; #(
88914  *) :
88915     ;;
88916esac
88917fi
88918
88919
88920as_nl='
88921'
88922export as_nl
88923# Printing a long string crashes Solaris 7 /usr/bin/printf.
88924as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
88925as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
88926as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
88927# Prefer a ksh shell builtin over an external printf program on Solaris,
88928# but without wasting forks for bash or zsh.
88929if test -z "$BASH_VERSION$ZSH_VERSION" \
88930    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
88931  as_echo='print -r --'
88932  as_echo_n='print -rn --'
88933elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
88934  as_echo='printf %s\n'
88935  as_echo_n='printf %s'
88936else
88937  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
88938    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
88939    as_echo_n='/usr/ucb/echo -n'
88940  else
88941    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
88942    as_echo_n_body='eval
88943      arg=$1;
88944      case $arg in #(
88945      *"$as_nl"*)
88946	expr "X$arg" : "X\\(.*\\)$as_nl";
88947	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
88948      esac;
88949      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
88950    '
88951    export as_echo_n_body
88952    as_echo_n='sh -c $as_echo_n_body as_echo'
88953  fi
88954  export as_echo_body
88955  as_echo='sh -c $as_echo_body as_echo'
88956fi
88957
88958# The user is always right.
88959if test "${PATH_SEPARATOR+set}" != set; then
88960  PATH_SEPARATOR=:
88961  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
88962    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
88963      PATH_SEPARATOR=';'
88964  }
88965fi
88966
88967
88968# IFS
88969# We need space, tab and new line, in precisely that order.  Quoting is
88970# there to prevent editors from complaining about space-tab.
88971# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88972# splitting by setting IFS to empty value.)
88973IFS=" ""	$as_nl"
88974
88975# Find who we are.  Look in the path if we contain no directory separator.
88976as_myself=
88977case $0 in #((
88978  *[\\/]* ) as_myself=$0 ;;
88979  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
88980for as_dir in $PATH
88981do
88982  IFS=$as_save_IFS
88983  test -z "$as_dir" && as_dir=.
88984    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
88985  done
88986IFS=$as_save_IFS
88987
88988     ;;
88989esac
88990# We did not find ourselves, most probably we were run as `sh COMMAND'
88991# in which case we are not to be found in the path.
88992if test "x$as_myself" = x; then
88993  as_myself=$0
88994fi
88995if test ! -f "$as_myself"; then
88996  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
88997  exit 1
88998fi
88999
89000# Unset variables that we do not need and which cause bugs (e.g. in
89001# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
89002# suppresses any "Segmentation fault" message there.  '((' could
89003# trigger a bug in pdksh 5.2.14.
89004for as_var in BASH_ENV ENV MAIL MAILPATH
89005do eval test x\${$as_var+set} = xset \
89006  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
89007done
89008PS1='$ '
89009PS2='> '
89010PS4='+ '
89011
89012# NLS nuisances.
89013LC_ALL=C
89014export LC_ALL
89015LANGUAGE=C
89016export LANGUAGE
89017
89018# CDPATH.
89019(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
89020
89021
89022# as_fn_error STATUS ERROR [LINENO LOG_FD]
89023# ----------------------------------------
89024# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
89025# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
89026# script with STATUS, using 1 if that was 0.
89027as_fn_error ()
89028{
89029  as_status=$1; test $as_status -eq 0 && as_status=1
89030  if test "$4"; then
89031    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
89032    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
89033  fi
89034  $as_echo "$as_me: error: $2" >&2
89035  as_fn_exit $as_status
89036} # as_fn_error
89037
89038
89039# as_fn_set_status STATUS
89040# -----------------------
89041# Set $? to STATUS, without forking.
89042as_fn_set_status ()
89043{
89044  return $1
89045} # as_fn_set_status
89046
89047# as_fn_exit STATUS
89048# -----------------
89049# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
89050as_fn_exit ()
89051{
89052  set +e
89053  as_fn_set_status $1
89054  exit $1
89055} # as_fn_exit
89056
89057# as_fn_unset VAR
89058# ---------------
89059# Portably unset VAR.
89060as_fn_unset ()
89061{
89062  { eval $1=; unset $1;}
89063}
89064as_unset=as_fn_unset
89065# as_fn_append VAR VALUE
89066# ----------------------
89067# Append the text in VALUE to the end of the definition contained in VAR. Take
89068# advantage of any shell optimizations that allow amortized linear growth over
89069# repeated appends, instead of the typical quadratic growth present in naive
89070# implementations.
89071if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
89072  eval 'as_fn_append ()
89073  {
89074    eval $1+=\$2
89075  }'
89076else
89077  as_fn_append ()
89078  {
89079    eval $1=\$$1\$2
89080  }
89081fi # as_fn_append
89082
89083# as_fn_arith ARG...
89084# ------------------
89085# Perform arithmetic evaluation on the ARGs, and store the result in the
89086# global $as_val. Take advantage of shells that can avoid forks. The arguments
89087# must be portable across $(()) and expr.
89088if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
89089  eval 'as_fn_arith ()
89090  {
89091    as_val=$(( $* ))
89092  }'
89093else
89094  as_fn_arith ()
89095  {
89096    as_val=`expr "$@" || test $? -eq 1`
89097  }
89098fi # as_fn_arith
89099
89100
89101if expr a : '\(a\)' >/dev/null 2>&1 &&
89102   test "X`expr 00001 : '.*\(...\)'`" = X001; then
89103  as_expr=expr
89104else
89105  as_expr=false
89106fi
89107
89108if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
89109  as_basename=basename
89110else
89111  as_basename=false
89112fi
89113
89114if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
89115  as_dirname=dirname
89116else
89117  as_dirname=false
89118fi
89119
89120as_me=`$as_basename -- "$0" ||
89121$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
89122	 X"$0" : 'X\(//\)$' \| \
89123	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
89124$as_echo X/"$0" |
89125    sed '/^.*\/\([^/][^/]*\)\/*$/{
89126	    s//\1/
89127	    q
89128	  }
89129	  /^X\/\(\/\/\)$/{
89130	    s//\1/
89131	    q
89132	  }
89133	  /^X\/\(\/\).*/{
89134	    s//\1/
89135	    q
89136	  }
89137	  s/.*/./; q'`
89138
89139# Avoid depending upon Character Ranges.
89140as_cr_letters='abcdefghijklmnopqrstuvwxyz'
89141as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
89142as_cr_Letters=$as_cr_letters$as_cr_LETTERS
89143as_cr_digits='0123456789'
89144as_cr_alnum=$as_cr_Letters$as_cr_digits
89145
89146ECHO_C= ECHO_N= ECHO_T=
89147case `echo -n x` in #(((((
89148-n*)
89149  case `echo 'xy\c'` in
89150  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
89151  xy)  ECHO_C='\c';;
89152  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
89153       ECHO_T='	';;
89154  esac;;
89155*)
89156  ECHO_N='-n';;
89157esac
89158
89159rm -f conf$$ conf$$.exe conf$$.file
89160if test -d conf$$.dir; then
89161  rm -f conf$$.dir/conf$$.file
89162else
89163  rm -f conf$$.dir
89164  mkdir conf$$.dir 2>/dev/null
89165fi
89166if (echo >conf$$.file) 2>/dev/null; then
89167  if ln -s conf$$.file conf$$ 2>/dev/null; then
89168    as_ln_s='ln -s'
89169    # ... but there are two gotchas:
89170    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
89171    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
89172    # In both cases, we have to default to `cp -pR'.
89173    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
89174      as_ln_s='cp -pR'
89175  elif ln conf$$.file conf$$ 2>/dev/null; then
89176    as_ln_s=ln
89177  else
89178    as_ln_s='cp -pR'
89179  fi
89180else
89181  as_ln_s='cp -pR'
89182fi
89183rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
89184rmdir conf$$.dir 2>/dev/null
89185
89186
89187# as_fn_mkdir_p
89188# -------------
89189# Create "$as_dir" as a directory, including parents if necessary.
89190as_fn_mkdir_p ()
89191{
89192
89193  case $as_dir in #(
89194  -*) as_dir=./$as_dir;;
89195  esac
89196  test -d "$as_dir" || eval $as_mkdir_p || {
89197    as_dirs=
89198    while :; do
89199      case $as_dir in #(
89200      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
89201      *) as_qdir=$as_dir;;
89202      esac
89203      as_dirs="'$as_qdir' $as_dirs"
89204      as_dir=`$as_dirname -- "$as_dir" ||
89205$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
89206	 X"$as_dir" : 'X\(//\)[^/]' \| \
89207	 X"$as_dir" : 'X\(//\)$' \| \
89208	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
89209$as_echo X"$as_dir" |
89210    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
89211	    s//\1/
89212	    q
89213	  }
89214	  /^X\(\/\/\)[^/].*/{
89215	    s//\1/
89216	    q
89217	  }
89218	  /^X\(\/\/\)$/{
89219	    s//\1/
89220	    q
89221	  }
89222	  /^X\(\/\).*/{
89223	    s//\1/
89224	    q
89225	  }
89226	  s/.*/./; q'`
89227      test -d "$as_dir" && break
89228    done
89229    test -z "$as_dirs" || eval "mkdir $as_dirs"
89230  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
89231
89232
89233} # as_fn_mkdir_p
89234if mkdir -p . 2>/dev/null; then
89235  as_mkdir_p='mkdir -p "$as_dir"'
89236else
89237  test -d ./-p && rmdir ./-p
89238  as_mkdir_p=false
89239fi
89240
89241
89242# as_fn_executable_p FILE
89243# -----------------------
89244# Test if FILE is an executable regular file.
89245as_fn_executable_p ()
89246{
89247  test -f "$1" && test -x "$1"
89248} # as_fn_executable_p
89249as_test_x='test -x'
89250as_executable_p=as_fn_executable_p
89251
89252# Sed expression to map a string onto a valid CPP name.
89253as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
89254
89255# Sed expression to map a string onto a valid variable name.
89256as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
89257
89258
89259exec 6>&1
89260## ----------------------------------- ##
89261## Main body of $CONFIG_STATUS script. ##
89262## ----------------------------------- ##
89263_ASEOF
89264test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
89265
89266cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
89267# Save the log message, to keep $0 and so on meaningful, and to
89268# report actual input values of CONFIG_FILES etc. instead of their
89269# values after options handling.
89270ac_log="
89271This file was extended by gettext-tools $as_me 0.21, which was
89272generated by GNU Autoconf 2.69.  Invocation command line was
89273
89274  CONFIG_FILES    = $CONFIG_FILES
89275  CONFIG_HEADERS  = $CONFIG_HEADERS
89276  CONFIG_LINKS    = $CONFIG_LINKS
89277  CONFIG_COMMANDS = $CONFIG_COMMANDS
89278  $ $0 $@
89279
89280on `(hostname || uname -n) 2>/dev/null | sed 1q`
89281"
89282
89283_ACEOF
89284
89285case $ac_config_files in *"
89286"*) set x $ac_config_files; shift; ac_config_files=$*;;
89287esac
89288
89289case $ac_config_headers in *"
89290"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
89291esac
89292
89293
89294cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
89295# Files that config.status was made for.
89296config_files="$ac_config_files"
89297config_headers="$ac_config_headers"
89298config_commands="$ac_config_commands"
89299
89300_ACEOF
89301
89302cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
89303ac_cs_usage="\
89304\`$as_me' instantiates files and other configuration actions
89305from templates according to the current configuration.  Unless the files
89306and actions are specified as TAGs, all are instantiated by default.
89307
89308Usage: $0 [OPTION]... [TAG]...
89309
89310  -h, --help       print this help, then exit
89311  -V, --version    print version number and configuration settings, then exit
89312      --config     print configuration, then exit
89313  -q, --quiet, --silent
89314                   do not print progress messages
89315  -d, --debug      don't remove temporary files
89316      --recheck    update $as_me by reconfiguring in the same conditions
89317      --file=FILE[:TEMPLATE]
89318                   instantiate the configuration file FILE
89319      --header=FILE[:TEMPLATE]
89320                   instantiate the configuration header FILE
89321
89322Configuration files:
89323$config_files
89324
89325Configuration headers:
89326$config_headers
89327
89328Configuration commands:
89329$config_commands
89330
89331Report bugs to <bug-gettext@gnu.org>."
89332
89333_ACEOF
89334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
89335ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
89336ac_cs_version="\\
89337gettext-tools config.status 0.21
89338configured by $0, generated by GNU Autoconf 2.69,
89339  with options \\"\$ac_cs_config\\"
89340
89341Copyright (C) 2012 Free Software Foundation, Inc.
89342This config.status script is free software; the Free Software Foundation
89343gives unlimited permission to copy, distribute and modify it."
89344
89345ac_pwd='$ac_pwd'
89346srcdir='$srcdir'
89347INSTALL='$INSTALL'
89348MKDIR_P='$MKDIR_P'
89349AWK='$AWK'
89350test -n "\$AWK" || AWK=awk
89351_ACEOF
89352
89353cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
89354# The default lists apply if the user does not specify any file.
89355ac_need_defaults=:
89356while test $# != 0
89357do
89358  case $1 in
89359  --*=?*)
89360    ac_option=`expr "X$1" : 'X\([^=]*\)='`
89361    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
89362    ac_shift=:
89363    ;;
89364  --*=)
89365    ac_option=`expr "X$1" : 'X\([^=]*\)='`
89366    ac_optarg=
89367    ac_shift=:
89368    ;;
89369  *)
89370    ac_option=$1
89371    ac_optarg=$2
89372    ac_shift=shift
89373    ;;
89374  esac
89375
89376  case $ac_option in
89377  # Handling of the options.
89378  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
89379    ac_cs_recheck=: ;;
89380  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
89381    $as_echo "$ac_cs_version"; exit ;;
89382  --config | --confi | --conf | --con | --co | --c )
89383    $as_echo "$ac_cs_config"; exit ;;
89384  --debug | --debu | --deb | --de | --d | -d )
89385    debug=: ;;
89386  --file | --fil | --fi | --f )
89387    $ac_shift
89388    case $ac_optarg in
89389    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
89390    '') as_fn_error $? "missing file argument" ;;
89391    esac
89392    as_fn_append CONFIG_FILES " '$ac_optarg'"
89393    ac_need_defaults=false;;
89394  --header | --heade | --head | --hea )
89395    $ac_shift
89396    case $ac_optarg in
89397    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
89398    esac
89399    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
89400    ac_need_defaults=false;;
89401  --he | --h)
89402    # Conflict between --help and --header
89403    as_fn_error $? "ambiguous option: \`$1'
89404Try \`$0 --help' for more information.";;
89405  --help | --hel | -h )
89406    $as_echo "$ac_cs_usage"; exit ;;
89407  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
89408  | -silent | --silent | --silen | --sile | --sil | --si | --s)
89409    ac_cs_silent=: ;;
89410
89411  # This is an error.
89412  -*) as_fn_error $? "unrecognized option: \`$1'
89413Try \`$0 --help' for more information." ;;
89414
89415  *) as_fn_append ac_config_targets " $1"
89416     ac_need_defaults=false ;;
89417
89418  esac
89419  shift
89420done
89421
89422ac_configure_extra_args=
89423
89424if $ac_cs_silent; then
89425  exec 6>/dev/null
89426  ac_configure_extra_args="$ac_configure_extra_args --silent"
89427fi
89428
89429_ACEOF
89430cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
89431if \$ac_cs_recheck; then
89432  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
89433  shift
89434  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
89435  CONFIG_SHELL='$SHELL'
89436  export CONFIG_SHELL
89437  exec "\$@"
89438fi
89439
89440_ACEOF
89441cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
89442exec 5>>config.log
89443{
89444  echo
89445  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
89446## Running $as_me. ##
89447_ASBOX
89448  $as_echo "$ac_log"
89449} >&5
89450
89451_ACEOF
89452cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
89453#
89454# INIT-COMMANDS
89455#
89456AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
89457
89458
89459# The HP-UX ksh and POSIX shell print the target directory to stdout
89460# if CDPATH is set.
89461(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
89462
89463sed_quote_subst='$sed_quote_subst'
89464double_quote_subst='$double_quote_subst'
89465delay_variable_subst='$delay_variable_subst'
89466macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
89467macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
89468AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
89469DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
89470OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
89471enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
89472enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
89473pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
89474enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
89475shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
89476SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
89477ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
89478PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
89479host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
89480host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
89481host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
89482build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
89483build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
89484build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
89485SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
89486Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
89487GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
89488EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
89489FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
89490LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
89491NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
89492LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
89493max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
89494ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
89495exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
89496lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
89497lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
89498lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
89499lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
89500lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
89501reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
89502reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
89503deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
89504file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
89505file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
89506want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
89507sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
89508AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
89509AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
89510archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
89511STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
89512RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
89513old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
89514old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
89515old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
89516lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
89517CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
89518CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
89519compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
89520GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
89521lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
89522lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
89523lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
89524lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
89525lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
89526lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
89527nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
89528lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
89529lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
89530objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
89531MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
89532lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
89533lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
89534lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
89535lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
89536lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
89537need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
89538MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
89539DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
89540NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
89541LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
89542OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
89543OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
89544libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
89545shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
89546extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
89547archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
89548enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
89549export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
89550whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
89551compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
89552old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
89553old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
89554archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
89555archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
89556module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
89557module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
89558with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
89559allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
89560no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
89561hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
89562hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
89563hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
89564hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
89565hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
89566hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
89567hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
89568inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
89569link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
89570always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
89571export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
89572exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
89573include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
89574prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
89575postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
89576file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
89577variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
89578need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
89579need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
89580version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
89581runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
89582shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
89583shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
89584libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
89585library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
89586soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
89587install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
89588postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
89589postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
89590finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
89591finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
89592hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
89593sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
89594configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
89595configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
89596hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
89597enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
89598enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
89599enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
89600old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
89601striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
89602compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
89603predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
89604postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
89605predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
89606postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
89607compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
89608LD_RC='`$ECHO "$LD_RC" | $SED "$delay_single_quote_subst"`'
89609LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
89610reload_flag_RC='`$ECHO "$reload_flag_RC" | $SED "$delay_single_quote_subst"`'
89611reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
89612reload_cmds_RC='`$ECHO "$reload_cmds_RC" | $SED "$delay_single_quote_subst"`'
89613reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89614old_archive_cmds_RC='`$ECHO "$old_archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
89615old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89616compiler_RC='`$ECHO "$compiler_RC" | $SED "$delay_single_quote_subst"`'
89617compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
89618GCC_RC='`$ECHO "$GCC_RC" | $SED "$delay_single_quote_subst"`'
89619GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
89620lt_prog_compiler_no_builtin_flag_RC='`$ECHO "$lt_prog_compiler_no_builtin_flag_RC" | $SED "$delay_single_quote_subst"`'
89621lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
89622lt_prog_compiler_pic_RC='`$ECHO "$lt_prog_compiler_pic_RC" | $SED "$delay_single_quote_subst"`'
89623lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
89624lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`'
89625lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
89626lt_prog_compiler_static_RC='`$ECHO "$lt_prog_compiler_static_RC" | $SED "$delay_single_quote_subst"`'
89627lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
89628lt_cv_prog_compiler_c_o_RC='`$ECHO "$lt_cv_prog_compiler_c_o_RC" | $SED "$delay_single_quote_subst"`'
89629lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
89630archive_cmds_need_lc_RC='`$ECHO "$archive_cmds_need_lc_RC" | $SED "$delay_single_quote_subst"`'
89631archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
89632enable_shared_with_static_runtimes_RC='`$ECHO "$enable_shared_with_static_runtimes_RC" | $SED "$delay_single_quote_subst"`'
89633enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
89634export_dynamic_flag_spec_RC='`$ECHO "$export_dynamic_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
89635export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
89636whole_archive_flag_spec_RC='`$ECHO "$whole_archive_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
89637whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
89638compiler_needs_object_RC='`$ECHO "$compiler_needs_object_RC" | $SED "$delay_single_quote_subst"`'
89639compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
89640old_archive_from_new_cmds_RC='`$ECHO "$old_archive_from_new_cmds_RC" | $SED "$delay_single_quote_subst"`'
89641old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89642old_archive_from_expsyms_cmds_RC='`$ECHO "$old_archive_from_expsyms_cmds_RC" | $SED "$delay_single_quote_subst"`'
89643old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89644archive_cmds_RC='`$ECHO "$archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
89645archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89646archive_expsym_cmds_RC='`$ECHO "$archive_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
89647archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89648module_cmds_RC='`$ECHO "$module_cmds_RC" | $SED "$delay_single_quote_subst"`'
89649module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89650module_expsym_cmds_RC='`$ECHO "$module_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
89651module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89652with_gnu_ld_RC='`$ECHO "$with_gnu_ld_RC" | $SED "$delay_single_quote_subst"`'
89653with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
89654allow_undefined_flag_RC='`$ECHO "$allow_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
89655allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
89656no_undefined_flag_RC='`$ECHO "$no_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
89657no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
89658hardcode_libdir_flag_spec_RC='`$ECHO "$hardcode_libdir_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
89659hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
89660hardcode_libdir_separator_RC='`$ECHO "$hardcode_libdir_separator_RC" | $SED "$delay_single_quote_subst"`'
89661hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
89662hardcode_direct_RC='`$ECHO "$hardcode_direct_RC" | $SED "$delay_single_quote_subst"`'
89663hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
89664hardcode_direct_absolute_RC='`$ECHO "$hardcode_direct_absolute_RC" | $SED "$delay_single_quote_subst"`'
89665hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
89666hardcode_minus_L_RC='`$ECHO "$hardcode_minus_L_RC" | $SED "$delay_single_quote_subst"`'
89667hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
89668hardcode_shlibpath_var_RC='`$ECHO "$hardcode_shlibpath_var_RC" | $SED "$delay_single_quote_subst"`'
89669hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
89670hardcode_automatic_RC='`$ECHO "$hardcode_automatic_RC" | $SED "$delay_single_quote_subst"`'
89671hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
89672inherit_rpath_RC='`$ECHO "$inherit_rpath_RC" | $SED "$delay_single_quote_subst"`'
89673inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
89674link_all_deplibs_RC='`$ECHO "$link_all_deplibs_RC" | $SED "$delay_single_quote_subst"`'
89675link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
89676always_export_symbols_RC='`$ECHO "$always_export_symbols_RC" | $SED "$delay_single_quote_subst"`'
89677always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
89678export_symbols_cmds_RC='`$ECHO "$export_symbols_cmds_RC" | $SED "$delay_single_quote_subst"`'
89679export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89680exclude_expsyms_RC='`$ECHO "$exclude_expsyms_RC" | $SED "$delay_single_quote_subst"`'
89681exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
89682include_expsyms_RC='`$ECHO "$include_expsyms_RC" | $SED "$delay_single_quote_subst"`'
89683include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
89684prelink_cmds_RC='`$ECHO "$prelink_cmds_RC" | $SED "$delay_single_quote_subst"`'
89685prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89686postlink_cmds_RC='`$ECHO "$postlink_cmds_RC" | $SED "$delay_single_quote_subst"`'
89687postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
89688file_list_spec_RC='`$ECHO "$file_list_spec_RC" | $SED "$delay_single_quote_subst"`'
89689file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
89690hardcode_action_RC='`$ECHO "$hardcode_action_RC" | $SED "$delay_single_quote_subst"`'
89691hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
89692compiler_lib_search_dirs_RC='`$ECHO "$compiler_lib_search_dirs_RC" | $SED "$delay_single_quote_subst"`'
89693compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
89694predep_objects_RC='`$ECHO "$predep_objects_RC" | $SED "$delay_single_quote_subst"`'
89695predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
89696postdep_objects_RC='`$ECHO "$postdep_objects_RC" | $SED "$delay_single_quote_subst"`'
89697postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
89698predeps_RC='`$ECHO "$predeps_RC" | $SED "$delay_single_quote_subst"`'
89699predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
89700postdeps_RC='`$ECHO "$postdeps_RC" | $SED "$delay_single_quote_subst"`'
89701postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
89702compiler_lib_search_path_RC='`$ECHO "$compiler_lib_search_path_RC" | $SED "$delay_single_quote_subst"`'
89703compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
89704
89705LTCC='$LTCC'
89706LTCFLAGS='$LTCFLAGS'
89707compiler='$compiler_DEFAULT'
89708
89709# A function that is used when there is no print builtin or printf.
89710func_fallback_echo ()
89711{
89712  eval 'cat <<_LTECHO_EOF
89713\$1
89714_LTECHO_EOF'
89715}
89716
89717# Quote evaled strings.
89718for var in AS \
89719DLLTOOL \
89720OBJDUMP \
89721SHELL \
89722ECHO \
89723PATH_SEPARATOR \
89724SED \
89725GREP \
89726EGREP \
89727FGREP \
89728LD \
89729NM \
89730LN_S \
89731lt_SP2NL \
89732lt_NL2SP \
89733reload_flag \
89734deplibs_check_method \
89735file_magic_cmd \
89736file_magic_glob \
89737want_nocaseglob \
89738sharedlib_from_linklib_cmd \
89739AR \
89740AR_FLAGS \
89741archiver_list_spec \
89742STRIP \
89743RANLIB \
89744CC \
89745CFLAGS \
89746compiler \
89747lt_cv_sys_global_symbol_pipe \
89748lt_cv_sys_global_symbol_to_cdecl \
89749lt_cv_sys_global_symbol_to_import \
89750lt_cv_sys_global_symbol_to_c_name_address \
89751lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
89752lt_cv_nm_interface \
89753nm_file_list_spec \
89754lt_cv_truncate_bin \
89755lt_prog_compiler_no_builtin_flag \
89756lt_prog_compiler_pic \
89757lt_prog_compiler_wl \
89758lt_prog_compiler_static \
89759lt_cv_prog_compiler_c_o \
89760need_locks \
89761MANIFEST_TOOL \
89762DSYMUTIL \
89763NMEDIT \
89764LIPO \
89765OTOOL \
89766OTOOL64 \
89767shrext_cmds \
89768export_dynamic_flag_spec \
89769whole_archive_flag_spec \
89770compiler_needs_object \
89771with_gnu_ld \
89772allow_undefined_flag \
89773no_undefined_flag \
89774hardcode_libdir_flag_spec \
89775hardcode_libdir_separator \
89776exclude_expsyms \
89777include_expsyms \
89778file_list_spec \
89779variables_saved_for_relink \
89780libname_spec \
89781library_names_spec \
89782soname_spec \
89783install_override_mode \
89784finish_eval \
89785old_striplib \
89786striplib \
89787compiler_lib_search_dirs \
89788predep_objects \
89789postdep_objects \
89790predeps \
89791postdeps \
89792compiler_lib_search_path \
89793LD_RC \
89794LD_CXX \
89795reload_flag_RC \
89796reload_flag_CXX \
89797compiler_RC \
89798compiler_CXX \
89799lt_prog_compiler_no_builtin_flag_RC \
89800lt_prog_compiler_no_builtin_flag_CXX \
89801lt_prog_compiler_pic_RC \
89802lt_prog_compiler_pic_CXX \
89803lt_prog_compiler_wl_RC \
89804lt_prog_compiler_wl_CXX \
89805lt_prog_compiler_static_RC \
89806lt_prog_compiler_static_CXX \
89807lt_cv_prog_compiler_c_o_RC \
89808lt_cv_prog_compiler_c_o_CXX \
89809export_dynamic_flag_spec_RC \
89810export_dynamic_flag_spec_CXX \
89811whole_archive_flag_spec_RC \
89812whole_archive_flag_spec_CXX \
89813compiler_needs_object_RC \
89814compiler_needs_object_CXX \
89815with_gnu_ld_RC \
89816with_gnu_ld_CXX \
89817allow_undefined_flag_RC \
89818allow_undefined_flag_CXX \
89819no_undefined_flag_RC \
89820no_undefined_flag_CXX \
89821hardcode_libdir_flag_spec_RC \
89822hardcode_libdir_flag_spec_CXX \
89823hardcode_libdir_separator_RC \
89824hardcode_libdir_separator_CXX \
89825exclude_expsyms_RC \
89826exclude_expsyms_CXX \
89827include_expsyms_RC \
89828include_expsyms_CXX \
89829file_list_spec_RC \
89830file_list_spec_CXX \
89831compiler_lib_search_dirs_RC \
89832compiler_lib_search_dirs_CXX \
89833predep_objects_RC \
89834predep_objects_CXX \
89835postdep_objects_RC \
89836postdep_objects_CXX \
89837predeps_RC \
89838predeps_CXX \
89839postdeps_RC \
89840postdeps_CXX \
89841compiler_lib_search_path_RC \
89842compiler_lib_search_path_CXX; do
89843    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
89844    *[\\\\\\\`\\"\\\$]*)
89845      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
89846      ;;
89847    *)
89848      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
89849      ;;
89850    esac
89851done
89852
89853# Double-quote double-evaled strings.
89854for var in reload_cmds \
89855old_postinstall_cmds \
89856old_postuninstall_cmds \
89857old_archive_cmds \
89858extract_expsyms_cmds \
89859old_archive_from_new_cmds \
89860old_archive_from_expsyms_cmds \
89861archive_cmds \
89862archive_expsym_cmds \
89863module_cmds \
89864module_expsym_cmds \
89865export_symbols_cmds \
89866prelink_cmds \
89867postlink_cmds \
89868postinstall_cmds \
89869postuninstall_cmds \
89870finish_cmds \
89871sys_lib_search_path_spec \
89872configure_time_dlsearch_path \
89873configure_time_lt_sys_library_path \
89874reload_cmds_RC \
89875reload_cmds_CXX \
89876old_archive_cmds_RC \
89877old_archive_cmds_CXX \
89878old_archive_from_new_cmds_RC \
89879old_archive_from_new_cmds_CXX \
89880old_archive_from_expsyms_cmds_RC \
89881old_archive_from_expsyms_cmds_CXX \
89882archive_cmds_RC \
89883archive_cmds_CXX \
89884archive_expsym_cmds_RC \
89885archive_expsym_cmds_CXX \
89886module_cmds_RC \
89887module_cmds_CXX \
89888module_expsym_cmds_RC \
89889module_expsym_cmds_CXX \
89890export_symbols_cmds_RC \
89891export_symbols_cmds_CXX \
89892prelink_cmds_RC \
89893prelink_cmds_CXX \
89894postlink_cmds_RC \
89895postlink_cmds_CXX; do
89896    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
89897    *[\\\\\\\`\\"\\\$]*)
89898      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
89899      ;;
89900    *)
89901      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
89902      ;;
89903    esac
89904done
89905
89906ac_aux_dir='$ac_aux_dir'
89907
89908# See if we are running on zsh, and set the options that allow our
89909# commands through without removal of \ escapes INIT.
89910if test -n "\${ZSH_VERSION+set}"; then
89911   setopt NO_GLOB_SUBST
89912fi
89913
89914
89915    PACKAGE='$PACKAGE'
89916    VERSION='$VERSION'
89917    RM='$RM'
89918    ofile='$ofile'
89919
89920
89921
89922
89923
89924
89925
89926# Capture the value of obsolete ALL_LINGUAS because we need it to compute
89927    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
89928    OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
89929    # Capture the value of LINGUAS because we need it to compute CATALOGS.
89930    LINGUAS="${LINGUAS-%UNSET%}"
89931
89932
89933_ACEOF
89934
89935cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
89936
89937# Handling of arguments.
89938for ac_config_target in $ac_config_targets
89939do
89940  case $ac_config_target in
89941    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
89942    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
89943    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
89944    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
89945    "csharpcomp.sh") CONFIG_FILES="$CONFIG_FILES csharpcomp.sh:../build-aux/csharpcomp.sh.in" ;;
89946    "csharpexec.sh") CONFIG_FILES="$CONFIG_FILES csharpexec.sh:../build-aux/csharpexec.sh.in" ;;
89947    "javacomp.sh") CONFIG_FILES="$CONFIG_FILES javacomp.sh:../build-aux/javacomp.sh.in" ;;
89948    "javaexec.sh") CONFIG_FILES="$CONFIG_FILES javaexec.sh:../build-aux/javaexec.sh.in" ;;
89949    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
89950    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
89951    "intl/Makefile") CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;;
89952    "its/Makefile") CONFIG_FILES="$CONFIG_FILES its/Makefile" ;;
89953    "gnulib-lib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-lib/Makefile" ;;
89954    "libgrep/Makefile") CONFIG_FILES="$CONFIG_FILES libgrep/Makefile" ;;
89955    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
89956    "src/user-email") CONFIG_FILES="$CONFIG_FILES src/user-email:src/user-email.sh.in" ;;
89957    "libgettextpo/Makefile") CONFIG_FILES="$CONFIG_FILES libgettextpo/Makefile" ;;
89958    "libgettextpo/exported.sh") CONFIG_FILES="$CONFIG_FILES libgettextpo/exported.sh" ;;
89959    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
89960    "projects/Makefile") CONFIG_FILES="$CONFIG_FILES projects/Makefile" ;;
89961    "styles/Makefile") CONFIG_FILES="$CONFIG_FILES styles/Makefile" ;;
89962    "emacs/Makefile") CONFIG_FILES="$CONFIG_FILES emacs/Makefile" ;;
89963    "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;;
89964    "misc/gettextize") CONFIG_FILES="$CONFIG_FILES misc/gettextize" ;;
89965    "misc/autopoint") CONFIG_FILES="$CONFIG_FILES misc/autopoint" ;;
89966    "misc/convert-archive") CONFIG_FILES="$CONFIG_FILES misc/convert-archive" ;;
89967    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
89968    "man/x-to-1") CONFIG_FILES="$CONFIG_FILES man/x-to-1" ;;
89969    "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
89970    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
89971    "tests/init-env") CONFIG_FILES="$CONFIG_FILES tests/init-env" ;;
89972    "system-tests/Makefile") CONFIG_FILES="$CONFIG_FILES system-tests/Makefile" ;;
89973    "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
89974
89975  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
89976  esac
89977done
89978
89979
89980# If the user did not use the arguments to specify the items to instantiate,
89981# then the envvar interface is used.  Set only those that are not.
89982# We use the long form for the default assignment because of an extremely
89983# bizarre bug on SunOS 4.1.3.
89984if $ac_need_defaults; then
89985  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
89986  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
89987  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
89988fi
89989
89990# Have a temporary directory for convenience.  Make it in the build tree
89991# simply because there is no reason against having it here, and in addition,
89992# creating and moving files from /tmp can sometimes cause problems.
89993# Hook for its removal unless debugging.
89994# Note that there is a small window in which the directory will not be cleaned:
89995# after its creation but before its name has been assigned to `$tmp'.
89996$debug ||
89997{
89998  tmp= ac_tmp=
89999  trap 'exit_status=$?
90000  : "${ac_tmp:=$tmp}"
90001  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
90002' 0
90003  trap 'as_fn_exit 1' 1 2 13 15
90004}
90005# Create a (secure) tmp directory for tmp files.
90006
90007{
90008  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
90009  test -d "$tmp"
90010}  ||
90011{
90012  tmp=./conf$$-$RANDOM
90013  (umask 077 && mkdir "$tmp")
90014} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
90015ac_tmp=$tmp
90016
90017# Set up the scripts for CONFIG_FILES section.
90018# No need to generate them if there are no CONFIG_FILES.
90019# This happens for instance with `./config.status config.h'.
90020if test -n "$CONFIG_FILES"; then
90021
90022if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
90023  ac_cs_awk_getline=:
90024  ac_cs_awk_pipe_init=
90025  ac_cs_awk_read_file='
90026      while ((getline aline < (F[key])) > 0)
90027	print(aline)
90028      close(F[key])'
90029  ac_cs_awk_pipe_fini=
90030else
90031  ac_cs_awk_getline=false
90032  ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
90033  ac_cs_awk_read_file='
90034      print "|#_!!_#|"
90035      print "cat " F[key] " &&"
90036      '$ac_cs_awk_pipe_init
90037  # The final `:' finishes the AND list.
90038  ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
90039fi
90040ac_cr=`echo X | tr X '\015'`
90041# On cygwin, bash can eat \r inside `` if the user requested igncr.
90042# But we know of no other shell where ac_cr would be empty at this
90043# point, so we can use a bashism as a fallback.
90044if test "x$ac_cr" = x; then
90045  eval ac_cr=\$\'\\r\'
90046fi
90047ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
90048if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
90049  ac_cs_awk_cr='\\r'
90050else
90051  ac_cs_awk_cr=$ac_cr
90052fi
90053
90054echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
90055_ACEOF
90056
90057# Create commands to substitute file output variables.
90058{
90059  echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
90060  echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
90061  echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
90062  echo "_ACAWK" &&
90063  echo "_ACEOF"
90064} >conf$$files.sh &&
90065. ./conf$$files.sh ||
90066  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
90067rm -f conf$$files.sh
90068
90069{
90070  echo "cat >conf$$subs.awk <<_ACEOF" &&
90071  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
90072  echo "_ACEOF"
90073} >conf$$subs.sh ||
90074  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
90075ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
90076ac_delim='%!_!# '
90077for ac_last_try in false false false false false :; do
90078  . ./conf$$subs.sh ||
90079    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
90080
90081  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
90082  if test $ac_delim_n = $ac_delim_num; then
90083    break
90084  elif $ac_last_try; then
90085    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
90086  else
90087    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
90088  fi
90089done
90090rm -f conf$$subs.sh
90091
90092cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
90093cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
90094_ACEOF
90095sed -n '
90096h
90097s/^/S["/; s/!.*/"]=/
90098p
90099g
90100s/^[^!]*!//
90101:repl
90102t repl
90103s/'"$ac_delim"'$//
90104t delim
90105:nl
90106h
90107s/\(.\{148\}\)..*/\1/
90108t more1
90109s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
90110p
90111n
90112b repl
90113:more1
90114s/["\\]/\\&/g; s/^/"/; s/$/"\\/
90115p
90116g
90117s/.\{148\}//
90118t nl
90119:delim
90120h
90121s/\(.\{148\}\)..*/\1/
90122t more2
90123s/["\\]/\\&/g; s/^/"/; s/$/"/
90124p
90125b
90126:more2
90127s/["\\]/\\&/g; s/^/"/; s/$/"\\/
90128p
90129g
90130s/.\{148\}//
90131t delim
90132' <conf$$subs.awk | sed '
90133/^[^""]/{
90134  N
90135  s/\n//
90136}
90137' >>$CONFIG_STATUS || ac_write_fail=1
90138rm -f conf$$subs.awk
90139cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
90140_ACAWK
90141cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
90142  for (key in S) S_is_set[key] = 1
90143  FS = ""
90144  \$ac_cs_awk_pipe_init
90145}
90146{
90147  line = $ 0
90148  nfields = split(line, field, "@")
90149  substed = 0
90150  len = length(field[1])
90151  for (i = 2; i < nfields; i++) {
90152    key = field[i]
90153    keylen = length(key)
90154    if (S_is_set[key]) {
90155      value = S[key]
90156      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
90157      len += length(value) + length(field[++i])
90158      substed = 1
90159    } else
90160      len += 1 + keylen
90161  }
90162  if (nfields == 3 && !substed) {
90163    key = field[2]
90164    if (F[key] != "" && line ~ /^[	 ]*@.*@[	 ]*$/) {
90165      \$ac_cs_awk_read_file
90166      next
90167    }
90168  }
90169  print line
90170}
90171\$ac_cs_awk_pipe_fini
90172_ACAWK
90173_ACEOF
90174cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
90175if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
90176  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
90177else
90178  cat
90179fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
90180  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
90181_ACEOF
90182
90183# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
90184# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
90185# trailing colons and then remove the whole line if VPATH becomes empty
90186# (actually we leave an empty line to preserve line numbers).
90187if test "x$srcdir" = x.; then
90188  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
90189h
90190s///
90191s/^/:/
90192s/[	 ]*$/:/
90193s/:\$(srcdir):/:/g
90194s/:\${srcdir}:/:/g
90195s/:@srcdir@:/:/g
90196s/^:*//
90197s/:*$//
90198x
90199s/\(=[	 ]*\).*/\1/
90200G
90201s/\n//
90202s/^[^=]*=[	 ]*$//
90203}'
90204fi
90205
90206cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
90207fi # test -n "$CONFIG_FILES"
90208
90209# Set up the scripts for CONFIG_HEADERS section.
90210# No need to generate them if there are no CONFIG_HEADERS.
90211# This happens for instance with `./config.status Makefile'.
90212if test -n "$CONFIG_HEADERS"; then
90213cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
90214BEGIN {
90215_ACEOF
90216
90217# Transform confdefs.h into an awk script `defines.awk', embedded as
90218# here-document in config.status, that substitutes the proper values into
90219# config.h.in to produce config.h.
90220
90221# Create a delimiter string that does not exist in confdefs.h, to ease
90222# handling of long lines.
90223ac_delim='%!_!# '
90224for ac_last_try in false false :; do
90225  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
90226  if test -z "$ac_tt"; then
90227    break
90228  elif $ac_last_try; then
90229    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
90230  else
90231    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
90232  fi
90233done
90234
90235# For the awk script, D is an array of macro values keyed by name,
90236# likewise P contains macro parameters if any.  Preserve backslash
90237# newline sequences.
90238
90239ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
90240sed -n '
90241s/.\{148\}/&'"$ac_delim"'/g
90242t rset
90243:rset
90244s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
90245t def
90246d
90247:def
90248s/\\$//
90249t bsnl
90250s/["\\]/\\&/g
90251s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
90252D["\1"]=" \3"/p
90253s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
90254d
90255:bsnl
90256s/["\\]/\\&/g
90257s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
90258D["\1"]=" \3\\\\\\n"\\/p
90259t cont
90260s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
90261t cont
90262d
90263:cont
90264n
90265s/.\{148\}/&'"$ac_delim"'/g
90266t clear
90267:clear
90268s/\\$//
90269t bsnlc
90270s/["\\]/\\&/g; s/^/"/; s/$/"/p
90271d
90272:bsnlc
90273s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
90274b cont
90275' <confdefs.h | sed '
90276s/'"$ac_delim"'/"\\\
90277"/g' >>$CONFIG_STATUS || ac_write_fail=1
90278
90279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
90280  for (key in D) D_is_set[key] = 1
90281  FS = ""
90282}
90283/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
90284  line = \$ 0
90285  split(line, arg, " ")
90286  if (arg[1] == "#") {
90287    defundef = arg[2]
90288    mac1 = arg[3]
90289  } else {
90290    defundef = substr(arg[1], 2)
90291    mac1 = arg[2]
90292  }
90293  split(mac1, mac2, "(") #)
90294  macro = mac2[1]
90295  prefix = substr(line, 1, index(line, defundef) - 1)
90296  if (D_is_set[macro]) {
90297    # Preserve the white space surrounding the "#".
90298    print prefix "define", macro P[macro] D[macro]
90299    next
90300  } else {
90301    # Replace #undef with comments.  This is necessary, for example,
90302    # in the case of _POSIX_SOURCE, which is predefined and required
90303    # on some systems where configure will not decide to define it.
90304    if (defundef == "undef") {
90305      print "/*", prefix defundef, macro, "*/"
90306      next
90307    }
90308  }
90309}
90310{ print }
90311_ACAWK
90312_ACEOF
90313cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
90314  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
90315fi # test -n "$CONFIG_HEADERS"
90316
90317
90318eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
90319shift
90320for ac_tag
90321do
90322  case $ac_tag in
90323  :[FHLC]) ac_mode=$ac_tag; continue;;
90324  esac
90325  case $ac_mode$ac_tag in
90326  :[FHL]*:*);;
90327  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
90328  :[FH]-) ac_tag=-:-;;
90329  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
90330  esac
90331  ac_save_IFS=$IFS
90332  IFS=:
90333  set x $ac_tag
90334  IFS=$ac_save_IFS
90335  shift
90336  ac_file=$1
90337  shift
90338
90339  case $ac_mode in
90340  :L) ac_source=$1;;
90341  :[FH])
90342    ac_file_inputs=
90343    for ac_f
90344    do
90345      case $ac_f in
90346      -) ac_f="$ac_tmp/stdin";;
90347      *) # Look for the file first in the build tree, then in the source tree
90348	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
90349	 # because $ac_f cannot contain `:'.
90350	 test -f "$ac_f" ||
90351	   case $ac_f in
90352	   [\\/$]*) false;;
90353	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
90354	   esac ||
90355	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
90356      esac
90357      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
90358      as_fn_append ac_file_inputs " '$ac_f'"
90359    done
90360
90361    # Let's still pretend it is `configure' which instantiates (i.e., don't
90362    # use $as_me), people would be surprised to read:
90363    #    /* config.h.  Generated by config.status.  */
90364    configure_input='Generated from '`
90365	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
90366	`' by configure.'
90367    if test x"$ac_file" != x-; then
90368      configure_input="$ac_file.  $configure_input"
90369      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
90370$as_echo "$as_me: creating $ac_file" >&6;}
90371    fi
90372    # Neutralize special characters interpreted by sed in replacement strings.
90373    case $configure_input in #(
90374    *\&* | *\|* | *\\* )
90375       ac_sed_conf_input=`$as_echo "$configure_input" |
90376       sed 's/[\\\\&|]/\\\\&/g'`;; #(
90377    *) ac_sed_conf_input=$configure_input;;
90378    esac
90379
90380    case $ac_tag in
90381    *:-:* | *:-) cat >"$ac_tmp/stdin" \
90382      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
90383    esac
90384    ;;
90385  esac
90386
90387  ac_dir=`$as_dirname -- "$ac_file" ||
90388$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
90389	 X"$ac_file" : 'X\(//\)[^/]' \| \
90390	 X"$ac_file" : 'X\(//\)$' \| \
90391	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
90392$as_echo X"$ac_file" |
90393    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
90394	    s//\1/
90395	    q
90396	  }
90397	  /^X\(\/\/\)[^/].*/{
90398	    s//\1/
90399	    q
90400	  }
90401	  /^X\(\/\/\)$/{
90402	    s//\1/
90403	    q
90404	  }
90405	  /^X\(\/\).*/{
90406	    s//\1/
90407	    q
90408	  }
90409	  s/.*/./; q'`
90410  as_dir="$ac_dir"; as_fn_mkdir_p
90411  ac_builddir=.
90412
90413case "$ac_dir" in
90414.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
90415*)
90416  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
90417  # A ".." for each directory in $ac_dir_suffix.
90418  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
90419  case $ac_top_builddir_sub in
90420  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
90421  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
90422  esac ;;
90423esac
90424ac_abs_top_builddir=$ac_pwd
90425ac_abs_builddir=$ac_pwd$ac_dir_suffix
90426# for backward compatibility:
90427ac_top_builddir=$ac_top_build_prefix
90428
90429case $srcdir in
90430  .)  # We are building in place.
90431    ac_srcdir=.
90432    ac_top_srcdir=$ac_top_builddir_sub
90433    ac_abs_top_srcdir=$ac_pwd ;;
90434  [\\/]* | ?:[\\/]* )  # Absolute name.
90435    ac_srcdir=$srcdir$ac_dir_suffix;
90436    ac_top_srcdir=$srcdir
90437    ac_abs_top_srcdir=$srcdir ;;
90438  *) # Relative name.
90439    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
90440    ac_top_srcdir=$ac_top_build_prefix$srcdir
90441    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
90442esac
90443ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
90444
90445
90446  case $ac_mode in
90447  :F)
90448  #
90449  # CONFIG_FILE
90450  #
90451
90452  case $INSTALL in
90453  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
90454  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
90455  esac
90456  ac_MKDIR_P=$MKDIR_P
90457  case $MKDIR_P in
90458  [\\/$]* | ?:[\\/]* ) ;;
90459  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
90460  esac
90461_ACEOF
90462
90463cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
90464# If the template does not know about datarootdir, expand it.
90465# FIXME: This hack should be removed a few years after 2.60.
90466ac_datarootdir_hack=; ac_datarootdir_seen=
90467ac_sed_dataroot='
90468/datarootdir/ {
90469  p
90470  q
90471}
90472/@datadir@/p
90473/@docdir@/p
90474/@infodir@/p
90475/@localedir@/p
90476/@mandir@/p'
90477case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
90478*datarootdir*) ac_datarootdir_seen=yes;;
90479*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
90480  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
90481$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
90482_ACEOF
90483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
90484  ac_datarootdir_hack='
90485  s&@datadir@&$datadir&g
90486  s&@docdir@&$docdir&g
90487  s&@infodir@&$infodir&g
90488  s&@localedir@&$localedir&g
90489  s&@mandir@&$mandir&g
90490  s&\\\${datarootdir}&$datarootdir&g' ;;
90491esac
90492_ACEOF
90493
90494# Neutralize VPATH when `$srcdir' = `.'.
90495# Shell code in configure.ac might set extrasub.
90496# FIXME: do we really want to maintain this feature?
90497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
90498ac_sed_extra="$ac_vpsub
90499$extrasub
90500_ACEOF
90501cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
90502:t
90503/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
90504s|@configure_input@|$ac_sed_conf_input|;t t
90505s&@top_builddir@&$ac_top_builddir_sub&;t t
90506s&@top_build_prefix@&$ac_top_build_prefix&;t t
90507s&@srcdir@&$ac_srcdir&;t t
90508s&@abs_srcdir@&$ac_abs_srcdir&;t t
90509s&@top_srcdir@&$ac_top_srcdir&;t t
90510s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
90511s&@builddir@&$ac_builddir&;t t
90512s&@abs_builddir@&$ac_abs_builddir&;t t
90513s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
90514s&@INSTALL@&$ac_INSTALL&;t t
90515s&@MKDIR_P@&$ac_MKDIR_P&;t t
90516$ac_datarootdir_hack
90517"
90518eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
90519if $ac_cs_awk_getline; then
90520  $AWK -f "$ac_tmp/subs.awk"
90521else
90522  $AWK -f "$ac_tmp/subs.awk" | $SHELL
90523fi \
90524  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
90525
90526test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
90527  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
90528  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
90529      "$ac_tmp/out"`; test -z "$ac_out"; } &&
90530  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
90531which seems to be undefined.  Please make sure it is defined" >&5
90532$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
90533which seems to be undefined.  Please make sure it is defined" >&2;}
90534
90535  rm -f "$ac_tmp/stdin"
90536  case $ac_file in
90537  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
90538  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
90539  esac \
90540  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
90541 ;;
90542  :H)
90543  #
90544  # CONFIG_HEADER
90545  #
90546  if test x"$ac_file" != x-; then
90547    {
90548      $as_echo "/* $configure_input  */" \
90549      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
90550    } >"$ac_tmp/config.h" \
90551      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
90552    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
90553      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
90554$as_echo "$as_me: $ac_file is unchanged" >&6;}
90555    else
90556      rm -f "$ac_file"
90557      mv "$ac_tmp/config.h" "$ac_file" \
90558	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
90559    fi
90560  else
90561    $as_echo "/* $configure_input  */" \
90562      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
90563      || as_fn_error $? "could not create -" "$LINENO" 5
90564  fi
90565# Compute "$ac_file"'s index in $config_headers.
90566_am_arg="$ac_file"
90567_am_stamp_count=1
90568for _am_header in $config_headers :; do
90569  case $_am_header in
90570    $_am_arg | $_am_arg:* )
90571      break ;;
90572    * )
90573      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
90574  esac
90575done
90576echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
90577$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
90578	 X"$_am_arg" : 'X\(//\)[^/]' \| \
90579	 X"$_am_arg" : 'X\(//\)$' \| \
90580	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
90581$as_echo X"$_am_arg" |
90582    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
90583	    s//\1/
90584	    q
90585	  }
90586	  /^X\(\/\/\)[^/].*/{
90587	    s//\1/
90588	    q
90589	  }
90590	  /^X\(\/\/\)$/{
90591	    s//\1/
90592	    q
90593	  }
90594	  /^X\(\/\).*/{
90595	    s//\1/
90596	    q
90597	  }
90598	  s/.*/./; q'`/stamp-h$_am_stamp_count
90599 ;;
90600
90601  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
90602$as_echo "$as_me: executing $ac_file commands" >&6;}
90603 ;;
90604  esac
90605
90606
90607  case $ac_file$ac_mode in
90608    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
90609  # Older Autoconf quotes --file arguments for eval, but not when files
90610  # are listed without --file.  Let's play safe and only enable the eval
90611  # if we detect the quoting.
90612  # TODO: see whether this extra hack can be removed once we start
90613  # requiring Autoconf 2.70 or later.
90614  case $CONFIG_FILES in #(
90615  *\'*) :
90616    eval set x "$CONFIG_FILES" ;; #(
90617  *) :
90618    set x $CONFIG_FILES ;; #(
90619  *) :
90620     ;;
90621esac
90622  shift
90623  # Used to flag and report bootstrapping failures.
90624  am_rc=0
90625  for am_mf
90626  do
90627    # Strip MF so we end up with the name of the file.
90628    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
90629    # Check whether this is an Automake generated Makefile which includes
90630    # dependency-tracking related rules and includes.
90631    # Grep'ing the whole file directly is not great: AIX grep has a line
90632    # limit of 2048, but all sed's we know have understand at least 4000.
90633    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
90634      || continue
90635    am_dirpart=`$as_dirname -- "$am_mf" ||
90636$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
90637	 X"$am_mf" : 'X\(//\)[^/]' \| \
90638	 X"$am_mf" : 'X\(//\)$' \| \
90639	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
90640$as_echo X"$am_mf" |
90641    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
90642	    s//\1/
90643	    q
90644	  }
90645	  /^X\(\/\/\)[^/].*/{
90646	    s//\1/
90647	    q
90648	  }
90649	  /^X\(\/\/\)$/{
90650	    s//\1/
90651	    q
90652	  }
90653	  /^X\(\/\).*/{
90654	    s//\1/
90655	    q
90656	  }
90657	  s/.*/./; q'`
90658    am_filepart=`$as_basename -- "$am_mf" ||
90659$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
90660	 X"$am_mf" : 'X\(//\)$' \| \
90661	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
90662$as_echo X/"$am_mf" |
90663    sed '/^.*\/\([^/][^/]*\)\/*$/{
90664	    s//\1/
90665	    q
90666	  }
90667	  /^X\/\(\/\/\)$/{
90668	    s//\1/
90669	    q
90670	  }
90671	  /^X\/\(\/\).*/{
90672	    s//\1/
90673	    q
90674	  }
90675	  s/.*/./; q'`
90676    { echo "$as_me:$LINENO: cd "$am_dirpart" \
90677      && sed -e '/# am--include-marker/d' "$am_filepart" \
90678        | $MAKE -f - am--depfiles" >&5
90679   (cd "$am_dirpart" \
90680      && sed -e '/# am--include-marker/d' "$am_filepart" \
90681        | $MAKE -f - am--depfiles) >&5 2>&5
90682   ac_status=$?
90683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
90684   (exit $ac_status); } || am_rc=$?
90685  done
90686  if test $am_rc -ne 0; then
90687    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
90688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
90689as_fn_error $? "Something went wrong bootstrapping makefile fragments
90690    for automatic dependency tracking.  If GNU make was not used, consider
90691    re-running the configure script with MAKE=\"gmake\" (or whatever is
90692    necessary).  You can also try re-running configure with the
90693    '--disable-dependency-tracking' option to at least be able to build
90694    the package (albeit without support for automatic dependency tracking).
90695See \`config.log' for more details" "$LINENO" 5; }
90696  fi
90697  { am_dirpart=; unset am_dirpart;}
90698  { am_filepart=; unset am_filepart;}
90699  { am_mf=; unset am_mf;}
90700  { am_rc=; unset am_rc;}
90701  rm -f conftest-deps.mk
90702}
90703 ;;
90704    "libtool":C)
90705
90706    # See if we are running on zsh, and set the options that allow our
90707    # commands through without removal of \ escapes.
90708    if test -n "${ZSH_VERSION+set}"; then
90709      setopt NO_GLOB_SUBST
90710    fi
90711
90712    cfgfile=${ofile}T
90713    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
90714    $RM "$cfgfile"
90715
90716    cat <<_LT_EOF >> "$cfgfile"
90717#! $SHELL
90718# Generated automatically by $as_me ($PACKAGE) $VERSION
90719# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
90720# NOTE: Changes made to this file will be lost: look at ltmain.sh.
90721
90722# Provide generalized library-building support services.
90723# Written by Gordon Matzigkeit, 1996
90724
90725# Copyright (C) 2014 Free Software Foundation, Inc.
90726# This is free software; see the source for copying conditions.  There is NO
90727# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
90728
90729# GNU Libtool is free software; you can redistribute it and/or modify
90730# it under the terms of the GNU General Public License as published by
90731# the Free Software Foundation; either version 2 of of the License, or
90732# (at your option) any later version.
90733#
90734# As a special exception to the GNU General Public License, if you
90735# distribute this file as part of a program or library that is built
90736# using GNU Libtool, you may include this file under the  same
90737# distribution terms that you use for the rest of that program.
90738#
90739# GNU Libtool is distributed in the hope that it will be useful, but
90740# WITHOUT ANY WARRANTY; without even the implied warranty of
90741# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
90742# GNU General Public License for more details.
90743#
90744# You should have received a copy of the GNU General Public License
90745# along with this program.  If not, see <https://www.gnu.org/licenses/>.
90746
90747
90748# The names of the tagged configurations supported by this script.
90749available_tags='RC CXX '
90750
90751# Configured defaults for sys_lib_dlsearch_path munging.
90752: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
90753
90754# ### BEGIN LIBTOOL CONFIG
90755
90756# Which release of libtool.m4 was used?
90757macro_version=$macro_version
90758macro_revision=$macro_revision
90759
90760# Assembler program.
90761AS=$lt_AS
90762
90763# DLL creation program.
90764DLLTOOL=$lt_DLLTOOL
90765
90766# Object dumper program.
90767OBJDUMP=$lt_OBJDUMP
90768
90769# Whether or not to build shared libraries.
90770build_libtool_libs=$enable_shared
90771
90772# Whether or not to build static libraries.
90773build_old_libs=$enable_static
90774
90775# What type of objects to build.
90776pic_mode=$pic_mode
90777
90778# Whether or not to optimize for fast installation.
90779fast_install=$enable_fast_install
90780
90781# Shared archive member basename,for filename based shared library versioning on AIX.
90782shared_archive_member_spec=$shared_archive_member_spec
90783
90784# Shell to use when invoking shell scripts.
90785SHELL=$lt_SHELL
90786
90787# An echo program that protects backslashes.
90788ECHO=$lt_ECHO
90789
90790# The PATH separator for the build system.
90791PATH_SEPARATOR=$lt_PATH_SEPARATOR
90792
90793# The host system.
90794host_alias=$host_alias
90795host=$host
90796host_os=$host_os
90797
90798# The build system.
90799build_alias=$build_alias
90800build=$build
90801build_os=$build_os
90802
90803# A sed program that does not truncate output.
90804SED=$lt_SED
90805
90806# Sed that helps us avoid accidentally triggering echo(1) options like -n.
90807Xsed="\$SED -e 1s/^X//"
90808
90809# A grep program that handles long lines.
90810GREP=$lt_GREP
90811
90812# An ERE matcher.
90813EGREP=$lt_EGREP
90814
90815# A literal string matcher.
90816FGREP=$lt_FGREP
90817
90818# A BSD- or MS-compatible name lister.
90819NM=$lt_NM
90820
90821# Whether we need soft or hard links.
90822LN_S=$lt_LN_S
90823
90824# What is the maximum length of a command?
90825max_cmd_len=$max_cmd_len
90826
90827# Object file suffix (normally "o").
90828objext=$ac_objext
90829
90830# Executable file suffix (normally "").
90831exeext=$exeext
90832
90833# whether the shell understands "unset".
90834lt_unset=$lt_unset
90835
90836# turn spaces into newlines.
90837SP2NL=$lt_lt_SP2NL
90838
90839# turn newlines into spaces.
90840NL2SP=$lt_lt_NL2SP
90841
90842# convert \$build file names to \$host format.
90843to_host_file_cmd=$lt_cv_to_host_file_cmd
90844
90845# convert \$build files to toolchain format.
90846to_tool_file_cmd=$lt_cv_to_tool_file_cmd
90847
90848# Method to check whether dependent libraries are shared objects.
90849deplibs_check_method=$lt_deplibs_check_method
90850
90851# Command to use when deplibs_check_method = "file_magic".
90852file_magic_cmd=$lt_file_magic_cmd
90853
90854# How to find potential files when deplibs_check_method = "file_magic".
90855file_magic_glob=$lt_file_magic_glob
90856
90857# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
90858want_nocaseglob=$lt_want_nocaseglob
90859
90860# Command to associate shared and link libraries.
90861sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
90862
90863# The archiver.
90864AR=$lt_AR
90865
90866# Flags to create an archive.
90867AR_FLAGS=$lt_AR_FLAGS
90868
90869# How to feed a file listing to the archiver.
90870archiver_list_spec=$lt_archiver_list_spec
90871
90872# A symbol stripping program.
90873STRIP=$lt_STRIP
90874
90875# Commands used to install an old-style archive.
90876RANLIB=$lt_RANLIB
90877old_postinstall_cmds=$lt_old_postinstall_cmds
90878old_postuninstall_cmds=$lt_old_postuninstall_cmds
90879
90880# Whether to use a lock for old archive extraction.
90881lock_old_archive_extraction=$lock_old_archive_extraction
90882
90883# A C compiler.
90884LTCC=$lt_CC
90885
90886# LTCC compiler flags.
90887LTCFLAGS=$lt_CFLAGS
90888
90889# Take the output of nm and produce a listing of raw symbols and C names.
90890global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
90891
90892# Transform the output of nm in a proper C declaration.
90893global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
90894
90895# Transform the output of nm into a list of symbols to manually relocate.
90896global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
90897
90898# Transform the output of nm in a C name address pair.
90899global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
90900
90901# Transform the output of nm in a C name address pair when lib prefix is needed.
90902global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
90903
90904# The name lister interface.
90905nm_interface=$lt_lt_cv_nm_interface
90906
90907# Specify filename containing input files for \$NM.
90908nm_file_list_spec=$lt_nm_file_list_spec
90909
90910# The root where to search for dependent libraries,and where our libraries should be installed.
90911lt_sysroot=$lt_sysroot
90912
90913# Command to truncate a binary pipe.
90914lt_truncate_bin=$lt_lt_cv_truncate_bin
90915
90916# The name of the directory that contains temporary libtool files.
90917objdir=$objdir
90918
90919# Used to examine libraries when file_magic_cmd begins with "file".
90920MAGIC_CMD=$MAGIC_CMD
90921
90922# Must we lock files when doing compilation?
90923need_locks=$lt_need_locks
90924
90925# Manifest tool.
90926MANIFEST_TOOL=$lt_MANIFEST_TOOL
90927
90928# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
90929DSYMUTIL=$lt_DSYMUTIL
90930
90931# Tool to change global to local symbols on Mac OS X.
90932NMEDIT=$lt_NMEDIT
90933
90934# Tool to manipulate fat objects and archives on Mac OS X.
90935LIPO=$lt_LIPO
90936
90937# ldd/readelf like tool for Mach-O binaries on Mac OS X.
90938OTOOL=$lt_OTOOL
90939
90940# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
90941OTOOL64=$lt_OTOOL64
90942
90943# Old archive suffix (normally "a").
90944libext=$libext
90945
90946# Shared library suffix (normally ".so").
90947shrext_cmds=$lt_shrext_cmds
90948
90949# The commands to extract the exported symbol list from a shared archive.
90950extract_expsyms_cmds=$lt_extract_expsyms_cmds
90951
90952# Variables whose values should be saved in libtool wrapper scripts and
90953# restored at link time.
90954variables_saved_for_relink=$lt_variables_saved_for_relink
90955
90956# Do we need the "lib" prefix for modules?
90957need_lib_prefix=$need_lib_prefix
90958
90959# Do we need a version for libraries?
90960need_version=$need_version
90961
90962# Library versioning type.
90963version_type=$version_type
90964
90965# Shared library runtime path variable.
90966runpath_var=$runpath_var
90967
90968# Shared library path variable.
90969shlibpath_var=$shlibpath_var
90970
90971# Is shlibpath searched before the hard-coded library search path?
90972shlibpath_overrides_runpath=$shlibpath_overrides_runpath
90973
90974# Format of library name prefix.
90975libname_spec=$lt_libname_spec
90976
90977# List of archive names.  First name is the real one, the rest are links.
90978# The last name is the one that the linker finds with -lNAME
90979library_names_spec=$lt_library_names_spec
90980
90981# The coded name of the library, if different from the real name.
90982soname_spec=$lt_soname_spec
90983
90984# Permission mode override for installation of shared libraries.
90985install_override_mode=$lt_install_override_mode
90986
90987# Command to use after installation of a shared archive.
90988postinstall_cmds=$lt_postinstall_cmds
90989
90990# Command to use after uninstallation of a shared archive.
90991postuninstall_cmds=$lt_postuninstall_cmds
90992
90993# Commands used to finish a libtool library installation in a directory.
90994finish_cmds=$lt_finish_cmds
90995
90996# As "finish_cmds", except a single script fragment to be evaled but
90997# not shown.
90998finish_eval=$lt_finish_eval
90999
91000# Whether we should hardcode library paths into libraries.
91001hardcode_into_libs=$hardcode_into_libs
91002
91003# Compile-time system search path for libraries.
91004sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
91005
91006# Detected run-time system search path for libraries.
91007sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
91008
91009# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
91010configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
91011
91012# Whether dlopen is supported.
91013dlopen_support=$enable_dlopen
91014
91015# Whether dlopen of programs is supported.
91016dlopen_self=$enable_dlopen_self
91017
91018# Whether dlopen of statically linked programs is supported.
91019dlopen_self_static=$enable_dlopen_self_static
91020
91021# Commands to strip libraries.
91022old_striplib=$lt_old_striplib
91023striplib=$lt_striplib
91024
91025
91026# The linker used to build libraries.
91027LD=$lt_LD
91028
91029# How to create reloadable object files.
91030reload_flag=$lt_reload_flag
91031reload_cmds=$lt_reload_cmds
91032
91033# Commands used to build an old-style archive.
91034old_archive_cmds=$lt_old_archive_cmds
91035
91036# A language specific compiler.
91037CC=$lt_compiler
91038
91039# Is the compiler the GNU compiler?
91040with_gcc=$GCC
91041
91042# Compiler flag to turn off builtin functions.
91043no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
91044
91045# Additional compiler flags for building library objects.
91046pic_flag=$lt_lt_prog_compiler_pic
91047
91048# How to pass a linker flag through the compiler.
91049wl=$lt_lt_prog_compiler_wl
91050
91051# Compiler flag to prevent dynamic linking.
91052link_static_flag=$lt_lt_prog_compiler_static
91053
91054# Does compiler simultaneously support -c and -o options?
91055compiler_c_o=$lt_lt_cv_prog_compiler_c_o
91056
91057# Whether or not to add -lc for building shared libraries.
91058build_libtool_need_lc=$archive_cmds_need_lc
91059
91060# Whether or not to disallow shared libs when runtime libs are static.
91061allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
91062
91063# Compiler flag to allow reflexive dlopens.
91064export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
91065
91066# Compiler flag to generate shared objects directly from archives.
91067whole_archive_flag_spec=$lt_whole_archive_flag_spec
91068
91069# Whether the compiler copes with passing no objects directly.
91070compiler_needs_object=$lt_compiler_needs_object
91071
91072# Create an old-style archive from a shared archive.
91073old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
91074
91075# Create a temporary old-style archive to link instead of a shared archive.
91076old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
91077
91078# Commands used to build a shared archive.
91079archive_cmds=$lt_archive_cmds
91080archive_expsym_cmds=$lt_archive_expsym_cmds
91081
91082# Commands used to build a loadable module if different from building
91083# a shared archive.
91084module_cmds=$lt_module_cmds
91085module_expsym_cmds=$lt_module_expsym_cmds
91086
91087# Whether we are building with GNU ld or not.
91088with_gnu_ld=$lt_with_gnu_ld
91089
91090# Flag that allows shared libraries with undefined symbols to be built.
91091allow_undefined_flag=$lt_allow_undefined_flag
91092
91093# Flag that enforces no undefined symbols.
91094no_undefined_flag=$lt_no_undefined_flag
91095
91096# Flag to hardcode \$libdir into a binary during linking.
91097# This must work even if \$libdir does not exist
91098hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
91099
91100# Whether we need a single "-rpath" flag with a separated argument.
91101hardcode_libdir_separator=$lt_hardcode_libdir_separator
91102
91103# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
91104# DIR into the resulting binary.
91105hardcode_direct=$hardcode_direct
91106
91107# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
91108# DIR into the resulting binary and the resulting library dependency is
91109# "absolute",i.e impossible to change by setting \$shlibpath_var if the
91110# library is relocated.
91111hardcode_direct_absolute=$hardcode_direct_absolute
91112
91113# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
91114# into the resulting binary.
91115hardcode_minus_L=$hardcode_minus_L
91116
91117# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
91118# into the resulting binary.
91119hardcode_shlibpath_var=$hardcode_shlibpath_var
91120
91121# Set to "yes" if building a shared library automatically hardcodes DIR
91122# into the library and all subsequent libraries and executables linked
91123# against it.
91124hardcode_automatic=$hardcode_automatic
91125
91126# Set to yes if linker adds runtime paths of dependent libraries
91127# to runtime path list.
91128inherit_rpath=$inherit_rpath
91129
91130# Whether libtool must link a program against all its dependency libraries.
91131link_all_deplibs=$link_all_deplibs
91132
91133# Set to "yes" if exported symbols are required.
91134always_export_symbols=$always_export_symbols
91135
91136# The commands to list exported symbols.
91137export_symbols_cmds=$lt_export_symbols_cmds
91138
91139# Symbols that should not be listed in the preloaded symbols.
91140exclude_expsyms=$lt_exclude_expsyms
91141
91142# Symbols that must always be exported.
91143include_expsyms=$lt_include_expsyms
91144
91145# Commands necessary for linking programs (against libraries) with templates.
91146prelink_cmds=$lt_prelink_cmds
91147
91148# Commands necessary for finishing linking programs.
91149postlink_cmds=$lt_postlink_cmds
91150
91151# Specify filename containing input files.
91152file_list_spec=$lt_file_list_spec
91153
91154# How to hardcode a shared library path into an executable.
91155hardcode_action=$hardcode_action
91156
91157# The directories searched by this compiler when creating a shared library.
91158compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
91159
91160# Dependencies to place before and after the objects being linked to
91161# create a shared library.
91162predep_objects=$lt_predep_objects
91163postdep_objects=$lt_postdep_objects
91164predeps=$lt_predeps
91165postdeps=$lt_postdeps
91166
91167# The library search path used internally by the compiler when linking
91168# a shared library.
91169compiler_lib_search_path=$lt_compiler_lib_search_path
91170
91171# ### END LIBTOOL CONFIG
91172
91173_LT_EOF
91174
91175    cat <<'_LT_EOF' >> "$cfgfile"
91176
91177# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
91178
91179# func_munge_path_list VARIABLE PATH
91180# -----------------------------------
91181# VARIABLE is name of variable containing _space_ separated list of
91182# directories to be munged by the contents of PATH, which is string
91183# having a format:
91184# "DIR[:DIR]:"
91185#       string "DIR[ DIR]" will be prepended to VARIABLE
91186# ":DIR[:DIR]"
91187#       string "DIR[ DIR]" will be appended to VARIABLE
91188# "DIRP[:DIRP]::[DIRA:]DIRA"
91189#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
91190#       "DIRA[ DIRA]" will be appended to VARIABLE
91191# "DIR[:DIR]"
91192#       VARIABLE will be replaced by "DIR[ DIR]"
91193func_munge_path_list ()
91194{
91195    case x$2 in
91196    x)
91197        ;;
91198    *:)
91199        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
91200        ;;
91201    x:*)
91202        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
91203        ;;
91204    *::*)
91205        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
91206        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
91207        ;;
91208    *)
91209        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
91210        ;;
91211    esac
91212}
91213
91214
91215# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
91216func_cc_basename ()
91217{
91218    for cc_temp in $*""; do
91219      case $cc_temp in
91220        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
91221        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
91222        \-*) ;;
91223        *) break;;
91224      esac
91225    done
91226    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
91227}
91228
91229
91230# ### END FUNCTIONS SHARED WITH CONFIGURE
91231
91232_LT_EOF
91233
91234  case $host_os in
91235  aix3*)
91236    cat <<\_LT_EOF >> "$cfgfile"
91237# AIX sometimes has problems with the GCC collect2 program.  For some
91238# reason, if we set the COLLECT_NAMES environment variable, the problems
91239# vanish in a puff of smoke.
91240if test set != "${COLLECT_NAMES+set}"; then
91241  COLLECT_NAMES=
91242  export COLLECT_NAMES
91243fi
91244_LT_EOF
91245    ;;
91246  esac
91247
91248
91249ltmain=$ac_aux_dir/ltmain.sh
91250
91251
91252  # We use sed instead of cat because bash on DJGPP gets confused if
91253  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
91254  # text mode, it properly converts lines to CR/LF.  This bash problem
91255  # is reportedly fixed, but why not run on old versions too?
91256  sed '$q' "$ltmain" >> "$cfgfile" \
91257     || (rm -f "$cfgfile"; exit 1)
91258
91259   mv -f "$cfgfile" "$ofile" ||
91260    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
91261  chmod +x "$ofile"
91262
91263
91264    cat <<_LT_EOF >> "$ofile"
91265
91266# ### BEGIN LIBTOOL TAG CONFIG: RC
91267
91268# The linker used to build libraries.
91269LD=$lt_LD_RC
91270
91271# How to create reloadable object files.
91272reload_flag=$lt_reload_flag_RC
91273reload_cmds=$lt_reload_cmds_RC
91274
91275# Commands used to build an old-style archive.
91276old_archive_cmds=$lt_old_archive_cmds_RC
91277
91278# A language specific compiler.
91279CC=$lt_compiler_RC
91280
91281# Is the compiler the GNU compiler?
91282with_gcc=$GCC_RC
91283
91284# Compiler flag to turn off builtin functions.
91285no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
91286
91287# Additional compiler flags for building library objects.
91288pic_flag=$lt_lt_prog_compiler_pic_RC
91289
91290# How to pass a linker flag through the compiler.
91291wl=$lt_lt_prog_compiler_wl_RC
91292
91293# Compiler flag to prevent dynamic linking.
91294link_static_flag=$lt_lt_prog_compiler_static_RC
91295
91296# Does compiler simultaneously support -c and -o options?
91297compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
91298
91299# Whether or not to add -lc for building shared libraries.
91300build_libtool_need_lc=$archive_cmds_need_lc_RC
91301
91302# Whether or not to disallow shared libs when runtime libs are static.
91303allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
91304
91305# Compiler flag to allow reflexive dlopens.
91306export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
91307
91308# Compiler flag to generate shared objects directly from archives.
91309whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
91310
91311# Whether the compiler copes with passing no objects directly.
91312compiler_needs_object=$lt_compiler_needs_object_RC
91313
91314# Create an old-style archive from a shared archive.
91315old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
91316
91317# Create a temporary old-style archive to link instead of a shared archive.
91318old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
91319
91320# Commands used to build a shared archive.
91321archive_cmds=$lt_archive_cmds_RC
91322archive_expsym_cmds=$lt_archive_expsym_cmds_RC
91323
91324# Commands used to build a loadable module if different from building
91325# a shared archive.
91326module_cmds=$lt_module_cmds_RC
91327module_expsym_cmds=$lt_module_expsym_cmds_RC
91328
91329# Whether we are building with GNU ld or not.
91330with_gnu_ld=$lt_with_gnu_ld_RC
91331
91332# Flag that allows shared libraries with undefined symbols to be built.
91333allow_undefined_flag=$lt_allow_undefined_flag_RC
91334
91335# Flag that enforces no undefined symbols.
91336no_undefined_flag=$lt_no_undefined_flag_RC
91337
91338# Flag to hardcode \$libdir into a binary during linking.
91339# This must work even if \$libdir does not exist
91340hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
91341
91342# Whether we need a single "-rpath" flag with a separated argument.
91343hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
91344
91345# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
91346# DIR into the resulting binary.
91347hardcode_direct=$hardcode_direct_RC
91348
91349# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
91350# DIR into the resulting binary and the resulting library dependency is
91351# "absolute",i.e impossible to change by setting \$shlibpath_var if the
91352# library is relocated.
91353hardcode_direct_absolute=$hardcode_direct_absolute_RC
91354
91355# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
91356# into the resulting binary.
91357hardcode_minus_L=$hardcode_minus_L_RC
91358
91359# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
91360# into the resulting binary.
91361hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
91362
91363# Set to "yes" if building a shared library automatically hardcodes DIR
91364# into the library and all subsequent libraries and executables linked
91365# against it.
91366hardcode_automatic=$hardcode_automatic_RC
91367
91368# Set to yes if linker adds runtime paths of dependent libraries
91369# to runtime path list.
91370inherit_rpath=$inherit_rpath_RC
91371
91372# Whether libtool must link a program against all its dependency libraries.
91373link_all_deplibs=$link_all_deplibs_RC
91374
91375# Set to "yes" if exported symbols are required.
91376always_export_symbols=$always_export_symbols_RC
91377
91378# The commands to list exported symbols.
91379export_symbols_cmds=$lt_export_symbols_cmds_RC
91380
91381# Symbols that should not be listed in the preloaded symbols.
91382exclude_expsyms=$lt_exclude_expsyms_RC
91383
91384# Symbols that must always be exported.
91385include_expsyms=$lt_include_expsyms_RC
91386
91387# Commands necessary for linking programs (against libraries) with templates.
91388prelink_cmds=$lt_prelink_cmds_RC
91389
91390# Commands necessary for finishing linking programs.
91391postlink_cmds=$lt_postlink_cmds_RC
91392
91393# Specify filename containing input files.
91394file_list_spec=$lt_file_list_spec_RC
91395
91396# How to hardcode a shared library path into an executable.
91397hardcode_action=$hardcode_action_RC
91398
91399# The directories searched by this compiler when creating a shared library.
91400compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC
91401
91402# Dependencies to place before and after the objects being linked to
91403# create a shared library.
91404predep_objects=$lt_predep_objects_RC
91405postdep_objects=$lt_postdep_objects_RC
91406predeps=$lt_predeps_RC
91407postdeps=$lt_postdeps_RC
91408
91409# The library search path used internally by the compiler when linking
91410# a shared library.
91411compiler_lib_search_path=$lt_compiler_lib_search_path_RC
91412
91413# ### END LIBTOOL TAG CONFIG: RC
91414_LT_EOF
91415
91416
91417    cat <<_LT_EOF >> "$ofile"
91418
91419# ### BEGIN LIBTOOL TAG CONFIG: CXX
91420
91421# The linker used to build libraries.
91422LD=$lt_LD_CXX
91423
91424# How to create reloadable object files.
91425reload_flag=$lt_reload_flag_CXX
91426reload_cmds=$lt_reload_cmds_CXX
91427
91428# Commands used to build an old-style archive.
91429old_archive_cmds=$lt_old_archive_cmds_CXX
91430
91431# A language specific compiler.
91432CC=$lt_compiler_CXX
91433
91434# Is the compiler the GNU compiler?
91435with_gcc=$GCC_CXX
91436
91437# Compiler flag to turn off builtin functions.
91438no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
91439
91440# Additional compiler flags for building library objects.
91441pic_flag=$lt_lt_prog_compiler_pic_CXX
91442
91443# How to pass a linker flag through the compiler.
91444wl=$lt_lt_prog_compiler_wl_CXX
91445
91446# Compiler flag to prevent dynamic linking.
91447link_static_flag=$lt_lt_prog_compiler_static_CXX
91448
91449# Does compiler simultaneously support -c and -o options?
91450compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
91451
91452# Whether or not to add -lc for building shared libraries.
91453build_libtool_need_lc=$archive_cmds_need_lc_CXX
91454
91455# Whether or not to disallow shared libs when runtime libs are static.
91456allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
91457
91458# Compiler flag to allow reflexive dlopens.
91459export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
91460
91461# Compiler flag to generate shared objects directly from archives.
91462whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
91463
91464# Whether the compiler copes with passing no objects directly.
91465compiler_needs_object=$lt_compiler_needs_object_CXX
91466
91467# Create an old-style archive from a shared archive.
91468old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
91469
91470# Create a temporary old-style archive to link instead of a shared archive.
91471old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
91472
91473# Commands used to build a shared archive.
91474archive_cmds=$lt_archive_cmds_CXX
91475archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
91476
91477# Commands used to build a loadable module if different from building
91478# a shared archive.
91479module_cmds=$lt_module_cmds_CXX
91480module_expsym_cmds=$lt_module_expsym_cmds_CXX
91481
91482# Whether we are building with GNU ld or not.
91483with_gnu_ld=$lt_with_gnu_ld_CXX
91484
91485# Flag that allows shared libraries with undefined symbols to be built.
91486allow_undefined_flag=$lt_allow_undefined_flag_CXX
91487
91488# Flag that enforces no undefined symbols.
91489no_undefined_flag=$lt_no_undefined_flag_CXX
91490
91491# Flag to hardcode \$libdir into a binary during linking.
91492# This must work even if \$libdir does not exist
91493hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
91494
91495# Whether we need a single "-rpath" flag with a separated argument.
91496hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
91497
91498# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
91499# DIR into the resulting binary.
91500hardcode_direct=$hardcode_direct_CXX
91501
91502# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
91503# DIR into the resulting binary and the resulting library dependency is
91504# "absolute",i.e impossible to change by setting \$shlibpath_var if the
91505# library is relocated.
91506hardcode_direct_absolute=$hardcode_direct_absolute_CXX
91507
91508# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
91509# into the resulting binary.
91510hardcode_minus_L=$hardcode_minus_L_CXX
91511
91512# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
91513# into the resulting binary.
91514hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
91515
91516# Set to "yes" if building a shared library automatically hardcodes DIR
91517# into the library and all subsequent libraries and executables linked
91518# against it.
91519hardcode_automatic=$hardcode_automatic_CXX
91520
91521# Set to yes if linker adds runtime paths of dependent libraries
91522# to runtime path list.
91523inherit_rpath=$inherit_rpath_CXX
91524
91525# Whether libtool must link a program against all its dependency libraries.
91526link_all_deplibs=$link_all_deplibs_CXX
91527
91528# Set to "yes" if exported symbols are required.
91529always_export_symbols=$always_export_symbols_CXX
91530
91531# The commands to list exported symbols.
91532export_symbols_cmds=$lt_export_symbols_cmds_CXX
91533
91534# Symbols that should not be listed in the preloaded symbols.
91535exclude_expsyms=$lt_exclude_expsyms_CXX
91536
91537# Symbols that must always be exported.
91538include_expsyms=$lt_include_expsyms_CXX
91539
91540# Commands necessary for linking programs (against libraries) with templates.
91541prelink_cmds=$lt_prelink_cmds_CXX
91542
91543# Commands necessary for finishing linking programs.
91544postlink_cmds=$lt_postlink_cmds_CXX
91545
91546# Specify filename containing input files.
91547file_list_spec=$lt_file_list_spec_CXX
91548
91549# How to hardcode a shared library path into an executable.
91550hardcode_action=$hardcode_action_CXX
91551
91552# The directories searched by this compiler when creating a shared library.
91553compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
91554
91555# Dependencies to place before and after the objects being linked to
91556# create a shared library.
91557predep_objects=$lt_predep_objects_CXX
91558postdep_objects=$lt_postdep_objects_CXX
91559predeps=$lt_predeps_CXX
91560postdeps=$lt_postdeps_CXX
91561
91562# The library search path used internally by the compiler when linking
91563# a shared library.
91564compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
91565
91566# ### END LIBTOOL TAG CONFIG: CXX
91567_LT_EOF
91568
91569 ;;
91570    "po-directories":C)
91571    for ac_file in $CONFIG_FILES; do
91572      # Support "outfile[:infile[:infile...]]"
91573      case "$ac_file" in
91574        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
91575      esac
91576      # PO directories have a Makefile.in generated from Makefile.in.in.
91577      case "$ac_file" in */Makefile.in)
91578        # Adjust a relative srcdir.
91579        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
91580        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
91581        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
91582        # In autoconf-2.13 it is called $ac_given_srcdir.
91583        # In autoconf-2.50 it is called $srcdir.
91584        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
91585        case "$ac_given_srcdir" in
91586          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
91587          /*) top_srcdir="$ac_given_srcdir" ;;
91588          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
91589        esac
91590        # Treat a directory as a PO directory if and only if it has a
91591        # POTFILES.in file. This allows packages to have multiple PO
91592        # directories under different names or in different locations.
91593        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
91594          rm -f "$ac_dir/POTFILES"
91595          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
91596          gt_tab=`printf '\t'`
91597          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
91598          POMAKEFILEDEPS="POTFILES.in"
91599          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
91600          # on $ac_dir but don't depend on user-specified configuration
91601          # parameters.
91602          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
91603            # The LINGUAS file contains the set of available languages.
91604            if test -n "$OBSOLETE_ALL_LINGUAS"; then
91605              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
91606            fi
91607            ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
91608            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
91609          else
91610            # The set of available languages was given in configure.in.
91611            ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
91612          fi
91613          # Compute POFILES
91614          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
91615          # Compute UPDATEPOFILES
91616          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
91617          # Compute DUMMYPOFILES
91618          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
91619          # Compute GMOFILES
91620          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
91621          case "$ac_given_srcdir" in
91622            .) srcdirpre= ;;
91623            *) srcdirpre='$(srcdir)/' ;;
91624          esac
91625          POFILES=
91626          UPDATEPOFILES=
91627          DUMMYPOFILES=
91628          GMOFILES=
91629          for lang in $ALL_LINGUAS; do
91630            POFILES="$POFILES $srcdirpre$lang.po"
91631            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
91632            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
91633            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
91634          done
91635          # CATALOGS depends on both $ac_dir and the user's LINGUAS
91636          # environment variable.
91637          INST_LINGUAS=
91638          if test -n "$ALL_LINGUAS"; then
91639            for presentlang in $ALL_LINGUAS; do
91640              useit=no
91641              if test "%UNSET%" != "$LINGUAS"; then
91642                desiredlanguages="$LINGUAS"
91643              else
91644                desiredlanguages="$ALL_LINGUAS"
91645              fi
91646              for desiredlang in $desiredlanguages; do
91647                # Use the presentlang catalog if desiredlang is
91648                #   a. equal to presentlang, or
91649                #   b. a variant of presentlang (because in this case,
91650                #      presentlang can be used as a fallback for messages
91651                #      which are not translated in the desiredlang catalog).
91652                case "$desiredlang" in
91653                  "$presentlang"*) useit=yes;;
91654                esac
91655              done
91656              if test $useit = yes; then
91657                INST_LINGUAS="$INST_LINGUAS $presentlang"
91658              fi
91659            done
91660          fi
91661          CATALOGS=
91662          if test -n "$INST_LINGUAS"; then
91663            for lang in $INST_LINGUAS; do
91664              CATALOGS="$CATALOGS $lang.gmo"
91665            done
91666          fi
91667          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
91668          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"
91669          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
91670            if test -f "$f"; then
91671              case "$f" in
91672                *.orig | *.bak | *~) ;;
91673                *) cat "$f" >> "$ac_dir/Makefile" ;;
91674              esac
91675            fi
91676          done
91677        fi
91678        ;;
91679      esac
91680    done ;;
91681    "intl/Makefile":F)
91682  # Change srcdir variable so that it points to ../gettext-runtime/intl.
91683  sed -e 's|^srcdir =.*$|srcdir = $(top_srcdir)/../gettext-runtime/intl|' \
91684      -e 's|^VPATH =.*$||' \
91685      -e 's|^DISTFILES =.*|DISTFILES =|' \
91686    < intl/Makefile > intl/Makefile.tmp
91687  mv intl/Makefile.tmp intl/Makefile
91688   ;;
91689    "misc/gettextize":F) chmod a+x misc/gettextize ;;
91690    "misc/autopoint":F) chmod a+x misc/autopoint ;;
91691    "misc/convert-archive":F) chmod a+x misc/convert-archive ;;
91692    "man/Makefile":F)
91693  sed -e 's,^#distdir:,distdir:,' < $ac_file > $ac_file.tmp
91694  mv $ac_file.tmp $ac_file
91695 ;;
91696
91697  esac
91698done # for ac_tag
91699
91700
91701as_fn_exit 0
91702_ACEOF
91703ac_clean_files=$ac_clean_files_save
91704
91705test $ac_write_fail = 0 ||
91706  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
91707
91708
91709# configure is writing to config.log, and then calls config.status.
91710# config.status does its own redirection, appending to config.log.
91711# Unfortunately, on DOS this fails, as config.log is still kept open
91712# by configure, so config.status won't be able to write to it; its
91713# output is simply discarded.  So we exec the FD to /dev/null,
91714# effectively closing config.log, so it can be properly (re)opened and
91715# appended to by config.status.  When coming back to configure, we
91716# need to make the FD available again.
91717if test "$no_create" != yes; then
91718  ac_cs_success=:
91719  ac_config_status_args=
91720  test "$silent" = yes &&
91721    ac_config_status_args="$ac_config_status_args --quiet"
91722  exec 5>/dev/null
91723  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
91724  exec 5>>config.log
91725  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
91726  # would make configure fail if this is the last instruction.
91727  $ac_cs_success || as_fn_exit 1
91728fi
91729
91730#
91731# CONFIG_SUBDIRS section.
91732#
91733if test "$no_recursion" != yes; then
91734
91735  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
91736  # so they do not pile up.
91737  ac_sub_configure_args=
91738  ac_prev=
91739  eval "set x $ac_configure_args"
91740  shift
91741  for ac_arg
91742  do
91743    if test -n "$ac_prev"; then
91744      ac_prev=
91745      continue
91746    fi
91747    case $ac_arg in
91748    -cache-file | --cache-file | --cache-fil | --cache-fi \
91749    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
91750      ac_prev=cache_file ;;
91751    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
91752    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
91753    | --c=*)
91754      ;;
91755    --config-cache | -C)
91756      ;;
91757    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
91758      ac_prev=srcdir ;;
91759    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
91760      ;;
91761    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
91762      ac_prev=prefix ;;
91763    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
91764      ;;
91765    --disable-option-checking)
91766      ;;
91767    *)
91768      case $ac_arg in
91769      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
91770      esac
91771      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
91772    esac
91773  done
91774
91775  # Always prepend --prefix to ensure using the same prefix
91776  # in subdir configurations.
91777  ac_arg="--prefix=$prefix"
91778  case $ac_arg in
91779  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
91780  esac
91781  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
91782
91783  # Pass --silent
91784  if test "$silent" = yes; then
91785    ac_sub_configure_args="--silent $ac_sub_configure_args"
91786  fi
91787
91788  # Always prepend --disable-option-checking to silence warnings, since
91789  # different subdirs can have different --enable and --with options.
91790  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
91791
91792  ac_popdir=`pwd`
91793  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
91794
91795    # Do not complain, so a configure script can configure whichever
91796    # parts of a large source tree are present.
91797    test -d "$srcdir/$ac_dir" || continue
91798
91799    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
91800    $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
91801    $as_echo "$ac_msg" >&6
91802    as_dir="$ac_dir"; as_fn_mkdir_p
91803    ac_builddir=.
91804
91805case "$ac_dir" in
91806.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
91807*)
91808  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
91809  # A ".." for each directory in $ac_dir_suffix.
91810  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
91811  case $ac_top_builddir_sub in
91812  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
91813  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
91814  esac ;;
91815esac
91816ac_abs_top_builddir=$ac_pwd
91817ac_abs_builddir=$ac_pwd$ac_dir_suffix
91818# for backward compatibility:
91819ac_top_builddir=$ac_top_build_prefix
91820
91821case $srcdir in
91822  .)  # We are building in place.
91823    ac_srcdir=.
91824    ac_top_srcdir=$ac_top_builddir_sub
91825    ac_abs_top_srcdir=$ac_pwd ;;
91826  [\\/]* | ?:[\\/]* )  # Absolute name.
91827    ac_srcdir=$srcdir$ac_dir_suffix;
91828    ac_top_srcdir=$srcdir
91829    ac_abs_top_srcdir=$srcdir ;;
91830  *) # Relative name.
91831    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
91832    ac_top_srcdir=$ac_top_build_prefix$srcdir
91833    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
91834esac
91835ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
91836
91837
91838    cd "$ac_dir"
91839
91840    # Check for guested configure; otherwise get Cygnus style configure.
91841    if test -f "$ac_srcdir/configure.gnu"; then
91842      ac_sub_configure=$ac_srcdir/configure.gnu
91843    elif test -f "$ac_srcdir/configure"; then
91844      ac_sub_configure=$ac_srcdir/configure
91845    elif test -f "$ac_srcdir/configure.in"; then
91846      # This should be Cygnus configure.
91847      ac_sub_configure=$ac_aux_dir/configure
91848    else
91849      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
91850$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
91851      ac_sub_configure=
91852    fi
91853
91854    # The recursion is here.
91855    if test -n "$ac_sub_configure"; then
91856      # Make the cache file name correct relative to the subdirectory.
91857      case $cache_file in
91858      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
91859      *) # Relative name.
91860	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
91861      esac
91862
91863      { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
91864$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
91865      # The eval makes quoting arguments work.
91866      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
91867	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
91868	as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
91869    fi
91870
91871    cd "$ac_popdir"
91872  done
91873fi
91874if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
91875  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
91876$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
91877fi
91878
91879