]> git.ipfire.org Git - thirdparty/bash.git/blame - configure
Bash-5.1 patch 3: fix command substitution in here-document from child process in...
[thirdparty/bash.git] / configure
CommitLineData
ccc6cda3 1#! /bin/sh
8868edaf 2# From configure.ac for Bash 5.1, version 5.022.
f73dda09 3# Guess values for system-dependent variables and create Makefiles.
8868edaf 4# Generated by GNU Autoconf 2.69 for bash 5.1-release.
f73dda09
JA
5#
6# Report bugs to <bug-bash@gnu.org>.
7#
ac50fbac
CR
8#
9# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
10#
11#
f73dda09
JA
12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
ac50fbac
CR
14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
ccc6cda3 17
3185942a
JA
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
ac50fbac 20if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
b80f6443
JA
21 emulate sh
22 NULLCMD=:
3185942a 23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
0628567a
JA
24 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
3185942a
JA
26 setopt NO_GLOB_SUBST
27else
ac50fbac
CR
28 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
3185942a 33esac
3185942a
JA
34fi
35
36
3185942a
JA
37as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
ac50fbac
CR
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
3185942a
JA
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
ac50fbac 61 case $arg in #(
3185942a
JA
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
74
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
77 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
b80f6443
JA
82fi
83
0628567a 84
3185942a
JA
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
90IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
ac50fbac
CR
93as_myself=
94case $0 in #((
3185942a
JA
95 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
ac50fbac
CR
101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
3185942a
JA
103IFS=$as_save_IFS
104
105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ac50fbac 114 exit 1
3185942a
JA
115fi
116
ac50fbac
CR
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
3185942a 124done
0628567a
JA
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
3185942a
JA
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
0628567a 134
ac50fbac
CR
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-bash@gnu.org
271$0: about your system, including any error possibly output
272$0: before this message. Then install a modern shell, or
273$0: manually run the script under such a shell if you do
274$0: have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
360
361
362} # as_fn_mkdir_p
363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
411# script with STATUS, using 1 if that was 0.
412as_fn_error ()
413{
414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
418 fi
419 $as_echo "$as_me: error: $2" >&2
420 as_fn_exit $as_status
421} # as_fn_error
422
3185942a
JA
423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
0628567a
JA
425 as_expr=expr
426else
427 as_expr=false
428fi
429
3185942a 430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
0628567a
JA
431 as_basename=basename
432else
433 as_basename=false
434fi
b80f6443 435
ac50fbac
CR
436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
b80f6443 441
3185942a 442as_me=`$as_basename -- "$0" ||
b80f6443
JA
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
3185942a
JA
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
446$as_echo X/"$0" |
447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
b80f6443 460
ac50fbac
CR
461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
0628567a 467
ccc6cda3 468
ac50fbac
CR
469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
478 sed '
479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
483 N
484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
486 t loop
487 s/-\n.*//
488 ' >$as_me.lineno &&
489 chmod +x "$as_me.lineno" ||
490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
ccc6cda3 491
ac50fbac
CR
492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
500 # Exit status is that of the last command.
501 exit
3185942a 502}
ccc6cda3 503
ac50fbac
CR
504ECHO_C= ECHO_N= ECHO_T=
505case `echo -n x` in #(((((
506-n*)
507 case `echo 'xy\c'` in
508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
512 esac;;
513*)
514 ECHO_N='-n';;
515esac
3185942a 516
ac50fbac
CR
517rm -f conf$$ conf$$.exe conf$$.file
518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
3185942a 520else
ac50fbac
CR
521 rm -f conf$$.dir
522 mkdir conf$$.dir 2>/dev/null
3185942a 523fi
ac50fbac
CR
524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
530 # In both cases, we have to default to `cp -pR'.
531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
532 as_ln_s='cp -pR'
533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
536 as_ln_s='cp -pR'
537 fi
538else
539 as_ln_s='cp -pR'
3185942a 540fi
ac50fbac
CR
541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
3185942a 543
ac50fbac
CR
544if mkdir -p . 2>/dev/null; then
545 as_mkdir_p='mkdir -p "$as_dir"'
3185942a 546else
ac50fbac
CR
547 test -d ./-p && rmdir ./-p
548 as_mkdir_p=false
3185942a
JA
549fi
550
ac50fbac
CR
551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
3185942a 553
ac50fbac
CR
554# Sed expression to map a string onto a valid CPP name.
555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
3185942a 556
ac50fbac
CR
557# Sed expression to map a string onto a valid variable name.
558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
3185942a 559
3185942a 560
ac50fbac
CR
561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
3185942a 563
ac50fbac
CR
564# Name of the host.
565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
3185942a 568
ac50fbac
CR
569#
570# Initializations.
571#
572ac_default_prefix=/usr/local
573ac_clean_files=
574ac_config_libobj_dir=.
575LIBOBJS=
576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
f73dda09 580
b80f6443
JA
581# Identity of this package.
582PACKAGE_NAME='bash'
583PACKAGE_TARNAME='bash'
8868edaf
CR
584PACKAGE_VERSION='5.1-release'
585PACKAGE_STRING='bash 5.1-release'
b80f6443 586PACKAGE_BUGREPORT='bug-bash@gnu.org'
ac50fbac 587PACKAGE_URL=''
b80f6443 588
f73dda09
JA
589ac_unique_file="shell.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
3185942a 593#ifdef HAVE_SYS_TYPES_H
f73dda09
JA
594# include <sys/types.h>
595#endif
3185942a 596#ifdef HAVE_SYS_STAT_H
f73dda09
JA
597# include <sys/stat.h>
598#endif
3185942a 599#ifdef STDC_HEADERS
f73dda09
JA
600# include <stdlib.h>
601# include <stddef.h>
602#else
3185942a 603# ifdef HAVE_STDLIB_H
f73dda09
JA
604# include <stdlib.h>
605# endif
606#endif
3185942a
JA
607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
f73dda09
JA
609# include <memory.h>
610# endif
611# include <string.h>
612#endif
3185942a 613#ifdef HAVE_STRINGS_H
f73dda09
JA
614# include <strings.h>
615#endif
3185942a 616#ifdef HAVE_INTTYPES_H
f73dda09 617# include <inttypes.h>
f73dda09 618#endif
3185942a
JA
619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
f73dda09
JA
623# include <unistd.h>
624#endif"
ccc6cda3 625
8868edaf 626gt_needs=
3185942a 627ac_header_list=
8868edaf 628gl_use_threads_default=
3185942a
JA
629ac_func_list=
630ac_subst_vars='LTLIBOBJS
631LOCAL_DEFS
632LOCAL_LDFLAGS
633LOCAL_CFLAGS
634LOCAL_LIBS
635MALLOC_DEBUG
636DEBUG
637RELSTATUS
638BASHVERS
a0c0a00f
CR
639headersdir
640loadablesdir
3185942a
JA
641BUILD_DIR
642incdir
643PROFILE_FLAGS
644SHOBJ_STATUS
645SHOBJ_LIBS
646SHOBJ_XLDFLAGS
647SHOBJ_LDFLAGS
648SHOBJ_LD
649SHOBJ_CFLAGS
650SHOBJ_CC
651JOBS_O
652TERMCAP_DEP
653TERMCAP_LIB
654SIGLIST_O
ac50fbac
CR
655PTHREAD_H_DEFINES_STRUCT_TIMESPEC
656SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
657TIME_H_DEFINES_STRUCT_TIMESPEC
3185942a
JA
658LIBINTL_H
659INTL_INC
660INTL_DEP
661LIBOBJS
662POSUB
663LTLIBINTL
664LIBINTL
665INTLLIBS
666INTL_LIBTOOL_SUFFIX_PREFIX
667INTLOBJS
668GENCAT
669INSTOBJEXT
670DATADIRNAME
671CATOBJEXT
672USE_INCLUDED_LIBINTL
673BUILD_INCLUDED_LIBINTL
8868edaf
CR
674WINDRES
675WOE32
676WOE32DLL
677HAVE_NAMELESS_LOCALES
678HAVE_WPRINTF
679HAVE_NEWLOCALE
680HAVE_SNPRINTF
681HAVE_ASPRINTF
682HAVE_POSIX_PRINTF
683INTL_DEFAULT_VERBOSITY
684ARFLAGS
685INTL_MACOSX_LIBS
686GLIBC21
687GNULIB_OVERRIDES_WINT_T
3185942a
JA
688INTLBISON
689LTLIBICONV
690LIBICONV
8868edaf
CR
691LTLIBMULTITHREAD
692LIBMULTITHREAD
693LTLIBTHREAD
694LIBTHREAD
695LIBPTH_PREFIX
696LTLIBPTH
697LIBPTH
698PRI_MACROS_BROKEN
3185942a 699ALLOCA
8868edaf
CR
700HAVE_VISIBILITY
701CFLAG_VISIBILITY
702GLIBC2
703XGETTEXT_EXTRA_OPTIONS
3185942a 704MSGMERGE
8868edaf 705XGETTEXT_015
3185942a 706XGETTEXT
8868edaf
CR
707GMSGFMT_015
708MSGFMT_015
3185942a
JA
709GMSGFMT
710MSGFMT
8868edaf 711GETTEXT_MACRO_VERSION
3185942a 712USE_NLS
8868edaf
CR
713SED
714MKDIR_P
3185942a
JA
715SIZE
716MAKE_SHELL
717SET_MAKE
718YFLAGS
719YACC
720RANLIB
721AR
722INSTALL_DATA
723INSTALL_SCRIPT
724INSTALL_PROGRAM
725TILDE_LIB
726HIST_LIBDIR
727HISTORY_DEP
728HISTORY_LIB
729RL_INCLUDE
730RL_INCLUDEDIR
731RL_LIBDIR
732READLINE_DEP
733READLINE_LIB
734RL_MINOR
735RL_MAJOR
736RL_VERSION
ac50fbac 737LIBS_FOR_BUILD
3185942a 738STATIC_LD
3185942a
JA
739SIGNAMES_O
740SIGNAMES_H
741CROSS_COMPILE
742EGREP
743GREP
744CPP
745OBJEXT
746EXEEXT
747ac_ct_CC
748CPPFLAGS
749LDFLAGS
750CFLAGS
751CC
752HELPSTRINGS
ac50fbac 753HELPFILES_TARGET
3185942a
JA
754HELPINSTALL
755HELPDIRDEFINE
756HELPDIR
757MALLOC_DEP
758MALLOC_LDFLAGS
759MALLOC_LIBRARY
760MALLOC_LIB
761MALLOC_SRC
762MALLOC_TARGET
3185942a 763TESTSCRIPT
ac50fbac
CR
764CPPFLAGS_FOR_BUILD
765LDFLAGS_FOR_BUILD
766CFLAGS_FOR_BUILD
767CC_FOR_BUILD
3185942a 768DEBUGGER_START_FILE
3185942a
JA
769host_os
770host_vendor
771host_cpu
772host
773build_os
774build_vendor
775build_cpu
776build
777target_alias
778host_alias
779build_alias
780LIBS
781ECHO_T
782ECHO_N
783ECHO_C
784DEFS
785mandir
786localedir
787libdir
788psdir
789pdfdir
790dvidir
791htmldir
792infodir
793docdir
794oldincludedir
795includedir
796localstatedir
797sharedstatedir
798sysconfdir
799datadir
800datarootdir
801libexecdir
802sbindir
803bindir
804program_transform_name
805prefix
806exec_prefix
ac50fbac 807PACKAGE_URL
3185942a
JA
808PACKAGE_BUGREPORT
809PACKAGE_STRING
810PACKAGE_VERSION
811PACKAGE_TARNAME
812PACKAGE_NAME
813PATH_SEPARATOR
814SHELL'
0628567a 815ac_subst_files=''
3185942a
JA
816ac_user_opts='
817enable_option_checking
3185942a
JA
818with_afs
819with_bash_malloc
820with_curses
821with_gnu_malloc
822with_installed_readline
3185942a
JA
823enable_minimal_config
824enable_alias
825enable_arith_for_command
826enable_array_variables
827enable_bang_history
828enable_brace_expansion
829enable_casemod_attributes
830enable_casemod_expansions
831enable_command_timing
832enable_cond_command
833enable_cond_regexp
834enable_coprocesses
835enable_debugger
d233b485 836enable_dev_fd_stat_broken
ac50fbac 837enable_direxpand_default
3185942a
JA
838enable_directory_stack
839enable_disabled_builtins
840enable_dparen_arithmetic
841enable_extended_glob
0001803f 842enable_extended_glob_default
a0c0a00f 843enable_function_import
ac50fbac 844enable_glob_asciiranges_default
3185942a
JA
845enable_help_builtin
846enable_history
847enable_job_control
848enable_multibyte
849enable_net_redirections
850enable_process_substitution
851enable_progcomp
852enable_prompt_string_decoding
853enable_readline
854enable_restricted
855enable_select
856enable_separate_helpfiles
857enable_single_help_strings
858enable_strict_posix_default
859enable_usg_echo_default
860enable_xpg_echo_default
861enable_mem_scramble
862enable_profiling
863enable_static_link
864enable_largefile
865enable_nls
8868edaf 866enable_threads
3185942a
JA
867with_gnu_ld
868enable_rpath
8868edaf 869with_libpth_prefix
3185942a
JA
870with_libiconv_prefix
871with_included_gettext
872with_libintl_prefix
873'
874 ac_precious_vars='build_alias
875host_alias
876target_alias
877DEBUGGER_START_FILE
ac50fbac
CR
878CC_FOR_BUILD
879CFLAGS_FOR_BUILD
880LDFLAGS_FOR_BUILD
881CPPFLAGS_FOR_BUILD
3185942a
JA
882CC
883CFLAGS
884LDFLAGS
885LIBS
886CPPFLAGS
887CPP
888YACC
889YFLAGS'
890
b80f6443 891
ccc6cda3 892# Initialize some variables set by options.
f73dda09
JA
893ac_init_help=
894ac_init_version=false
3185942a
JA
895ac_unrecognized_opts=
896ac_unrecognized_sep=
ccc6cda3
JA
897# The variables have the same names as the options, with
898# dashes changed to underlines.
f73dda09 899cache_file=/dev/null
ccc6cda3 900exec_prefix=NONE
ccc6cda3 901no_create=
ccc6cda3
JA
902no_recursion=
903prefix=NONE
904program_prefix=NONE
905program_suffix=NONE
906program_transform_name=s,x,x,
907silent=
908site=
909srcdir=
ccc6cda3
JA
910verbose=
911x_includes=NONE
912x_libraries=NONE
f73dda09
JA
913
914# Installation directory options.
915# These are left unexpanded so users can "make install exec_prefix=/foo"
916# and all the variables that are supposed to be based on exec_prefix
917# by default will actually change.
918# Use braces instead of parens because sh, perl, etc. also accept them.
3185942a 919# (The list follows the same order as the GNU Coding Standards.)
ccc6cda3
JA
920bindir='${exec_prefix}/bin'
921sbindir='${exec_prefix}/sbin'
922libexecdir='${exec_prefix}/libexec'
3185942a
JA
923datarootdir='${prefix}/share'
924datadir='${datarootdir}'
ccc6cda3
JA
925sysconfdir='${prefix}/etc'
926sharedstatedir='${prefix}/com'
927localstatedir='${prefix}/var'
ccc6cda3
JA
928includedir='${prefix}/include'
929oldincludedir='/usr/include'
3185942a
JA
930docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
931infodir='${datarootdir}/info'
932htmldir='${docdir}'
933dvidir='${docdir}'
934pdfdir='${docdir}'
935psdir='${docdir}'
936libdir='${exec_prefix}/lib'
937localedir='${datarootdir}/locale'
938mandir='${datarootdir}/man'
ccc6cda3 939
ccc6cda3 940ac_prev=
3185942a 941ac_dashdash=
ccc6cda3
JA
942for ac_option
943do
ccc6cda3
JA
944 # If the previous option needs an argument, assign it.
945 if test -n "$ac_prev"; then
3185942a 946 eval $ac_prev=\$ac_option
ccc6cda3
JA
947 ac_prev=
948 continue
949 fi
950
3185942a 951 case $ac_option in
ac50fbac
CR
952 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
953 *=) ac_optarg= ;;
954 *) ac_optarg=yes ;;
3185942a 955 esac
ccc6cda3
JA
956
957 # Accept the important Cygnus configure options, so we can diagnose typos.
958
3185942a
JA
959 case $ac_dashdash$ac_option in
960 --)
961 ac_dashdash=yes ;;
ccc6cda3
JA
962
963 -bindir | --bindir | --bindi | --bind | --bin | --bi)
964 ac_prev=bindir ;;
965 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
f73dda09 966 bindir=$ac_optarg ;;
ccc6cda3
JA
967
968 -build | --build | --buil | --bui | --bu)
f73dda09 969 ac_prev=build_alias ;;
ccc6cda3 970 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
f73dda09 971 build_alias=$ac_optarg ;;
ccc6cda3
JA
972
973 -cache-file | --cache-file | --cache-fil | --cache-fi \
974 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
975 ac_prev=cache_file ;;
976 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
977 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
f73dda09
JA
978 cache_file=$ac_optarg ;;
979
980 --config-cache | -C)
981 cache_file=config.cache ;;
ccc6cda3 982
3185942a 983 -datadir | --datadir | --datadi | --datad)
ccc6cda3 984 ac_prev=datadir ;;
3185942a 985 -datadir=* | --datadir=* | --datadi=* | --datad=*)
f73dda09 986 datadir=$ac_optarg ;;
ccc6cda3 987
3185942a
JA
988 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
989 | --dataroo | --dataro | --datar)
990 ac_prev=datarootdir ;;
991 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
992 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
993 datarootdir=$ac_optarg ;;
994
ccc6cda3 995 -disable-* | --disable-*)
3185942a 996 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ccc6cda3 997 # Reject names that are not valid shell variable names.
3185942a 998 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 999 as_fn_error $? "invalid feature name: $ac_useropt"
3185942a
JA
1000 ac_useropt_orig=$ac_useropt
1001 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1002 case $ac_user_opts in
1003 *"
1004"enable_$ac_useropt"
1005"*) ;;
1006 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1007 ac_unrecognized_sep=', ';;
1008 esac
1009 eval enable_$ac_useropt=no ;;
1010
1011 -docdir | --docdir | --docdi | --doc | --do)
1012 ac_prev=docdir ;;
1013 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1014 docdir=$ac_optarg ;;
1015
1016 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1017 ac_prev=dvidir ;;
1018 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1019 dvidir=$ac_optarg ;;
ccc6cda3
JA
1020
1021 -enable-* | --enable-*)
3185942a 1022 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ccc6cda3 1023 # Reject names that are not valid shell variable names.
3185942a 1024 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 1025 as_fn_error $? "invalid feature name: $ac_useropt"
3185942a
JA
1026 ac_useropt_orig=$ac_useropt
1027 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1028 case $ac_user_opts in
1029 *"
1030"enable_$ac_useropt"
1031"*) ;;
1032 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1033 ac_unrecognized_sep=', ';;
ccc6cda3 1034 esac
3185942a 1035 eval enable_$ac_useropt=\$ac_optarg ;;
ccc6cda3
JA
1036
1037 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1038 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1039 | --exec | --exe | --ex)
1040 ac_prev=exec_prefix ;;
1041 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1042 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1043 | --exec=* | --exe=* | --ex=*)
f73dda09 1044 exec_prefix=$ac_optarg ;;
ccc6cda3
JA
1045
1046 -gas | --gas | --ga | --g)
1047 # Obsolete; use --with-gas.
1048 with_gas=yes ;;
1049
f73dda09
JA
1050 -help | --help | --hel | --he | -h)
1051 ac_init_help=long ;;
1052 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1053 ac_init_help=recursive ;;
1054 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1055 ac_init_help=short ;;
ccc6cda3
JA
1056
1057 -host | --host | --hos | --ho)
f73dda09 1058 ac_prev=host_alias ;;
ccc6cda3 1059 -host=* | --host=* | --hos=* | --ho=*)
f73dda09 1060 host_alias=$ac_optarg ;;
ccc6cda3 1061
3185942a
JA
1062 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1063 ac_prev=htmldir ;;
1064 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1065 | --ht=*)
1066 htmldir=$ac_optarg ;;
1067
ccc6cda3
JA
1068 -includedir | --includedir | --includedi | --included | --include \
1069 | --includ | --inclu | --incl | --inc)
1070 ac_prev=includedir ;;
1071 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1072 | --includ=* | --inclu=* | --incl=* | --inc=*)
f73dda09 1073 includedir=$ac_optarg ;;
ccc6cda3
JA
1074
1075 -infodir | --infodir | --infodi | --infod | --info | --inf)
1076 ac_prev=infodir ;;
1077 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
f73dda09 1078 infodir=$ac_optarg ;;
ccc6cda3
JA
1079
1080 -libdir | --libdir | --libdi | --libd)
1081 ac_prev=libdir ;;
1082 -libdir=* | --libdir=* | --libdi=* | --libd=*)
f73dda09 1083 libdir=$ac_optarg ;;
ccc6cda3
JA
1084
1085 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1086 | --libexe | --libex | --libe)
1087 ac_prev=libexecdir ;;
1088 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1089 | --libexe=* | --libex=* | --libe=*)
f73dda09 1090 libexecdir=$ac_optarg ;;
ccc6cda3 1091
3185942a
JA
1092 -localedir | --localedir | --localedi | --localed | --locale)
1093 ac_prev=localedir ;;
1094 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1095 localedir=$ac_optarg ;;
1096
ccc6cda3 1097 -localstatedir | --localstatedir | --localstatedi | --localstated \
3185942a 1098 | --localstate | --localstat | --localsta | --localst | --locals)
ccc6cda3
JA
1099 ac_prev=localstatedir ;;
1100 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
3185942a 1101 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
f73dda09 1102 localstatedir=$ac_optarg ;;
ccc6cda3
JA
1103
1104 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1105 ac_prev=mandir ;;
1106 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
f73dda09 1107 mandir=$ac_optarg ;;
ccc6cda3
JA
1108
1109 -nfp | --nfp | --nf)
1110 # Obsolete; use --without-fp.
1111 with_fp=no ;;
1112
1113 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
b80f6443 1114 | --no-cr | --no-c | -n)
ccc6cda3
JA
1115 no_create=yes ;;
1116
1117 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1118 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1119 no_recursion=yes ;;
1120
1121 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1122 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1123 | --oldin | --oldi | --old | --ol | --o)
1124 ac_prev=oldincludedir ;;
1125 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1126 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1127 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
f73dda09 1128 oldincludedir=$ac_optarg ;;
ccc6cda3
JA
1129
1130 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1131 ac_prev=prefix ;;
1132 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
f73dda09 1133 prefix=$ac_optarg ;;
ccc6cda3
JA
1134
1135 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1136 | --program-pre | --program-pr | --program-p)
1137 ac_prev=program_prefix ;;
1138 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1139 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
f73dda09 1140 program_prefix=$ac_optarg ;;
ccc6cda3
JA
1141
1142 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1143 | --program-suf | --program-su | --program-s)
1144 ac_prev=program_suffix ;;
1145 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1146 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
f73dda09 1147 program_suffix=$ac_optarg ;;
ccc6cda3
JA
1148
1149 -program-transform-name | --program-transform-name \
1150 | --program-transform-nam | --program-transform-na \
1151 | --program-transform-n | --program-transform- \
1152 | --program-transform | --program-transfor \
1153 | --program-transfo | --program-transf \
1154 | --program-trans | --program-tran \
1155 | --progr-tra | --program-tr | --program-t)
1156 ac_prev=program_transform_name ;;
1157 -program-transform-name=* | --program-transform-name=* \
1158 | --program-transform-nam=* | --program-transform-na=* \
1159 | --program-transform-n=* | --program-transform-=* \
1160 | --program-transform=* | --program-transfor=* \
1161 | --program-transfo=* | --program-transf=* \
1162 | --program-trans=* | --program-tran=* \
1163 | --progr-tra=* | --program-tr=* | --program-t=*)
f73dda09 1164 program_transform_name=$ac_optarg ;;
ccc6cda3 1165
3185942a
JA
1166 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1167 ac_prev=pdfdir ;;
1168 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1169 pdfdir=$ac_optarg ;;
1170
1171 -psdir | --psdir | --psdi | --psd | --ps)
1172 ac_prev=psdir ;;
1173 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1174 psdir=$ac_optarg ;;
1175
ccc6cda3
JA
1176 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1177 | -silent | --silent | --silen | --sile | --sil)
1178 silent=yes ;;
1179
1180 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1181 ac_prev=sbindir ;;
1182 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1183 | --sbi=* | --sb=*)
f73dda09 1184 sbindir=$ac_optarg ;;
ccc6cda3
JA
1185
1186 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1187 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1188 | --sharedst | --shareds | --shared | --share | --shar \
1189 | --sha | --sh)
1190 ac_prev=sharedstatedir ;;
1191 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1192 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1193 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1194 | --sha=* | --sh=*)
f73dda09 1195 sharedstatedir=$ac_optarg ;;
ccc6cda3
JA
1196
1197 -site | --site | --sit)
1198 ac_prev=site ;;
1199 -site=* | --site=* | --sit=*)
f73dda09 1200 site=$ac_optarg ;;
ccc6cda3
JA
1201
1202 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1203 ac_prev=srcdir ;;
1204 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
f73dda09 1205 srcdir=$ac_optarg ;;
ccc6cda3
JA
1206
1207 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1208 | --syscon | --sysco | --sysc | --sys | --sy)
1209 ac_prev=sysconfdir ;;
1210 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1211 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
f73dda09 1212 sysconfdir=$ac_optarg ;;
ccc6cda3
JA
1213
1214 -target | --target | --targe | --targ | --tar | --ta | --t)
f73dda09 1215 ac_prev=target_alias ;;
ccc6cda3 1216 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
f73dda09 1217 target_alias=$ac_optarg ;;
ccc6cda3
JA
1218
1219 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1220 verbose=yes ;;
1221
f73dda09
JA
1222 -version | --version | --versio | --versi | --vers | -V)
1223 ac_init_version=: ;;
ccc6cda3
JA
1224
1225 -with-* | --with-*)
3185942a 1226 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ccc6cda3 1227 # Reject names that are not valid shell variable names.
3185942a 1228 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 1229 as_fn_error $? "invalid package name: $ac_useropt"
3185942a
JA
1230 ac_useropt_orig=$ac_useropt
1231 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1232 case $ac_user_opts in
1233 *"
1234"with_$ac_useropt"
1235"*) ;;
1236 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1237 ac_unrecognized_sep=', ';;
ccc6cda3 1238 esac
3185942a 1239 eval with_$ac_useropt=\$ac_optarg ;;
ccc6cda3
JA
1240
1241 -without-* | --without-*)
3185942a 1242 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ccc6cda3 1243 # Reject names that are not valid shell variable names.
3185942a 1244 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 1245 as_fn_error $? "invalid package name: $ac_useropt"
3185942a
JA
1246 ac_useropt_orig=$ac_useropt
1247 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1248 case $ac_user_opts in
1249 *"
1250"with_$ac_useropt"
1251"*) ;;
1252 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1253 ac_unrecognized_sep=', ';;
1254 esac
1255 eval with_$ac_useropt=no ;;
ccc6cda3
JA
1256
1257 --x)
1258 # Obsolete; use --with-x.
1259 with_x=yes ;;
1260
1261 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1262 | --x-incl | --x-inc | --x-in | --x-i)
1263 ac_prev=x_includes ;;
1264 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1265 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
f73dda09 1266 x_includes=$ac_optarg ;;
ccc6cda3
JA
1267
1268 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1269 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1270 ac_prev=x_libraries ;;
1271 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1272 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
f73dda09 1273 x_libraries=$ac_optarg ;;
ccc6cda3 1274
ac50fbac
CR
1275 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1276Try \`$0 --help' for more information"
ccc6cda3
JA
1277 ;;
1278
f73dda09
JA
1279 *=*)
1280 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1281 # Reject names that are not valid shell variable names.
ac50fbac
CR
1282 case $ac_envvar in #(
1283 '' | [0-9]* | *[!_$as_cr_alnum]* )
1284 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1285 esac
3185942a 1286 eval $ac_envvar=\$ac_optarg
f73dda09
JA
1287 export $ac_envvar ;;
1288
ccc6cda3 1289 *)
f73dda09 1290 # FIXME: should be removed in autoconf 3.0.
3185942a 1291 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
f73dda09 1292 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
3185942a 1293 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
ac50fbac 1294 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
ccc6cda3
JA
1295 ;;
1296
1297 esac
1298done
1299
1300if test -n "$ac_prev"; then
f73dda09 1301 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
ac50fbac 1302 as_fn_error $? "missing argument to $ac_option"
ccc6cda3 1303fi
ccc6cda3 1304
3185942a
JA
1305if test -n "$ac_unrecognized_opts"; then
1306 case $enable_option_checking in
1307 no) ;;
ac50fbac 1308 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
3185942a 1309 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
f73dda09 1310 esac
3185942a 1311fi
ccc6cda3 1312
3185942a
JA
1313# Check all directory arguments for consistency.
1314for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1315 datadir sysconfdir sharedstatedir localstatedir includedir \
1316 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1317 libdir localedir mandir
ccc6cda3 1318do
3185942a
JA
1319 eval ac_val=\$$ac_var
1320 # Remove trailing slashes.
f73dda09 1321 case $ac_val in
3185942a
JA
1322 */ )
1323 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1324 eval $ac_var=\$ac_val;;
ccc6cda3 1325 esac
3185942a
JA
1326 # Be sure to have absolute directory names.
1327 case $ac_val in
1328 [\\/$]* | ?:[\\/]* ) continue;;
1329 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1330 esac
ac50fbac 1331 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
ccc6cda3
JA
1332done
1333
f73dda09
JA
1334# There might be people who depend on the old broken behavior: `$host'
1335# used to hold the argument of --host etc.
b80f6443 1336# FIXME: To remove some day.
f73dda09
JA
1337build=$build_alias
1338host=$host_alias
1339target=$target_alias
1340
b80f6443 1341# FIXME: To remove some day.
f73dda09
JA
1342if test "x$host_alias" != x; then
1343 if test "x$build_alias" = x; then
1344 cross_compiling=maybe
f73dda09
JA
1345 elif test "x$build_alias" != "x$host_alias"; then
1346 cross_compiling=yes
1347 fi
1348fi
ccc6cda3 1349
f73dda09
JA
1350ac_tool_prefix=
1351test -n "$host_alias" && ac_tool_prefix=$host_alias-
ccc6cda3 1352
f73dda09 1353test "$silent" = yes && exec 6>/dev/null
ccc6cda3 1354
b80f6443 1355
3185942a
JA
1356ac_pwd=`pwd` && test -n "$ac_pwd" &&
1357ac_ls_di=`ls -di .` &&
1358ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
ac50fbac 1359 as_fn_error $? "working directory cannot be determined"
3185942a 1360test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
ac50fbac 1361 as_fn_error $? "pwd does not report name of working directory"
3185942a
JA
1362
1363
ccc6cda3
JA
1364# Find the source files, if location was not specified.
1365if test -z "$srcdir"; then
1366 ac_srcdir_defaulted=yes
3185942a
JA
1367 # Try the directory containing this script, then the parent directory.
1368 ac_confdir=`$as_dirname -- "$as_myself" ||
1369$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1370 X"$as_myself" : 'X\(//\)[^/]' \| \
1371 X"$as_myself" : 'X\(//\)$' \| \
1372 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1373$as_echo X"$as_myself" |
1374 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1375 s//\1/
1376 q
1377 }
1378 /^X\(\/\/\)[^/].*/{
1379 s//\1/
1380 q
1381 }
1382 /^X\(\/\/\)$/{
1383 s//\1/
1384 q
1385 }
1386 /^X\(\/\).*/{
1387 s//\1/
1388 q
1389 }
1390 s/.*/./; q'`
ccc6cda3 1391 srcdir=$ac_confdir
3185942a 1392 if test ! -r "$srcdir/$ac_unique_file"; then
ccc6cda3
JA
1393 srcdir=..
1394 fi
1395else
1396 ac_srcdir_defaulted=no
1397fi
3185942a
JA
1398if test ! -r "$srcdir/$ac_unique_file"; then
1399 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
ac50fbac 1400 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
ccc6cda3 1401fi
3185942a
JA
1402ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1403ac_abs_confdir=`(
ac50fbac 1404 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
3185942a
JA
1405 pwd)`
1406# When building in place, set srcdir=.
1407if test "$ac_abs_confdir" = "$ac_pwd"; then
1408 srcdir=.
1409fi
1410# Remove unnecessary trailing slashes from srcdir.
1411# Double slashes in file names in object file debugging info
1412# mess up M-x gdb in Emacs.
1413case $srcdir in
1414*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1415esac
1416for ac_var in $ac_precious_vars; do
1417 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1418 eval ac_env_${ac_var}_value=\$${ac_var}
1419 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1420 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1421done
ccc6cda3 1422
f73dda09
JA
1423#
1424# Report the --help message.
1425#
1426if test "$ac_init_help" = "long"; then
1427 # Omit some internal or obsolete options to make the list less imposing.
1428 # This message is too long to be a string in the A/UX 3.1 sh.
b80f6443 1429 cat <<_ACEOF
8868edaf 1430\`configure' configures bash 5.1-release to adapt to many kinds of systems.
ccc6cda3 1431
f73dda09 1432Usage: $0 [OPTION]... [VAR=VALUE]...
ccc6cda3 1433
f73dda09
JA
1434To assign environment variables (e.g., CC, CFLAGS...), specify them as
1435VAR=VALUE. See below for descriptions of some of the useful variables.
1436
1437Defaults for the options are specified in brackets.
ccc6cda3 1438
f73dda09
JA
1439Configuration:
1440 -h, --help display this help and exit
1441 --help=short display options specific to this package
1442 --help=recursive display the short help of all the included packages
1443 -V, --version display version information and exit
ac50fbac 1444 -q, --quiet, --silent do not print \`checking ...' messages
f73dda09
JA
1445 --cache-file=FILE cache test results in FILE [disabled]
1446 -C, --config-cache alias for \`--cache-file=config.cache'
1447 -n, --no-create do not create output files
1448 --srcdir=DIR find the sources in DIR [configure dir or \`..']
ccc6cda3 1449
f73dda09
JA
1450Installation directories:
1451 --prefix=PREFIX install architecture-independent files in PREFIX
3185942a 1452 [$ac_default_prefix]
f73dda09 1453 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
3185942a 1454 [PREFIX]
ccc6cda3 1455
f73dda09
JA
1456By default, \`make install' will install all the files in
1457\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1458an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1459for instance \`--prefix=\$HOME'.
ccc6cda3 1460
f73dda09 1461For better control, use the options below.
ccc6cda3 1462
f73dda09 1463Fine tuning of the installation directories:
3185942a
JA
1464 --bindir=DIR user executables [EPREFIX/bin]
1465 --sbindir=DIR system admin executables [EPREFIX/sbin]
1466 --libexecdir=DIR program executables [EPREFIX/libexec]
1467 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1468 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1469 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1470 --libdir=DIR object code libraries [EPREFIX/lib]
1471 --includedir=DIR C header files [PREFIX/include]
1472 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1473 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1474 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1475 --infodir=DIR info documentation [DATAROOTDIR/info]
1476 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1477 --mandir=DIR man documentation [DATAROOTDIR/man]
1478 --docdir=DIR documentation root [DATAROOTDIR/doc/bash]
1479 --htmldir=DIR html documentation [DOCDIR]
1480 --dvidir=DIR dvi documentation [DOCDIR]
1481 --pdfdir=DIR pdf documentation [DOCDIR]
1482 --psdir=DIR ps documentation [DOCDIR]
b80f6443 1483_ACEOF
f73dda09 1484
b80f6443 1485 cat <<\_ACEOF
f73dda09
JA
1486
1487System types:
1488 --build=BUILD configure for building on BUILD [guessed]
b80f6443
JA
1489 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1490_ACEOF
ccc6cda3 1491fi
ccc6cda3 1492
f73dda09
JA
1493if test -n "$ac_init_help"; then
1494 case $ac_init_help in
8868edaf 1495 short | recursive ) echo "Configuration of bash 5.1-release:";;
f73dda09 1496 esac
b80f6443 1497 cat <<\_ACEOF
ccc6cda3 1498
f73dda09 1499Optional Features:
3185942a 1500 --disable-option-checking ignore unrecognized --enable/--with options
f73dda09
JA
1501 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1502 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
7117c2d2
JA
1503 --enable-minimal-config a minimal sh-like configuration
1504 --enable-alias enable shell aliases
1505 --enable-arith-for-command
1506 enable arithmetic for command
1507 --enable-array-variables
1508 include shell array variables
1509 --enable-bang-history turn on csh-style history substitution
1510 --enable-brace-expansion
1511 include brace expansion
3185942a
JA
1512 --enable-casemod-attributes
1513 include case-modifying variable attributes
1514 --enable-casemod-expansions
1515 include case-modifying word expansions
7117c2d2
JA
1516 --enable-command-timing enable the time reserved word and command timing
1517 --enable-cond-command enable the conditional command
3185942a 1518 --enable-cond-regexp enable extended regular expression matching in
b80f6443 1519 conditional commands
3185942a
JA
1520 --enable-coprocesses enable coprocess support and the coproc reserved
1521 word
b80f6443 1522 --enable-debugger enable support for bash debugger
d233b485
CR
1523 --enable-dev-fd-stat-broken
1524 enable this option if stat on /dev/fd/N and fstat on
1525 file descriptor N don't return the same results
ac50fbac
CR
1526 --enable-direxpand-default
1527 enable the direxpand shell option by default
7117c2d2
JA
1528 --enable-directory-stack
1529 enable builtins pushd/popd/dirs
1530 --enable-disabled-builtins
1531 allow disabled builtins to still be invoked
1532 --enable-dparen-arithmetic
1533 include ((...)) command
1534 --enable-extended-glob include ksh-style extended pattern matching
0001803f
CR
1535 --enable-extended-glob-default
1536 force extended pattern matching to be enabled by
1537 default
a0c0a00f
CR
1538 --enable-function-import
1539 allow bash to import exported function definitions
1540 by default
ac50fbac
CR
1541 --enable-glob-asciiranges-default
1542 force bracket range expressions in pattern matching
1543 to use the C locale by default
7117c2d2
JA
1544 --enable-help-builtin include the help builtin
1545 --enable-history turn on command history
1546 --enable-job-control enable job control features
b80f6443 1547 --enable-multibyte enable multibyte characters if OS supports them
7117c2d2
JA
1548 --enable-net-redirections
1549 enable /dev/tcp/host/port redirection
1550 --enable-process-substitution
1551 enable process substitution
1552 --enable-progcomp enable programmable completion and the complete
1553 builtin
1554 --enable-prompt-string-decoding
1555 turn on escape character decoding in prompts
1556 --enable-readline turn on command line editing
1557 --enable-restricted enable a restricted shell
1558 --enable-select include select command
1559 --enable-separate-helpfiles
1560 use external files for help builtin documentation
95732b49
JA
1561 --enable-single-help-strings
1562 store help documentation as a single string to ease
1563 translation
1564 --enable-strict-posix-default
1565 configure bash to be posix-conformant by default
7117c2d2
JA
1566 --enable-usg-echo-default
1567 a synonym for --enable-xpg-echo-default
1568 --enable-xpg-echo-default
1569 make the echo builtin expand escape sequences by
1570 default
1571 --enable-mem-scramble scramble memory on calls to malloc and free
1572 --enable-profiling allow profiling with gprof
1573 --enable-static-link link bash statically, for use as a root shell
f73dda09 1574 --disable-largefile omit support for large files
b80f6443 1575 --disable-nls do not use Native Language Support
8868edaf
CR
1576 --enable-threads={posix|solaris|pth|windows}
1577 specify multithreading API
1578 --disable-threads build without multithread safety
b80f6443 1579 --disable-rpath do not hardcode runtime library paths
f73dda09
JA
1580
1581Optional Packages:
1582 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1583 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
7117c2d2
JA
1584 --with-afs if you are running AFS
1585 --with-bash-malloc use the Bash version of malloc
1586 --with-curses use the curses library instead of the termcap
1587 library
1588 --with-gnu-malloc synonym for --with-bash-malloc
1589 --with-installed-readline
1590 use a version of the readline library that is
1591 already installed
8868edaf
CR
1592 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1593 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
1594 --without-libpth-prefix don't search for libpth in includedir and libdir
b80f6443
JA
1595 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1596 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1597 --with-included-gettext use the GNU gettext library included here
1598 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1599 --without-libintl-prefix don't search for libintl in includedir and libdir
f73dda09
JA
1600
1601Some influential environment variables:
b80f6443
JA
1602 DEBUGGER_START_FILE
1603 location of bash debugger initialization file
ac50fbac
CR
1604 CC_FOR_BUILD
1605 C compiler used when compiling binaries used only at build time
1606 CFLAGS_FOR_BUILD
d233b485 1607 Compilation options (CFLAGS) used when compiling binaries used
ac50fbac
CR
1608 only at build time
1609 LDFLAGS_FOR_BUILD
1610 Linker options (LDFLAGS) used when compiling binaries used only
1611 at build time
1612 CPPFLAGS_FOR_BUILD
1613 C preprocessor options (CPPFLAGS) used when compiling binaries
1614 used only at build time
f73dda09
JA
1615 CC C compiler command
1616 CFLAGS C compiler flags
1617 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1618 nonstandard directory <lib dir>
3185942a 1619 LIBS libraries to pass to the linker, e.g. -l<library>
ac50fbac 1620 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
3185942a 1621 you have headers in a nonstandard directory <include dir>
f73dda09 1622 CPP C preprocessor
ac50fbac
CR
1623 YACC The `Yet Another Compiler Compiler' implementation to use.
1624 Defaults to the first program found out of: `bison -y', `byacc',
1625 `yacc'.
3185942a
JA
1626 YFLAGS The list of arguments that will be passed by default to $YACC.
1627 This script will default YFLAGS to the empty string to avoid a
1628 default value of `-d' given by some make applications.
f73dda09
JA
1629
1630Use these variables to override the choices made by `configure' or to help
1631it to find libraries and programs with nonstandard names/locations.
1632
1633Report bugs to <bug-bash@gnu.org>.
b80f6443 1634_ACEOF
3185942a 1635ac_status=$?
f73dda09
JA
1636fi
1637
1638if test "$ac_init_help" = "recursive"; then
1639 # If there are subdirs, report their specific --help.
b80f6443 1640 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
3185942a
JA
1641 test -d "$ac_dir" ||
1642 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1643 continue
b80f6443
JA
1644 ac_builddir=.
1645
3185942a
JA
1646case "$ac_dir" in
1647.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1648*)
1649 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1650 # A ".." for each directory in $ac_dir_suffix.
1651 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1652 case $ac_top_builddir_sub in
1653 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1654 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1655 esac ;;
1656esac
1657ac_abs_top_builddir=$ac_pwd
1658ac_abs_builddir=$ac_pwd$ac_dir_suffix
1659# for backward compatibility:
1660ac_top_builddir=$ac_top_build_prefix
ccc6cda3 1661
b80f6443 1662case $srcdir in
3185942a 1663 .) # We are building in place.
b80f6443 1664 ac_srcdir=.
3185942a
JA
1665 ac_top_srcdir=$ac_top_builddir_sub
1666 ac_abs_top_srcdir=$ac_pwd ;;
1667 [\\/]* | ?:[\\/]* ) # Absolute name.
b80f6443 1668 ac_srcdir=$srcdir$ac_dir_suffix;
3185942a
JA
1669 ac_top_srcdir=$srcdir
1670 ac_abs_top_srcdir=$srcdir ;;
1671 *) # Relative name.
1672 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1673 ac_top_srcdir=$ac_top_build_prefix$srcdir
1674 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
0628567a 1675esac
3185942a
JA
1676ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1677
1678 cd "$ac_dir" || { ac_status=$?; continue; }
1679 # Check for guested configure.
1680 if test -f "$ac_srcdir/configure.gnu"; then
1681 echo &&
1682 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1683 elif test -f "$ac_srcdir/configure"; then
1684 echo &&
1685 $SHELL "$ac_srcdir/configure" --help=recursive
f73dda09 1686 else
3185942a
JA
1687 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1688 fi || ac_status=$?
1689 cd "$ac_pwd" || { ac_status=$?; break; }
f73dda09
JA
1690 done
1691fi
ccc6cda3 1692
3185942a 1693test -n "$ac_init_help" && exit $ac_status
f73dda09 1694if $ac_init_version; then
b80f6443 1695 cat <<\_ACEOF
8868edaf 1696bash configure 5.1-release
ac50fbac 1697generated by GNU Autoconf 2.69
ccc6cda3 1698
ac50fbac 1699Copyright (C) 2012 Free Software Foundation, Inc.
f73dda09
JA
1700This configure script is free software; the Free Software Foundation
1701gives unlimited permission to copy, distribute and modify it.
b80f6443 1702_ACEOF
3185942a 1703 exit
f73dda09 1704fi
ccc6cda3 1705
ac50fbac
CR
1706## ------------------------ ##
1707## Autoconf initialization. ##
1708## ------------------------ ##
bb70624e 1709
ac50fbac
CR
1710# ac_fn_c_try_compile LINENO
1711# --------------------------
1712# Try to compile conftest.$ac_ext, and return whether this succeeded.
1713ac_fn_c_try_compile ()
f73dda09 1714{
ac50fbac
CR
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1716 rm -f conftest.$ac_objext
1717 if { { ac_try="$ac_compile"
1718case "(($ac_try" in
1719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1720 *) ac_try_echo=$ac_try;;
1721esac
1722eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1723$as_echo "$ac_try_echo"; } >&5
1724 (eval "$ac_compile") 2>conftest.err
1725 ac_status=$?
1726 if test -s conftest.err; then
1727 grep -v '^ *+' conftest.err >conftest.er1
1728 cat conftest.er1 >&5
1729 mv -f conftest.er1 conftest.err
1730 fi
1731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1732 test $ac_status = 0; } && {
1733 test -z "$ac_c_werror_flag" ||
1734 test ! -s conftest.err
1735 } && test -s conftest.$ac_objext; then :
1736 ac_retval=0
1737else
1738 $as_echo "$as_me: failed program was:" >&5
1739sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1740
ac50fbac
CR
1741 ac_retval=1
1742fi
1743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1744 as_fn_set_status $ac_retval
f73dda09 1745
ac50fbac 1746} # ac_fn_c_try_compile
f73dda09 1747
ac50fbac
CR
1748# ac_fn_c_try_link LINENO
1749# -----------------------
1750# Try to link conftest.$ac_ext, and return whether this succeeded.
1751ac_fn_c_try_link ()
1752{
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 rm -f conftest.$ac_objext conftest$ac_exeext
1755 if { { ac_try="$ac_link"
1756case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759esac
1760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761$as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_link") 2>conftest.err
1763 ac_status=$?
1764 if test -s conftest.err; then
1765 grep -v '^ *+' conftest.err >conftest.er1
1766 cat conftest.er1 >&5
1767 mv -f conftest.er1 conftest.err
1768 fi
1769 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1770 test $ac_status = 0; } && {
1771 test -z "$ac_c_werror_flag" ||
1772 test ! -s conftest.err
1773 } && test -s conftest$ac_exeext && {
1774 test "$cross_compiling" = yes ||
1775 test -x conftest$ac_exeext
1776 }; then :
1777 ac_retval=0
1778else
1779 $as_echo "$as_me: failed program was:" >&5
1780sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1781
ac50fbac
CR
1782 ac_retval=1
1783fi
1784 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1785 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1786 # interfere with the next link command; also delete a directory that is
1787 # left behind by Apple's compiler. We do this before executing the actions.
1788 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1789 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1790 as_fn_set_status $ac_retval
b80f6443 1791
ac50fbac 1792} # ac_fn_c_try_link
b80f6443 1793
ac50fbac
CR
1794# ac_fn_c_try_cpp LINENO
1795# ----------------------
1796# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1797ac_fn_c_try_cpp ()
1798{
1799 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1800 if { { ac_try="$ac_cpp conftest.$ac_ext"
1801case "(($ac_try" in
1802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1803 *) ac_try_echo=$ac_try;;
1804esac
1805eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1806$as_echo "$ac_try_echo"; } >&5
1807 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1808 ac_status=$?
1809 if test -s conftest.err; then
1810 grep -v '^ *+' conftest.err >conftest.er1
1811 cat conftest.er1 >&5
1812 mv -f conftest.er1 conftest.err
1813 fi
1814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1815 test $ac_status = 0; } > conftest.i && {
1816 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1817 test ! -s conftest.err
1818 }; then :
1819 ac_retval=0
1820else
1821 $as_echo "$as_me: failed program was:" >&5
1822sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1823
ac50fbac
CR
1824 ac_retval=1
1825fi
1826 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1827 as_fn_set_status $ac_retval
b80f6443 1828
ac50fbac 1829} # ac_fn_c_try_cpp
b80f6443 1830
ac50fbac
CR
1831# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1832# -------------------------------------------------------
1833# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1834# the include files in INCLUDES and setting the cache variable VAR
1835# accordingly.
1836ac_fn_c_check_header_mongrel ()
1837{
1838 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1839 if eval \${$3+:} false; then :
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
1842if eval \${$3+:} false; then :
1843 $as_echo_n "(cached) " >&6
1844fi
1845eval ac_res=\$$3
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1847$as_echo "$ac_res" >&6; }
1848else
1849 # Is the header compilable?
1850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1851$as_echo_n "checking $2 usability... " >&6; }
1852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1853/* end confdefs.h. */
1854$4
1855#include <$2>
1856_ACEOF
1857if ac_fn_c_try_compile "$LINENO"; then :
1858 ac_header_compiler=yes
1859else
1860 ac_header_compiler=no
1861fi
1862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1864$as_echo "$ac_header_compiler" >&6; }
b80f6443 1865
ac50fbac
CR
1866# Is the header present?
1867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1868$as_echo_n "checking $2 presence... " >&6; }
1869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1870/* end confdefs.h. */
1871#include <$2>
b80f6443 1872_ACEOF
ac50fbac
CR
1873if ac_fn_c_try_cpp "$LINENO"; then :
1874 ac_header_preproc=yes
1875else
1876 ac_header_preproc=no
1877fi
1878rm -f conftest.err conftest.i conftest.$ac_ext
1879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1880$as_echo "$ac_header_preproc" >&6; }
f73dda09 1881
ac50fbac
CR
1882# So? What about this header?
1883case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1884 yes:no: )
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1886$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1888$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1889 ;;
1890 no:yes:* )
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1892$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1894$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1896$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1898$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1900$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1901( $as_echo "## ------------------------------- ##
1902## Report this to bug-bash@gnu.org ##
1903## ------------------------------- ##"
1904 ) | sed "s/^/$as_me: WARNING: /" >&2
1905 ;;
1906esac
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1908$as_echo_n "checking for $2... " >&6; }
1909if eval \${$3+:} false; then :
1910 $as_echo_n "(cached) " >&6
1911else
1912 eval "$3=\$ac_header_compiler"
1913fi
1914eval ac_res=\$$3
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1916$as_echo "$ac_res" >&6; }
1917fi
1918 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
f73dda09 1919
ac50fbac 1920} # ac_fn_c_check_header_mongrel
f73dda09 1921
ac50fbac
CR
1922# ac_fn_c_try_run LINENO
1923# ----------------------
1924# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1925# that executables *can* be run.
1926ac_fn_c_try_run ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 if { { ac_try="$ac_link"
1930case "(($ac_try" in
1931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1932 *) ac_try_echo=$ac_try;;
1933esac
1934eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1935$as_echo "$ac_try_echo"; } >&5
1936 (eval "$ac_link") 2>&5
1937 ac_status=$?
1938 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1939 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1940 { { case "(($ac_try" in
1941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1942 *) ac_try_echo=$ac_try;;
1943esac
1944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1945$as_echo "$ac_try_echo"; } >&5
1946 (eval "$ac_try") 2>&5
1947 ac_status=$?
1948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1949 test $ac_status = 0; }; }; then :
1950 ac_retval=0
1951else
1952 $as_echo "$as_me: program exited with status $ac_status" >&5
1953 $as_echo "$as_me: failed program was:" >&5
1954sed 's/^/| /' conftest.$ac_ext >&5
0628567a 1955
ac50fbac
CR
1956 ac_retval=$ac_status
1957fi
1958 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1959 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1960 as_fn_set_status $ac_retval
0628567a 1961
ac50fbac 1962} # ac_fn_c_try_run
0628567a 1963
ac50fbac
CR
1964# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1965# -------------------------------------------------------
1966# Tests whether HEADER exists and can be compiled using the include files in
1967# INCLUDES, setting the cache variable VAR accordingly.
1968ac_fn_c_check_header_compile ()
1969{
1970 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1972$as_echo_n "checking for $2... " >&6; }
1973if eval \${$3+:} false; then :
1974 $as_echo_n "(cached) " >&6
1975else
1976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1977/* end confdefs.h. */
1978$4
1979#include <$2>
1980_ACEOF
1981if ac_fn_c_try_compile "$LINENO"; then :
1982 eval "$3=yes"
1983else
1984 eval "$3=no"
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1987fi
1988eval ac_res=\$$3
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1990$as_echo "$ac_res" >&6; }
1991 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
0628567a 1992
ac50fbac 1993} # ac_fn_c_check_header_compile
f73dda09 1994
ac50fbac
CR
1995# ac_fn_c_check_func LINENO FUNC VAR
1996# ----------------------------------
1997# Tests whether FUNC exists, setting the cache variable VAR accordingly
1998ac_fn_c_check_func ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2002$as_echo_n "checking for $2... " >&6; }
2003if eval \${$3+:} false; then :
2004 $as_echo_n "(cached) " >&6
2005else
2006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2009 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2010#define $2 innocuous_$2
f73dda09 2011
ac50fbac
CR
2012/* System header to define __stub macros and hopefully few prototypes,
2013 which can conflict with char $2 (); below.
2014 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2015 <limits.h> exists even on freestanding compilers. */
b80f6443 2016
ac50fbac
CR
2017#ifdef __STDC__
2018# include <limits.h>
2019#else
2020# include <assert.h>
2021#endif
b80f6443 2022
ac50fbac 2023#undef $2
b80f6443 2024
ac50fbac
CR
2025/* Override any GCC internal prototype to avoid an error.
2026 Use char because int might match the return type of a GCC
2027 builtin and then its argument prototype would still apply. */
2028#ifdef __cplusplus
2029extern "C"
2030#endif
2031char $2 ();
2032/* The GNU C library defines this for functions which it implements
2033 to always fail with ENOSYS. Some functions are actually named
2034 something starting with __ and the normal name is an alias. */
2035#if defined __stub_$2 || defined __stub___$2
2036choke me
2037#endif
2038
2039int
2040main ()
2041{
2042return $2 ();
2043 ;
2044 return 0;
2045}
b80f6443 2046_ACEOF
ac50fbac
CR
2047if ac_fn_c_try_link "$LINENO"; then :
2048 eval "$3=yes"
2049else
2050 eval "$3=no"
2051fi
2052rm -f core conftest.err conftest.$ac_objext \
2053 conftest$ac_exeext conftest.$ac_ext
2054fi
2055eval ac_res=\$$3
2056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2057$as_echo "$ac_res" >&6; }
2058 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
b80f6443 2059
ac50fbac 2060} # ac_fn_c_check_func
b80f6443 2061
ac50fbac
CR
2062# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2063# -------------------------------------------
2064# Tests whether TYPE exists after having included INCLUDES, setting cache
2065# variable VAR accordingly.
2066ac_fn_c_check_type ()
2067{
2068 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2070$as_echo_n "checking for $2... " >&6; }
2071if eval \${$3+:} false; then :
2072 $as_echo_n "(cached) " >&6
2073else
2074 eval "$3=no"
2075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
2078int
2079main ()
2080{
2081if (sizeof ($2))
2082 return 0;
2083 ;
2084 return 0;
2085}
b80f6443 2086_ACEOF
ac50fbac
CR
2087if ac_fn_c_try_compile "$LINENO"; then :
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094if (sizeof (($2)))
2095 return 0;
2096 ;
2097 return 0;
2098}
b80f6443 2099_ACEOF
ac50fbac 2100if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 2101
3185942a 2102else
ac50fbac 2103 eval "$3=yes"
3185942a 2104fi
ac50fbac 2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 2106fi
ac50fbac 2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 2108fi
ac50fbac
CR
2109eval ac_res=\$$3
2110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2111$as_echo "$ac_res" >&6; }
2112 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
f73dda09 2113
ac50fbac 2114} # ac_fn_c_check_type
b80f6443 2115
ac50fbac
CR
2116# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2117# ---------------------------------------------
2118# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2119# accordingly.
2120ac_fn_c_check_decl ()
2121{
2122 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2123 as_decl_name=`echo $2|sed 's/ *(.*//'`
2124 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2126$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2127if eval \${$3+:} false; then :
2128 $as_echo_n "(cached) " >&6
2129else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133int
2134main ()
2135{
2136#ifndef $as_decl_name
2137#ifdef __cplusplus
2138 (void) $as_decl_use;
2139#else
2140 (void) $as_decl_name;
2141#endif
2142#endif
b80f6443 2143
ac50fbac
CR
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_compile "$LINENO"; then :
2149 eval "$3=yes"
2150else
2151 eval "$3=no"
2152fi
2153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2154fi
2155eval ac_res=\$$3
2156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2157$as_echo "$ac_res" >&6; }
2158 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
b80f6443 2159
ac50fbac 2160} # ac_fn_c_check_decl
b80f6443 2161
ac50fbac
CR
2162# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2163# --------------------------------------------
2164# Tries to find the compile-time value of EXPR in a program that includes
2165# INCLUDES, setting VAR accordingly. Returns whether the value could be
2166# computed
2167ac_fn_c_compute_int ()
2168{
2169 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2170 if test "$cross_compiling" = yes; then
2171 # Depending upon the size, compute the lo and hi bounds.
2172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h. */
2174$4
2175int
2176main ()
2177{
2178static int test_array [1 - 2 * !(($2) >= 0)];
2179test_array [0] = 0;
2180return test_array [0];
b80f6443 2181
ac50fbac
CR
2182 ;
2183 return 0;
2184}
2185_ACEOF
2186if ac_fn_c_try_compile "$LINENO"; then :
2187 ac_lo=0 ac_mid=0
2188 while :; do
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191$4
2192int
2193main ()
2194{
2195static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2196test_array [0] = 0;
2197return test_array [0];
b80f6443 2198
ac50fbac
CR
2199 ;
2200 return 0;
2201}
2202_ACEOF
2203if ac_fn_c_try_compile "$LINENO"; then :
2204 ac_hi=$ac_mid; break
2205else
2206 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2207 if test $ac_lo -le $ac_mid; then
2208 ac_lo= ac_hi=
2209 break
2210 fi
2211 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2212fi
2213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214 done
2215else
2216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217/* end confdefs.h. */
2218$4
2219int
2220main ()
2221{
2222static int test_array [1 - 2 * !(($2) < 0)];
2223test_array [0] = 0;
2224return test_array [0];
b80f6443 2225
ac50fbac
CR
2226 ;
2227 return 0;
2228}
2229_ACEOF
2230if ac_fn_c_try_compile "$LINENO"; then :
2231 ac_hi=-1 ac_mid=-1
2232 while :; do
2233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2234/* end confdefs.h. */
2235$4
2236int
2237main ()
2238{
2239static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2240test_array [0] = 0;
2241return test_array [0];
b80f6443 2242
ac50fbac
CR
2243 ;
2244 return 0;
2245}
2246_ACEOF
2247if ac_fn_c_try_compile "$LINENO"; then :
2248 ac_lo=$ac_mid; break
2249else
2250 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2251 if test $ac_mid -le $ac_hi; then
2252 ac_lo= ac_hi=
2253 break
2254 fi
2255 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2256fi
2257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2258 done
2259else
2260 ac_lo= ac_hi=
2261fi
2262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2265# Binary search between lo and hi bounds.
2266while test "x$ac_lo" != "x$ac_hi"; do
2267 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h. */
2270$4
2271int
2272main ()
2273{
2274static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2275test_array [0] = 0;
2276return test_array [0];
b80f6443 2277
ac50fbac
CR
2278 ;
2279 return 0;
2280}
2281_ACEOF
2282if ac_fn_c_try_compile "$LINENO"; then :
2283 ac_hi=$ac_mid
2284else
2285 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288done
2289case $ac_lo in #((
2290?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2291'') ac_retval=1 ;;
2292esac
2293 else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$4
2297static long int longval () { return $2; }
2298static unsigned long int ulongval () { return $2; }
2299#include <stdio.h>
2300#include <stdlib.h>
2301int
2302main ()
2303{
b80f6443 2304
ac50fbac
CR
2305 FILE *f = fopen ("conftest.val", "w");
2306 if (! f)
2307 return 1;
2308 if (($2) < 0)
2309 {
2310 long int i = longval ();
2311 if (i != ($2))
2312 return 1;
2313 fprintf (f, "%ld", i);
2314 }
2315 else
2316 {
2317 unsigned long int i = ulongval ();
2318 if (i != ($2))
2319 return 1;
2320 fprintf (f, "%lu", i);
2321 }
2322 /* Do not output a trailing newline, as this causes \r\n confusion
2323 on some platforms. */
2324 return ferror (f) || fclose (f) != 0;
b80f6443 2325
ac50fbac
CR
2326 ;
2327 return 0;
2328}
2329_ACEOF
2330if ac_fn_c_try_run "$LINENO"; then :
2331 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2332else
2333 ac_retval=1
2334fi
2335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2336 conftest.$ac_objext conftest.beam conftest.$ac_ext
2337rm -f conftest.val
b80f6443 2338
ac50fbac
CR
2339 fi
2340 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2341 as_fn_set_status $ac_retval
b80f6443 2342
ac50fbac 2343} # ac_fn_c_compute_int
b80f6443 2344
ac50fbac
CR
2345# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2346# ----------------------------------------------------
2347# Tries to find if the field MEMBER exists in type AGGR, after including
2348# INCLUDES, setting cache variable VAR accordingly.
2349ac_fn_c_check_member ()
2350{
2351 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2353$as_echo_n "checking for $2.$3... " >&6; }
2354if eval \${$4+:} false; then :
3185942a
JA
2355 $as_echo_n "(cached) " >&6
2356else
ac50fbac
CR
2357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2358/* end confdefs.h. */
2359$5
2360int
2361main ()
2362{
2363static $2 ac_aggr;
2364if (ac_aggr.$3)
2365return 0;
2366 ;
2367 return 0;
2368}
2369_ACEOF
2370if ac_fn_c_try_compile "$LINENO"; then :
2371 eval "$4=yes"
3185942a 2372else
ac50fbac
CR
2373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h. */
2375$5
2376int
2377main ()
2378{
2379static $2 ac_aggr;
2380if (sizeof ac_aggr.$3)
2381return 0;
2382 ;
2383 return 0;
2384}
2385_ACEOF
2386if ac_fn_c_try_compile "$LINENO"; then :
2387 eval "$4=yes"
3185942a 2388else
ac50fbac 2389 eval "$4=no"
3185942a 2390fi
ac50fbac 2391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185942a 2392fi
ac50fbac 2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185942a 2394fi
ac50fbac
CR
2395eval ac_res=\$$4
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2397$as_echo "$ac_res" >&6; }
2398 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
d166f048 2399
ac50fbac
CR
2400} # ac_fn_c_check_member
2401cat >config.log <<_ACEOF
2402This file contains any messages produced by compilers while
2403running configure, to aid debugging if configure makes a mistake.
3185942a 2404
8868edaf 2405It was created by bash $as_me 5.1-release, which was
ac50fbac 2406generated by GNU Autoconf 2.69. Invocation command line was
3185942a 2407
ac50fbac 2408 $ $0 $@
d166f048 2409
ac50fbac
CR
2410_ACEOF
2411exec 5>>config.log
2412{
2413cat <<_ASUNAME
2414## --------- ##
2415## Platform. ##
2416## --------- ##
3185942a 2417
ac50fbac
CR
2418hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2419uname -m = `(uname -m) 2>/dev/null || echo unknown`
2420uname -r = `(uname -r) 2>/dev/null || echo unknown`
2421uname -s = `(uname -s) 2>/dev/null || echo unknown`
2422uname -v = `(uname -v) 2>/dev/null || echo unknown`
3185942a 2423
ac50fbac
CR
2424/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2425/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
ccc6cda3 2426
ac50fbac
CR
2427/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2428/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2429/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2430/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2431/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2432/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2433/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
f73dda09 2434
ac50fbac 2435_ASUNAME
f73dda09 2436
ac50fbac
CR
2437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2438for as_dir in $PATH
2439do
2440 IFS=$as_save_IFS
2441 test -z "$as_dir" && as_dir=.
2442 $as_echo "PATH: $as_dir"
2443 done
2444IFS=$as_save_IFS
bb70624e 2445
ac50fbac 2446} >&5
ccc6cda3 2447
ac50fbac 2448cat >&5 <<_ACEOF
7117c2d2 2449
ccc6cda3 2450
ac50fbac
CR
2451## ----------- ##
2452## Core tests. ##
2453## ----------- ##
d166f048 2454
b80f6443 2455_ACEOF
ccc6cda3 2456
d166f048 2457
ac50fbac
CR
2458# Keep a trace of the command line.
2459# Strip out --no-create and --no-recursion so they do not pile up.
2460# Strip out --silent because we don't want to record it for future runs.
2461# Also quote any args containing shell meta-characters.
2462# Make two passes to allow for proper duplicate-argument suppression.
2463ac_configure_args=
2464ac_configure_args0=
2465ac_configure_args1=
2466ac_must_keep_next=false
2467for ac_pass in 1 2
2468do
2469 for ac_arg
2470 do
2471 case $ac_arg in
2472 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2473 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2474 | -silent | --silent | --silen | --sile | --sil)
2475 continue ;;
2476 *\'*)
2477 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2478 esac
2479 case $ac_pass in
2480 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2481 2)
2482 as_fn_append ac_configure_args1 " '$ac_arg'"
2483 if test $ac_must_keep_next = true; then
2484 ac_must_keep_next=false # Got value, back to normal.
2485 else
2486 case $ac_arg in
2487 *=* | --config-cache | -C | -disable-* | --disable-* \
2488 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2489 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2490 | -with-* | --with-* | -without-* | --without-* | --x)
2491 case "$ac_configure_args0 " in
2492 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2493 esac
2494 ;;
2495 -* ) ac_must_keep_next=true ;;
2496 esac
2497 fi
2498 as_fn_append ac_configure_args " '$ac_arg'"
2499 ;;
2500 esac
2501 done
2502done
2503{ ac_configure_args0=; unset ac_configure_args0;}
2504{ ac_configure_args1=; unset ac_configure_args1;}
b80f6443 2505
ac50fbac
CR
2506# When interrupted or exit'd, cleanup temporary files, and complete
2507# config.log. We remove comments because anyway the quotes in there
2508# would cause problems or look ugly.
2509# WARNING: Use '\'' to represent an apostrophe within the trap.
2510# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2511trap 'exit_status=$?
2512 # Save into config.log some information that might help in debugging.
2513 {
2514 echo
ccc6cda3 2515
ac50fbac
CR
2516 $as_echo "## ---------------- ##
2517## Cache variables. ##
2518## ---------------- ##"
2519 echo
2520 # The following way of writing the cache mishandles newlines in values,
2521(
2522 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2523 eval ac_val=\$$ac_var
2524 case $ac_val in #(
2525 *${as_nl}*)
2526 case $ac_var in #(
2527 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2528$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2529 esac
2530 case $ac_var in #(
2531 _ | IFS | as_nl) ;; #(
2532 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2533 *) { eval $ac_var=; unset $ac_var;} ;;
2534 esac ;;
2535 esac
2536 done
2537 (set) 2>&1 |
2538 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2539 *${as_nl}ac_space=\ *)
2540 sed -n \
2541 "s/'\''/'\''\\\\'\'''\''/g;
2542 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2543 ;; #(
2544 *)
2545 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2546 ;;
2547 esac |
2548 sort
2549)
2550 echo
cce855bc 2551
ac50fbac
CR
2552 $as_echo "## ----------------- ##
2553## Output variables. ##
2554## ----------------- ##"
2555 echo
2556 for ac_var in $ac_subst_vars
2557 do
2558 eval ac_val=\$$ac_var
2559 case $ac_val in
2560 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2561 esac
2562 $as_echo "$ac_var='\''$ac_val'\''"
2563 done | sort
2564 echo
ccc6cda3 2565
ac50fbac
CR
2566 if test -n "$ac_subst_files"; then
2567 $as_echo "## ------------------- ##
2568## File substitutions. ##
2569## ------------------- ##"
2570 echo
2571 for ac_var in $ac_subst_files
2572 do
2573 eval ac_val=\$$ac_var
2574 case $ac_val in
2575 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2576 esac
2577 $as_echo "$ac_var='\''$ac_val'\''"
2578 done | sort
2579 echo
2580 fi
3185942a 2581
ac50fbac
CR
2582 if test -s confdefs.h; then
2583 $as_echo "## ----------- ##
2584## confdefs.h. ##
2585## ----------- ##"
2586 echo
2587 cat confdefs.h
2588 echo
2589 fi
2590 test "$ac_signal" != 0 &&
2591 $as_echo "$as_me: caught signal $ac_signal"
2592 $as_echo "$as_me: exit $exit_status"
2593 } >&5
2594 rm -f core *.core core.conftest.* &&
2595 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2596 exit $exit_status
2597' 0
2598for ac_signal in 1 2 13 15; do
2599 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2600done
2601ac_signal=0
ccc6cda3 2602
ac50fbac
CR
2603# confdefs.h avoids OS command line length limits that DEFS can exceed.
2604rm -f -r conftest* confdefs.h
ccc6cda3 2605
ac50fbac 2606$as_echo "/* confdefs.h */" > confdefs.h
3185942a 2607
ac50fbac 2608# Predefined preprocessor variables.
3185942a 2609
ac50fbac
CR
2610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_NAME "$PACKAGE_NAME"
2612_ACEOF
3185942a 2613
ac50fbac
CR
2614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2616_ACEOF
3185942a 2617
ac50fbac
CR
2618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_VERSION "$PACKAGE_VERSION"
2620_ACEOF
3185942a 2621
ac50fbac
CR
2622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_STRING "$PACKAGE_STRING"
2624_ACEOF
3185942a 2625
ac50fbac
CR
2626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2628_ACEOF
3185942a 2629
ac50fbac
CR
2630cat >>confdefs.h <<_ACEOF
2631#define PACKAGE_URL "$PACKAGE_URL"
2632_ACEOF
3185942a 2633
3185942a 2634
ac50fbac
CR
2635# Let the site file select an alternate cache file if it wants to.
2636# Prefer an explicitly selected file to automatically selected ones.
2637ac_site_file1=NONE
2638ac_site_file2=NONE
2639if test -n "$CONFIG_SITE"; then
2640 # We do not want a PATH search for config.site.
2641 case $CONFIG_SITE in #((
2642 -*) ac_site_file1=./$CONFIG_SITE;;
2643 */*) ac_site_file1=$CONFIG_SITE;;
2644 *) ac_site_file1=./$CONFIG_SITE;;
2645 esac
2646elif test "x$prefix" != xNONE; then
2647 ac_site_file1=$prefix/share/config.site
2648 ac_site_file2=$prefix/etc/config.site
2649else
2650 ac_site_file1=$ac_default_prefix/share/config.site
2651 ac_site_file2=$ac_default_prefix/etc/config.site
3185942a 2652fi
ac50fbac
CR
2653for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2654do
2655 test "x$ac_site_file" = xNONE && continue
2656 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2658$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2659 sed 's/^/| /' "$ac_site_file" >&5
2660 . "$ac_site_file" \
2661 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663as_fn_error $? "failed to load site script $ac_site_file
2664See \`config.log' for more details" "$LINENO" 5; }
2665 fi
2666done
3185942a 2667
ac50fbac
CR
2668if test -r "$cache_file"; then
2669 # Some versions of bash will fail to source /dev/null (special files
2670 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2671 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2673$as_echo "$as_me: loading cache $cache_file" >&6;}
2674 case $cache_file in
2675 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2676 *) . "./$cache_file";;
2677 esac
2678 fi
2679else
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2681$as_echo "$as_me: creating cache $cache_file" >&6;}
2682 >$cache_file
3185942a
JA
2683fi
2684
8868edaf 2685gt_needs="$gt_needs need-ngettext"
ac50fbac
CR
2686as_fn_append ac_header_list " stdlib.h"
2687as_fn_append ac_header_list " unistd.h"
2688as_fn_append ac_header_list " sys/param.h"
8868edaf
CR
2689as_fn_append ac_func_list " symlink"
2690as_fn_append ac_func_list " uselocale"
2691as_fn_append ac_header_list " xlocale.h"
ac50fbac
CR
2692as_fn_append ac_header_list " sys/time.h"
2693as_fn_append ac_func_list " alarm"
2694as_fn_append ac_func_list " fpurge"
2695as_fn_append ac_func_list " __fpurge"
2696as_fn_append ac_func_list " snprintf"
2697as_fn_append ac_func_list " vsnprintf"
2698# Check that the precious variables saved in the cache have kept the same
2699# value.
2700ac_cache_corrupted=false
2701for ac_var in $ac_precious_vars; do
2702 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2703 eval ac_new_set=\$ac_env_${ac_var}_set
2704 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2705 eval ac_new_val=\$ac_env_${ac_var}_value
2706 case $ac_old_set,$ac_new_set in
2707 set,)
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2709$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2710 ac_cache_corrupted=: ;;
2711 ,set)
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2713$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2714 ac_cache_corrupted=: ;;
2715 ,);;
2716 *)
2717 if test "x$ac_old_val" != "x$ac_new_val"; then
2718 # differences in whitespace do not lead to failure.
2719 ac_old_val_w=`echo x $ac_old_val`
2720 ac_new_val_w=`echo x $ac_new_val`
2721 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2723$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2724 ac_cache_corrupted=:
2725 else
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2727$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2728 eval $ac_var=\$ac_old_val
2729 fi
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2731$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2733$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2734 fi;;
2735 esac
2736 # Pass precious variables to config.status.
2737 if test "$ac_new_set" = set; then
2738 case $ac_new_val in
2739 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2740 *) ac_arg=$ac_var=$ac_new_val ;;
2741 esac
2742 case " $ac_configure_args " in
2743 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2744 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2745 esac
2746 fi
2747done
2748if $ac_cache_corrupted; then
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2752$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2753 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3185942a 2754fi
ac50fbac
CR
2755## -------------------- ##
2756## Main body of script. ##
2757## -------------------- ##
3185942a 2758
ac50fbac
CR
2759ac_ext=c
2760ac_cpp='$CPP $CPPFLAGS'
2761ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2762ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2763ac_compiler_gnu=$ac_cv_c_compiler_gnu
3185942a 2764
3185942a 2765
3185942a 2766
0001803f 2767
3185942a 2768
3185942a 2769
ac50fbac
CR
2770ac_aux_dir=
2771for ac_dir in ./support "$srcdir"/./support; do
2772 if test -f "$ac_dir/install-sh"; then
2773 ac_aux_dir=$ac_dir
2774 ac_install_sh="$ac_aux_dir/install-sh -c"
2775 break
2776 elif test -f "$ac_dir/install.sh"; then
2777 ac_aux_dir=$ac_dir
2778 ac_install_sh="$ac_aux_dir/install.sh -c"
2779 break
2780 elif test -f "$ac_dir/shtool"; then
2781 ac_aux_dir=$ac_dir
2782 ac_install_sh="$ac_aux_dir/shtool install -c"
2783 break
2784 fi
2785done
2786if test -z "$ac_aux_dir"; then
2787 as_fn_error $? "cannot find install-sh, install.sh, or shtool in ./support \"$srcdir\"/./support" "$LINENO" 5
3185942a
JA
2788fi
2789
ac50fbac
CR
2790# These three variables are undocumented and unsupported,
2791# and are intended to be withdrawn in a future Autoconf release.
2792# They can cause serious problems if a builder's source tree is in a directory
2793# whose full name contains unusual characters.
2794ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2795ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2796ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3185942a 2797
3185942a 2798
ac50fbac 2799ac_config_headers="$ac_config_headers config.h"
3185942a 2800
3185942a 2801
8868edaf 2802BASHVERS=5.1
ac50fbac 2803RELSTATUS=release
3185942a 2804
ac50fbac 2805case "$RELSTATUS" in
a0c0a00f 2806alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
ac50fbac
CR
2807*) DEBUG= MALLOC_DEBUG= ;;
2808esac
3185942a 2809
ac50fbac
CR
2810# Make sure we can run config.sub.
2811$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2812 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3185942a 2813
ac50fbac
CR
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2815$as_echo_n "checking build system type... " >&6; }
2816if ${ac_cv_build+:} false; then :
2817 $as_echo_n "(cached) " >&6
2818else
2819 ac_build_alias=$build_alias
2820test "x$ac_build_alias" = x &&
2821 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2822test "x$ac_build_alias" = x &&
2823 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2824ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2825 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3185942a 2826
3185942a 2827fi
ac50fbac
CR
2828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2829$as_echo "$ac_cv_build" >&6; }
2830case $ac_cv_build in
2831*-*-*) ;;
2832*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2833esac
2834build=$ac_cv_build
2835ac_save_IFS=$IFS; IFS='-'
2836set x $ac_cv_build
2837shift
2838build_cpu=$1
2839build_vendor=$2
2840shift; shift
2841# Remember, the first character of IFS is used to create $*,
2842# except with old shells:
2843build_os=$*
2844IFS=$ac_save_IFS
2845case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3185942a 2846
3185942a 2847
ac50fbac
CR
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2849$as_echo_n "checking host system type... " >&6; }
2850if ${ac_cv_host+:} false; then :
2851 $as_echo_n "(cached) " >&6
2852else
2853 if test "x$host_alias" = x; then
2854 ac_cv_host=$ac_cv_build
2855else
2856 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2857 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3185942a
JA
2858fi
2859
3185942a 2860fi
ac50fbac
CR
2861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2862$as_echo "$ac_cv_host" >&6; }
2863case $ac_cv_host in
2864*-*-*) ;;
2865*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2866esac
2867host=$ac_cv_host
2868ac_save_IFS=$IFS; IFS='-'
2869set x $ac_cv_host
2870shift
2871host_cpu=$1
2872host_vendor=$2
2873shift; shift
2874# Remember, the first character of IFS is used to create $*,
2875# except with old shells:
2876host_os=$*
2877IFS=$ac_save_IFS
2878case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3185942a 2879
ccc6cda3 2880
3185942a 2881
3185942a 2882
ac50fbac 2883opt_bash_malloc=yes
ac50fbac
CR
2884opt_afs=no
2885opt_curses=no
2886opt_with_installed_readline=no
3185942a 2887
ac50fbac 2888#htmldir=
3185942a 2889
ac50fbac 2890case "${host_cpu}-${host_os}" in
d233b485 2891# mostly obsolete platforms
ac50fbac
CR
2892alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux
2893*[Cc]ray*-*) opt_bash_malloc=no ;; # Crays
2894*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines
d233b485 2895*-dgux*) opt_bash_malloc=no ;; # DG/UX machines
ac50fbac 2896sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2
ac50fbac 2897m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
d233b485
CR
2898*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
2899*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
2900*-beos*) opt_bash_malloc=no ;; # they say it's suitable
2901# These need additional investigation
ac50fbac 2902sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
ac50fbac 2903*-aix*) opt_bash_malloc=no ;; # AIX machines
d233b485 2904*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
8868edaf
CR
2905# These lack a working sbrk(2)
2906aarch64-freebsd*) opt_bash_malloc=no ;;
2907riscv*-freebsd*) opt_bash_malloc=no ;;
d233b485 2908# Mach-derived systems have a ton of extra malloc functions and lack sbrk(2)
ac50fbac
CR
2909*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
2910*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep
2911*-macos*) opt_bash_malloc=no ;; # Apple MacOS X
2912*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X)
2913*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X)
ac50fbac 2914*-machten4) opt_bash_malloc=no ;; # MachTen 4.x
d233b485
CR
2915# Niche or non-mainstream-shell-user systems
2916*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x
ac50fbac
CR
2917*-nsk*) opt_bash_malloc=no ;; # HP NonStop
2918*-haiku*) opt_bash_malloc=no ;; # Haiku OS
8868edaf 2919*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk
ac50fbac 2920esac
b72432fd 2921
ac50fbac
CR
2922# memory scrambling on free()
2923case "${host_os}" in
2924sco3.2v5*|sco3.2v4*) opt_memscramble=no ;;
2925*) opt_memscramble=yes ;;
2926esac
b80f6443
JA
2927
2928
ccc6cda3 2929
ccc6cda3 2930
ac50fbac
CR
2931# Check whether --with-afs was given.
2932if test "${with_afs+set}" = set; then :
2933 withval=$with_afs; opt_afs=$withval
ccc6cda3 2934fi
ccc6cda3 2935
ccc6cda3 2936
ac50fbac
CR
2937# Check whether --with-bash-malloc was given.
2938if test "${with_bash_malloc+set}" = set; then :
2939 withval=$with_bash_malloc; opt_bash_malloc=$withval
ccc6cda3 2940fi
ccc6cda3 2941
ccc6cda3 2942
ac50fbac
CR
2943# Check whether --with-curses was given.
2944if test "${with_curses+set}" = set; then :
2945 withval=$with_curses; opt_curses=$withval
ccc6cda3 2946fi
ccc6cda3 2947
ac50fbac
CR
2948
2949# Check whether --with-gnu-malloc was given.
2950if test "${with_gnu_malloc+set}" = set; then :
2951 withval=$with_gnu_malloc; opt_bash_malloc=$withval
ccc6cda3 2952fi
ccc6cda3 2953
ac50fbac
CR
2954
2955# Check whether --with-installed-readline was given.
2956if test "${with_installed_readline+set}" = set; then :
2957 withval=$with_installed_readline; opt_with_installed_readline=$withval
ccc6cda3 2958fi
ccc6cda3 2959
ac50fbac 2960
ac50fbac
CR
2961if test "$opt_bash_malloc" = yes; then
2962 MALLOC_TARGET=malloc
2963 MALLOC_SRC=malloc.c
2964
2965 MALLOC_LIB='-lmalloc'
2966 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
2967 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
2968 MALLOC_DEP='$(MALLOC_LIBRARY)'
2969
2970 $as_echo "#define USING_BASH_MALLOC 1" >>confdefs.h
2971
2972else
2973 MALLOC_LIB=
2974 MALLOC_LIBRARY=
2975 MALLOC_LDFLAGS=
2976 MALLOC_DEP=
ccc6cda3 2977fi
ccc6cda3 2978
ac50fbac
CR
2979if test "$opt_afs" = yes; then
2980 $as_echo "#define AFS 1" >>confdefs.h
95732b49 2981
cce855bc 2982fi
cce855bc 2983
ac50fbac
CR
2984if test "$opt_curses" = yes; then
2985 prefer_curses=yes
0001803f 2986fi
0001803f 2987
ac50fbac
CR
2988if test -z "${DEBUGGER_START_FILE}"; then
2989 DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc'
2990fi
0001803f 2991
ac50fbac
CR
2992opt_minimal_config=no
2993
2994opt_job_control=yes
2995opt_alias=yes
2996opt_readline=yes
2997opt_history=yes
2998opt_bang_history=yes
2999opt_dirstack=yes
3000opt_restricted=yes
3001opt_process_subst=yes
3002opt_prompt_decoding=yes
3003opt_select=yes
3004opt_help=yes
3005opt_array_variables=yes
3006opt_dparen_arith=yes
3007opt_extended_glob=yes
3008opt_brace_expansion=yes
3009opt_disabled_builtins=no
3010opt_command_timing=yes
3011opt_xpg_echo=no
3012opt_strict_posix=no
3013opt_cond_command=yes
3014opt_cond_regexp=yes
3015opt_coproc=yes
3016opt_arith_for_command=yes
3017opt_net_redirs=yes
3018opt_progcomp=yes
3019opt_separate_help=no
3020opt_multibyte=yes
3021opt_debugger=yes
3022opt_single_longdoc_strings=yes
3023opt_casemod_attrs=yes
3024opt_casemod_expansions=yes
3025opt_extglob_default=no
3026opt_dircomplete_expand_default=no
d233b485 3027opt_globascii_default=yes
a0c0a00f 3028opt_function_import=yes
d233b485 3029opt_dev_fd_stat_broken=no
ac50fbac
CR
3030
3031opt_static_link=no
3032opt_profiling=no
3033
3034# Check whether --enable-minimal-config was given.
3035if test "${enable_minimal_config+set}" = set; then :
3036 enableval=$enable_minimal_config; opt_minimal_config=$enableval
cce855bc 3037fi
b80f6443 3038
ac50fbac
CR
3039
3040if test $opt_minimal_config = yes; then
3041 opt_job_control=no opt_alias=no opt_readline=no
3042 opt_history=no opt_bang_history=no opt_dirstack=no
3043 opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
3044 opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
3045 opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
3046 opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no
3047 opt_net_redirs=no opt_progcomp=no opt_separate_help=no
3048 opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
3049 opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
d233b485 3050 opt_globascii_default=yes
b80f6443 3051fi
cce855bc 3052
ac50fbac
CR
3053# Check whether --enable-alias was given.
3054if test "${enable_alias+set}" = set; then :
3055 enableval=$enable_alias; opt_alias=$enableval
3185942a 3056fi
3185942a 3057
ac50fbac
CR
3058# Check whether --enable-arith-for-command was given.
3059if test "${enable_arith_for_command+set}" = set; then :
3060 enableval=$enable_arith_for_command; opt_arith_for_command=$enableval
bb70624e 3061fi
bb70624e 3062
ac50fbac
CR
3063# Check whether --enable-array-variables was given.
3064if test "${enable_array_variables+set}" = set; then :
3065 enableval=$enable_array_variables; opt_array_variables=$enableval
bb70624e 3066fi
bb70624e 3067
ac50fbac
CR
3068# Check whether --enable-bang-history was given.
3069if test "${enable_bang_history+set}" = set; then :
3070 enableval=$enable_bang_history; opt_bang_history=$enableval
bb70624e 3071fi
b80f6443 3072
ac50fbac
CR
3073# Check whether --enable-brace-expansion was given.
3074if test "${enable_brace_expansion+set}" = set; then :
3075 enableval=$enable_brace_expansion; opt_brace_expansion=$enableval
b80f6443 3076fi
b80f6443 3077
ac50fbac
CR
3078# Check whether --enable-casemod-attributes was given.
3079if test "${enable_casemod_attributes+set}" = set; then :
3080 enableval=$enable_casemod_attributes; opt_casemod_attrs=$enableval
b80f6443 3081fi
bb70624e 3082
ac50fbac
CR
3083# Check whether --enable-casemod-expansions was given.
3084if test "${enable_casemod_expansions+set}" = set; then :
3085 enableval=$enable_casemod_expansions; opt_casemod_expansions=$enableval
3185942a 3086fi
3185942a 3087
ac50fbac
CR
3088# Check whether --enable-command-timing was given.
3089if test "${enable_command_timing+set}" = set; then :
3090 enableval=$enable_command_timing; opt_command_timing=$enableval
3185942a 3091fi
3185942a 3092
ac50fbac
CR
3093# Check whether --enable-cond-command was given.
3094if test "${enable_cond_command+set}" = set; then :
3095 enableval=$enable_cond_command; opt_cond_command=$enableval
ccc6cda3
JA
3096fi
3097
ac50fbac
CR
3098# Check whether --enable-cond-regexp was given.
3099if test "${enable_cond_regexp+set}" = set; then :
3100 enableval=$enable_cond_regexp; opt_cond_regexp=$enableval
3101fi
7117c2d2 3102
ac50fbac
CR
3103# Check whether --enable-coprocesses was given.
3104if test "${enable_coprocesses+set}" = set; then :
3105 enableval=$enable_coprocesses; opt_coproc=$enableval
7117c2d2
JA
3106fi
3107
ac50fbac
CR
3108# Check whether --enable-debugger was given.
3109if test "${enable_debugger+set}" = set; then :
3110 enableval=$enable_debugger; opt_debugger=$enableval
d166f048
JA
3111fi
3112
d233b485
CR
3113# Check whether --enable-dev-fd-stat-broken was given.
3114if test "${enable_dev_fd_stat_broken+set}" = set; then :
3115 enableval=$enable_dev_fd_stat_broken; opt_dev_fd_stat_broken=$enableval
3116fi
3117
ac50fbac
CR
3118# Check whether --enable-direxpand-default was given.
3119if test "${enable_direxpand_default+set}" = set; then :
3120 enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval
7117c2d2 3121fi
ac50fbac
CR
3122
3123# Check whether --enable-directory-stack was given.
3124if test "${enable_directory_stack+set}" = set; then :
3125 enableval=$enable_directory_stack; opt_dirstack=$enableval
95732b49
JA
3126fi
3127
ac50fbac
CR
3128# Check whether --enable-disabled-builtins was given.
3129if test "${enable_disabled_builtins+set}" = set; then :
3130 enableval=$enable_disabled_builtins; opt_disabled_builtins=$enableval
3131fi
7117c2d2 3132
ac50fbac
CR
3133# Check whether --enable-dparen-arithmetic was given.
3134if test "${enable_dparen_arithmetic+set}" = set; then :
3135 enableval=$enable_dparen_arithmetic; opt_dparen_arith=$enableval
3136fi
b80f6443 3137
ac50fbac
CR
3138# Check whether --enable-extended-glob was given.
3139if test "${enable_extended_glob+set}" = set; then :
3140 enableval=$enable_extended_glob; opt_extended_glob=$enableval
3141fi
b80f6443 3142
ac50fbac
CR
3143# Check whether --enable-extended-glob-default was given.
3144if test "${enable_extended_glob_default+set}" = set; then :
3145 enableval=$enable_extended_glob_default; opt_extglob_default=$enableval
3146fi
b80f6443 3147
a0c0a00f
CR
3148# Check whether --enable-function-import was given.
3149if test "${enable_function_import+set}" = set; then :
3150 enableval=$enable_function_import; opt_function_import=$enableval
3151fi
3152
ac50fbac
CR
3153# Check whether --enable-glob-asciiranges-default was given.
3154if test "${enable_glob_asciiranges_default+set}" = set; then :
3155 enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval
3156fi
b80f6443 3157
ac50fbac
CR
3158# Check whether --enable-help-builtin was given.
3159if test "${enable_help_builtin+set}" = set; then :
3160 enableval=$enable_help_builtin; opt_help=$enableval
3161fi
b80f6443 3162
ac50fbac
CR
3163# Check whether --enable-history was given.
3164if test "${enable_history+set}" = set; then :
3165 enableval=$enable_history; opt_history=$enableval
3166fi
b80f6443 3167
ac50fbac
CR
3168# Check whether --enable-job-control was given.
3169if test "${enable_job_control+set}" = set; then :
3170 enableval=$enable_job_control; opt_job_control=$enableval
3171fi
b80f6443 3172
ac50fbac
CR
3173# Check whether --enable-multibyte was given.
3174if test "${enable_multibyte+set}" = set; then :
3175 enableval=$enable_multibyte; opt_multibyte=$enableval
3176fi
b80f6443 3177
ac50fbac
CR
3178# Check whether --enable-net-redirections was given.
3179if test "${enable_net_redirections+set}" = set; then :
3180 enableval=$enable_net_redirections; opt_net_redirs=$enableval
3181fi
b80f6443 3182
ac50fbac
CR
3183# Check whether --enable-process-substitution was given.
3184if test "${enable_process_substitution+set}" = set; then :
3185 enableval=$enable_process_substitution; opt_process_subst=$enableval
3186fi
b80f6443 3187
ac50fbac
CR
3188# Check whether --enable-progcomp was given.
3189if test "${enable_progcomp+set}" = set; then :
3190 enableval=$enable_progcomp; opt_progcomp=$enableval
3191fi
b80f6443 3192
ac50fbac
CR
3193# Check whether --enable-prompt-string-decoding was given.
3194if test "${enable_prompt_string_decoding+set}" = set; then :
3195 enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval
3196fi
b80f6443 3197
ac50fbac
CR
3198# Check whether --enable-readline was given.
3199if test "${enable_readline+set}" = set; then :
3200 enableval=$enable_readline; opt_readline=$enableval
3201fi
b80f6443 3202
ac50fbac
CR
3203# Check whether --enable-restricted was given.
3204if test "${enable_restricted+set}" = set; then :
3205 enableval=$enable_restricted; opt_restricted=$enableval
3206fi
b80f6443 3207
ac50fbac
CR
3208# Check whether --enable-select was given.
3209if test "${enable_select+set}" = set; then :
3210 enableval=$enable_select; opt_select=$enableval
3211fi
b80f6443 3212
ac50fbac
CR
3213# Check whether --enable-separate-helpfiles was given.
3214if test "${enable_separate_helpfiles+set}" = set; then :
3215 enableval=$enable_separate_helpfiles; opt_separate_help=$enableval
3216fi
b80f6443 3217
ac50fbac
CR
3218# Check whether --enable-single-help-strings was given.
3219if test "${enable_single_help_strings+set}" = set; then :
3220 enableval=$enable_single_help_strings; opt_single_longdoc_strings=$enableval
3221fi
d166f048 3222
ac50fbac
CR
3223# Check whether --enable-strict-posix-default was given.
3224if test "${enable_strict_posix_default+set}" = set; then :
3225 enableval=$enable_strict_posix_default; opt_strict_posix=$enableval
3226fi
3227
3228# Check whether --enable-usg-echo-default was given.
3229if test "${enable_usg_echo_default+set}" = set; then :
3230 enableval=$enable_usg_echo_default; opt_xpg_echo=$enableval
3231fi
3232
3233# Check whether --enable-xpg-echo-default was given.
3234if test "${enable_xpg_echo_default+set}" = set; then :
3235 enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval
3236fi
3237
3238
3239# Check whether --enable-mem-scramble was given.
3240if test "${enable_mem_scramble+set}" = set; then :
3241 enableval=$enable_mem_scramble; opt_memscramble=$enableval
3242fi
3243
3244# Check whether --enable-profiling was given.
3245if test "${enable_profiling+set}" = set; then :
3246 enableval=$enable_profiling; opt_profiling=$enableval
3247fi
3248
3249# Check whether --enable-static-link was given.
3250if test "${enable_static_link+set}" = set; then :
3251 enableval=$enable_static_link; opt_static_link=$enableval
3252fi
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262if test $opt_alias = yes; then
3263$as_echo "#define ALIAS 1" >>confdefs.h
3264
3265fi
3266if test $opt_dirstack = yes; then
3267$as_echo "#define PUSHD_AND_POPD 1" >>confdefs.h
3268
3269fi
3270if test $opt_restricted = yes; then
3271$as_echo "#define RESTRICTED_SHELL 1" >>confdefs.h
3272
3273fi
3274if test $opt_process_subst = yes; then
3275$as_echo "#define PROCESS_SUBSTITUTION 1" >>confdefs.h
3276
3277fi
3278if test $opt_prompt_decoding = yes; then
3279$as_echo "#define PROMPT_STRING_DECODE 1" >>confdefs.h
3280
3281fi
3282if test $opt_select = yes; then
3283$as_echo "#define SELECT_COMMAND 1" >>confdefs.h
3284
3285fi
3286if test $opt_help = yes; then
3287$as_echo "#define HELP_BUILTIN 1" >>confdefs.h
3288
3289fi
3290if test $opt_array_variables = yes; then
3291$as_echo "#define ARRAY_VARS 1" >>confdefs.h
3292
3293fi
3294if test $opt_dparen_arith = yes; then
3295$as_echo "#define DPAREN_ARITHMETIC 1" >>confdefs.h
3296
3297fi
3298if test $opt_brace_expansion = yes; then
3299$as_echo "#define BRACE_EXPANSION 1" >>confdefs.h
3300
3301fi
3302if test $opt_disabled_builtins = yes; then
3303$as_echo "#define DISABLED_BUILTINS 1" >>confdefs.h
3304
3305fi
3306if test $opt_command_timing = yes; then
3307$as_echo "#define COMMAND_TIMING 1" >>confdefs.h
3308
3309fi
3310if test $opt_xpg_echo = yes ; then
3311$as_echo "#define DEFAULT_ECHO_TO_XPG 1" >>confdefs.h
3312
3313fi
3314if test $opt_strict_posix = yes; then
3315$as_echo "#define STRICT_POSIX 1" >>confdefs.h
3316
3317fi
3318if test $opt_extended_glob = yes ; then
3319$as_echo "#define EXTENDED_GLOB 1" >>confdefs.h
3320
3321fi
3322if test $opt_extglob_default = yes; then
3323$as_echo "#define EXTGLOB_DEFAULT 1" >>confdefs.h
3324
3325else
3326$as_echo "#define EXTGLOB_DEFAULT 0" >>confdefs.h
3327
3328fi
3329if test $opt_cond_command = yes ; then
3330$as_echo "#define COND_COMMAND 1" >>confdefs.h
3331
3332fi
3333if test $opt_cond_regexp = yes ; then
3334$as_echo "#define COND_REGEXP 1" >>confdefs.h
3335
3336fi
3337if test $opt_coproc = yes; then
3338$as_echo "#define COPROCESS_SUPPORT 1" >>confdefs.h
3339
3340fi
3341if test $opt_arith_for_command = yes; then
3342$as_echo "#define ARITH_FOR_COMMAND 1" >>confdefs.h
3343
3344fi
3345if test $opt_net_redirs = yes; then
3346$as_echo "#define NETWORK_REDIRECTIONS 1" >>confdefs.h
3347
3348fi
3349if test $opt_progcomp = yes; then
3350$as_echo "#define PROGRAMMABLE_COMPLETION 1" >>confdefs.h
3351
3352fi
3353if test $opt_multibyte = no; then
3354$as_echo "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h
3355
3356fi
3357if test $opt_debugger = yes; then
3358$as_echo "#define DEBUGGER 1" >>confdefs.h
3359
3360fi
3361if test $opt_casemod_attrs = yes; then
3362$as_echo "#define CASEMOD_ATTRS 1" >>confdefs.h
3363
3364fi
3365if test $opt_casemod_expansions = yes; then
3366$as_echo "#define CASEMOD_EXPANSIONS 1" >>confdefs.h
3367
3368fi
3369if test $opt_dircomplete_expand_default = yes; then
3370$as_echo "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h
3371
3372fi
3373if test $opt_globascii_default = yes; then
3374$as_echo "#define GLOBASCII_DEFAULT 1" >>confdefs.h
3375
3376else
3377$as_echo "#define GLOBASCII_DEFAULT 0" >>confdefs.h
3378
a0c0a00f
CR
3379fi
3380if test $opt_function_import = yes; then
3381$as_echo "#define FUNCTION_IMPORT 1" >>confdefs.h
3382
d233b485
CR
3383fi
3384if test $opt_dev_fd_stat_broken = yes; then
3385$as_echo "#define DEV_FD_STAT_BROKEN 1" >>confdefs.h
3386
ac50fbac
CR
3387fi
3388
3389if test $opt_memscramble = yes; then
3390$as_echo "#define MEMSCRAMBLE 1" >>confdefs.h
3391
3392fi
3393
3394if test "$opt_minimal_config" = yes; then
3395 TESTSCRIPT=run-minimal
3396else
3397 TESTSCRIPT=run-all
3398fi
3399
3400HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET=
3401if test "$opt_separate_help" != no; then
3402 if test "$opt_separate_help" = "yes" ; then
3403 HELPDIR='${datadir}/bash'
3404 else
3405 HELPDIR=$opt_separate_help
3406 fi
3407 HELPDIRDEFINE='-H ${HELPDIR}'
3408 HELPINSTALL='install-help'
3409 HELPFILES_TARGET='helpdoc'
3410fi
3411HELPSTRINGS=
3412if test "$opt_single_longdoc_strings" != "yes"; then
3413 HELPSTRINGS='-S'
3414fi
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
a0c0a00f 3433if test -z "$CFLAGS"; then
8868edaf 3434 want_auto_cflags=1
a0c0a00f 3435fi
ac50fbac
CR
3436
3437echo ""
3438echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
3439echo ""
3440
3441ac_ext=c
3442ac_cpp='$CPP $CPPFLAGS'
3443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3445ac_compiler_gnu=$ac_cv_c_compiler_gnu
3446if test -n "$ac_tool_prefix"; then
3447 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3448set dummy ${ac_tool_prefix}gcc; ac_word=$2
3449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3450$as_echo_n "checking for $ac_word... " >&6; }
3451if ${ac_cv_prog_CC+:} false; then :
3452 $as_echo_n "(cached) " >&6
3453else
3454 if test -n "$CC"; then
3455 ac_cv_prog_CC="$CC" # Let the user override the test.
3456else
3457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3458for as_dir in $PATH
3459do
3460 IFS=$as_save_IFS
3461 test -z "$as_dir" && as_dir=.
3462 for ac_exec_ext in '' $ac_executable_extensions; do
3463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3464 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3466 break 2
b80f6443
JA
3467 fi
3468done
ac50fbac 3469 done
3185942a 3470IFS=$as_save_IFS
ccc6cda3 3471
f73dda09
JA
3472fi
3473fi
3474CC=$ac_cv_prog_CC
3475if test -n "$CC"; then
ac50fbac 3476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3477$as_echo "$CC" >&6; }
f73dda09 3478else
ac50fbac 3479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3480$as_echo "no" >&6; }
f73dda09 3481fi
ccc6cda3 3482
3185942a 3483
f73dda09
JA
3484fi
3485if test -z "$ac_cv_prog_CC"; then
3486 ac_ct_CC=$CC
3487 # Extract the first word of "gcc", so it can be a program name with args.
3488set dummy gcc; ac_word=$2
ac50fbac 3489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3490$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3491if ${ac_cv_prog_ac_ct_CC+:} false; then :
3185942a 3492 $as_echo_n "(cached) " >&6
f73dda09
JA
3493else
3494 if test -n "$ac_ct_CC"; then
3495 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3496else
b80f6443
JA
3497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3498for as_dir in $PATH
3499do
3500 IFS=$as_save_IFS
3501 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3502 for ac_exec_ext in '' $ac_executable_extensions; do
3503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3504 ac_cv_prog_ac_ct_CC="gcc"
ac50fbac 3505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3506 break 2
3507 fi
3508done
ac50fbac 3509 done
3185942a 3510IFS=$as_save_IFS
ccc6cda3 3511
f73dda09
JA
3512fi
3513fi
3514ac_ct_CC=$ac_cv_prog_ac_ct_CC
3515if test -n "$ac_ct_CC"; then
ac50fbac 3516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3185942a 3517$as_echo "$ac_ct_CC" >&6; }
f73dda09 3518else
ac50fbac 3519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3520$as_echo "no" >&6; }
f73dda09 3521fi
ccc6cda3 3522
3185942a
JA
3523 if test "x$ac_ct_CC" = x; then
3524 CC=""
3525 else
3526 case $cross_compiling:$ac_tool_warned in
3527yes:)
ac50fbac 3528{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3185942a
JA
3529$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3530ac_tool_warned=yes ;;
3531esac
3532 CC=$ac_ct_CC
3533 fi
f73dda09
JA
3534else
3535 CC="$ac_cv_prog_CC"
3536fi
bb70624e 3537
f73dda09 3538if test -z "$CC"; then
3185942a
JA
3539 if test -n "$ac_tool_prefix"; then
3540 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
f73dda09 3541set dummy ${ac_tool_prefix}cc; ac_word=$2
ac50fbac 3542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3543$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3544if ${ac_cv_prog_CC+:} false; then :
3185942a 3545 $as_echo_n "(cached) " >&6
ccc6cda3
JA
3546else
3547 if test -n "$CC"; then
3548 ac_cv_prog_CC="$CC" # Let the user override the test.
3549else
b80f6443
JA
3550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3551for as_dir in $PATH
3552do
3553 IFS=$as_save_IFS
3554 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3555 for ac_exec_ext in '' $ac_executable_extensions; do
3556 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3557 ac_cv_prog_CC="${ac_tool_prefix}cc"
ac50fbac 3558 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3559 break 2
3560 fi
3561done
ac50fbac 3562 done
3185942a 3563IFS=$as_save_IFS
f73dda09 3564
ccc6cda3
JA
3565fi
3566fi
f73dda09 3567CC=$ac_cv_prog_CC
ccc6cda3 3568if test -n "$CC"; then
ac50fbac 3569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3570$as_echo "$CC" >&6; }
f73dda09 3571else
ac50fbac 3572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3573$as_echo "no" >&6; }
f73dda09
JA
3574fi
3575
ccc6cda3 3576
3185942a 3577 fi
f73dda09 3578fi
ccc6cda3
JA
3579if test -z "$CC"; then
3580 # Extract the first word of "cc", so it can be a program name with args.
3581set dummy cc; ac_word=$2
ac50fbac 3582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3583$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3584if ${ac_cv_prog_CC+:} false; then :
3185942a 3585 $as_echo_n "(cached) " >&6
ccc6cda3
JA
3586else
3587 if test -n "$CC"; then
3588 ac_cv_prog_CC="$CC" # Let the user override the test.
3589else
ccc6cda3 3590 ac_prog_rejected=no
b80f6443
JA
3591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3592for as_dir in $PATH
3593do
3594 IFS=$as_save_IFS
3595 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3596 for ac_exec_ext in '' $ac_executable_extensions; do
3597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443
JA
3598 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3599 ac_prog_rejected=yes
3600 continue
3601 fi
3602 ac_cv_prog_CC="cc"
ac50fbac 3603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3604 break 2
3605 fi
3606done
ac50fbac 3607 done
3185942a 3608IFS=$as_save_IFS
f73dda09 3609
ccc6cda3
JA
3610if test $ac_prog_rejected = yes; then
3611 # We found a bogon in the path, so make sure we never use it.
3612 set dummy $ac_cv_prog_CC
3613 shift
f73dda09 3614 if test $# != 0; then
ccc6cda3
JA
3615 # We chose a different compiler from the bogus one.
3616 # However, it has the same basename, so the bogon will be chosen
3617 # first if we set CC to just the basename; use the full file name.
3618 shift
0628567a 3619 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ccc6cda3
JA
3620 fi
3621fi
3622fi
3623fi
f73dda09 3624CC=$ac_cv_prog_CC
ccc6cda3 3625if test -n "$CC"; then
ac50fbac 3626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3627$as_echo "$CC" >&6; }
ccc6cda3 3628else
ac50fbac 3629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3630$as_echo "no" >&6; }
ccc6cda3
JA
3631fi
3632
3185942a 3633
f73dda09
JA
3634fi
3635if test -z "$CC"; then
3636 if test -n "$ac_tool_prefix"; then
3185942a 3637 for ac_prog in cl.exe
f73dda09
JA
3638 do
3639 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3640set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ac50fbac 3641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3642$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3643if ${ac_cv_prog_CC+:} false; then :
3185942a 3644 $as_echo_n "(cached) " >&6
bb70624e
JA
3645else
3646 if test -n "$CC"; then
3647 ac_cv_prog_CC="$CC" # Let the user override the test.
3648else
b80f6443
JA
3649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3650for as_dir in $PATH
3651do
3652 IFS=$as_save_IFS
3653 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3654 for ac_exec_ext in '' $ac_executable_extensions; do
3655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3656 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
ac50fbac 3657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3658 break 2
3659 fi
3660done
ac50fbac 3661 done
3185942a 3662IFS=$as_save_IFS
f73dda09 3663
bb70624e
JA
3664fi
3665fi
f73dda09 3666CC=$ac_cv_prog_CC
bb70624e 3667if test -n "$CC"; then
ac50fbac 3668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3669$as_echo "$CC" >&6; }
bb70624e 3670else
ac50fbac 3671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3672$as_echo "no" >&6; }
bb70624e 3673fi
ccc6cda3 3674
3185942a 3675
f73dda09
JA
3676 test -n "$CC" && break
3677 done
ccc6cda3 3678fi
f73dda09
JA
3679if test -z "$CC"; then
3680 ac_ct_CC=$CC
3185942a 3681 for ac_prog in cl.exe
f73dda09
JA
3682do
3683 # Extract the first word of "$ac_prog", so it can be a program name with args.
3684set dummy $ac_prog; ac_word=$2
ac50fbac 3685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3686$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3687if ${ac_cv_prog_ac_ct_CC+:} false; then :
3185942a 3688 $as_echo_n "(cached) " >&6
f73dda09
JA
3689else
3690 if test -n "$ac_ct_CC"; then
3691 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3692else
b80f6443
JA
3693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3694for as_dir in $PATH
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3698 for ac_exec_ext in '' $ac_executable_extensions; do
3699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3700 ac_cv_prog_ac_ct_CC="$ac_prog"
ac50fbac 3701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3702 break 2
3703 fi
3704done
ac50fbac 3705 done
3185942a 3706IFS=$as_save_IFS
ccc6cda3 3707
ccc6cda3 3708fi
ccc6cda3 3709fi
f73dda09
JA
3710ac_ct_CC=$ac_cv_prog_ac_ct_CC
3711if test -n "$ac_ct_CC"; then
ac50fbac 3712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3185942a 3713$as_echo "$ac_ct_CC" >&6; }
f73dda09 3714else
ac50fbac 3715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3716$as_echo "no" >&6; }
ccc6cda3
JA
3717fi
3718
3185942a 3719
f73dda09
JA
3720 test -n "$ac_ct_CC" && break
3721done
ccc6cda3 3722
3185942a
JA
3723 if test "x$ac_ct_CC" = x; then
3724 CC=""
3725 else
3726 case $cross_compiling:$ac_tool_warned in
3727yes:)
ac50fbac 3728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3185942a
JA
3729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3730ac_tool_warned=yes ;;
3731esac
3732 CC=$ac_ct_CC
3733 fi
bb70624e
JA
3734fi
3735
f73dda09
JA
3736fi
3737
b80f6443 3738
ac50fbac 3739test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3741as_fn_error $? "no acceptable C compiler found in \$PATH
3742See \`config.log' for more details" "$LINENO" 5; }
f73dda09
JA
3743
3744# Provide some information about the compiler.
ac50fbac 3745$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3185942a
JA
3746set X $ac_compile
3747ac_compiler=$2
ac50fbac
CR
3748for ac_option in --version -v -V -qversion; do
3749 { { ac_try="$ac_compiler $ac_option >&5"
3185942a
JA
3750case "(($ac_try" in
3751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3752 *) ac_try_echo=$ac_try;;
3753esac
ac50fbac
CR
3754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3755$as_echo "$ac_try_echo"; } >&5
3756 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
f73dda09 3757 ac_status=$?
ac50fbac
CR
3758 if test -s conftest.err; then
3759 sed '10a\
3760... rest of stderr output deleted ...
3761 10q' conftest.err >conftest.er1
3762 cat conftest.er1 >&5
3763 fi
3764 rm -f conftest.er1 conftest.err
3765 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3766 test $ac_status = 0; }
3767done
f73dda09 3768
ac50fbac 3769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 3770/* end confdefs.h. */
f73dda09
JA
3771
3772int
3773main ()
3774{
3775
3776 ;
3777 return 0;
3778}
3779_ACEOF
3780ac_clean_files_save=$ac_clean_files
3185942a 3781ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
f73dda09
JA
3782# Try to create an executable without -o first, disregard a.out.
3783# It will help us diagnose broken compilers, and finding out an intuition
3784# of exeext.
ac50fbac
CR
3785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3786$as_echo_n "checking whether the C compiler works... " >&6; }
3185942a
JA
3787ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3788
3789# The possible output files:
3790ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3791
3792ac_rmfiles=
3793for ac_file in $ac_files
3794do
3795 case $ac_file in
3796 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3797 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3798 esac
3799done
3800rm -f $ac_rmfiles
3801
ac50fbac 3802if { { ac_try="$ac_link_default"
3185942a
JA
3803case "(($ac_try" in
3804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3805 *) ac_try_echo=$ac_try;;
3806esac
ac50fbac
CR
3807eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3808$as_echo "$ac_try_echo"; } >&5
3185942a 3809 (eval "$ac_link_default") 2>&5
f73dda09 3810 ac_status=$?
ac50fbac
CR
3811 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3812 test $ac_status = 0; }; then :
3185942a
JA
3813 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3814# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3815# in a Makefile. We should not override ac_cv_exeext if it was cached,
3816# so that the user can short-circuit this test for compilers unknown to
3817# Autoconf.
3818for ac_file in $ac_files ''
0628567a
JA
3819do
3820 test -f "$ac_file" || continue
f73dda09 3821 case $ac_file in
3185942a 3822 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
0628567a
JA
3823 ;;
3824 [ab].out )
3825 # We found the default executable, but exeext='' is most
3826 # certainly right.
3827 break;;
3828 *.* )
ac50fbac 3829 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3185942a
JA
3830 then :; else
3831 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3832 fi
3833 # We set ac_cv_exeext here because the later test for it is not
3834 # safe: cross compilers may not add the suffix if given an `-o'
3835 # argument, so we may need to know it at that point already.
3836 # Even if this section looks crufty: it has the advantage of
3837 # actually working.
0628567a
JA
3838 break;;
3839 * )
3840 break;;
f73dda09
JA
3841 esac
3842done
3185942a
JA
3843test "$ac_cv_exeext" = no && ac_cv_exeext=
3844
ccc6cda3 3845else
3185942a
JA
3846 ac_file=''
3847fi
ac50fbac
CR
3848if test -z "$ac_file"; then :
3849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850$as_echo "no" >&6; }
3851$as_echo "$as_me: failed program was:" >&5
0628567a
JA
3852sed 's/^/| /' conftest.$ac_ext >&5
3853
ac50fbac 3854{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3856as_fn_error 77 "C compiler cannot create executables
3857See \`config.log' for more details" "$LINENO" 5; }
3858else
3859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3860$as_echo "yes" >&6; }
f73dda09 3861fi
ac50fbac
CR
3862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3863$as_echo_n "checking for C compiler default output file name... " >&6; }
3864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3865$as_echo "$ac_file" >&6; }
f73dda09 3866ac_exeext=$ac_cv_exeext
f73dda09 3867
ac50fbac
CR
3868rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3869ac_clean_files=$ac_clean_files_save
3870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3871$as_echo_n "checking for suffix of executables... " >&6; }
3872if { { ac_try="$ac_link"
3873case "(($ac_try" in
3185942a
JA
3874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3875 *) ac_try_echo=$ac_try;;
3876esac
ac50fbac
CR
3877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3878$as_echo "$ac_try_echo"; } >&5
3879 (eval "$ac_link") 2>&5
f73dda09 3880 ac_status=$?
ac50fbac
CR
3881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3882 test $ac_status = 0; }; then :
f73dda09
JA
3883 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3884# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3885# work properly (i.e., refer to `conftest.exe'), while it won't with
3886# `rm'.
0628567a
JA
3887for ac_file in conftest.exe conftest conftest.*; do
3888 test -f "$ac_file" || continue
f73dda09 3889 case $ac_file in
3185942a 3890 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
f73dda09 3891 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
0628567a 3892 break;;
f73dda09
JA
3893 * ) break;;
3894 esac
3895done
ccc6cda3 3896else
ac50fbac 3897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3899as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3900See \`config.log' for more details" "$LINENO" 5; }
f73dda09 3901fi
ac50fbac
CR
3902rm -f conftest conftest$ac_cv_exeext
3903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3185942a 3904$as_echo "$ac_cv_exeext" >&6; }
f73dda09
JA
3905
3906rm -f conftest.$ac_ext
3907EXEEXT=$ac_cv_exeext
3908ac_exeext=$EXEEXT
ac50fbac
CR
3909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3910/* end confdefs.h. */
3911#include <stdio.h>
3912int
3913main ()
3914{
3915FILE *f = fopen ("conftest.out", "w");
3916 return ferror (f) || fclose (f) != 0;
3917
3918 ;
3919 return 0;
3920}
3921_ACEOF
3922ac_clean_files="$ac_clean_files conftest.out"
3923# Check that the compiler produces executables we can run. If not, either
3924# the compiler is broken, or we cross compile.
3925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3926$as_echo_n "checking whether we are cross compiling... " >&6; }
3927if test "$cross_compiling" != yes; then
3928 { { ac_try="$ac_link"
3929case "(($ac_try" in
3930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3931 *) ac_try_echo=$ac_try;;
3932esac
3933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3934$as_echo "$ac_try_echo"; } >&5
3935 (eval "$ac_link") 2>&5
3936 ac_status=$?
3937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3938 test $ac_status = 0; }
3939 if { ac_try='./conftest$ac_cv_exeext'
3940 { { case "(($ac_try" in
3941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3942 *) ac_try_echo=$ac_try;;
3943esac
3944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3945$as_echo "$ac_try_echo"; } >&5
3946 (eval "$ac_try") 2>&5
3947 ac_status=$?
3948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3949 test $ac_status = 0; }; }; then
3950 cross_compiling=no
3951 else
3952 if test "$cross_compiling" = maybe; then
3953 cross_compiling=yes
3954 else
3955 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3957as_fn_error $? "cannot run C compiled programs.
3958If you meant to cross compile, use \`--host'.
3959See \`config.log' for more details" "$LINENO" 5; }
3960 fi
3961 fi
3962fi
3963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3964$as_echo "$cross_compiling" >&6; }
3965
3966rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3967ac_clean_files=$ac_clean_files_save
3968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3185942a 3969$as_echo_n "checking for suffix of object files... " >&6; }
ac50fbac 3970if ${ac_cv_objext+:} false; then :
3185942a 3971 $as_echo_n "(cached) " >&6
f73dda09 3972else
ac50fbac 3973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 3974/* end confdefs.h. */
f73dda09
JA
3975
3976int
3977main ()
3978{
3979
3980 ;
3981 return 0;
3982}
3983_ACEOF
3984rm -f conftest.o conftest.obj
ac50fbac 3985if { { ac_try="$ac_compile"
3185942a
JA
3986case "(($ac_try" in
3987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3988 *) ac_try_echo=$ac_try;;
3989esac
ac50fbac
CR
3990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3991$as_echo "$ac_try_echo"; } >&5
3185942a 3992 (eval "$ac_compile") 2>&5
f73dda09 3993 ac_status=$?
ac50fbac
CR
3994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3995 test $ac_status = 0; }; then :
3185942a
JA
3996 for ac_file in conftest.o conftest.obj conftest.*; do
3997 test -f "$ac_file" || continue;
f73dda09 3998 case $ac_file in
3185942a 3999 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
f73dda09
JA
4000 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4001 break;;
4002 esac
4003done
4004else
3185942a 4005 $as_echo "$as_me: failed program was:" >&5
0628567a
JA
4006sed 's/^/| /' conftest.$ac_ext >&5
4007
ac50fbac 4008{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 4009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
4010as_fn_error $? "cannot compute suffix of object files: cannot compile
4011See \`config.log' for more details" "$LINENO" 5; }
ccc6cda3 4012fi
f73dda09 4013rm -f conftest.$ac_cv_objext conftest.$ac_ext
ccc6cda3 4014fi
ac50fbac 4015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3185942a 4016$as_echo "$ac_cv_objext" >&6; }
f73dda09
JA
4017OBJEXT=$ac_cv_objext
4018ac_objext=$OBJEXT
ac50fbac 4019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3185942a 4020$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
ac50fbac 4021if ${ac_cv_c_compiler_gnu+:} false; then :
3185942a 4022 $as_echo_n "(cached) " >&6
f73dda09 4023else
ac50fbac 4024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4025/* end confdefs.h. */
f73dda09
JA
4026
4027int
4028main ()
4029{
4030#ifndef __GNUC__
4031 choke me
4032#endif
4033
4034 ;
4035 return 0;
4036}
4037_ACEOF
ac50fbac 4038if ac_fn_c_try_compile "$LINENO"; then :
f73dda09
JA
4039 ac_compiler_gnu=yes
4040else
ac50fbac 4041 ac_compiler_gnu=no
f73dda09 4042fi
3185942a 4043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09
JA
4044ac_cv_c_compiler_gnu=$ac_compiler_gnu
4045
4046fi
ac50fbac 4047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3185942a
JA
4048$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4049if test $ac_compiler_gnu = yes; then
4050 GCC=yes
4051else
4052 GCC=
4053fi
f73dda09
JA
4054ac_test_CFLAGS=${CFLAGS+set}
4055ac_save_CFLAGS=$CFLAGS
ac50fbac 4056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3185942a 4057$as_echo_n "checking whether $CC accepts -g... " >&6; }
ac50fbac 4058if ${ac_cv_prog_cc_g+:} false; then :
3185942a 4059 $as_echo_n "(cached) " >&6
f73dda09 4060else
3185942a
JA
4061 ac_save_c_werror_flag=$ac_c_werror_flag
4062 ac_c_werror_flag=yes
4063 ac_cv_prog_cc_g=no
4064 CFLAGS="-g"
ac50fbac 4065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4066/* end confdefs.h. */
f73dda09
JA
4067
4068int
4069main ()
4070{
ccc6cda3 4071
f73dda09
JA
4072 ;
4073 return 0;
4074}
4075_ACEOF
ac50fbac 4076if ac_fn_c_try_compile "$LINENO"; then :
3185942a
JA
4077 ac_cv_prog_cc_g=yes
4078else
ac50fbac
CR
4079 CFLAGS=""
4080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4081/* end confdefs.h. */
4082
4083int
4084main ()
4085{
4086
4087 ;
4088 return 0;
4089}
4090_ACEOF
ac50fbac 4091if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4092
ac50fbac
CR
4093else
4094 ac_c_werror_flag=$ac_save_c_werror_flag
3185942a 4095 CFLAGS="-g"
ac50fbac 4096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4097/* end confdefs.h. */
4098
4099int
4100main ()
4101{
4102
4103 ;
4104 return 0;
4105}
4106_ACEOF
ac50fbac 4107if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4108 ac_cv_prog_cc_g=yes
3185942a 4109fi
3185942a
JA
4110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4111fi
3185942a 4112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 4113fi
3185942a
JA
4114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4115 ac_c_werror_flag=$ac_save_c_werror_flag
f73dda09 4116fi
ac50fbac 4117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3185942a 4118$as_echo "$ac_cv_prog_cc_g" >&6; }
bb70624e 4119if test "$ac_test_CFLAGS" = set; then
f73dda09 4120 CFLAGS=$ac_save_CFLAGS
bb70624e
JA
4121elif test $ac_cv_prog_cc_g = yes; then
4122 if test "$GCC" = yes; then
ccc6cda3
JA
4123 CFLAGS="-g -O2"
4124 else
bb70624e 4125 CFLAGS="-g"
ccc6cda3
JA
4126 fi
4127else
bb70624e
JA
4128 if test "$GCC" = yes; then
4129 CFLAGS="-O2"
4130 else
4131 CFLAGS=
4132 fi
ccc6cda3 4133fi
ac50fbac 4134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3185942a 4135$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
ac50fbac 4136if ${ac_cv_prog_cc_c89+:} false; then :
3185942a 4137 $as_echo_n "(cached) " >&6
0628567a 4138else
3185942a 4139 ac_cv_prog_cc_c89=no
0628567a 4140ac_save_CC=$CC
ac50fbac 4141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
4142/* end confdefs.h. */
4143#include <stdarg.h>
4144#include <stdio.h>
ac50fbac 4145struct stat;
0628567a
JA
4146/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4147struct buf { int x; };
4148FILE * (*rcsopen) (struct buf *, struct stat *, int);
4149static char *e (p, i)
4150 char **p;
4151 int i;
4152{
4153 return p[i];
4154}
4155static char *f (char * (*g) (char **, int), char **p, ...)
4156{
4157 char *s;
4158 va_list v;
4159 va_start (v,p);
4160 s = g (p, va_arg (v,int));
4161 va_end (v);
4162 return s;
4163}
4164
4165/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4166 function prototypes and stuff, but not '\xHH' hex character constants.
4167 These don't provoke an error unfortunately, instead are silently treated
3185942a 4168 as 'x'. The following induces an error, until -std is added to get
0628567a
JA
4169 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4170 array size at least. It's necessary to write '\x00'==0 to get something
3185942a 4171 that's true only with -std. */
0628567a
JA
4172int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4173
3185942a
JA
4174/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4175 inside strings and character constants. */
4176#define FOO(x) 'x'
4177int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4178
0628567a
JA
4179int test (int i, double x);
4180struct s1 {int (*f) (int a);};
4181struct s2 {int (*f) (double a);};
4182int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4183int argc;
4184char **argv;
4185int
4186main ()
4187{
4188return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4189 ;
4190 return 0;
4191}
4192_ACEOF
3185942a
JA
4193for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4194 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
0628567a
JA
4195do
4196 CC="$ac_save_CC $ac_arg"
ac50fbac 4197 if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4198 ac_cv_prog_cc_c89=$ac_arg
0628567a 4199fi
3185942a
JA
4200rm -f core conftest.err conftest.$ac_objext
4201 test "x$ac_cv_prog_cc_c89" != "xno" && break
0628567a 4202done
3185942a 4203rm -f conftest.$ac_ext
0628567a
JA
4204CC=$ac_save_CC
4205
4206fi
3185942a
JA
4207# AC_CACHE_VAL
4208case "x$ac_cv_prog_cc_c89" in
4209 x)
ac50fbac 4210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3185942a
JA
4211$as_echo "none needed" >&6; } ;;
4212 xno)
ac50fbac 4213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3185942a 4214$as_echo "unsupported" >&6; } ;;
0628567a 4215 *)
3185942a 4216 CC="$CC $ac_cv_prog_cc_c89"
ac50fbac 4217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3185942a 4218$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
0628567a 4219esac
ac50fbac 4220if test "x$ac_cv_prog_cc_c89" != xno; then :
0628567a 4221
ac50fbac 4222fi
0628567a 4223
f73dda09
JA
4224ac_ext=c
4225ac_cpp='$CPP $CPPFLAGS'
4226ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4227ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4228ac_compiler_gnu=$ac_cv_c_compiler_gnu
bb70624e 4229
f73dda09 4230
8868edaf
CR
4231if test -n "$want_auto_cflags"; then
4232 AUTO_CFLAGS="-g ${GCC+-O2}"
4233 AUTO_LDFLAGS="-g ${GCC+-O2}"
4234 STYLE_CFLAGS="${GCC+-Wno-parentheses} ${GCC+-Wno-format-security}"
4235else
4236 AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS=
4237fi
ccc6cda3 4238
b80f6443 4239
8868edaf
CR
4240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
4241$as_echo_n "checking for library containing strerror... " >&6; }
4242if ${ac_cv_search_strerror+:} false; then :
3185942a 4243 $as_echo_n "(cached) " >&6
ccc6cda3 4244else
8868edaf 4245 ac_func_search_save_LIBS=$LIBS
ac50fbac 4246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4247/* end confdefs.h. */
b80f6443 4248
3185942a
JA
4249/* Override any GCC internal prototype to avoid an error.
4250 Use char because int might match the return type of a GCC
4251 builtin and then its argument prototype would still apply. */
b80f6443
JA
4252#ifdef __cplusplus
4253extern "C"
4254#endif
b80f6443
JA
4255char strerror ();
4256int
4257main ()
4258{
3185942a 4259return strerror ();
b80f6443
JA
4260 ;
4261 return 0;
4262}
4263_ACEOF
8868edaf
CR
4264for ac_lib in '' cposix; do
4265 if test -z "$ac_lib"; then
4266 ac_res="none required"
4267 else
4268 ac_res=-l$ac_lib
4269 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4270 fi
4271 if ac_fn_c_try_link "$LINENO"; then :
4272 ac_cv_search_strerror=$ac_res
b80f6443 4273fi
ac50fbac 4274rm -f core conftest.err conftest.$ac_objext \
8868edaf
CR
4275 conftest$ac_exeext
4276 if ${ac_cv_search_strerror+:} false; then :
4277 break
ccc6cda3 4278fi
8868edaf
CR
4279done
4280if ${ac_cv_search_strerror+:} false; then :
ccc6cda3 4281
8868edaf
CR
4282else
4283 ac_cv_search_strerror=no
4284fi
4285rm conftest.$ac_ext
4286LIBS=$ac_func_search_save_LIBS
4287fi
4288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
4289$as_echo "$ac_cv_search_strerror" >&6; }
4290ac_res=$ac_cv_search_strerror
4291if test "$ac_res" != no; then :
4292 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b80f6443 4293
8868edaf 4294fi
b80f6443 4295
f73dda09
JA
4296ac_ext=c
4297ac_cpp='$CPP $CPPFLAGS'
4298ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4299ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4300ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac50fbac 4301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3185942a 4302$as_echo_n "checking how to run the C preprocessor... " >&6; }
ccc6cda3
JA
4303# On Suns, sometimes $CPP names a directory.
4304if test -n "$CPP" && test -d "$CPP"; then
4305 CPP=
4306fi
4307if test -z "$CPP"; then
ac50fbac 4308 if ${ac_cv_prog_CPP+:} false; then :
3185942a 4309 $as_echo_n "(cached) " >&6
f73dda09
JA
4310else
4311 # Double quotes because CPP needs to be expanded
4312 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4313 do
4314 ac_preproc_ok=false
4315for ac_c_preproc_warn_flag in '' yes
4316do
4317 # Use a header file that comes with gcc, so configuring glibc
4318 # with a fresh cross-compiler works.
0628567a
JA
4319 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4320 # <limits.h> exists even on freestanding compilers.
ccc6cda3 4321 # On the NeXT, cc -E runs the code through the compiler's parser,
f73dda09 4322 # not just through cpp. "Syntax error" is here to catch this case.
ac50fbac 4323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
4324/* end confdefs.h. */
4325#ifdef __STDC__
4326# include <limits.h>
4327#else
4328# include <assert.h>
4329#endif
4330 Syntax error
f73dda09 4331_ACEOF
ac50fbac 4332if ac_fn_c_try_cpp "$LINENO"; then :
0628567a 4333
ac50fbac 4334else
f73dda09
JA
4335 # Broken: fails on valid input.
4336continue
4337fi
ac50fbac 4338rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09 4339
3185942a 4340 # OK, works on sane cases. Now check whether nonexistent headers
f73dda09 4341 # can be detected and how.
ac50fbac 4342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4343/* end confdefs.h. */
f73dda09
JA
4344#include <ac_nonexistent.h>
4345_ACEOF
ac50fbac 4346if ac_fn_c_try_cpp "$LINENO"; then :
f73dda09
JA
4347 # Broken: success on invalid input.
4348continue
bb70624e 4349else
f73dda09
JA
4350 # Passes both tests.
4351ac_preproc_ok=:
4352break
4353fi
ac50fbac 4354rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09
JA
4355
4356done
4357# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
ac50fbac
CR
4358rm -f conftest.i conftest.err conftest.$ac_ext
4359if $ac_preproc_ok; then :
f73dda09
JA
4360 break
4361fi
4362
4363 done
4364 ac_cv_prog_CPP=$CPP
4365
4366fi
4367 CPP=$ac_cv_prog_CPP
4368else
4369 ac_cv_prog_CPP=$CPP
4370fi
ac50fbac 4371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3185942a 4372$as_echo "$CPP" >&6; }
f73dda09
JA
4373ac_preproc_ok=false
4374for ac_c_preproc_warn_flag in '' yes
4375do
4376 # Use a header file that comes with gcc, so configuring glibc
4377 # with a fresh cross-compiler works.
0628567a
JA
4378 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4379 # <limits.h> exists even on freestanding compilers.
f73dda09
JA
4380 # On the NeXT, cc -E runs the code through the compiler's parser,
4381 # not just through cpp. "Syntax error" is here to catch this case.
ac50fbac 4382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
4383/* end confdefs.h. */
4384#ifdef __STDC__
4385# include <limits.h>
4386#else
4387# include <assert.h>
4388#endif
4389 Syntax error
f73dda09 4390_ACEOF
ac50fbac 4391if ac_fn_c_try_cpp "$LINENO"; then :
0628567a 4392
ac50fbac 4393else
f73dda09
JA
4394 # Broken: fails on valid input.
4395continue
4396fi
ac50fbac 4397rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09 4398
3185942a 4399 # OK, works on sane cases. Now check whether nonexistent headers
f73dda09 4400 # can be detected and how.
ac50fbac 4401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4402/* end confdefs.h. */
f73dda09
JA
4403#include <ac_nonexistent.h>
4404_ACEOF
ac50fbac 4405if ac_fn_c_try_cpp "$LINENO"; then :
f73dda09
JA
4406 # Broken: success on invalid input.
4407continue
4408else
f73dda09
JA
4409 # Passes both tests.
4410ac_preproc_ok=:
4411break
ccc6cda3 4412fi
ac50fbac 4413rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09
JA
4414
4415done
4416# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
ac50fbac
CR
4417rm -f conftest.i conftest.err conftest.$ac_ext
4418if $ac_preproc_ok; then :
4419
ccc6cda3 4420else
ac50fbac 4421 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 4422$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
4423as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4424See \`config.log' for more details" "$LINENO" 5; }
ccc6cda3 4425fi
ccc6cda3 4426
f73dda09
JA
4427ac_ext=c
4428ac_cpp='$CPP $CPPFLAGS'
4429ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4430ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4431ac_compiler_gnu=$ac_cv_c_compiler_gnu
4432
b80f6443 4433
ac50fbac 4434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3185942a 4435$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
ac50fbac 4436if ${ac_cv_path_GREP+:} false; then :
3185942a
JA
4437 $as_echo_n "(cached) " >&6
4438else
4439 if test -z "$GREP"; then
4440 ac_path_GREP_found=false
4441 # Loop through the user's path and test for each of PROGNAME-LIST
4442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4444do
4445 IFS=$as_save_IFS
4446 test -z "$as_dir" && as_dir=.
ac50fbac 4447 for ac_prog in grep ggrep; do
3185942a
JA
4448 for ac_exec_ext in '' $ac_executable_extensions; do
4449 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
ac50fbac 4450 as_fn_executable_p "$ac_path_GREP" || continue
3185942a
JA
4451# Check for GNU ac_path_GREP and select it if it is found.
4452 # Check for GNU $ac_path_GREP
4453case `"$ac_path_GREP" --version 2>&1` in
4454*GNU*)
4455 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4456*)
4457 ac_count=0
4458 $as_echo_n 0123456789 >"conftest.in"
4459 while :
4460 do
4461 cat "conftest.in" "conftest.in" >"conftest.tmp"
4462 mv "conftest.tmp" "conftest.in"
4463 cp "conftest.in" "conftest.nl"
4464 $as_echo 'GREP' >> "conftest.nl"
4465 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4466 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac50fbac 4467 as_fn_arith $ac_count + 1 && ac_count=$as_val
3185942a
JA
4468 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4469 # Best one so far, save it but keep looking for a better one
4470 ac_cv_path_GREP="$ac_path_GREP"
4471 ac_path_GREP_max=$ac_count
4472 fi
4473 # 10*(2^10) chars as input seems more than enough
4474 test $ac_count -gt 10 && break
4475 done
4476 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4477esac
4478
4479 $ac_path_GREP_found && break 3
4480 done
4481 done
ac50fbac 4482 done
3185942a
JA
4483IFS=$as_save_IFS
4484 if test -z "$ac_cv_path_GREP"; then
ac50fbac 4485 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3185942a
JA
4486 fi
4487else
4488 ac_cv_path_GREP=$GREP
4489fi
4490
4491fi
ac50fbac 4492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3185942a
JA
4493$as_echo "$ac_cv_path_GREP" >&6; }
4494 GREP="$ac_cv_path_GREP"
4495
4496
ac50fbac 4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3185942a 4498$as_echo_n "checking for egrep... " >&6; }
ac50fbac 4499if ${ac_cv_path_EGREP+:} false; then :
3185942a 4500 $as_echo_n "(cached) " >&6
0628567a 4501else
3185942a
JA
4502 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4503 then ac_cv_path_EGREP="$GREP -E"
4504 else
4505 if test -z "$EGREP"; then
4506 ac_path_EGREP_found=false
4507 # Loop through the user's path and test for each of PROGNAME-LIST
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4510do
4511 IFS=$as_save_IFS
4512 test -z "$as_dir" && as_dir=.
ac50fbac 4513 for ac_prog in egrep; do
3185942a
JA
4514 for ac_exec_ext in '' $ac_executable_extensions; do
4515 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
ac50fbac 4516 as_fn_executable_p "$ac_path_EGREP" || continue
3185942a
JA
4517# Check for GNU ac_path_EGREP and select it if it is found.
4518 # Check for GNU $ac_path_EGREP
4519case `"$ac_path_EGREP" --version 2>&1` in
4520*GNU*)
4521 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4522*)
4523 ac_count=0
4524 $as_echo_n 0123456789 >"conftest.in"
4525 while :
4526 do
4527 cat "conftest.in" "conftest.in" >"conftest.tmp"
4528 mv "conftest.tmp" "conftest.in"
4529 cp "conftest.in" "conftest.nl"
4530 $as_echo 'EGREP' >> "conftest.nl"
4531 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4532 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac50fbac 4533 as_fn_arith $ac_count + 1 && ac_count=$as_val
3185942a
JA
4534 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4535 # Best one so far, save it but keep looking for a better one
4536 ac_cv_path_EGREP="$ac_path_EGREP"
4537 ac_path_EGREP_max=$ac_count
0628567a 4538 fi
3185942a
JA
4539 # 10*(2^10) chars as input seems more than enough
4540 test $ac_count -gt 10 && break
4541 done
4542 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4543esac
4544
4545 $ac_path_EGREP_found && break 3
4546 done
4547 done
ac50fbac 4548 done
3185942a
JA
4549IFS=$as_save_IFS
4550 if test -z "$ac_cv_path_EGREP"; then
ac50fbac 4551 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3185942a
JA
4552 fi
4553else
4554 ac_cv_path_EGREP=$EGREP
0628567a 4555fi
0628567a 4556
3185942a
JA
4557 fi
4558fi
ac50fbac 4559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3185942a
JA
4560$as_echo "$ac_cv_path_EGREP" >&6; }
4561 EGREP="$ac_cv_path_EGREP"
0628567a 4562
3185942a 4563
ac50fbac 4564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3185942a 4565$as_echo_n "checking for ANSI C header files... " >&6; }
ac50fbac 4566if ${ac_cv_header_stdc+:} false; then :
3185942a 4567 $as_echo_n "(cached) " >&6
ccc6cda3 4568else
ac50fbac 4569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4570/* end confdefs.h. */
b80f6443
JA
4571#include <stdlib.h>
4572#include <stdarg.h>
4573#include <string.h>
4574#include <float.h>
4575
0628567a
JA
4576int
4577main ()
4578{
4579
4580 ;
4581 return 0;
4582}
b80f6443 4583_ACEOF
ac50fbac 4584if ac_fn_c_try_compile "$LINENO"; then :
b80f6443
JA
4585 ac_cv_header_stdc=yes
4586else
ac50fbac 4587 ac_cv_header_stdc=no
b80f6443 4588fi
3185942a 4589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b80f6443
JA
4590
4591if test $ac_cv_header_stdc = yes; then
4592 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ac50fbac 4593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4594/* end confdefs.h. */
b80f6443
JA
4595#include <string.h>
4596
4597_ACEOF
4598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac
CR
4599 $EGREP "memchr" >/dev/null 2>&1; then :
4600
b80f6443
JA
4601else
4602 ac_cv_header_stdc=no
4603fi
4604rm -f conftest*
4605
4606fi
4607
4608if test $ac_cv_header_stdc = yes; then
4609 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ac50fbac 4610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4611/* end confdefs.h. */
b80f6443
JA
4612#include <stdlib.h>
4613
4614_ACEOF
4615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac
CR
4616 $EGREP "free" >/dev/null 2>&1; then :
4617
b80f6443
JA
4618else
4619 ac_cv_header_stdc=no
4620fi
4621rm -f conftest*
4622
4623fi
4624
4625if test $ac_cv_header_stdc = yes; then
4626 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ac50fbac 4627 if test "$cross_compiling" = yes; then :
b80f6443
JA
4628 :
4629else
ac50fbac 4630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4631/* end confdefs.h. */
b80f6443 4632#include <ctype.h>
3185942a 4633#include <stdlib.h>
b80f6443
JA
4634#if ((' ' & 0x0FF) == 0x020)
4635# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4636# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4637#else
0628567a
JA
4638# define ISLOWER(c) \
4639 (('a' <= (c) && (c) <= 'i') \
4640 || ('j' <= (c) && (c) <= 'r') \
4641 || ('s' <= (c) && (c) <= 'z'))
b80f6443
JA
4642# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4643#endif
4644
4645#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4646int
4647main ()
4648{
4649 int i;
4650 for (i = 0; i < 256; i++)
4651 if (XOR (islower (i), ISLOWER (i))
0628567a 4652 || toupper (i) != TOUPPER (i))
3185942a
JA
4653 return 2;
4654 return 0;
b80f6443
JA
4655}
4656_ACEOF
ac50fbac 4657if ac_fn_c_try_run "$LINENO"; then :
0628567a 4658
ac50fbac
CR
4659else
4660 ac_cv_header_stdc=no
b80f6443 4661fi
ac50fbac
CR
4662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4663 conftest.$ac_objext conftest.beam conftest.$ac_ext
b80f6443 4664fi
3185942a 4665
b80f6443
JA
4666fi
4667fi
ac50fbac 4668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3185942a 4669$as_echo "$ac_cv_header_stdc" >&6; }
b80f6443
JA
4670if test $ac_cv_header_stdc = yes; then
4671
ac50fbac 4672$as_echo "#define STDC_HEADERS 1" >>confdefs.h
b80f6443
JA
4673
4674fi
4675
4676# On IRIX 5.3, sys/types and inttypes.h are conflicting.
ac50fbac
CR
4677for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4678 inttypes.h stdint.h unistd.h
4679do :
4680 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4681ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4682"
4683if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4684 cat >>confdefs.h <<_ACEOF
4685#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4686_ACEOF
b80f6443 4687
ac50fbac 4688fi
b80f6443 4689
ac50fbac 4690done
b80f6443
JA
4691
4692
4693
ac50fbac
CR
4694 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4695if test "x$ac_cv_header_minix_config_h" = xyes; then :
4696 MINIX=yes
4697else
4698 MINIX=
4699fi
b80f6443
JA
4700
4701
ac50fbac 4702 if test "$MINIX" = yes; then
b80f6443 4703
ac50fbac 4704$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
b80f6443 4705
b80f6443 4706
ac50fbac 4707$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
b80f6443 4708
ccc6cda3 4709
ac50fbac 4710$as_echo "#define _MINIX 1" >>confdefs.h
ccc6cda3 4711
3185942a 4712 fi
ccc6cda3 4713
b80f6443 4714
ac50fbac 4715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3185942a 4716$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
ac50fbac 4717if ${ac_cv_safe_to_define___extensions__+:} false; then :
3185942a
JA
4718 $as_echo_n "(cached) " >&6
4719else
ac50fbac 4720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4721/* end confdefs.h. */
4722
ac50fbac
CR
4723# define __EXTENSIONS__ 1
4724 $ac_includes_default
3185942a
JA
4725int
4726main ()
4727{
4728
4729 ;
4730 return 0;
4731}
4732_ACEOF
ac50fbac 4733if ac_fn_c_try_compile "$LINENO"; then :
3185942a
JA
4734 ac_cv_safe_to_define___extensions__=yes
4735else
ac50fbac 4736 ac_cv_safe_to_define___extensions__=no
3185942a 4737fi
3185942a
JA
4738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4739fi
ac50fbac 4740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3185942a
JA
4741$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4742 test $ac_cv_safe_to_define___extensions__ = yes &&
ac50fbac 4743 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
3185942a 4744
ac50fbac 4745 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
3185942a 4746
ac50fbac 4747 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
3185942a 4748
ac50fbac
CR
4749 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4750
4751 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
3185942a 4752
3185942a
JA
4753
4754
4755
4756# Check whether --enable-largefile was given.
ac50fbac 4757if test "${enable_largefile+set}" = set; then :
3185942a
JA
4758 enableval=$enable_largefile;
4759fi
f73dda09 4760
f73dda09 4761if test "$enable_largefile" != no; then
ccc6cda3 4762
ac50fbac 4763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
3185942a 4764$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
ac50fbac 4765if ${ac_cv_sys_largefile_CC+:} false; then :
3185942a 4766 $as_echo_n "(cached) " >&6
bb70624e 4767else
f73dda09
JA
4768 ac_cv_sys_largefile_CC=no
4769 if test "$GCC" != yes; then
4770 ac_save_CC=$CC
4771 while :; do
3185942a
JA
4772 # IRIX 6.2 and later do not support large files by default,
4773 # so use the C compiler's -n32 option if that helps.
ac50fbac 4774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4775/* end confdefs.h. */
f73dda09
JA
4776#include <sys/types.h>
4777 /* Check that off_t can represent 2**63 - 1 correctly.
4778 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4779 since some C++ compilers masquerading as C compilers
4780 incorrectly reject 9223372036854775807. */
4781#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4782 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4783 && LARGE_OFF_T % 2147483647 == 1)
4784 ? 1 : -1];
4785int
4786main ()
4787{
bb70624e 4788
f73dda09
JA
4789 ;
4790 return 0;
4791}
4792_ACEOF
ac50fbac 4793 if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4794 break
f73dda09 4795fi
3185942a
JA
4796rm -f core conftest.err conftest.$ac_objext
4797 CC="$CC -n32"
ac50fbac 4798 if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4799 ac_cv_sys_largefile_CC=' -n32'; break
f73dda09 4800fi
3185942a 4801rm -f core conftest.err conftest.$ac_objext
0628567a 4802 break
f73dda09
JA
4803 done
4804 CC=$ac_save_CC
4805 rm -f conftest.$ac_ext
4806 fi
bb70624e 4807fi
ac50fbac 4808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
3185942a 4809$as_echo "$ac_cv_sys_largefile_CC" >&6; }
f73dda09
JA
4810 if test "$ac_cv_sys_largefile_CC" != no; then
4811 CC=$CC$ac_cv_sys_largefile_CC
4812 fi
bb70624e 4813
ac50fbac 4814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
3185942a 4815$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
ac50fbac 4816if ${ac_cv_sys_file_offset_bits+:} false; then :
3185942a 4817 $as_echo_n "(cached) " >&6
bb70624e 4818else
f73dda09 4819 while :; do
ac50fbac 4820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4821/* end confdefs.h. */
f73dda09
JA
4822#include <sys/types.h>
4823 /* Check that off_t can represent 2**63 - 1 correctly.
4824 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4825 since some C++ compilers masquerading as C compilers
4826 incorrectly reject 9223372036854775807. */
4827#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4828 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4829 && LARGE_OFF_T % 2147483647 == 1)
4830 ? 1 : -1];
4831int
4832main ()
4833{
bb70624e 4834
f73dda09
JA
4835 ;
4836 return 0;
4837}
4838_ACEOF
ac50fbac 4839if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4840 ac_cv_sys_file_offset_bits=no; break
bb70624e 4841fi
3185942a 4842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac50fbac 4843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4844/* end confdefs.h. */
f73dda09
JA
4845#define _FILE_OFFSET_BITS 64
4846#include <sys/types.h>
4847 /* Check that off_t can represent 2**63 - 1 correctly.
4848 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4849 since some C++ compilers masquerading as C compilers
4850 incorrectly reject 9223372036854775807. */
4851#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4852 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4853 && LARGE_OFF_T % 2147483647 == 1)
4854 ? 1 : -1];
4855int
4856main ()
4857{
bb70624e 4858
f73dda09
JA
4859 ;
4860 return 0;
4861}
4862_ACEOF
ac50fbac 4863if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4864 ac_cv_sys_file_offset_bits=64; break
f73dda09 4865fi
3185942a
JA
4866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4867 ac_cv_sys_file_offset_bits=unknown
f73dda09
JA
4868 break
4869done
4870fi
ac50fbac 4871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
3185942a
JA
4872$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4873case $ac_cv_sys_file_offset_bits in #(
4874 no | unknown) ;;
4875 *)
b80f6443 4876cat >>confdefs.h <<_ACEOF
f73dda09 4877#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
b80f6443 4878_ACEOF
3185942a
JA
4879;;
4880esac
4881rm -rf conftest*
4882 if test $ac_cv_sys_file_offset_bits = unknown; then
ac50fbac 4883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
3185942a 4884$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
ac50fbac 4885if ${ac_cv_sys_large_files+:} false; then :
3185942a 4886 $as_echo_n "(cached) " >&6
bb70624e 4887else
f73dda09 4888 while :; do
ac50fbac 4889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4890/* end confdefs.h. */
f73dda09
JA
4891#include <sys/types.h>
4892 /* Check that off_t can represent 2**63 - 1 correctly.
4893 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4894 since some C++ compilers masquerading as C compilers
4895 incorrectly reject 9223372036854775807. */
4896#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4897 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4898 && LARGE_OFF_T % 2147483647 == 1)
4899 ? 1 : -1];
4900int
4901main ()
4902{
4903
4904 ;
4905 return 0;
4906}
4907_ACEOF
ac50fbac 4908if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4909 ac_cv_sys_large_files=no; break
bb70624e 4910fi
3185942a 4911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac50fbac 4912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4913/* end confdefs.h. */
f73dda09
JA
4914#define _LARGE_FILES 1
4915#include <sys/types.h>
4916 /* Check that off_t can represent 2**63 - 1 correctly.
4917 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4918 since some C++ compilers masquerading as C compilers
4919 incorrectly reject 9223372036854775807. */
4920#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4921 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4922 && LARGE_OFF_T % 2147483647 == 1)
4923 ? 1 : -1];
4924int
4925main ()
4926{
bb70624e 4927
f73dda09
JA
4928 ;
4929 return 0;
4930}
4931_ACEOF
ac50fbac 4932if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4933 ac_cv_sys_large_files=1; break
f73dda09 4934fi
3185942a
JA
4935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4936 ac_cv_sys_large_files=unknown
f73dda09
JA
4937 break
4938done
4939fi
ac50fbac 4940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
3185942a
JA
4941$as_echo "$ac_cv_sys_large_files" >&6; }
4942case $ac_cv_sys_large_files in #(
4943 no | unknown) ;;
4944 *)
b80f6443 4945cat >>confdefs.h <<_ACEOF
f73dda09 4946#define _LARGE_FILES $ac_cv_sys_large_files
b80f6443 4947_ACEOF
3185942a
JA
4948;;
4949esac
4950rm -rf conftest*
4951 fi
ac50fbac
CR
4952
4953
f73dda09 4954fi
cce855bc 4955
b80f6443
JA
4956
4957
0628567a 4958SIGNAMES_O=
b72432fd
JA
4959SIGNAMES_H=lsignames.h
4960
b80f6443
JA
4961
4962
0628567a 4963CROSS_COMPILE=
cce855bc
JA
4964if test "x$cross_compiling" = "xyes"; then
4965 case "${host}" in
28ef6c31 4966 *-cygwin*)
cce855bc 4967 cross_cache=${srcdir}/cross-build/cygwin32.cache
cce855bc 4968 ;;
95732b49
JA
4969 *-mingw*)
4970 cross_cache=${srcdir}/cross-build/cygwin32.cache
4971 ;;
b72432fd
JA
4972 i[3456]86-*-beos*)
4973 cross_cache=${srcdir}/cross-build/x86-beos.cache
b72432fd 4974 ;;
d233b485
CR
4975 *-qnx*)
4976 cross_cache=${srcdir}/cross-build/qnx.cache
4977 ;;
b72432fd 4978 *) echo "configure: cross-compiling for $host is not supported" >&2
cce855bc
JA
4979 ;;
4980 esac
b72432fd
JA
4981 if test -n "${cross_cache}" && test -r "${cross_cache}"; then
4982 echo "loading cross-build cache file ${cross_cache}"
4983 . ${cross_cache}
4984 fi
4985 unset cross_cache
0628567a 4986 SIGNAMES_O='signames.o'
95732b49
JA
4987 CROSS_COMPILE='-DCROSS_COMPILING'
4988
cce855bc
JA
4989fi
4990
b80f6443 4991
0628567a 4992
b80f6443 4993
ac50fbac
CR
4994CFLAGS=${CFLAGS-"$AUTO_CFLAGS"}
4995# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX
ccc6cda3 4996
cce855bc
JA
4997if test "$opt_profiling" = "yes"; then
4998 PROFILE_FLAGS=-pg
b72432fd 4999 case "$host_os" in
d233b485 5000 solaris2*|linux*) ;;
b72432fd
JA
5001 *) opt_static_link=yes ;;
5002 esac
7117c2d2 5003 DEBUG= MALLOC_DEBUG=
cce855bc
JA
5004fi
5005
ac50fbac
CR
5006prefer_shared=yes
5007prefer_static=no
5008
cce855bc 5009if test "$opt_static_link" = yes; then
ac50fbac
CR
5010 prefer_static=yes
5011 prefer_shared=no
f73dda09
JA
5012 # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
5013 if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
b72432fd 5014 STATIC_LD="-static"
f73dda09 5015 case "$host_os" in
d233b485 5016 solaris2*|linux*) ;;
f73dda09
JA
5017 *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental
5018 esac
cce855bc
JA
5019 fi
5020fi
5021
ac50fbac
CR
5022# set the appropriate make variables for building the "build tools"
5023# modify defaults based on whether or not we are cross compiling, since the
5024# options for the target host may not be appropriate for the build host
b80f6443 5025if test "X$cross_compiling" = "Xno"; then
ac50fbac
CR
5026 CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'}
5027 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)'
d233b485
CR
5028 if test X"$opt_profiling" = Xyes; then
5029 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(BASE_LDFLAGS)'}
5030 else
5031 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'}
5032 fi
ac50fbac 5033 # CFLAGS set above to default value if not passed in environment
8868edaf
CR
5034 if test -n "$want_auto_cflags" ; then
5035 CFLAGS_FOR_BUILD="${CFLAGS} ${STYLE_CFLAGS}"
5036 else
5037 CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'}
5038 fi
ac50fbac 5039 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'}
b80f6443 5040else
ac50fbac 5041 CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"}
b80f6443
JA
5042 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
5043 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
ac50fbac
CR
5044 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"}
5045 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""}
b80f6443
JA
5046fi
5047
ac50fbac 5048
7117c2d2 5049
b80f6443
JA
5050
5051
5052
5053
5054
5055
5056
5057
5058
f73dda09 5059if test $ac_cv_c_compiler_gnu = yes; then
ac50fbac 5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
3185942a 5061$as_echo_n "checking whether $CC needs -traditional... " >&6; }
ac50fbac 5062if ${ac_cv_prog_gcc_traditional+:} false; then :
3185942a 5063 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5064else
5065 ac_pattern="Autoconf.*'x'"
ac50fbac 5066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5067/* end confdefs.h. */
ccc6cda3
JA
5068#include <sgtty.h>
5069Autoconf TIOCGETP
f73dda09 5070_ACEOF
ccc6cda3 5071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 5072 $EGREP "$ac_pattern" >/dev/null 2>&1; then :
ccc6cda3
JA
5073 ac_cv_prog_gcc_traditional=yes
5074else
ccc6cda3
JA
5075 ac_cv_prog_gcc_traditional=no
5076fi
5077rm -f conftest*
5078
b80f6443 5079
ccc6cda3 5080 if test $ac_cv_prog_gcc_traditional = no; then
ac50fbac 5081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5082/* end confdefs.h. */
ccc6cda3
JA
5083#include <termio.h>
5084Autoconf TCGETA
f73dda09 5085_ACEOF
ccc6cda3 5086if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 5087 $EGREP "$ac_pattern" >/dev/null 2>&1; then :
ccc6cda3
JA
5088 ac_cv_prog_gcc_traditional=yes
5089fi
5090rm -f conftest*
5091
5092 fi
5093fi
ac50fbac 5094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
3185942a 5095$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
ccc6cda3
JA
5096 if test $ac_cv_prog_gcc_traditional = yes; then
5097 CC="$CC -traditional"
5098 fi
5099fi
5100
b80f6443
JA
5101
5102
f73dda09 5103if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no"
b72432fd 5104then
f73dda09
JA
5105 # If the user specified --with-installed-readline=PREFIX and PREFIX
5106 # is not `yes', set ac_cv_rl_prefix to PREFIX
5107 test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline
b72432fd 5108
b80f6443 5109
bb70624e
JA
5110if test "X$bash_cv_termcap_lib" = "X"; then
5111_bash_needmsg=yes
5112else
ac50fbac 5113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 5114$as_echo_n "checking which library has the termcap functions... " >&6; }
bb70624e
JA
5115_bash_needmsg=
5116fi
ac50fbac 5117if ${bash_cv_termcap_lib+:} false; then :
3185942a 5118 $as_echo_n "(cached) " >&6
bb70624e 5119else
ac50fbac
CR
5120 ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
5121if test "x$ac_cv_func_tgetent" = xyes; then :
5122 bash_cv_termcap_lib=libc
5123else
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
5125$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
5126if ${ac_cv_lib_termcap_tgetent+:} false; then :
3185942a 5127 $as_echo_n "(cached) " >&6
b80f6443 5128else
ac50fbac
CR
5129 ac_check_lib_save_LIBS=$LIBS
5130LIBS="-ltermcap $LIBS"
5131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5132/* end confdefs.h. */
0628567a 5133
3185942a
JA
5134/* Override any GCC internal prototype to avoid an error.
5135 Use char because int might match the return type of a GCC
5136 builtin and then its argument prototype would still apply. */
b80f6443
JA
5137#ifdef __cplusplus
5138extern "C"
b80f6443 5139#endif
b80f6443 5140char tgetent ();
0628567a
JA
5141int
5142main ()
5143{
3185942a 5144return tgetent ();
b80f6443
JA
5145 ;
5146 return 0;
5147}
5148_ACEOF
ac50fbac
CR
5149if ac_fn_c_try_link "$LINENO"; then :
5150 ac_cv_lib_termcap_tgetent=yes
b80f6443 5151else
ac50fbac 5152 ac_cv_lib_termcap_tgetent=no
b80f6443 5153fi
ac50fbac
CR
5154rm -f core conftest.err conftest.$ac_objext \
5155 conftest$ac_exeext conftest.$ac_ext
5156LIBS=$ac_check_lib_save_LIBS
b80f6443 5157fi
ac50fbac 5158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
3185942a 5159$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
ac50fbac 5160if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
bb70624e
JA
5161 bash_cv_termcap_lib=libtermcap
5162else
ac50fbac 5163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
3185942a 5164$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
ac50fbac 5165if ${ac_cv_lib_tinfo_tgetent+:} false; then :
3185942a 5166 $as_echo_n "(cached) " >&6
bb70624e 5167else
f73dda09
JA
5168 ac_check_lib_save_LIBS=$LIBS
5169LIBS="-ltinfo $LIBS"
ac50fbac 5170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5171/* end confdefs.h. */
f73dda09 5172
3185942a
JA
5173/* Override any GCC internal prototype to avoid an error.
5174 Use char because int might match the return type of a GCC
5175 builtin and then its argument prototype would still apply. */
f73dda09
JA
5176#ifdef __cplusplus
5177extern "C"
5178#endif
f73dda09
JA
5179char tgetent ();
5180int
5181main ()
5182{
3185942a 5183return tgetent ();
f73dda09
JA
5184 ;
5185 return 0;
5186}
5187_ACEOF
ac50fbac 5188if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5189 ac_cv_lib_tinfo_tgetent=yes
5190else
ac50fbac 5191 ac_cv_lib_tinfo_tgetent=no
f73dda09 5192fi
ac50fbac
CR
5193rm -f core conftest.err conftest.$ac_objext \
5194 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5195LIBS=$ac_check_lib_save_LIBS
5196fi
ac50fbac 5197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
3185942a 5198$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
ac50fbac 5199if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
7117c2d2 5200 bash_cv_termcap_lib=libtinfo
f73dda09 5201else
ac50fbac 5202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
3185942a 5203$as_echo_n "checking for tgetent in -lcurses... " >&6; }
ac50fbac 5204if ${ac_cv_lib_curses_tgetent+:} false; then :
3185942a 5205 $as_echo_n "(cached) " >&6
f73dda09
JA
5206else
5207 ac_check_lib_save_LIBS=$LIBS
5208LIBS="-lcurses $LIBS"
ac50fbac 5209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5210/* end confdefs.h. */
b72432fd 5211
3185942a
JA
5212/* Override any GCC internal prototype to avoid an error.
5213 Use char because int might match the return type of a GCC
5214 builtin and then its argument prototype would still apply. */
f73dda09
JA
5215#ifdef __cplusplus
5216extern "C"
5217#endif
f73dda09
JA
5218char tgetent ();
5219int
5220main ()
5221{
3185942a 5222return tgetent ();
f73dda09
JA
5223 ;
5224 return 0;
5225}
5226_ACEOF
ac50fbac 5227if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5228 ac_cv_lib_curses_tgetent=yes
5229else
ac50fbac 5230 ac_cv_lib_curses_tgetent=no
f73dda09 5231fi
ac50fbac
CR
5232rm -f core conftest.err conftest.$ac_objext \
5233 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5234LIBS=$ac_check_lib_save_LIBS
5235fi
ac50fbac 5236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
3185942a 5237$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
ac50fbac 5238if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
bb70624e
JA
5239 bash_cv_termcap_lib=libcurses
5240else
ac50fbac 5241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
3185942a 5242$as_echo_n "checking for tgetent in -lncurses... " >&6; }
ac50fbac 5243if ${ac_cv_lib_ncurses_tgetent+:} false; then :
3185942a 5244 $as_echo_n "(cached) " >&6
bb70624e 5245else
f73dda09 5246 ac_check_lib_save_LIBS=$LIBS
bb70624e 5247LIBS="-lncurses $LIBS"
ac50fbac 5248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5249/* end confdefs.h. */
f73dda09 5250
3185942a
JA
5251/* Override any GCC internal prototype to avoid an error.
5252 Use char because int might match the return type of a GCC
5253 builtin and then its argument prototype would still apply. */
f73dda09
JA
5254#ifdef __cplusplus
5255extern "C"
5256#endif
f73dda09
JA
5257char tgetent ();
5258int
5259main ()
5260{
3185942a 5261return tgetent ();
f73dda09
JA
5262 ;
5263 return 0;
5264}
5265_ACEOF
ac50fbac 5266if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5267 ac_cv_lib_ncurses_tgetent=yes
5268else
ac50fbac 5269 ac_cv_lib_ncurses_tgetent=no
f73dda09 5270fi
ac50fbac
CR
5271rm -f core conftest.err conftest.$ac_objext \
5272 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5273LIBS=$ac_check_lib_save_LIBS
5274fi
ac50fbac 5275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
3185942a 5276$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
ac50fbac 5277if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
f73dda09 5278 bash_cv_termcap_lib=libncurses
d233b485
CR
5279else
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
5281$as_echo_n "checking for tgetent in -lncursesw... " >&6; }
5282if ${ac_cv_lib_ncursesw_tgetent+:} false; then :
5283 $as_echo_n "(cached) " >&6
5284else
5285 ac_check_lib_save_LIBS=$LIBS
5286LIBS="-lncursesw $LIBS"
5287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5288/* end confdefs.h. */
5289
5290/* Override any GCC internal prototype to avoid an error.
5291 Use char because int might match the return type of a GCC
5292 builtin and then its argument prototype would still apply. */
5293#ifdef __cplusplus
5294extern "C"
5295#endif
5296char tgetent ();
5297int
5298main ()
5299{
5300return tgetent ();
5301 ;
5302 return 0;
5303}
5304_ACEOF
5305if ac_fn_c_try_link "$LINENO"; then :
5306 ac_cv_lib_ncursesw_tgetent=yes
5307else
5308 ac_cv_lib_ncursesw_tgetent=no
5309fi
5310rm -f core conftest.err conftest.$ac_objext \
5311 conftest$ac_exeext conftest.$ac_ext
5312LIBS=$ac_check_lib_save_LIBS
5313fi
5314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
5315$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; }
5316if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then :
5317 bash_cv_termcap_lib=libncursesw
bb70624e 5318else
f73dda09 5319 bash_cv_termcap_lib=gnutermcap
bb70624e 5320fi
bb70624e 5321
bb70624e
JA
5322fi
5323
5324fi
5325
5326fi
5327
5328fi
5329
b80f6443
JA
5330fi
5331
d233b485
CR
5332fi
5333
bb70624e 5334if test "X$_bash_needmsg" = "Xyes"; then
ac50fbac 5335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 5336$as_echo_n "checking which library has the termcap functions... " >&6; }
bb70624e 5337fi
ac50fbac 5338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5
3185942a 5339$as_echo "using $bash_cv_termcap_lib" >&6; }
bb70624e
JA
5340if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
5341LDFLAGS="$LDFLAGS -L./lib/termcap"
5342TERMCAP_LIB="./lib/termcap/libtermcap.a"
5343TERMCAP_DEP="./lib/termcap/libtermcap.a"
5344elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
5345TERMCAP_LIB=-ltermcap
5346TERMCAP_DEP=
f73dda09
JA
5347elif test $bash_cv_termcap_lib = libtinfo; then
5348TERMCAP_LIB=-ltinfo
5349TERMCAP_DEP=
bb70624e
JA
5350elif test $bash_cv_termcap_lib = libncurses; then
5351TERMCAP_LIB=-lncurses
5352TERMCAP_DEP=
b80f6443
JA
5353elif test $bash_cv_termcap_lib = libc; then
5354TERMCAP_LIB=
5355TERMCAP_DEP=
bb70624e
JA
5356else
5357TERMCAP_LIB=-lcurses
5358TERMCAP_DEP=
5359fi
5360
b80f6443
JA
5361
5362
5363
ac50fbac 5364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of installed readline library" >&5
3185942a 5365$as_echo_n "checking version of installed readline library... " >&6; }
f73dda09
JA
5366
5367# What a pain in the ass this is.
5368
5369# save cpp and ld options
5370_save_CFLAGS="$CFLAGS"
5371_save_LDFLAGS="$LDFLAGS"
5372_save_LIBS="$LIBS"
5373
5374# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
5375# allows the caller to do something like $_rl_prefix=$withval if the user
5376# specifies --with-installed-readline=PREFIX as an argument to configure
5377
5378if test -z "$ac_cv_rl_prefix"; then
5379test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
5380fi
5381
5382eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
5383eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
5384
5385LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
5386CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
5387LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
5388
ac50fbac 5389if ${ac_cv_rl_version+:} false; then :
3185942a 5390 $as_echo_n "(cached) " >&6
b80f6443 5391else
ac50fbac 5392 if test "$cross_compiling" = yes; then :
d233b485 5393 ac_cv_rl_version='8.0'
f73dda09 5394else
ac50fbac 5395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5396/* end confdefs.h. */
f73dda09
JA
5397
5398#include <stdio.h>
5399#include <readline/readline.h>
8868edaf 5400#include <stdlib.h>
f73dda09 5401
95732b49
JA
5402extern int rl_gnu_readline_p;
5403
8868edaf 5404int
f73dda09
JA
5405main()
5406{
5407 FILE *fp;
5408 fp = fopen("conftest.rlv", "w");
95732b49
JA
5409 if (fp == 0)
5410 exit(1);
5411 if (rl_gnu_readline_p != 1)
5412 fprintf(fp, "0.0\n");
5413 else
5414 fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
f73dda09
JA
5415 fclose(fp);
5416 exit(0);
5417}
5418
5419_ACEOF
ac50fbac 5420if ac_fn_c_try_run "$LINENO"; then :
f73dda09
JA
5421 ac_cv_rl_version=`cat conftest.rlv`
5422else
ac50fbac 5423 ac_cv_rl_version='0.0'
f73dda09 5424fi
ac50fbac
CR
5425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5426 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 5427fi
3185942a 5428
b80f6443
JA
5429fi
5430
f73dda09
JA
5431
5432CFLAGS="$_save_CFLAGS"
5433LDFLAGS="$_save_LDFLAGS"
5434LIBS="$_save_LIBS"
5435
5436RL_MAJOR=0
5437RL_MINOR=0
5438
5439# (
5440case "$ac_cv_rl_version" in
54412*|3*|4*|5*|6*|7*|8*|9*)
5442 RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
7117c2d2 5443 RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'`
f73dda09
JA
5444 ;;
5445esac
5446
5447# (((
5448case $RL_MAJOR in
5449[0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;;
5450[0-9]) _RL_MAJOR=0$RL_MAJOR ;;
5451*) _RL_MAJOR=00 ;;
5452esac
5453
5454# (((
5455case $RL_MINOR in
5456[0-9][0-9]) _RL_MINOR=$RL_MINOR ;;
5457[0-9]) _RL_MINOR=0$RL_MINOR ;;
5458*) _RL_MINOR=00 ;;
5459esac
5460
5461RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
5462
5463# Readline versions greater than 4.2 have these defines in readline.h
5464
5465if test $ac_cv_rl_version = '0.0' ; then
ac50fbac 5466 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not test version of installed readline library." >&5
3185942a 5467$as_echo "$as_me: WARNING: Could not test version of installed readline library." >&2;}
f73dda09
JA
5468elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
5469 # set these for use by the caller
5470 RL_PREFIX=$ac_cv_rl_prefix
5471 RL_LIBDIR=$ac_cv_rl_libdir
5472 RL_INCLUDEDIR=$ac_cv_rl_includedir
ac50fbac 5473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5
3185942a 5474$as_echo "$ac_cv_rl_version" >&6; }
f73dda09
JA
5475else
5476
b80f6443
JA
5477
5478cat >>confdefs.h <<_ACEOF
f73dda09 5479#define RL_READLINE_VERSION $RL_VERSION
b80f6443 5480_ACEOF
f73dda09 5481
b80f6443
JA
5482
5483cat >>confdefs.h <<_ACEOF
f73dda09 5484#define RL_VERSION_MAJOR $RL_MAJOR
b80f6443 5485_ACEOF
f73dda09 5486
b80f6443
JA
5487
5488cat >>confdefs.h <<_ACEOF
f73dda09 5489#define RL_VERSION_MINOR $RL_MINOR
b80f6443
JA
5490_ACEOF
5491
5492
5493
5494
5495
f73dda09
JA
5496
5497# set these for use by the caller
5498RL_PREFIX=$ac_cv_rl_prefix
5499RL_LIBDIR=$ac_cv_rl_libdir
5500RL_INCLUDEDIR=$ac_cv_rl_includedir
bb70624e 5501
ac50fbac 5502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5
3185942a 5503$as_echo "$ac_cv_rl_version" >&6; }
bb70624e 5504
f73dda09 5505fi
bb70624e 5506
b80f6443 5507
f73dda09 5508 case "$ac_cv_rl_version" in
d233b485 5509 8*|9*) ;;
f73dda09 5510 *) opt_with_installed_readline=no
ac50fbac 5511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5
3185942a 5512$as_echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;}
ac50fbac 5513 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using private bash version" >&5
3185942a 5514$as_echo "$as_me: WARNING: using private bash version" >&2;}
bb70624e
JA
5515 ;;
5516 esac
bb70624e
JA
5517fi
5518
95732b49 5519TILDE_LIB=-ltilde
bb70624e 5520if test $opt_readline = yes; then
ac50fbac 5521 $as_echo "#define READLINE 1" >>confdefs.h
bb70624e 5522
f73dda09 5523 if test "$opt_with_installed_readline" != "no" ; then
b80f6443
JA
5524 case "$opt_with_installed_readline" in
5525 yes) RL_INCLUDE= ;;
5526 *) case "$RL_INCLUDEDIR" in
5527 /usr/include) ;;
5528 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
5529 esac
5530 ;;
f73dda09 5531 esac
bb70624e 5532 READLINE_DEP=
95732b49
JA
5533 READLINE_LIB=-lreadline
5534 # section for OS versions that don't allow unresolved symbols
5535 # to be compiled into dynamic libraries.
5536 case "$host_os" in
5537 cygwin*) TILDE_LIB= ;;
5538 esac
bb70624e
JA
5539 else
5540 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5541 READLINE_DEP='$(READLINE_LIBRARY)'
95732b49
JA
5542 # section for OS versions that ship an older/broken version of
5543 # readline as a standard dynamic library and don't allow a
5544 # static version specified as -llibname to override the
5545 # dynamic version
5546 case "${host_os}" in
89a92869 5547 darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
95732b49
JA
5548 *) READLINE_LIB=-lreadline ;;
5549 esac
bb70624e
JA
5550 fi
5551else
5552 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5553 READLINE_LIB= READLINE_DEP=
5554fi
5555if test $opt_history = yes || test $opt_bang_history = yes; then
5556 if test $opt_history = yes; then
ac50fbac 5557 $as_echo "#define HISTORY 1" >>confdefs.h
bb70624e
JA
5558
5559 fi
5560 if test $opt_bang_history = yes; then
ac50fbac 5561 $as_echo "#define BANG_HISTORY 1" >>confdefs.h
b72432fd
JA
5562
5563 fi
f73dda09
JA
5564 if test "$opt_with_installed_readline" != "no"; then
5565 HIST_LIBDIR=$RL_LIBDIR
b72432fd 5566 HISTORY_DEP=
95732b49 5567 HISTORY_LIB=-lhistory
b80f6443
JA
5568 case "$opt_with_installed_readline" in
5569 yes) RL_INCLUDE= ;;
5570 *) case "$RL_INCLUDEDIR" in
5571 /usr/include) ;;
5572 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
5573 esac
5574 ;;
f73dda09 5575 esac
b72432fd
JA
5576 else
5577 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5578 HISTORY_DEP='$(HISTORY_LIBRARY)'
95732b49
JA
5579 # section for OS versions that ship an older version of
5580 # readline as a standard dynamic library and don't allow a
5581 # static version specified as -llibname to override the
5582 # dynamic version
5583 case "${host_os}" in
89a92869 5584 darwin[89]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;;
95732b49
JA
5585 *) HISTORY_LIB=-lhistory ;;
5586 esac
b72432fd
JA
5587 fi
5588else
5589 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5590 HISTORY_LIB= HISTORY_DEP=
5591fi
5592
b80f6443
JA
5593
5594
5595
5596
5597
5598
5599
5600
5601
95732b49 5602
ccc6cda3
JA
5603# Find a good install program. We prefer a C program (faster),
5604# so one script is as good as another. But avoid the broken or
5605# incompatible versions:
5606# SysV /etc/install, /usr/sbin/install
5607# SunOS /usr/etc/install
5608# IRIX /sbin/install
5609# AIX /bin/install
f73dda09 5610# AmigaOS /C/install, which installs bootblocks on floppy discs
bb70624e 5611# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ccc6cda3
JA
5612# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5613# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
0628567a 5614# OS/2's system install, which has a completely different semantic
ccc6cda3 5615# ./install, which can be erroneously created by make from ./install.sh.
3185942a 5616# Reject install programs that cannot install multiple files.
ac50fbac 5617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3185942a 5618$as_echo_n "checking for a BSD-compatible install... " >&6; }
ccc6cda3 5619if test -z "$INSTALL"; then
ac50fbac 5620if ${ac_cv_path_install+:} false; then :
3185942a 5621 $as_echo_n "(cached) " >&6
ccc6cda3 5622else
b80f6443
JA
5623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5624for as_dir in $PATH
5625do
5626 IFS=$as_save_IFS
5627 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5628 # Account for people who put trailing slashes in PATH elements.
5629case $as_dir/ in #((
5630 ./ | .// | /[cC]/* | \
b80f6443 5631 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
ac50fbac 5632 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
b80f6443
JA
5633 /usr/ucb/* ) ;;
5634 *)
5635 # OSF1 and SCO ODT 3.0 have their own names for install.
5636 # Don't use installbsd from OSF since it installs stuff as root
5637 # by default.
5638 for ac_prog in ginstall scoinst install; do
5639 for ac_exec_ext in '' $ac_executable_extensions; do
ac50fbac 5640 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
0628567a
JA
5641 if test $ac_prog = install &&
5642 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5643 # AIX install. It has an incompatible calling convention.
5644 :
5645 elif test $ac_prog = install &&
5646 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5647 # program-specific install script used by HP pwplus--don't use.
5648 :
5649 else
3185942a
JA
5650 rm -rf conftest.one conftest.two conftest.dir
5651 echo one > conftest.one
5652 echo two > conftest.two
5653 mkdir conftest.dir
5654 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5655 test -s conftest.one && test -s conftest.two &&
5656 test -s conftest.dir/conftest.one &&
5657 test -s conftest.dir/conftest.two
5658 then
5659 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5660 break 3
5661 fi
0628567a
JA
5662 fi
5663 fi
ccc6cda3 5664 done
b80f6443
JA
5665 done
5666 ;;
5667esac
3185942a 5668
ac50fbac 5669 done
3185942a 5670IFS=$as_save_IFS
b80f6443 5671
3185942a 5672rm -rf conftest.one conftest.two conftest.dir
ccc6cda3
JA
5673
5674fi
5675 if test "${ac_cv_path_install+set}" = set; then
f73dda09 5676 INSTALL=$ac_cv_path_install
ccc6cda3 5677 else
3185942a
JA
5678 # As a last resort, use the slow shell script. Don't cache a
5679 # value for INSTALL within a source directory, because that will
ccc6cda3 5680 # break other packages using the cache if that directory is
3185942a 5681 # removed, or if the value is a relative name.
f73dda09 5682 INSTALL=$ac_install_sh
ccc6cda3
JA
5683 fi
5684fi
ac50fbac 5685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3185942a 5686$as_echo "$INSTALL" >&6; }
ccc6cda3
JA
5687
5688# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5689# It thinks the first close brace ends the variable substitution.
5690test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5691
f73dda09 5692test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
bb70624e 5693
ccc6cda3
JA
5694test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5695
ac50fbac
CR
5696if test -n "$ac_tool_prefix"; then
5697 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5698set dummy ${ac_tool_prefix}ar; ac_word=$2
5699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5700$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5701if ${ac_cv_prog_AR+:} false; then :
3185942a 5702 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5703else
5704 if test -n "$AR"; then
5705 ac_cv_prog_AR="$AR" # Let the user override the test.
5706else
b80f6443
JA
5707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5708for as_dir in $PATH
5709do
5710 IFS=$as_save_IFS
5711 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5712 for ac_exec_ext in '' $ac_executable_extensions; do
5713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5714 ac_cv_prog_AR="${ac_tool_prefix}ar"
5715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5716 break 2
5717 fi
5718done
ac50fbac 5719 done
3185942a 5720IFS=$as_save_IFS
f73dda09 5721
ccc6cda3
JA
5722fi
5723fi
f73dda09 5724AR=$ac_cv_prog_AR
ccc6cda3 5725if test -n "$AR"; then
ac50fbac 5726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
3185942a 5727$as_echo "$AR" >&6; }
ccc6cda3 5728else
ac50fbac
CR
5729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730$as_echo "no" >&6; }
5731fi
5732
5733
5734fi
5735if test -z "$ac_cv_prog_AR"; then
5736 ac_ct_AR=$AR
5737 # Extract the first word of "ar", so it can be a program name with args.
5738set dummy ar; ac_word=$2
5739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5740$as_echo_n "checking for $ac_word... " >&6; }
5741if ${ac_cv_prog_ac_ct_AR+:} false; then :
5742 $as_echo_n "(cached) " >&6
5743else
5744 if test -n "$ac_ct_AR"; then
5745 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5746else
5747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5748for as_dir in $PATH
5749do
5750 IFS=$as_save_IFS
5751 test -z "$as_dir" && as_dir=.
5752 for ac_exec_ext in '' $ac_executable_extensions; do
5753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5754 ac_cv_prog_ac_ct_AR="ar"
5755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5756 break 2
5757 fi
5758done
5759 done
5760IFS=$as_save_IFS
5761
5762fi
5763fi
5764ac_ct_AR=$ac_cv_prog_ac_ct_AR
5765if test -n "$ac_ct_AR"; then
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5767$as_echo "$ac_ct_AR" >&6; }
5768else
5769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5770$as_echo "no" >&6; }
ccc6cda3
JA
5771fi
5772
ac50fbac
CR
5773 if test "x$ac_ct_AR" = x; then
5774 AR=""
5775 else
5776 case $cross_compiling:$ac_tool_warned in
5777yes:)
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5779$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5780ac_tool_warned=yes ;;
5781esac
5782 AR=$ac_ct_AR
5783 fi
5784else
5785 AR="$ac_cv_prog_AR"
5786fi
3185942a 5787
b72432fd 5788test -n "$ARFLAGS" || ARFLAGS="cr"
f73dda09
JA
5789if test -n "$ac_tool_prefix"; then
5790 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5791set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ac50fbac 5792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5793$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5794if ${ac_cv_prog_RANLIB+:} false; then :
3185942a 5795 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5796else
5797 if test -n "$RANLIB"; then
5798 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5799else
b80f6443
JA
5800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5801for as_dir in $PATH
5802do
5803 IFS=$as_save_IFS
5804 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5805 for ac_exec_ext in '' $ac_executable_extensions; do
5806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 5807 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
ac50fbac 5808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5809 break 2
5810 fi
5811done
ac50fbac 5812 done
3185942a 5813IFS=$as_save_IFS
f73dda09 5814
ccc6cda3
JA
5815fi
5816fi
f73dda09 5817RANLIB=$ac_cv_prog_RANLIB
ccc6cda3 5818if test -n "$RANLIB"; then
ac50fbac 5819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
3185942a 5820$as_echo "$RANLIB" >&6; }
f73dda09 5821else
ac50fbac 5822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5823$as_echo "no" >&6; }
f73dda09
JA
5824fi
5825
3185942a 5826
f73dda09
JA
5827fi
5828if test -z "$ac_cv_prog_RANLIB"; then
5829 ac_ct_RANLIB=$RANLIB
5830 # Extract the first word of "ranlib", so it can be a program name with args.
5831set dummy ranlib; ac_word=$2
ac50fbac 5832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5833$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5834if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
3185942a 5835 $as_echo_n "(cached) " >&6
f73dda09
JA
5836else
5837 if test -n "$ac_ct_RANLIB"; then
5838 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5839else
b80f6443
JA
5840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5841for as_dir in $PATH
5842do
5843 IFS=$as_save_IFS
5844 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5845 for ac_exec_ext in '' $ac_executable_extensions; do
5846 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 5847 ac_cv_prog_ac_ct_RANLIB="ranlib"
ac50fbac 5848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5849 break 2
5850 fi
5851done
ac50fbac 5852 done
3185942a 5853IFS=$as_save_IFS
f73dda09 5854
f73dda09
JA
5855fi
5856fi
5857ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5858if test -n "$ac_ct_RANLIB"; then
ac50fbac 5859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
3185942a 5860$as_echo "$ac_ct_RANLIB" >&6; }
ccc6cda3 5861else
ac50fbac 5862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5863$as_echo "no" >&6; }
f73dda09
JA
5864fi
5865
3185942a
JA
5866 if test "x$ac_ct_RANLIB" = x; then
5867 RANLIB=":"
5868 else
5869 case $cross_compiling:$ac_tool_warned in
5870yes:)
ac50fbac 5871{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3185942a
JA
5872$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5873ac_tool_warned=yes ;;
5874esac
5875 RANLIB=$ac_ct_RANLIB
5876 fi
f73dda09
JA
5877else
5878 RANLIB="$ac_cv_prog_RANLIB"
ccc6cda3
JA
5879fi
5880
5881for ac_prog in 'bison -y' byacc
5882do
f73dda09 5883 # Extract the first word of "$ac_prog", so it can be a program name with args.
ccc6cda3 5884set dummy $ac_prog; ac_word=$2
ac50fbac 5885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5886$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5887if ${ac_cv_prog_YACC+:} false; then :
3185942a 5888 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5889else
5890 if test -n "$YACC"; then
5891 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5892else
b80f6443
JA
5893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5894for as_dir in $PATH
5895do
5896 IFS=$as_save_IFS
5897 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5898 for ac_exec_ext in '' $ac_executable_extensions; do
5899 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 5900 ac_cv_prog_YACC="$ac_prog"
ac50fbac 5901 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5902 break 2
5903 fi
5904done
ac50fbac 5905 done
3185942a 5906IFS=$as_save_IFS
f73dda09 5907
ccc6cda3
JA
5908fi
5909fi
f73dda09 5910YACC=$ac_cv_prog_YACC
ccc6cda3 5911if test -n "$YACC"; then
ac50fbac 5912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
3185942a 5913$as_echo "$YACC" >&6; }
ccc6cda3 5914else
ac50fbac 5915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5916$as_echo "no" >&6; }
ccc6cda3
JA
5917fi
5918
3185942a 5919
f73dda09 5920 test -n "$YACC" && break
ccc6cda3
JA
5921done
5922test -n "$YACC" || YACC="yacc"
5923
ac50fbac 5924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3185942a
JA
5925$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5926set x ${MAKE-make}
5927ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
ac50fbac 5928if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3185942a 5929 $as_echo_n "(cached) " >&6
ccc6cda3 5930else
b80f6443 5931 cat >conftest.make <<\_ACEOF
3185942a 5932SHELL = /bin/sh
ccc6cda3 5933all:
3185942a 5934 @echo '@@@%%%=$(MAKE)=@@@%%%'
b80f6443 5935_ACEOF
ac50fbac 5936# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3185942a
JA
5937case `${MAKE-make} -f conftest.make 2>/dev/null` in
5938 *@@@%%%=?*=@@@%%%*)
5939 eval ac_cv_prog_make_${ac_make}_set=yes;;
5940 *)
5941 eval ac_cv_prog_make_${ac_make}_set=no;;
5942esac
f73dda09 5943rm -f conftest.make
ccc6cda3 5944fi
3185942a 5945if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
ac50fbac 5946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3185942a 5947$as_echo "yes" >&6; }
ccc6cda3
JA
5948 SET_MAKE=
5949else
ac50fbac 5950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5951$as_echo "no" >&6; }
ccc6cda3
JA
5952 SET_MAKE="MAKE=${MAKE-make}"
5953fi
5954
b80f6443 5955
ac50fbac
CR
5956case "$ac_cv_prog_YACC" in
5957*bison*) ;;
5958*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5
5959$as_echo "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;;
5960esac
5961
b72432fd 5962case "$host_os" in
bb70624e 5963opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
b72432fd
JA
5964*) MAKE_SHELL=/bin/sh ;;
5965esac
5966
5967
95732b49
JA
5968if test x$SIZE = x; then
5969 if test x$ac_tool_prefix = x; then
5970 SIZE=size
5971 else
5972 SIZE=${ac_tool_prefix}size
5973 save_IFS=$IFS ; IFS=:
5974 size_found=0
5975 for dir in $PATH; do
5976 if test -x $dir/$SIZE ; then
5977 size_found=1
5978 break
5979 fi
5980 done
5981 if test $size_found -eq 0; then
5982 SIZE=:
5983 fi
5984 IFS=$save_IFS
5985 fi
5986fi
5987
5988
ac50fbac
CR
5989# Checks for stat-related time functions.
5990
5991# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software
5992# Foundation, Inc.
5993
5994# This file is free software; the Free Software Foundation
5995# gives unlimited permission to copy and/or distribute it,
5996# with or without modifications, as long as this notice is preserved.
ccc6cda3 5997
f73dda09 5998
ac50fbac
CR
5999# st_atim.tv_nsec - Linux, Solaris, Cygwin
6000# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
6001# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
6002# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
6003
6004# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
6005# st_birthtim - Cygwin 1.7.0+
6006
6007
6008
6009# Configure checks for struct timespec
6010
6011# Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc.
6012
6013# This file is free software; the Free Software Foundation
6014# gives unlimited permission to copy and/or distribute it,
6015# with or without modifications, as long as this notice is preserved.
6016
6017# Original written by Paul Eggert and Jim Meyering.
6018# Modified by Chet Ramey for bash
6019
6020
6021
6022
6023
ac50fbac 6024
8868edaf 6025# codeset.m4 serial 5 (gettext-0.18.2)
ac50fbac 6026
0628567a 6027
ac50fbac 6028
f73dda09 6029
ccc6cda3 6030
f73dda09 6031
ccc6cda3 6032
ccc6cda3 6033
8868edaf 6034# fcntl-o.m4 serial 6
ccc6cda3 6035
ccc6cda3 6036
0628567a 6037
ccc6cda3 6038
8868edaf
CR
6039# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
6040# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
6041# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
3185942a 6042
3185942a 6043
8868edaf 6044# gettext.m4 serial 69 (gettext-0.19.9)
ccc6cda3 6045
ccc6cda3 6046
ccc6cda3 6047
ccc6cda3 6048
3185942a 6049
3185942a 6050
3185942a 6051
3185942a 6052
3185942a 6053
3185942a 6054
3185942a 6055
3185942a 6056
3185942a 6057
3185942a 6058
b80f6443 6059
ccc6cda3 6060
ccc6cda3 6061
8868edaf 6062# glibc2.m4 serial 3
ccc6cda3 6063
8868edaf
CR
6064# Test for the GNU C Library, version 2.0 or newer.
6065# From Bruno Haible.
ccc6cda3 6066
ccc6cda3 6067
3185942a 6068
8868edaf 6069# glibc21.m4 serial 5
3185942a 6070
8868edaf
CR
6071# Test for the GNU C Library, version 2.1 or newer, or uClibc.
6072# From Bruno Haible.
3185942a 6073
b80f6443 6074
3185942a 6075
8868edaf 6076# host-cpu-c-abi.m4 serial 11
3185942a 6077
3185942a 6078
ccc6cda3 6079
ccc6cda3 6080
ccc6cda3 6081
ccc6cda3 6082
ccc6cda3 6083
8868edaf 6084# iconv.m4 serial 21
f73dda09 6085
f73dda09 6086
ccc6cda3 6087
b80f6443 6088
ccc6cda3 6089
ccc6cda3 6090
17345e5a 6091
17345e5a 6092
17345e5a 6093
8868edaf 6094# intdiv0.m4 serial 6 (gettext-0.18.2)
17345e5a 6095
17345e5a 6096
17345e5a 6097
17345e5a 6098
8868edaf 6099# intl.m4 serial 34 (gettext-0.19.9)
17345e5a 6100
ccc6cda3 6101
b80f6443 6102
b80f6443
JA
6103
6104
6105
3185942a 6106
b80f6443
JA
6107
6108
6109
6110
8868edaf 6111# intlmacosx.m4 serial 6 (gettext-0.19.9)
b80f6443
JA
6112
6113
ccc6cda3 6114
8868edaf 6115# intl-thread-locale.m4 serial 4
ccc6cda3 6116
b80f6443 6117
b80f6443 6118
b80f6443
JA
6119
6120
8868edaf 6121# intmax.m4 serial 6 (gettext-0.18.2)
b80f6443 6122
3185942a 6123
ccc6cda3 6124
b80f6443 6125
8868edaf 6126# inttypes-pri.m4 serial 7 (gettext-0.18.2)
f73dda09 6127
b80f6443
JA
6128
6129
b80f6443 6130
8868edaf
CR
6131# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
6132# macros to non-string values. This is the case on AIX 4.3.3.
b80f6443 6133
b80f6443
JA
6134
6135
8868edaf 6136# inttypes.m4 serial 27
b80f6443 6137
b80f6443 6138
b80f6443
JA
6139
6140
3185942a 6141
b80f6443 6142
8868edaf 6143# Ensure that the PRI* and SCN* macros are defined appropriately.
ccc6cda3 6144
ccc6cda3 6145
8868edaf
CR
6146# Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
6147# If $2 is true, the condition is $3; otherwise if long long int is supported
6148# approximate the condition with $4; otherwise, assume the condition is false.
6149# The condition should work on all C99 platforms; the approximations should be
6150# good enough to work on all practical pre-C99 platforms.
6151# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants.
3185942a 6152
ccc6cda3 6153
ccc6cda3 6154
ccc6cda3 6155
b80f6443 6156
ccc6cda3 6157
8868edaf 6158# inttypes_h.m4 serial 10
ccc6cda3 6159
ccc6cda3 6160
8868edaf
CR
6161# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
6162# doesn't clash with <sys/types.h>, and declares uintmax_t.
f73dda09 6163
ccc6cda3 6164
f73dda09 6165
8868edaf 6166# lcmessage.m4 serial 7 (gettext-0.18.2)
ccc6cda3
JA
6167
6168
8868edaf 6169# Check whether LC_MESSAGES is available in <locale.h>.
f73dda09 6170
b80f6443 6171
ccc6cda3 6172
8868edaf 6173# lib-ld.m4 serial 9
ccc6cda3 6174
f73dda09 6175
ccc6cda3 6176
ccc6cda3 6177
ccc6cda3 6178
ccc6cda3 6179
8868edaf 6180# lib-link.m4 serial 28
3185942a 6181
b80f6443 6182
ccc6cda3 6183
ccc6cda3 6184
b80f6443
JA
6185
6186
f73dda09 6187
ccc6cda3
JA
6188
6189
b80f6443
JA
6190
6191
0628567a 6192
0628567a 6193
0628567a 6194
f73dda09 6195
0628567a 6196
3185942a 6197
f73dda09 6198
8868edaf 6199# lib-prefix.m4 serial 14
b80f6443 6200
b80f6443 6201
b80f6443 6202
b80f6443 6203
b80f6443 6204
b80f6443 6205
b80f6443 6206
ccc6cda3 6207
f73dda09 6208
b80f6443 6209
8868edaf 6210# lock.m4 serial 14
b80f6443 6211
ac50fbac 6212
b80f6443 6213
3185942a 6214
8868edaf 6215# Prerequisites of lib/glthread/lock.c.
f73dda09 6216
b80f6443 6217
8868edaf 6218# nls.m4 serial 5 (gettext-0.18)
b80f6443
JA
6219
6220
b80f6443 6221
ccc6cda3 6222
b80f6443
JA
6223
6224
8868edaf 6225# po.m4 serial 24a
f73dda09 6226
ccc6cda3 6227
b80f6443
JA
6228
6229
6230
6231
b80f6443 6232
b80f6443 6233
b80f6443 6234
b80f6443 6235
b80f6443 6236
b80f6443 6237
8868edaf 6238# printf-posix.m4 serial 6 (gettext-0.18.2)
b80f6443 6239
b80f6443 6240
b80f6443 6241
ccc6cda3 6242
8868edaf 6243# progtest.m4 serial 7 (gettext-0.18.2)
3185942a 6244
ccc6cda3 6245
ccc6cda3 6246
ccc6cda3 6247
8868edaf 6248# Search path for a program which passes the given test.
ccc6cda3 6249
f73dda09 6250
ccc6cda3 6251
8868edaf 6252# pthread_rwlock_rdlock.m4 serial 2
b80f6443
JA
6253
6254
f73dda09 6255
f73dda09 6256
8868edaf 6257# size_max.m4 serial 11
b80f6443
JA
6258
6259
f73dda09 6260
f73dda09 6261
7117c2d2 6262
7117c2d2 6263
8868edaf 6264# stdint_h.m4 serial 9
b80f6443
JA
6265
6266
8868edaf
CR
6267# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
6268# doesn't clash with <sys/types.h>, and declares uintmax_t.
b80f6443 6269
b80f6443 6270
7117c2d2 6271
8868edaf 6272# threadlib.m4 serial 16
7117c2d2 6273
b80f6443 6274
b80f6443
JA
6275
6276
f73dda09 6277
f73dda09 6278
b80f6443 6279
f73dda09 6280
f73dda09 6281
f73dda09 6282
b80f6443
JA
6283
6284
b80f6443 6285
f73dda09 6286
f73dda09 6287
f73dda09 6288
f73dda09 6289
f73dda09 6290
f73dda09 6291
b80f6443 6292
b80f6443 6293
8868edaf 6294# uintmax_t.m4 serial 12
b80f6443 6295
3185942a 6296
f73dda09 6297
b80f6443 6298
8868edaf
CR
6299# Define uintmax_t to 'unsigned long' or 'unsigned long long'
6300# if it is not already defined in <stdint.h> or <inttypes.h>.
b80f6443
JA
6301
6302
b80f6443 6303
8868edaf 6304# ulonglong.m4 serial 10
b80f6443 6305
8868edaf 6306# visibility.m4 serial 6
3185942a 6307
b80f6443
JA
6308
6309
6310
6311
8868edaf 6312# wchar_t.m4 serial 4 (gettext-0.18.2)
b80f6443
JA
6313
6314
6315
b80f6443 6316
8868edaf 6317# wint_t.m4 serial 7
b80f6443 6318
b80f6443 6319
b80f6443
JA
6320
6321
b80f6443 6322
b80f6443 6323
8868edaf 6324# xsize.m4 serial 5
b80f6443 6325
b80f6443 6326
b80f6443 6327
3185942a 6328
8868edaf 6329$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
b80f6443 6330
b80f6443 6331
8868edaf
CR
6332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6333$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6334if ${ac_cv_c_const+:} false; then :
6335 $as_echo_n "(cached) " >&6
6336else
6337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6338/* end confdefs.h. */
6339
6340int
6341main ()
6342{
6343
6344#ifndef __cplusplus
6345 /* Ultrix mips cc rejects this sort of thing. */
6346 typedef int charset[2];
6347 const charset cs = { 0, 0 };
6348 /* SunOS 4.1.1 cc rejects this. */
6349 char const *const *pcpcc;
6350 char **ppc;
6351 /* NEC SVR4.0.2 mips cc rejects this. */
6352 struct point {int x, y;};
6353 static struct point const zero = {0,0};
6354 /* AIX XL C 1.02.0.0 rejects this.
6355 It does not let you subtract one const X* pointer from another in
6356 an arm of an if-expression whose if-part is not a constant
6357 expression */
6358 const char *g = "string";
6359 pcpcc = &g + (g ? g-g : 0);
6360 /* HPUX 7.0 cc rejects these. */
6361 ++pcpcc;
6362 ppc = (char**) pcpcc;
6363 pcpcc = (char const *const *) ppc;
6364 { /* SCO 3.2v4 cc rejects this sort of thing. */
6365 char tx;
6366 char *t = &tx;
6367 char const *s = 0 ? (char *) 0 : (char const *) 0;
6368
6369 *t++ = 0;
6370 if (s) return 0;
6371 }
6372 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6373 int x[] = {25, 17};
6374 const int *foo = &x[0];
6375 ++foo;
6376 }
6377 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6378 typedef const int *iptr;
6379 iptr p = 0;
6380 ++p;
6381 }
6382 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
6383 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6384 struct s { int j; const int *ap[3]; } bx;
6385 struct s *b = &bx; b->j = 5;
6386 }
6387 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6388 const int foo = 10;
6389 if (!foo) return 0;
6390 }
6391 return !cs[0] && !zero.x;
6392#endif
6393
6394 ;
6395 return 0;
6396}
6397_ACEOF
6398if ac_fn_c_try_compile "$LINENO"; then :
6399 ac_cv_c_const=yes
6400else
6401 ac_cv_c_const=no
6402fi
6403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6404fi
6405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6406$as_echo "$ac_cv_c_const" >&6; }
6407if test $ac_cv_c_const = no; then
6408
6409$as_echo "#define const /**/" >>confdefs.h
6410
6411fi
6412
6413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6414$as_echo_n "checking for inline... " >&6; }
6415if ${ac_cv_c_inline+:} false; then :
6416 $as_echo_n "(cached) " >&6
6417else
6418 ac_cv_c_inline=no
6419for ac_kw in inline __inline__ __inline; do
6420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6421/* end confdefs.h. */
6422#ifndef __cplusplus
6423typedef int foo_t;
6424static $ac_kw foo_t static_foo () {return 0; }
6425$ac_kw foo_t foo () {return 0; }
6426#endif
6427
6428_ACEOF
6429if ac_fn_c_try_compile "$LINENO"; then :
6430 ac_cv_c_inline=$ac_kw
6431fi
6432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6433 test "$ac_cv_c_inline" != no && break
6434done
6435
6436fi
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6438$as_echo "$ac_cv_c_inline" >&6; }
6439
6440case $ac_cv_c_inline in
6441 inline | yes) ;;
6442 *)
6443 case $ac_cv_c_inline in
6444 no) ac_val=;;
6445 *) ac_val=$ac_cv_c_inline;;
6446 esac
6447 cat >>confdefs.h <<_ACEOF
6448#ifndef __cplusplus
6449#define inline $ac_val
6450#endif
6451_ACEOF
6452 ;;
6453esac
6454
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
6456$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
6457if ${ac_cv_c_bigendian+:} false; then :
6458 $as_echo_n "(cached) " >&6
6459else
6460 ac_cv_c_bigendian=unknown
6461 # See if we're dealing with a universal compiler.
6462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6463/* end confdefs.h. */
6464#ifndef __APPLE_CC__
6465 not a universal capable compiler
6466 #endif
6467 typedef int dummy;
6468
6469_ACEOF
6470if ac_fn_c_try_compile "$LINENO"; then :
6471
6472 # Check for potential -arch flags. It is not universal unless
6473 # there are at least two -arch flags with different values.
6474 ac_arch=
6475 ac_prev=
6476 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
6477 if test -n "$ac_prev"; then
6478 case $ac_word in
6479 i?86 | x86_64 | ppc | ppc64)
6480 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
6481 ac_arch=$ac_word
6482 else
6483 ac_cv_c_bigendian=universal
6484 break
6485 fi
6486 ;;
6487 esac
6488 ac_prev=
6489 elif test "x$ac_word" = "x-arch"; then
6490 ac_prev=arch
6491 fi
6492 done
6493fi
6494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6495 if test $ac_cv_c_bigendian = unknown; then
6496 # See if sys/param.h defines the BYTE_ORDER macro.
6497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6498/* end confdefs.h. */
6499#include <sys/types.h>
6500 #include <sys/param.h>
6501
6502int
6503main ()
6504{
6505#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
6506 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
6507 && LITTLE_ENDIAN)
6508 bogus endian macros
6509 #endif
6510
6511 ;
6512 return 0;
6513}
6514_ACEOF
6515if ac_fn_c_try_compile "$LINENO"; then :
6516 # It does; now see whether it defined to BIG_ENDIAN or not.
6517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6518/* end confdefs.h. */
6519#include <sys/types.h>
6520 #include <sys/param.h>
6521
6522int
6523main ()
6524{
6525#if BYTE_ORDER != BIG_ENDIAN
6526 not big endian
6527 #endif
6528
6529 ;
6530 return 0;
6531}
6532_ACEOF
6533if ac_fn_c_try_compile "$LINENO"; then :
6534 ac_cv_c_bigendian=yes
6535else
6536 ac_cv_c_bigendian=no
6537fi
6538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6539fi
6540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6541 fi
6542 if test $ac_cv_c_bigendian = unknown; then
6543 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
6544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6545/* end confdefs.h. */
6546#include <limits.h>
6547
6548int
6549main ()
6550{
6551#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6552 bogus endian macros
6553 #endif
6554
6555 ;
6556 return 0;
6557}
6558_ACEOF
6559if ac_fn_c_try_compile "$LINENO"; then :
6560 # It does; now see whether it defined to _BIG_ENDIAN or not.
6561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6562/* end confdefs.h. */
6563#include <limits.h>
6564
6565int
6566main ()
6567{
6568#ifndef _BIG_ENDIAN
6569 not big endian
6570 #endif
6571
6572 ;
6573 return 0;
6574}
6575_ACEOF
6576if ac_fn_c_try_compile "$LINENO"; then :
6577 ac_cv_c_bigendian=yes
6578else
6579 ac_cv_c_bigendian=no
6580fi
6581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6582fi
6583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6584 fi
6585 if test $ac_cv_c_bigendian = unknown; then
6586 # Compile a test program.
6587 if test "$cross_compiling" = yes; then :
6588 # Try to guess by grepping values from an object file.
6589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6590/* end confdefs.h. */
6591short int ascii_mm[] =
6592 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6593 short int ascii_ii[] =
6594 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6595 int use_ascii (int i) {
6596 return ascii_mm[i] + ascii_ii[i];
6597 }
6598 short int ebcdic_ii[] =
6599 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6600 short int ebcdic_mm[] =
6601 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6602 int use_ebcdic (int i) {
6603 return ebcdic_mm[i] + ebcdic_ii[i];
6604 }
6605 extern int foo;
6606
6607int
6608main ()
6609{
6610return use_ascii (foo) == use_ebcdic (foo);
6611 ;
6612 return 0;
6613}
6614_ACEOF
6615if ac_fn_c_try_compile "$LINENO"; then :
6616 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6617 ac_cv_c_bigendian=yes
6618 fi
6619 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6620 if test "$ac_cv_c_bigendian" = unknown; then
6621 ac_cv_c_bigendian=no
6622 else
6623 # finding both strings is unlikely to happen, but who knows?
6624 ac_cv_c_bigendian=unknown
6625 fi
6626 fi
6627fi
6628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6629else
6630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6631/* end confdefs.h. */
6632$ac_includes_default
6633int
6634main ()
6635{
6636
6637 /* Are we little or big endian? From Harbison&Steele. */
6638 union
6639 {
6640 long int l;
6641 char c[sizeof (long int)];
6642 } u;
6643 u.l = 1;
6644 return u.c[sizeof (long int) - 1] == 1;
6645
6646 ;
6647 return 0;
6648}
6649_ACEOF
6650if ac_fn_c_try_run "$LINENO"; then :
6651 ac_cv_c_bigendian=no
6652else
6653 ac_cv_c_bigendian=yes
6654fi
6655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6656 conftest.$ac_objext conftest.beam conftest.$ac_ext
6657fi
6658
6659 fi
6660fi
6661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
6662$as_echo "$ac_cv_c_bigendian" >&6; }
6663 case $ac_cv_c_bigendian in #(
6664 yes)
6665 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
6666;; #(
6667 no)
6668 ;; #(
6669 universal)
6670
6671$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6672
6673 ;; #(
6674 *)
6675 as_fn_error $? "unknown endianness
6676 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
6677 esac
6678
6679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5
6680$as_echo_n "checking for preprocessor stringizing operator... " >&6; }
6681if ${ac_cv_c_stringize+:} false; then :
6682 $as_echo_n "(cached) " >&6
6683else
6684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6685/* end confdefs.h. */
6686#define x(y) #y
6687
6688char *s = x(teststring);
6689_ACEOF
6690if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6691 $EGREP "#teststring" >/dev/null 2>&1; then :
6692 ac_cv_c_stringize=no
6693else
6694 ac_cv_c_stringize=yes
6695fi
6696rm -f conftest*
6697
6698fi
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5
6700$as_echo "$ac_cv_c_stringize" >&6; }
6701if test $ac_cv_c_stringize = yes; then
6702
6703$as_echo "#define HAVE_STRINGIZE 1" >>confdefs.h
6704
6705fi
6706
6707
6708
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5
6710$as_echo_n "checking for long double with more range or precision than double... " >&6; }
6711if ${ac_cv_type_long_double_wider+:} false; then :
6712 $as_echo_n "(cached) " >&6
6713else
6714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6715/* end confdefs.h. */
6716#include <float.h>
6717 long double const a[] =
6718 {
6719 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON,
6720 LDBL_MIN, LDBL_MAX, LDBL_EPSILON
6721 };
6722 long double
6723 f (long double x)
6724 {
6725 return ((x + (unsigned long int) 10) * (-1 / x) + a[0]
6726 + (x ? f (x) : 'c'));
6727 }
6728
6729int
6730main ()
6731{
6732static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
6733 + (DBL_MANT_DIG < LDBL_MANT_DIG)
6734 - (LDBL_MAX_EXP < DBL_MAX_EXP)
6735 - (LDBL_MANT_DIG < DBL_MANT_DIG)))
6736 && (int) LDBL_EPSILON == 0
6737 )];
6738test_array [0] = 0;
6739return test_array [0];
6740
6741 ;
6742 return 0;
6743}
6744_ACEOF
6745if ac_fn_c_try_compile "$LINENO"; then :
6746 ac_cv_type_long_double_wider=yes
6747else
6748 ac_cv_type_long_double_wider=no
6749fi
6750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6751fi
6752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5
6753$as_echo "$ac_cv_type_long_double_wider" >&6; }
6754 if test $ac_cv_type_long_double_wider = yes; then
6755
6756$as_echo "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h
6757
6758 fi
6759
6760 ac_cv_c_long_double=$ac_cv_type_long_double_wider
6761 if test $ac_cv_c_long_double = yes; then
6762
6763$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
6764
6765 fi
6766
6767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
6768$as_echo_n "checking for function prototypes... " >&6; }
6769if test "$ac_cv_prog_cc_c89" != no; then
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6771$as_echo "yes" >&6; }
6772
6773$as_echo "#define PROTOTYPES 1" >>confdefs.h
6774
6775
6776$as_echo "#define __PROTOTYPES 1" >>confdefs.h
6777
6778else
6779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6780$as_echo "no" >&6; }
6781fi
6782
6783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
6784$as_echo_n "checking whether char is unsigned... " >&6; }
6785if ${ac_cv_c_char_unsigned+:} false; then :
6786 $as_echo_n "(cached) " >&6
6787else
6788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6789/* end confdefs.h. */
6790$ac_includes_default
6791int
6792main ()
6793{
6794static int test_array [1 - 2 * !(((char) -1) < 0)];
6795test_array [0] = 0;
6796return test_array [0];
6797
6798 ;
6799 return 0;
6800}
6801_ACEOF
6802if ac_fn_c_try_compile "$LINENO"; then :
6803 ac_cv_c_char_unsigned=no
6804else
6805 ac_cv_c_char_unsigned=yes
6806fi
6807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6808fi
6809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
6810$as_echo "$ac_cv_c_char_unsigned" >&6; }
6811if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
6812 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
6813
6814fi
6815
6816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6817$as_echo_n "checking for working volatile... " >&6; }
6818if ${ac_cv_c_volatile+:} false; then :
6819 $as_echo_n "(cached) " >&6
6820else
6821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6822/* end confdefs.h. */
6823
6824int
6825main ()
6826{
6827
6828volatile int x;
6829int * volatile y = (int *) 0;
6830return !x && !y;
6831 ;
6832 return 0;
6833}
6834_ACEOF
6835if ac_fn_c_try_compile "$LINENO"; then :
6836 ac_cv_c_volatile=yes
6837else
6838 ac_cv_c_volatile=no
6839fi
6840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6841fi
6842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6843$as_echo "$ac_cv_c_volatile" >&6; }
6844if test $ac_cv_c_volatile = no; then
6845
6846$as_echo "#define volatile /**/" >>confdefs.h
6847
6848fi
6849
6850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
6851$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
6852if ${ac_cv_c_restrict+:} false; then :
6853 $as_echo_n "(cached) " >&6
6854else
6855 ac_cv_c_restrict=no
6856 # The order here caters to the fact that C++ does not require restrict.
6857 for ac_kw in __restrict __restrict__ _Restrict restrict; do
6858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6859/* end confdefs.h. */
6860typedef int * int_ptr;
6861 int foo (int_ptr $ac_kw ip) {
6862 return ip[0];
6863 }
6864int
6865main ()
6866{
6867int s[1];
6868 int * $ac_kw t = s;
6869 t[0] = 0;
6870 return foo(t)
6871 ;
6872 return 0;
6873}
6874_ACEOF
6875if ac_fn_c_try_compile "$LINENO"; then :
6876 ac_cv_c_restrict=$ac_kw
6877fi
6878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6879 test "$ac_cv_c_restrict" != no && break
6880 done
6881
6882fi
6883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
6884$as_echo "$ac_cv_c_restrict" >&6; }
6885
6886 case $ac_cv_c_restrict in
6887 restrict) ;;
6888 no) $as_echo "#define restrict /**/" >>confdefs.h
6889 ;;
6890 *) cat >>confdefs.h <<_ACEOF
6891#define restrict $ac_cv_c_restrict
6892_ACEOF
6893 ;;
6894 esac
6895
6896
6897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6898$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6899if test -z "$MKDIR_P"; then
6900 if ${ac_cv_path_mkdir+:} false; then :
6901 $as_echo_n "(cached) " >&6
6902else
6903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6904for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6905do
6906 IFS=$as_save_IFS
6907 test -z "$as_dir" && as_dir=.
6908 for ac_prog in mkdir gmkdir; do
6909 for ac_exec_ext in '' $ac_executable_extensions; do
6910 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6911 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6912 'mkdir (GNU coreutils) '* | \
6913 'mkdir (coreutils) '* | \
6914 'mkdir (fileutils) '4.1*)
6915 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6916 break 3;;
6917 esac
6918 done
6919 done
6920 done
6921IFS=$as_save_IFS
6922
6923fi
6924
6925 test -d ./--version && rmdir ./--version
6926 if test "${ac_cv_path_mkdir+set}" = set; then
6927 MKDIR_P="$ac_cv_path_mkdir -p"
6928 else
6929 # As a last resort, use the slow shell script. Don't cache a
6930 # value for MKDIR_P within a source directory, because that will
6931 # break other packages using the cache if that directory is
6932 # removed, or if the value is a relative name.
6933 MKDIR_P="$ac_install_sh -d"
6934 fi
6935fi
6936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6937$as_echo "$MKDIR_P" >&6; }
6938
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6940$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6941if ${ac_cv_path_SED+:} false; then :
6942 $as_echo_n "(cached) " >&6
6943else
6944 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6945 for ac_i in 1 2 3 4 5 6 7; do
6946 ac_script="$ac_script$as_nl$ac_script"
6947 done
6948 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6949 { ac_script=; unset ac_script;}
6950 if test -z "$SED"; then
6951 ac_path_SED_found=false
6952 # Loop through the user's path and test for each of PROGNAME-LIST
6953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954for as_dir in $PATH
6955do
6956 IFS=$as_save_IFS
6957 test -z "$as_dir" && as_dir=.
6958 for ac_prog in sed gsed; do
6959 for ac_exec_ext in '' $ac_executable_extensions; do
6960 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6961 as_fn_executable_p "$ac_path_SED" || continue
6962# Check for GNU ac_path_SED and select it if it is found.
6963 # Check for GNU $ac_path_SED
6964case `"$ac_path_SED" --version 2>&1` in
6965*GNU*)
6966 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6967*)
6968 ac_count=0
6969 $as_echo_n 0123456789 >"conftest.in"
6970 while :
6971 do
6972 cat "conftest.in" "conftest.in" >"conftest.tmp"
6973 mv "conftest.tmp" "conftest.in"
6974 cp "conftest.in" "conftest.nl"
6975 $as_echo '' >> "conftest.nl"
6976 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6977 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6978 as_fn_arith $ac_count + 1 && ac_count=$as_val
6979 if test $ac_count -gt ${ac_path_SED_max-0}; then
6980 # Best one so far, save it but keep looking for a better one
6981 ac_cv_path_SED="$ac_path_SED"
6982 ac_path_SED_max=$ac_count
6983 fi
6984 # 10*(2^10) chars as input seems more than enough
6985 test $ac_count -gt 10 && break
6986 done
6987 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6988esac
6989
6990 $ac_path_SED_found && break 3
6991 done
6992 done
6993 done
6994IFS=$as_save_IFS
6995 if test -z "$ac_cv_path_SED"; then
6996 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6997 fi
6998else
6999 ac_cv_path_SED=$SED
7000fi
7001
7002fi
7003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7004$as_echo "$ac_cv_path_SED" >&6; }
7005 SED="$ac_cv_path_SED"
7006 rm -f conftest.sed
7007
7008
7009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
7010$as_echo_n "checking whether NLS is requested... " >&6; }
7011 # Check whether --enable-nls was given.
7012if test "${enable_nls+set}" = set; then :
7013 enableval=$enable_nls; USE_NLS=$enableval
7014else
7015 USE_NLS=yes
7016fi
7017
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
7019$as_echo "$USE_NLS" >&6; }
7020
7021
7022
7023
7024 GETTEXT_MACRO_VERSION=0.19
7025
7026
7027
7028
7029# Prepare PATH_SEPARATOR.
7030# The user is always right.
7031if test "${PATH_SEPARATOR+set}" != set; then
7032 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
7033 # contains only /bin. Note that ksh looks also at the FPATH variable,
7034 # so we have to set that as well for the test.
7035 PATH_SEPARATOR=:
7036 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7037 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7038 || PATH_SEPARATOR=';'
7039 }
7040fi
7041
7042# Find out how to test for executable files. Don't use a zero-byte file,
7043# as systems may use methods other than mode bits to determine executability.
7044cat >conf$$.file <<_ASEOF
7045#! /bin/sh
7046exit 0
7047_ASEOF
7048chmod +x conf$$.file
7049if test -x conf$$.file >/dev/null 2>&1; then
7050 ac_executable_p="test -x"
7051else
7052 ac_executable_p="test -f"
7053fi
7054rm -f conf$$.file
7055
7056# Extract the first word of "msgfmt", so it can be a program name with args.
7057set dummy msgfmt; ac_word=$2
7058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7059$as_echo_n "checking for $ac_word... " >&6; }
7060if ${ac_cv_path_MSGFMT+:} false; then :
7061 $as_echo_n "(cached) " >&6
7062else
7063 case "$MSGFMT" in
7064 [\\/]* | ?:[\\/]*)
7065 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7066 ;;
7067 *)
7068 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7069 for ac_dir in $PATH; do
7070 IFS="$ac_save_IFS"
7071 test -z "$ac_dir" && ac_dir=.
7072 for ac_exec_ext in '' $ac_executable_extensions; do
7073 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7074 echo "$as_me: trying $ac_dir/$ac_word..." >&5
7075 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
7076 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
7077 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
7078 break 2
7079 fi
7080 fi
7081 done
7082 done
7083 IFS="$ac_save_IFS"
7084 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7085 ;;
7086esac
7087fi
7088MSGFMT="$ac_cv_path_MSGFMT"
7089if test "$MSGFMT" != ":"; then
7090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7091$as_echo "$MSGFMT" >&6; }
7092else
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094$as_echo "no" >&6; }
7095fi
7096
7097 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7098set dummy gmsgfmt; ac_word=$2
7099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7100$as_echo_n "checking for $ac_word... " >&6; }
7101if ${ac_cv_path_GMSGFMT+:} false; then :
7102 $as_echo_n "(cached) " >&6
7103else
7104 case $GMSGFMT in
7105 [\\/]* | ?:[\\/]*)
7106 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7107 ;;
7108 *)
7109 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7110for as_dir in $PATH
7111do
7112 IFS=$as_save_IFS
7113 test -z "$as_dir" && as_dir=.
7114 for ac_exec_ext in '' $ac_executable_extensions; do
7115 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7116 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7117 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7118 break 2
7119 fi
7120done
7121 done
7122IFS=$as_save_IFS
7123
7124 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7125 ;;
7126esac
7127fi
7128GMSGFMT=$ac_cv_path_GMSGFMT
7129if test -n "$GMSGFMT"; then
7130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7131$as_echo "$GMSGFMT" >&6; }
7132else
7133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7134$as_echo "no" >&6; }
7135fi
7136
7137
7138
7139 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
7140 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
7141 *) MSGFMT_015=$MSGFMT ;;
7142 esac
7143
7144 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
7145 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
7146 *) GMSGFMT_015=$GMSGFMT ;;
7147 esac
7148
7149
7150
7151# Prepare PATH_SEPARATOR.
7152# The user is always right.
7153if test "${PATH_SEPARATOR+set}" != set; then
7154 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
7155 # contains only /bin. Note that ksh looks also at the FPATH variable,
7156 # so we have to set that as well for the test.
7157 PATH_SEPARATOR=:
7158 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7159 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7160 || PATH_SEPARATOR=';'
7161 }
7162fi
7163
7164# Find out how to test for executable files. Don't use a zero-byte file,
7165# as systems may use methods other than mode bits to determine executability.
7166cat >conf$$.file <<_ASEOF
7167#! /bin/sh
7168exit 0
7169_ASEOF
7170chmod +x conf$$.file
7171if test -x conf$$.file >/dev/null 2>&1; then
7172 ac_executable_p="test -x"
7173else
7174 ac_executable_p="test -f"
7175fi
7176rm -f conf$$.file
7177
7178# Extract the first word of "xgettext", so it can be a program name with args.
7179set dummy xgettext; ac_word=$2
7180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7181$as_echo_n "checking for $ac_word... " >&6; }
7182if ${ac_cv_path_XGETTEXT+:} false; then :
7183 $as_echo_n "(cached) " >&6
7184else
7185 case "$XGETTEXT" in
7186 [\\/]* | ?:[\\/]*)
7187 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7188 ;;
7189 *)
7190 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7191 for ac_dir in $PATH; do
7192 IFS="$ac_save_IFS"
7193 test -z "$ac_dir" && ac_dir=.
7194 for ac_exec_ext in '' $ac_executable_extensions; do
7195 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7196 echo "$as_me: trying $ac_dir/$ac_word..." >&5
7197 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
7198 (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
7199 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
7200 break 2
7201 fi
7202 fi
7203 done
7204 done
7205 IFS="$ac_save_IFS"
7206 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7207 ;;
7208esac
7209fi
7210XGETTEXT="$ac_cv_path_XGETTEXT"
7211if test "$XGETTEXT" != ":"; then
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
7213$as_echo "$XGETTEXT" >&6; }
7214else
7215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7216$as_echo "no" >&6; }
7217fi
7218
7219 rm -f messages.po
7220
7221 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
7222 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
7223 *) XGETTEXT_015=$XGETTEXT ;;
7224 esac
7225
7226
7227
7228# Prepare PATH_SEPARATOR.
7229# The user is always right.
7230if test "${PATH_SEPARATOR+set}" != set; then
7231 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
7232 # contains only /bin. Note that ksh looks also at the FPATH variable,
7233 # so we have to set that as well for the test.
7234 PATH_SEPARATOR=:
7235 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7236 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7237 || PATH_SEPARATOR=';'
7238 }
7239fi
7240
7241# Find out how to test for executable files. Don't use a zero-byte file,
7242# as systems may use methods other than mode bits to determine executability.
7243cat >conf$$.file <<_ASEOF
7244#! /bin/sh
7245exit 0
7246_ASEOF
7247chmod +x conf$$.file
7248if test -x conf$$.file >/dev/null 2>&1; then
7249 ac_executable_p="test -x"
7250else
7251 ac_executable_p="test -f"
7252fi
7253rm -f conf$$.file
7254
7255# Extract the first word of "msgmerge", so it can be a program name with args.
7256set dummy msgmerge; ac_word=$2
7257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7258$as_echo_n "checking for $ac_word... " >&6; }
7259if ${ac_cv_path_MSGMERGE+:} false; then :
7260 $as_echo_n "(cached) " >&6
7261else
7262 case "$MSGMERGE" in
7263 [\\/]* | ?:[\\/]*)
7264 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
7265 ;;
7266 *)
7267 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7268 for ac_dir in $PATH; do
7269 IFS="$ac_save_IFS"
7270 test -z "$ac_dir" && ac_dir=.
7271 for ac_exec_ext in '' $ac_executable_extensions; do
7272 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7273 echo "$as_me: trying $ac_dir/$ac_word..." >&5
7274 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
7275 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
7276 break 2
7277 fi
7278 fi
7279 done
7280 done
7281 IFS="$ac_save_IFS"
7282 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
7283 ;;
7284esac
7285fi
7286MSGMERGE="$ac_cv_path_MSGMERGE"
7287if test "$MSGMERGE" != ":"; then
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
7289$as_echo "$MSGMERGE" >&6; }
7290else
7291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7292$as_echo "no" >&6; }
7293fi
7294
7295
7296 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
7297
7298
7299 ac_config_commands="$ac_config_commands po-directories"
7300
7301
7302
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2 or newer" >&5
7304$as_echo_n "checking whether we are using the GNU C Library 2 or newer... " >&6; }
7305if ${ac_cv_gnu_library_2+:} false; then :
7306 $as_echo_n "(cached) " >&6
7307else
7308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7309/* end confdefs.h. */
7310
7311#include <features.h>
7312#ifdef __GNU_LIBRARY__
7313 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
7314 Lucky GNU user
7315 #endif
7316#endif
7317
7318_ACEOF
7319if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7320 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
7321 ac_cv_gnu_library_2=yes
7322else
7323 ac_cv_gnu_library_2=no
7324fi
7325rm -f conftest*
7326
7327
7328
7329fi
7330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2" >&5
7331$as_echo "$ac_cv_gnu_library_2" >&6; }
7332
7333 GLIBC2="$ac_cv_gnu_library_2"
7334
7335
7336
7337
7338 CFLAG_VISIBILITY=
7339 HAVE_VISIBILITY=0
7340 if test -n "$GCC"; then
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
7342$as_echo_n "checking whether the -Werror option is usable... " >&6; }
7343if ${gl_cv_cc_vis_werror+:} false; then :
7344 $as_echo_n "(cached) " >&6
7345else
7346 gl_save_CFLAGS="$CFLAGS"
7347 CFLAGS="$CFLAGS -Werror"
7348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7349/* end confdefs.h. */
7350
7351int
7352main ()
7353{
7354
7355 ;
7356 return 0;
7357}
7358_ACEOF
7359if ac_fn_c_try_compile "$LINENO"; then :
7360 gl_cv_cc_vis_werror=yes
7361else
7362 gl_cv_cc_vis_werror=no
7363fi
7364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7365 CFLAGS="$gl_save_CFLAGS"
7366
7367fi
7368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
7369$as_echo "$gl_cv_cc_vis_werror" >&6; }
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
7371$as_echo_n "checking for simple visibility declarations... " >&6; }
7372if ${gl_cv_cc_visibility+:} false; then :
7373 $as_echo_n "(cached) " >&6
7374else
7375 gl_save_CFLAGS="$CFLAGS"
7376 CFLAGS="$CFLAGS -fvisibility=hidden"
7377 if test $gl_cv_cc_vis_werror = yes; then
7378 CFLAGS="$CFLAGS -Werror"
7379 fi
7380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7381/* end confdefs.h. */
7382extern __attribute__((__visibility__("hidden"))) int hiddenvar;
7383 extern __attribute__((__visibility__("default"))) int exportedvar;
7384 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
7385 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
7386 void dummyfunc (void) {}
7387
7388int
7389main ()
7390{
7391
7392 ;
7393 return 0;
7394}
7395_ACEOF
7396if ac_fn_c_try_compile "$LINENO"; then :
7397 gl_cv_cc_visibility=yes
7398else
7399 gl_cv_cc_visibility=no
7400fi
7401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7402 CFLAGS="$gl_save_CFLAGS"
7403
7404fi
7405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
7406$as_echo "$gl_cv_cc_visibility" >&6; }
7407 if test $gl_cv_cc_visibility = yes; then
7408 CFLAG_VISIBILITY="-fvisibility=hidden"
7409 HAVE_VISIBILITY=1
7410 fi
7411 fi
7412
7413
7414
7415cat >>confdefs.h <<_ACEOF
7416#define HAVE_VISIBILITY $HAVE_VISIBILITY
7417_ACEOF
7418
7419
7420ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7421if test "x$ac_cv_type_size_t" = xyes; then :
7422
7423else
7424
7425cat >>confdefs.h <<_ACEOF
7426#define size_t unsigned int
7427_ACEOF
7428
7429fi
7430
7431
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
7433$as_echo_n "checking for stdint.h... " >&6; }
7434if ${gl_cv_header_stdint_h+:} false; then :
7435 $as_echo_n "(cached) " >&6
7436else
7437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7438/* end confdefs.h. */
7439#include <sys/types.h>
7440 #include <stdint.h>
7441int
7442main ()
7443{
7444uintmax_t i = (uintmax_t) -1; return !i;
7445 ;
7446 return 0;
7447}
7448_ACEOF
7449if ac_fn_c_try_compile "$LINENO"; then :
7450 gl_cv_header_stdint_h=yes
7451else
7452 gl_cv_header_stdint_h=no
7453fi
7454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7455fi
7456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
7457$as_echo "$gl_cv_header_stdint_h" >&6; }
7458 if test $gl_cv_header_stdint_h = yes; then
7459
7460cat >>confdefs.h <<_ACEOF
7461#define HAVE_STDINT_H_WITH_UINTMAX 1
7462_ACEOF
7463
7464 fi
7465
7466# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7467# for constant arguments. Useless!
7468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7469$as_echo_n "checking for working alloca.h... " >&6; }
7470if ${ac_cv_working_alloca_h+:} false; then :
7471 $as_echo_n "(cached) " >&6
7472else
7473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7474/* end confdefs.h. */
7475#include <alloca.h>
7476int
7477main ()
7478{
7479char *p = (char *) alloca (2 * sizeof (int));
7480 if (p) return 0;
7481 ;
7482 return 0;
7483}
7484_ACEOF
7485if ac_fn_c_try_link "$LINENO"; then :
7486 ac_cv_working_alloca_h=yes
7487else
7488 ac_cv_working_alloca_h=no
7489fi
7490rm -f core conftest.err conftest.$ac_objext \
7491 conftest$ac_exeext conftest.$ac_ext
7492fi
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7494$as_echo "$ac_cv_working_alloca_h" >&6; }
7495if test $ac_cv_working_alloca_h = yes; then
7496
7497$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7498
7499fi
7500
7501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7502$as_echo_n "checking for alloca... " >&6; }
7503if ${ac_cv_func_alloca_works+:} false; then :
7504 $as_echo_n "(cached) " >&6
7505else
7506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7507/* end confdefs.h. */
7508#ifdef __GNUC__
7509# define alloca __builtin_alloca
7510#else
7511# ifdef _MSC_VER
7512# include <malloc.h>
7513# define alloca _alloca
7514# else
7515# ifdef HAVE_ALLOCA_H
7516# include <alloca.h>
7517# else
7518# ifdef _AIX
7519 #pragma alloca
7520# else
7521# ifndef alloca /* predefined by HP cc +Olibcalls */
7522void *alloca (size_t);
7523# endif
7524# endif
7525# endif
7526# endif
7527#endif
7528
7529int
7530main ()
7531{
7532char *p = (char *) alloca (1);
7533 if (p) return 0;
7534 ;
7535 return 0;
7536}
7537_ACEOF
7538if ac_fn_c_try_link "$LINENO"; then :
7539 ac_cv_func_alloca_works=yes
7540else
7541 ac_cv_func_alloca_works=no
7542fi
7543rm -f core conftest.err conftest.$ac_objext \
7544 conftest$ac_exeext conftest.$ac_ext
7545fi
7546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7547$as_echo "$ac_cv_func_alloca_works" >&6; }
7548
7549if test $ac_cv_func_alloca_works = yes; then
7550
7551$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7552
7553else
7554 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7555# that cause trouble. Some versions do not even contain alloca or
7556# contain a buggy version. If you still want to use their alloca,
7557# use ar to extract alloca.o from them instead of compiling alloca.c.
7558
7559ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7560
7561$as_echo "#define C_ALLOCA 1" >>confdefs.h
7562
7563
7564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7565$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7566if ${ac_cv_os_cray+:} false; then :
7567 $as_echo_n "(cached) " >&6
7568else
7569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7570/* end confdefs.h. */
7571#if defined CRAY && ! defined CRAY2
7572webecray
7573#else
7574wenotbecray
7575#endif
7576
7577_ACEOF
7578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7579 $EGREP "webecray" >/dev/null 2>&1; then :
7580 ac_cv_os_cray=yes
7581else
7582 ac_cv_os_cray=no
7583fi
7584rm -f conftest*
7585
7586fi
7587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7588$as_echo "$ac_cv_os_cray" >&6; }
7589if test $ac_cv_os_cray = yes; then
7590 for ac_func in _getb67 GETB67 getb67; do
7591 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7592ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7593if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7594
7595cat >>confdefs.h <<_ACEOF
7596#define CRAY_STACKSEG_END $ac_func
7597_ACEOF
7598
7599 break
7600fi
7601
7602 done
7603fi
7604
7605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7606$as_echo_n "checking stack direction for C alloca... " >&6; }
7607if ${ac_cv_c_stack_direction+:} false; then :
7608 $as_echo_n "(cached) " >&6
7609else
7610 if test "$cross_compiling" = yes; then :
7611 ac_cv_c_stack_direction=0
7612else
7613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7614/* end confdefs.h. */
7615$ac_includes_default
7616int
7617find_stack_direction (int *addr, int depth)
7618{
7619 int dir, dummy = 0;
7620 if (! addr)
7621 addr = &dummy;
7622 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7623 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7624 return dir + dummy;
7625}
7626
7627int
7628main (int argc, char **argv)
7629{
7630 return find_stack_direction (0, argc + !argv + 20) < 0;
7631}
7632_ACEOF
7633if ac_fn_c_try_run "$LINENO"; then :
7634 ac_cv_c_stack_direction=1
7635else
7636 ac_cv_c_stack_direction=-1
7637fi
7638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7639 conftest.$ac_objext conftest.beam conftest.$ac_ext
7640fi
7641
7642fi
7643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7644$as_echo "$ac_cv_c_stack_direction" >&6; }
7645cat >>confdefs.h <<_ACEOF
7646#define STACK_DIRECTION $ac_cv_c_stack_direction
7647_ACEOF
7648
7649
7650fi
7651
7652
7653
7654
7655 for ac_header in $ac_header_list
7656do :
7657 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7658ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7659"
7660if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7661 cat >>confdefs.h <<_ACEOF
7662#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7663_ACEOF
7664
7665fi
7666
7667done
7668
7669
7670
7671
7672
7673
7674
7675
7676for ac_func in getpagesize
7677do :
7678 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7679if test "x$ac_cv_func_getpagesize" = xyes; then :
7680 cat >>confdefs.h <<_ACEOF
7681#define HAVE_GETPAGESIZE 1
7682_ACEOF
7683
7684fi
7685done
7686
7687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7688$as_echo_n "checking for working mmap... " >&6; }
7689if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
7690 $as_echo_n "(cached) " >&6
7691else
7692 if test "$cross_compiling" = yes; then :
7693 ac_cv_func_mmap_fixed_mapped=no
7694else
7695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7696/* end confdefs.h. */
7697$ac_includes_default
7698/* malloc might have been renamed as rpl_malloc. */
7699#undef malloc
7700
7701/* Thanks to Mike Haertel and Jim Avera for this test.
7702 Here is a matrix of mmap possibilities:
7703 mmap private not fixed
7704 mmap private fixed at somewhere currently unmapped
7705 mmap private fixed at somewhere already mapped
7706 mmap shared not fixed
7707 mmap shared fixed at somewhere currently unmapped
7708 mmap shared fixed at somewhere already mapped
7709 For private mappings, we should verify that changes cannot be read()
7710 back from the file, nor mmap's back from the file at a different
7711 address. (There have been systems where private was not correctly
7712 implemented like the infamous i386 svr4.0, and systems where the
7713 VM page cache was not coherent with the file system buffer cache
7714 like early versions of FreeBSD and possibly contemporary NetBSD.)
7715 For shared mappings, we should conversely verify that changes get
7716 propagated back to all the places they're supposed to be.
7717
7718 Grep wants private fixed already mapped.
7719 The main things grep needs to know about mmap are:
7720 * does it exist and is it safe to write into the mmap'd area
7721 * how to use it (BSD variants) */
7722
7723#include <fcntl.h>
7724#include <sys/mman.h>
7725
7726#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7727char *malloc ();
7728#endif
7729
7730/* This mess was copied from the GNU getpagesize.h. */
7731#ifndef HAVE_GETPAGESIZE
7732# ifdef _SC_PAGESIZE
7733# define getpagesize() sysconf(_SC_PAGESIZE)
7734# else /* no _SC_PAGESIZE */
7735# ifdef HAVE_SYS_PARAM_H
7736# include <sys/param.h>
7737# ifdef EXEC_PAGESIZE
7738# define getpagesize() EXEC_PAGESIZE
7739# else /* no EXEC_PAGESIZE */
7740# ifdef NBPG
7741# define getpagesize() NBPG * CLSIZE
7742# ifndef CLSIZE
7743# define CLSIZE 1
7744# endif /* no CLSIZE */
7745# else /* no NBPG */
7746# ifdef NBPC
7747# define getpagesize() NBPC
7748# else /* no NBPC */
7749# ifdef PAGESIZE
7750# define getpagesize() PAGESIZE
7751# endif /* PAGESIZE */
7752# endif /* no NBPC */
7753# endif /* no NBPG */
7754# endif /* no EXEC_PAGESIZE */
7755# else /* no HAVE_SYS_PARAM_H */
7756# define getpagesize() 8192 /* punt totally */
7757# endif /* no HAVE_SYS_PARAM_H */
7758# endif /* no _SC_PAGESIZE */
7759
7760#endif /* no HAVE_GETPAGESIZE */
7761
7762int
7763main ()
7764{
7765 char *data, *data2, *data3;
7766 const char *cdata2;
7767 int i, pagesize;
7768 int fd, fd2;
7769
7770 pagesize = getpagesize ();
7771
7772 /* First, make a file with some known garbage in it. */
7773 data = (char *) malloc (pagesize);
7774 if (!data)
7775 return 1;
7776 for (i = 0; i < pagesize; ++i)
7777 *(data + i) = rand ();
7778 umask (0);
7779 fd = creat ("conftest.mmap", 0600);
7780 if (fd < 0)
7781 return 2;
7782 if (write (fd, data, pagesize) != pagesize)
7783 return 3;
7784 close (fd);
7785
7786 /* Next, check that the tail of a page is zero-filled. File must have
7787 non-zero length, otherwise we risk SIGBUS for entire page. */
7788 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7789 if (fd2 < 0)
7790 return 4;
7791 cdata2 = "";
7792 if (write (fd2, cdata2, 1) != 1)
7793 return 5;
7794 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7795 if (data2 == MAP_FAILED)
7796 return 6;
7797 for (i = 0; i < pagesize; ++i)
7798 if (*(data2 + i))
7799 return 7;
7800 close (fd2);
7801 if (munmap (data2, pagesize))
7802 return 8;
7803
7804 /* Next, try to mmap the file at a fixed address which already has
7805 something else allocated at it. If we can, also make sure that
7806 we see the same garbage. */
7807 fd = open ("conftest.mmap", O_RDWR);
7808 if (fd < 0)
7809 return 9;
7810 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7811 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7812 return 10;
7813 for (i = 0; i < pagesize; ++i)
7814 if (*(data + i) != *(data2 + i))
7815 return 11;
7816
7817 /* Finally, make sure that changes to the mapped area do not
7818 percolate back to the file as seen by read(). (This is a bug on
7819 some variants of i386 svr4.0.) */
7820 for (i = 0; i < pagesize; ++i)
7821 *(data2 + i) = *(data2 + i) + 1;
7822 data3 = (char *) malloc (pagesize);
7823 if (!data3)
7824 return 12;
7825 if (read (fd, data3, pagesize) != pagesize)
7826 return 13;
7827 for (i = 0; i < pagesize; ++i)
7828 if (*(data + i) != *(data3 + i))
7829 return 14;
7830 close (fd);
7831 return 0;
7832}
7833_ACEOF
7834if ac_fn_c_try_run "$LINENO"; then :
7835 ac_cv_func_mmap_fixed_mapped=yes
7836else
7837 ac_cv_func_mmap_fixed_mapped=no
7838fi
7839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7840 conftest.$ac_objext conftest.beam conftest.$ac_ext
7841fi
7842
7843fi
7844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7845$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7846if test $ac_cv_func_mmap_fixed_mapped = yes; then
7847
7848$as_echo "#define HAVE_MMAP 1" >>confdefs.h
7849
7850fi
7851rm -f conftest.mmap conftest.txt
7852
7853
7854
7855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5
7856$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
7857if ${gt_cv_int_divbyzero_sigfpe+:} false; then :
7858 $as_echo_n "(cached) " >&6
7859else
7860
7861 gt_cv_int_divbyzero_sigfpe=
7862 case "$host_os" in
7863 macos* | darwin[6-9]* | darwin[1-9][0-9]*)
7864 # On Mac OS X 10.2 or newer, just assume the same as when cross-
7865 # compiling. If we were to perform the real test, 1 Crash Report
7866 # dialog window would pop up.
7867 case "$host_cpu" in
7868 i[34567]86 | x86_64)
7869 gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
7870 esac
7871 ;;
7872 esac
7873 if test -z "$gt_cv_int_divbyzero_sigfpe"; then
7874 if test "$cross_compiling" = yes; then :
7875
7876 # Guess based on the CPU.
7877 case "$host_cpu" in
7878 alpha* | i[34567]86 | x86_64 | m68k | s390*)
7879 gt_cv_int_divbyzero_sigfpe="guessing yes";;
7880 *)
7881 gt_cv_int_divbyzero_sigfpe="guessing no";;
7882 esac
7883
7884else
7885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7886/* end confdefs.h. */
7887
7888#include <stdlib.h>
7889#include <signal.h>
7890
7891static void
7892sigfpe_handler (int sig)
7893{
7894 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
7895 exit (sig != SIGFPE);
7896}
7897
7898int x = 1;
7899int y = 0;
7900int z;
7901int xnan;
7902
7903int main ()
7904{
7905 signal (SIGFPE, sigfpe_handler);
7906/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
7907#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
7908 signal (SIGTRAP, sigfpe_handler);
7909#endif
7910/* Linux/SPARC yields signal SIGILL. */
7911#if defined (__sparc__) && defined (__linux__)
7912 signal (SIGILL, sigfpe_handler);
7913#endif
7914
7915 z = x / y;
7916 xnan = y / y;
7917 exit (2);
7918}
7919
7920_ACEOF
7921if ac_fn_c_try_run "$LINENO"; then :
7922 gt_cv_int_divbyzero_sigfpe=yes
7923else
7924 gt_cv_int_divbyzero_sigfpe=no
7925fi
7926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7927 conftest.$ac_objext conftest.beam conftest.$ac_ext
7928fi
7929
7930 fi
7931
7932fi
7933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5
7934$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; }
7935 case "$gt_cv_int_divbyzero_sigfpe" in
7936 *yes) value=1;;
7937 *) value=0;;
7938 esac
7939
7940cat >>confdefs.h <<_ACEOF
7941#define INTDIV0_RAISES_SIGFPE $value
7942_ACEOF
7943
7944
7945
7946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
7947$as_echo_n "checking for inttypes.h... " >&6; }
7948if ${gl_cv_header_inttypes_h+:} false; then :
7949 $as_echo_n "(cached) " >&6
7950else
7951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7952/* end confdefs.h. */
7953
7954#include <sys/types.h>
7955#include <inttypes.h>
7956
7957int
7958main ()
7959{
7960uintmax_t i = (uintmax_t) -1; return !i;
7961 ;
7962 return 0;
7963}
7964_ACEOF
7965if ac_fn_c_try_compile "$LINENO"; then :
7966 gl_cv_header_inttypes_h=yes
7967else
7968 gl_cv_header_inttypes_h=no
7969fi
7970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7971fi
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
7973$as_echo "$gl_cv_header_inttypes_h" >&6; }
7974 if test $gl_cv_header_inttypes_h = yes; then
7975
7976cat >>confdefs.h <<_ACEOF
7977#define HAVE_INTTYPES_H_WITH_UINTMAX 1
7978_ACEOF
7979
7980 fi
7981
7982
7983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7984$as_echo_n "checking for unsigned long long int... " >&6; }
7985if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7986 $as_echo_n "(cached) " >&6
7987else
7988 ac_cv_type_unsigned_long_long_int=yes
7989 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7991/* end confdefs.h. */
7992
7993 /* For now, do not test the preprocessor; as of 2007 there are too many
7994 implementations with broken preprocessors. Perhaps this can
7995 be revisited in 2012. In the meantime, code should not expect
7996 #if to work with literals wider than 32 bits. */
7997 /* Test literals. */
7998 long long int ll = 9223372036854775807ll;
7999 long long int nll = -9223372036854775807LL;
8000 unsigned long long int ull = 18446744073709551615ULL;
8001 /* Test constant expressions. */
8002 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
8003 ? 1 : -1)];
8004 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
8005 ? 1 : -1)];
8006 int i = 63;
8007int
8008main ()
8009{
8010/* Test availability of runtime routines for shift and division. */
8011 long long int llmax = 9223372036854775807ll;
8012 unsigned long long int ullmax = 18446744073709551615ull;
8013 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
8014 | (llmax / ll) | (llmax % ll)
8015 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
8016 | (ullmax / ull) | (ullmax % ull));
8017 ;
8018 return 0;
8019}
8020
8021_ACEOF
8022if ac_fn_c_try_link "$LINENO"; then :
8023
8024else
8025 ac_cv_type_unsigned_long_long_int=no
8026fi
8027rm -f core conftest.err conftest.$ac_objext \
8028 conftest$ac_exeext conftest.$ac_ext
8029 fi
8030fi
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
8032$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
8033 if test $ac_cv_type_unsigned_long_long_int = yes; then
8034
8035$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8036
8037 fi
8038
8039
8040
8041
8042 if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
8043
8044 test $ac_cv_type_unsigned_long_long_int = yes \
8045 && ac_type='unsigned long long' \
8046 || ac_type='unsigned long'
8047
8048cat >>confdefs.h <<_ACEOF
8049#define uintmax_t $ac_type
8050_ACEOF
8051
8052 else
8053
8054$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
8055
8056 fi
8057
8058
8059 for ac_header in inttypes.h
8060do :
8061 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
8062if test "x$ac_cv_header_inttypes_h" = xyes; then :
8063 cat >>confdefs.h <<_ACEOF
8064#define HAVE_INTTYPES_H 1
8065_ACEOF
8066
8067fi
8068
8069done
8070
8071 if test $ac_cv_header_inttypes_h = yes; then
8072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
8073$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
8074if ${gt_cv_inttypes_pri_broken+:} false; then :
8075 $as_echo_n "(cached) " >&6
8076else
8077
8078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8079/* end confdefs.h. */
8080
8081#include <inttypes.h>
8082#ifdef PRId32
8083char *p = PRId32;
8084#endif
8085
8086int
8087main ()
8088{
8089
8090 ;
8091 return 0;
8092}
8093_ACEOF
8094if ac_fn_c_try_compile "$LINENO"; then :
8095 gt_cv_inttypes_pri_broken=no
8096else
8097 gt_cv_inttypes_pri_broken=yes
8098fi
8099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8100
8101fi
8102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
8103$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
8104 fi
8105 if test "$gt_cv_inttypes_pri_broken" = yes; then
8106
8107cat >>confdefs.h <<_ACEOF
8108#define PRI_MACROS_BROKEN 1
8109_ACEOF
8110
8111 PRI_MACROS_BROKEN=1
8112 else
8113 PRI_MACROS_BROKEN=0
8114 fi
8115
8116
8117
8118
8119
8120
8121
8122 # Check whether --enable-threads was given.
8123if test "${enable_threads+set}" = set; then :
8124 enableval=$enable_threads; gl_use_threads=$enableval
8125else
8126 if test -n "$gl_use_threads_default"; then
8127 gl_use_threads="$gl_use_threads_default"
8128 else
8129 case "$host_os" in
8130 osf*) gl_use_threads=no ;;
8131 cygwin*)
8132 case `uname -r` in
8133 1.[0-5].*) gl_use_threads=no ;;
8134 *) gl_use_threads=yes ;;
8135 esac
8136 ;;
8137 *) gl_use_threads=yes ;;
8138 esac
8139 fi
8140
8141fi
8142
8143 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
8144 # For using <pthread.h>:
8145 case "$host_os" in
8146 osf*)
8147 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
8148 # groks <pthread.h>. cc also understands the flag -pthread, but
8149 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
8150 # 2. putting a flag into CPPFLAGS that has an effect on the linker
8151 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
8152 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
8153 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
8154 ;;
8155 esac
8156 # Some systems optimize for single-threaded programs by default, and
8157 # need special flags to disable these optimizations. For example, the
8158 # definition of 'errno' in <errno.h>.
8159 case "$host_os" in
8160 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
8161 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
8162 esac
8163 fi
8164
8165
8166
8167
8168
8169 if test "X$prefix" = "XNONE"; then
8170 acl_final_prefix="$ac_default_prefix"
8171 else
8172 acl_final_prefix="$prefix"
8173 fi
8174 if test "X$exec_prefix" = "XNONE"; then
8175 acl_final_exec_prefix='${prefix}'
8176 else
8177 acl_final_exec_prefix="$exec_prefix"
8178 fi
8179 acl_save_prefix="$prefix"
8180 prefix="$acl_final_prefix"
8181 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8182 prefix="$acl_save_prefix"
8183
8184
8185
8186# Check whether --with-gnu-ld was given.
8187if test "${with_gnu_ld+set}" = set; then :
8188 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8189else
8190 with_gnu_ld=no
8191fi
8192
8193# Prepare PATH_SEPARATOR.
8194# The user is always right.
8195if test "${PATH_SEPARATOR+set}" != set; then
8196 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
8197 # contains only /bin. Note that ksh looks also at the FPATH variable,
8198 # so we have to set that as well for the test.
8199 PATH_SEPARATOR=:
8200 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
8201 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
8202 || PATH_SEPARATOR=';'
8203 }
8204fi
8205
8206if test -n "$LD"; then
8207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
8208$as_echo_n "checking for ld... " >&6; }
8209elif test "$GCC" = yes; then
8210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8211$as_echo_n "checking for ld used by $CC... " >&6; }
8212elif test "$with_gnu_ld" = yes; then
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8214$as_echo_n "checking for GNU ld... " >&6; }
8215else
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8217$as_echo_n "checking for non-GNU ld... " >&6; }
8218fi
8219if test -n "$LD"; then
8220 # Let the user override the test with a path.
8221 :
8222else
8223 if ${acl_cv_path_LD+:} false; then :
8224 $as_echo_n "(cached) " >&6
8225else
8226
8227 acl_cv_path_LD= # Final result of this test
8228 ac_prog=ld # Program to search in $PATH
8229 if test "$GCC" = yes; then
8230 # Check if gcc -print-prog-name=ld gives a path.
8231 case $host in
8232 *-*-mingw*)
8233 # gcc leaves a trailing carriage return which upsets mingw
8234 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8235 *)
8236 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
8237 esac
8238 case $acl_output in
8239 # Accept absolute paths.
8240 [\\/]* | ?:[\\/]*)
8241 re_direlt='/[^/][^/]*/\.\./'
8242 # Canonicalize the pathname of ld
8243 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
8244 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
8245 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
8246 done
8247 # Got the pathname. No search in PATH is needed.
8248 acl_cv_path_LD="$acl_output"
8249 ac_prog=
8250 ;;
8251 "")
8252 # If it fails, then pretend we aren't using GCC.
8253 ;;
8254 *)
8255 # If it is relative, then search for the first ld in PATH.
8256 with_gnu_ld=unknown
8257 ;;
8258 esac
8259 fi
8260 if test -n "$ac_prog"; then
8261 # Search for $ac_prog in $PATH.
8262 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8263 for ac_dir in $PATH; do
8264 IFS="$acl_save_ifs"
8265 test -z "$ac_dir" && ac_dir=.
8266 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8267 acl_cv_path_LD="$ac_dir/$ac_prog"
8268 # Check to see if the program is GNU ld. I'd rather use --version,
8269 # but apparently some variants of GNU ld only accept -v.
8270 # Break only if it was the GNU/non-GNU ld that we prefer.
8271 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
8272 *GNU* | *'with BFD'*)
8273 test "$with_gnu_ld" != no && break
8274 ;;
8275 *)
8276 test "$with_gnu_ld" != yes && break
8277 ;;
8278 esac
8279 fi
8280 done
8281 IFS="$acl_save_ifs"
8282 fi
8283 case $host in
8284 *-*-aix*)
8285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8286/* end confdefs.h. */
8287#if defined __powerpc64__ || defined _ARCH_PPC64
8288 int ok;
8289 #else
8290 error fail
8291 #endif
8292
8293_ACEOF
8294if ac_fn_c_try_compile "$LINENO"; then :
8295 # The compiler produces 64-bit code. Add option '-b64' so that the
8296 # linker groks 64-bit object files.
8297 case "$acl_cv_path_LD " in
8298 *" -b64 "*) ;;
8299 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
8300 esac
8301
8302fi
8303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8304 ;;
8305 sparc64-*-netbsd*)
8306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8307/* end confdefs.h. */
8308#if defined __sparcv9 || defined __arch64__
8309 int ok;
8310 #else
8311 error fail
8312 #endif
8313
8314_ACEOF
8315if ac_fn_c_try_compile "$LINENO"; then :
8316
8317else
8318 # The compiler produces 32-bit code. Add option '-m elf32_sparc'
8319 # so that the linker groks 32-bit object files.
8320 case "$acl_cv_path_LD " in
8321 *" -m elf32_sparc "*) ;;
8322 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
8323 esac
8324
8325fi
8326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8327 ;;
8328 esac
8329
8330fi
8331
8332 LD="$acl_cv_path_LD"
8333fi
8334if test -n "$LD"; then
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8336$as_echo "$LD" >&6; }
8337else
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8339$as_echo "no" >&6; }
8340 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8341fi
8342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8343$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8344if ${acl_cv_prog_gnu_ld+:} false; then :
8345 $as_echo_n "(cached) " >&6
8346else
8347 # I'd rather use --version here, but apparently some GNU lds only accept -v.
8348case `$LD -v 2>&1 </dev/null` in
8349*GNU* | *'with BFD'*)
8350 acl_cv_prog_gnu_ld=yes
8351 ;;
8352*)
8353 acl_cv_prog_gnu_ld=no
8354 ;;
8355esac
8356fi
8357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8358$as_echo "$acl_cv_prog_gnu_ld" >&6; }
8359with_gnu_ld=$acl_cv_prog_gnu_ld
8360
8361
8362
8363
8364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8365$as_echo_n "checking for shared library run path origin... " >&6; }
8366if ${acl_cv_rpath+:} false; then :
8367 $as_echo_n "(cached) " >&6
8368else
8369
8370 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8371 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8372 . ./conftest.sh
8373 rm -f ./conftest.sh
8374 acl_cv_rpath=done
8375
8376fi
8377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8378$as_echo "$acl_cv_rpath" >&6; }
8379 wl="$acl_cv_wl"
8380 acl_libext="$acl_cv_libext"
8381 acl_shlibext="$acl_cv_shlibext"
8382 acl_libname_spec="$acl_cv_libname_spec"
8383 acl_library_names_spec="$acl_cv_library_names_spec"
8384 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8385 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8386 acl_hardcode_direct="$acl_cv_hardcode_direct"
8387 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
8388 # Check whether --enable-rpath was given.
8389if test "${enable_rpath+set}" = set; then :
8390 enableval=$enable_rpath; :
8391else
8392 enable_rpath=yes
8393fi
8394
8395
8396
8397
8398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
8399$as_echo_n "checking 32-bit host C ABI... " >&6; }
8400if ${gl_cv_host_cpu_c_abi_32bit+:} false; then :
8401 $as_echo_n "(cached) " >&6
8402else
8403 if test -n "$gl_cv_host_cpu_c_abi"; then
8404 case "$gl_cv_host_cpu_c_abi" in
8405 i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
8406 gl_cv_host_cpu_c_abi_32bit=yes ;;
8407 *)
8408 gl_cv_host_cpu_c_abi_32bit=no ;;
8409 esac
8410 else
8411 case "$host_cpu" in
8412
8413 i[4567]86 )
8414 gl_cv_host_cpu_c_abi_32bit=yes
8415 ;;
8416
8417 x86_64 )
8418 # On x86_64 systems, the C compiler may be generating code in one of
8419 # these ABIs:
8420 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
8421 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
8422 # with native Windows (mingw, MSVC).
8423 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
8424 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
8425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8426/* end confdefs.h. */
8427#if (defined __x86_64__ || defined __amd64__ \
8428 || defined _M_X64 || defined _M_AMD64) \
8429 && !(defined __ILP32__ || defined _ILP32)
8430 int ok;
8431 #else
8432 error fail
8433 #endif
8434
8435_ACEOF
8436if ac_fn_c_try_compile "$LINENO"; then :
8437 gl_cv_host_cpu_c_abi_32bit=no
8438else
8439 gl_cv_host_cpu_c_abi_32bit=yes
8440fi
8441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8442 ;;
8443
8444 arm* | aarch64 )
8445 # Assume arm with EABI.
8446 # On arm64 systems, the C compiler may be generating code in one of
8447 # these ABIs:
8448 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
8449 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
8450 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
8451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8452/* end confdefs.h. */
8453#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
8454 int ok;
8455 #else
8456 error fail
8457 #endif
8458
8459_ACEOF
8460if ac_fn_c_try_compile "$LINENO"; then :
8461 gl_cv_host_cpu_c_abi_32bit=no
8462else
8463 gl_cv_host_cpu_c_abi_32bit=yes
8464fi
8465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8466 ;;
8467
8468 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
8469 # On hppa, the C compiler may be generating 32-bit code or 64-bit
8470 # code. In the latter case, it defines _LP64 and __LP64__.
8471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8472/* end confdefs.h. */
8473#ifdef __LP64__
8474 int ok;
8475 #else
8476 error fail
8477 #endif
8478
8479_ACEOF
8480if ac_fn_c_try_compile "$LINENO"; then :
8481 gl_cv_host_cpu_c_abi_32bit=no
8482else
8483 gl_cv_host_cpu_c_abi_32bit=yes
8484fi
8485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8486 ;;
8487
8488 ia64* )
8489 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
8490 # 32-bit code. In the latter case, it defines _ILP32.
8491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8492/* end confdefs.h. */
8493#ifdef _ILP32
8494 int ok;
8495 #else
8496 error fail
8497 #endif
8498
8499_ACEOF
8500if ac_fn_c_try_compile "$LINENO"; then :
8501 gl_cv_host_cpu_c_abi_32bit=yes
8502else
8503 gl_cv_host_cpu_c_abi_32bit=no
8504fi
8505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8506 ;;
8507
8508 mips* )
8509 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
8510 # at 32.
8511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8512/* end confdefs.h. */
8513#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
8514 int ok;
8515 #else
8516 error fail
8517 #endif
8518
8519_ACEOF
8520if ac_fn_c_try_compile "$LINENO"; then :
8521 gl_cv_host_cpu_c_abi_32bit=no
8522else
8523 gl_cv_host_cpu_c_abi_32bit=yes
8524fi
8525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8526 ;;
8527
8528 powerpc* )
8529 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
8530 # No need to distinguish them here; the caller may distinguish
8531 # them based on the OS.
8532 # On powerpc64 systems, the C compiler may still be generating
8533 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
8534 # be generating 64-bit code.
8535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8536/* end confdefs.h. */
8537#if defined __powerpc64__ || defined _ARCH_PPC64
8538 int ok;
8539 #else
8540 error fail
8541 #endif
8542
8543_ACEOF
8544if ac_fn_c_try_compile "$LINENO"; then :
8545 gl_cv_host_cpu_c_abi_32bit=no
8546else
8547 gl_cv_host_cpu_c_abi_32bit=yes
8548fi
8549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8550 ;;
8551
8552 rs6000 )
8553 gl_cv_host_cpu_c_abi_32bit=yes
8554 ;;
8555
8556 riscv32 | riscv64 )
8557 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
8558 # Size of 'long' and 'void *':
8559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8560/* end confdefs.h. */
8561#if defined __LP64__
8562 int ok;
8563 #else
8564 error fail
8565 #endif
8566
8567_ACEOF
8568if ac_fn_c_try_compile "$LINENO"; then :
8569 gl_cv_host_cpu_c_abi_32bit=no
8570else
8571 gl_cv_host_cpu_c_abi_32bit=yes
8572fi
8573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8574 ;;
8575
8576 s390* )
8577 # On s390x, the C compiler may be generating 64-bit (= s390x) code
8578 # or 31-bit (= s390) code.
8579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8580/* end confdefs.h. */
8581#if defined __LP64__ || defined __s390x__
8582 int ok;
8583 #else
8584 error fail
8585 #endif
8586
8587_ACEOF
8588if ac_fn_c_try_compile "$LINENO"; then :
8589 gl_cv_host_cpu_c_abi_32bit=no
8590else
8591 gl_cv_host_cpu_c_abi_32bit=yes
8592fi
8593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8594 ;;
8595
8596 sparc | sparc64 )
8597 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
8598 # C compiler still generates 32-bit code.
8599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8600/* end confdefs.h. */
8601#if defined __sparcv9 || defined __arch64__
8602 int ok;
8603 #else
8604 error fail
8605 #endif
8606
8607_ACEOF
8608if ac_fn_c_try_compile "$LINENO"; then :
8609 gl_cv_host_cpu_c_abi_32bit=no
8610else
8611 gl_cv_host_cpu_c_abi_32bit=yes
8612fi
8613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8614 ;;
8615
8616 *)
8617 gl_cv_host_cpu_c_abi_32bit=no
8618 ;;
8619 esac
8620 fi
8621
8622fi
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
8624$as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; }
8625
8626 HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
8627
8628
8629
8630
8631
8632 case "$host_os" in
8633 solaris*)
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
8635$as_echo_n "checking for 64-bit host... " >&6; }
8636if ${gl_cv_solaris_64bit+:} false; then :
8637 $as_echo_n "(cached) " >&6
8638else
8639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8640/* end confdefs.h. */
8641#ifdef _LP64
8642 int ok;
8643 #else
8644 error fail
8645 #endif
8646
8647_ACEOF
8648if ac_fn_c_try_compile "$LINENO"; then :
8649 gl_cv_solaris_64bit=yes
8650else
8651 gl_cv_solaris_64bit=no
8652fi
8653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8654
8655fi
8656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
8657$as_echo "$gl_cv_solaris_64bit" >&6; };;
8658 esac
8659
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
8661$as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; }
8662if ${acl_cv_libdirstems+:} false; then :
8663 $as_echo_n "(cached) " >&6
8664else
8665 acl_libdirstem=lib
8666 acl_libdirstem2=
8667 case "$host_os" in
8668 solaris*)
8669 if test $gl_cv_solaris_64bit = yes; then
8670 acl_libdirstem=lib/64
8671 case "$host_cpu" in
8672 sparc*) acl_libdirstem2=lib/sparcv9 ;;
8673 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
8674 esac
8675 fi
8676 ;;
8677 *)
8678 if test "$HOST_CPU_C_ABI_32BIT" != yes; then
8679 searchpath=`(if test -f /usr/bin/gcc \
8680 && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
8681 LC_ALL=C /usr/bin/gcc -print-search-dirs; \
8682 else \
8683 LC_ALL=C $CC -print-search-dirs; \
8684 fi) 2>/dev/null \
8685 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
8686 if test -n "$searchpath"; then
8687 acl_save_IFS="${IFS= }"; IFS=":"
8688 for searchdir in $searchpath; do
8689 if test -d "$searchdir"; then
8690 case "$searchdir" in
8691 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
8692 */../ | */.. )
8693 # Better ignore directories of this form. They are misleading.
8694 ;;
8695 *) searchdir=`cd "$searchdir" && pwd`
8696 case "$searchdir" in
8697 */lib64 ) acl_libdirstem=lib64 ;;
8698 esac ;;
8699 esac
8700 fi
8701 done
8702 IFS="$acl_save_IFS"
8703 fi
8704 fi
8705 ;;
8706 esac
8707 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
8708 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
8709
8710fi
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
8712$as_echo "$acl_cv_libdirstems" >&6; }
8713 # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
8714 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
8715 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
8716
8717
8718
8719 gl_threads_api=none
8720 LIBTHREAD=
8721 LTLIBTHREAD=
8722 LIBMULTITHREAD=
8723 LTLIBMULTITHREAD=
8724 if test "$gl_use_threads" != no; then
8725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
8726$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
8727if ${gl_cv_have_weak+:} false; then :
8728 $as_echo_n "(cached) " >&6
8729else
8730 gl_cv_have_weak=no
8731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8732/* end confdefs.h. */
8733extern void xyzzy ();
8734#pragma weak xyzzy
8735int
8736main ()
8737{
8738xyzzy();
8739 ;
8740 return 0;
8741}
8742_ACEOF
8743if ac_fn_c_try_link "$LINENO"; then :
8744 gl_cv_have_weak=maybe
8745fi
8746rm -f core conftest.err conftest.$ac_objext \
8747 conftest$ac_exeext conftest.$ac_ext
8748 if test $gl_cv_have_weak = maybe; then
8749 if test "$cross_compiling" = yes; then :
8750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8751/* end confdefs.h. */
8752#ifdef __ELF__
8753 Extensible Linking Format
8754 #endif
8755
8756_ACEOF
8757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8758 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
8759 gl_cv_have_weak="guessing yes"
8760else
8761 gl_cv_have_weak="guessing no"
8762fi
8763rm -f conftest*
8764
8765
8766else
8767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8768/* end confdefs.h. */
8769
8770#include <stdio.h>
8771#pragma weak fputs
8772int main ()
8773{
8774 return (fputs == NULL);
8775}
8776_ACEOF
8777if ac_fn_c_try_run "$LINENO"; then :
8778 gl_cv_have_weak=yes
8779else
8780 gl_cv_have_weak=no
8781fi
8782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8783 conftest.$ac_objext conftest.beam conftest.$ac_ext
8784fi
8785
8786 fi
8787 case " $LDFLAGS " in
8788 *" -static "*) gl_cv_have_weak=no ;;
8789 esac
8790
8791fi
8792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
8793$as_echo "$gl_cv_have_weak" >&6; }
8794 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
8795 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
8796 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
8797 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8798if test "x$ac_cv_header_pthread_h" = xyes; then :
8799 gl_have_pthread_h=yes
8800else
8801 gl_have_pthread_h=no
8802fi
8803
8804
8805 if test "$gl_have_pthread_h" = yes; then
8806 # Other possible tests:
8807 # -lpthreads (FSU threads, PCthreads)
8808 # -lgthreads
8809 gl_have_pthread=
8810 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
8811 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
8812 # the second one only in libpthread, and lock.c needs it.
8813 #
8814 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
8815 # needs -pthread for some reason. See:
8816 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
8817 save_LIBS=$LIBS
8818 for gl_pthread in '' '-pthread'; do
8819 LIBS="$LIBS $gl_pthread"
8820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8821/* end confdefs.h. */
8822#include <pthread.h>
8823 pthread_mutex_t m;
8824 pthread_mutexattr_t ma;
8825
8826int
8827main ()
8828{
8829pthread_mutex_lock (&m);
8830 pthread_mutexattr_init (&ma);
8831 ;
8832 return 0;
8833}
8834_ACEOF
8835if ac_fn_c_try_link "$LINENO"; then :
8836 gl_have_pthread=yes
8837 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
8838 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
8839fi
8840rm -f core conftest.err conftest.$ac_objext \
8841 conftest$ac_exeext conftest.$ac_ext
8842 LIBS=$save_LIBS
8843 test -n "$gl_have_pthread" && break
8844 done
8845
8846 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
8847 # since it is defined as a macro on OSF/1.)
8848 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
8849 # The program links fine without libpthread. But it may actually
8850 # need to link with libpthread in order to create multiple threads.
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
8852$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
8853if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
8854 $as_echo_n "(cached) " >&6
8855else
8856 ac_check_lib_save_LIBS=$LIBS
8857LIBS="-lpthread $LIBS"
8858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8859/* end confdefs.h. */
8860
8861/* Override any GCC internal prototype to avoid an error.
8862 Use char because int might match the return type of a GCC
8863 builtin and then its argument prototype would still apply. */
8864#ifdef __cplusplus
8865extern "C"
8866#endif
8867char pthread_kill ();
8868int
8869main ()
8870{
8871return pthread_kill ();
8872 ;
8873 return 0;
8874}
8875_ACEOF
8876if ac_fn_c_try_link "$LINENO"; then :
8877 ac_cv_lib_pthread_pthread_kill=yes
8878else
8879 ac_cv_lib_pthread_pthread_kill=no
8880fi
8881rm -f core conftest.err conftest.$ac_objext \
8882 conftest$ac_exeext conftest.$ac_ext
8883LIBS=$ac_check_lib_save_LIBS
8884fi
8885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
8886$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
8887if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
8888 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
8889 # On Solaris and HP-UX, most pthread functions exist also in libc.
8890 # Therefore pthread_in_use() needs to actually try to create a
8891 # thread: pthread_create from libc will fail, whereas
8892 # pthread_create will actually create a thread.
8893 # On Solaris 10 or newer, this test is no longer needed, because
8894 # libc contains the fully functional pthread functions.
8895 case "$host_os" in
8896 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
8897
8898$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
8899
8900 esac
8901
8902fi
8903
8904 elif test -z "$gl_have_pthread"; then
8905 # Some library is needed. Try libpthread and libc_r.
8906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
8907$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
8908if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
8909 $as_echo_n "(cached) " >&6
8910else
8911 ac_check_lib_save_LIBS=$LIBS
8912LIBS="-lpthread $LIBS"
8913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8914/* end confdefs.h. */
8915
8916/* Override any GCC internal prototype to avoid an error.
8917 Use char because int might match the return type of a GCC
8918 builtin and then its argument prototype would still apply. */
8919#ifdef __cplusplus
8920extern "C"
8921#endif
8922char pthread_kill ();
8923int
8924main ()
8925{
8926return pthread_kill ();
8927 ;
8928 return 0;
8929}
8930_ACEOF
8931if ac_fn_c_try_link "$LINENO"; then :
8932 ac_cv_lib_pthread_pthread_kill=yes
8933else
8934 ac_cv_lib_pthread_pthread_kill=no
8935fi
8936rm -f core conftest.err conftest.$ac_objext \
8937 conftest$ac_exeext conftest.$ac_ext
8938LIBS=$ac_check_lib_save_LIBS
8939fi
8940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
8941$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
8942if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
8943 gl_have_pthread=yes
8944 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
8945 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
8946fi
8947
8948 if test -z "$gl_have_pthread"; then
8949 # For FreeBSD 4.
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
8951$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
8952if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
8953 $as_echo_n "(cached) " >&6
8954else
8955 ac_check_lib_save_LIBS=$LIBS
8956LIBS="-lc_r $LIBS"
8957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8958/* end confdefs.h. */
8959
8960/* Override any GCC internal prototype to avoid an error.
8961 Use char because int might match the return type of a GCC
8962 builtin and then its argument prototype would still apply. */
8963#ifdef __cplusplus
8964extern "C"
8965#endif
8966char pthread_kill ();
8967int
8968main ()
8969{
8970return pthread_kill ();
8971 ;
8972 return 0;
8973}
8974_ACEOF
8975if ac_fn_c_try_link "$LINENO"; then :
8976 ac_cv_lib_c_r_pthread_kill=yes
8977else
8978 ac_cv_lib_c_r_pthread_kill=no
8979fi
8980rm -f core conftest.err conftest.$ac_objext \
8981 conftest$ac_exeext conftest.$ac_ext
8982LIBS=$ac_check_lib_save_LIBS
8983fi
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
8985$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
8986if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
8987 gl_have_pthread=yes
8988 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
8989 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
8990fi
8991
8992 fi
8993 fi
8994 if test -n "$gl_have_pthread"; then
8995 gl_threads_api=posix
8996
8997$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
8998
8999 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
9000 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
9001
9002$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
9003
9004 LIBTHREAD=
9005 LTLIBTHREAD=
9006 fi
9007 fi
9008 fi
9009 fi
9010 fi
9011 if test -z "$gl_have_pthread"; then
9012 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
9013 gl_have_solaristhread=
9014 gl_save_LIBS="$LIBS"
9015 LIBS="$LIBS -lthread"
9016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9017/* end confdefs.h. */
9018
9019#include <thread.h>
9020#include <synch.h>
9021
9022int
9023main ()
9024{
9025thr_self();
9026 ;
9027 return 0;
9028}
9029_ACEOF
9030if ac_fn_c_try_link "$LINENO"; then :
9031 gl_have_solaristhread=yes
9032fi
9033rm -f core conftest.err conftest.$ac_objext \
9034 conftest$ac_exeext conftest.$ac_ext
9035 LIBS="$gl_save_LIBS"
9036 if test -n "$gl_have_solaristhread"; then
9037 gl_threads_api=solaris
9038 LIBTHREAD=-lthread
9039 LTLIBTHREAD=-lthread
9040 LIBMULTITHREAD="$LIBTHREAD"
9041 LTLIBMULTITHREAD="$LTLIBTHREAD"
9042
9043$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
9044
9045 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
9046
9047$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
9048
9049 LIBTHREAD=
9050 LTLIBTHREAD=
9051 fi
9052 fi
9053 fi
9054 fi
9055 if test "$gl_use_threads" = pth; then
9056 gl_save_CPPFLAGS="$CPPFLAGS"
9057
9058
9059
9060
9061
9062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
9063$as_echo_n "checking how to link with libpth... " >&6; }
9064if ${ac_cv_libpth_libs+:} false; then :
9065 $as_echo_n "(cached) " >&6
9066else
9067
9068
9069
9070
9071
9072
9073
9074 use_additional=yes
9075
9076 acl_save_prefix="$prefix"
9077 prefix="$acl_final_prefix"
9078 acl_save_exec_prefix="$exec_prefix"
9079 exec_prefix="$acl_final_exec_prefix"
9080
9081 eval additional_includedir=\"$includedir\"
9082 eval additional_libdir=\"$libdir\"
9083
9084 exec_prefix="$acl_save_exec_prefix"
9085 prefix="$acl_save_prefix"
9086
9087
9088# Check whether --with-libpth-prefix was given.
9089if test "${with_libpth_prefix+set}" = set; then :
9090 withval=$with_libpth_prefix;
9091 if test "X$withval" = "Xno"; then
9092 use_additional=no
9093 else
9094 if test "X$withval" = "X"; then
9095
9096 acl_save_prefix="$prefix"
9097 prefix="$acl_final_prefix"
9098 acl_save_exec_prefix="$exec_prefix"
9099 exec_prefix="$acl_final_exec_prefix"
9100
9101 eval additional_includedir=\"$includedir\"
9102 eval additional_libdir=\"$libdir\"
9103
9104 exec_prefix="$acl_save_exec_prefix"
9105 prefix="$acl_save_prefix"
9106
9107 else
9108 additional_includedir="$withval/include"
9109 additional_libdir="$withval/$acl_libdirstem"
9110 if test "$acl_libdirstem2" != "$acl_libdirstem" \
9111 && test ! -d "$withval/$acl_libdirstem"; then
9112 additional_libdir="$withval/$acl_libdirstem2"
9113 fi
9114 fi
9115 fi
9116
9117fi
9118
9119 LIBPTH=
9120 LTLIBPTH=
9121 INCPTH=
9122 LIBPTH_PREFIX=
9123 HAVE_LIBPTH=
9124 rpathdirs=
9125 ltrpathdirs=
9126 names_already_handled=
9127 names_next_round='pth '
9128 while test -n "$names_next_round"; do
9129 names_this_round="$names_next_round"
9130 names_next_round=
9131 for name in $names_this_round; do
9132 already_handled=
9133 for n in $names_already_handled; do
9134 if test "$n" = "$name"; then
9135 already_handled=yes
9136 break
9137 fi
9138 done
9139 if test -z "$already_handled"; then
9140 names_already_handled="$names_already_handled $name"
9141 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
9142 eval value=\"\$HAVE_LIB$uppername\"
9143 if test -n "$value"; then
9144 if test "$value" = yes; then
9145 eval value=\"\$LIB$uppername\"
9146 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
9147 eval value=\"\$LTLIB$uppername\"
9148 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
9149 else
9150 :
9151 fi
9152 else
9153 found_dir=
9154 found_la=
9155 found_so=
9156 found_a=
9157 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
9158 if test -n "$acl_shlibext"; then
9159 shrext=".$acl_shlibext" # typically: shrext=.so
9160 else
9161 shrext=
9162 fi
9163 if test $use_additional = yes; then
9164 dir="$additional_libdir"
9165 if test -n "$acl_shlibext"; then
9166 if test -f "$dir/$libname$shrext"; then
9167 found_dir="$dir"
9168 found_so="$dir/$libname$shrext"
9169 else
9170 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9171 ver=`(cd "$dir" && \
9172 for f in "$libname$shrext".*; do echo "$f"; done \
9173 | sed -e "s,^$libname$shrext\\\\.,," \
9174 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9175 | sed 1q ) 2>/dev/null`
9176 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9177 found_dir="$dir"
9178 found_so="$dir/$libname$shrext.$ver"
9179 fi
9180 else
9181 eval library_names=\"$acl_library_names_spec\"
9182 for f in $library_names; do
9183 if test -f "$dir/$f"; then
9184 found_dir="$dir"
9185 found_so="$dir/$f"
9186 break
9187 fi
9188 done
9189 fi
9190 fi
9191 fi
9192 if test "X$found_dir" = "X"; then
9193 if test -f "$dir/$libname.$acl_libext"; then
9194 found_dir="$dir"
9195 found_a="$dir/$libname.$acl_libext"
9196 fi
9197 fi
9198 if test "X$found_dir" != "X"; then
9199 if test -f "$dir/$libname.la"; then
9200 found_la="$dir/$libname.la"
9201 fi
9202 fi
9203 fi
9204 if test "X$found_dir" = "X"; then
9205 for x in $LDFLAGS $LTLIBPTH; do
9206
9207 acl_save_prefix="$prefix"
9208 prefix="$acl_final_prefix"
9209 acl_save_exec_prefix="$exec_prefix"
9210 exec_prefix="$acl_final_exec_prefix"
9211 eval x=\"$x\"
9212 exec_prefix="$acl_save_exec_prefix"
9213 prefix="$acl_save_prefix"
9214
9215 case "$x" in
9216 -L*)
9217 dir=`echo "X$x" | sed -e 's/^X-L//'`
9218 if test -n "$acl_shlibext"; then
9219 if test -f "$dir/$libname$shrext"; then
9220 found_dir="$dir"
9221 found_so="$dir/$libname$shrext"
9222 else
9223 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9224 ver=`(cd "$dir" && \
9225 for f in "$libname$shrext".*; do echo "$f"; done \
9226 | sed -e "s,^$libname$shrext\\\\.,," \
9227 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9228 | sed 1q ) 2>/dev/null`
9229 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9230 found_dir="$dir"
9231 found_so="$dir/$libname$shrext.$ver"
9232 fi
9233 else
9234 eval library_names=\"$acl_library_names_spec\"
9235 for f in $library_names; do
9236 if test -f "$dir/$f"; then
9237 found_dir="$dir"
9238 found_so="$dir/$f"
9239 break
9240 fi
9241 done
9242 fi
9243 fi
9244 fi
9245 if test "X$found_dir" = "X"; then
9246 if test -f "$dir/$libname.$acl_libext"; then
9247 found_dir="$dir"
9248 found_a="$dir/$libname.$acl_libext"
9249 fi
9250 fi
9251 if test "X$found_dir" != "X"; then
9252 if test -f "$dir/$libname.la"; then
9253 found_la="$dir/$libname.la"
9254 fi
9255 fi
9256 ;;
9257 esac
9258 if test "X$found_dir" != "X"; then
9259 break
9260 fi
9261 done
9262 fi
9263 if test "X$found_dir" != "X"; then
9264 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
9265 if test "X$found_so" != "X"; then
9266 if test "$enable_rpath" = no \
9267 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
9268 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
9269 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
9270 else
9271 haveit=
9272 for x in $ltrpathdirs; do
9273 if test "X$x" = "X$found_dir"; then
9274 haveit=yes
9275 break
9276 fi
9277 done
9278 if test -z "$haveit"; then
9279 ltrpathdirs="$ltrpathdirs $found_dir"
9280 fi
9281 if test "$acl_hardcode_direct" = yes; then
9282 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
9283 else
9284 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
9285 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
9286 haveit=
9287 for x in $rpathdirs; do
9288 if test "X$x" = "X$found_dir"; then
9289 haveit=yes
9290 break
9291 fi
9292 done
9293 if test -z "$haveit"; then
9294 rpathdirs="$rpathdirs $found_dir"
9295 fi
9296 else
9297 haveit=
9298 for x in $LDFLAGS $LIBPTH; do
9299
9300 acl_save_prefix="$prefix"
9301 prefix="$acl_final_prefix"
9302 acl_save_exec_prefix="$exec_prefix"
9303 exec_prefix="$acl_final_exec_prefix"
9304 eval x=\"$x\"
9305 exec_prefix="$acl_save_exec_prefix"
9306 prefix="$acl_save_prefix"
9307
9308 if test "X$x" = "X-L$found_dir"; then
9309 haveit=yes
9310 break
9311 fi
9312 done
9313 if test -z "$haveit"; then
9314 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
9315 fi
9316 if test "$acl_hardcode_minus_L" != no; then
9317 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
9318 else
9319 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
9320 fi
9321 fi
9322 fi
9323 fi
9324 else
9325 if test "X$found_a" != "X"; then
9326 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
9327 else
9328 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
9329 fi
9330 fi
9331 additional_includedir=
9332 case "$found_dir" in
9333 */$acl_libdirstem | */$acl_libdirstem/)
9334 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
9335 if test "$name" = 'pth'; then
9336 LIBPTH_PREFIX="$basedir"
9337 fi
9338 additional_includedir="$basedir/include"
9339 ;;
9340 */$acl_libdirstem2 | */$acl_libdirstem2/)
9341 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
9342 if test "$name" = 'pth'; then
9343 LIBPTH_PREFIX="$basedir"
9344 fi
9345 additional_includedir="$basedir/include"
9346 ;;
9347 esac
9348 if test "X$additional_includedir" != "X"; then
9349 if test "X$additional_includedir" != "X/usr/include"; then
9350 haveit=
9351 if test "X$additional_includedir" = "X/usr/local/include"; then
9352 if test -n "$GCC"; then
9353 case $host_os in
9354 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9355 esac
9356 fi
9357 fi
9358 if test -z "$haveit"; then
9359 for x in $CPPFLAGS $INCPTH; do
9360
9361 acl_save_prefix="$prefix"
9362 prefix="$acl_final_prefix"
9363 acl_save_exec_prefix="$exec_prefix"
9364 exec_prefix="$acl_final_exec_prefix"
9365 eval x=\"$x\"
9366 exec_prefix="$acl_save_exec_prefix"
9367 prefix="$acl_save_prefix"
9368
9369 if test "X$x" = "X-I$additional_includedir"; then
9370 haveit=yes
9371 break
9372 fi
9373 done
9374 if test -z "$haveit"; then
9375 if test -d "$additional_includedir"; then
9376 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
9377 fi
9378 fi
9379 fi
9380 fi
9381 fi
9382 if test -n "$found_la"; then
9383 save_libdir="$libdir"
9384 case "$found_la" in
9385 */* | *\\*) . "$found_la" ;;
9386 *) . "./$found_la" ;;
9387 esac
9388 libdir="$save_libdir"
9389 for dep in $dependency_libs; do
9390 case "$dep" in
9391 -L*)
9392 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9393 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
9394 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
9395 haveit=
9396 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
9397 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
9398 if test -n "$GCC"; then
9399 case $host_os in
9400 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9401 esac
9402 fi
9403 fi
9404 if test -z "$haveit"; then
9405 haveit=
9406 for x in $LDFLAGS $LIBPTH; do
9407
9408 acl_save_prefix="$prefix"
9409 prefix="$acl_final_prefix"
9410 acl_save_exec_prefix="$exec_prefix"
9411 exec_prefix="$acl_final_exec_prefix"
9412 eval x=\"$x\"
9413 exec_prefix="$acl_save_exec_prefix"
9414 prefix="$acl_save_prefix"
9415
9416 if test "X$x" = "X-L$additional_libdir"; then
9417 haveit=yes
9418 break
9419 fi
9420 done
9421 if test -z "$haveit"; then
9422 if test -d "$additional_libdir"; then
9423 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
9424 fi
9425 fi
9426 haveit=
9427 for x in $LDFLAGS $LTLIBPTH; do
9428
9429 acl_save_prefix="$prefix"
9430 prefix="$acl_final_prefix"
9431 acl_save_exec_prefix="$exec_prefix"
9432 exec_prefix="$acl_final_exec_prefix"
9433 eval x=\"$x\"
9434 exec_prefix="$acl_save_exec_prefix"
9435 prefix="$acl_save_prefix"
9436
9437 if test "X$x" = "X-L$additional_libdir"; then
9438 haveit=yes
9439 break
9440 fi
9441 done
9442 if test -z "$haveit"; then
9443 if test -d "$additional_libdir"; then
9444 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
9445 fi
9446 fi
9447 fi
9448 fi
9449 ;;
9450 -R*)
9451 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9452 if test "$enable_rpath" != no; then
9453 haveit=
9454 for x in $rpathdirs; do
9455 if test "X$x" = "X$dir"; then
9456 haveit=yes
9457 break
9458 fi
9459 done
9460 if test -z "$haveit"; then
9461 rpathdirs="$rpathdirs $dir"
9462 fi
9463 haveit=
9464 for x in $ltrpathdirs; do
9465 if test "X$x" = "X$dir"; then
9466 haveit=yes
9467 break
9468 fi
9469 done
9470 if test -z "$haveit"; then
9471 ltrpathdirs="$ltrpathdirs $dir"
9472 fi
9473 fi
9474 ;;
9475 -l*)
9476 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9477 ;;
9478 *.la)
9479 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9480 ;;
9481 *)
9482 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
9483 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
9484 ;;
9485 esac
9486 done
9487 fi
9488 else
9489 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
9490 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
9491 fi
9492 fi
9493 fi
9494 done
9495 done
9496 if test "X$rpathdirs" != "X"; then
9497 if test -n "$acl_hardcode_libdir_separator"; then
9498 alldirs=
9499 for found_dir in $rpathdirs; do
9500 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
9501 done
9502 acl_save_libdir="$libdir"
9503 libdir="$alldirs"
9504 eval flag=\"$acl_hardcode_libdir_flag_spec\"
9505 libdir="$acl_save_libdir"
9506 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
9507 else
9508 for found_dir in $rpathdirs; do
9509 acl_save_libdir="$libdir"
9510 libdir="$found_dir"
9511 eval flag=\"$acl_hardcode_libdir_flag_spec\"
9512 libdir="$acl_save_libdir"
9513 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
9514 done
9515 fi
9516 fi
9517 if test "X$ltrpathdirs" != "X"; then
9518 for found_dir in $ltrpathdirs; do
9519 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
9520 done
9521 fi
9522
9523
9524
9525
9526
9527 ac_cv_libpth_libs="$LIBPTH"
9528 ac_cv_libpth_ltlibs="$LTLIBPTH"
9529 ac_cv_libpth_cppflags="$INCPTH"
9530 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
9531
9532fi
9533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
9534$as_echo "$ac_cv_libpth_libs" >&6; }
9535 LIBPTH="$ac_cv_libpth_libs"
9536 LTLIBPTH="$ac_cv_libpth_ltlibs"
9537 INCPTH="$ac_cv_libpth_cppflags"
9538 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
9539
9540 for element in $INCPTH; do
9541 haveit=
9542 for x in $CPPFLAGS; do
9543
9544 acl_save_prefix="$prefix"
9545 prefix="$acl_final_prefix"
9546 acl_save_exec_prefix="$exec_prefix"
9547 exec_prefix="$acl_final_exec_prefix"
9548 eval x=\"$x\"
9549 exec_prefix="$acl_save_exec_prefix"
9550 prefix="$acl_save_prefix"
9551
9552 if test "X$x" = "X$element"; then
9553 haveit=yes
9554 break
9555 fi
9556 done
9557 if test -z "$haveit"; then
9558 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9559 fi
9560 done
9561
9562
9563
9564
9565 HAVE_LIBPTH=yes
9566
9567
9568
9569 gl_have_pth=
9570 gl_save_LIBS="$LIBS"
9571 LIBS="$LIBS $LIBPTH"
9572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9573/* end confdefs.h. */
9574#include <pth.h>
9575int
9576main ()
9577{
9578pth_self();
9579 ;
9580 return 0;
9581}
9582_ACEOF
9583if ac_fn_c_try_link "$LINENO"; then :
9584 gl_have_pth=yes
9585fi
9586rm -f core conftest.err conftest.$ac_objext \
9587 conftest$ac_exeext conftest.$ac_ext
9588 LIBS="$gl_save_LIBS"
9589 if test -n "$gl_have_pth"; then
9590 gl_threads_api=pth
9591 LIBTHREAD="$LIBPTH"
9592 LTLIBTHREAD="$LTLIBPTH"
9593 LIBMULTITHREAD="$LIBTHREAD"
9594 LTLIBMULTITHREAD="$LTLIBTHREAD"
9595
9596$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
9597
9598 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
9599 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
9600
9601$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
9602
9603 LIBTHREAD=
9604 LTLIBTHREAD=
9605 fi
9606 fi
9607 else
9608 CPPFLAGS="$gl_save_CPPFLAGS"
9609 fi
9610 fi
9611 if test -z "$gl_have_pthread"; then
9612 case "$gl_use_threads" in
9613 yes | windows | win32) # The 'win32' is for backward compatibility.
9614 if { case "$host_os" in
9615 mingw*) true;;
9616 *) false;;
9617 esac
9618 }; then
9619 gl_threads_api=windows
9620
9621$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
9622
9623 fi
9624 ;;
9625 esac
9626 fi
9627 fi
9628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
9629$as_echo_n "checking for multithread API to use... " >&6; }
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
9631$as_echo "$gl_threads_api" >&6; }
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643 if test "$gl_threads_api" = posix; then
9644 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
9645 # pthread_rwlock_* functions.
9646 has_rwlock=false
9647 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
9648"
9649if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
9650 has_rwlock=true
9651
9652$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
9653
9654fi
9655
9656 if $has_rwlock; then
9657
9658
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
9660$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
9661if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
9662 $as_echo_n "(cached) " >&6
9663else
9664 save_LIBS="$LIBS"
9665 LIBS="$LIBS $LIBMULTITHREAD"
9666 if test "$cross_compiling" = yes; then :
9667 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
9668else
9669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9670/* end confdefs.h. */
9671
9672#include <errno.h>
9673#include <pthread.h>
9674#include <stdlib.h>
9675#include <unistd.h>
9676
9677#define SUCCEED() exit (0)
9678#define FAILURE() exit (1)
9679#define UNEXPECTED(n) (exit (10 + (n)))
9680
9681/* The main thread creates the waiting writer and the requesting reader threads
9682 in the default way; this guarantees that they have the same priority.
9683 We can reuse the main thread as first reader thread. */
9684
9685static pthread_rwlock_t lock;
9686static pthread_t reader1;
9687static pthread_t writer;
9688static pthread_t reader2;
9689static pthread_t timer;
9690/* Used to pass control from writer to reader2 and from reader2 to timer,
9691 as in a relay race.
9692 Passing control from one running thread to another running thread
9693 is most likely faster than to create the second thread. */
9694static pthread_mutex_t baton;
9695
9696static void *
9697timer_func (void *ignored)
9698{
9699 /* Step 13 (can be before or after step 12):
9700 The timer thread takes the baton, then waits a moment to make sure
9701 it can tell whether the second reader thread is blocked at step 12. */
9702 if (pthread_mutex_lock (&baton))
9703 UNEXPECTED (13);
9704 usleep (100000);
9705 /* By the time we get here, it's clear that the second reader thread is
9706 blocked at step 12. This is the desired behaviour. */
9707 SUCCEED ();
9708}
9709
9710static void *
9711reader2_func (void *ignored)
9712{
9713 int err;
9714
9715 /* Step 8 (can be before or after step 7):
9716 The second reader thread takes the baton, then waits a moment to make sure
9717 the writer thread has reached step 7. */
9718 if (pthread_mutex_lock (&baton))
9719 UNEXPECTED (8);
9720 usleep (100000);
9721 /* Step 9: The second reader thread requests the lock. */
9722 err = pthread_rwlock_tryrdlock (&lock);
9723 if (err == 0)
9724 FAILURE ();
9725 else if (err != EBUSY)
9726 UNEXPECTED (9);
9727 /* Step 10: Launch a timer, to test whether the next call blocks. */
9728 if (pthread_create (&timer, NULL, timer_func, NULL))
9729 UNEXPECTED (10);
9730 /* Step 11: Release the baton. */
9731 if (pthread_mutex_unlock (&baton))
9732 UNEXPECTED (11);
9733 /* Step 12: The second reader thread requests the lock. */
9734 err = pthread_rwlock_rdlock (&lock);
9735 if (err == 0)
9736 FAILURE ();
9737 else
9738 UNEXPECTED (12);
9739}
9740
9741static void *
9742writer_func (void *ignored)
9743{
9744 /* Step 4: Take the baton, so that the second reader thread does not go ahead
9745 too early. */
9746 if (pthread_mutex_lock (&baton))
9747 UNEXPECTED (4);
9748 /* Step 5: Create the second reader thread. */
9749 if (pthread_create (&reader2, NULL, reader2_func, NULL))
9750 UNEXPECTED (5);
9751 /* Step 6: Release the baton. */
9752 if (pthread_mutex_unlock (&baton))
9753 UNEXPECTED (6);
9754 /* Step 7: The writer thread requests the lock. */
9755 if (pthread_rwlock_wrlock (&lock))
9756 UNEXPECTED (7);
9757 return NULL;
9758}
9759
9760int
9761main ()
9762{
9763 reader1 = pthread_self ();
9764
9765 /* Step 1: The main thread initializes the lock and the baton. */
9766 if (pthread_rwlock_init (&lock, NULL))
9767 UNEXPECTED (1);
9768 if (pthread_mutex_init (&baton, NULL))
9769 UNEXPECTED (1);
9770 /* Step 2: The main thread acquires the lock as a reader. */
9771 if (pthread_rwlock_rdlock (&lock))
9772 UNEXPECTED (2);
9773 /* Step 3: Create the writer thread. */
9774 if (pthread_create (&writer, NULL, writer_func, NULL))
9775 UNEXPECTED (3);
9776 /* Job done. Go to sleep. */
9777 for (;;)
9778 {
9779 sleep (1);
9780 }
9781}
9782
9783_ACEOF
9784if ac_fn_c_try_run "$LINENO"; then :
9785 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
9786else
9787 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
9788fi
9789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9790 conftest.$ac_objext conftest.beam conftest.$ac_ext
9791fi
9792
9793 LIBS="$save_LIBS"
9794
9795fi
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
9797$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
9798 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
9799 *yes)
9800
9801$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
9802
9803 ;;
9804 esac
9805
9806 fi
9807 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
9808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9809/* end confdefs.h. */
9810
9811 #include <pthread.h>
9812int
9813main ()
9814{
9815
9816#if __FreeBSD__ == 4
9817error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
9818#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
9819 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
9820error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
9821#else
9822int x = (int)PTHREAD_MUTEX_RECURSIVE;
9823return !x;
9824#endif
9825
9826 ;
9827 return 0;
9828}
9829_ACEOF
9830if ac_fn_c_try_compile "$LINENO"; then :
9831
9832$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
9833
9834fi
9835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9836 fi
9837 :
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849 use_additional=yes
9850
9851 acl_save_prefix="$prefix"
9852 prefix="$acl_final_prefix"
9853 acl_save_exec_prefix="$exec_prefix"
9854 exec_prefix="$acl_final_exec_prefix"
9855
9856 eval additional_includedir=\"$includedir\"
9857 eval additional_libdir=\"$libdir\"
9858
9859 exec_prefix="$acl_save_exec_prefix"
9860 prefix="$acl_save_prefix"
9861
9862
9863# Check whether --with-libiconv-prefix was given.
9864if test "${with_libiconv_prefix+set}" = set; then :
9865 withval=$with_libiconv_prefix;
9866 if test "X$withval" = "Xno"; then
9867 use_additional=no
9868 else
9869 if test "X$withval" = "X"; then
9870
9871 acl_save_prefix="$prefix"
9872 prefix="$acl_final_prefix"
9873 acl_save_exec_prefix="$exec_prefix"
9874 exec_prefix="$acl_final_exec_prefix"
9875
9876 eval additional_includedir=\"$includedir\"
9877 eval additional_libdir=\"$libdir\"
9878
9879 exec_prefix="$acl_save_exec_prefix"
9880 prefix="$acl_save_prefix"
9881
9882 else
9883 additional_includedir="$withval/include"
9884 additional_libdir="$withval/$acl_libdirstem"
9885 if test "$acl_libdirstem2" != "$acl_libdirstem" \
9886 && test ! -d "$withval/$acl_libdirstem"; then
9887 additional_libdir="$withval/$acl_libdirstem2"
9888 fi
9889 fi
9890 fi
9891
9892fi
9893
9894 LIBICONV=
9895 LTLIBICONV=
9896 INCICONV=
9897 LIBICONV_PREFIX=
9898 HAVE_LIBICONV=
9899 rpathdirs=
9900 ltrpathdirs=
9901 names_already_handled=
9902 names_next_round='iconv '
9903 while test -n "$names_next_round"; do
9904 names_this_round="$names_next_round"
9905 names_next_round=
9906 for name in $names_this_round; do
9907 already_handled=
9908 for n in $names_already_handled; do
9909 if test "$n" = "$name"; then
9910 already_handled=yes
9911 break
9912 fi
9913 done
9914 if test -z "$already_handled"; then
9915 names_already_handled="$names_already_handled $name"
9916 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
9917 eval value=\"\$HAVE_LIB$uppername\"
9918 if test -n "$value"; then
9919 if test "$value" = yes; then
9920 eval value=\"\$LIB$uppername\"
9921 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
9922 eval value=\"\$LTLIB$uppername\"
9923 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
9924 else
9925 :
9926 fi
9927 else
9928 found_dir=
9929 found_la=
9930 found_so=
9931 found_a=
9932 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
9933 if test -n "$acl_shlibext"; then
9934 shrext=".$acl_shlibext" # typically: shrext=.so
9935 else
9936 shrext=
9937 fi
9938 if test $use_additional = yes; then
9939 dir="$additional_libdir"
9940 if test -n "$acl_shlibext"; then
9941 if test -f "$dir/$libname$shrext"; then
9942 found_dir="$dir"
9943 found_so="$dir/$libname$shrext"
9944 else
9945 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9946 ver=`(cd "$dir" && \
9947 for f in "$libname$shrext".*; do echo "$f"; done \
9948 | sed -e "s,^$libname$shrext\\\\.,," \
9949 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9950 | sed 1q ) 2>/dev/null`
9951 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9952 found_dir="$dir"
9953 found_so="$dir/$libname$shrext.$ver"
9954 fi
9955 else
9956 eval library_names=\"$acl_library_names_spec\"
9957 for f in $library_names; do
9958 if test -f "$dir/$f"; then
9959 found_dir="$dir"
9960 found_so="$dir/$f"
9961 break
9962 fi
9963 done
9964 fi
9965 fi
9966 fi
9967 if test "X$found_dir" = "X"; then
9968 if test -f "$dir/$libname.$acl_libext"; then
9969 found_dir="$dir"
9970 found_a="$dir/$libname.$acl_libext"
9971 fi
9972 fi
9973 if test "X$found_dir" != "X"; then
9974 if test -f "$dir/$libname.la"; then
9975 found_la="$dir/$libname.la"
9976 fi
9977 fi
9978 fi
9979 if test "X$found_dir" = "X"; then
9980 for x in $LDFLAGS $LTLIBICONV; do
9981
9982 acl_save_prefix="$prefix"
9983 prefix="$acl_final_prefix"
9984 acl_save_exec_prefix="$exec_prefix"
9985 exec_prefix="$acl_final_exec_prefix"
9986 eval x=\"$x\"
9987 exec_prefix="$acl_save_exec_prefix"
9988 prefix="$acl_save_prefix"
9989
9990 case "$x" in
9991 -L*)
9992 dir=`echo "X$x" | sed -e 's/^X-L//'`
9993 if test -n "$acl_shlibext"; then
9994 if test -f "$dir/$libname$shrext"; then
9995 found_dir="$dir"
9996 found_so="$dir/$libname$shrext"
9997 else
9998 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9999 ver=`(cd "$dir" && \
10000 for f in "$libname$shrext".*; do echo "$f"; done \
10001 | sed -e "s,^$libname$shrext\\\\.,," \
10002 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10003 | sed 1q ) 2>/dev/null`
10004 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
10005 found_dir="$dir"
10006 found_so="$dir/$libname$shrext.$ver"
10007 fi
10008 else
10009 eval library_names=\"$acl_library_names_spec\"
10010 for f in $library_names; do
10011 if test -f "$dir/$f"; then
10012 found_dir="$dir"
10013 found_so="$dir/$f"
10014 break
10015 fi
10016 done
10017 fi
10018 fi
10019 fi
10020 if test "X$found_dir" = "X"; then
10021 if test -f "$dir/$libname.$acl_libext"; then
10022 found_dir="$dir"
10023 found_a="$dir/$libname.$acl_libext"
10024 fi
10025 fi
10026 if test "X$found_dir" != "X"; then
10027 if test -f "$dir/$libname.la"; then
10028 found_la="$dir/$libname.la"
10029 fi
10030 fi
10031 ;;
10032 esac
10033 if test "X$found_dir" != "X"; then
10034 break
10035 fi
10036 done
10037 fi
10038 if test "X$found_dir" != "X"; then
10039 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10040 if test "X$found_so" != "X"; then
10041 if test "$enable_rpath" = no \
10042 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
10043 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
10044 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10045 else
10046 haveit=
10047 for x in $ltrpathdirs; do
10048 if test "X$x" = "X$found_dir"; then
10049 haveit=yes
10050 break
10051 fi
10052 done
10053 if test -z "$haveit"; then
b80f6443
JA
10054 ltrpathdirs="$ltrpathdirs $found_dir"
10055 fi
8868edaf 10056 if test "$acl_hardcode_direct" = yes; then
b80f6443
JA
10057 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10058 else
8868edaf 10059 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
b80f6443
JA
10060 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10061 haveit=
10062 for x in $rpathdirs; do
10063 if test "X$x" = "X$found_dir"; then
10064 haveit=yes
10065 break
10066 fi
8868edaf
CR
10067 done
10068 if test -z "$haveit"; then
10069 rpathdirs="$rpathdirs $found_dir"
10070 fi
10071 else
10072 haveit=
10073 for x in $LDFLAGS $LIBICONV; do
10074
10075 acl_save_prefix="$prefix"
10076 prefix="$acl_final_prefix"
10077 acl_save_exec_prefix="$exec_prefix"
10078 exec_prefix="$acl_final_exec_prefix"
10079 eval x=\"$x\"
10080 exec_prefix="$acl_save_exec_prefix"
10081 prefix="$acl_save_prefix"
10082
10083 if test "X$x" = "X-L$found_dir"; then
10084 haveit=yes
10085 break
10086 fi
10087 done
10088 if test -z "$haveit"; then
10089 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10090 fi
10091 if test "$acl_hardcode_minus_L" != no; then
10092 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10093 else
10094 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10095 fi
10096 fi
10097 fi
10098 fi
10099 else
10100 if test "X$found_a" != "X"; then
10101 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10102 else
10103 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10104 fi
10105 fi
10106 additional_includedir=
10107 case "$found_dir" in
10108 */$acl_libdirstem | */$acl_libdirstem/)
10109 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
10110 if test "$name" = 'iconv'; then
10111 LIBICONV_PREFIX="$basedir"
10112 fi
10113 additional_includedir="$basedir/include"
10114 ;;
10115 */$acl_libdirstem2 | */$acl_libdirstem2/)
10116 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
10117 if test "$name" = 'iconv'; then
10118 LIBICONV_PREFIX="$basedir"
10119 fi
10120 additional_includedir="$basedir/include"
10121 ;;
10122 esac
10123 if test "X$additional_includedir" != "X"; then
10124 if test "X$additional_includedir" != "X/usr/include"; then
10125 haveit=
10126 if test "X$additional_includedir" = "X/usr/local/include"; then
10127 if test -n "$GCC"; then
10128 case $host_os in
10129 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10130 esac
10131 fi
10132 fi
10133 if test -z "$haveit"; then
10134 for x in $CPPFLAGS $INCICONV; do
10135
10136 acl_save_prefix="$prefix"
10137 prefix="$acl_final_prefix"
10138 acl_save_exec_prefix="$exec_prefix"
10139 exec_prefix="$acl_final_exec_prefix"
10140 eval x=\"$x\"
10141 exec_prefix="$acl_save_exec_prefix"
10142 prefix="$acl_save_prefix"
10143
10144 if test "X$x" = "X-I$additional_includedir"; then
10145 haveit=yes
10146 break
10147 fi
10148 done
10149 if test -z "$haveit"; then
10150 if test -d "$additional_includedir"; then
10151 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10152 fi
10153 fi
10154 fi
10155 fi
10156 fi
10157 if test -n "$found_la"; then
10158 save_libdir="$libdir"
10159 case "$found_la" in
10160 */* | *\\*) . "$found_la" ;;
10161 *) . "./$found_la" ;;
10162 esac
10163 libdir="$save_libdir"
10164 for dep in $dependency_libs; do
10165 case "$dep" in
10166 -L*)
10167 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10168 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
10169 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
10170 haveit=
10171 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
10172 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
10173 if test -n "$GCC"; then
10174 case $host_os in
10175 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10176 esac
10177 fi
10178 fi
10179 if test -z "$haveit"; then
10180 haveit=
10181 for x in $LDFLAGS $LIBICONV; do
10182
10183 acl_save_prefix="$prefix"
10184 prefix="$acl_final_prefix"
10185 acl_save_exec_prefix="$exec_prefix"
10186 exec_prefix="$acl_final_exec_prefix"
10187 eval x=\"$x\"
10188 exec_prefix="$acl_save_exec_prefix"
10189 prefix="$acl_save_prefix"
10190
10191 if test "X$x" = "X-L$additional_libdir"; then
10192 haveit=yes
10193 break
10194 fi
10195 done
10196 if test -z "$haveit"; then
10197 if test -d "$additional_libdir"; then
10198 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10199 fi
10200 fi
10201 haveit=
10202 for x in $LDFLAGS $LTLIBICONV; do
10203
10204 acl_save_prefix="$prefix"
10205 prefix="$acl_final_prefix"
10206 acl_save_exec_prefix="$exec_prefix"
10207 exec_prefix="$acl_final_exec_prefix"
10208 eval x=\"$x\"
10209 exec_prefix="$acl_save_exec_prefix"
10210 prefix="$acl_save_prefix"
10211
10212 if test "X$x" = "X-L$additional_libdir"; then
10213 haveit=yes
10214 break
10215 fi
10216 done
10217 if test -z "$haveit"; then
10218 if test -d "$additional_libdir"; then
10219 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10220 fi
10221 fi
10222 fi
10223 fi
10224 ;;
10225 -R*)
10226 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10227 if test "$enable_rpath" != no; then
10228 haveit=
10229 for x in $rpathdirs; do
10230 if test "X$x" = "X$dir"; then
10231 haveit=yes
10232 break
10233 fi
10234 done
10235 if test -z "$haveit"; then
10236 rpathdirs="$rpathdirs $dir"
10237 fi
10238 haveit=
10239 for x in $ltrpathdirs; do
10240 if test "X$x" = "X$dir"; then
10241 haveit=yes
10242 break
10243 fi
10244 done
10245 if test -z "$haveit"; then
10246 ltrpathdirs="$ltrpathdirs $dir"
10247 fi
b80f6443 10248 fi
8868edaf
CR
10249 ;;
10250 -l*)
10251 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10252 ;;
10253 *.la)
10254 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10255 ;;
10256 *)
10257 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10258 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10259 ;;
10260 esac
10261 done
10262 fi
10263 else
10264 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10265 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10266 fi
10267 fi
10268 fi
10269 done
10270 done
10271 if test "X$rpathdirs" != "X"; then
10272 if test -n "$acl_hardcode_libdir_separator"; then
10273 alldirs=
10274 for found_dir in $rpathdirs; do
10275 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
10276 done
10277 acl_save_libdir="$libdir"
10278 libdir="$alldirs"
10279 eval flag=\"$acl_hardcode_libdir_flag_spec\"
10280 libdir="$acl_save_libdir"
10281 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10282 else
10283 for found_dir in $rpathdirs; do
10284 acl_save_libdir="$libdir"
10285 libdir="$found_dir"
10286 eval flag=\"$acl_hardcode_libdir_flag_spec\"
10287 libdir="$acl_save_libdir"
10288 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
10289 done
10290 fi
10291 fi
10292 if test "X$ltrpathdirs" != "X"; then
10293 for found_dir in $ltrpathdirs; do
10294 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
10295 done
10296 fi
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308 am_save_CPPFLAGS="$CPPFLAGS"
10309
10310 for element in $INCICONV; do
10311 haveit=
10312 for x in $CPPFLAGS; do
10313
10314 acl_save_prefix="$prefix"
10315 prefix="$acl_final_prefix"
10316 acl_save_exec_prefix="$exec_prefix"
10317 exec_prefix="$acl_final_exec_prefix"
10318 eval x=\"$x\"
10319 exec_prefix="$acl_save_exec_prefix"
10320 prefix="$acl_save_prefix"
10321
10322 if test "X$x" = "X$element"; then
10323 haveit=yes
10324 break
10325 fi
10326 done
10327 if test -z "$haveit"; then
10328 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10329 fi
10330 done
10331
10332
10333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
10334$as_echo_n "checking for iconv... " >&6; }
10335if ${am_cv_func_iconv+:} false; then :
10336 $as_echo_n "(cached) " >&6
10337else
10338
10339 am_cv_func_iconv="no, consider installing GNU libiconv"
10340 am_cv_lib_iconv=no
10341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10342/* end confdefs.h. */
10343
10344#include <stdlib.h>
10345#include <iconv.h>
10346
10347int
10348main ()
10349{
10350iconv_t cd = iconv_open("","");
10351 iconv(cd,NULL,NULL,NULL,NULL);
10352 iconv_close(cd);
10353 ;
10354 return 0;
10355}
10356_ACEOF
10357if ac_fn_c_try_link "$LINENO"; then :
10358 am_cv_func_iconv=yes
10359fi
10360rm -f core conftest.err conftest.$ac_objext \
10361 conftest$ac_exeext conftest.$ac_ext
10362 if test "$am_cv_func_iconv" != yes; then
10363 am_save_LIBS="$LIBS"
10364 LIBS="$LIBS $LIBICONV"
10365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10366/* end confdefs.h. */
10367
10368#include <stdlib.h>
10369#include <iconv.h>
10370
10371int
10372main ()
10373{
10374iconv_t cd = iconv_open("","");
10375 iconv(cd,NULL,NULL,NULL,NULL);
10376 iconv_close(cd);
10377 ;
10378 return 0;
10379}
10380_ACEOF
10381if ac_fn_c_try_link "$LINENO"; then :
10382 am_cv_lib_iconv=yes
10383 am_cv_func_iconv=yes
10384fi
10385rm -f core conftest.err conftest.$ac_objext \
10386 conftest$ac_exeext conftest.$ac_ext
10387 LIBS="$am_save_LIBS"
10388 fi
10389
10390fi
10391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
10392$as_echo "$am_cv_func_iconv" >&6; }
10393 if test "$am_cv_func_iconv" = yes; then
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
10395$as_echo_n "checking for working iconv... " >&6; }
10396if ${am_cv_func_iconv_works+:} false; then :
10397 $as_echo_n "(cached) " >&6
10398else
10399
10400 am_save_LIBS="$LIBS"
10401 if test $am_cv_lib_iconv = yes; then
10402 LIBS="$LIBS $LIBICONV"
10403 fi
10404 am_cv_func_iconv_works=no
10405 for ac_iconv_const in '' 'const'; do
10406 if test "$cross_compiling" = yes; then :
10407 case "$host_os" in
10408 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
10409 *) am_cv_func_iconv_works="guessing yes" ;;
10410 esac
10411else
10412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10413/* end confdefs.h. */
10414
10415#include <iconv.h>
10416#include <string.h>
10417
10418#ifndef ICONV_CONST
10419# define ICONV_CONST $ac_iconv_const
10420#endif
10421
10422int
10423main ()
10424{
10425int result = 0;
10426 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
10427 returns. */
10428 {
10429 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
10430 if (cd_utf8_to_88591 != (iconv_t)(-1))
10431 {
10432 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
10433 char buf[10];
10434 ICONV_CONST char *inptr = input;
10435 size_t inbytesleft = strlen (input);
10436 char *outptr = buf;
10437 size_t outbytesleft = sizeof (buf);
10438 size_t res = iconv (cd_utf8_to_88591,
10439 &inptr, &inbytesleft,
10440 &outptr, &outbytesleft);
10441 if (res == 0)
10442 result |= 1;
10443 iconv_close (cd_utf8_to_88591);
10444 }
10445 }
10446 /* Test against Solaris 10 bug: Failures are not distinguishable from
10447 successful returns. */
10448 {
10449 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
10450 if (cd_ascii_to_88591 != (iconv_t)(-1))
10451 {
10452 static ICONV_CONST char input[] = "\263";
10453 char buf[10];
10454 ICONV_CONST char *inptr = input;
10455 size_t inbytesleft = strlen (input);
10456 char *outptr = buf;
10457 size_t outbytesleft = sizeof (buf);
10458 size_t res = iconv (cd_ascii_to_88591,
10459 &inptr, &inbytesleft,
10460 &outptr, &outbytesleft);
10461 if (res == 0)
10462 result |= 2;
10463 iconv_close (cd_ascii_to_88591);
10464 }
10465 }
10466 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
10467 {
10468 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
10469 if (cd_88591_to_utf8 != (iconv_t)(-1))
10470 {
10471 static ICONV_CONST char input[] = "\304";
10472 static char buf[2] = { (char)0xDE, (char)0xAD };
10473 ICONV_CONST char *inptr = input;
10474 size_t inbytesleft = 1;
10475 char *outptr = buf;
10476 size_t outbytesleft = 1;
10477 size_t res = iconv (cd_88591_to_utf8,
10478 &inptr, &inbytesleft,
10479 &outptr, &outbytesleft);
10480 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
10481 result |= 4;
10482 iconv_close (cd_88591_to_utf8);
10483 }
10484 }
10485#if 0 /* This bug could be worked around by the caller. */
10486 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
10487 {
10488 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
10489 if (cd_88591_to_utf8 != (iconv_t)(-1))
10490 {
10491 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
10492 char buf[50];
10493 ICONV_CONST char *inptr = input;
10494 size_t inbytesleft = strlen (input);
10495 char *outptr = buf;
10496 size_t outbytesleft = sizeof (buf);
10497 size_t res = iconv (cd_88591_to_utf8,
10498 &inptr, &inbytesleft,
10499 &outptr, &outbytesleft);
10500 if ((int)res > 0)
10501 result |= 8;
10502 iconv_close (cd_88591_to_utf8);
10503 }
10504 }
10505#endif
10506 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
10507 provided. */
10508 {
10509 /* Try standardized names. */
10510 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
10511 /* Try IRIX, OSF/1 names. */
10512 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
10513 /* Try AIX names. */
10514 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
10515 /* Try HP-UX names. */
10516 iconv_t cd4 = iconv_open ("utf8", "eucJP");
10517 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
10518 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
10519 result |= 16;
10520 if (cd1 != (iconv_t)(-1))
10521 iconv_close (cd1);
10522 if (cd2 != (iconv_t)(-1))
10523 iconv_close (cd2);
10524 if (cd3 != (iconv_t)(-1))
10525 iconv_close (cd3);
10526 if (cd4 != (iconv_t)(-1))
10527 iconv_close (cd4);
10528 }
10529 return result;
10530
10531 ;
10532 return 0;
10533}
10534_ACEOF
10535if ac_fn_c_try_run "$LINENO"; then :
10536 am_cv_func_iconv_works=yes
10537fi
10538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10539 conftest.$ac_objext conftest.beam conftest.$ac_ext
10540fi
10541
10542 test "$am_cv_func_iconv_works" = no || break
10543 done
10544 LIBS="$am_save_LIBS"
10545
10546fi
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
10548$as_echo "$am_cv_func_iconv_works" >&6; }
10549 case "$am_cv_func_iconv_works" in
10550 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
10551 *) am_func_iconv=yes ;;
10552 esac
10553 else
10554 am_func_iconv=no am_cv_lib_iconv=no
10555 fi
10556 if test "$am_func_iconv" = yes; then
10557
10558$as_echo "#define HAVE_ICONV 1" >>confdefs.h
10559
10560 fi
10561 if test "$am_cv_lib_iconv" = yes; then
10562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
10563$as_echo_n "checking how to link with libiconv... " >&6; }
10564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
10565$as_echo "$LIBICONV" >&6; }
10566 else
10567 CPPFLAGS="$am_save_CPPFLAGS"
10568 LIBICONV=
10569 LTLIBICONV=
10570 fi
10571
10572
10573
10574 if test "$am_cv_func_iconv" = yes; then
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
10576$as_echo_n "checking for iconv declaration... " >&6; }
10577 if ${am_cv_proto_iconv+:} false; then :
10578 $as_echo_n "(cached) " >&6
10579else
10580
10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582/* end confdefs.h. */
10583
10584#include <stdlib.h>
10585#include <iconv.h>
10586extern
10587#ifdef __cplusplus
10588"C"
10589#endif
10590#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
10591size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10592#else
10593size_t iconv();
10594#endif
10595
10596int
10597main ()
10598{
10599
10600 ;
10601 return 0;
10602}
10603_ACEOF
10604if ac_fn_c_try_compile "$LINENO"; then :
10605 am_cv_proto_iconv_arg1=""
10606else
10607 am_cv_proto_iconv_arg1="const"
10608fi
10609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10610 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);"
10611fi
10612
10613 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10614 { $as_echo "$as_me:${as_lineno-$LINENO}: result:
10615 $am_cv_proto_iconv" >&5
10616$as_echo "
10617 $am_cv_proto_iconv" >&6; }
10618 else
10619 am_cv_proto_iconv_arg1=""
10620 fi
10621
10622cat >>confdefs.h <<_ACEOF
10623#define ICONV_CONST $am_cv_proto_iconv_arg1
10624_ACEOF
10625
10626
10627
10628
10629
10630
10631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10632/* end confdefs.h. */
10633int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }
10634int
10635main ()
10636{
10637
10638 ;
10639 return 0;
10640}
10641_ACEOF
10642if ac_fn_c_try_link "$LINENO"; then :
10643
10644$as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h
10645
10646fi
10647rm -f core conftest.err conftest.$ac_objext \
10648 conftest$ac_exeext conftest.$ac_ext
10649
10650 for ac_header in argz.h inttypes.h limits.h unistd.h sys/param.h
10651do :
10652 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10653ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10654if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10655 cat >>confdefs.h <<_ACEOF
10656#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10657_ACEOF
10658
10659fi
10660
10661done
10662
10663 for ac_func in getcwd getegid geteuid getgid getuid mempcpy munmap \
10664 stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \
10665 argz_next __fsetlocking
10666do :
10667 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10668ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10669if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10670 cat >>confdefs.h <<_ACEOF
10671#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10672_ACEOF
10673
10674fi
10675done
10676
10677
10678 for ac_func in localeconv
10679do :
10680 ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
10681if test "x$ac_cv_func_localeconv" = xyes; then :
10682 cat >>confdefs.h <<_ACEOF
10683#define HAVE_LOCALECONV 1
10684_ACEOF
10685
10686fi
10687done
10688
10689
10690 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "#include <stdio.h>
10691"
10692if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
10693 ac_have_decl=1
10694else
10695 ac_have_decl=0
10696fi
10697
10698cat >>confdefs.h <<_ACEOF
10699#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
10700_ACEOF
10701ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "#include <stdio.h>
10702"
10703if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
10704 ac_have_decl=1
10705else
10706 ac_have_decl=0
10707fi
10708
10709cat >>confdefs.h <<_ACEOF
10710#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
10711_ACEOF
10712
10713
10714
10715
10716 for ac_prog in bison
10717do
10718 # Extract the first word of "$ac_prog", so it can be a program name with args.
10719set dummy $ac_prog; ac_word=$2
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10721$as_echo_n "checking for $ac_word... " >&6; }
10722if ${ac_cv_prog_INTLBISON+:} false; then :
10723 $as_echo_n "(cached) " >&6
10724else
10725 if test -n "$INTLBISON"; then
10726 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
10727else
10728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10729for as_dir in $PATH
10730do
10731 IFS=$as_save_IFS
10732 test -z "$as_dir" && as_dir=.
10733 for ac_exec_ext in '' $ac_executable_extensions; do
10734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10735 ac_cv_prog_INTLBISON="$ac_prog"
10736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10737 break 2
10738 fi
10739done
10740 done
10741IFS=$as_save_IFS
10742
10743fi
10744fi
10745INTLBISON=$ac_cv_prog_INTLBISON
10746if test -n "$INTLBISON"; then
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5
10748$as_echo "$INTLBISON" >&6; }
10749else
10750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751$as_echo "no" >&6; }
10752fi
10753
10754
10755 test -n "$INTLBISON" && break
10756done
10757
10758 if test -z "$INTLBISON"; then
10759 ac_verc_fail=yes
10760 else
10761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5
10762$as_echo_n "checking version of bison... " >&6; }
10763 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
10764 case $ac_prog_version in
10765 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
10766 2.[7-9]* | [3-9].*)
10767 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
10768 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
10769 esac
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
10771$as_echo "$ac_prog_version" >&6; }
10772 fi
10773 if test $ac_verc_fail = yes; then
10774 INTLBISON=:
10775 fi
10776
10777
10778
10779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10780$as_echo_n "checking for long long int... " >&6; }
10781if ${ac_cv_type_long_long_int+:} false; then :
10782 $as_echo_n "(cached) " >&6
10783else
10784 ac_cv_type_long_long_int=yes
10785 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10786 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10787 if test $ac_cv_type_long_long_int = yes; then
10788 if test "$cross_compiling" = yes; then :
10789 :
10790else
10791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10792/* end confdefs.h. */
10793#include <limits.h>
10794 #ifndef LLONG_MAX
10795 # define HALF \
10796 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10797 # define LLONG_MAX (HALF - 1 + HALF)
10798 #endif
10799int
10800main ()
10801{
10802long long int n = 1;
10803 int i;
10804 for (i = 0; ; i++)
10805 {
10806 long long int m = n << i;
10807 if (m >> i != n)
10808 return 1;
10809 if (LLONG_MAX / 2 < m)
10810 break;
10811 }
10812 return 0;
10813 ;
10814 return 0;
10815}
10816_ACEOF
10817if ac_fn_c_try_run "$LINENO"; then :
10818
10819else
10820 ac_cv_type_long_long_int=no
10821fi
10822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10823 conftest.$ac_objext conftest.beam conftest.$ac_ext
10824fi
10825
10826 fi
10827 fi
10828fi
10829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10830$as_echo "$ac_cv_type_long_long_int" >&6; }
10831 if test $ac_cv_type_long_long_int = yes; then
10832
10833$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10834
10835 fi
10836
10837
10838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
10839$as_echo_n "checking for wchar_t... " >&6; }
10840if ${gt_cv_c_wchar_t+:} false; then :
10841 $as_echo_n "(cached) " >&6
10842else
10843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10844/* end confdefs.h. */
10845#include <stddef.h>
10846 wchar_t foo = (wchar_t)'\0';
10847int
10848main ()
10849{
10850
10851 ;
10852 return 0;
10853}
10854_ACEOF
10855if ac_fn_c_try_compile "$LINENO"; then :
10856 gt_cv_c_wchar_t=yes
10857else
10858 gt_cv_c_wchar_t=no
10859fi
10860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10861fi
10862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
10863$as_echo "$gt_cv_c_wchar_t" >&6; }
10864 if test $gt_cv_c_wchar_t = yes; then
10865
10866$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
10867
10868 fi
10869
10870
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
10872$as_echo_n "checking for wint_t... " >&6; }
10873if ${gt_cv_c_wint_t+:} false; then :
10874 $as_echo_n "(cached) " >&6
10875else
10876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10877/* end confdefs.h. */
10878
10879/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10880 <wchar.h>.
10881 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
10882 before <wchar.h>. */
10883#include <stddef.h>
10884#include <stdio.h>
10885#include <time.h>
10886#include <wchar.h>
10887 wint_t foo = (wchar_t)'\0';
10888int
10889main ()
10890{
10891
10892 ;
10893 return 0;
10894}
10895_ACEOF
10896if ac_fn_c_try_compile "$LINENO"; then :
10897 gt_cv_c_wint_t=yes
10898else
10899 gt_cv_c_wint_t=no
10900fi
10901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10902fi
10903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
10904$as_echo "$gt_cv_c_wint_t" >&6; }
10905 if test $gt_cv_c_wint_t = yes; then
10906
10907$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
10908
10909
10910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
10911$as_echo_n "checking whether wint_t is too small... " >&6; }
10912if ${gl_cv_type_wint_t_too_small+:} false; then :
10913 $as_echo_n "(cached) " >&6
10914else
10915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10916/* end confdefs.h. */
10917
10918/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10919 <wchar.h>.
10920 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10921 included before <wchar.h>. */
10922#if !(defined __GLIBC__ && !defined __UCLIBC__)
10923# include <stddef.h>
10924# include <stdio.h>
10925# include <time.h>
10926#endif
10927#include <wchar.h>
10928 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
10929
10930int
10931main ()
10932{
10933
10934 ;
10935 return 0;
10936}
10937_ACEOF
10938if ac_fn_c_try_compile "$LINENO"; then :
10939 gl_cv_type_wint_t_too_small=no
10940else
10941 gl_cv_type_wint_t_too_small=yes
10942fi
10943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10944fi
10945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
10946$as_echo "$gl_cv_type_wint_t_too_small" >&6; }
10947 if test $gl_cv_type_wint_t_too_small = yes; then
10948 GNULIB_OVERRIDES_WINT_T=1
10949 else
10950 GNULIB_OVERRIDES_WINT_T=0
10951 fi
10952 else
10953 GNULIB_OVERRIDES_WINT_T=0
10954 fi
10955
10956
10957
10958
10959
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
10961$as_echo_n "checking for intmax_t... " >&6; }
10962if ${gt_cv_c_intmax_t+:} false; then :
10963 $as_echo_n "(cached) " >&6
10964else
10965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10966/* end confdefs.h. */
10967
10968#include <stddef.h>
10969#include <stdlib.h>
10970#if HAVE_STDINT_H_WITH_UINTMAX
10971#include <stdint.h>
10972#endif
10973#if HAVE_INTTYPES_H_WITH_UINTMAX
10974#include <inttypes.h>
10975#endif
10976
10977int
10978main ()
10979{
10980intmax_t x = -1;
10981 return !x;
10982 ;
10983 return 0;
10984}
10985_ACEOF
10986if ac_fn_c_try_compile "$LINENO"; then :
10987 gt_cv_c_intmax_t=yes
10988else
10989 gt_cv_c_intmax_t=no
10990fi
10991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10992fi
10993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
10994$as_echo "$gt_cv_c_intmax_t" >&6; }
10995 if test $gt_cv_c_intmax_t = yes; then
10996
10997$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
10998
10999 fi
11000
11001
11002
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5
11004$as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; }
11005if ${gt_cv_func_printf_posix+:} false; then :
11006 $as_echo_n "(cached) " >&6
11007else
11008
11009 if test "$cross_compiling" = yes; then :
11010
11011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11012/* end confdefs.h. */
11013
11014#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
11015 notposix
11016#endif
11017
11018_ACEOF
11019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11020 $EGREP "notposix" >/dev/null 2>&1; then :
11021 gt_cv_func_printf_posix="guessing no"
11022else
11023 gt_cv_func_printf_posix="guessing yes"
11024fi
11025rm -f conftest*
11026
11027
11028else
11029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11030/* end confdefs.h. */
11031
11032#include <stdio.h>
11033#include <string.h>
11034/* The string "%2$d %1$d", with dollar characters protected from the shell's
11035 dollar expansion (possibly an autoconf bug). */
11036static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
11037static char buf[100];
11038int main ()
11039{
11040 sprintf (buf, format, 33, 55);
11041 return (strcmp (buf, "55 33") != 0);
11042}
11043_ACEOF
11044if ac_fn_c_try_run "$LINENO"; then :
11045 gt_cv_func_printf_posix=yes
11046else
11047 gt_cv_func_printf_posix=no
11048fi
11049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11050 conftest.$ac_objext conftest.beam conftest.$ac_ext
11051fi
11052
11053
11054fi
11055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_printf_posix" >&5
11056$as_echo "$gt_cv_func_printf_posix" >&6; }
11057 case $gt_cv_func_printf_posix in
11058 *yes)
11059
11060$as_echo "#define HAVE_POSIX_PRINTF 1" >>confdefs.h
11061
11062 ;;
11063 esac
11064
11065
11066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
11067$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
11068if ${ac_cv_gnu_library_2_1+:} false; then :
11069 $as_echo_n "(cached) " >&6
11070else
11071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11072/* end confdefs.h. */
11073
11074#include <features.h>
11075#ifdef __GNU_LIBRARY__
11076 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
11077 Lucky GNU user
11078 #endif
11079#endif
11080#ifdef __UCLIBC__
11081 Lucky user
11082#endif
11083
11084_ACEOF
11085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11086 $EGREP "Lucky" >/dev/null 2>&1; then :
11087 ac_cv_gnu_library_2_1=yes
11088else
11089 ac_cv_gnu_library_2_1=no
11090fi
11091rm -f conftest*
11092
11093
11094
11095fi
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
11097$as_echo "$ac_cv_gnu_library_2_1" >&6; }
11098
11099 GLIBC21="$ac_cv_gnu_library_2_1"
11100
11101
11102
11103 for ac_header in stdint.h
11104do :
11105 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
11106if test "x$ac_cv_header_stdint_h" = xyes; then :
11107 cat >>confdefs.h <<_ACEOF
11108#define HAVE_STDINT_H 1
11109_ACEOF
11110
11111fi
11112
11113done
11114
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
11116$as_echo_n "checking for SIZE_MAX... " >&6; }
11117if ${gl_cv_size_max+:} false; then :
11118 $as_echo_n "(cached) " >&6
11119else
11120
11121 gl_cv_size_max=
11122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11123/* end confdefs.h. */
11124
11125#include <limits.h>
11126#if HAVE_STDINT_H
11127#include <stdint.h>
11128#endif
11129#ifdef SIZE_MAX
11130Found it
11131#endif
11132
11133_ACEOF
11134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11135 $EGREP "Found it" >/dev/null 2>&1; then :
11136 gl_cv_size_max=yes
11137fi
11138rm -f conftest*
11139
11140 if test -z "$gl_cv_size_max"; then
11141 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
11142#include <limits.h>"; then :
11143
11144else
11145 size_t_bits_minus_1=
11146fi
11147
11148 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
11149
11150else
11151 fits_in_uint=
11152fi
11153
11154 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
11155 if test $fits_in_uint = 1; then
11156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11157/* end confdefs.h. */
11158#include <stddef.h>
11159 extern size_t foo;
11160 extern unsigned long foo;
11161
11162int
11163main ()
11164{
11165
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170if ac_fn_c_try_compile "$LINENO"; then :
11171 fits_in_uint=0
11172fi
11173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11174 fi
11175 if test $fits_in_uint = 1; then
11176 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
11177 else
11178 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
11179 fi
11180 else
11181 gl_cv_size_max='((size_t)~(size_t)0)'
11182 fi
11183 fi
11184
11185fi
11186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
11187$as_echo "$gl_cv_size_max" >&6; }
11188 if test "$gl_cv_size_max" != yes; then
11189
11190cat >>confdefs.h <<_ACEOF
11191#define SIZE_MAX $gl_cv_size_max
11192_ACEOF
11193
11194 fi
11195
11196
11197
11198
11199 for ac_header in stdint.h
11200do :
11201 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
11202if test "x$ac_cv_header_stdint_h" = xyes; then :
11203 cat >>confdefs.h <<_ACEOF
11204#define HAVE_STDINT_H 1
11205_ACEOF
11206
11207fi
11208
11209done
11210
11211
11212
11213
11214
11215 for ac_func in $ac_func_list
11216do :
11217 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11218ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11219if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11220 cat >>confdefs.h <<_ACEOF
11221#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11222_ACEOF
11223
11224fi
11225done
11226
11227
11228
11229
11230
11231
11232
11233
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
11235$as_echo_n "checking for working fcntl.h... " >&6; }
11236if ${gl_cv_header_working_fcntl_h+:} false; then :
11237 $as_echo_n "(cached) " >&6
11238else
11239 if test "$cross_compiling" = yes; then :
11240 case "$host_os" in
11241 # Guess 'no' on native Windows.
11242 mingw*) gl_cv_header_working_fcntl_h='no' ;;
11243 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
11244 esac
11245
11246else
11247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11248/* end confdefs.h. */
11249#include <sys/types.h>
11250 #include <sys/stat.h>
11251 #if HAVE_UNISTD_H
11252 # include <unistd.h>
11253 #else /* on Windows with MSVC */
11254 # include <io.h>
11255 # include <stdlib.h>
11256 # defined sleep(n) _sleep ((n) * 1000)
11257 #endif
11258 #include <fcntl.h>
11259 #ifndef O_NOATIME
11260 #define O_NOATIME 0
11261 #endif
11262 #ifndef O_NOFOLLOW
11263 #define O_NOFOLLOW 0
11264 #endif
11265 static int const constants[] =
11266 {
11267 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
11268 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
11269 };
11270
11271int
11272main ()
11273{
11274
11275 int result = !constants;
11276 #if HAVE_SYMLINK
11277 {
11278 static char const sym[] = "conftest.sym";
11279 if (symlink ("/dev/null", sym) != 0)
11280 result |= 2;
11281 else
11282 {
11283 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
11284 if (fd >= 0)
11285 {
11286 close (fd);
11287 result |= 4;
11288 }
11289 }
11290 if (unlink (sym) != 0 || symlink (".", sym) != 0)
11291 result |= 2;
11292 else
11293 {
11294 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
11295 if (fd >= 0)
11296 {
11297 close (fd);
11298 result |= 4;
11299 }
11300 }
11301 unlink (sym);
11302 }
11303 #endif
11304 {
11305 static char const file[] = "confdefs.h";
11306 int fd = open (file, O_RDONLY | O_NOATIME);
11307 if (fd < 0)
11308 result |= 8;
11309 else
11310 {
11311 struct stat st0;
11312 if (fstat (fd, &st0) != 0)
11313 result |= 16;
b80f6443 11314 else
8868edaf
CR
11315 {
11316 char c;
11317 sleep (1);
11318 if (read (fd, &c, 1) != 1)
11319 result |= 24;
11320 else
11321 {
11322 if (close (fd) != 0)
11323 result |= 32;
11324 else
11325 {
11326 struct stat st1;
11327 if (stat (file, &st1) != 0)
11328 result |= 40;
11329 else
11330 if (st0.st_atime != st1.st_atime)
11331 result |= 64;
11332 }
11333 }
11334 }
11335 }
11336 }
11337 return result;
11338 ;
11339 return 0;
11340}
11341_ACEOF
11342if ac_fn_c_try_run "$LINENO"; then :
11343 gl_cv_header_working_fcntl_h=yes
11344else
11345 case $? in #(
11346 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
11347 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
11348 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
11349 *) gl_cv_header_working_fcntl_h='no';;
11350 esac
11351fi
11352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11353 conftest.$ac_objext conftest.beam conftest.$ac_ext
11354fi
b80f6443 11355
b80f6443 11356
8868edaf
CR
11357fi
11358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
11359$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
b80f6443 11360
8868edaf
CR
11361 case $gl_cv_header_working_fcntl_h in #(
11362 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
11363 *) ac_val=1;;
11364 esac
b80f6443 11365
8868edaf
CR
11366cat >>confdefs.h <<_ACEOF
11367#define HAVE_WORKING_O_NOATIME $ac_val
11368_ACEOF
b80f6443 11369
b80f6443 11370
8868edaf
CR
11371 case $gl_cv_header_working_fcntl_h in #(
11372 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
11373 *) ac_val=1;;
11374 esac
b80f6443 11375
8868edaf
CR
11376cat >>confdefs.h <<_ACEOF
11377#define HAVE_WORKING_O_NOFOLLOW $ac_val
11378_ACEOF
b80f6443 11379
8868edaf
CR
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395 if test $ac_cv_func_uselocale = yes; then
11396
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
11398$as_echo_n "checking whether uselocale works... " >&6; }
11399if ${gt_cv_func_uselocale_works+:} false; then :
11400 $as_echo_n "(cached) " >&6
11401else
11402 if test "$cross_compiling" = yes; then :
11403 # Guess no on AIX, yes otherwise.
11404 case "$host_os" in
11405 aix*) gt_cv_func_uselocale_works="guessing no" ;;
11406 *) gt_cv_func_uselocale_works="guessing yes" ;;
11407 esac
11408
11409else
11410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11411/* end confdefs.h. */
11412
11413#include <locale.h>
11414#if HAVE_XLOCALE_H
11415# include <xlocale.h>
11416#endif
11417int main ()
11418{
11419 uselocale (NULL);
11420 setlocale (LC_ALL, "en_US.UTF-8");
11421 return 0;
11422}
11423_ACEOF
11424if ac_fn_c_try_run "$LINENO"; then :
11425 gt_cv_func_uselocale_works=yes
11426else
11427 gt_cv_func_uselocale_works=no
11428fi
11429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11430 conftest.$ac_objext conftest.beam conftest.$ac_ext
11431fi
11432
11433
11434fi
11435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5
11436$as_echo "$gt_cv_func_uselocale_works" >&6; }
11437 else
11438 gt_cv_func_uselocale_works=no
b80f6443 11439 fi
8868edaf
CR
11440 case "$gt_cv_func_uselocale_works" in
11441 *yes)
11442
11443$as_echo "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
11444
11445 ;;
11446 esac
11447
11448
11449 case "$gt_cv_func_uselocale_works" in
11450 *yes)
11451
11452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5
11453$as_echo_n "checking for fake locale system (OpenBSD)... " >&6; }
11454if ${gt_cv_locale_fake+:} false; then :
11455 $as_echo_n "(cached) " >&6
11456else
11457 if test "$cross_compiling" = yes; then :
11458 case "$host_os" in
11459 openbsd*) gt_cv_locale_fake="guessing yes" ;;
11460 *) gt_cv_locale_fake="guessing no" ;;
11461 esac
11462
11463else
11464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11465/* end confdefs.h. */
11466
11467#include <locale.h>
11468#if HAVE_XLOCALE_H
11469# include <xlocale.h>
11470#endif
11471int main ()
11472{
11473 locale_t loc1, loc2;
11474 if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1;
11475 if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1;
11476 loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0);
11477 loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
11478 return !(loc1 == loc2);
11479}
11480_ACEOF
11481if ac_fn_c_try_run "$LINENO"; then :
11482 gt_cv_locale_fake=yes
11483else
11484 gt_cv_locale_fake=no
11485fi
11486rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11487 conftest.$ac_objext conftest.beam conftest.$ac_ext
11488fi
11489
11490
11491fi
11492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5
11493$as_echo "$gt_cv_locale_fake" >&6; }
11494 ;;
11495 *) gt_cv_locale_fake=no ;;
11496 esac
11497 case "$gt_cv_locale_fake" in
11498 *yes)
11499
11500$as_echo "#define HAVE_FAKE_LOCALES 1" >>confdefs.h
b80f6443 11501
8868edaf
CR
11502 ;;
11503 esac
b80f6443 11504
8868edaf
CR
11505 case "$gt_cv_func_uselocale_works" in
11506 *yes)
11507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5
11508$as_echo_n "checking for Solaris 11.4 locale system... " >&6; }
11509if ${gt_cv_locale_solaris114+:} false; then :
11510 $as_echo_n "(cached) " >&6
11511else
11512 case "$host_os" in
11513 solaris*)
11514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11515/* end confdefs.h. */
b80f6443 11516
8868edaf
CR
11517 #include <locale.h>
11518 struct _LC_locale_t *x;
11519 locale_t y;
b80f6443 11520
8868edaf
CR
11521int
11522main ()
11523{
11524*y = x;
11525 ;
11526 return 0;
11527}
b80f6443 11528_ACEOF
8868edaf
CR
11529if ac_fn_c_try_compile "$LINENO"; then :
11530 gt_cv_locale_solaris114=yes
11531else
11532 gt_cv_locale_solaris114=no
11533fi
11534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11535 ;;
11536 *) gt_cv_locale_solaris114=no ;;
11537 esac
b80f6443
JA
11538
11539fi
8868edaf
CR
11540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5
11541$as_echo "$gt_cv_locale_solaris114" >&6; }
11542 ;;
11543 *) gt_cv_locale_solaris114=no ;;
11544 esac
11545 if test $gt_cv_locale_solaris114 = yes; then
b80f6443 11546
8868edaf 11547$as_echo "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h
f73dda09 11548
8868edaf
CR
11549 fi
11550
11551 case "$gt_cv_func_uselocale_works" in
11552 *yes)
11553 for ac_func in getlocalename_l
ac50fbac 11554do :
8868edaf
CR
11555 ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l"
11556if test "x$ac_cv_func_getlocalename_l" = xyes; then :
b80f6443 11557 cat >>confdefs.h <<_ACEOF
8868edaf 11558#define HAVE_GETLOCALENAME_L 1
b80f6443 11559_ACEOF
f73dda09
JA
11560
11561fi
11562done
11563
8868edaf
CR
11564 ;;
11565 esac
b80f6443 11566
8868edaf
CR
11567 gt_nameless_locales=no
11568 if false; then
11569 gt_nameless_locales=yes
b80f6443 11570
8868edaf 11571$as_echo "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h
b80f6443 11572
8868edaf 11573 fi
b80f6443
JA
11574
11575
8868edaf
CR
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
11577$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
11578if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
11579 $as_echo_n "(cached) " >&6
11580else
11581 gt_save_LIBS="$LIBS"
11582 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11584/* end confdefs.h. */
11585#include <CoreFoundation/CFPreferences.h>
11586int
11587main ()
11588{
11589CFPreferencesCopyAppValue(NULL, NULL)
11590 ;
11591 return 0;
11592}
11593_ACEOF
11594if ac_fn_c_try_link "$LINENO"; then :
11595 gt_cv_func_CFPreferencesCopyAppValue=yes
11596else
11597 gt_cv_func_CFPreferencesCopyAppValue=no
11598fi
11599rm -f core conftest.err conftest.$ac_objext \
11600 conftest$ac_exeext conftest.$ac_ext
11601 LIBS="$gt_save_LIBS"
11602fi
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
11604$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
11605 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
b80f6443 11606
8868edaf 11607$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
b80f6443 11608
8868edaf
CR
11609 fi
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
11611$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
11612if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
3185942a 11613 $as_echo_n "(cached) " >&6
f73dda09 11614else
8868edaf
CR
11615 gt_save_LIBS="$LIBS"
11616 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11618/* end confdefs.h. */
8868edaf 11619#include <CoreFoundation/CFLocale.h>
f73dda09
JA
11620int
11621main ()
11622{
8868edaf 11623CFLocaleCopyCurrent();
f73dda09
JA
11624 ;
11625 return 0;
11626}
11627_ACEOF
ac50fbac 11628if ac_fn_c_try_link "$LINENO"; then :
8868edaf
CR
11629 gt_cv_func_CFLocaleCopyCurrent=yes
11630else
11631 gt_cv_func_CFLocaleCopyCurrent=no
f73dda09 11632fi
ac50fbac
CR
11633rm -f core conftest.err conftest.$ac_objext \
11634 conftest$ac_exeext conftest.$ac_ext
8868edaf
CR
11635 LIBS="$gt_save_LIBS"
11636fi
11637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
11638$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
11639 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
11640
11641$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
11642
11643 fi
11644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
11645$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; }
11646if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then :
11647 $as_echo_n "(cached) " >&6
11648else
11649 gt_save_LIBS="$LIBS"
11650 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11652/* end confdefs.h. */
8868edaf 11653#include <CoreFoundation/CFLocale.h>
f73dda09
JA
11654int
11655main ()
11656{
8868edaf 11657CFLocaleCopyPreferredLanguages();
f73dda09
JA
11658 ;
11659 return 0;
11660}
11661_ACEOF
ac50fbac 11662if ac_fn_c_try_link "$LINENO"; then :
8868edaf
CR
11663 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
11664else
11665 gt_cv_func_CFLocaleCopyPreferredLanguages=no
f73dda09 11666fi
ac50fbac
CR
11667rm -f core conftest.err conftest.$ac_objext \
11668 conftest$ac_exeext conftest.$ac_ext
8868edaf
CR
11669 LIBS="$gt_save_LIBS"
11670fi
11671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
11672$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
11673 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
b80f6443 11674
8868edaf
CR
11675$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
11676
11677 fi
11678 INTL_MACOSX_LIBS=
11679 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
11680 || test $gt_cv_func_CFLocaleCopyCurrent = yes \
11681 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
11682 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
11683 fi
11684
11685
11686
11687
11688
11689
11690
11691
11692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11693$as_echo_n "checking for flexible array members... " >&6; }
11694if ${ac_cv_c_flexmember+:} false; then :
11695 $as_echo_n "(cached) " >&6
11696else
11697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11698/* end confdefs.h. */
11699#include <stdlib.h>
11700 #include <stdio.h>
11701 #include <stddef.h>
11702 struct s { int n; double d[]; };
11703int
11704main ()
11705{
11706int m = getchar ();
11707 struct s *p = malloc (offsetof (struct s, d)
11708 + m * sizeof (double));
11709 p->d[0] = 0.0;
11710 return p->d != (double *) NULL;
11711 ;
11712 return 0;
11713}
11714_ACEOF
11715if ac_fn_c_try_compile "$LINENO"; then :
11716 ac_cv_c_flexmember=yes
11717else
11718 ac_cv_c_flexmember=no
11719fi
11720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11721fi
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11723$as_echo "$ac_cv_c_flexmember" >&6; }
11724 if test $ac_cv_c_flexmember = yes; then
11725
11726$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11727
11728 else
11729 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11730
11731 fi
11732
11733
11734
11735
11736
11737
11738
11739
11740 if test -n "$ac_tool_prefix"; then
11741 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
11742set dummy ${ac_tool_prefix}ar; ac_word=$2
11743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11744$as_echo_n "checking for $ac_word... " >&6; }
11745if ${ac_cv_prog_AR+:} false; then :
11746 $as_echo_n "(cached) " >&6
11747else
11748 if test -n "$AR"; then
11749 ac_cv_prog_AR="$AR" # Let the user override the test.
11750else
11751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11752for as_dir in $PATH
11753do
11754 IFS=$as_save_IFS
11755 test -z "$as_dir" && as_dir=.
11756 for ac_exec_ext in '' $ac_executable_extensions; do
11757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11758 ac_cv_prog_AR="${ac_tool_prefix}ar"
11759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11760 break 2
11761 fi
11762done
11763 done
11764IFS=$as_save_IFS
11765
11766fi
11767fi
11768AR=$ac_cv_prog_AR
11769if test -n "$AR"; then
11770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
11771$as_echo "$AR" >&6; }
11772else
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11774$as_echo "no" >&6; }
11775fi
11776
11777
11778fi
11779if test -z "$ac_cv_prog_AR"; then
11780 ac_ct_AR=$AR
11781 # Extract the first word of "ar", so it can be a program name with args.
11782set dummy ar; ac_word=$2
11783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11784$as_echo_n "checking for $ac_word... " >&6; }
11785if ${ac_cv_prog_ac_ct_AR+:} false; then :
11786 $as_echo_n "(cached) " >&6
11787else
11788 if test -n "$ac_ct_AR"; then
11789 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
11790else
11791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11792for as_dir in $PATH
11793do
11794 IFS=$as_save_IFS
11795 test -z "$as_dir" && as_dir=.
11796 for ac_exec_ext in '' $ac_executable_extensions; do
11797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11798 ac_cv_prog_ac_ct_AR="ar"
11799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11800 break 2
11801 fi
11802done
11803 done
11804IFS=$as_save_IFS
11805
11806fi
11807fi
11808ac_ct_AR=$ac_cv_prog_ac_ct_AR
11809if test -n "$ac_ct_AR"; then
11810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
11811$as_echo "$ac_ct_AR" >&6; }
11812else
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11814$as_echo "no" >&6; }
11815fi
11816
11817 if test "x$ac_ct_AR" = x; then
11818 AR="ar"
11819 else
11820 case $cross_compiling:$ac_tool_warned in
11821yes:)
11822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11824ac_tool_warned=yes ;;
11825esac
11826 AR=$ac_ct_AR
11827 fi
11828else
11829 AR="$ac_cv_prog_AR"
f73dda09 11830fi
f73dda09 11831
8868edaf
CR
11832 if test -z "$ARFLAGS"; then
11833 ARFLAGS='cr'
11834 fi
f73dda09 11835
b80f6443
JA
11836
11837
11838
8868edaf
CR
11839 case "$enable_silent_rules" in
11840 yes) INTL_DEFAULT_VERBOSITY=0;;
11841 no) INTL_DEFAULT_VERBOSITY=1;;
11842 *) INTL_DEFAULT_VERBOSITY=1;;
11843 esac
11844
11845
11846 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
11847if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
11848
f73dda09 11849else
b80f6443 11850
8868edaf 11851$as_echo "#define ptrdiff_t long" >>confdefs.h
b80f6443 11852
f73dda09 11853
8868edaf 11854fi
f73dda09 11855
8868edaf
CR
11856 for ac_header in features.h stddef.h stdlib.h string.h
11857do :
11858 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11859ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11860if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11861 cat >>confdefs.h <<_ACEOF
11862#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
f73dda09 11863_ACEOF
8868edaf
CR
11864
11865fi
11866
11867done
11868
11869 for ac_func in asprintf fwprintf newlocale putenv setenv setlocale \
11870 snprintf strnlen uselocale wcslen wcsnlen mbrtowc wcrtomb
11871do :
11872 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11873ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11874if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11875 cat >>confdefs.h <<_ACEOF
11876#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11877_ACEOF
11878
11879fi
11880done
11881
11882
11883 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
11884"
11885if test "x$ac_cv_have_decl__snprintf" = xyes; then :
11886 ac_have_decl=1
f73dda09 11887else
8868edaf 11888 ac_have_decl=0
f73dda09 11889fi
8868edaf
CR
11890
11891cat >>confdefs.h <<_ACEOF
11892#define HAVE_DECL__SNPRINTF $ac_have_decl
11893_ACEOF
11894ac_fn_c_check_decl "$LINENO" "_snwprintf" "ac_cv_have_decl__snwprintf" "#include <stdio.h>
11895"
11896if test "x$ac_cv_have_decl__snwprintf" = xyes; then :
11897 ac_have_decl=1
11898else
11899 ac_have_decl=0
f73dda09 11900fi
f73dda09 11901
8868edaf
CR
11902cat >>confdefs.h <<_ACEOF
11903#define HAVE_DECL__SNWPRINTF $ac_have_decl
11904_ACEOF
11905
11906
11907 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "#include <stdio.h>
11908"
11909if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
11910 ac_have_decl=1
11911else
11912 ac_have_decl=0
11913fi
f73dda09 11914
b80f6443 11915cat >>confdefs.h <<_ACEOF
8868edaf 11916#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
b80f6443
JA
11917_ACEOF
11918
8868edaf
CR
11919
11920 case $gt_cv_func_printf_posix in
11921 *yes) HAVE_POSIX_PRINTF=1 ;;
11922 *) HAVE_POSIX_PRINTF=0 ;;
11923 esac
11924
11925 if test "$ac_cv_func_asprintf" = yes; then
11926 HAVE_ASPRINTF=1
11927 else
11928 HAVE_ASPRINTF=0
11929 fi
11930
11931 if test "$ac_cv_func_snprintf" = yes; then
11932 HAVE_SNPRINTF=1
11933 else
11934 HAVE_SNPRINTF=0
11935 fi
11936
11937 if test "$ac_cv_func_newlocale" = yes; then
11938 HAVE_NEWLOCALE=1
11939 else
11940 HAVE_NEWLOCALE=0
11941 fi
11942
11943 if test "$ac_cv_func_wprintf" = yes; then
11944 HAVE_WPRINTF=1
11945 else
11946 HAVE_WPRINTF=0
b80f6443
JA
11947 fi
11948
11949
8868edaf 11950
ac50fbac 11951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
3185942a 11952$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
ac50fbac 11953if ${am_cv_langinfo_codeset+:} false; then :
3185942a 11954 $as_echo_n "(cached) " >&6
f73dda09 11955else
ac50fbac 11956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11957/* end confdefs.h. */
b80f6443 11958#include <langinfo.h>
f73dda09
JA
11959int
11960main ()
11961{
8868edaf 11962char* cs = nl_langinfo(CODESET); return !cs;
f73dda09
JA
11963 ;
11964 return 0;
11965}
11966_ACEOF
ac50fbac 11967if ac_fn_c_try_link "$LINENO"; then :
b80f6443 11968 am_cv_langinfo_codeset=yes
f73dda09 11969else
ac50fbac 11970 am_cv_langinfo_codeset=no
f73dda09 11971fi
ac50fbac
CR
11972rm -f core conftest.err conftest.$ac_objext \
11973 conftest$ac_exeext conftest.$ac_ext
b80f6443 11974
f73dda09 11975fi
ac50fbac 11976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
3185942a 11977$as_echo "$am_cv_langinfo_codeset" >&6; }
b80f6443 11978 if test $am_cv_langinfo_codeset = yes; then
f73dda09 11979
ac50fbac 11980$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f73dda09 11981
b80f6443 11982 fi
f73dda09 11983
f73dda09 11984
ac50fbac 11985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
3185942a 11986$as_echo_n "checking for LC_MESSAGES... " >&6; }
8868edaf 11987if ${gt_cv_val_LC_MESSAGES+:} false; then :
3185942a 11988 $as_echo_n "(cached) " >&6
f73dda09 11989else
ac50fbac 11990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11991/* end confdefs.h. */
b80f6443 11992#include <locale.h>
f73dda09
JA
11993int
11994main ()
11995{
b80f6443 11996return LC_MESSAGES
f73dda09
JA
11997 ;
11998 return 0;
11999}
12000_ACEOF
ac50fbac 12001if ac_fn_c_try_link "$LINENO"; then :
8868edaf 12002 gt_cv_val_LC_MESSAGES=yes
f73dda09 12003else
8868edaf 12004 gt_cv_val_LC_MESSAGES=no
f73dda09 12005fi
ac50fbac
CR
12006rm -f core conftest.err conftest.$ac_objext \
12007 conftest$ac_exeext conftest.$ac_ext
f73dda09 12008fi
8868edaf
CR
12009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
12010$as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
12011 if test $gt_cv_val_LC_MESSAGES = yes; then
f73dda09 12012
ac50fbac 12013$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
b80f6443
JA
12014
12015 fi
12016
8868edaf
CR
12017
12018 if test $gt_nameless_locales = yes; then
12019 HAVE_NAMELESS_LOCALES=1
12020 else
12021 HAVE_NAMELESS_LOCALES=0
12022 fi
12023
12024
12025 if test "$enable_shared" = yes; then
12026 case "$host_os" in
12027 mingw* | cygwin*) is_woe32dll=yes ;;
12028 *) is_woe32dll=no ;;
12029 esac
12030 else
12031 is_woe32dll=no
b80f6443 12032 fi
8868edaf 12033 WOE32DLL=$is_woe32dll
f73dda09 12034
8868edaf
CR
12035
12036 case "$host_os" in
12037 mingw* | cygwin*) is_woe32=yes ;;
12038 *) is_woe32=no ;;
12039 esac
12040 WOE32=$is_woe32
12041
12042 if test $WOE32 = yes; then
12043 if test -n "$ac_tool_prefix"; then
12044 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
12045set dummy ${ac_tool_prefix}windres; ac_word=$2
ac50fbac 12046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 12047$as_echo_n "checking for $ac_word... " >&6; }
8868edaf 12048if ${ac_cv_prog_WINDRES+:} false; then :
3185942a 12049 $as_echo_n "(cached) " >&6
f73dda09 12050else
8868edaf
CR
12051 if test -n "$WINDRES"; then
12052 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
b80f6443
JA
12053else
12054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12055for as_dir in $PATH
12056do
12057 IFS=$as_save_IFS
12058 test -z "$as_dir" && as_dir=.
ac50fbac
CR
12059 for ac_exec_ext in '' $ac_executable_extensions; do
12060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8868edaf 12061 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
ac50fbac 12062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
12063 break 2
12064 fi
12065done
ac50fbac 12066 done
3185942a 12067IFS=$as_save_IFS
f73dda09 12068
b80f6443
JA
12069fi
12070fi
8868edaf
CR
12071WINDRES=$ac_cv_prog_WINDRES
12072if test -n "$WINDRES"; then
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
12074$as_echo "$WINDRES" >&6; }
b80f6443 12075else
ac50fbac 12076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 12077$as_echo "no" >&6; }
f73dda09
JA
12078fi
12079
3185942a 12080
8868edaf
CR
12081fi
12082if test -z "$ac_cv_prog_WINDRES"; then
12083 ac_ct_WINDRES=$WINDRES
12084 # Extract the first word of "windres", so it can be a program name with args.
12085set dummy windres; ac_word=$2
12086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12087$as_echo_n "checking for $ac_word... " >&6; }
12088if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
12089 $as_echo_n "(cached) " >&6
12090else
12091 if test -n "$ac_ct_WINDRES"; then
12092 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
12093else
12094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12095for as_dir in $PATH
12096do
12097 IFS=$as_save_IFS
12098 test -z "$as_dir" && as_dir=.
12099 for ac_exec_ext in '' $ac_executable_extensions; do
12100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12101 ac_cv_prog_ac_ct_WINDRES="windres"
12102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12103 break 2
12104 fi
b80f6443 12105done
8868edaf
CR
12106 done
12107IFS=$as_save_IFS
b80f6443 12108
8868edaf
CR
12109fi
12110fi
12111ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
12112if test -n "$ac_ct_WINDRES"; then
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
12114$as_echo "$ac_ct_WINDRES" >&6; }
12115else
12116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12117$as_echo "no" >&6; }
12118fi
12119
12120 if test "x$ac_ct_WINDRES" = x; then
12121 WINDRES=""
b80f6443 12122 else
8868edaf
CR
12123 case $cross_compiling:$ac_tool_warned in
12124yes:)
12125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12127ac_tool_warned=yes ;;
12128esac
12129 WINDRES=$ac_ct_WINDRES
b80f6443 12130 fi
8868edaf
CR
12131else
12132 WINDRES="$ac_cv_prog_WINDRES"
12133fi
12134
b80f6443
JA
12135 fi
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
8868edaf
CR
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
12163$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
12164if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
12165 $as_echo_n "(cached) " >&6
b80f6443 12166else
8868edaf
CR
12167 gt_save_LIBS="$LIBS"
12168 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
12169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12170/* end confdefs.h. */
12171#include <CoreFoundation/CFPreferences.h>
12172int
12173main ()
12174{
12175CFPreferencesCopyAppValue(NULL, NULL)
12176 ;
12177 return 0;
12178}
12179_ACEOF
12180if ac_fn_c_try_link "$LINENO"; then :
12181 gt_cv_func_CFPreferencesCopyAppValue=yes
12182else
12183 gt_cv_func_CFPreferencesCopyAppValue=no
12184fi
12185rm -f core conftest.err conftest.$ac_objext \
12186 conftest$ac_exeext conftest.$ac_ext
12187 LIBS="$gt_save_LIBS"
12188fi
12189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
12190$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
12191 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
12192
12193$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
12194
12195 fi
12196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
12197$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
12198if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
12199 $as_echo_n "(cached) " >&6
12200else
12201 gt_save_LIBS="$LIBS"
12202 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
12203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12204/* end confdefs.h. */
12205#include <CoreFoundation/CFLocale.h>
12206int
12207main ()
12208{
12209CFLocaleCopyCurrent();
12210 ;
12211 return 0;
12212}
12213_ACEOF
12214if ac_fn_c_try_link "$LINENO"; then :
12215 gt_cv_func_CFLocaleCopyCurrent=yes
12216else
12217 gt_cv_func_CFLocaleCopyCurrent=no
12218fi
12219rm -f core conftest.err conftest.$ac_objext \
12220 conftest$ac_exeext conftest.$ac_ext
12221 LIBS="$gt_save_LIBS"
12222fi
12223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
12224$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
12225 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
12226
12227$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
12228
12229 fi
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
12231$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; }
12232if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then :
12233 $as_echo_n "(cached) " >&6
12234else
12235 gt_save_LIBS="$LIBS"
12236 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
12237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12238/* end confdefs.h. */
12239#include <CoreFoundation/CFLocale.h>
12240int
12241main ()
12242{
12243CFLocaleCopyPreferredLanguages();
12244 ;
12245 return 0;
12246}
12247_ACEOF
12248if ac_fn_c_try_link "$LINENO"; then :
12249 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
12250else
12251 gt_cv_func_CFLocaleCopyPreferredLanguages=no
12252fi
12253rm -f core conftest.err conftest.$ac_objext \
12254 conftest$ac_exeext conftest.$ac_ext
12255 LIBS="$gt_save_LIBS"
3185942a 12256fi
8868edaf
CR
12257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
12258$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
12259 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
12260
12261$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
12262
12263 fi
12264 INTL_MACOSX_LIBS=
12265 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
12266 || test $gt_cv_func_CFLocaleCopyCurrent = yes \
12267 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
12268 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
12269 fi
12270
3185942a 12271
b80f6443
JA
12272
12273
12274
12275
12276 BUILD_INCLUDED_LIBINTL=no
12277 USE_INCLUDED_LIBINTL=no
12278
12279 LIBINTL=
12280 LTLIBINTL=
12281 POSUB=
12282
8868edaf
CR
12283 case " $gt_needs " in
12284 *" need-formatstring-macros "*) gt_api_version=3 ;;
12285 *" need-ngettext "*) gt_api_version=2 ;;
12286 *) gt_api_version=1 ;;
12287 esac
12288 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
12289 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
12290
b80f6443
JA
12291 if test "$USE_NLS" = "yes"; then
12292 gt_use_preinstalled_gnugettext=no
12293
ac50fbac 12294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5
3185942a 12295$as_echo_n "checking whether included gettext is requested... " >&6; }
b80f6443 12296
3185942a 12297# Check whether --with-included-gettext was given.
ac50fbac 12298if test "${with_included_gettext+set}" = set; then :
3185942a 12299 withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
b80f6443
JA
12300else
12301 nls_cv_force_use_gnu_gettext=no
3185942a
JA
12302fi
12303
ac50fbac 12304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5
3185942a 12305$as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
b80f6443
JA
12306
12307 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
12308 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
12309
12310
8868edaf
CR
12311 if test $gt_api_version -ge 3; then
12312 gt_revision_test_code='
12313#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12314#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
12315#endif
12316typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
12317'
12318 else
12319 gt_revision_test_code=
12320 fi
12321 if test $gt_api_version -ge 2; then
12322 gt_expression_test_code=' + * ngettext ("", "", 0)'
12323 else
12324 gt_expression_test_code=
12325 fi
b80f6443 12326
ac50fbac 12327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
3185942a 12328$as_echo_n "checking for GNU gettext in libc... " >&6; }
8868edaf 12329if eval \${$gt_func_gnugettext_libc+:} false; then :
3185942a 12330 $as_echo_n "(cached) " >&6
f73dda09 12331else
ac50fbac 12332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12333/* end confdefs.h. */
8868edaf 12334
b80f6443 12335#include <libintl.h>
8868edaf 12336#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
b80f6443
JA
12337extern int _nl_msg_cat_cntr;
12338extern int *_nl_domain_bindings;
8868edaf
CR
12339#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
12340#else
12341#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12342#endif
12343$gt_revision_test_code
12344
f73dda09
JA
12345int
12346main ()
12347{
8868edaf 12348
b80f6443 12349bindtextdomain ("", "");
8868edaf
CR
12350return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12351
f73dda09
JA
12352 ;
12353 return 0;
12354}
12355_ACEOF
ac50fbac 12356if ac_fn_c_try_link "$LINENO"; then :
8868edaf 12357 eval "$gt_func_gnugettext_libc=yes"
f73dda09 12358else
8868edaf 12359 eval "$gt_func_gnugettext_libc=no"
f73dda09 12360fi
ac50fbac
CR
12361rm -f core conftest.err conftest.$ac_objext \
12362 conftest$ac_exeext conftest.$ac_ext
f73dda09 12363fi
8868edaf
CR
12364eval ac_res=\$$gt_func_gnugettext_libc
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12366$as_echo "$ac_res" >&6; }
12367
12368 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
12369
12370
12371
f73dda09 12372
f73dda09 12373
f73dda09 12374
f73dda09 12375
b80f6443
JA
12376 use_additional=yes
12377
12378 acl_save_prefix="$prefix"
12379 prefix="$acl_final_prefix"
12380 acl_save_exec_prefix="$exec_prefix"
12381 exec_prefix="$acl_final_exec_prefix"
12382
12383 eval additional_includedir=\"$includedir\"
12384 eval additional_libdir=\"$libdir\"
12385
12386 exec_prefix="$acl_save_exec_prefix"
12387 prefix="$acl_save_prefix"
12388
12389
3185942a 12390# Check whether --with-libintl-prefix was given.
ac50fbac 12391if test "${with_libintl_prefix+set}" = set; then :
3185942a 12392 withval=$with_libintl_prefix;
b80f6443
JA
12393 if test "X$withval" = "Xno"; then
12394 use_additional=no
12395 else
12396 if test "X$withval" = "X"; then
12397
12398 acl_save_prefix="$prefix"
12399 prefix="$acl_final_prefix"
12400 acl_save_exec_prefix="$exec_prefix"
12401 exec_prefix="$acl_final_exec_prefix"
12402
12403 eval additional_includedir=\"$includedir\"
12404 eval additional_libdir=\"$libdir\"
12405
12406 exec_prefix="$acl_save_exec_prefix"
12407 prefix="$acl_save_prefix"
12408
12409 else
12410 additional_includedir="$withval/include"
8868edaf
CR
12411 additional_libdir="$withval/$acl_libdirstem"
12412 if test "$acl_libdirstem2" != "$acl_libdirstem" \
12413 && test ! -d "$withval/$acl_libdirstem"; then
12414 additional_libdir="$withval/$acl_libdirstem2"
12415 fi
b80f6443
JA
12416 fi
12417 fi
12418
3185942a
JA
12419fi
12420
b80f6443
JA
12421 LIBINTL=
12422 LTLIBINTL=
12423 INCINTL=
8868edaf
CR
12424 LIBINTL_PREFIX=
12425 HAVE_LIBINTL=
b80f6443
JA
12426 rpathdirs=
12427 ltrpathdirs=
12428 names_already_handled=
12429 names_next_round='intl '
12430 while test -n "$names_next_round"; do
12431 names_this_round="$names_next_round"
12432 names_next_round=
12433 for name in $names_this_round; do
12434 already_handled=
12435 for n in $names_already_handled; do
12436 if test "$n" = "$name"; then
12437 already_handled=yes
12438 break
12439 fi
12440 done
12441 if test -z "$already_handled"; then
12442 names_already_handled="$names_already_handled $name"
8868edaf 12443 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
b80f6443
JA
12444 eval value=\"\$HAVE_LIB$uppername\"
12445 if test -n "$value"; then
12446 if test "$value" = yes; then
12447 eval value=\"\$LIB$uppername\"
12448 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
12449 eval value=\"\$LTLIB$uppername\"
12450 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
12451 else
12452 :
12453 fi
12454 else
12455 found_dir=
12456 found_la=
12457 found_so=
12458 found_a=
8868edaf
CR
12459 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
12460 if test -n "$acl_shlibext"; then
12461 shrext=".$acl_shlibext" # typically: shrext=.so
12462 else
12463 shrext=
12464 fi
b80f6443 12465 if test $use_additional = yes; then
8868edaf
CR
12466 dir="$additional_libdir"
12467 if test -n "$acl_shlibext"; then
12468 if test -f "$dir/$libname$shrext"; then
12469 found_dir="$dir"
12470 found_so="$dir/$libname$shrext"
12471 else
12472 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
12473 ver=`(cd "$dir" && \
12474 for f in "$libname$shrext".*; do echo "$f"; done \
12475 | sed -e "s,^$libname$shrext\\\\.,," \
12476 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12477 | sed 1q ) 2>/dev/null`
12478 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
12479 found_dir="$dir"
12480 found_so="$dir/$libname$shrext.$ver"
12481 fi
12482 else
12483 eval library_names=\"$acl_library_names_spec\"
12484 for f in $library_names; do
12485 if test -f "$dir/$f"; then
12486 found_dir="$dir"
12487 found_so="$dir/$f"
12488 break
12489 fi
12490 done
b80f6443
JA
12491 fi
12492 fi
8868edaf
CR
12493 fi
12494 if test "X$found_dir" = "X"; then
12495 if test -f "$dir/$libname.$acl_libext"; then
12496 found_dir="$dir"
12497 found_a="$dir/$libname.$acl_libext"
12498 fi
12499 fi
12500 if test "X$found_dir" != "X"; then
12501 if test -f "$dir/$libname.la"; then
12502 found_la="$dir/$libname.la"
12503 fi
b80f6443
JA
12504 fi
12505 fi
12506 if test "X$found_dir" = "X"; then
12507 for x in $LDFLAGS $LTLIBINTL; do
12508
12509 acl_save_prefix="$prefix"
12510 prefix="$acl_final_prefix"
12511 acl_save_exec_prefix="$exec_prefix"
12512 exec_prefix="$acl_final_exec_prefix"
12513 eval x=\"$x\"
12514 exec_prefix="$acl_save_exec_prefix"
12515 prefix="$acl_save_prefix"
12516
12517 case "$x" in
12518 -L*)
12519 dir=`echo "X$x" | sed -e 's/^X-L//'`
8868edaf
CR
12520 if test -n "$acl_shlibext"; then
12521 if test -f "$dir/$libname$shrext"; then
b80f6443 12522 found_dir="$dir"
8868edaf
CR
12523 found_so="$dir/$libname$shrext"
12524 else
12525 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
12526 ver=`(cd "$dir" && \
12527 for f in "$libname$shrext".*; do echo "$f"; done \
12528 | sed -e "s,^$libname$shrext\\\\.,," \
12529 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12530 | sed 1q ) 2>/dev/null`
12531 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
12532 found_dir="$dir"
12533 found_so="$dir/$libname$shrext.$ver"
12534 fi
12535 else
12536 eval library_names=\"$acl_library_names_spec\"
12537 for f in $library_names; do
12538 if test -f "$dir/$f"; then
12539 found_dir="$dir"
12540 found_so="$dir/$f"
12541 break
12542 fi
12543 done
b80f6443
JA
12544 fi
12545 fi
8868edaf
CR
12546 fi
12547 if test "X$found_dir" = "X"; then
12548 if test -f "$dir/$libname.$acl_libext"; then
12549 found_dir="$dir"
12550 found_a="$dir/$libname.$acl_libext"
12551 fi
12552 fi
12553 if test "X$found_dir" != "X"; then
12554 if test -f "$dir/$libname.la"; then
12555 found_la="$dir/$libname.la"
12556 fi
b80f6443
JA
12557 fi
12558 ;;
12559 esac
12560 if test "X$found_dir" != "X"; then
12561 break
12562 fi
12563 done
12564 fi
12565 if test "X$found_dir" != "X"; then
12566 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
12567 if test "X$found_so" != "X"; then
8868edaf
CR
12568 if test "$enable_rpath" = no \
12569 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
12570 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
b80f6443
JA
12571 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12572 else
12573 haveit=
12574 for x in $ltrpathdirs; do
12575 if test "X$x" = "X$found_dir"; then
12576 haveit=yes
12577 break
12578 fi
12579 done
12580 if test -z "$haveit"; then
12581 ltrpathdirs="$ltrpathdirs $found_dir"
12582 fi
8868edaf 12583 if test "$acl_hardcode_direct" = yes; then
b80f6443
JA
12584 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12585 else
8868edaf 12586 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
b80f6443
JA
12587 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12588 haveit=
12589 for x in $rpathdirs; do
12590 if test "X$x" = "X$found_dir"; then
12591 haveit=yes
12592 break
12593 fi
12594 done
12595 if test -z "$haveit"; then
12596 rpathdirs="$rpathdirs $found_dir"
12597 fi
12598 else
12599 haveit=
12600 for x in $LDFLAGS $LIBINTL; do
12601
12602 acl_save_prefix="$prefix"
12603 prefix="$acl_final_prefix"
12604 acl_save_exec_prefix="$exec_prefix"
12605 exec_prefix="$acl_final_exec_prefix"
12606 eval x=\"$x\"
12607 exec_prefix="$acl_save_exec_prefix"
12608 prefix="$acl_save_prefix"
12609
12610 if test "X$x" = "X-L$found_dir"; then
12611 haveit=yes
12612 break
12613 fi
12614 done
12615 if test -z "$haveit"; then
12616 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
12617 fi
8868edaf 12618 if test "$acl_hardcode_minus_L" != no; then
b80f6443
JA
12619 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12620 else
12621 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12622 fi
12623 fi
12624 fi
12625 fi
12626 else
12627 if test "X$found_a" != "X"; then
12628 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
12629 else
12630 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
12631 fi
12632 fi
12633 additional_includedir=
12634 case "$found_dir" in
8868edaf
CR
12635 */$acl_libdirstem | */$acl_libdirstem/)
12636 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
12637 if test "$name" = 'intl'; then
12638 LIBINTL_PREFIX="$basedir"
12639 fi
12640 additional_includedir="$basedir/include"
12641 ;;
12642 */$acl_libdirstem2 | */$acl_libdirstem2/)
12643 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
12644 if test "$name" = 'intl'; then
12645 LIBINTL_PREFIX="$basedir"
12646 fi
b80f6443
JA
12647 additional_includedir="$basedir/include"
12648 ;;
12649 esac
12650 if test "X$additional_includedir" != "X"; then
12651 if test "X$additional_includedir" != "X/usr/include"; then
12652 haveit=
12653 if test "X$additional_includedir" = "X/usr/local/include"; then
12654 if test -n "$GCC"; then
12655 case $host_os in
8868edaf 12656 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
b80f6443
JA
12657 esac
12658 fi
12659 fi
12660 if test -z "$haveit"; then
12661 for x in $CPPFLAGS $INCINTL; do
12662
12663 acl_save_prefix="$prefix"
12664 prefix="$acl_final_prefix"
12665 acl_save_exec_prefix="$exec_prefix"
12666 exec_prefix="$acl_final_exec_prefix"
12667 eval x=\"$x\"
12668 exec_prefix="$acl_save_exec_prefix"
12669 prefix="$acl_save_prefix"
12670
12671 if test "X$x" = "X-I$additional_includedir"; then
12672 haveit=yes
12673 break
12674 fi
12675 done
12676 if test -z "$haveit"; then
12677 if test -d "$additional_includedir"; then
12678 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
12679 fi
12680 fi
12681 fi
12682 fi
12683 fi
12684 if test -n "$found_la"; then
12685 save_libdir="$libdir"
12686 case "$found_la" in
12687 */* | *\\*) . "$found_la" ;;
12688 *) . "./$found_la" ;;
12689 esac
12690 libdir="$save_libdir"
12691 for dep in $dependency_libs; do
12692 case "$dep" in
12693 -L*)
12694 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8868edaf
CR
12695 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
12696 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
b80f6443 12697 haveit=
8868edaf
CR
12698 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
12699 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
b80f6443
JA
12700 if test -n "$GCC"; then
12701 case $host_os in
8868edaf 12702 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
b80f6443
JA
12703 esac
12704 fi
12705 fi
12706 if test -z "$haveit"; then
12707 haveit=
12708 for x in $LDFLAGS $LIBINTL; do
12709
12710 acl_save_prefix="$prefix"
12711 prefix="$acl_final_prefix"
12712 acl_save_exec_prefix="$exec_prefix"
12713 exec_prefix="$acl_final_exec_prefix"
12714 eval x=\"$x\"
12715 exec_prefix="$acl_save_exec_prefix"
12716 prefix="$acl_save_prefix"
12717
12718 if test "X$x" = "X-L$additional_libdir"; then
12719 haveit=yes
12720 break
12721 fi
12722 done
12723 if test -z "$haveit"; then
12724 if test -d "$additional_libdir"; then
12725 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
12726 fi
12727 fi
12728 haveit=
12729 for x in $LDFLAGS $LTLIBINTL; do
12730
12731 acl_save_prefix="$prefix"
12732 prefix="$acl_final_prefix"
12733 acl_save_exec_prefix="$exec_prefix"
12734 exec_prefix="$acl_final_exec_prefix"
12735 eval x=\"$x\"
12736 exec_prefix="$acl_save_exec_prefix"
12737 prefix="$acl_save_prefix"
12738
12739 if test "X$x" = "X-L$additional_libdir"; then
12740 haveit=yes
12741 break
12742 fi
12743 done
12744 if test -z "$haveit"; then
12745 if test -d "$additional_libdir"; then
12746 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
12747 fi
12748 fi
12749 fi
12750 fi
12751 ;;
12752 -R*)
12753 dir=`echo "X$dep" | sed -e 's/^X-R//'`
12754 if test "$enable_rpath" != no; then
12755 haveit=
12756 for x in $rpathdirs; do
12757 if test "X$x" = "X$dir"; then
12758 haveit=yes
12759 break
12760 fi
12761 done
12762 if test -z "$haveit"; then
12763 rpathdirs="$rpathdirs $dir"
12764 fi
12765 haveit=
12766 for x in $ltrpathdirs; do
12767 if test "X$x" = "X$dir"; then
12768 haveit=yes
12769 break
12770 fi
12771 done
12772 if test -z "$haveit"; then
12773 ltrpathdirs="$ltrpathdirs $dir"
12774 fi
12775 fi
12776 ;;
12777 -l*)
12778 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12779 ;;
12780 *.la)
12781 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12782 ;;
12783 *)
12784 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
12785 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
12786 ;;
12787 esac
12788 done
12789 fi
12790 else
12791 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12792 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
12793 fi
12794 fi
12795 fi
12796 done
12797 done
12798 if test "X$rpathdirs" != "X"; then
8868edaf 12799 if test -n "$acl_hardcode_libdir_separator"; then
b80f6443
JA
12800 alldirs=
12801 for found_dir in $rpathdirs; do
8868edaf 12802 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
b80f6443
JA
12803 done
12804 acl_save_libdir="$libdir"
12805 libdir="$alldirs"
8868edaf 12806 eval flag=\"$acl_hardcode_libdir_flag_spec\"
b80f6443
JA
12807 libdir="$acl_save_libdir"
12808 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12809 else
12810 for found_dir in $rpathdirs; do
12811 acl_save_libdir="$libdir"
12812 libdir="$found_dir"
8868edaf 12813 eval flag=\"$acl_hardcode_libdir_flag_spec\"
b80f6443
JA
12814 libdir="$acl_save_libdir"
12815 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12816 done
12817 fi
12818 fi
ac50fbac
CR
12819 if test "X$ltrpathdirs" != "X"; then
12820 for found_dir in $ltrpathdirs; do
12821 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
12822 done
12823 fi
3185942a 12824
8868edaf
CR
12825
12826
12827
12828
ac50fbac
CR
12829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
12830$as_echo_n "checking for GNU gettext in libintl... " >&6; }
8868edaf 12831if eval \${$gt_func_gnugettext_libintl+:} false; then :
3185942a
JA
12832 $as_echo_n "(cached) " >&6
12833else
ac50fbac
CR
12834 gt_save_CPPFLAGS="$CPPFLAGS"
12835 CPPFLAGS="$CPPFLAGS $INCINTL"
12836 gt_save_LIBS="$LIBS"
12837 LIBS="$LIBS $LIBINTL"
12838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 12839/* end confdefs.h. */
8868edaf 12840
ac50fbac 12841#include <libintl.h>
8868edaf 12842#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
ac50fbac
CR
12843extern int _nl_msg_cat_cntr;
12844extern
12845#ifdef __cplusplus
12846"C"
12847#endif
8868edaf
CR
12848const char *_nl_expand_alias (const char *);
12849#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
12850#else
12851#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12852#endif
12853$gt_revision_test_code
12854
3185942a
JA
12855int
12856main ()
12857{
8868edaf 12858
ac50fbac 12859bindtextdomain ("", "");
8868edaf
CR
12860return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12861
f73dda09
JA
12862 ;
12863 return 0;
12864}
12865_ACEOF
ac50fbac 12866if ac_fn_c_try_link "$LINENO"; then :
8868edaf 12867 eval "$gt_func_gnugettext_libintl=yes"
ac50fbac 12868else
8868edaf 12869 eval "$gt_func_gnugettext_libintl=no"
ac50fbac
CR
12870fi
12871rm -f core conftest.err conftest.$ac_objext \
12872 conftest$ac_exeext conftest.$ac_ext
8868edaf 12873 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
ac50fbac
CR
12874 LIBS="$LIBS $LIBICONV"
12875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 12876/* end confdefs.h. */
8868edaf 12877
ac50fbac 12878#include <libintl.h>
8868edaf 12879#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
ac50fbac
CR
12880extern int _nl_msg_cat_cntr;
12881extern
12882#ifdef __cplusplus
12883"C"
12884#endif
8868edaf
CR
12885const char *_nl_expand_alias (const char *);
12886#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
12887#else
12888#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
12889#endif
12890$gt_revision_test_code
12891
3185942a
JA
12892int
12893main ()
12894{
8868edaf 12895
ac50fbac 12896bindtextdomain ("", "");
8868edaf
CR
12897return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
12898
3185942a
JA
12899 ;
12900 return 0;
12901}
12902_ACEOF
ac50fbac
CR
12903if ac_fn_c_try_link "$LINENO"; then :
12904 LIBINTL="$LIBINTL $LIBICONV"
8868edaf
CR
12905 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
12906 eval "$gt_func_gnugettext_libintl=yes"
3185942a 12907
3185942a 12908fi
ac50fbac
CR
12909rm -f core conftest.err conftest.$ac_objext \
12910 conftest$ac_exeext conftest.$ac_ext
12911 fi
12912 CPPFLAGS="$gt_save_CPPFLAGS"
12913 LIBS="$gt_save_LIBS"
12914fi
8868edaf
CR
12915eval ac_res=\$$gt_func_gnugettext_libintl
12916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12917$as_echo "$ac_res" >&6; }
ac50fbac 12918 fi
3185942a 12919
8868edaf
CR
12920 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
12921 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
ac50fbac
CR
12922 && test "$PACKAGE" != gettext-runtime \
12923 && test "$PACKAGE" != gettext-tools; }; then
12924 gt_use_preinstalled_gnugettext=yes
12925 else
12926 LIBINTL=
12927 LTLIBINTL=
12928 INCINTL=
12929 fi
0628567a 12930
3185942a 12931
ac50fbac
CR
12932 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
12933 nls_cv_use_gnu_gettext=yes
12934 fi
12935 fi
3185942a 12936
ac50fbac
CR
12937 if test "$nls_cv_use_gnu_gettext" = "yes"; then
12938 BUILD_INCLUDED_LIBINTL=yes
12939 USE_INCLUDED_LIBINTL=yes
8868edaf
CR
12940 LIBINTL="lib/intl/libintl.a $LIBICONV $LIBTHREAD"
12941 LTLIBINTL="lib/intl/libintl.a $LTLIBICONV $LTLIBTHREAD"
ac50fbac
CR
12942 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
12943 fi
f73dda09 12944
8868edaf 12945 CATOBJEXT=
ac50fbac
CR
12946 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12947 || test "$nls_cv_use_gnu_gettext" = "yes"; then
12948 CATOBJEXT=.gmo
12949 fi
ccc6cda3 12950
ccc6cda3 12951
8868edaf
CR
12952 if test -n "$INTL_MACOSX_LIBS"; then
12953 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12954 || test "$nls_cv_use_gnu_gettext" = "yes"; then
12955 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
12956 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
12957 fi
12958 fi
12959
ac50fbac
CR
12960 if test "$gt_use_preinstalled_gnugettext" = "yes" \
12961 || test "$nls_cv_use_gnu_gettext" = "yes"; then
b80f6443 12962
ac50fbac 12963$as_echo "#define ENABLE_NLS 1" >>confdefs.h
b80f6443 12964
ac50fbac
CR
12965 else
12966 USE_NLS=no
12967 fi
12968 fi
ccc6cda3 12969
ac50fbac
CR
12970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
12971$as_echo_n "checking whether to use NLS... " >&6; }
12972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
12973$as_echo "$USE_NLS" >&6; }
12974 if test "$USE_NLS" = "yes"; then
12975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
12976$as_echo_n "checking where the gettext function comes from... " >&6; }
12977 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
8868edaf 12978 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
ac50fbac
CR
12979 gt_source="external libintl"
12980 else
12981 gt_source="libc"
12982 fi
12983 else
12984 gt_source="included intl directory"
12985 fi
12986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
12987$as_echo "$gt_source" >&6; }
12988 fi
f73dda09 12989
ac50fbac 12990 if test "$USE_NLS" = "yes"; then
f73dda09 12991
ac50fbac 12992 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
8868edaf 12993 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
ac50fbac
CR
12994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
12995$as_echo_n "checking how to link with libintl... " >&6; }
12996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
12997$as_echo "$LIBINTL" >&6; }
0628567a 12998
ac50fbac
CR
12999 for element in $INCINTL; do
13000 haveit=
13001 for x in $CPPFLAGS; do
3185942a 13002
ac50fbac
CR
13003 acl_save_prefix="$prefix"
13004 prefix="$acl_final_prefix"
13005 acl_save_exec_prefix="$exec_prefix"
13006 exec_prefix="$acl_final_exec_prefix"
13007 eval x=\"$x\"
13008 exec_prefix="$acl_save_exec_prefix"
13009 prefix="$acl_save_prefix"
ccc6cda3 13010
ac50fbac
CR
13011 if test "X$x" = "X$element"; then
13012 haveit=yes
13013 break
13014 fi
13015 done
13016 if test -z "$haveit"; then
13017 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13018 fi
13019 done
ccc6cda3 13020
ac50fbac 13021 fi
b80f6443 13022
f73dda09 13023
ac50fbac 13024$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
f73dda09 13025
f73dda09 13026
ac50fbac 13027$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
0628567a 13028
ac50fbac 13029 fi
3185942a 13030
ac50fbac
CR
13031 POSUB=po
13032 fi
ccc6cda3 13033
ac50fbac
CR
13034
13035 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
13036 BUILD_INCLUDED_LIBINTL=yes
13037 fi
ccc6cda3 13038
b80f6443 13039
ac50fbac
CR
13040
13041
13042
13043 nls_cv_header_intl=
13044 nls_cv_header_libgt=
13045
13046 DATADIRNAME=share
13047
13048
13049 INSTOBJEXT=.mo
13050
13051
13052 GENCAT=gencat
13053
13054
8868edaf
CR
13055 INTLOBJS=
13056 if test "$USE_INCLUDED_LIBINTL" = yes; then
ac50fbac
CR
13057 INTLOBJS="\$(GETTOBJS)"
13058 fi
13059
13060
13061 INTL_LIBTOOL_SUFFIX_PREFIX=
13062
13063
13064
13065 INTLLIBS="$LIBINTL"
13066
13067
13068
13069
13070
13071
13072
13073ac_header_dirent=no
13074for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13075 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
13077$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
13078if eval \${$as_ac_Header+:} false; then :
3185942a 13079 $as_echo_n "(cached) " >&6
ccc6cda3 13080else
ac50fbac 13081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13082/* end confdefs.h. */
ccc6cda3 13083#include <sys/types.h>
ac50fbac 13084#include <$ac_hdr>
f73dda09
JA
13085
13086int
13087main ()
13088{
ac50fbac
CR
13089if ((DIR *) 0)
13090return 0;
f73dda09
JA
13091 ;
13092 return 0;
13093}
13094_ACEOF
ac50fbac
CR
13095if ac_fn_c_try_compile "$LINENO"; then :
13096 eval "$as_ac_Header=yes"
ccc6cda3 13097else
ac50fbac 13098 eval "$as_ac_Header=no"
ccc6cda3 13099fi
3185942a 13100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 13101fi
ac50fbac
CR
13102eval ac_res=\$$as_ac_Header
13103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13104$as_echo "$ac_res" >&6; }
13105if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13106 cat >>confdefs.h <<_ACEOF
13107#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
b80f6443
JA
13108_ACEOF
13109
ac50fbac
CR
13110ac_header_dirent=$ac_hdr; break
13111fi
ccc6cda3 13112
ac50fbac
CR
13113done
13114# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13115if test $ac_header_dirent = dirent.h; then
13116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13117$as_echo_n "checking for library containing opendir... " >&6; }
13118if ${ac_cv_search_opendir+:} false; then :
17345e5a
JA
13119 $as_echo_n "(cached) " >&6
13120else
ac50fbac
CR
13121 ac_func_search_save_LIBS=$LIBS
13122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a
JA
13123/* end confdefs.h. */
13124
ac50fbac
CR
13125/* Override any GCC internal prototype to avoid an error.
13126 Use char because int might match the return type of a GCC
13127 builtin and then its argument prototype would still apply. */
13128#ifdef __cplusplus
13129extern "C"
13130#endif
13131char opendir ();
17345e5a
JA
13132int
13133main ()
13134{
ac50fbac 13135return opendir ();
17345e5a
JA
13136 ;
13137 return 0;
13138}
13139_ACEOF
ac50fbac
CR
13140for ac_lib in '' dir; do
13141 if test -z "$ac_lib"; then
13142 ac_res="none required"
13143 else
13144 ac_res=-l$ac_lib
13145 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13146 fi
13147 if ac_fn_c_try_link "$LINENO"; then :
13148 ac_cv_search_opendir=$ac_res
13149fi
13150rm -f core conftest.err conftest.$ac_objext \
13151 conftest$ac_exeext
13152 if ${ac_cv_search_opendir+:} false; then :
13153 break
13154fi
13155done
13156if ${ac_cv_search_opendir+:} false; then :
17345e5a 13157
ac50fbac
CR
13158else
13159 ac_cv_search_opendir=no
13160fi
13161rm conftest.$ac_ext
13162LIBS=$ac_func_search_save_LIBS
17345e5a 13163fi
ac50fbac
CR
13164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13165$as_echo "$ac_cv_search_opendir" >&6; }
13166ac_res=$ac_cv_search_opendir
13167if test "$ac_res" != no; then :
13168 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17345e5a 13169
17345e5a 13170fi
ac50fbac
CR
13171
13172else
13173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13174$as_echo_n "checking for library containing opendir... " >&6; }
13175if ${ac_cv_search_opendir+:} false; then :
17345e5a
JA
13176 $as_echo_n "(cached) " >&6
13177else
ac50fbac
CR
13178 ac_func_search_save_LIBS=$LIBS
13179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a 13180/* end confdefs.h. */
ac50fbac
CR
13181
13182/* Override any GCC internal prototype to avoid an error.
13183 Use char because int might match the return type of a GCC
13184 builtin and then its argument prototype would still apply. */
13185#ifdef __cplusplus
13186extern "C"
13187#endif
13188char opendir ();
17345e5a
JA
13189int
13190main ()
13191{
ac50fbac 13192return opendir ();
17345e5a
JA
13193 ;
13194 return 0;
13195}
13196_ACEOF
ac50fbac
CR
13197for ac_lib in '' x; do
13198 if test -z "$ac_lib"; then
13199 ac_res="none required"
13200 else
13201 ac_res=-l$ac_lib
13202 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13203 fi
13204 if ac_fn_c_try_link "$LINENO"; then :
13205 ac_cv_search_opendir=$ac_res
13206fi
13207rm -f core conftest.err conftest.$ac_objext \
13208 conftest$ac_exeext
13209 if ${ac_cv_search_opendir+:} false; then :
13210 break
17345e5a 13211fi
ac50fbac
CR
13212done
13213if ${ac_cv_search_opendir+:} false; then :
17345e5a 13214
17345e5a 13215else
ac50fbac 13216 ac_cv_search_opendir=no
17345e5a 13217fi
ac50fbac
CR
13218rm conftest.$ac_ext
13219LIBS=$ac_func_search_save_LIBS
17345e5a 13220fi
ac50fbac
CR
13221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13222$as_echo "$ac_cv_search_opendir" >&6; }
13223ac_res=$ac_cv_search_opendir
13224if test "$ac_res" != no; then :
13225 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17345e5a
JA
13226
13227fi
13228
13229fi
13230
ac50fbac
CR
13231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13232$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
13233if ${ac_cv_header_time+:} false; then :
3185942a 13234 $as_echo_n "(cached) " >&6
f73dda09 13235else
ac50fbac 13236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13237/* end confdefs.h. */
ac50fbac
CR
13238#include <sys/types.h>
13239#include <sys/time.h>
13240#include <time.h>
b80f6443 13241
f73dda09
JA
13242int
13243main ()
13244{
ac50fbac
CR
13245if ((struct tm *) 0)
13246return 0;
f73dda09
JA
13247 ;
13248 return 0;
13249}
13250_ACEOF
ac50fbac
CR
13251if ac_fn_c_try_compile "$LINENO"; then :
13252 ac_cv_header_time=yes
f73dda09 13253else
ac50fbac
CR
13254 ac_cv_header_time=no
13255fi
13256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13257fi
13258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13259$as_echo "$ac_cv_header_time" >&6; }
13260if test $ac_cv_header_time = yes; then
13261
13262$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
0628567a 13263
f73dda09 13264fi
3185942a 13265
8868edaf
CR
13266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
13267$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
13268if ${ac_cv_header_sys_types_h_makedev+:} false; then :
13269 $as_echo_n "(cached) " >&6
13270else
13271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13272/* end confdefs.h. */
13273#include <sys/types.h>
13274int
13275main ()
13276{
13277return makedev(0, 0);
13278 ;
13279 return 0;
13280}
13281_ACEOF
13282if ac_fn_c_try_link "$LINENO"; then :
13283 ac_cv_header_sys_types_h_makedev=yes
13284else
13285 ac_cv_header_sys_types_h_makedev=no
13286fi
13287rm -f core conftest.err conftest.$ac_objext \
13288 conftest$ac_exeext conftest.$ac_ext
13289
13290fi
13291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
13292$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
13293
13294if test $ac_cv_header_sys_types_h_makedev = no; then
13295ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
13296if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
13297
13298$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
13299
13300fi
13301
13302
13303
13304 if test $ac_cv_header_sys_mkdev_h = no; then
13305 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
13306if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
13307
13308$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
13309
13310fi
13311
13312
13313 fi
13314fi
13315
0628567a 13316
b80f6443 13317
ac50fbac
CR
13318 for ac_header in inttypes.h
13319do :
13320 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
13321if test "x$ac_cv_header_inttypes_h" = xyes; then :
13322 cat >>confdefs.h <<_ACEOF
13323#define HAVE_INTTYPES_H 1
13324_ACEOF
13325
13326fi
13327
13328done
13329
13330
13331
13332for ac_header in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
13333 memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
13334 stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \
13335 regex.h syslog.h ulimit.h
13336do :
13337 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13338ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13339if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13340 cat >>confdefs.h <<_ACEOF
13341#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
0628567a 13342_ACEOF
b80f6443 13343
ac50fbac
CR
13344fi
13345
13346done
13347
a0c0a00f 13348for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \
8868edaf 13349 sys/mman.h sys/param.h sys/random.h sys/socket.h sys/stat.h \
ac50fbac
CR
13350 sys/time.h sys/times.h sys/types.h sys/wait.h
13351do :
13352 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13353ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13354if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13355 cat >>confdefs.h <<_ACEOF
13356#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
f73dda09 13357_ACEOF
0628567a 13358
f73dda09 13359fi
3185942a 13360
ac50fbac
CR
13361done
13362
13363for ac_header in netinet/in.h arpa/inet.h
13364do :
13365 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13366ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13367if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13368 cat >>confdefs.h <<_ACEOF
13369#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13370_ACEOF
0628567a 13371
b80f6443 13372fi
3185942a 13373
ac50fbac
CR
13374done
13375
13376
13377ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "
13378#if HAVE_SYS_STREAM_H
13379# include <sys/stream.h>
13380#endif
13381
13382"
13383if test "x$ac_cv_header_sys_ptem_h" = xyes; then :
13384
ccc6cda3 13385fi
3185942a 13386
ac50fbac
CR
13387
13388
a0c0a00f
CR
13389ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
13390#if HAVE_SYS_TIME_H
13391# include <sys/time.h>
13392#endif
13393
13394"
13395if test "x$ac_cv_header_sys_resource_h" = xyes; then :
13396 $as_echo "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
13397
13398fi
13399
13400
13401
ac50fbac
CR
13402# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13403# for constant arguments. Useless!
13404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13405$as_echo_n "checking for working alloca.h... " >&6; }
13406if ${ac_cv_working_alloca_h+:} false; then :
13407 $as_echo_n "(cached) " >&6
13408else
13409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13410/* end confdefs.h. */
ac50fbac 13411#include <alloca.h>
f73dda09
JA
13412int
13413main ()
13414{
ac50fbac
CR
13415char *p = (char *) alloca (2 * sizeof (int));
13416 if (p) return 0;
f73dda09
JA
13417 ;
13418 return 0;
13419}
13420_ACEOF
ac50fbac
CR
13421if ac_fn_c_try_link "$LINENO"; then :
13422 ac_cv_working_alloca_h=yes
f73dda09 13423else
ac50fbac
CR
13424 ac_cv_working_alloca_h=no
13425fi
13426rm -f core conftest.err conftest.$ac_objext \
13427 conftest$ac_exeext conftest.$ac_ext
13428fi
13429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13430$as_echo "$ac_cv_working_alloca_h" >&6; }
13431if test $ac_cv_working_alloca_h = yes; then
13432
13433$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
0628567a 13434
f73dda09 13435fi
3185942a 13436
ac50fbac
CR
13437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13438$as_echo_n "checking for alloca... " >&6; }
13439if ${ac_cv_func_alloca_works+:} false; then :
13440 $as_echo_n "(cached) " >&6
f73dda09 13441else
ac50fbac 13442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13443/* end confdefs.h. */
ac50fbac
CR
13444#ifdef __GNUC__
13445# define alloca __builtin_alloca
13446#else
13447# ifdef _MSC_VER
13448# include <malloc.h>
13449# define alloca _alloca
13450# else
13451# ifdef HAVE_ALLOCA_H
13452# include <alloca.h>
13453# else
13454# ifdef _AIX
13455 #pragma alloca
13456# else
13457# ifndef alloca /* predefined by HP cc +Olibcalls */
13458void *alloca (size_t);
13459# endif
13460# endif
13461# endif
13462# endif
13463#endif
13464
f73dda09
JA
13465int
13466main ()
13467{
ac50fbac
CR
13468char *p = (char *) alloca (1);
13469 if (p) return 0;
f73dda09
JA
13470 ;
13471 return 0;
13472}
13473_ACEOF
ac50fbac
CR
13474if ac_fn_c_try_link "$LINENO"; then :
13475 ac_cv_func_alloca_works=yes
ccc6cda3 13476else
ac50fbac 13477 ac_cv_func_alloca_works=no
f73dda09 13478fi
ac50fbac
CR
13479rm -f core conftest.err conftest.$ac_objext \
13480 conftest$ac_exeext conftest.$ac_ext
f73dda09 13481fi
ac50fbac
CR
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13483$as_echo "$ac_cv_func_alloca_works" >&6; }
3185942a 13484
ac50fbac 13485if test $ac_cv_func_alloca_works = yes; then
3185942a 13486
ac50fbac 13487$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
3185942a 13488
ac50fbac
CR
13489else
13490 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13491# that cause trouble. Some versions do not even contain alloca or
13492# contain a buggy version. If you still want to use their alloca,
13493# use ar to extract alloca.o from them instead of compiling alloca.c.
ccc6cda3 13494
ac50fbac 13495ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
b80f6443 13496
ac50fbac
CR
13497$as_echo "#define C_ALLOCA 1" >>confdefs.h
13498
13499
13500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13501$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13502if ${ac_cv_os_cray+:} false; then :
3185942a 13503 $as_echo_n "(cached) " >&6
f73dda09 13504else
ac50fbac 13505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13506/* end confdefs.h. */
ac50fbac
CR
13507#if defined CRAY && ! defined CRAY2
13508webecray
13509#else
13510wenotbecray
13511#endif
3185942a 13512
f73dda09 13513_ACEOF
ac50fbac
CR
13514if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13515 $EGREP "webecray" >/dev/null 2>&1; then :
13516 ac_cv_os_cray=yes
13517else
13518 ac_cv_os_cray=no
13519fi
13520rm -f conftest*
13521
13522fi
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13524$as_echo "$ac_cv_os_cray" >&6; }
13525if test $ac_cv_os_cray = yes; then
13526 for ac_func in _getb67 GETB67 getb67; do
13527 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13528ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13529if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13530
13531cat >>confdefs.h <<_ACEOF
13532#define CRAY_STACKSEG_END $ac_func
0628567a 13533_ACEOF
ac50fbac
CR
13534
13535 break
13536fi
13537
13538 done
13539fi
13540
13541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13542$as_echo_n "checking stack direction for C alloca... " >&6; }
13543if ${ac_cv_c_stack_direction+:} false; then :
13544 $as_echo_n "(cached) " >&6
13545else
13546 if test "$cross_compiling" = yes; then :
13547 ac_cv_c_stack_direction=0
13548else
13549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13550/* end confdefs.h. */
f73dda09
JA
13551$ac_includes_default
13552int
ac50fbac 13553find_stack_direction (int *addr, int depth)
f73dda09 13554{
ac50fbac
CR
13555 int dir, dummy = 0;
13556 if (! addr)
13557 addr = &dummy;
13558 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13559 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13560 return dir + dummy;
13561}
b80f6443 13562
ac50fbac
CR
13563int
13564main (int argc, char **argv)
13565{
13566 return find_stack_direction (0, argc + !argv + 20) < 0;
f73dda09
JA
13567}
13568_ACEOF
ac50fbac
CR
13569if ac_fn_c_try_run "$LINENO"; then :
13570 ac_cv_c_stack_direction=1
f73dda09 13571else
ac50fbac
CR
13572 ac_cv_c_stack_direction=-1
13573fi
13574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13575 conftest.$ac_objext conftest.beam conftest.$ac_ext
13576fi
13577
13578fi
13579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13580$as_echo "$ac_cv_c_stack_direction" >&6; }
13581cat >>confdefs.h <<_ACEOF
13582#define STACK_DIRECTION $ac_cv_c_stack_direction
13583_ACEOF
13584
0628567a 13585
a0c0a00f
CR
13586fi
13587
13588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
13589$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
13590if ${ac_cv_type_uid_t+:} false; then :
13591 $as_echo_n "(cached) " >&6
13592else
13593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13594/* end confdefs.h. */
13595#include <sys/types.h>
13596
13597_ACEOF
13598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13599 $EGREP "uid_t" >/dev/null 2>&1; then :
13600 ac_cv_type_uid_t=yes
13601else
13602 ac_cv_type_uid_t=no
13603fi
13604rm -f conftest*
13605
13606fi
13607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
13608$as_echo "$ac_cv_type_uid_t" >&6; }
13609if test $ac_cv_type_uid_t = no; then
13610
13611$as_echo "#define uid_t int" >>confdefs.h
13612
13613
13614$as_echo "#define gid_t int" >>confdefs.h
13615
13616fi
13617
13618for ac_header in unistd.h
13619do :
13620 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
13621if test "x$ac_cv_header_unistd_h" = xyes; then :
13622 cat >>confdefs.h <<_ACEOF
13623#define HAVE_UNISTD_H 1
13624_ACEOF
13625
13626fi
13627
13628done
13629
13630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
13631$as_echo_n "checking for working chown... " >&6; }
13632if ${ac_cv_func_chown_works+:} false; then :
13633 $as_echo_n "(cached) " >&6
13634else
13635 if test "$cross_compiling" = yes; then :
13636 ac_cv_func_chown_works=no
13637else
13638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13639/* end confdefs.h. */
13640$ac_includes_default
13641#include <fcntl.h>
13642
13643int
13644main ()
13645{
13646 char *f = "conftest.chown";
13647 struct stat before, after;
13648
13649 if (creat (f, 0600) < 0)
13650 return 1;
13651 if (stat (f, &before) < 0)
13652 return 1;
13653 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
13654 return 1;
13655 if (stat (f, &after) < 0)
13656 return 1;
13657 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
13658
13659 ;
13660 return 0;
13661}
13662_ACEOF
13663if ac_fn_c_try_run "$LINENO"; then :
13664 ac_cv_func_chown_works=yes
13665else
13666 ac_cv_func_chown_works=no
13667fi
13668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13669 conftest.$ac_objext conftest.beam conftest.$ac_ext
13670fi
13671
13672rm -f conftest.chown
13673
13674fi
13675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
13676$as_echo "$ac_cv_func_chown_works" >&6; }
13677if test $ac_cv_func_chown_works = yes; then
13678
13679$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
13680
f73dda09 13681fi
3185942a 13682
ac50fbac
CR
13683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
13684$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
13685if ${ac_cv_func_getpgrp_void+:} false; then :
13686 $as_echo_n "(cached) " >&6
f73dda09 13687else
ac50fbac
CR
13688 # Use it with a single arg.
13689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13690/* end confdefs.h. */
b80f6443
JA
13691$ac_includes_default
13692int
13693main ()
13694{
ac50fbac 13695getpgrp (0);
b80f6443
JA
13696 ;
13697 return 0;
13698}
13699_ACEOF
ac50fbac
CR
13700if ac_fn_c_try_compile "$LINENO"; then :
13701 ac_cv_func_getpgrp_void=no
13702else
13703 ac_cv_func_getpgrp_void=yes
13704fi
13705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13706
13707fi
13708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
13709$as_echo "$ac_cv_func_getpgrp_void" >&6; }
13710if test $ac_cv_func_getpgrp_void = yes; then
13711
13712$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
13713
13714fi
13715
13716if ${ac_cv_func_setvbuf_reversed+:} false; then :
13717 $as_echo_n "(cached) " >&6
13718else
13719 ac_cv_func_setvbuf_reversed=no
13720fi
13721
13722
13723for ac_func in vprintf
13724do :
13725 ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
13726if test "x$ac_cv_func_vprintf" = xyes; then :
13727 cat >>confdefs.h <<_ACEOF
13728#define HAVE_VPRINTF 1
0628567a 13729_ACEOF
ac50fbac
CR
13730
13731ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
13732if test "x$ac_cv_func__doprnt" = xyes; then :
13733
13734$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
13735
13736fi
13737
13738fi
13739done
13740
13741
13742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5
13743$as_echo_n "checking for working strcoll... " >&6; }
13744if ${ac_cv_func_strcoll_works+:} false; then :
13745 $as_echo_n "(cached) " >&6
13746else
13747 if test "$cross_compiling" = yes; then :
13748 ac_cv_func_strcoll_works=no
13749else
13750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13751/* end confdefs.h. */
f73dda09
JA
13752$ac_includes_default
13753int
13754main ()
13755{
ac50fbac
CR
13756return (strcoll ("abc", "def") >= 0 ||
13757 strcoll ("ABC", "DEF") >= 0 ||
13758 strcoll ("123", "456") >= 0)
f73dda09
JA
13759 ;
13760 return 0;
13761}
13762_ACEOF
ac50fbac
CR
13763if ac_fn_c_try_run "$LINENO"; then :
13764 ac_cv_func_strcoll_works=yes
f73dda09 13765else
ac50fbac
CR
13766 ac_cv_func_strcoll_works=no
13767fi
13768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13769 conftest.$ac_objext conftest.beam conftest.$ac_ext
13770fi
0628567a 13771
f73dda09 13772fi
ac50fbac
CR
13773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5
13774$as_echo "$ac_cv_func_strcoll_works" >&6; }
13775if test $ac_cv_func_strcoll_works = yes; then
3185942a 13776
ac50fbac 13777$as_echo "#define HAVE_STRCOLL 1" >>confdefs.h
0628567a 13778
b80f6443 13779fi
3185942a 13780
ac50fbac
CR
13781
13782
13783if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then
13784 MALLOC_TARGET=alloca
13785 MALLOC_SRC=alloca.c
13786
13787 MALLOC_LIB='-lmalloc'
13788 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
13789 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
13790 MALLOC_DEP='$(MALLOC_LIBRARY)'
ccc6cda3 13791fi
3185942a 13792
ac50fbac
CR
13793if test "$ac_cv_func_vprintf" = no; then
13794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of vprintf in stdio.h" >&5
13795$as_echo_n "checking for declaration of vprintf in stdio.h... " >&6; }
13796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13797/* end confdefs.h. */
13798#include <stdio.h>
13799
0628567a 13800_ACEOF
ac50fbac
CR
13801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13802 $EGREP "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then :
13803 ac_cv_func_vprintf=yes
13804fi
13805rm -f conftest*
13806
13807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vprintf" >&5
13808$as_echo "$ac_cv_func_vprintf" >&6; }
13809 if test $ac_cv_func_vprintf = yes; then
13810 $as_echo "#define HAVE_VPRINTF 1" >>confdefs.h
13811
13812 fi
13813fi
13814
13815if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then
13816 case " $LIBOBJS " in
13817 *" vprint.$ac_objext "* ) ;;
13818 *) LIBOBJS="$LIBOBJS vprint.$ac_objext"
13819 ;;
13820esac
13821
13822fi
13823
13824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
13825$as_echo_n "checking return type of signal handlers... " >&6; }
13826if ${ac_cv_type_signal+:} false; then :
13827 $as_echo_n "(cached) " >&6
13828else
13829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13830/* end confdefs.h. */
ac50fbac
CR
13831#include <sys/types.h>
13832#include <signal.h>
13833
f73dda09
JA
13834int
13835main ()
13836{
ac50fbac 13837return *(signal (0, 0)) (0) == 1;
f73dda09
JA
13838 ;
13839 return 0;
13840}
13841_ACEOF
ac50fbac
CR
13842if ac_fn_c_try_compile "$LINENO"; then :
13843 ac_cv_type_signal=int
f73dda09 13844else
ac50fbac
CR
13845 ac_cv_type_signal=void
13846fi
13847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13848fi
13849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
13850$as_echo "$ac_cv_type_signal" >&6; }
13851
13852cat >>confdefs.h <<_ACEOF
13853#define RETSIGTYPE $ac_cv_type_signal
13854_ACEOF
13855
13856
13857
13858ac_fn_c_check_func "$LINENO" "__setostype" "ac_cv_func___setostype"
13859if test "x$ac_cv_func___setostype" = xyes; then :
13860 $as_echo "#define HAVE_SETOSTYPE 1" >>confdefs.h
0628567a 13861
f73dda09 13862fi
3185942a 13863
ac50fbac
CR
13864ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
13865if test "x$ac_cv_func_wait3" = xyes; then :
13866 $as_echo "#define HAVE_WAIT3 1" >>confdefs.h
13867
13868fi
13869
13870
13871ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
13872if test "x$ac_cv_func_mkfifo" = xyes; then :
13873 $as_echo "#define HAVE_MKFIFO 1" >>confdefs.h
13874
13875else
13876 $as_echo "#define MKFIFO_MISSING 1" >>confdefs.h
13877
13878fi
13879
13880
8868edaf
CR
13881for ac_func in dup2 eaccess fcntl getdtablesize getentropy getgroups \
13882 gethostname getpagesize getpeername getrandom getrlimit \
13883 getrusage gettimeofday kill killpg lstat pselect readlink \
13884 select setdtablesize setitimer tcgetpgrp uname ulimit waitpid
ac50fbac
CR
13885do :
13886 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13887ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13888if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13889 cat >>confdefs.h <<_ACEOF
13890#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13891_ACEOF
13892
13893fi
f73dda09 13894done
ac50fbac
CR
13895
13896ac_fn_c_check_func "$LINENO" "rename" "ac_cv_func_rename"
13897if test "x$ac_cv_func_rename" = xyes; then :
13898 $as_echo "#define HAVE_RENAME 1" >>confdefs.h
13899
ccc6cda3 13900else
ac50fbac
CR
13901 case " $LIBOBJS " in
13902 *" rename.$ac_objext "* ) ;;
13903 *) LIBOBJS="$LIBOBJS rename.$ac_objext"
13904 ;;
13905esac
13906
13907fi
13908
13909
13910
13911for ac_func in bcopy bzero confstr faccessat fnmatch \
13912 getaddrinfo gethostbyname getservbyname getservent inet_aton \
a0c0a00f 13913 imaxdiv memmove pathconf putenv raise random regcomp regexec \
ac50fbac
CR
13914 setenv setlinebuf setlocale setvbuf siginterrupt strchr \
13915 sysconf syslog tcgetattr times ttyname tzset unsetenv
13916do :
13917 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13918ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13919if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13920 cat >>confdefs.h <<_ACEOF
13921#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
0628567a 13922_ACEOF
b80f6443 13923
ac50fbac
CR
13924fi
13925done
b80f6443 13926
ac50fbac
CR
13927
13928for ac_func in vasprintf asprintf
13929do :
13930 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13931ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13932if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13933 cat >>confdefs.h <<_ACEOF
13934#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f73dda09 13935_ACEOF
0628567a 13936
ccc6cda3 13937fi
ac50fbac
CR
13938done
13939
13940for ac_func in isascii isblank isgraph isprint isspace isxdigit
13941do :
13942 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13943ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13944if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13945 cat >>confdefs.h <<_ACEOF
13946#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13947_ACEOF
13948
ccc6cda3 13949fi
ac50fbac
CR
13950done
13951
13952for ac_func in getpwent getpwnam getpwuid
13953do :
13954 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13955ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13956if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13957 cat >>confdefs.h <<_ACEOF
13958#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13959_ACEOF
13960
ccc6cda3 13961fi
ac50fbac 13962done
ccc6cda3 13963
8868edaf
CR
13964for ac_func in mkstemp mkdtemp
13965do :
13966 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13967ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13968if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13969 cat >>confdefs.h <<_ACEOF
13970#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13971_ACEOF
13972
13973fi
13974done
13975
13976for ac_func in arc4random
a0c0a00f 13977do :
8868edaf
CR
13978 ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
13979if test "x$ac_cv_func_arc4random" = xyes; then :
a0c0a00f 13980 cat >>confdefs.h <<_ACEOF
8868edaf 13981#define HAVE_ARC4RANDOM 1
a0c0a00f
CR
13982_ACEOF
13983
13984fi
13985done
13986
8868edaf 13987
ac50fbac
CR
13988ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13989if test "x$ac_cv_func_getcwd" = xyes; then :
13990 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
b80f6443 13991
ac50fbac
CR
13992else
13993 case " $LIBOBJS " in
13994 *" getcwd.$ac_objext "* ) ;;
13995 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
13996 ;;
13997esac
3185942a 13998
ac50fbac 13999fi
0628567a 14000
ac50fbac
CR
14001ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
14002if test "x$ac_cv_func_memset" = xyes; then :
14003 $as_echo "#define HAVE_MEMSET 1" >>confdefs.h
f73dda09 14004
f73dda09 14005else
ac50fbac
CR
14006 case " $LIBOBJS " in
14007 *" memset.$ac_objext "* ) ;;
14008 *) LIBOBJS="$LIBOBJS memset.$ac_objext"
14009 ;;
3185942a 14010esac
b80f6443 14011
ac50fbac
CR
14012fi
14013
14014
14015ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
14016if test "x$ac_cv_func_strcasecmp" = xyes; then :
14017 $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h
14018
f73dda09 14019else
ac50fbac
CR
14020 case " $LIBOBJS " in
14021 *" strcasecmp.$ac_objext "* ) ;;
14022 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
14023 ;;
14024esac
0628567a 14025
f73dda09 14026fi
3185942a 14027
ac50fbac
CR
14028ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
14029if test "x$ac_cv_func_strcasestr" = xyes; then :
14030 $as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h
14031
f73dda09 14032else
ac50fbac
CR
14033 case " $LIBOBJS " in
14034 *" strcasestr.$ac_objext "* ) ;;
14035 *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext"
14036 ;;
14037esac
0628567a 14038
ac50fbac 14039fi
b80f6443 14040
ac50fbac
CR
14041ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
14042if test "x$ac_cv_func_strerror" = xyes; then :
14043 $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
b80f6443 14044
f73dda09 14045else
ac50fbac
CR
14046 case " $LIBOBJS " in
14047 *" strerror.$ac_objext "* ) ;;
14048 *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
14049 ;;
14050esac
0628567a 14051
f73dda09 14052fi
3185942a 14053
ac50fbac
CR
14054ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
14055if test "x$ac_cv_func_strftime" = xyes; then :
14056 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
14057
b80f6443 14058else
ac50fbac
CR
14059 case " $LIBOBJS " in
14060 *" strftime.$ac_objext "* ) ;;
14061 *) LIBOBJS="$LIBOBJS strftime.$ac_objext"
14062 ;;
14063esac
0628567a 14064
b80f6443 14065fi
3185942a 14066
ac50fbac
CR
14067ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
14068if test "x$ac_cv_func_strnlen" = xyes; then :
14069 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
14070
14071else
14072 case " $LIBOBJS " in
14073 *" strnlen.$ac_objext "* ) ;;
14074 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
14075 ;;
14076esac
14077
ccc6cda3 14078fi
3185942a 14079
ac50fbac
CR
14080ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
14081if test "x$ac_cv_func_strpbrk" = xyes; then :
14082 $as_echo "#define HAVE_STRPBRK 1" >>confdefs.h
b80f6443 14083
f73dda09 14084else
ac50fbac
CR
14085 case " $LIBOBJS " in
14086 *" strpbrk.$ac_objext "* ) ;;
14087 *) LIBOBJS="$LIBOBJS strpbrk.$ac_objext"
14088 ;;
14089esac
0628567a 14090
f73dda09 14091fi
3185942a 14092
ac50fbac
CR
14093ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
14094if test "x$ac_cv_func_strstr" = xyes; then :
14095 $as_echo "#define HAVE_STRSTR 1" >>confdefs.h
14096
ccc6cda3 14097else
ac50fbac
CR
14098 case " $LIBOBJS " in
14099 *" strstr.$ac_objext "* ) ;;
14100 *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
14101 ;;
14102esac
b80f6443 14103
ac50fbac 14104fi
b80f6443 14105
ac50fbac
CR
14106
14107ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod"
14108if test "x$ac_cv_func_strtod" = xyes; then :
14109 $as_echo "#define HAVE_STRTOD 1" >>confdefs.h
14110
14111else
14112 case " $LIBOBJS " in
14113 *" strtod.$ac_objext "* ) ;;
14114 *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
14115 ;;
3185942a 14116esac
ac50fbac
CR
14117
14118fi
14119
14120ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
14121if test "x$ac_cv_func_strtol" = xyes; then :
14122 $as_echo "#define HAVE_STRTOL 1" >>confdefs.h
14123
14124else
14125 case " $LIBOBJS " in
14126 *" strtol.$ac_objext "* ) ;;
14127 *) LIBOBJS="$LIBOBJS strtol.$ac_objext"
14128 ;;
3185942a 14129esac
ac50fbac
CR
14130
14131fi
14132
14133ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
14134if test "x$ac_cv_func_strtoul" = xyes; then :
14135 $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h
14136
ccc6cda3 14137else
ac50fbac
CR
14138 case " $LIBOBJS " in
14139 *" strtoul.$ac_objext "* ) ;;
14140 *) LIBOBJS="$LIBOBJS strtoul.$ac_objext"
14141 ;;
14142esac
0628567a 14143
ccc6cda3 14144fi
ac50fbac
CR
14145
14146ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
14147if test "x$ac_cv_func_strtoll" = xyes; then :
14148 $as_echo "#define HAVE_STRTOLL 1" >>confdefs.h
14149
14150else
14151 case " $LIBOBJS " in
14152 *" strtoll.$ac_objext "* ) ;;
14153 *) LIBOBJS="$LIBOBJS strtoll.$ac_objext"
14154 ;;
14155esac
14156
ccc6cda3 14157fi
ac50fbac
CR
14158
14159ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
14160if test "x$ac_cv_func_strtoull" = xyes; then :
14161 $as_echo "#define HAVE_STRTOULL 1" >>confdefs.h
14162
14163else
14164 case " $LIBOBJS " in
14165 *" strtoull.$ac_objext "* ) ;;
14166 *) LIBOBJS="$LIBOBJS strtoull.$ac_objext"
14167 ;;
14168esac
14169
ccc6cda3 14170fi
ccc6cda3 14171
ac50fbac
CR
14172ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
14173if test "x$ac_cv_func_strtoimax" = xyes; then :
14174 $as_echo "#define HAVE_STRTOIMAX 1" >>confdefs.h
b80f6443 14175
ac50fbac
CR
14176else
14177 case " $LIBOBJS " in
14178 *" strtoimax.$ac_objext "* ) ;;
14179 *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext"
14180 ;;
14181esac
3185942a 14182
ac50fbac 14183fi
0628567a 14184
ac50fbac
CR
14185ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax"
14186if test "x$ac_cv_func_strtoumax" = xyes; then :
14187 $as_echo "#define HAVE_STRTOUMAX 1" >>confdefs.h
f73dda09 14188
f73dda09 14189else
ac50fbac
CR
14190 case " $LIBOBJS " in
14191 *" strtoumax.$ac_objext "* ) ;;
14192 *) LIBOBJS="$LIBOBJS strtoumax.$ac_objext"
14193 ;;
14194esac
b80f6443 14195
ac50fbac
CR
14196fi
14197
14198
14199ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf"
14200if test "x$ac_cv_func_dprintf" = xyes; then :
14201 $as_echo "#define HAVE_DPRINTF 1" >>confdefs.h
14202
14203else
14204 case " $LIBOBJS " in
14205 *" dprintf.$ac_objext "* ) ;;
14206 *) LIBOBJS="$LIBOBJS dprintf.$ac_objext"
14207 ;;
3185942a 14208esac
b80f6443 14209
ac50fbac
CR
14210fi
14211
14212
14213ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
14214if test "x$ac_cv_func_strchrnul" = xyes; then :
14215 $as_echo "#define HAVE_STRCHRNUL 1" >>confdefs.h
14216
14217else
14218 case " $LIBOBJS " in
14219 *" strchrnul.$ac_objext "* ) ;;
14220 *) LIBOBJS="$LIBOBJS strchrnul.$ac_objext"
14221 ;;
3185942a 14222esac
ac50fbac
CR
14223
14224fi
14225
14226
14227ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
14228if test "x$ac_cv_func_strdup" = xyes; then :
14229 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
14230
f73dda09 14231else
ac50fbac
CR
14232 case " $LIBOBJS " in
14233 *" strdup.$ac_objext "* ) ;;
14234 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
14235 ;;
14236esac
0628567a 14237
f73dda09 14238fi
3185942a 14239
ac50fbac
CR
14240
14241
a0c0a00f
CR
14242for ac_header in libaudit.h
14243do :
14244 ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
14245if test "x$ac_cv_header_libaudit_h" = xyes; then :
14246 cat >>confdefs.h <<_ACEOF
14247#define HAVE_LIBAUDIT_H 1
14248_ACEOF
14249
14250fi
14251
14252done
14253
ac50fbac
CR
14254ac_fn_c_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include <linux/audit.h>
14255"
14256if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes; then :
14257 ac_have_decl=1
ccc6cda3 14258else
ac50fbac
CR
14259 ac_have_decl=0
14260fi
0628567a 14261
ac50fbac
CR
14262cat >>confdefs.h <<_ACEOF
14263#define HAVE_DECL_AUDIT_USER_TTY $ac_have_decl
0628567a 14264_ACEOF
b80f6443 14265
b80f6443 14266
ac50fbac
CR
14267ac_fn_c_check_decl "$LINENO" "confstr" "ac_cv_have_decl_confstr" "$ac_includes_default"
14268if test "x$ac_cv_have_decl_confstr" = xyes; then :
14269 ac_have_decl=1
f73dda09 14270else
ac50fbac 14271 ac_have_decl=0
f73dda09 14272fi
3185942a 14273
ac50fbac
CR
14274cat >>confdefs.h <<_ACEOF
14275#define HAVE_DECL_CONFSTR $ac_have_decl
14276_ACEOF
0628567a 14277
ac50fbac
CR
14278ac_fn_c_check_decl "$LINENO" "printf" "ac_cv_have_decl_printf" "$ac_includes_default"
14279if test "x$ac_cv_have_decl_printf" = xyes; then :
14280 ac_have_decl=1
14281else
14282 ac_have_decl=0
b80f6443 14283fi
3185942a 14284
ac50fbac
CR
14285cat >>confdefs.h <<_ACEOF
14286#define HAVE_DECL_PRINTF $ac_have_decl
14287_ACEOF
14288
14289ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default"
14290if test "x$ac_cv_have_decl_sbrk" = xyes; then :
14291 ac_have_decl=1
14292else
14293 ac_have_decl=0
ccc6cda3 14294fi
3185942a 14295
ac50fbac
CR
14296cat >>confdefs.h <<_ACEOF
14297#define HAVE_DECL_SBRK $ac_have_decl
0628567a 14298_ACEOF
b80f6443 14299
ac50fbac
CR
14300ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default"
14301if test "x$ac_cv_have_decl_setregid" = xyes; then :
14302 ac_have_decl=1
14303else
14304 ac_have_decl=0
14305fi
14306
14307cat >>confdefs.h <<_ACEOF
14308#define HAVE_DECL_SETREGID $ac_have_decl
f73dda09 14309_ACEOF
ac50fbac
CR
14310
14311ac_fn_c_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" "$ac_includes_default"
14312if test "x$ac_cv_have_decl_strcpy" = xyes; then :
14313 ac_have_decl=1
f73dda09 14314else
ac50fbac
CR
14315 ac_have_decl=0
14316fi
0628567a 14317
ac50fbac
CR
14318cat >>confdefs.h <<_ACEOF
14319#define HAVE_DECL_STRCPY $ac_have_decl
14320_ACEOF
14321
14322ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
14323if test "x$ac_cv_have_decl_strsignal" = xyes; then :
14324 ac_have_decl=1
14325else
14326 ac_have_decl=0
f73dda09 14327fi
3185942a 14328
ac50fbac
CR
14329cat >>confdefs.h <<_ACEOF
14330#define HAVE_DECL_STRSIGNAL $ac_have_decl
14331_ACEOF
14332
14333
8868edaf
CR
14334for ac_func in setresuid setresgid
14335do :
14336 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14337ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14338if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14339 cat >>confdefs.h <<_ACEOF
14340#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14341_ACEOF
14342
14343fi
14344done
14345
14346
ac50fbac
CR
14347ac_fn_c_check_decl "$LINENO" "strtold" "ac_cv_have_decl_strtold" "$ac_includes_default"
14348if test "x$ac_cv_have_decl_strtold" = xyes; then :
14349 ac_have_decl=1
bb70624e 14350else
ac50fbac
CR
14351 ac_have_decl=0
14352fi
14353
14354cat >>confdefs.h <<_ACEOF
14355#define HAVE_DECL_STRTOLD $ac_have_decl
0628567a 14356_ACEOF
ac50fbac
CR
14357if test $ac_have_decl = 1; then :
14358
14359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken strtold" >&5
14360$as_echo_n "checking for broken strtold... " >&6; }
14361 if ${bash_cv_strtold_broken+:} false; then :
14362 $as_echo_n "(cached) " >&6
14363else
14364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14365/* end confdefs.h. */
b80f6443 14366#include <stdlib.h>
f73dda09
JA
14367int
14368main ()
bb70624e 14369{
d233b485 14370long double r; char *foo, bar; r = strtold(foo, &bar);
f73dda09
JA
14371 ;
14372 return 0;
bb70624e 14373}
f73dda09 14374_ACEOF
ac50fbac
CR
14375if ac_fn_c_try_compile "$LINENO"; then :
14376 bash_cv_strtold_broken=no
bb70624e 14377else
ac50fbac 14378 bash_cv_strtold_broken=yes
bb70624e 14379fi
ac50fbac
CR
14380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14381
14382
bb70624e 14383fi
ac50fbac
CR
14384
14385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_strtold_broken" >&5
14386$as_echo "$bash_cv_strtold_broken" >&6; }
14387 if test "$bash_cv_strtold_broken" = "yes" ; then
14388 $as_echo "#define STRTOLD_BROKEN 1" >>confdefs.h
14389
14390 fi
14391
f73dda09 14392fi
bb70624e 14393
b80f6443 14394
3185942a 14395
0628567a 14396
f73dda09 14397
ac50fbac
CR
14398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoimax" >&5
14399$as_echo_n "checking for declaration of strtoimax... " >&6; }
14400if ${bash_cv_decl_strtoimax+:} false; then :
3185942a 14401 $as_echo_n "(cached) " >&6
f73dda09 14402else
ac50fbac 14403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14404/* end confdefs.h. */
ac50fbac
CR
14405
14406#if STDC_HEADERS
14407# include <stdlib.h>
14408#endif
14409#if HAVE_INTTYPES_H
14410# include <inttypes.h>
14411#endif
14412
f73dda09
JA
14413int
14414main ()
14415{
ac50fbac 14416return !strtoimax;
f73dda09
JA
14417 ;
14418 return 0;
14419}
14420_ACEOF
ac50fbac
CR
14421if ac_fn_c_try_link "$LINENO"; then :
14422 bash_cv_decl_strtoimax=yes
14423else
14424 bash_cv_decl_strtoimax=no
14425fi
14426rm -f core conftest.err conftest.$ac_objext \
14427 conftest$ac_exeext conftest.$ac_ext
14428fi
14429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoimax" >&5
14430$as_echo "$bash_cv_decl_strtoimax" >&6; }
14431bash_tr_func=HAVE_DECL_`echo strtoimax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14432if test $bash_cv_decl_strtoimax = yes; then
14433 cat >>confdefs.h <<_ACEOF
14434#define $bash_tr_func 1
0628567a 14435_ACEOF
b80f6443 14436
f73dda09 14437else
ac50fbac
CR
14438 cat >>confdefs.h <<_ACEOF
14439#define $bash_tr_func 0
14440_ACEOF
0628567a 14441
f73dda09 14442fi
3185942a 14443
0628567a 14444
b80f6443 14445
ac50fbac
CR
14446
14447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtol" >&5
14448$as_echo_n "checking for declaration of strtol... " >&6; }
14449if ${bash_cv_decl_strtol+:} false; then :
14450 $as_echo_n "(cached) " >&6
14451else
14452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14453/* end confdefs.h. */
ac50fbac
CR
14454
14455#if STDC_HEADERS
14456# include <stdlib.h>
14457#endif
14458#if HAVE_INTTYPES_H
14459# include <inttypes.h>
14460#endif
14461
f73dda09
JA
14462int
14463main ()
14464{
ac50fbac 14465return !strtol;
f73dda09
JA
14466 ;
14467 return 0;
14468}
14469_ACEOF
ac50fbac
CR
14470if ac_fn_c_try_link "$LINENO"; then :
14471 bash_cv_decl_strtol=yes
f73dda09 14472else
ac50fbac 14473 bash_cv_decl_strtol=no
f73dda09 14474fi
ac50fbac
CR
14475rm -f core conftest.err conftest.$ac_objext \
14476 conftest$ac_exeext conftest.$ac_ext
14477fi
14478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtol" >&5
14479$as_echo "$bash_cv_decl_strtol" >&6; }
14480bash_tr_func=HAVE_DECL_`echo strtol | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14481if test $bash_cv_decl_strtol = yes; then
14482 cat >>confdefs.h <<_ACEOF
14483#define $bash_tr_func 1
14484_ACEOF
3185942a 14485
b80f6443 14486else
ac50fbac
CR
14487 cat >>confdefs.h <<_ACEOF
14488#define $bash_tr_func 0
14489_ACEOF
0628567a 14490
b80f6443 14491fi
3185942a 14492
3185942a 14493
ac50fbac
CR
14494
14495
14496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoll" >&5
14497$as_echo_n "checking for declaration of strtoll... " >&6; }
14498if ${bash_cv_decl_strtoll+:} false; then :
14499 $as_echo_n "(cached) " >&6
14500else
14501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14502/* end confdefs.h. */
ac50fbac
CR
14503
14504#if STDC_HEADERS
14505# include <stdlib.h>
14506#endif
14507#if HAVE_INTTYPES_H
14508# include <inttypes.h>
14509#endif
14510
f73dda09
JA
14511int
14512main ()
14513{
ac50fbac 14514return !strtoll;
f73dda09
JA
14515 ;
14516 return 0;
14517}
14518_ACEOF
ac50fbac
CR
14519if ac_fn_c_try_link "$LINENO"; then :
14520 bash_cv_decl_strtoll=yes
f73dda09 14521else
ac50fbac 14522 bash_cv_decl_strtoll=no
f73dda09 14523fi
ac50fbac
CR
14524rm -f core conftest.err conftest.$ac_objext \
14525 conftest$ac_exeext conftest.$ac_ext
14526fi
14527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoll" >&5
14528$as_echo "$bash_cv_decl_strtoll" >&6; }
14529bash_tr_func=HAVE_DECL_`echo strtoll | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14530if test $bash_cv_decl_strtoll = yes; then
14531 cat >>confdefs.h <<_ACEOF
14532#define $bash_tr_func 1
14533_ACEOF
3185942a 14534
bb70624e 14535else
ac50fbac
CR
14536 cat >>confdefs.h <<_ACEOF
14537#define $bash_tr_func 0
0628567a 14538_ACEOF
ac50fbac
CR
14539
14540fi
14541
14542
14543
14544
14545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoul" >&5
14546$as_echo_n "checking for declaration of strtoul... " >&6; }
14547if ${bash_cv_decl_strtoul+:} false; then :
14548 $as_echo_n "(cached) " >&6
14549else
14550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14551/* end confdefs.h. */
ac50fbac
CR
14552
14553#if STDC_HEADERS
14554# include <stdlib.h>
14555#endif
14556#if HAVE_INTTYPES_H
14557# include <inttypes.h>
14558#endif
14559
f73dda09
JA
14560int
14561main ()
bb70624e 14562{
ac50fbac 14563return !strtoul;
f73dda09
JA
14564 ;
14565 return 0;
bb70624e 14566}
f73dda09 14567_ACEOF
ac50fbac
CR
14568if ac_fn_c_try_link "$LINENO"; then :
14569 bash_cv_decl_strtoul=yes
bb70624e 14570else
ac50fbac 14571 bash_cv_decl_strtoul=no
bb70624e 14572fi
ac50fbac
CR
14573rm -f core conftest.err conftest.$ac_objext \
14574 conftest$ac_exeext conftest.$ac_ext
f73dda09 14575fi
ac50fbac
CR
14576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoul" >&5
14577$as_echo "$bash_cv_decl_strtoul" >&6; }
14578bash_tr_func=HAVE_DECL_`echo strtoul | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14579if test $bash_cv_decl_strtoul = yes; then
14580 cat >>confdefs.h <<_ACEOF
14581#define $bash_tr_func 1
14582_ACEOF
bb70624e 14583
ac50fbac
CR
14584else
14585 cat >>confdefs.h <<_ACEOF
14586#define $bash_tr_func 0
14587_ACEOF
b80f6443 14588
ac50fbac 14589fi
3185942a 14590
0628567a 14591
f73dda09 14592
ac50fbac
CR
14593
14594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoull" >&5
14595$as_echo_n "checking for declaration of strtoull... " >&6; }
14596if ${bash_cv_decl_strtoull+:} false; then :
3185942a 14597 $as_echo_n "(cached) " >&6
f73dda09 14598else
ac50fbac 14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14600/* end confdefs.h. */
ac50fbac
CR
14601
14602#if STDC_HEADERS
14603# include <stdlib.h>
14604#endif
14605#if HAVE_INTTYPES_H
14606# include <inttypes.h>
14607#endif
14608
f73dda09
JA
14609int
14610main ()
cce855bc 14611{
ac50fbac 14612return !strtoull;
f73dda09
JA
14613 ;
14614 return 0;
cce855bc 14615}
f73dda09 14616_ACEOF
ac50fbac
CR
14617if ac_fn_c_try_link "$LINENO"; then :
14618 bash_cv_decl_strtoull=yes
14619else
14620 bash_cv_decl_strtoull=no
14621fi
14622rm -f core conftest.err conftest.$ac_objext \
14623 conftest$ac_exeext conftest.$ac_ext
14624fi
14625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoull" >&5
14626$as_echo "$bash_cv_decl_strtoull" >&6; }
14627bash_tr_func=HAVE_DECL_`echo strtoull | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14628if test $bash_cv_decl_strtoull = yes; then
14629 cat >>confdefs.h <<_ACEOF
14630#define $bash_tr_func 1
14631_ACEOF
14632
14633else
14634 cat >>confdefs.h <<_ACEOF
14635#define $bash_tr_func 0
0628567a 14636_ACEOF
ac50fbac
CR
14637
14638fi
14639
14640
14641
14642
14643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoumax" >&5
14644$as_echo_n "checking for declaration of strtoumax... " >&6; }
14645if ${bash_cv_decl_strtoumax+:} false; then :
14646 $as_echo_n "(cached) " >&6
14647else
14648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14649/* end confdefs.h. */
ac50fbac
CR
14650
14651#if STDC_HEADERS
14652# include <stdlib.h>
14653#endif
14654#if HAVE_INTTYPES_H
14655# include <inttypes.h>
14656#endif
14657
f73dda09
JA
14658int
14659main ()
14660{
ac50fbac 14661return !strtoumax;
f73dda09
JA
14662 ;
14663 return 0;
14664}
14665_ACEOF
ac50fbac
CR
14666if ac_fn_c_try_link "$LINENO"; then :
14667 bash_cv_decl_strtoumax=yes
f73dda09 14668else
ac50fbac
CR
14669 bash_cv_decl_strtoumax=no
14670fi
14671rm -f core conftest.err conftest.$ac_objext \
14672 conftest$ac_exeext conftest.$ac_ext
f73dda09 14673fi
ac50fbac
CR
14674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoumax" >&5
14675$as_echo "$bash_cv_decl_strtoumax" >&6; }
14676bash_tr_func=HAVE_DECL_`echo strtoumax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14677if test $bash_cv_decl_strtoumax = yes; then
14678 cat >>confdefs.h <<_ACEOF
14679#define $bash_tr_func 1
14680_ACEOF
3185942a 14681
cce855bc 14682else
ac50fbac
CR
14683 cat >>confdefs.h <<_ACEOF
14684#define $bash_tr_func 0
14685_ACEOF
14686
14687fi
14688
0628567a 14689
ac50fbac
CR
14690
14691
14692
14693
14694
ac50fbac
CR
14695
14696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
14697$as_echo_n "checking for working mktime... " >&6; }
14698if ${ac_cv_func_working_mktime+:} false; then :
14699 $as_echo_n "(cached) " >&6
14700else
14701 if test "$cross_compiling" = yes; then :
14702 ac_cv_func_working_mktime=no
14703else
14704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14705/* end confdefs.h. */
ac50fbac
CR
14706/* Test program from Paul Eggert and Tony Leneis. */
14707#ifdef TIME_WITH_SYS_TIME
14708# include <sys/time.h>
14709# include <time.h>
14710#else
14711# ifdef HAVE_SYS_TIME_H
14712# include <sys/time.h>
14713# else
14714# include <time.h>
14715# endif
14716#endif
14717
14718#include <limits.h>
14719#include <stdlib.h>
14720
14721#ifdef HAVE_UNISTD_H
14722# include <unistd.h>
14723#endif
14724
14725#ifndef HAVE_ALARM
14726# define alarm(X) /* empty */
14727#endif
14728
14729/* Work around redefinition to rpl_putenv by other config tests. */
14730#undef putenv
14731
14732static time_t time_t_max;
14733static time_t time_t_min;
14734
14735/* Values we'll use to set the TZ environment variable. */
14736static const char *tz_strings[] = {
14737 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
14738 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
14739};
14740#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
14741
14742/* Return 0 if mktime fails to convert a date in the spring-forward gap.
14743 Based on a problem report from Andreas Jaeger. */
14744static int
14745spring_forward_gap ()
14746{
14747 /* glibc (up to about 1998-10-07) failed this test. */
14748 struct tm tm;
14749
14750 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14751 instead of "TZ=America/Vancouver" in order to detect the bug even
14752 on systems that don't support the Olson extension, or don't have the
14753 full zoneinfo tables installed. */
14754 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
14755
14756 tm.tm_year = 98;
14757 tm.tm_mon = 3;
14758 tm.tm_mday = 5;
14759 tm.tm_hour = 2;
14760 tm.tm_min = 0;
14761 tm.tm_sec = 0;
14762 tm.tm_isdst = -1;
14763 return mktime (&tm) != (time_t) -1;
14764}
14765
14766static int
14767mktime_test1 (time_t now)
14768{
14769 struct tm *lt;
14770 return ! (lt = localtime (&now)) || mktime (lt) == now;
14771}
14772
14773static int
14774mktime_test (time_t now)
14775{
14776 return (mktime_test1 (now)
14777 && mktime_test1 ((time_t) (time_t_max - now))
14778 && mktime_test1 ((time_t) (time_t_min + now)));
14779}
14780
14781static int
14782irix_6_4_bug ()
14783{
14784 /* Based on code from Ariel Faigon. */
14785 struct tm tm;
14786 tm.tm_year = 96;
14787 tm.tm_mon = 3;
14788 tm.tm_mday = 0;
14789 tm.tm_hour = 0;
14790 tm.tm_min = 0;
14791 tm.tm_sec = 0;
14792 tm.tm_isdst = -1;
14793 mktime (&tm);
14794 return tm.tm_mon == 2 && tm.tm_mday == 31;
14795}
14796
14797static int
14798bigtime_test (int j)
14799{
14800 struct tm tm;
14801 time_t now;
14802 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
14803 now = mktime (&tm);
14804 if (now != (time_t) -1)
14805 {
14806 struct tm *lt = localtime (&now);
14807 if (! (lt
14808 && lt->tm_year == tm.tm_year
14809 && lt->tm_mon == tm.tm_mon
14810 && lt->tm_mday == tm.tm_mday
14811 && lt->tm_hour == tm.tm_hour
14812 && lt->tm_min == tm.tm_min
14813 && lt->tm_sec == tm.tm_sec
14814 && lt->tm_yday == tm.tm_yday
14815 && lt->tm_wday == tm.tm_wday
14816 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
14817 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
14818 return 0;
14819 }
14820 return 1;
14821}
14822
14823static int
14824year_2050_test ()
b80f6443 14825{
ac50fbac
CR
14826 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
14827 ignoring leap seconds. */
14828 unsigned long int answer = 2527315200UL;
14829
14830 struct tm tm;
14831 time_t t;
14832 tm.tm_year = 2050 - 1900;
14833 tm.tm_mon = 2 - 1;
14834 tm.tm_mday = 1;
14835 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
14836 tm.tm_isdst = -1;
14837
14838 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
14839 instead of "TZ=America/Vancouver" in order to detect the bug even
14840 on systems that don't support the Olson extension, or don't have the
14841 full zoneinfo tables installed. */
14842 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
b80f6443 14843
ac50fbac
CR
14844 t = mktime (&tm);
14845
14846 /* Check that the result is either a failure, or close enough
14847 to the correct answer that we can assume the discrepancy is
14848 due to leap seconds. */
14849 return (t == (time_t) -1
14850 || (0 < t && answer - 120 <= t && t <= answer + 120));
b80f6443 14851}
ac50fbac 14852
f73dda09
JA
14853int
14854main ()
14855{
ac50fbac
CR
14856 time_t t, delta;
14857 int i, j;
b80f6443 14858
ac50fbac
CR
14859 /* This test makes some buggy mktime implementations loop.
14860 Give up after 60 seconds; a mktime slower than that
14861 isn't worth using anyway. */
14862 alarm (60);
14863
14864 for (;;)
14865 {
14866 t = (time_t_max << 1) + 1;
14867 if (t <= time_t_max)
14868 break;
14869 time_t_max = t;
14870 }
14871 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
14872
14873 delta = time_t_max / 997; /* a suitable prime number */
14874 for (i = 0; i < N_STRINGS; i++)
14875 {
14876 if (tz_strings[i])
14877 putenv ((char*) tz_strings[i]);
14878
14879 for (t = 0; t <= time_t_max - delta; t += delta)
14880 if (! mktime_test (t))
14881 return 1;
14882 if (! (mktime_test ((time_t) 1)
14883 && mktime_test ((time_t) (60 * 60))
14884 && mktime_test ((time_t) (60 * 60 * 24))))
14885 return 1;
14886
14887 for (j = 1; ; j <<= 1)
14888 if (! bigtime_test (j))
14889 return 1;
14890 else if (INT_MAX / 2 < j)
14891 break;
14892 if (! bigtime_test (INT_MAX))
14893 return 1;
14894 }
14895 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
f73dda09
JA
14896}
14897_ACEOF
ac50fbac
CR
14898if ac_fn_c_try_run "$LINENO"; then :
14899 ac_cv_func_working_mktime=yes
f73dda09 14900else
ac50fbac
CR
14901 ac_cv_func_working_mktime=no
14902fi
14903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14904 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 14905fi
3185942a 14906
b80f6443 14907fi
ac50fbac
CR
14908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
14909$as_echo "$ac_cv_func_working_mktime" >&6; }
14910if test $ac_cv_func_working_mktime = no; then
14911 case " $LIBOBJS " in
14912 *" mktime.$ac_objext "* ) ;;
14913 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
14914 ;;
14915esac
3185942a 14916
cce855bc 14917fi
3185942a 14918
b80f6443 14919
ac50fbac
CR
14920
14921for ac_header in argz.h errno.h fcntl.h malloc.h stdio_ext.h
14922do :
14923 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14924ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14925if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14926 cat >>confdefs.h <<_ACEOF
14927#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
f73dda09 14928_ACEOF
0628567a 14929
f73dda09 14930fi
3185942a 14931
f73dda09 14932done
ac50fbac
CR
14933
14934
14935
14936for ac_func in getpagesize
14937do :
14938 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
14939if test "x$ac_cv_func_getpagesize" = xyes; then :
14940 cat >>confdefs.h <<_ACEOF
14941#define HAVE_GETPAGESIZE 1
0628567a 14942_ACEOF
ac50fbac
CR
14943
14944fi
14945done
14946
14947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
14948$as_echo_n "checking for working mmap... " >&6; }
14949if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
14950 $as_echo_n "(cached) " >&6
14951else
14952 if test "$cross_compiling" = yes; then :
14953 ac_cv_func_mmap_fixed_mapped=no
14954else
14955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14956/* end confdefs.h. */
f73dda09 14957$ac_includes_default
ac50fbac
CR
14958/* malloc might have been renamed as rpl_malloc. */
14959#undef malloc
14960
14961/* Thanks to Mike Haertel and Jim Avera for this test.
14962 Here is a matrix of mmap possibilities:
14963 mmap private not fixed
14964 mmap private fixed at somewhere currently unmapped
14965 mmap private fixed at somewhere already mapped
14966 mmap shared not fixed
14967 mmap shared fixed at somewhere currently unmapped
14968 mmap shared fixed at somewhere already mapped
14969 For private mappings, we should verify that changes cannot be read()
14970 back from the file, nor mmap's back from the file at a different
14971 address. (There have been systems where private was not correctly
14972 implemented like the infamous i386 svr4.0, and systems where the
14973 VM page cache was not coherent with the file system buffer cache
14974 like early versions of FreeBSD and possibly contemporary NetBSD.)
14975 For shared mappings, we should conversely verify that changes get
14976 propagated back to all the places they're supposed to be.
14977
14978 Grep wants private fixed already mapped.
14979 The main things grep needs to know about mmap are:
14980 * does it exist and is it safe to write into the mmap'd area
14981 * how to use it (BSD variants) */
14982
14983#include <fcntl.h>
14984#include <sys/mman.h>
14985
14986#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
14987char *malloc ();
14988#endif
14989
14990/* This mess was copied from the GNU getpagesize.h. */
14991#ifndef HAVE_GETPAGESIZE
14992# ifdef _SC_PAGESIZE
14993# define getpagesize() sysconf(_SC_PAGESIZE)
14994# else /* no _SC_PAGESIZE */
14995# ifdef HAVE_SYS_PARAM_H
14996# include <sys/param.h>
14997# ifdef EXEC_PAGESIZE
14998# define getpagesize() EXEC_PAGESIZE
14999# else /* no EXEC_PAGESIZE */
15000# ifdef NBPG
15001# define getpagesize() NBPG * CLSIZE
15002# ifndef CLSIZE
15003# define CLSIZE 1
15004# endif /* no CLSIZE */
15005# else /* no NBPG */
15006# ifdef NBPC
15007# define getpagesize() NBPC
15008# else /* no NBPC */
15009# ifdef PAGESIZE
15010# define getpagesize() PAGESIZE
15011# endif /* PAGESIZE */
15012# endif /* no NBPC */
15013# endif /* no NBPG */
15014# endif /* no EXEC_PAGESIZE */
15015# else /* no HAVE_SYS_PARAM_H */
15016# define getpagesize() 8192 /* punt totally */
15017# endif /* no HAVE_SYS_PARAM_H */
15018# endif /* no _SC_PAGESIZE */
15019
15020#endif /* no HAVE_GETPAGESIZE */
15021
f73dda09
JA
15022int
15023main ()
cce855bc 15024{
ac50fbac
CR
15025 char *data, *data2, *data3;
15026 const char *cdata2;
15027 int i, pagesize;
15028 int fd, fd2;
b80f6443 15029
ac50fbac
CR
15030 pagesize = getpagesize ();
15031
15032 /* First, make a file with some known garbage in it. */
15033 data = (char *) malloc (pagesize);
15034 if (!data)
3185942a 15035 return 1;
ac50fbac
CR
15036 for (i = 0; i < pagesize; ++i)
15037 *(data + i) = rand ();
15038 umask (0);
15039 fd = creat ("conftest.mmap", 0600);
15040 if (fd < 0)
15041 return 2;
15042 if (write (fd, data, pagesize) != pagesize)
15043 return 3;
15044 close (fd);
b80f6443 15045
ac50fbac
CR
15046 /* Next, check that the tail of a page is zero-filled. File must have
15047 non-zero length, otherwise we risk SIGBUS for entire page. */
15048 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
15049 if (fd2 < 0)
15050 return 4;
15051 cdata2 = "";
15052 if (write (fd2, cdata2, 1) != 1)
15053 return 5;
15054 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
15055 if (data2 == MAP_FAILED)
15056 return 6;
15057 for (i = 0; i < pagesize; ++i)
15058 if (*(data2 + i))
15059 return 7;
15060 close (fd2);
15061 if (munmap (data2, pagesize))
15062 return 8;
15063
15064 /* Next, try to mmap the file at a fixed address which already has
15065 something else allocated at it. If we can, also make sure that
15066 we see the same garbage. */
15067 fd = open ("conftest.mmap", O_RDWR);
15068 if (fd < 0)
15069 return 9;
15070 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
15071 MAP_PRIVATE | MAP_FIXED, fd, 0L))
15072 return 10;
15073 for (i = 0; i < pagesize; ++i)
15074 if (*(data + i) != *(data2 + i))
15075 return 11;
15076
15077 /* Finally, make sure that changes to the mapped area do not
15078 percolate back to the file as seen by read(). (This is a bug on
15079 some variants of i386 svr4.0.) */
15080 for (i = 0; i < pagesize; ++i)
15081 *(data2 + i) = *(data2 + i) + 1;
15082 data3 = (char *) malloc (pagesize);
15083 if (!data3)
15084 return 12;
15085 if (read (fd, data3, pagesize) != pagesize)
15086 return 13;
15087 for (i = 0; i < pagesize; ++i)
15088 if (*(data + i) != *(data3 + i))
15089 return 14;
15090 close (fd);
f73dda09 15091 return 0;
cce855bc 15092}
f73dda09 15093_ACEOF
ac50fbac
CR
15094if ac_fn_c_try_run "$LINENO"; then :
15095 ac_cv_func_mmap_fixed_mapped=yes
cce855bc 15096else
ac50fbac 15097 ac_cv_func_mmap_fixed_mapped=no
cce855bc 15098fi
ac50fbac
CR
15099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15100 conftest.$ac_objext conftest.beam conftest.$ac_ext
cce855bc 15101fi
ac50fbac 15102
f73dda09 15103fi
ac50fbac
CR
15104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
15105$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
15106if test $ac_cv_func_mmap_fixed_mapped = yes; then
cce855bc 15107
ac50fbac 15108$as_echo "#define HAVE_MMAP 1" >>confdefs.h
b80f6443 15109
ac50fbac
CR
15110fi
15111rm -f conftest.mmap conftest.txt
3185942a 15112
ac50fbac 15113for ac_func in __argz_count __argz_next __argz_stringify dcgettext mempcpy \
d233b485 15114 munmap mremap stpcpy strcspn
ac50fbac
CR
15115do :
15116 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15117ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15118if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15119 cat >>confdefs.h <<_ACEOF
15120#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f73dda09 15121_ACEOF
0628567a 15122
ac50fbac
CR
15123fi
15124done
f73dda09 15125
b80f6443 15126
ac50fbac
CR
15127INTL_DEP= INTL_INC= LIBINTL_H=
15128if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then
15129 INTL_DEP='${INTL_LIBDIR}/libintl.a'
15130 INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}'
15131 LIBINTL_H='${INTL_BUILDDIR}/libintl.h'
15132fi
b80f6443 15133
ac50fbac
CR
15134
15135
15136
15137
15138
15139for ac_header in wctype.h
15140do :
15141 ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
15142if test "x$ac_cv_header_wctype_h" = xyes; then :
15143 cat >>confdefs.h <<_ACEOF
15144#define HAVE_WCTYPE_H 1
f73dda09 15145_ACEOF
0628567a 15146
f73dda09 15147fi
3185942a 15148
ac50fbac 15149done
0628567a 15150
ac50fbac
CR
15151for ac_header in wchar.h
15152do :
15153 ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
15154if test "x$ac_cv_header_wchar_h" = xyes; then :
15155 cat >>confdefs.h <<_ACEOF
15156#define HAVE_WCHAR_H 1
0628567a 15157_ACEOF
b80f6443 15158
ac50fbac 15159fi
b80f6443 15160
ac50fbac
CR
15161done
15162
15163for ac_header in langinfo.h
15164do :
15165 ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
15166if test "x$ac_cv_header_langinfo_h" = xyes; then :
15167 cat >>confdefs.h <<_ACEOF
15168#define HAVE_LANGINFO_H 1
f73dda09 15169_ACEOF
0628567a 15170
f73dda09 15171fi
3185942a 15172
ac50fbac
CR
15173done
15174
15175
a0c0a00f
CR
15176for ac_header in mbstr.h
15177do :
15178 ac_fn_c_check_header_mongrel "$LINENO" "mbstr.h" "ac_cv_header_mbstr_h" "$ac_includes_default"
15179if test "x$ac_cv_header_mbstr_h" = xyes; then :
15180 cat >>confdefs.h <<_ACEOF
15181#define HAVE_MBSTR_H 1
15182_ACEOF
15183
15184fi
15185
15186done
15187
15188
ac50fbac
CR
15189ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen"
15190if test "x$ac_cv_func_mbrlen" = xyes; then :
15191 $as_echo "#define HAVE_MBRLEN 1" >>confdefs.h
0628567a 15192
b80f6443 15193fi
3185942a 15194
ac50fbac
CR
15195ac_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp"
15196if test "x$ac_cv_func_mbscasecmp" = xyes; then :
15197 $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h
15198
cce855bc 15199fi
3185942a 15200
ac50fbac
CR
15201ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp"
15202if test "x$ac_cv_func_mbscmp" = xyes; then :
15203 $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h
b80f6443 15204
ac50fbac
CR
15205fi
15206
15207ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs"
15208if test "x$ac_cv_func_mbsnrtowcs" = xyes; then :
15209 $as_echo "#define HAVE_MBSNRTOWCS 1" >>confdefs.h
0628567a 15210
f73dda09 15211fi
3185942a 15212
ac50fbac
CR
15213ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs"
15214if test "x$ac_cv_func_mbsrtowcs" = xyes; then :
15215 $as_echo "#define HAVE_MBSRTOWCS 1" >>confdefs.h
b80f6443 15216
ac50fbac
CR
15217fi
15218
15219
15220ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr"
15221if test "x$ac_cv_func_mbschr" = xyes; then :
15222 $as_echo "#define HAVE_MBSCHR 1" >>confdefs.h
b80f6443 15223
bb70624e 15224else
ac50fbac
CR
15225 case " $LIBOBJS " in
15226 *" mbschr.$ac_objext "* ) ;;
15227 *) LIBOBJS="$LIBOBJS mbschr.$ac_objext"
15228 ;;
15229esac
15230
15231fi
15232
15233
15234
15235ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
15236if test "x$ac_cv_func_wcrtomb" = xyes; then :
15237 $as_echo "#define HAVE_WCRTOMB 1" >>confdefs.h
0628567a 15238
bb70624e 15239fi
ac50fbac
CR
15240
15241ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll"
15242if test "x$ac_cv_func_wcscoll" = xyes; then :
15243 $as_echo "#define HAVE_WCSCOLL 1" >>confdefs.h
15244
bb70624e 15245fi
ac50fbac
CR
15246
15247ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup"
15248if test "x$ac_cv_func_wcsdup" = xyes; then :
15249 $as_echo "#define HAVE_WCSDUP 1" >>confdefs.h
15250
f73dda09 15251fi
3185942a 15252
ac50fbac
CR
15253ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth"
15254if test "x$ac_cv_func_wcwidth" = xyes; then :
15255 $as_echo "#define HAVE_WCWIDTH 1" >>confdefs.h
15256
15257fi
3185942a 15258
ac50fbac
CR
15259ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
15260if test "x$ac_cv_func_wctype" = xyes; then :
15261 $as_echo "#define HAVE_WCTYPE 1" >>confdefs.h
3185942a 15262
ac50fbac 15263fi
bb70624e 15264
b80f6443 15265
ac50fbac
CR
15266ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth"
15267if test "x$ac_cv_func_wcswidth" = xyes; then :
15268 $as_echo "#define HAVE_WCSWIDTH 1" >>confdefs.h
b80f6443 15269
bb70624e 15270else
ac50fbac
CR
15271 case " $LIBOBJS " in
15272 *" wcswidth.$ac_objext "* ) ;;
15273 *) LIBOBJS="$LIBOBJS wcswidth.$ac_objext"
15274 ;;
3185942a 15275esac
ac50fbac
CR
15276
15277fi
15278
15279
15280
15281
15282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
15283$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
15284if ${ac_cv_func_mbrtowc+:} false; then :
15285 $as_echo_n "(cached) " >&6
15286else
15287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15288/* end confdefs.h. */
ac50fbac 15289#include <wchar.h>
f73dda09
JA
15290int
15291main ()
15292{
ac50fbac
CR
15293wchar_t wc;
15294 char const s[] = "";
15295 size_t n = 1;
15296 mbstate_t state;
15297 return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
f73dda09
JA
15298 ;
15299 return 0;
15300}
15301_ACEOF
ac50fbac
CR
15302if ac_fn_c_try_link "$LINENO"; then :
15303 ac_cv_func_mbrtowc=yes
3185942a 15304else
ac50fbac
CR
15305 ac_cv_func_mbrtowc=no
15306fi
15307rm -f core conftest.err conftest.$ac_objext \
15308 conftest$ac_exeext conftest.$ac_ext
3185942a 15309fi
ac50fbac
CR
15310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
15311$as_echo "$ac_cv_func_mbrtowc" >&6; }
15312 if test $ac_cv_func_mbrtowc = yes; then
3185942a 15313
ac50fbac 15314$as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h
0628567a 15315
ac50fbac 15316 fi
3185942a 15317
ac50fbac
CR
15318if test $ac_cv_func_mbrtowc = yes; then
15319 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
3185942a 15320
bb70624e 15321fi
f73dda09 15322
ac50fbac
CR
15323for ac_func in iswlower iswupper towlower towupper iswctype
15324do :
15325 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15326ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15327if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15328 cat >>confdefs.h <<_ACEOF
15329#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
b80f6443 15330_ACEOF
bb70624e
JA
15331
15332fi
ac50fbac 15333done
bb70624e 15334
ac50fbac
CR
15335
15336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
15337$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
15338if ${bash_cv_langinfo_codeset+:} false; then :
3185942a 15339 $as_echo_n "(cached) " >&6
bb70624e 15340else
ac50fbac 15341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15342/* end confdefs.h. */
ac50fbac 15343#include <langinfo.h>
f73dda09
JA
15344int
15345main ()
15346{
ac50fbac 15347char* cs = nl_langinfo(CODESET);
f73dda09
JA
15348 ;
15349 return 0;
15350}
15351_ACEOF
ac50fbac
CR
15352if ac_fn_c_try_link "$LINENO"; then :
15353 bash_cv_langinfo_codeset=yes
15354else
15355 bash_cv_langinfo_codeset=no
15356fi
15357rm -f core conftest.err conftest.$ac_objext \
15358 conftest$ac_exeext conftest.$ac_ext
15359fi
15360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_langinfo_codeset" >&5
15361$as_echo "$bash_cv_langinfo_codeset" >&6; }
15362if test $bash_cv_langinfo_codeset = yes; then
15363 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
15364
15365fi
15366
15367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5
15368$as_echo_n "checking for wchar_t in wchar.h... " >&6; }
15369if ${bash_cv_type_wchar_t+:} false; then :
15370 $as_echo_n "(cached) " >&6
15371else
15372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15373/* end confdefs.h. */
ac50fbac
CR
15374#include <wchar.h>
15375
f73dda09
JA
15376int
15377main ()
15378{
ac50fbac
CR
15379
15380 wchar_t foo;
15381 foo = 0;
15382
f73dda09
JA
15383 ;
15384 return 0;
15385}
15386_ACEOF
ac50fbac
CR
15387if ac_fn_c_try_compile "$LINENO"; then :
15388 bash_cv_type_wchar_t=yes
bb70624e 15389else
ac50fbac 15390 bash_cv_type_wchar_t=no
bb70624e 15391fi
3185942a 15392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bb70624e 15393fi
ac50fbac
CR
15394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5
15395$as_echo "$bash_cv_type_wchar_t" >&6; }
15396if test $bash_cv_type_wchar_t = yes; then
f73dda09 15397
ac50fbac 15398$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
bb70624e
JA
15399
15400fi
15401
ac50fbac
CR
15402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5
15403$as_echo_n "checking for wctype_t in wctype.h... " >&6; }
15404if ${bash_cv_type_wctype_t+:} false; then :
3185942a 15405 $as_echo_n "(cached) " >&6
b72432fd 15406else
ac50fbac 15407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15408/* end confdefs.h. */
ac50fbac 15409#include <wctype.h>
f73dda09
JA
15410int
15411main ()
15412{
ac50fbac
CR
15413
15414 wctype_t foo;
15415 foo = 0;
15416
f73dda09
JA
15417 ;
15418 return 0;
15419}
15420_ACEOF
ac50fbac
CR
15421if ac_fn_c_try_compile "$LINENO"; then :
15422 bash_cv_type_wctype_t=yes
cce855bc 15423else
ac50fbac 15424 bash_cv_type_wctype_t=no
cce855bc 15425fi
3185942a 15426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cce855bc 15427fi
ac50fbac
CR
15428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5
15429$as_echo "$bash_cv_type_wctype_t" >&6; }
15430if test $bash_cv_type_wctype_t = yes; then
f73dda09 15431
ac50fbac 15432$as_echo "#define HAVE_WCTYPE_T 1" >>confdefs.h
cce855bc
JA
15433
15434fi
15435
ac50fbac
CR
15436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5
15437$as_echo_n "checking for wint_t in wctype.h... " >&6; }
15438if ${bash_cv_type_wint_t+:} false; then :
3185942a 15439 $as_echo_n "(cached) " >&6
cce855bc 15440else
ac50fbac 15441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15442/* end confdefs.h. */
ac50fbac 15443#include <wctype.h>
f73dda09
JA
15444int
15445main ()
15446{
ac50fbac
CR
15447
15448 wint_t foo;
15449 foo = 0;
15450
f73dda09
JA
15451 ;
15452 return 0;
15453}
15454_ACEOF
ac50fbac
CR
15455if ac_fn_c_try_compile "$LINENO"; then :
15456 bash_cv_type_wint_t=yes
3185942a 15457else
ac50fbac
CR
15458 bash_cv_type_wint_t=no
15459fi
15460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15461fi
15462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5
15463$as_echo "$bash_cv_type_wint_t" >&6; }
15464if test $bash_cv_type_wint_t = yes; then
15465
15466$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
15467
15468fi
15469
15470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcwidth broken with unicode combining characters" >&5
15471$as_echo_n "checking for wcwidth broken with unicode combining characters... " >&6; }
15472if ${bash_cv_wcwidth_broken+:} false; then :
15473 $as_echo_n "(cached) " >&6
15474else
15475 if test "$cross_compiling" = yes; then :
15476 bash_cv_wcwidth_broken=no
15477else
15478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15479/* end confdefs.h. */
15480
15481#include <unistd.h>
15482#include <stdlib.h>
15483#include <stdio.h>
15484
15485#include <locale.h>
15486#include <wchar.h>
3185942a 15487
8868edaf 15488int
ac50fbac
CR
15489main(c, v)
15490int c;
15491char **v;
15492{
15493 int w;
3185942a 15494
ac50fbac
CR
15495 setlocale(LC_ALL, "en_US.UTF-8");
15496 w = wcwidth (0x0301);
15497 exit (w == 0); /* exit 0 if wcwidth broken */
15498}
0628567a 15499
ac50fbac
CR
15500_ACEOF
15501if ac_fn_c_try_run "$LINENO"; then :
15502 bash_cv_wcwidth_broken=yes
15503else
a0c0a00f 15504 bash_cv_wcwidth_broken=no
ac50fbac
CR
15505fi
15506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15507 conftest.$ac_objext conftest.beam conftest.$ac_ext
15508fi
3185942a 15509
cce855bc 15510fi
ac50fbac
CR
15511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5
15512$as_echo "$bash_cv_wcwidth_broken" >&6; }
15513if test "$bash_cv_wcwidth_broken" = yes; then
15514
15515$as_echo "#define WCWIDTH_BROKEN 1" >>confdefs.h
3185942a 15516
b72432fd 15517fi
f73dda09 15518
ac50fbac
CR
15519if test "$am_cv_func_iconv" = yes; then
15520 OLDLIBS="$LIBS"
a0c0a00f 15521 LIBS="$LIBS $LIBINTL $LIBICONV"
ac50fbac
CR
15522 for ac_func in locale_charset
15523do :
15524 ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset"
15525if test "x$ac_cv_func_locale_charset" = xyes; then :
15526 cat >>confdefs.h <<_ACEOF
15527#define HAVE_LOCALE_CHARSET 1
b80f6443 15528_ACEOF
cce855bc 15529
b72432fd 15530fi
ac50fbac 15531done
b72432fd 15532
ac50fbac
CR
15533 LIBS="$OLDLIBS"
15534fi
15535
d233b485
CR
15536# The cast to long int works around a bug in the HP C Compiler
15537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15539# This bug is HP SR number 8606223364.
15540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15541$as_echo_n "checking size of wchar_t... " >&6; }
15542if ${ac_cv_sizeof_wchar_t+:} false; then :
15543 $as_echo_n "(cached) " >&6
15544else
15545 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then :
15546
15547else
15548 if test "$ac_cv_type_wchar_t" = yes; then
15549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15551as_fn_error 77 "cannot compute sizeof (wchar_t)
15552See \`config.log' for more details" "$LINENO" 5; }
15553 else
15554 ac_cv_sizeof_wchar_t=0
15555 fi
15556fi
15557
15558fi
15559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15560$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
15561
15562
15563
15564cat >>confdefs.h <<_ACEOF
15565#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
15566_ACEOF
15567
15568
15569
ac50fbac
CR
15570
15571
15572if test "$opt_static_link" != yes; then
15573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
15574$as_echo_n "checking for dlopen in -ldl... " >&6; }
15575if ${ac_cv_lib_dl_dlopen+:} false; then :
3185942a
JA
15576 $as_echo_n "(cached) " >&6
15577else
ac50fbac
CR
15578 ac_check_lib_save_LIBS=$LIBS
15579LIBS="-ldl $LIBS"
15580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15581/* end confdefs.h. */
ac50fbac
CR
15582
15583/* Override any GCC internal prototype to avoid an error.
15584 Use char because int might match the return type of a GCC
15585 builtin and then its argument prototype would still apply. */
15586#ifdef __cplusplus
15587extern "C"
15588#endif
15589char dlopen ();
f73dda09
JA
15590int
15591main ()
15592{
ac50fbac 15593return dlopen ();
f73dda09
JA
15594 ;
15595 return 0;
15596}
15597_ACEOF
ac50fbac
CR
15598if ac_fn_c_try_link "$LINENO"; then :
15599 ac_cv_lib_dl_dlopen=yes
3185942a 15600else
ac50fbac 15601 ac_cv_lib_dl_dlopen=no
3185942a 15602fi
ac50fbac
CR
15603rm -f core conftest.err conftest.$ac_objext \
15604 conftest$ac_exeext conftest.$ac_ext
15605LIBS=$ac_check_lib_save_LIBS
15606fi
15607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
15608$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
15609if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
15610 cat >>confdefs.h <<_ACEOF
15611#define HAVE_LIBDL 1
15612_ACEOF
3185942a 15613
ac50fbac
CR
15614 LIBS="-ldl $LIBS"
15615
15616fi
0628567a 15617
ac50fbac
CR
15618for ac_func in dlopen dlclose dlsym
15619do :
15620 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15621ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15622if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15623 cat >>confdefs.h <<_ACEOF
15624#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15625_ACEOF
3185942a 15626
cce855bc 15627fi
ac50fbac 15628done
3185942a 15629
cce855bc 15630fi
ac50fbac
CR
15631
15632ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
15633/* NetBSD declares sys_siglist in unistd.h. */
15634#ifdef HAVE_UNISTD_H
15635# include <unistd.h>
15636#endif
15637
15638"
15639if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
15640 ac_have_decl=1
f73dda09 15641else
ac50fbac
CR
15642 ac_have_decl=0
15643fi
f73dda09 15644
b80f6443 15645cat >>confdefs.h <<_ACEOF
ac50fbac 15646#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
b80f6443 15647_ACEOF
cce855bc 15648
cce855bc 15649
3185942a 15650
ac50fbac 15651if test "$ac_cv_func_inet_aton" != 'yes'; then
3185942a 15652
ac50fbac
CR
15653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
15654$as_echo_n "checking for inet_aton... " >&6; }
15655if ${bash_cv_func_inet_aton+:} false; then :
3185942a 15656 $as_echo_n "(cached) " >&6
cce855bc 15657else
ac50fbac 15658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15659/* end confdefs.h. */
ac50fbac
CR
15660
15661#include <sys/types.h>
15662#include <netinet/in.h>
15663#include <arpa/inet.h>
15664struct in_addr ap;
f73dda09
JA
15665int
15666main ()
15667{
ac50fbac 15668 inet_aton("127.0.0.1", &ap);
f73dda09
JA
15669 ;
15670 return 0;
15671}
15672_ACEOF
ac50fbac
CR
15673if ac_fn_c_try_link "$LINENO"; then :
15674 bash_cv_func_inet_aton=yes
15675else
15676 bash_cv_func_inet_aton=no
15677fi
15678rm -f core conftest.err conftest.$ac_objext \
15679 conftest$ac_exeext conftest.$ac_ext
15680fi
15681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_inet_aton" >&5
15682$as_echo "$bash_cv_func_inet_aton" >&6; }
15683if test $bash_cv_func_inet_aton = yes; then
15684 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15685
15686else
15687 case " $LIBOBJS " in
15688 *" inet_aton.$ac_objext "* ) ;;
15689 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15690 ;;
3185942a 15691esac
ac50fbac
CR
15692
15693fi
15694
15695fi
15696
15697case "$host_os" in
15698irix4*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent in -lsun" >&5
15699$as_echo_n "checking for getpwent in -lsun... " >&6; }
15700if ${ac_cv_lib_sun_getpwent+:} false; then :
15701 $as_echo_n "(cached) " >&6
15702else
15703 ac_check_lib_save_LIBS=$LIBS
15704LIBS="-lsun $LIBS"
15705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15706/* end confdefs.h. */
ac50fbac
CR
15707
15708/* Override any GCC internal prototype to avoid an error.
15709 Use char because int might match the return type of a GCC
15710 builtin and then its argument prototype would still apply. */
15711#ifdef __cplusplus
15712extern "C"
15713#endif
15714char getpwent ();
f73dda09
JA
15715int
15716main ()
15717{
ac50fbac 15718return getpwent ();
f73dda09
JA
15719 ;
15720 return 0;
15721}
15722_ACEOF
ac50fbac
CR
15723if ac_fn_c_try_link "$LINENO"; then :
15724 ac_cv_lib_sun_getpwent=yes
3185942a 15725else
ac50fbac 15726 ac_cv_lib_sun_getpwent=no
3185942a 15727fi
ac50fbac
CR
15728rm -f core conftest.err conftest.$ac_objext \
15729 conftest$ac_exeext conftest.$ac_ext
15730LIBS=$ac_check_lib_save_LIBS
b72432fd 15731fi
ac50fbac
CR
15732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwent" >&5
15733$as_echo "$ac_cv_lib_sun_getpwent" >&6; }
15734if test "x$ac_cv_lib_sun_getpwent" = xyes; then :
15735 cat >>confdefs.h <<_ACEOF
15736#define HAVE_LIBSUN 1
15737_ACEOF
15738
15739 LIBS="-lsun $LIBS"
3185942a 15740
cce855bc 15741fi
ac50fbac
CR
15742 ;;
15743esac
f73dda09 15744
ac50fbac 15745if test "$ac_cv_func_getpeername" = no; then
cce855bc 15746
ac50fbac
CR
15747if test "X$bash_cv_have_socklib" = "X"; then
15748_bash_needmsg=
15749else
15750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket library" >&5
15751$as_echo_n "checking for socket library... " >&6; }
15752_bash_needmsg=yes
cce855bc 15753fi
ac50fbac 15754if ${bash_cv_have_socklib+:} false; then :
3185942a 15755 $as_echo_n "(cached) " >&6
cce855bc 15756else
ac50fbac
CR
15757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpeername in -lsocket" >&5
15758$as_echo_n "checking for getpeername in -lsocket... " >&6; }
15759if ${ac_cv_lib_socket_getpeername+:} false; then :
15760 $as_echo_n "(cached) " >&6
15761else
15762 ac_check_lib_save_LIBS=$LIBS
15763LIBS="-lsocket -lnsl $LIBS"
15764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15765/* end confdefs.h. */
ac50fbac
CR
15766
15767/* Override any GCC internal prototype to avoid an error.
15768 Use char because int might match the return type of a GCC
15769 builtin and then its argument prototype would still apply. */
15770#ifdef __cplusplus
15771extern "C"
15772#endif
15773char getpeername ();
f73dda09
JA
15774int
15775main ()
15776{
ac50fbac 15777return getpeername ();
f73dda09
JA
15778 ;
15779 return 0;
15780}
15781_ACEOF
ac50fbac
CR
15782if ac_fn_c_try_link "$LINENO"; then :
15783 ac_cv_lib_socket_getpeername=yes
15784else
15785 ac_cv_lib_socket_getpeername=no
15786fi
15787rm -f core conftest.err conftest.$ac_objext \
15788 conftest$ac_exeext conftest.$ac_ext
15789LIBS=$ac_check_lib_save_LIBS
15790fi
15791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getpeername" >&5
15792$as_echo "$ac_cv_lib_socket_getpeername" >&6; }
15793if test "x$ac_cv_lib_socket_getpeername" = xyes; then :
15794 bash_cv_have_socklib=yes
15795else
15796 bash_cv_have_socklib=no
15797fi
15798
15799fi
15800
15801if test "X$_bash_needmsg" = Xyes; then
15802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_socklib" >&5
15803$as_echo "$bash_cv_have_socklib" >&6; }
15804 _bash_needmsg=
15805fi
15806if test $bash_cv_have_socklib = yes; then
15807 # check for libnsl, add it to LIBS if present
15808 if test "X$bash_cv_have_libnsl" = "X"; then
15809 _bash_needmsg=
15810 else
15811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5
15812$as_echo_n "checking for libnsl... " >&6; }
15813 _bash_needmsg=yes
15814 fi
15815 if ${bash_cv_have_libnsl+:} false; then :
15816 $as_echo_n "(cached) " >&6
15817else
15818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
15819$as_echo_n "checking for t_open in -lnsl... " >&6; }
15820if ${ac_cv_lib_nsl_t_open+:} false; then :
15821 $as_echo_n "(cached) " >&6
15822else
15823 ac_check_lib_save_LIBS=$LIBS
15824LIBS="-lnsl $LIBS"
15825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 15826/* end confdefs.h. */
ac50fbac
CR
15827
15828/* Override any GCC internal prototype to avoid an error.
15829 Use char because int might match the return type of a GCC
15830 builtin and then its argument prototype would still apply. */
15831#ifdef __cplusplus
15832extern "C"
15833#endif
15834char t_open ();
3185942a
JA
15835int
15836main ()
15837{
ac50fbac 15838return t_open ();
3185942a
JA
15839 ;
15840 return 0;
15841}
15842_ACEOF
ac50fbac
CR
15843if ac_fn_c_try_link "$LINENO"; then :
15844 ac_cv_lib_nsl_t_open=yes
3185942a 15845else
ac50fbac 15846 ac_cv_lib_nsl_t_open=no
3185942a 15847fi
ac50fbac
CR
15848rm -f core conftest.err conftest.$ac_objext \
15849 conftest$ac_exeext conftest.$ac_ext
15850LIBS=$ac_check_lib_save_LIBS
15851fi
15852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
15853$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
15854if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
15855 bash_cv_have_libnsl=yes
3185942a 15856else
ac50fbac 15857 bash_cv_have_libnsl=no
3185942a
JA
15858fi
15859
3185942a 15860fi
3185942a 15861
ac50fbac
CR
15862 if test "X$_bash_needmsg" = Xyes; then
15863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_libnsl" >&5
15864$as_echo "$bash_cv_have_libnsl" >&6; }
15865 _bash_needmsg=
15866 fi
15867 if test $bash_cv_have_libnsl = yes; then
15868 LIBS="-lsocket -lnsl $LIBS"
15869 else
15870 LIBS="-lsocket $LIBS"
15871 fi
15872 $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
15873
15874 $as_echo "#define HAVE_GETPEERNAME 1" >>confdefs.h
3185942a
JA
15875
15876fi
15877
ac50fbac
CR
15878fi
15879if test "$ac_cv_func_gethostbyname" = no; then
15880 if test "X$bash_cv_have_gethostbyname" = "X"; then
15881_bash_needmsg=yes
3185942a 15882else
ac50fbac
CR
15883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5
15884$as_echo_n "checking for gethostbyname in socket library... " >&6; }
15885_bash_needmsg=
15886fi
15887if ${bash_cv_have_gethostbyname+:} false; then :
3185942a
JA
15888 $as_echo_n "(cached) " >&6
15889else
ac50fbac 15890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 15891/* end confdefs.h. */
ac50fbac 15892#include <netdb.h>
3185942a
JA
15893int
15894main ()
15895{
ac50fbac
CR
15896 struct hostent *hp;
15897 hp = gethostbyname("localhost");
15898
3185942a
JA
15899 ;
15900 return 0;
15901}
15902_ACEOF
ac50fbac
CR
15903if ac_fn_c_try_link "$LINENO"; then :
15904 bash_cv_have_gethostbyname=yes
3185942a 15905else
ac50fbac 15906 bash_cv_have_gethostbyname=no
3185942a 15907fi
ac50fbac
CR
15908rm -f core conftest.err conftest.$ac_objext \
15909 conftest$ac_exeext conftest.$ac_ext
3185942a 15910
ac50fbac 15911fi
3185942a 15912
ac50fbac
CR
15913if test "X$_bash_needmsg" = Xyes; then
15914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5
15915$as_echo_n "checking for gethostbyname in socket library... " >&6; }
15916fi
15917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_gethostbyname" >&5
15918$as_echo "$bash_cv_have_gethostbyname" >&6; }
15919if test "$bash_cv_have_gethostbyname" = yes; then
15920$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
3185942a
JA
15921
15922fi
15923
3185942a 15924fi
ac50fbac 15925
ac50fbac
CR
15926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
15927$as_echo_n "checking type of array argument to getgroups... " >&6; }
15928if ${ac_cv_type_getgroups+:} false; then :
3185942a
JA
15929 $as_echo_n "(cached) " >&6
15930else
ac50fbac
CR
15931 if test "$cross_compiling" = yes; then :
15932 ac_cv_type_getgroups=cross
15933else
15934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 15935/* end confdefs.h. */
ac50fbac 15936/* Thanks to Mike Rendell for this test. */
3185942a 15937$ac_includes_default
ac50fbac
CR
15938#define NGID 256
15939#undef MAX
15940#define MAX(x, y) ((x) > (y) ? (x) : (y))
15941
3185942a
JA
15942int
15943main ()
15944{
ac50fbac
CR
15945 gid_t gidset[NGID];
15946 int i, n;
15947 union { gid_t gval; long int lval; } val;
15948
15949 val.lval = -1;
15950 for (i = 0; i < NGID; i++)
15951 gidset[i] = val.gval;
15952 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
15953 gidset);
15954 /* Exit non-zero if getgroups seems to require an array of ints. This
15955 happens when gid_t is short int but getgroups modifies an array
15956 of ints. */
15957 return n > 0 && gidset[n] != val.gval;
3185942a
JA
15958}
15959_ACEOF
ac50fbac
CR
15960if ac_fn_c_try_run "$LINENO"; then :
15961 ac_cv_type_getgroups=gid_t
15962else
15963 ac_cv_type_getgroups=int
15964fi
15965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15966 conftest.$ac_objext conftest.beam conftest.$ac_ext
15967fi
15968
15969if test $ac_cv_type_getgroups = cross; then
15970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 15971/* end confdefs.h. */
ac50fbac
CR
15972#include <unistd.h>
15973
3185942a 15974_ACEOF
ac50fbac
CR
15975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15976 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
15977 ac_cv_type_getgroups=gid_t
3185942a 15978else
ac50fbac
CR
15979 ac_cv_type_getgroups=int
15980fi
15981rm -f conftest*
3185942a 15982
3185942a 15983fi
ac50fbac
CR
15984fi
15985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
15986$as_echo "$ac_cv_type_getgroups" >&6; }
15987
15988cat >>confdefs.h <<_ACEOF
15989#define GETGROUPS_T $ac_cv_type_getgroups
15990_ACEOF
15991
15992
15993ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
15994if test "x$ac_cv_type_off_t" = xyes; then :
3185942a 15995
3185942a 15996else
3185942a 15997
ac50fbac
CR
15998cat >>confdefs.h <<_ACEOF
15999#define off_t long int
16000_ACEOF
3185942a
JA
16001
16002fi
16003
ac50fbac
CR
16004ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
16005if test "x$ac_cv_type_mode_t" = xyes; then :
16006
3185942a
JA
16007else
16008
16009cat >>confdefs.h <<_ACEOF
ac50fbac 16010#define mode_t int
3185942a
JA
16011_ACEOF
16012
16013fi
16014
ac50fbac
CR
16015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16016$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
16017if ${ac_cv_type_uid_t+:} false; then :
3185942a
JA
16018 $as_echo_n "(cached) " >&6
16019else
ac50fbac 16020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 16021/* end confdefs.h. */
ac50fbac
CR
16022#include <sys/types.h>
16023
3185942a 16024_ACEOF
ac50fbac
CR
16025if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16026 $EGREP "uid_t" >/dev/null 2>&1; then :
16027 ac_cv_type_uid_t=yes
3185942a 16028else
ac50fbac 16029 ac_cv_type_uid_t=no
3185942a 16030fi
ac50fbac 16031rm -f conftest*
3185942a 16032
ac50fbac
CR
16033fi
16034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16035$as_echo "$ac_cv_type_uid_t" >&6; }
16036if test $ac_cv_type_uid_t = no; then
3185942a 16037
ac50fbac 16038$as_echo "#define uid_t int" >>confdefs.h
3185942a 16039
3185942a 16040
ac50fbac
CR
16041$as_echo "#define gid_t int" >>confdefs.h
16042
3185942a 16043fi
ac50fbac
CR
16044
16045ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
16046if test "x$ac_cv_type_pid_t" = xyes; then :
16047
3185942a
JA
16048else
16049
16050cat >>confdefs.h <<_ACEOF
ac50fbac 16051#define pid_t int
3185942a
JA
16052_ACEOF
16053
16054fi
16055
ac50fbac
CR
16056ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16057if test "x$ac_cv_type_size_t" = xyes; then :
16058
3185942a 16059else
ac50fbac
CR
16060
16061cat >>confdefs.h <<_ACEOF
16062#define size_t unsigned int
3185942a 16063_ACEOF
3185942a 16064
3185942a
JA
16065fi
16066
a0c0a00f
CR
16067
16068 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
16069if test "x$ac_cv_type_uintptr_t" = xyes; then :
16070
16071$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
16072
16073else
16074 for ac_type in 'unsigned int' 'unsigned long int' \
16075 'unsigned long long int'; do
16076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16077/* end confdefs.h. */
16078$ac_includes_default
16079int
16080main ()
16081{
16082static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
16083test_array [0] = 0;
16084return test_array [0];
16085
16086 ;
16087 return 0;
16088}
16089_ACEOF
16090if ac_fn_c_try_compile "$LINENO"; then :
16091
16092cat >>confdefs.h <<_ACEOF
16093#define uintptr_t $ac_type
16094_ACEOF
16095
16096 ac_type=
16097fi
16098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16099 test -z "$ac_type" && break
16100 done
16101fi
16102
16103
16104
ac50fbac
CR
16105ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
16106if test "x$ac_cv_type_ssize_t" = xyes; then :
16107
3185942a 16108else
3185942a 16109
ac50fbac
CR
16110cat >>confdefs.h <<_ACEOF
16111#define ssize_t int
16112_ACEOF
3185942a
JA
16113
16114fi
16115
ac50fbac
CR
16116ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default"
16117if test "x$ac_cv_type_time_t" = xyes; then :
16118
3185942a
JA
16119else
16120
16121cat >>confdefs.h <<_ACEOF
ac50fbac 16122#define time_t long
3185942a
JA
16123_ACEOF
16124
16125fi
16126
3185942a
JA
16127
16128
ac50fbac
CR
16129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5
16130$as_echo_n "checking for long long... " >&6; }
16131if ${bash_cv_type_long_long+:} false; then :
3185942a
JA
16132 $as_echo_n "(cached) " >&6
16133else
ac50fbac 16134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 16135/* end confdefs.h. */
ac50fbac
CR
16136
16137long long ll = 1; int i = 63;
3185942a
JA
16138int
16139main ()
16140{
ac50fbac
CR
16141
16142long long llm = (long long) -1;
16143return ll << i | ll >> i | llm / ll | llm % ll;
16144
3185942a
JA
16145 ;
16146 return 0;
16147}
16148_ACEOF
ac50fbac
CR
16149if ac_fn_c_try_link "$LINENO"; then :
16150 bash_cv_type_long_long='long long'
16151else
16152 bash_cv_type_long_long='long'
16153fi
16154rm -f core conftest.err conftest.$ac_objext \
16155 conftest$ac_exeext conftest.$ac_ext
16156fi
16157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_long_long" >&5
16158$as_echo "$bash_cv_type_long_long" >&6; }
16159if test "$bash_cv_type_long_long" = 'long long'; then
16160 $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
16161
16162fi
16163
16164
16165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5
16166$as_echo_n "checking for unsigned long long... " >&6; }
16167if ${bash_cv_type_unsigned_long_long+:} false; then :
16168 $as_echo_n "(cached) " >&6
16169else
16170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 16171/* end confdefs.h. */
ac50fbac
CR
16172
16173unsigned long long ull = 1; int i = 63;
3185942a
JA
16174int
16175main ()
16176{
ac50fbac
CR
16177
16178unsigned long long ullmax = (unsigned long long) -1;
16179return ull << i | ull >> i | ullmax / ull | ullmax % ull;
16180
3185942a
JA
16181 ;
16182 return 0;
16183}
16184_ACEOF
ac50fbac
CR
16185if ac_fn_c_try_link "$LINENO"; then :
16186 bash_cv_type_unsigned_long_long='unsigned long long'
3185942a 16187else
ac50fbac 16188 bash_cv_type_unsigned_long_long='unsigned long'
3185942a 16189fi
ac50fbac
CR
16190rm -f core conftest.err conftest.$ac_objext \
16191 conftest$ac_exeext conftest.$ac_ext
3185942a 16192fi
ac50fbac
CR
16193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_unsigned_long_long" >&5
16194$as_echo "$bash_cv_type_unsigned_long_long" >&6; }
16195if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
16196 $as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h
3185942a 16197
3185942a 16198fi
3185942a 16199
cce855bc 16200
ac50fbac
CR
16201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
16202$as_echo_n "checking return type of signal handlers... " >&6; }
16203if ${ac_cv_type_signal+:} false; then :
3185942a 16204 $as_echo_n "(cached) " >&6
cce855bc 16205else
ac50fbac 16206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16207/* end confdefs.h. */
ac50fbac
CR
16208#include <sys/types.h>
16209#include <signal.h>
16210
f73dda09
JA
16211int
16212main ()
16213{
ac50fbac 16214return *(signal (0, 0)) (0) == 1;
3185942a 16215 ;
f73dda09 16216 return 0;
3185942a
JA
16217}
16218_ACEOF
ac50fbac
CR
16219if ac_fn_c_try_compile "$LINENO"; then :
16220 ac_cv_type_signal=int
16221else
16222 ac_cv_type_signal=void
16223fi
16224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16225fi
16226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
16227$as_echo "$ac_cv_type_signal" >&6; }
16228
16229cat >>confdefs.h <<_ACEOF
16230#define RETSIGTYPE $ac_cv_type_signal
3185942a 16231_ACEOF
ac50fbac
CR
16232
16233
16234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5
16235$as_echo_n "checking for sig_atomic_t in signal.h... " >&6; }
16236if ${ac_cv_have_sig_atomic_t+:} false; then :
16237 $as_echo_n "(cached) " >&6
16238else
16239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 16240/* end confdefs.h. */
ac50fbac
CR
16241
16242#include <signal.h>
16243
3185942a
JA
16244int
16245main ()
16246{
ac50fbac 16247 sig_atomic_t x;
f73dda09
JA
16248 ;
16249 return 0;
16250}
16251_ACEOF
ac50fbac
CR
16252if ac_fn_c_try_link "$LINENO"; then :
16253 ac_cv_have_sig_atomic_t=yes
3185942a 16254else
ac50fbac
CR
16255 ac_cv_have_sig_atomic_t=no
16256fi
16257rm -f core conftest.err conftest.$ac_objext \
16258 conftest$ac_exeext conftest.$ac_ext
3185942a 16259fi
ac50fbac
CR
16260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5
16261$as_echo "$ac_cv_have_sig_atomic_t" >&6; }
16262if test "$ac_cv_have_sig_atomic_t" = "no"
16263then
16264 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default"
16265if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
3185942a 16266
3185942a 16267else
3185942a 16268
ac50fbac
CR
16269cat >>confdefs.h <<_ACEOF
16270#define sig_atomic_t int
16271_ACEOF
3185942a
JA
16272
16273fi
16274
3185942a 16275fi
ac50fbac
CR
16276
16277
16278# The cast to long int works around a bug in the HP C Compiler
16279# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16280# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16281# This bug is HP SR number 8606223364.
16282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
16283$as_echo_n "checking size of char... " >&6; }
16284if ${ac_cv_sizeof_char+:} false; then :
16285 $as_echo_n "(cached) " >&6
3185942a 16286else
ac50fbac 16287 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then :
3185942a 16288
ac50fbac
CR
16289else
16290 if test "$ac_cv_type_char" = yes; then
16291 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16292$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16293as_fn_error 77 "cannot compute sizeof (char)
16294See \`config.log' for more details" "$LINENO" 5; }
16295 else
16296 ac_cv_sizeof_char=0
16297 fi
16298fi
3185942a
JA
16299
16300fi
ac50fbac
CR
16301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
16302$as_echo "$ac_cv_sizeof_char" >&6; }
3185942a 16303
ac50fbac
CR
16304
16305
16306cat >>confdefs.h <<_ACEOF
16307#define SIZEOF_CHAR $ac_cv_sizeof_char
3185942a 16308_ACEOF
ac50fbac
CR
16309
16310
16311# The cast to long int works around a bug in the HP C Compiler
16312# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16313# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16314# This bug is HP SR number 8606223364.
16315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
16316$as_echo_n "checking size of short... " >&6; }
16317if ${ac_cv_sizeof_short+:} false; then :
16318 $as_echo_n "(cached) " >&6
3185942a 16319else
ac50fbac
CR
16320 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
16321
16322else
16323 if test "$ac_cv_type_short" = yes; then
16324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16325$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16326as_fn_error 77 "cannot compute sizeof (short)
16327See \`config.log' for more details" "$LINENO" 5; }
16328 else
16329 ac_cv_sizeof_short=0
16330 fi
16331fi
3185942a 16332
3185942a 16333fi
ac50fbac
CR
16334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
16335$as_echo "$ac_cv_sizeof_short" >&6; }
3185942a 16336
0628567a 16337
3185942a 16338
ac50fbac
CR
16339cat >>confdefs.h <<_ACEOF
16340#define SIZEOF_SHORT $ac_cv_sizeof_short
16341_ACEOF
16342
16343
16344# The cast to long int works around a bug in the HP C Compiler
16345# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16346# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16347# This bug is HP SR number 8606223364.
16348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
16349$as_echo_n "checking size of int... " >&6; }
16350if ${ac_cv_sizeof_int+:} false; then :
16351 $as_echo_n "(cached) " >&6
16352else
16353 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
16354
16355else
16356 if test "$ac_cv_type_int" = yes; then
16357 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16358$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16359as_fn_error 77 "cannot compute sizeof (int)
16360See \`config.log' for more details" "$LINENO" 5; }
16361 else
16362 ac_cv_sizeof_int=0
16363 fi
b72432fd 16364fi
3185942a 16365
b72432fd 16366fi
ac50fbac
CR
16367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
16368$as_echo "$ac_cv_sizeof_int" >&6; }
16369
16370
f73dda09 16371
b80f6443 16372cat >>confdefs.h <<_ACEOF
ac50fbac 16373#define SIZEOF_INT $ac_cv_sizeof_int
b80f6443 16374_ACEOF
b72432fd 16375
ac50fbac
CR
16376
16377# The cast to long int works around a bug in the HP C Compiler
16378# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16379# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16380# This bug is HP SR number 8606223364.
16381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16382$as_echo_n "checking size of long... " >&6; }
16383if ${ac_cv_sizeof_long+:} false; then :
16384 $as_echo_n "(cached) " >&6
16385else
16386 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16387
16388else
16389 if test "$ac_cv_type_long" = yes; then
16390 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16392as_fn_error 77 "cannot compute sizeof (long)
16393See \`config.log' for more details" "$LINENO" 5; }
16394 else
16395 ac_cv_sizeof_long=0
16396 fi
b72432fd 16397fi
cce855bc 16398
b72432fd 16399fi
ac50fbac
CR
16400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16401$as_echo "$ac_cv_sizeof_long" >&6; }
b72432fd 16402
b80f6443 16403
ac50fbac
CR
16404
16405cat >>confdefs.h <<_ACEOF
16406#define SIZEOF_LONG $ac_cv_sizeof_long
16407_ACEOF
16408
16409
16410# The cast to long int works around a bug in the HP C Compiler
16411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16413# This bug is HP SR number 8606223364.
16414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
16415$as_echo_n "checking size of char *... " >&6; }
16416if ${ac_cv_sizeof_char_p+:} false; then :
3185942a
JA
16417 $as_echo_n "(cached) " >&6
16418else
ac50fbac
CR
16419 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then :
16420
3185942a 16421else
ac50fbac
CR
16422 if test "$ac_cv_type_char_p" = yes; then
16423 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16425as_fn_error 77 "cannot compute sizeof (char *)
16426See \`config.log' for more details" "$LINENO" 5; }
16427 else
16428 ac_cv_sizeof_char_p=0
16429 fi
16430fi
3185942a 16431
3185942a 16432fi
ac50fbac
CR
16433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
16434$as_echo "$ac_cv_sizeof_char_p" >&6; }
3185942a 16435
3185942a
JA
16436
16437
ac50fbac
CR
16438cat >>confdefs.h <<_ACEOF
16439#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
16440_ACEOF
16441
16442
16443# The cast to long int works around a bug in the HP C Compiler
16444# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16445# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16446# This bug is HP SR number 8606223364.
16447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
16448$as_echo_n "checking size of double... " >&6; }
16449if ${ac_cv_sizeof_double+:} false; then :
16450 $as_echo_n "(cached) " >&6
16451else
16452 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
16453
16454else
16455 if test "$ac_cv_type_double" = yes; then
16456 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16458as_fn_error 77 "cannot compute sizeof (double)
16459See \`config.log' for more details" "$LINENO" 5; }
16460 else
16461 ac_cv_sizeof_double=0
16462 fi
3185942a
JA
16463fi
16464
3185942a 16465fi
ac50fbac
CR
16466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
16467$as_echo "$ac_cv_sizeof_double" >&6; }
16468
16469
3185942a
JA
16470
16471cat >>confdefs.h <<_ACEOF
ac50fbac 16472#define SIZEOF_DOUBLE $ac_cv_sizeof_double
3185942a
JA
16473_ACEOF
16474
3185942a 16475
ac50fbac
CR
16476# The cast to long int works around a bug in the HP C Compiler
16477# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16478# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16479# This bug is HP SR number 8606223364.
16480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
16481$as_echo_n "checking size of long long... " >&6; }
16482if ${ac_cv_sizeof_long_long+:} false; then :
3185942a
JA
16483 $as_echo_n "(cached) " >&6
16484else
ac50fbac
CR
16485 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
16486
3185942a 16487else
ac50fbac
CR
16488 if test "$ac_cv_type_long_long" = yes; then
16489 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16491as_fn_error 77 "cannot compute sizeof (long long)
16492See \`config.log' for more details" "$LINENO" 5; }
16493 else
16494 ac_cv_sizeof_long_long=0
16495 fi
16496fi
3185942a 16497
3185942a 16498fi
ac50fbac
CR
16499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
16500$as_echo "$ac_cv_sizeof_long_long" >&6; }
3185942a 16501
3185942a
JA
16502
16503
ac50fbac
CR
16504cat >>confdefs.h <<_ACEOF
16505#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
16506_ACEOF
16507
16508
16509
16510ac_fn_c_check_type "$LINENO" "u_int" "ac_cv_type_u_int" "$ac_includes_default"
16511if test "x$ac_cv_type_u_int" = xyes; then :
3185942a 16512
3185942a
JA
16513else
16514
16515cat >>confdefs.h <<_ACEOF
ac50fbac 16516#define u_int unsigned int
3185942a
JA
16517_ACEOF
16518
16519fi
16520
ac50fbac
CR
16521ac_fn_c_check_type "$LINENO" "u_long" "ac_cv_type_u_long" "$ac_includes_default"
16522if test "x$ac_cv_type_u_long" = xyes; then :
16523
cce855bc 16524else
ac50fbac
CR
16525
16526cat >>confdefs.h <<_ACEOF
16527#define u_long unsigned long
f73dda09 16528_ACEOF
3185942a 16529
ac50fbac
CR
16530fi
16531
16532
16533
16534if test "$ac_cv_sizeof_short" = 2; then
16535 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
16536if test "x$ac_cv_type_bits16_t" = xyes; then :
3185942a 16537
b72432fd 16538else
0628567a 16539
ac50fbac
CR
16540cat >>confdefs.h <<_ACEOF
16541#define bits16_t short
16542_ACEOF
3185942a 16543
b72432fd 16544fi
3185942a 16545
ac50fbac
CR
16546elif test "$ac_cv_sizeof_char" = 2; then
16547 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
16548if test "x$ac_cv_type_bits16_t" = xyes; then :
16549
f73dda09
JA
16550else
16551
b80f6443 16552cat >>confdefs.h <<_ACEOF
ac50fbac 16553#define bits16_t char
b80f6443 16554_ACEOF
b72432fd
JA
16555
16556fi
16557
b72432fd 16558else
ac50fbac
CR
16559 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
16560if test "x$ac_cv_type_bits16_t" = xyes; then :
16561
3185942a 16562else
3185942a 16563
ac50fbac
CR
16564cat >>confdefs.h <<_ACEOF
16565#define bits16_t short
16566_ACEOF
16567
3185942a
JA
16568fi
16569
ac50fbac
CR
16570fi
16571
16572
16573if test "$ac_cv_sizeof_short" = 2; then
16574 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
16575if test "x$ac_cv_type_u_bits16_t" = xyes; then :
16576
b72432fd 16577else
0628567a 16578
ac50fbac
CR
16579cat >>confdefs.h <<_ACEOF
16580#define u_bits16_t unsigned short
16581_ACEOF
3185942a 16582
f73dda09 16583fi
3185942a 16584
ac50fbac
CR
16585elif test "$ac_cv_sizeof_char" = 2; then
16586 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
16587if test "x$ac_cv_type_u_bits16_t" = xyes; then :
16588
f73dda09
JA
16589else
16590
b80f6443 16591cat >>confdefs.h <<_ACEOF
ac50fbac 16592#define u_bits16_t unsigned char
b80f6443 16593_ACEOF
f73dda09 16594
cce855bc 16595fi
b72432fd 16596
3185942a 16597else
ac50fbac
CR
16598 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
16599if test "x$ac_cv_type_u_bits16_t" = xyes; then :
16600
f73dda09 16601else
ac50fbac
CR
16602
16603cat >>confdefs.h <<_ACEOF
16604#define u_bits16_t unsigned short
f73dda09 16605_ACEOF
3185942a 16606
3185942a
JA
16607fi
16608
ac50fbac
CR
16609fi
16610
16611
16612if test "$ac_cv_sizeof_int" = 4; then
16613 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
16614if test "x$ac_cv_type_bits32_t" = xyes; then :
16615
b72432fd 16616else
0628567a 16617
ac50fbac
CR
16618cat >>confdefs.h <<_ACEOF
16619#define bits32_t int
16620_ACEOF
3185942a 16621
b72432fd 16622fi
3185942a 16623
ac50fbac
CR
16624elif test "$ac_cv_sizeof_long" = 4; then
16625 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
16626if test "x$ac_cv_type_bits32_t" = xyes; then :
16627
16628else
16629
16630cat >>confdefs.h <<_ACEOF
16631#define bits32_t long
16632_ACEOF
16633
b72432fd 16634fi
ac50fbac
CR
16635
16636else
16637 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
16638if test "x$ac_cv_type_bits32_t" = xyes; then :
16639
f73dda09
JA
16640else
16641
b80f6443 16642cat >>confdefs.h <<_ACEOF
ac50fbac 16643#define bits32_t int
b80f6443 16644_ACEOF
cce855bc
JA
16645
16646fi
16647
16648fi
16649
b80f6443 16650
ac50fbac
CR
16651if test "$ac_cv_sizeof_int" = 4; then
16652 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
16653if test "x$ac_cv_type_u_bits32_t" = xyes; then :
b80f6443 16654
bb70624e 16655else
ac50fbac
CR
16656
16657cat >>confdefs.h <<_ACEOF
16658#define u_bits32_t unsigned int
3185942a 16659_ACEOF
3185942a 16660
3185942a
JA
16661fi
16662
ac50fbac
CR
16663elif test "$ac_cv_sizeof_long" = 4; then
16664 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
16665if test "x$ac_cv_type_u_bits32_t" = xyes; then :
16666
bb70624e 16667else
0628567a 16668
ac50fbac
CR
16669cat >>confdefs.h <<_ACEOF
16670#define u_bits32_t unsigned long
16671_ACEOF
3185942a 16672
bb70624e 16673fi
3185942a 16674
ac50fbac
CR
16675else
16676 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
16677if test "x$ac_cv_type_u_bits32_t" = xyes; then :
16678
f73dda09
JA
16679else
16680
b80f6443 16681cat >>confdefs.h <<_ACEOF
ac50fbac 16682#define u_bits32_t unsigned int
b80f6443 16683_ACEOF
bb70624e
JA
16684
16685fi
16686
ac50fbac
CR
16687fi
16688
16689
16690if test "$ac_cv_sizeof_char_p" = 8; then
16691 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
16692if test "x$ac_cv_type_bits64_t" = xyes; then :
16693
bb70624e 16694else
ac50fbac
CR
16695
16696cat >>confdefs.h <<_ACEOF
16697#define bits64_t char *
3185942a 16698_ACEOF
3185942a 16699
3185942a
JA
16700fi
16701
ac50fbac
CR
16702elif test "$ac_cv_sizeof_double" = 8; then
16703 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
16704if test "x$ac_cv_type_bits64_t" = xyes; then :
16705
bb70624e 16706else
0628567a 16707
ac50fbac
CR
16708cat >>confdefs.h <<_ACEOF
16709#define bits64_t double
16710_ACEOF
3185942a 16711
bb70624e 16712fi
3185942a 16713
ac50fbac
CR
16714elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
16715 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
16716if test "x$ac_cv_type_bits64_t" = xyes; then :
16717
f73dda09
JA
16718else
16719
b80f6443 16720cat >>confdefs.h <<_ACEOF
ac50fbac 16721#define bits64_t long long
b80f6443 16722_ACEOF
bb70624e
JA
16723
16724fi
16725
ac50fbac
CR
16726elif test "$ac_cv_sizeof_long" = 8; then
16727 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
16728if test "x$ac_cv_type_bits64_t" = xyes; then :
16729
bb70624e 16730else
ac50fbac
CR
16731
16732cat >>confdefs.h <<_ACEOF
16733#define bits64_t long
3185942a 16734_ACEOF
3185942a 16735
3185942a
JA
16736fi
16737
bb70624e 16738else
ac50fbac
CR
16739 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
16740if test "x$ac_cv_type_bits64_t" = xyes; then :
16741
16742else
0628567a 16743
ac50fbac
CR
16744cat >>confdefs.h <<_ACEOF
16745#define bits64_t double
16746_ACEOF
3185942a 16747
f73dda09 16748fi
3185942a 16749
f73dda09 16750fi
ac50fbac
CR
16751
16752
16753
16754if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
16755 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
16756if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
16757
f73dda09
JA
16758else
16759
b80f6443 16760cat >>confdefs.h <<_ACEOF
ac50fbac 16761#define ptrdiff_t int
b80f6443 16762_ACEOF
f73dda09 16763
bb70624e 16764fi
bb70624e 16765
ac50fbac
CR
16766elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
16767 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
16768if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
16769
f73dda09 16770else
ac50fbac
CR
16771
16772cat >>confdefs.h <<_ACEOF
16773#define ptrdiff_t long
3185942a 16774_ACEOF
3185942a 16775
3185942a
JA
16776fi
16777
ac50fbac
CR
16778elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
16779 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
16780if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
16781
f73dda09 16782else
0628567a 16783
ac50fbac
CR
16784cat >>confdefs.h <<_ACEOF
16785#define ptrdiff_t long long
16786_ACEOF
3185942a 16787
bb70624e 16788fi
3185942a 16789
ac50fbac
CR
16790else
16791 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
16792if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
16793
f73dda09
JA
16794else
16795
b80f6443 16796cat >>confdefs.h <<_ACEOF
bb70624e 16797#define ptrdiff_t int
b80f6443 16798_ACEOF
bb70624e
JA
16799
16800fi
16801
16802fi
16803
b80f6443 16804
ac50fbac 16805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
3185942a 16806$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
ac50fbac 16807if ${ac_cv_header_stat_broken+:} false; then :
3185942a 16808 $as_echo_n "(cached) " >&6
ccc6cda3 16809else
ac50fbac 16810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16811/* end confdefs.h. */
ccc6cda3
JA
16812#include <sys/types.h>
16813#include <sys/stat.h>
16814
3185942a
JA
16815#if defined S_ISBLK && defined S_IFDIR
16816extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
ccc6cda3
JA
16817#endif
16818
3185942a
JA
16819#if defined S_ISBLK && defined S_IFCHR
16820extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
ccc6cda3
JA
16821#endif
16822
3185942a
JA
16823#if defined S_ISLNK && defined S_IFREG
16824extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
ccc6cda3
JA
16825#endif
16826
3185942a
JA
16827#if defined S_ISSOCK && defined S_IFREG
16828extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
f73dda09
JA
16829#endif
16830
16831_ACEOF
ac50fbac 16832if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 16833 ac_cv_header_stat_broken=no
3185942a 16834else
ac50fbac 16835 ac_cv_header_stat_broken=yes
ccc6cda3 16836fi
3185942a 16837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 16838fi
ac50fbac 16839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
3185942a 16840$as_echo "$ac_cv_header_stat_broken" >&6; }
f73dda09 16841if test $ac_cv_header_stat_broken = yes; then
ccc6cda3 16842
ac50fbac 16843$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
ccc6cda3
JA
16844
16845fi
16846
b80f6443 16847
ac50fbac 16848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5
3185942a 16849$as_echo_n "checking whether #! works in shell scripts... " >&6; }
ac50fbac 16850if ${ac_cv_sys_interpreter+:} false; then :
3185942a 16851 $as_echo_n "(cached) " >&6
ccc6cda3
JA
16852else
16853 echo '#! /bin/cat
16854exit 69
f73dda09 16855' >conftest
ccc6cda3 16856chmod u+x conftest
3185942a 16857(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
ccc6cda3
JA
16858if test $? -ne 69; then
16859 ac_cv_sys_interpreter=yes
16860else
16861 ac_cv_sys_interpreter=no
16862fi
16863rm -f conftest
16864fi
ac50fbac 16865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5
3185942a 16866$as_echo "$ac_cv_sys_interpreter" >&6; }
f73dda09 16867interpval=$ac_cv_sys_interpreter
ccc6cda3
JA
16868
16869if test $ac_cv_sys_interpreter = yes; then
ac50fbac 16870$as_echo "#define HAVE_HASH_BANG_EXEC 1" >>confdefs.h
ccc6cda3 16871
ccc6cda3
JA
16872fi
16873
ccc6cda3 16874if test "$ac_cv_func_lstat" = "no"; then
ac50fbac 16875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5
3185942a 16876$as_echo_n "checking for lstat... " >&6; }
ac50fbac 16877if ${bash_cv_func_lstat+:} false; then :
3185942a 16878 $as_echo_n "(cached) " >&6
ccc6cda3 16879else
ac50fbac 16880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16881/* end confdefs.h. */
ccc6cda3
JA
16882
16883#include <sys/types.h>
16884#include <sys/stat.h>
16885
f73dda09
JA
16886int
16887main ()
16888{
16889 lstat(".",(struct stat *)0);
16890 ;
16891 return 0;
16892}
16893_ACEOF
ac50fbac 16894if ac_fn_c_try_link "$LINENO"; then :
ccc6cda3
JA
16895 bash_cv_func_lstat=yes
16896else
ac50fbac 16897 bash_cv_func_lstat=no
ccc6cda3 16898fi
ac50fbac
CR
16899rm -f core conftest.err conftest.$ac_objext \
16900 conftest$ac_exeext conftest.$ac_ext
ccc6cda3 16901fi
ac50fbac 16902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5
3185942a 16903$as_echo "$bash_cv_func_lstat" >&6; }
ccc6cda3 16904if test $bash_cv_func_lstat = yes; then
ac50fbac 16905 $as_echo "#define HAVE_LSTAT 1" >>confdefs.h
b80f6443
JA
16906
16907fi
16908
16909fi
16910
16911
ac50fbac 16912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the ctype macros accept non-ascii characters" >&5
3185942a 16913$as_echo_n "checking whether the ctype macros accept non-ascii characters... " >&6; }
ac50fbac 16914if ${bash_cv_func_ctype_nonascii+:} false; then :
3185942a 16915 $as_echo_n "(cached) " >&6
b80f6443 16916else
ac50fbac
CR
16917 if test "$cross_compiling" = yes; then :
16918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5
3185942a 16919$as_echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;}
b80f6443
JA
16920 bash_cv_func_ctype_nonascii=no
16921
16922else
ac50fbac 16923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16924/* end confdefs.h. */
b80f6443
JA
16925
16926#ifdef HAVE_LOCALE_H
16927#include <locale.h>
16928#endif
16929#include <stdio.h>
16930#include <ctype.h>
8868edaf 16931#include <stdlib.h>
b80f6443 16932
8868edaf 16933int
b80f6443
JA
16934main(c, v)
16935int c;
16936char *v[];
16937{
16938 char *deflocale;
16939 unsigned char x;
16940 int r1, r2;
16941
16942#ifdef HAVE_SETLOCALE
16943 /* We take a shot here. If that locale is not known, try the
16944 system default. We try this one because '\342' (226) is
16945 known to be a printable character in that locale. */
16946 deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
16947 if (deflocale == 0)
16948 deflocale = setlocale(LC_ALL, "");
16949#endif
16950
16951 x = '\342';
16952 r1 = isprint(x);
16953 x -= 128;
16954 r2 = isprint(x);
16955 exit (r1 == 0 || r2 == 0);
16956}
16957
16958_ACEOF
ac50fbac 16959if ac_fn_c_try_run "$LINENO"; then :
b80f6443
JA
16960 bash_cv_func_ctype_nonascii=yes
16961else
ac50fbac 16962 bash_cv_func_ctype_nonascii=no
b80f6443 16963fi
ac50fbac
CR
16964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16965 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 16966fi
3185942a 16967
b80f6443
JA
16968fi
16969
ac50fbac 16970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_ctype_nonascii" >&5
3185942a 16971$as_echo "$bash_cv_func_ctype_nonascii" >&6; }
b80f6443 16972if test $bash_cv_func_ctype_nonascii = yes; then
ac50fbac 16973$as_echo "#define CTYPE_NON_ASCII 1" >>confdefs.h
ccc6cda3
JA
16974
16975fi
16976
ac50fbac 16977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5
3185942a 16978$as_echo_n "checking if dup2 fails to clear the close-on-exec flag... " >&6; }
ac50fbac 16979if ${bash_cv_dup2_broken+:} false; then :
3185942a 16980 $as_echo_n "(cached) " >&6
ccc6cda3 16981else
ac50fbac
CR
16982 if test "$cross_compiling" = yes; then :
16983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5
3185942a 16984$as_echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;}
cce855bc 16985 bash_cv_dup2_broken=no
ccc6cda3 16986else
ac50fbac 16987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16988/* end confdefs.h. */
ccc6cda3
JA
16989
16990#include <sys/types.h>
16991#include <fcntl.h>
8868edaf
CR
16992#include <stdlib.h>
16993int
ccc6cda3
JA
16994main()
16995{
16996 int fd1, fd2, fl;
16997 fd1 = open("/dev/null", 2);
16998 if (fcntl(fd1, 2, 1) < 0)
16999 exit(1);
17000 fd2 = dup2(fd1, 1);
17001 if (fd2 < 0)
17002 exit(2);
17003 fl = fcntl(fd2, 1, 0);
17004 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
17005 exit(fl != 1);
17006}
17007
f73dda09 17008_ACEOF
ac50fbac 17009if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
17010 bash_cv_dup2_broken=yes
17011else
ac50fbac 17012 bash_cv_dup2_broken=no
ccc6cda3 17013fi
ac50fbac
CR
17014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17015 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
17016fi
17017
3185942a 17018
ccc6cda3
JA
17019fi
17020
ac50fbac 17021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dup2_broken" >&5
3185942a 17022$as_echo "$bash_cv_dup2_broken" >&6; }
ccc6cda3 17023if test $bash_cv_dup2_broken = yes; then
ac50fbac 17024$as_echo "#define DUP2_BROKEN 1" >>confdefs.h
ccc6cda3
JA
17025
17026fi
17027
b80f6443 17028
ac50fbac 17029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pgrps need synchronization" >&5
3185942a 17030$as_echo_n "checking whether pgrps need synchronization... " >&6; }
ac50fbac 17031if ${bash_cv_pgrp_pipe+:} false; then :
3185942a 17032 $as_echo_n "(cached) " >&6
ccc6cda3 17033else
ac50fbac
CR
17034 if test "$cross_compiling" = yes; then :
17035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5
3185942a 17036$as_echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;}
cce855bc 17037 bash_cv_pgrp_pipe=no
ccc6cda3 17038else
ac50fbac 17039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17040/* end confdefs.h. */
ccc6cda3
JA
17041
17042#ifdef HAVE_UNISTD_H
17043# include <unistd.h>
17044#endif
8868edaf
CR
17045#ifdef HAVE_SYS_WAIT_H
17046# include <sys/wait.h>
17047#endif
17048#include <stdlib.h>
17049int
ccc6cda3
JA
17050main()
17051{
17052# ifdef GETPGRP_VOID
17053# define getpgID() getpgrp()
17054# else
17055# define getpgID() getpgrp(0)
17056# define setpgid(x,y) setpgrp(x,y)
17057# endif
17058 int pid1, pid2, fds[2];
17059 int status;
17060 char ok;
17061
17062 switch (pid1 = fork()) {
17063 case -1:
17064 exit(1);
17065 case 0:
17066 setpgid(0, getpid());
17067 exit(0);
17068 }
17069 setpgid(pid1, pid1);
17070
17071 sleep(2); /* let first child die */
17072
17073 if (pipe(fds) < 0)
17074 exit(2);
17075
17076 switch (pid2 = fork()) {
17077 case -1:
17078 exit(3);
17079 case 0:
17080 setpgid(0, pid1);
17081 ok = getpgID() == pid1;
17082 write(fds[1], &ok, 1);
17083 exit(0);
17084 }
17085 setpgid(pid2, pid1);
17086
17087 close(fds[1]);
17088 if (read(fds[0], &ok, 1) != 1)
17089 exit(4);
17090 wait(&status);
17091 wait(&status);
17092 exit(ok ? 0 : 5);
17093}
17094
f73dda09 17095_ACEOF
ac50fbac 17096if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
17097 bash_cv_pgrp_pipe=no
17098else
ac50fbac 17099 bash_cv_pgrp_pipe=yes
ccc6cda3 17100fi
ac50fbac
CR
17101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17102 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
17103fi
17104
3185942a 17105
ccc6cda3
JA
17106fi
17107
ac50fbac 17108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_pgrp_pipe" >&5
3185942a 17109$as_echo "$bash_cv_pgrp_pipe" >&6; }
ccc6cda3 17110if test $bash_cv_pgrp_pipe = yes; then
ac50fbac 17111$as_echo "#define PGRP_PIPE 1" >>confdefs.h
ccc6cda3
JA
17112
17113fi
17114
b80f6443 17115
ac50fbac 17116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5
3185942a 17117$as_echo_n "checking for type of signal functions... " >&6; }
ac50fbac 17118if ${bash_cv_signal_vintage+:} false; then :
3185942a 17119 $as_echo_n "(cached) " >&6
ccc6cda3 17120else
f73dda09 17121
ac50fbac 17122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17123/* end confdefs.h. */
d166f048 17124#include <signal.h>
f73dda09
JA
17125int
17126main ()
17127{
d166f048
JA
17128
17129 sigset_t ss;
17130 struct sigaction sa;
17131 sigemptyset(&ss); sigsuspend(&ss);
17132 sigaction(SIGINT, &sa, (struct sigaction *) 0);
17133 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
f73dda09
JA
17134
17135 ;
17136 return 0;
17137}
17138_ACEOF
ac50fbac 17139if ac_fn_c_try_link "$LINENO"; then :
d166f048 17140 bash_cv_signal_vintage=posix
ccc6cda3 17141else
0628567a 17142
ac50fbac 17143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17144/* end confdefs.h. */
d166f048 17145#include <signal.h>
f73dda09
JA
17146int
17147main ()
17148{
d166f048
JA
17149
17150 int mask = sigmask(SIGINT);
17151 sigsetmask(mask); sigblock(mask); sigpause(mask);
f73dda09
JA
17152
17153 ;
17154 return 0;
17155}
17156_ACEOF
ac50fbac 17157if ac_fn_c_try_link "$LINENO"; then :
d166f048
JA
17158 bash_cv_signal_vintage=4.2bsd
17159else
f73dda09 17160
ac50fbac 17161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17162/* end confdefs.h. */
d166f048
JA
17163
17164 #include <signal.h>
17165 RETSIGTYPE foo() { }
f73dda09
JA
17166int
17167main ()
17168{
d166f048
JA
17169
17170 int mask = sigmask(SIGINT);
17171 sigset(SIGINT, foo); sigrelse(SIGINT);
ac50fbac
CR
17172 sighold(SIGINT); sigpause(SIGINT);
17173
17174 ;
17175 return 0;
17176}
17177_ACEOF
17178if ac_fn_c_try_link "$LINENO"; then :
d166f048
JA
17179 bash_cv_signal_vintage=svr3
17180else
ac50fbac 17181 bash_cv_signal_vintage=v7
f73dda09 17182
d166f048 17183fi
ac50fbac
CR
17184rm -f core conftest.err conftest.$ac_objext \
17185 conftest$ac_exeext conftest.$ac_ext
f73dda09 17186
d166f048 17187fi
ac50fbac
CR
17188rm -f core conftest.err conftest.$ac_objext \
17189 conftest$ac_exeext conftest.$ac_ext
d166f048
JA
17190
17191fi
ac50fbac
CR
17192rm -f core conftest.err conftest.$ac_objext \
17193 conftest$ac_exeext conftest.$ac_ext
d166f048
JA
17194
17195fi
17196
ac50fbac 17197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5
3185942a 17198$as_echo "$bash_cv_signal_vintage" >&6; }
d166f048 17199if test "$bash_cv_signal_vintage" = posix; then
ac50fbac 17200$as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
d166f048
JA
17201
17202elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
ac50fbac 17203$as_echo "#define HAVE_BSD_SIGNALS 1" >>confdefs.h
d166f048
JA
17204
17205elif test "$bash_cv_signal_vintage" = svr3; then
ac50fbac 17206$as_echo "#define HAVE_USG_SIGHOLD 1" >>confdefs.h
d166f048
JA
17207
17208fi
17209
b80f6443 17210
ac50fbac 17211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_errlist and sys_nerr" >&5
3185942a 17212$as_echo_n "checking for sys_errlist and sys_nerr... " >&6; }
ac50fbac 17213if ${bash_cv_sys_errlist+:} false; then :
3185942a 17214 $as_echo_n "(cached) " >&6
cce855bc 17215else
ac50fbac 17216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17217/* end confdefs.h. */
f73dda09
JA
17218#include <errno.h>
17219int
cce855bc
JA
17220main ()
17221{
d166f048
JA
17222extern char *sys_errlist[];
17223 extern int sys_nerr;
17224 char *msg = sys_errlist[sys_nerr - 1];
f73dda09
JA
17225 ;
17226 return 0;
17227}
17228_ACEOF
ac50fbac 17229if ac_fn_c_try_link "$LINENO"; then :
d166f048
JA
17230 bash_cv_sys_errlist=yes
17231else
ac50fbac 17232 bash_cv_sys_errlist=no
d166f048 17233fi
ac50fbac
CR
17234rm -f core conftest.err conftest.$ac_objext \
17235 conftest$ac_exeext conftest.$ac_ext
d166f048 17236fi
ac50fbac 17237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_errlist" >&5
3185942a 17238$as_echo "$bash_cv_sys_errlist" >&6; }
d166f048 17239if test $bash_cv_sys_errlist = yes; then
ac50fbac 17240$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
d166f048
JA
17241
17242fi
17243
b80f6443 17244
ac50fbac 17245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_siglist in system C library" >&5
3185942a 17246$as_echo_n "checking for sys_siglist in system C library... " >&6; }
ac50fbac 17247if ${bash_cv_sys_siglist+:} false; then :
3185942a 17248 $as_echo_n "(cached) " >&6
ccc6cda3 17249else
ac50fbac
CR
17250 if test "$cross_compiling" = yes; then :
17251 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5
3185942a 17252$as_echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;}
cce855bc 17253 bash_cv_sys_siglist=no
ccc6cda3 17254else
ac50fbac 17255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17256/* end confdefs.h. */
ccc6cda3
JA
17257
17258#include <sys/types.h>
17259#include <signal.h>
17260#ifdef HAVE_UNISTD_H
17261#include <unistd.h>
17262#endif
8868edaf 17263#include <stdlib.h>
3185942a 17264#if !HAVE_DECL_SYS_SIGLIST
ccc6cda3
JA
17265extern char *sys_siglist[];
17266#endif
8868edaf 17267int
ccc6cda3
JA
17268main()
17269{
17270char *msg = sys_siglist[2];
17271exit(msg == 0);
17272}
f73dda09 17273_ACEOF
ac50fbac 17274if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
17275 bash_cv_sys_siglist=yes
17276else
ac50fbac 17277 bash_cv_sys_siglist=no
ccc6cda3 17278fi
ac50fbac
CR
17279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17280 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 17281fi
3185942a 17282
ccc6cda3 17283fi
cce855bc 17284
ac50fbac 17285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_siglist" >&5
3185942a 17286$as_echo "$bash_cv_sys_siglist" >&6; }
ccc6cda3 17287if test $bash_cv_sys_siglist = yes; then
ac50fbac 17288$as_echo "#define HAVE_SYS_SIGLIST 1" >>confdefs.h
ccc6cda3
JA
17289
17290fi
17291
ac50fbac 17292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in signal.h or unistd.h" >&5
3185942a 17293$as_echo_n "checking for _sys_siglist in signal.h or unistd.h... " >&6; }
ac50fbac 17294if ${bash_cv_decl_under_sys_siglist+:} false; then :
3185942a 17295 $as_echo_n "(cached) " >&6
e8ce775d 17296else
ac50fbac 17297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17298/* end confdefs.h. */
e8ce775d
JA
17299
17300#include <sys/types.h>
17301#include <signal.h>
17302#ifdef HAVE_UNISTD_H
17303#include <unistd.h>
17304#endif
f73dda09
JA
17305int
17306main ()
17307{
17308 char *msg = _sys_siglist[2];
17309 ;
17310 return 0;
17311}
17312_ACEOF
ac50fbac 17313if ac_fn_c_try_compile "$LINENO"; then :
e8ce775d
JA
17314 bash_cv_decl_under_sys_siglist=yes
17315else
ac50fbac 17316 bash_cv_decl_under_sys_siglist=no
e8ce775d 17317fi
3185942a 17318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e8ce775d 17319fi
ac50fbac 17320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_under_sys_siglist" >&5
3185942a 17321$as_echo "$bash_cv_decl_under_sys_siglist" >&6; }
e8ce775d 17322if test $bash_cv_decl_under_sys_siglist = yes; then
ac50fbac 17323$as_echo "#define UNDER_SYS_SIGLIST_DECLARED 1" >>confdefs.h
e8ce775d
JA
17324
17325fi
17326
b80f6443 17327
ac50fbac 17328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in system C library" >&5
3185942a 17329$as_echo_n "checking for _sys_siglist in system C library... " >&6; }
ac50fbac 17330if ${bash_cv_under_sys_siglist+:} false; then :
3185942a 17331 $as_echo_n "(cached) " >&6
ccc6cda3 17332else
ac50fbac
CR
17333 if test "$cross_compiling" = yes; then :
17334 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5
3185942a 17335$as_echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;}
cce855bc 17336 bash_cv_under_sys_siglist=no
ccc6cda3 17337else
ac50fbac 17338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17339/* end confdefs.h. */
ccc6cda3
JA
17340
17341#include <sys/types.h>
17342#include <signal.h>
17343#ifdef HAVE_UNISTD_H
17344#include <unistd.h>
17345#endif
8868edaf 17346#include <stdlib.h>
e8ce775d 17347#ifndef UNDER_SYS_SIGLIST_DECLARED
ccc6cda3
JA
17348extern char *_sys_siglist[];
17349#endif
8868edaf 17350int
ccc6cda3
JA
17351main()
17352{
e8ce775d 17353char *msg = (char *)_sys_siglist[2];
ccc6cda3
JA
17354exit(msg == 0);
17355}
f73dda09 17356_ACEOF
ac50fbac 17357if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
17358 bash_cv_under_sys_siglist=yes
17359else
ac50fbac 17360 bash_cv_under_sys_siglist=no
ccc6cda3 17361fi
ac50fbac
CR
17362rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17363 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 17364fi
3185942a 17365
ccc6cda3 17366fi
cce855bc 17367
ac50fbac 17368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_under_sys_siglist" >&5
3185942a 17369$as_echo "$bash_cv_under_sys_siglist" >&6; }
ccc6cda3 17370if test $bash_cv_under_sys_siglist = yes; then
ac50fbac 17371$as_echo "#define HAVE_UNDER_SYS_SIGLIST 1" >>confdefs.h
ccc6cda3
JA
17372
17373fi
17374
b80f6443 17375
ac50fbac 17376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signal handlers are of type void" >&5
3185942a 17377$as_echo_n "checking whether signal handlers are of type void... " >&6; }
ac50fbac 17378if ${bash_cv_void_sighandler+:} false; then :
3185942a 17379 $as_echo_n "(cached) " >&6
ccc6cda3 17380else
ac50fbac 17381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17382/* end confdefs.h. */
ccc6cda3
JA
17383#include <sys/types.h>
17384#include <signal.h>
17385#ifdef signal
17386#undef signal
17387#endif
17388#ifdef __cplusplus
17389extern "C"
17390#endif
17391void (*signal ()) ();
f73dda09
JA
17392int
17393main ()
17394{
ccc6cda3 17395int i;
f73dda09
JA
17396 ;
17397 return 0;
17398}
17399_ACEOF
ac50fbac 17400if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
17401 bash_cv_void_sighandler=yes
17402else
ac50fbac 17403 bash_cv_void_sighandler=no
ccc6cda3 17404fi
3185942a 17405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 17406fi
ac50fbac 17407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_void_sighandler" >&5
3185942a 17408$as_echo "$bash_cv_void_sighandler" >&6; }
ccc6cda3 17409if test $bash_cv_void_sighandler = yes; then
ac50fbac 17410$as_echo "#define VOID_SIGHANDLER 1" >>confdefs.h
ccc6cda3
JA
17411
17412fi
17413
b80f6443
JA
17414
17415
ac50fbac 17416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
3185942a 17417$as_echo_n "checking for clock_t... " >&6; }
ac50fbac 17418if ${bash_cv_type_clock_t+:} false; then :
3185942a 17419 $as_echo_n "(cached) " >&6
ccc6cda3 17420else
ac50fbac 17421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17422/* end confdefs.h. */
ccc6cda3
JA
17423#include <sys/types.h>
17424#if STDC_HEADERS
17425#include <stdlib.h>
f73dda09
JA
17426#include <stddef.h>
17427#endif
17428#if HAVE_INTTYPES_H
17429#include <inttypes.h>
ccc6cda3 17430#endif
0001803f
CR
17431#if HAVE_STDINT_H
17432#include <stdint.h>
17433#endif
ccc6cda3
JA
17434#include <sys/times.h>
17435
f73dda09 17436_ACEOF
ccc6cda3 17437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 17438 $EGREP "clock_t" >/dev/null 2>&1; then :
ccc6cda3
JA
17439 bash_cv_type_clock_t=yes
17440else
ccc6cda3
JA
17441 bash_cv_type_clock_t=no
17442fi
17443rm -f conftest*
17444
17445fi
17446
ac50fbac 17447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_clock_t" >&5
3185942a 17448$as_echo "$bash_cv_type_clock_t" >&6; }
ccc6cda3
JA
17449
17450if test $bash_cv_type_clock_t = no; then
b80f6443 17451 cat >>confdefs.h <<_ACEOF
ccc6cda3 17452#define clock_t long
b80f6443 17453_ACEOF
ccc6cda3
JA
17454
17455fi
17456
b80f6443
JA
17457
17458
ac50fbac 17459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset_t" >&5
3185942a 17460$as_echo_n "checking for sigset_t... " >&6; }
ac50fbac 17461if ${bash_cv_type_sigset_t+:} false; then :
3185942a 17462 $as_echo_n "(cached) " >&6
f73dda09 17463else
ac50fbac 17464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17465/* end confdefs.h. */
f73dda09
JA
17466#include <sys/types.h>
17467#if STDC_HEADERS
17468#include <stdlib.h>
17469#include <stddef.h>
17470#endif
17471#if HAVE_INTTYPES_H
17472#include <inttypes.h>
17473#endif
0001803f
CR
17474#if HAVE_STDINT_H
17475#include <stdint.h>
17476#endif
ac50fbac 17477#include <signal.h>
f73dda09
JA
17478
17479_ACEOF
17480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac
CR
17481 $EGREP "sigset_t" >/dev/null 2>&1; then :
17482 bash_cv_type_sigset_t=yes
f73dda09 17483else
ac50fbac 17484 bash_cv_type_sigset_t=no
f73dda09
JA
17485fi
17486rm -f conftest*
17487
17488fi
17489
ac50fbac
CR
17490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sigset_t" >&5
17491$as_echo "$bash_cv_type_sigset_t" >&6; }
f73dda09 17492
ac50fbac 17493if test $bash_cv_type_sigset_t = no; then
b80f6443 17494 cat >>confdefs.h <<_ACEOF
ac50fbac 17495#define sigset_t int
b80f6443 17496_ACEOF
f73dda09
JA
17497
17498fi
17499
0628567a 17500
f73dda09 17501
ac50fbac
CR
17502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5
17503$as_echo_n "checking for sig_atomic_t... " >&6; }
17504if ${bash_cv_type_sig_atomic_t+:} false; then :
17505 $as_echo_n "(cached) " >&6
ccc6cda3 17506else
ac50fbac 17507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17508/* end confdefs.h. */
ccc6cda3 17509#include <sys/types.h>
ac50fbac
CR
17510#if STDC_HEADERS
17511#include <stdlib.h>
17512#include <stddef.h>
ccc6cda3 17513#endif
ac50fbac
CR
17514#if HAVE_INTTYPES_H
17515#include <inttypes.h>
17516#endif
17517#if HAVE_STDINT_H
17518#include <stdint.h>
17519#endif
17520#include <signal.h>
17521
f73dda09 17522_ACEOF
ac50fbac
CR
17523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17524 $EGREP "sig_atomic_t" >/dev/null 2>&1; then :
17525 bash_cv_type_sig_atomic_t=yes
ccc6cda3 17526else
ac50fbac 17527 bash_cv_type_sig_atomic_t=no
ccc6cda3 17528fi
ac50fbac 17529rm -f conftest*
ccc6cda3
JA
17530
17531fi
17532
ac50fbac
CR
17533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5
17534$as_echo "$bash_cv_type_sig_atomic_t" >&6; }
ccc6cda3 17535
ac50fbac
CR
17536if test $bash_cv_type_sig_atomic_t = no; then
17537 cat >>confdefs.h <<_ACEOF
17538#define sig_atomic_t int
b80f6443 17539_ACEOF
ccc6cda3
JA
17540
17541fi
17542
b80f6443 17543
3185942a 17544
ac50fbac
CR
17545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for quad_t" >&5
17546$as_echo_n "checking for quad_t... " >&6; }
17547if ${bash_cv_type_quad_t+:} false; then :
17548 $as_echo_n "(cached) " >&6
ccc6cda3 17549else
ac50fbac 17550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17551/* end confdefs.h. */
ac50fbac
CR
17552#include <sys/types.h>
17553#if STDC_HEADERS
17554#include <stdlib.h>
17555#include <stddef.h>
17556#endif
17557#if HAVE_INTTYPES_H
17558#include <inttypes.h>
17559#endif
17560#if HAVE_STDINT_H
17561#include <stdint.h>
17562#endif
495aee44 17563
495aee44 17564
0628567a 17565_ACEOF
ac50fbac
CR
17566if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17567 $EGREP "quad_t" >/dev/null 2>&1; then :
17568 bash_cv_type_quad_t=yes
495aee44 17569else
ac50fbac 17570 bash_cv_type_quad_t=no
f73dda09 17571fi
ac50fbac 17572rm -f conftest*
ccc6cda3
JA
17573
17574fi
17575
ac50fbac
CR
17576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_quad_t" >&5
17577$as_echo "$bash_cv_type_quad_t" >&6; }
17578if test $bash_cv_type_quad_t = yes; then
17579 $as_echo "#define HAVE_QUAD_T 1" >>confdefs.h
495aee44 17580
ac50fbac
CR
17581 fi
17582if test $bash_cv_type_quad_t = no; then
17583 cat >>confdefs.h <<_ACEOF
17584#define quad_t long
495aee44 17585_ACEOF
495aee44 17586
495aee44
CR
17587fi
17588
ac50fbac
CR
17589
17590
17591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
17592$as_echo_n "checking for intmax_t... " >&6; }
17593if ${bash_cv_type_intmax_t+:} false; then :
17594 $as_echo_n "(cached) " >&6
495aee44 17595else
ac50fbac 17596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 17597/* end confdefs.h. */
ac50fbac
CR
17598#include <sys/types.h>
17599#if STDC_HEADERS
495aee44 17600#include <stdlib.h>
ac50fbac
CR
17601#include <stddef.h>
17602#endif
17603#if HAVE_INTTYPES_H
17604#include <inttypes.h>
17605#endif
17606#if HAVE_STDINT_H
17607#include <stdint.h>
17608#endif
495aee44 17609
495aee44 17610
495aee44 17611_ACEOF
ac50fbac
CR
17612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17613 $EGREP "intmax_t" >/dev/null 2>&1; then :
17614 bash_cv_type_intmax_t=yes
495aee44 17615else
ac50fbac 17616 bash_cv_type_intmax_t=no
495aee44 17617fi
ac50fbac 17618rm -f conftest*
495aee44 17619
ac50fbac 17620fi
495aee44 17621
ac50fbac
CR
17622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_intmax_t" >&5
17623$as_echo "$bash_cv_type_intmax_t" >&6; }
495aee44 17624
ac50fbac
CR
17625if test $bash_cv_type_intmax_t = no; then
17626 cat >>confdefs.h <<_ACEOF
17627#define intmax_t $bash_cv_type_long_long
495aee44
CR
17628_ACEOF
17629
ac50fbac 17630fi
495aee44
CR
17631
17632
17633
ac50fbac
CR
17634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintmax_t" >&5
17635$as_echo_n "checking for uintmax_t... " >&6; }
17636if ${bash_cv_type_uintmax_t+:} false; then :
495aee44
CR
17637 $as_echo_n "(cached) " >&6
17638else
ac50fbac 17639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 17640/* end confdefs.h. */
495aee44 17641#include <sys/types.h>
ac50fbac
CR
17642#if STDC_HEADERS
17643#include <stdlib.h>
17644#include <stddef.h>
17645#endif
17646#if HAVE_INTTYPES_H
17647#include <inttypes.h>
17648#endif
17649#if HAVE_STDINT_H
17650#include <stdint.h>
17651#endif
495aee44
CR
17652
17653
495aee44 17654_ACEOF
ac50fbac
CR
17655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17656 $EGREP "uintmax_t" >/dev/null 2>&1; then :
17657 bash_cv_type_uintmax_t=yes
495aee44 17658else
ac50fbac
CR
17659 bash_cv_type_uintmax_t=no
17660fi
17661rm -f conftest*
17662
17663fi
17664
17665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_uintmax_t" >&5
17666$as_echo "$bash_cv_type_uintmax_t" >&6; }
495aee44 17667
ac50fbac
CR
17668if test $bash_cv_type_uintmax_t = no; then
17669 cat >>confdefs.h <<_ACEOF
17670#define uintmax_t $bash_cv_type_unsigned_long_long
495aee44 17671_ACEOF
495aee44 17672
ac50fbac
CR
17673fi
17674
17675if test "$ac_cv_header_sys_socket_h" = "yes"; then
495aee44
CR
17676
17677
ac50fbac
CR
17678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
17679$as_echo_n "checking for socklen_t... " >&6; }
17680if ${bash_cv_type_socklen_t+:} false; then :
17681 $as_echo_n "(cached) " >&6
495aee44 17682else
ac50fbac
CR
17683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17684/* end confdefs.h. */
17685#include <sys/types.h>
17686#if STDC_HEADERS
17687#include <stdlib.h>
17688#include <stddef.h>
17689#endif
17690#if HAVE_INTTYPES_H
17691#include <inttypes.h>
17692#endif
17693#if HAVE_STDINT_H
17694#include <stdint.h>
17695#endif
17696#include <sys/socket.h>
495aee44 17697
ac50fbac
CR
17698_ACEOF
17699if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17700 $EGREP "socklen_t" >/dev/null 2>&1; then :
17701 bash_cv_type_socklen_t=yes
17702else
17703 bash_cv_type_socklen_t=no
495aee44 17704fi
ac50fbac 17705rm -f conftest*
495aee44 17706
495aee44
CR
17707fi
17708
ac50fbac
CR
17709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_socklen_t" >&5
17710$as_echo "$bash_cv_type_socklen_t" >&6; }
17711if test $bash_cv_type_socklen_t = yes; then
17712 $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
17713
17714 fi
17715if test $bash_cv_type_socklen_t = no; then
17716 cat >>confdefs.h <<_ACEOF
17717#define socklen_t unsigned int
495aee44
CR
17718_ACEOF
17719
17720fi
17721
ac50fbac
CR
17722fi
17723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size and type of struct rlimit fields" >&5
17724$as_echo_n "checking for size and type of struct rlimit fields... " >&6; }
17725if ${bash_cv_type_rlimit+:} false; then :
495aee44
CR
17726 $as_echo_n "(cached) " >&6
17727else
ac50fbac 17728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 17729/* end confdefs.h. */
495aee44 17730#include <sys/types.h>
ac50fbac 17731#include <sys/resource.h>
495aee44
CR
17732int
17733main ()
17734{
ac50fbac 17735rlim_t xxx;
495aee44
CR
17736 ;
17737 return 0;
17738}
17739_ACEOF
ac50fbac
CR
17740if ac_fn_c_try_compile "$LINENO"; then :
17741 bash_cv_type_rlimit=rlim_t
495aee44 17742else
495aee44 17743
ac50fbac
CR
17744if test "$cross_compiling" = yes; then :
17745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5
17746$as_echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&2;}
17747 bash_cv_type_rlimit=long
17748else
17749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44
CR
17750/* end confdefs.h. */
17751
17752#include <sys/types.h>
ac50fbac
CR
17753#include <sys/time.h>
17754#include <sys/resource.h>
8868edaf
CR
17755#include <stdlib.h>
17756int
ac50fbac 17757main()
495aee44 17758{
ac50fbac
CR
17759#ifdef HAVE_QUAD_T
17760 struct rlimit rl;
17761 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
17762 exit(0);
17763#endif
17764 exit(1);
495aee44
CR
17765}
17766_ACEOF
ac50fbac
CR
17767if ac_fn_c_try_run "$LINENO"; then :
17768 bash_cv_type_rlimit=quad_t
495aee44 17769else
ac50fbac
CR
17770 bash_cv_type_rlimit=long
17771fi
17772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17773 conftest.$ac_objext conftest.beam conftest.$ac_ext
17774fi
17775
17776fi
17777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17778
17779fi
17780
17781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_rlimit" >&5
17782$as_echo "$bash_cv_type_rlimit" >&6; }
17783if test $bash_cv_type_rlimit = quad_t; then
17784$as_echo "#define RLIMTYPE quad_t" >>confdefs.h
17785
17786elif test $bash_cv_type_rlimit = rlim_t; then
17787$as_echo "#define RLIMTYPE rlim_t" >>confdefs.h
17788
17789fi
17790
17791
17792# The cast to long int works around a bug in the HP C Compiler
17793# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17794# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17795# This bug is HP SR number 8606223364.
17796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5
17797$as_echo_n "checking size of intmax_t... " >&6; }
17798if ${ac_cv_sizeof_intmax_t+:} false; then :
17799 $as_echo_n "(cached) " >&6
17800else
17801 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default"; then :
495aee44 17802
ac50fbac
CR
17803else
17804 if test "$ac_cv_type_intmax_t" = yes; then
17805 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17806$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17807as_fn_error 77 "cannot compute sizeof (intmax_t)
17808See \`config.log' for more details" "$LINENO" 5; }
17809 else
17810 ac_cv_sizeof_intmax_t=0
17811 fi
495aee44
CR
17812fi
17813
495aee44 17814fi
ac50fbac
CR
17815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5
17816$as_echo "$ac_cv_sizeof_intmax_t" >&6; }
495aee44 17817
ac50fbac
CR
17818
17819
17820cat >>confdefs.h <<_ACEOF
17821#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t
495aee44
CR
17822_ACEOF
17823
ac50fbac
CR
17824
17825
17826
17827ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" "
17828#include <sys/types.h>
17829#include <termios.h>
17830
17831"
17832if test "x$ac_cv_member_struct_termios_c_line" = xyes; then :
17833 $as_echo "#define TERMIOS_LDISC 1" >>confdefs.h
17834
17835fi
17836
17837
17838
17839ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" "
17840#include <sys/types.h>
17841#include <termio.h>
17842
17843"
17844if test "x$ac_cv_member_struct_termio_c_line" = xyes; then :
17845 $as_echo "#define TERMIO_LDISC 1" >>confdefs.h
17846
495aee44
CR
17847fi
17848
17849
17850
ac50fbac 17851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5
495aee44 17852$as_echo_n "checking for struct dirent.d_ino... " >&6; }
ac50fbac 17853if ${bash_cv_dirent_has_dino+:} false; then :
495aee44 17854 $as_echo_n "(cached) " >&6
ccc6cda3 17855else
ac50fbac 17856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17857/* end confdefs.h. */
ccc6cda3
JA
17858
17859#include <stdio.h>
17860#include <sys/types.h>
17861#ifdef HAVE_UNISTD_H
17862# include <unistd.h>
17863#endif /* HAVE_UNISTD_H */
17864#if defined(HAVE_DIRENT_H)
17865# include <dirent.h>
17866#else
17867# define dirent direct
17868# ifdef HAVE_SYS_NDIR_H
17869# include <sys/ndir.h>
17870# endif /* SYSNDIR */
17871# ifdef HAVE_SYS_DIR_H
17872# include <sys/dir.h>
17873# endif /* SYSDIR */
17874# ifdef HAVE_NDIR_H
17875# include <ndir.h>
17876# endif
17877#endif /* HAVE_DIRENT_H */
17878
f73dda09
JA
17879int
17880main ()
17881{
ccc6cda3
JA
17882
17883struct dirent d; int z; z = d.d_ino;
17884
f73dda09
JA
17885 ;
17886 return 0;
17887}
17888_ACEOF
ac50fbac 17889if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
17890 bash_cv_dirent_has_dino=yes
17891else
ac50fbac 17892 bash_cv_dirent_has_dino=no
ccc6cda3 17893fi
3185942a 17894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
17895fi
17896
ac50fbac 17897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_dino" >&5
3185942a 17898$as_echo "$bash_cv_dirent_has_dino" >&6; }
ccc6cda3 17899if test $bash_cv_dirent_has_dino = yes; then
ac50fbac 17900$as_echo "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h
ccc6cda3
JA
17901
17902fi
17903
b80f6443 17904
ac50fbac 17905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5
3185942a 17906$as_echo_n "checking for struct dirent.d_fileno... " >&6; }
ac50fbac 17907if ${bash_cv_dirent_has_d_fileno+:} false; then :
3185942a 17908 $as_echo_n "(cached) " >&6
d166f048 17909else
ac50fbac 17910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17911/* end confdefs.h. */
d166f048
JA
17912
17913#include <stdio.h>
17914#include <sys/types.h>
17915#ifdef HAVE_UNISTD_H
17916# include <unistd.h>
17917#endif /* HAVE_UNISTD_H */
17918#if defined(HAVE_DIRENT_H)
17919# include <dirent.h>
17920#else
17921# define dirent direct
17922# ifdef HAVE_SYS_NDIR_H
17923# include <sys/ndir.h>
17924# endif /* SYSNDIR */
17925# ifdef HAVE_SYS_DIR_H
17926# include <sys/dir.h>
17927# endif /* SYSDIR */
17928# ifdef HAVE_NDIR_H
17929# include <ndir.h>
17930# endif
17931#endif /* HAVE_DIRENT_H */
17932
f73dda09
JA
17933int
17934main ()
17935{
d166f048
JA
17936
17937struct dirent d; int z; z = d.d_fileno;
17938
f73dda09
JA
17939 ;
17940 return 0;
17941}
17942_ACEOF
ac50fbac 17943if ac_fn_c_try_compile "$LINENO"; then :
d166f048
JA
17944 bash_cv_dirent_has_d_fileno=yes
17945else
ac50fbac 17946 bash_cv_dirent_has_d_fileno=no
d166f048 17947fi
3185942a 17948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
17949fi
17950
ac50fbac 17951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5
3185942a 17952$as_echo "$bash_cv_dirent_has_d_fileno" >&6; }
d166f048 17953if test $bash_cv_dirent_has_d_fileno = yes; then
ac50fbac 17954$as_echo "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h
b80f6443
JA
17955
17956fi
17957
17958
ac50fbac 17959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_namlen" >&5
3185942a 17960$as_echo_n "checking for struct dirent.d_namlen... " >&6; }
ac50fbac 17961if ${bash_cv_dirent_has_d_namlen+:} false; then :
3185942a 17962 $as_echo_n "(cached) " >&6
b80f6443 17963else
ac50fbac 17964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17965/* end confdefs.h. */
b80f6443
JA
17966
17967#include <stdio.h>
17968#include <sys/types.h>
17969#ifdef HAVE_UNISTD_H
17970# include <unistd.h>
17971#endif /* HAVE_UNISTD_H */
17972#if defined(HAVE_DIRENT_H)
17973# include <dirent.h>
17974#else
17975# define dirent direct
17976# ifdef HAVE_SYS_NDIR_H
17977# include <sys/ndir.h>
17978# endif /* SYSNDIR */
17979# ifdef HAVE_SYS_DIR_H
17980# include <sys/dir.h>
17981# endif /* SYSDIR */
17982# ifdef HAVE_NDIR_H
17983# include <ndir.h>
17984# endif
17985#endif /* HAVE_DIRENT_H */
17986
17987int
17988main ()
17989{
17990
17991struct dirent d; int z; z = d.d_namlen;
17992
17993 ;
17994 return 0;
17995}
17996_ACEOF
ac50fbac 17997if ac_fn_c_try_compile "$LINENO"; then :
b80f6443
JA
17998 bash_cv_dirent_has_d_namlen=yes
17999else
ac50fbac 18000 bash_cv_dirent_has_d_namlen=no
d166f048 18001fi
3185942a 18002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b80f6443
JA
18003fi
18004
ac50fbac 18005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_namlen" >&5
3185942a 18006$as_echo "$bash_cv_dirent_has_d_namlen" >&6; }
b80f6443 18007if test $bash_cv_dirent_has_d_namlen = yes; then
ac50fbac 18008$as_echo "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h
d166f048 18009
b80f6443
JA
18010fi
18011
ac50fbac 18012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5
3185942a 18013$as_echo_n "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; }
ac50fbac 18014if ${bash_cv_struct_winsize_header+:} false; then :
3185942a 18015 $as_echo_n "(cached) " >&6
d166f048 18016else
ac50fbac 18017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18018/* end confdefs.h. */
d166f048
JA
18019#include <sys/types.h>
18020#include <sys/ioctl.h>
f73dda09
JA
18021int
18022main ()
18023{
d166f048 18024struct winsize x;
f73dda09
JA
18025 ;
18026 return 0;
18027}
18028_ACEOF
ac50fbac 18029if ac_fn_c_try_compile "$LINENO"; then :
cce855bc
JA
18030 bash_cv_struct_winsize_header=ioctl_h
18031else
ac50fbac 18032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18033/* end confdefs.h. */
cce855bc
JA
18034#include <sys/types.h>
18035#include <termios.h>
f73dda09
JA
18036int
18037main ()
18038{
cce855bc 18039struct winsize x;
f73dda09
JA
18040 ;
18041 return 0;
18042}
18043_ACEOF
ac50fbac 18044if ac_fn_c_try_compile "$LINENO"; then :
cce855bc 18045 bash_cv_struct_winsize_header=termios_h
d166f048 18046else
ac50fbac 18047 bash_cv_struct_winsize_header=other
cce855bc 18048fi
3185942a 18049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cce855bc 18050
d166f048 18051fi
3185942a 18052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
18053fi
18054
cce855bc 18055if test $bash_cv_struct_winsize_header = ioctl_h; then
ac50fbac 18056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5
3185942a 18057$as_echo "sys/ioctl.h" >&6; }
ac50fbac 18058 $as_echo "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h
d166f048 18059
cce855bc 18060elif test $bash_cv_struct_winsize_header = termios_h; then
ac50fbac 18061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5
3185942a 18062$as_echo "termios.h" >&6; }
ac50fbac 18063 $as_echo "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h
d166f048 18064
0628567a 18065else
ac50fbac
CR
18066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18067$as_echo "not found" >&6; }
18068fi
0628567a 18069
ac50fbac
CR
18070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5
18071$as_echo_n "checking for struct timeval in sys/time.h and time.h... " >&6; }
18072if ${bash_cv_struct_timeval+:} false; then :
18073 $as_echo_n "(cached) " >&6
18074else
ac50fbac
CR
18075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18076/* end confdefs.h. */
8868edaf
CR
18077#if HAVE_SYS_TIME_H
18078 #include <sys/time.h>
18079 #endif
18080 #include <time.h>
18081
18082int
18083main ()
18084{
18085static struct timeval x; x.tv_sec = x.tv_usec;
0628567a 18086
8868edaf
CR
18087 ;
18088 return 0;
18089}
0628567a 18090_ACEOF
8868edaf 18091if ac_fn_c_try_compile "$LINENO"; then :
ac50fbac 18092 bash_cv_struct_timeval=yes
b80f6443 18093else
ac50fbac
CR
18094 bash_cv_struct_timeval=no
18095fi
8868edaf 18096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185942a 18097
0628567a 18098fi
3185942a 18099
ac50fbac
CR
18100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timeval" >&5
18101$as_echo "$bash_cv_struct_timeval" >&6; }
18102if test $bash_cv_struct_timeval = yes; then
18103 $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
18104
7117c2d2 18105fi
ac50fbac
CR
18106
18107ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
18108if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
7117c2d2 18109
b80f6443 18110cat >>confdefs.h <<_ACEOF
ac50fbac 18111#define HAVE_STRUCT_STAT_ST_BLOCKS 1
b80f6443
JA
18112_ACEOF
18113
7117c2d2
JA
18114
18115fi
18116
ac50fbac
CR
18117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
18118$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
18119if ${ac_cv_struct_tm+:} false; then :
3185942a
JA
18120 $as_echo_n "(cached) " >&6
18121else
ac50fbac 18122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 18123/* end confdefs.h. */
ac50fbac 18124#include <sys/types.h>
3185942a
JA
18125#include <time.h>
18126
18127int
18128main ()
18129{
ac50fbac
CR
18130struct tm tm;
18131 int *p = &tm.tm_sec;
18132 return !p;
3185942a
JA
18133 ;
18134 return 0;
18135}
18136_ACEOF
ac50fbac
CR
18137if ac_fn_c_try_compile "$LINENO"; then :
18138 ac_cv_struct_tm=time.h
3185942a 18139else
ac50fbac 18140 ac_cv_struct_tm=sys/time.h
3185942a 18141fi
3185942a
JA
18142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18143fi
ac50fbac
CR
18144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
18145$as_echo "$ac_cv_struct_tm" >&6; }
18146if test $ac_cv_struct_tm = sys/time.h; then
18147
18148$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
18149
18150fi
18151
18152ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
18153#include <$ac_cv_struct_tm>
18154
18155"
18156if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
3185942a
JA
18157
18158cat >>confdefs.h <<_ACEOF
ac50fbac 18159#define HAVE_STRUCT_TM_TM_ZONE 1
3185942a
JA
18160_ACEOF
18161
18162
ac50fbac 18163fi
3185942a 18164
ac50fbac
CR
18165if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18166
18167$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
3185942a 18168
ac50fbac
CR
18169else
18170 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
18171"
18172if test "x$ac_cv_have_decl_tzname" = xyes; then :
18173 ac_have_decl=1
18174else
18175 ac_have_decl=0
3185942a
JA
18176fi
18177
ac50fbac
CR
18178cat >>confdefs.h <<_ACEOF
18179#define HAVE_DECL_TZNAME $ac_have_decl
18180_ACEOF
3185942a 18181
ac50fbac 18182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
3185942a 18183$as_echo_n "checking for tzname... " >&6; }
ac50fbac 18184if ${ac_cv_var_tzname+:} false; then :
3185942a 18185 $as_echo_n "(cached) " >&6
7117c2d2 18186else
ac50fbac 18187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18188/* end confdefs.h. */
7117c2d2 18189#include <time.h>
3185942a
JA
18190#if !HAVE_DECL_TZNAME
18191extern char *tzname[];
7117c2d2
JA
18192#endif
18193
18194int
18195main ()
18196{
3185942a 18197return tzname[0][0];
7117c2d2
JA
18198 ;
18199 return 0;
18200}
18201_ACEOF
ac50fbac 18202if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
18203 ac_cv_var_tzname=yes
18204else
ac50fbac 18205 ac_cv_var_tzname=no
7117c2d2 18206fi
ac50fbac
CR
18207rm -f core conftest.err conftest.$ac_objext \
18208 conftest$ac_exeext conftest.$ac_ext
7117c2d2 18209fi
ac50fbac 18210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
3185942a 18211$as_echo "$ac_cv_var_tzname" >&6; }
7117c2d2
JA
18212 if test $ac_cv_var_tzname = yes; then
18213
ac50fbac 18214$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
7117c2d2
JA
18215
18216 fi
18217fi
18218
ac50fbac 18219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timezone in sys/time.h and time.h" >&5
3185942a 18220$as_echo_n "checking for struct timezone in sys/time.h and time.h... " >&6; }
ac50fbac 18221if ${bash_cv_struct_timezone+:} false; then :
3185942a 18222 $as_echo_n "(cached) " >&6
b80f6443
JA
18223else
18224
ac50fbac 18225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18226/* end confdefs.h. */
b80f6443
JA
18227#include <sys/time.h>
18228
18229_ACEOF
18230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 18231 $EGREP "struct timezone" >/dev/null 2>&1; then :
b80f6443
JA
18232 bash_cv_struct_timezone=yes
18233else
ac50fbac 18234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18235/* end confdefs.h. */
b80f6443
JA
18236#include <time.h>
18237
18238_ACEOF
18239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 18240 $EGREP "struct timezone" >/dev/null 2>&1; then :
b80f6443
JA
18241 bash_cv_struct_timezone=yes
18242else
18243 bash_cv_struct_timezone=no
18244fi
18245rm -f conftest*
18246
18247fi
18248rm -f conftest*
18249
18250
18251fi
18252
ac50fbac 18253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timezone" >&5
3185942a 18254$as_echo "$bash_cv_struct_timezone" >&6; }
b80f6443 18255if test $bash_cv_struct_timezone = yes; then
ac50fbac 18256 $as_echo "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h
b80f6443
JA
18257
18258fi
18259
18260
ac50fbac 18261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for offset of exit status in return status from wait" >&5
495aee44 18262$as_echo_n "checking for offset of exit status in return status from wait... " >&6; }
ac50fbac 18263if ${bash_cv_wexitstatus_offset+:} false; then :
495aee44
CR
18264 $as_echo_n "(cached) " >&6
18265else
ac50fbac
CR
18266 if test "$cross_compiling" = yes; then :
18267 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&5
495aee44
CR
18268$as_echo "$as_me: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&2;}
18269 bash_cv_wexitstatus_offset=0
18270
18271else
ac50fbac
CR
18272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18273/* end confdefs.h. */
495aee44
CR
18274
18275#include <stdlib.h>
18276#include <unistd.h>
18277
18278#include <sys/wait.h>
18279
8868edaf 18280int
495aee44
CR
18281main(c, v)
18282 int c;
18283 char **v;
18284{
18285 pid_t pid, p;
18286 int s, i, n;
18287
18288 s = 0;
18289 pid = fork();
18290 if (pid == 0)
18291 exit (42);
18292
18293 /* wait for the process */
18294 p = wait(&s);
18295 if (p != pid)
18296 exit (255);
18297
18298 /* crack s */
8868edaf 18299 for (i = 0; i < (sizeof(s) * 8); i++)
495aee44
CR
18300 {
18301 n = (s >> i) & 0xff;
18302 if (n == 42)
18303 exit (i);
18304 }
18305
18306 exit (254);
18307}
18308
18309_ACEOF
ac50fbac 18310if ac_fn_c_try_run "$LINENO"; then :
495aee44
CR
18311 bash_cv_wexitstatus_offset=0
18312else
ac50fbac
CR
18313 bash_cv_wexitstatus_offset=$?
18314fi
18315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18316 conftest.$ac_objext conftest.beam conftest.$ac_ext
18317fi
18318
18319fi
18320
18321if test "$bash_cv_wexitstatus_offset" -gt 32 ; then
18322 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad exit status from test program -- defaulting to 0" >&5
18323$as_echo "$as_me: WARNING: bad exit status from test program -- defaulting to 0" >&2;}
18324 bash_cv_wexitstatus_offset=0
18325fi
18326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wexitstatus_offset" >&5
18327$as_echo "$bash_cv_wexitstatus_offset" >&6; }
18328
18329cat >>confdefs.h <<_ACEOF
18330#define WEXITSTATUS_OFFSET $bash_cv_wexitstatus_offset
18331_ACEOF
18332
18333
18334
18335
18336
18337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
18338$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
18339if ${bash_cv_sys_struct_timespec_in_time_h+:} false; then :
18340 $as_echo_n "(cached) " >&6
18341else
18342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18343/* end confdefs.h. */
18344#include <time.h>
18345
18346int
18347main ()
18348{
18349static struct timespec x; x.tv_sec = x.tv_nsec;
18350 ;
18351 return 0;
18352}
18353_ACEOF
18354if ac_fn_c_try_compile "$LINENO"; then :
18355 bash_cv_sys_struct_timespec_in_time_h=yes
18356else
18357 bash_cv_sys_struct_timespec_in_time_h=no
18358fi
18359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18360fi
18361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_time_h" >&5
18362$as_echo "$bash_cv_sys_struct_timespec_in_time_h" >&6; }
18363
18364 HAVE_STRUCT_TIMESPEC=0
18365 TIME_H_DEFINES_STRUCT_TIMESPEC=0
18366 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
18367 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
18368 if test $bash_cv_sys_struct_timespec_in_time_h = yes; then
18369 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
18370
18371 $as_echo "#define TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
18372
18373 TIME_H_DEFINES_STRUCT_TIMESPEC=1
18374 else
18375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
18376$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
18377if ${bash_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
18378 $as_echo_n "(cached) " >&6
18379else
18380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18381/* end confdefs.h. */
18382#include <sys/time.h>
18383
18384int
18385main ()
18386{
18387static struct timespec x; x.tv_sec = x.tv_nsec;
18388 ;
18389 return 0;
18390}
18391_ACEOF
18392if ac_fn_c_try_compile "$LINENO"; then :
18393 bash_cv_sys_struct_timespec_in_sys_time_h=yes
18394else
18395 bash_cv_sys_struct_timespec_in_sys_time_h=no
18396fi
18397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18398fi
18399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_sys_time_h" >&5
18400$as_echo "$bash_cv_sys_struct_timespec_in_sys_time_h" >&6; }
18401 if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then
18402 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
18403 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
18404
18405 $as_echo "#define SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
18406
18407 else
18408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
18409$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
18410if ${bash_cv_sys_struct_timespec_in_pthread_h+:} false; then :
18411 $as_echo_n "(cached) " >&6
18412else
18413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18414/* end confdefs.h. */
18415#include <pthread.h>
18416
18417int
18418main ()
18419{
18420static struct timespec x; x.tv_sec = x.tv_nsec;
18421 ;
18422 return 0;
18423}
18424_ACEOF
18425if ac_fn_c_try_compile "$LINENO"; then :
18426 bash_cv_sys_struct_timespec_in_pthread_h=yes
18427else
18428 bash_cv_sys_struct_timespec_in_pthread_h=no
18429fi
18430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18431fi
18432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_pthread_h" >&5
18433$as_echo "$bash_cv_sys_struct_timespec_in_pthread_h" >&6; }
18434 if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then
18435 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
18436 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
18437
18438 $as_echo "#define PTHREAD_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
18439
18440 fi
18441 fi
18442 fi
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452 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>
18453 #include <sys/stat.h>
18454"
18455if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
18456
18457cat >>confdefs.h <<_ACEOF
18458#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
18459_ACEOF
18460
18461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
18462$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
18463if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
18464 $as_echo_n "(cached) " >&6
18465else
18466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18467/* end confdefs.h. */
18468
18469 #include <sys/types.h>
18470 #include <sys/stat.h>
18471 #if HAVE_SYS_TIME_H
18472 # include <sys/time.h>
18473 #endif
18474 #include <time.h>
18475 struct timespec ts;
18476 struct stat st;
18477
18478int
18479main ()
18480{
18481
18482 st.st_atim = ts;
18483
18484 ;
18485 return 0;
18486}
18487_ACEOF
18488if ac_fn_c_try_compile "$LINENO"; then :
18489 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
18490else
18491 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
18492fi
18493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18494fi
18495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
18496$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
18497 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
18498
18499$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
18500
18501 fi
18502else
18503 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>
18504 #include <sys/stat.h>
18505"
18506if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
18507
18508cat >>confdefs.h <<_ACEOF
18509#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
18510_ACEOF
18511
18512
18513else
18514 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
18515 #include <sys/stat.h>
18516"
18517if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
18518
18519cat >>confdefs.h <<_ACEOF
18520#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
18521_ACEOF
18522
18523
18524else
18525 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>
18526 #include <sys/stat.h>
18527"
18528if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
495aee44 18529
ac50fbac
CR
18530cat >>confdefs.h <<_ACEOF
18531#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
18532_ACEOF
495aee44
CR
18533
18534
18535fi
18536
495aee44 18537fi
495aee44 18538
ac50fbac
CR
18539fi
18540
18541fi
495aee44
CR
18542
18543
18544
d233b485 18545
8868edaf
CR
18546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sbrk" >&5
18547$as_echo_n "checking for sbrk... " >&6; }
18548 if ${ac_cv_func_sbrk+:} false; then :
18549 $as_echo_n "(cached) " >&6
18550else
18551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18552/* end confdefs.h. */
18553#include <unistd.h>
18554int
18555main ()
18556{
18557 void *x = sbrk (4096);
18558 ;
18559 return 0;
18560}
18561_ACEOF
18562if ac_fn_c_try_link "$LINENO"; then :
18563 ac_cv_func_sbrk=yes
18564else
18565 ac_cv_func_sbrk=no
18566fi
18567rm -f core conftest.err conftest.$ac_objext \
18568 conftest$ac_exeext conftest.$ac_ext
18569fi
d233b485 18570
8868edaf
CR
18571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sbrk" >&5
18572$as_echo "$ac_cv_func_sbrk" >&6; }
d233b485
CR
18573 if test X$ac_cv_func_sbrk = Xyes; then
18574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sbrk" >&5
18575$as_echo_n "checking for working sbrk... " >&6; }
18576if ${bash_cv_func_sbrk+:} false; then :
18577 $as_echo_n "(cached) " >&6
18578else
18579 if test "$cross_compiling" = yes; then :
18580 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check working sbrk if cross-compiling" >&5
18581$as_echo "$as_me: WARNING: cannot check working sbrk if cross-compiling" >&2;}
18582 bash_cv_func_sbrk=yes
18583
18584else
18585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18586/* end confdefs.h. */
18587
18588#include <stdlib.h>
18589#include <unistd.h>
18590
18591int
18592main(int c, char **v)
18593{
18594 void *x;
18595
18596 x = sbrk (4096);
18597 exit ((x == (void *)-1) ? 1 : 0);
18598}
18599
18600_ACEOF
18601if ac_fn_c_try_run "$LINENO"; then :
18602 bash_cv_func_sbrk=yes
18603else
18604 bash_cv_func_snprintf=sbrk
18605fi
18606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18607 conftest.$ac_objext conftest.beam conftest.$ac_ext
18608fi
18609
18610fi
18611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sbrk" >&5
18612$as_echo "$bash_cv_func_sbrk" >&6; }
18613 if test $bash_cv_func_sbrk = no; then
18614 ac_cv_func_sbrk=no
18615 fi
18616 fi
8868edaf 18617 if test $ac_cv_func_sbrk = yes; then
d233b485 18618
8868edaf 18619$as_echo "#define HAVE_SBRK 1" >>confdefs.h
d233b485
CR
18620
18621 fi
18622
18623
ac50fbac 18624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5
3185942a 18625$as_echo_n "checking for the existence of strsignal... " >&6; }
ac50fbac 18626if ${bash_cv_have_strsignal+:} false; then :
3185942a 18627 $as_echo_n "(cached) " >&6
ccc6cda3 18628else
ac50fbac 18629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18630/* end confdefs.h. */
ccc6cda3
JA
18631#include <sys/types.h>
18632#include <signal.h>
8868edaf 18633#include <string.h>
f73dda09
JA
18634int
18635main ()
18636{
ccc6cda3 18637char *s = (char *)strsignal(2);
f73dda09
JA
18638 ;
18639 return 0;
18640}
18641_ACEOF
ac50fbac 18642if ac_fn_c_try_link "$LINENO"; then :
ccc6cda3
JA
18643 bash_cv_have_strsignal=yes
18644else
ac50fbac 18645 bash_cv_have_strsignal=no
ccc6cda3 18646fi
ac50fbac
CR
18647rm -f core conftest.err conftest.$ac_objext \
18648 conftest$ac_exeext conftest.$ac_ext
ccc6cda3
JA
18649fi
18650
ac50fbac 18651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_strsignal" >&5
3185942a 18652$as_echo "$bash_cv_have_strsignal" >&6; }
ccc6cda3 18653if test $bash_cv_have_strsignal = yes; then
ac50fbac 18654$as_echo "#define HAVE_STRSIGNAL 1" >>confdefs.h
ccc6cda3
JA
18655
18656fi
18657
ac50fbac 18658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if opendir() opens non-directories" >&5
3185942a 18659$as_echo_n "checking if opendir() opens non-directories... " >&6; }
ac50fbac 18660if ${bash_cv_opendir_not_robust+:} false; then :
3185942a 18661 $as_echo_n "(cached) " >&6
ccc6cda3 18662else
ac50fbac
CR
18663 if test "$cross_compiling" = yes; then :
18664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5
3185942a 18665$as_echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
18666 bash_cv_opendir_not_robust=no
18667
ccc6cda3 18668else
ac50fbac 18669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18670/* end confdefs.h. */
ccc6cda3
JA
18671
18672#include <stdio.h>
18673#include <sys/types.h>
18674#include <fcntl.h>
18675#ifdef HAVE_UNISTD_H
18676# include <unistd.h>
18677#endif /* HAVE_UNISTD_H */
8868edaf
CR
18678#ifdef HAVE_SYS_STAT_H
18679#include <sys/stat.h>
18680#endif
ccc6cda3
JA
18681#if defined(HAVE_DIRENT_H)
18682# include <dirent.h>
18683#else
18684# define dirent direct
18685# ifdef HAVE_SYS_NDIR_H
18686# include <sys/ndir.h>
18687# endif /* SYSNDIR */
18688# ifdef HAVE_SYS_DIR_H
18689# include <sys/dir.h>
18690# endif /* SYSDIR */
18691# ifdef HAVE_NDIR_H
18692# include <ndir.h>
18693# endif
18694#endif /* HAVE_DIRENT_H */
8868edaf
CR
18695#include <stdlib.h>
18696int
ccc6cda3
JA
18697main()
18698{
18699DIR *dir;
bb70624e 18700int fd, err;
3185942a 18701err = mkdir("bash-aclocal", 0700);
bb70624e
JA
18702if (err < 0) {
18703 perror("mkdir");
18704 exit(1);
18705}
3185942a
JA
18706unlink("bash-aclocal/not_a_directory");
18707fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
ccc6cda3
JA
18708write(fd, "\n", 1);
18709close(fd);
3185942a
JA
18710dir = opendir("bash-aclocal/not_a_directory");
18711unlink("bash-aclocal/not_a_directory");
18712rmdir("bash-aclocal");
ccc6cda3
JA
18713exit (dir == 0);
18714}
f73dda09 18715_ACEOF
ac50fbac 18716if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
18717 bash_cv_opendir_not_robust=yes
18718else
ac50fbac 18719 bash_cv_opendir_not_robust=no
ccc6cda3 18720fi
ac50fbac
CR
18721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18722 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 18723fi
3185942a 18724
ccc6cda3
JA
18725fi
18726
ac50fbac 18727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_opendir_not_robust" >&5
3185942a 18728$as_echo "$bash_cv_opendir_not_robust" >&6; }
ccc6cda3 18729if test $bash_cv_opendir_not_robust = yes; then
ac50fbac 18730$as_echo "#define OPENDIR_NOT_ROBUST 1" >>confdefs.h
ccc6cda3
JA
18731
18732fi
18733
ac50fbac 18734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ulimit can substitute for getdtablesize" >&5
3185942a 18735$as_echo_n "checking whether ulimit can substitute for getdtablesize... " >&6; }
ac50fbac 18736if ${bash_cv_ulimit_maxfds+:} false; then :
3185942a 18737 $as_echo_n "(cached) " >&6
ccc6cda3 18738else
ac50fbac
CR
18739 if test "$cross_compiling" = yes; then :
18740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5
3185942a 18741$as_echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
18742 bash_cv_ulimit_maxfds=no
18743
ccc6cda3 18744else
ac50fbac 18745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18746/* end confdefs.h. */
ccc6cda3 18747
8868edaf
CR
18748#include <stdlib.h>
18749#ifdef HAVE_ULIMIT_H
18750#include <ulimit.h>
18751#endif
18752int
ccc6cda3
JA
18753main()
18754{
18755long maxfds = ulimit(4, 0L);
18756exit (maxfds == -1L);
18757}
18758
f73dda09 18759_ACEOF
ac50fbac 18760if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
18761 bash_cv_ulimit_maxfds=yes
18762else
ac50fbac 18763 bash_cv_ulimit_maxfds=no
3185942a 18764fi
ac50fbac
CR
18765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18766 conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a
JA
18767fi
18768
3185942a
JA
18769fi
18770
ac50fbac 18771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_ulimit_maxfds" >&5
3185942a
JA
18772$as_echo "$bash_cv_ulimit_maxfds" >&6; }
18773if test $bash_cv_ulimit_maxfds = yes; then
ac50fbac 18774$as_echo "#define ULIMIT_MAXFDS 1" >>confdefs.h
3185942a
JA
18775
18776fi
18777
18778
18779
18780
18781
18782
18783
18784
ac50fbac
CR
18785 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
18786"
18787if test "x$ac_cv_have_decl_fpurge" = xyes; then :
18788 ac_have_decl=1
3185942a 18789else
ac50fbac 18790 ac_have_decl=0
ccc6cda3
JA
18791fi
18792
3185942a 18793cat >>confdefs.h <<_ACEOF
ac50fbac 18794#define HAVE_DECL_FPURGE $ac_have_decl
b80f6443 18795_ACEOF
ccc6cda3 18796
3185942a 18797
ac50fbac 18798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if getenv can be redefined" >&5
3185942a 18799$as_echo_n "checking to see if getenv can be redefined... " >&6; }
ac50fbac 18800if ${bash_cv_getenv_redef+:} false; then :
3185942a 18801 $as_echo_n "(cached) " >&6
ccc6cda3 18802else
ac50fbac
CR
18803 if test "$cross_compiling" = yes; then :
18804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5
3185942a 18805$as_echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;}
cce855bc
JA
18806 bash_cv_getenv_redef=yes
18807
ccc6cda3 18808else
ac50fbac 18809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18810/* end confdefs.h. */
ccc6cda3
JA
18811
18812#ifdef HAVE_UNISTD_H
18813# include <unistd.h>
18814#endif
8868edaf 18815#include <stdlib.h>
ccc6cda3
JA
18816#ifndef __STDC__
18817# ifndef const
18818# define const
18819# endif
18820#endif
18821char *
18822getenv (name)
18823#if defined (__linux__) || defined (__bsdi__) || defined (convex)
18824 const char *name;
18825#else
18826 char const *name;
18827#endif /* !__linux__ && !__bsdi__ && !convex */
18828{
18829return "42";
18830}
8868edaf 18831int
ccc6cda3
JA
18832main()
18833{
18834char *s;
18835/* The next allows this program to run, but does not allow bash to link
18836 when it redefines getenv. I'm not really interested in figuring out
18837 why not. */
18838#if defined (NeXT)
18839exit(1);
18840#endif
18841s = getenv("ABCDE");
18842exit(s == 0); /* force optimizer to leave getenv in */
18843}
18844
f73dda09 18845_ACEOF
ac50fbac 18846if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
18847 bash_cv_getenv_redef=yes
18848else
ac50fbac 18849 bash_cv_getenv_redef=no
ccc6cda3 18850fi
ac50fbac
CR
18851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18852 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 18853fi
3185942a 18854
ccc6cda3
JA
18855fi
18856
ac50fbac 18857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getenv_redef" >&5
3185942a 18858$as_echo "$bash_cv_getenv_redef" >&6; }
ccc6cda3 18859if test $bash_cv_getenv_redef = yes; then
ac50fbac 18860$as_echo "#define CAN_REDEFINE_GETENV 1" >>confdefs.h
ccc6cda3
JA
18861
18862fi
18863
7117c2d2 18864if test "$ac_cv_func_getcwd" = "yes"; then
ac50fbac 18865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getcwd() will dynamically allocate memory with 0 size" >&5
3185942a 18866$as_echo_n "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; }
ac50fbac 18867if ${bash_cv_getcwd_malloc+:} false; then :
3185942a 18868 $as_echo_n "(cached) " >&6
ccc6cda3 18869else
ac50fbac
CR
18870 if test "$cross_compiling" = yes; then :
18871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5
3185942a 18872$as_echo "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;}
b80f6443 18873 bash_cv_getcwd_malloc=no
cce855bc 18874
ccc6cda3 18875else
ac50fbac 18876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18877/* end confdefs.h. */
ccc6cda3
JA
18878
18879#include <stdio.h>
18880#ifdef HAVE_UNISTD_H
18881#include <unistd.h>
18882#endif
8868edaf 18883#include <stdlib.h>
ccc6cda3 18884
8868edaf 18885int
ccc6cda3
JA
18886main()
18887{
b80f6443
JA
18888 char *xpwd;
18889 xpwd = getcwd(0, 0);
18890 exit (xpwd == 0);
ccc6cda3
JA
18891}
18892
f73dda09 18893_ACEOF
ac50fbac 18894if ac_fn_c_try_run "$LINENO"; then :
b80f6443 18895 bash_cv_getcwd_malloc=yes
ccc6cda3 18896else
ac50fbac 18897 bash_cv_getcwd_malloc=no
ccc6cda3 18898fi
ac50fbac
CR
18899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18900 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 18901fi
3185942a 18902
ccc6cda3
JA
18903fi
18904
ac50fbac 18905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getcwd_malloc" >&5
3185942a 18906$as_echo "$bash_cv_getcwd_malloc" >&6; }
b80f6443 18907if test $bash_cv_getcwd_malloc = no; then
ac50fbac 18908$as_echo "#define GETCWD_BROKEN 1" >>confdefs.h
ccc6cda3 18909
3185942a 18910case " $LIBOBJS " in
0628567a 18911 *" getcwd.$ac_objext "* ) ;;
3185942a
JA
18912 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
18913 ;;
0628567a
JA
18914esac
18915
ccc6cda3
JA
18916fi
18917
ccc6cda3
JA
18918fi
18919
ac50fbac 18920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
3185942a 18921$as_echo_n "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; }
ac50fbac 18922if ${bash_cv_func_sigsetjmp+:} false; then :
3185942a 18923 $as_echo_n "(cached) " >&6
ccc6cda3 18924else
ac50fbac
CR
18925 if test "$cross_compiling" = yes; then :
18926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5
3185942a 18927$as_echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
18928 bash_cv_func_sigsetjmp=missing
18929
ccc6cda3 18930else
ac50fbac 18931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18932/* end confdefs.h. */
ccc6cda3
JA
18933
18934#ifdef HAVE_UNISTD_H
18935#include <unistd.h>
18936#endif
18937#include <sys/types.h>
18938#include <signal.h>
18939#include <setjmp.h>
8868edaf 18940#include <stdlib.h>
ccc6cda3 18941
8868edaf 18942int
ccc6cda3
JA
18943main()
18944{
18945#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
18946exit (1);
18947#else
18948
18949int code;
18950sigset_t set, oset;
18951sigjmp_buf xx;
18952
18953/* get the mask */
18954sigemptyset(&set);
18955sigemptyset(&oset);
18956sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
18957sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
18958
18959/* save it */
18960code = sigsetjmp(xx, 1);
18961if (code)
18962 exit(0); /* could get sigmask and compare to oset here. */
18963
18964/* change it */
18965sigaddset(&set, SIGINT);
18966sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
18967
18968/* and siglongjmp */
18969siglongjmp(xx, 10);
18970exit(1);
18971#endif
18972}
f73dda09 18973_ACEOF
ac50fbac 18974if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
18975 bash_cv_func_sigsetjmp=present
18976else
ac50fbac 18977 bash_cv_func_sigsetjmp=missing
ccc6cda3 18978fi
ac50fbac
CR
18979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18980 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 18981fi
3185942a 18982
ccc6cda3
JA
18983fi
18984
ac50fbac 18985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5
3185942a 18986$as_echo "$bash_cv_func_sigsetjmp" >&6; }
ccc6cda3 18987if test $bash_cv_func_sigsetjmp = present; then
ac50fbac 18988$as_echo "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h
ccc6cda3
JA
18989
18990fi
18991
b80f6443 18992
ac50fbac 18993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5
3185942a 18994$as_echo_n "checking whether or not strcoll and strcmp differ... " >&6; }
ac50fbac 18995if ${bash_cv_func_strcoll_broken+:} false; then :
3185942a 18996 $as_echo_n "(cached) " >&6
d166f048 18997else
ac50fbac
CR
18998 if test "$cross_compiling" = yes; then :
18999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5
3185942a 19000$as_echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
19001 bash_cv_func_strcoll_broken=no
19002
d166f048 19003else
ac50fbac 19004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19005/* end confdefs.h. */
d166f048
JA
19006
19007#include <stdio.h>
19008#if defined (HAVE_LOCALE_H)
19009#include <locale.h>
19010#endif
8868edaf
CR
19011#include <string.h>
19012#include <stdlib.h>
d166f048 19013
8868edaf 19014int
d166f048
JA
19015main(c, v)
19016int c;
19017char *v[];
19018{
19019 int r1, r2;
19020 char *deflocale, *defcoll;
19021
19022#ifdef HAVE_SETLOCALE
19023 deflocale = setlocale(LC_ALL, "");
19024 defcoll = setlocale(LC_COLLATE, "");
19025#endif
19026
19027#ifdef HAVE_STRCOLL
19028 /* These two values are taken from tests/glob-test. */
19029 r1 = strcoll("abd", "aXd");
19030#else
19031 r1 = 0;
19032#endif
19033 r2 = strcmp("abd", "aXd");
19034
19035 /* These two should both be greater than 0. It is permissible for
19036 a system to return different values, as long as the sign is the
19037 same. */
19038
19039 /* Exit with 1 (failure) if these two values are both > 0, since
19040 this tests whether strcoll(3) is broken with respect to strcmp(3)
19041 in the default locale. */
19042 exit (r1 > 0 && r2 > 0);
19043}
19044
f73dda09 19045_ACEOF
ac50fbac 19046if ac_fn_c_try_run "$LINENO"; then :
d166f048
JA
19047 bash_cv_func_strcoll_broken=yes
19048else
ac50fbac 19049 bash_cv_func_strcoll_broken=no
d166f048 19050fi
ac50fbac
CR
19051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19052 conftest.$ac_objext conftest.beam conftest.$ac_ext
d166f048 19053fi
3185942a 19054
d166f048
JA
19055fi
19056
ac50fbac 19057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5
3185942a 19058$as_echo "$bash_cv_func_strcoll_broken" >&6; }
d166f048 19059if test $bash_cv_func_strcoll_broken = yes; then
ac50fbac 19060$as_echo "#define STRCOLL_BROKEN 1" >>confdefs.h
d166f048
JA
19061
19062fi
19063
b80f6443
JA
19064
19065
0001803f
CR
19066
19067
0001803f 19068 if test X$ac_cv_func_snprintf = Xyes; then
ac50fbac 19069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant snprintf" >&5
0001803f 19070$as_echo_n "checking for standard-conformant snprintf... " >&6; }
ac50fbac 19071if ${bash_cv_func_snprintf+:} false; then :
0001803f
CR
19072 $as_echo_n "(cached) " >&6
19073else
ac50fbac
CR
19074 if test "$cross_compiling" = yes; then :
19075 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard snprintf if cross-compiling" >&5
0001803f
CR
19076$as_echo "$as_me: WARNING: cannot check standard snprintf if cross-compiling" >&2;}
19077 bash_cv_func_snprintf=yes
19078
19079else
ac50fbac 19080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0001803f
CR
19081/* end confdefs.h. */
19082
19083#include <stdio.h>
8868edaf 19084#include <stdlib.h>
0001803f 19085
8868edaf 19086int
0001803f
CR
19087main()
19088{
19089 int n;
19090 n = snprintf (0, 0, "%s", "0123456");
19091 exit(n != 7);
19092}
19093
19094_ACEOF
ac50fbac 19095if ac_fn_c_try_run "$LINENO"; then :
0001803f
CR
19096 bash_cv_func_snprintf=yes
19097else
ac50fbac 19098 bash_cv_func_snprintf=no
0001803f 19099fi
ac50fbac
CR
19100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19101 conftest.$ac_objext conftest.beam conftest.$ac_ext
0001803f
CR
19102fi
19103
0001803f 19104fi
ac50fbac 19105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_snprintf" >&5
0001803f
CR
19106$as_echo "$bash_cv_func_snprintf" >&6; }
19107 if test $bash_cv_func_snprintf = no; then
19108 ac_cv_func_snprintf=no
19109 fi
19110 fi
19111 if test $ac_cv_func_snprintf = no; then
19112
ac50fbac 19113$as_echo "#define HAVE_SNPRINTF 0" >>confdefs.h
0001803f
CR
19114
19115 fi
19116
19117
19118
19119
19120
0001803f 19121 if test X$ac_cv_func_vsnprintf = Xyes; then
ac50fbac 19122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant vsnprintf" >&5
0001803f 19123$as_echo_n "checking for standard-conformant vsnprintf... " >&6; }
ac50fbac 19124if ${bash_cv_func_vsnprintf+:} false; then :
0001803f
CR
19125 $as_echo_n "(cached) " >&6
19126else
ac50fbac
CR
19127 if test "$cross_compiling" = yes; then :
19128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard vsnprintf if cross-compiling" >&5
0001803f
CR
19129$as_echo "$as_me: WARNING: cannot check standard vsnprintf if cross-compiling" >&2;}
19130 bash_cv_func_vsnprintf=yes
19131
19132else
ac50fbac 19133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0001803f
CR
19134/* end confdefs.h. */
19135
19136#if HAVE_STDARG_H
19137#include <stdarg.h>
19138#else
19139#include <varargs.h>
19140#endif
19141#include <stdio.h>
19142#include <stdlib.h>
19143
19144static int
19145#if HAVE_STDARG_H
19146foo(const char *fmt, ...)
19147#else
19148foo(format, va_alist)
19149 const char *format;
19150 va_dcl
19151#endif
19152{
19153 va_list args;
19154 int n;
19155
19156#if HAVE_STDARG_H
19157 va_start(args, fmt);
19158#else
19159 va_start(args);
19160#endif
19161 n = vsnprintf(0, 0, fmt, args);
19162 va_end (args);
19163 return n;
19164}
19165
8868edaf 19166int
0001803f
CR
19167main()
19168{
19169 int n;
19170 n = foo("%s", "0123456");
19171 exit(n != 7);
19172}
19173
19174_ACEOF
ac50fbac 19175if ac_fn_c_try_run "$LINENO"; then :
0001803f
CR
19176 bash_cv_func_vsnprintf=yes
19177else
ac50fbac 19178 bash_cv_func_vsnprintf=no
0001803f 19179fi
ac50fbac
CR
19180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19181 conftest.$ac_objext conftest.beam conftest.$ac_ext
0001803f
CR
19182fi
19183
0001803f 19184fi
ac50fbac 19185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_vsnprintf" >&5
0001803f
CR
19186$as_echo "$bash_cv_func_vsnprintf" >&6; }
19187 if test $bash_cv_func_vsnprintf = no; then
19188 ac_cv_func_vsnprintf=no
19189 fi
19190 fi
19191 if test $ac_cv_func_vsnprintf = no; then
19192
ac50fbac 19193$as_echo "#define HAVE_VSNPRINTF 0" >>confdefs.h
0001803f
CR
19194
19195 fi
19196
19197
19198
7117c2d2
JA
19199if test "$ac_cv_func_putenv" = "yes"; then
19200
b80f6443
JA
19201
19202
ac50fbac 19203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant putenv declaration" >&5
3185942a 19204$as_echo_n "checking for standard-conformant putenv declaration... " >&6; }
ac50fbac 19205if ${bash_cv_std_putenv+:} false; then :
3185942a 19206 $as_echo_n "(cached) " >&6
7117c2d2 19207else
ac50fbac 19208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19209/* end confdefs.h. */
7117c2d2
JA
19210
19211#if STDC_HEADERS
19212#include <stdlib.h>
19213#include <stddef.h>
19214#endif
19215#ifndef __STDC__
19216# ifndef const
19217# define const
19218# endif
19219#endif
19220#ifdef PROTOTYPES
19221extern int putenv (char *);
19222#else
19223extern int putenv ();
19224#endif
19225
19226int
19227main ()
19228{
19229return (putenv == 0);
19230 ;
19231 return 0;
19232}
19233_ACEOF
ac50fbac 19234if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
19235 bash_cv_std_putenv=yes
19236else
ac50fbac 19237 bash_cv_std_putenv=no
7117c2d2
JA
19238
19239fi
ac50fbac
CR
19240rm -f core conftest.err conftest.$ac_objext \
19241 conftest$ac_exeext conftest.$ac_ext
7117c2d2 19242fi
ac50fbac 19243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_putenv" >&5
3185942a 19244$as_echo "$bash_cv_std_putenv" >&6; }
7117c2d2 19245if test $bash_cv_std_putenv = yes; then
ac50fbac 19246$as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h
7117c2d2
JA
19247
19248fi
19249
19250else
ac50fbac 19251$as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h
7117c2d2
JA
19252
19253fi
19254if test "$ac_cv_func_unsetenv" = "yes"; then
19255
b80f6443
JA
19256
19257
ac50fbac 19258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant unsetenv declaration" >&5
3185942a 19259$as_echo_n "checking for standard-conformant unsetenv declaration... " >&6; }
ac50fbac 19260if ${bash_cv_std_unsetenv+:} false; then :
3185942a 19261 $as_echo_n "(cached) " >&6
7117c2d2 19262else
ac50fbac 19263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19264/* end confdefs.h. */
7117c2d2
JA
19265
19266#if STDC_HEADERS
19267#include <stdlib.h>
19268#include <stddef.h>
19269#endif
19270#ifndef __STDC__
19271# ifndef const
19272# define const
19273# endif
19274#endif
19275#ifdef PROTOTYPES
19276extern int unsetenv (const char *);
19277#else
19278extern int unsetenv ();
19279#endif
19280
19281int
19282main ()
19283{
19284return (unsetenv == 0);
19285 ;
19286 return 0;
19287}
19288_ACEOF
ac50fbac 19289if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
19290 bash_cv_std_unsetenv=yes
19291else
ac50fbac 19292 bash_cv_std_unsetenv=no
7117c2d2
JA
19293
19294fi
ac50fbac
CR
19295rm -f core conftest.err conftest.$ac_objext \
19296 conftest$ac_exeext conftest.$ac_ext
7117c2d2 19297fi
ac50fbac 19298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_unsetenv" >&5
3185942a 19299$as_echo "$bash_cv_std_unsetenv" >&6; }
7117c2d2 19300if test $bash_cv_std_unsetenv = yes; then
ac50fbac 19301$as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h
7117c2d2
JA
19302
19303fi
19304
19305else
ac50fbac 19306$as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h
7117c2d2
JA
19307
19308fi
19309
ac50fbac 19310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf floating point output in hex notation" >&5
3185942a 19311$as_echo_n "checking for printf floating point output in hex notation... " >&6; }
ac50fbac 19312if ${bash_cv_printf_a_format+:} false; then :
3185942a 19313 $as_echo_n "(cached) " >&6
f73dda09 19314else
ac50fbac
CR
19315 if test "$cross_compiling" = yes; then :
19316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5
3185942a 19317$as_echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;}
f73dda09
JA
19318 bash_cv_printf_a_format=no
19319
19320else
ac50fbac 19321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19322/* end confdefs.h. */
f73dda09
JA
19323
19324#include <stdio.h>
19325#include <string.h>
8868edaf 19326#include <stdlib.h>
f73dda09
JA
19327
19328int
19329main()
19330{
19331 double y = 0.0;
19332 char abuf[1024];
19333
19334 sprintf(abuf, "%A", y);
19335 exit(strchr(abuf, 'P') == (char *)0);
19336}
19337
19338_ACEOF
ac50fbac 19339if ac_fn_c_try_run "$LINENO"; then :
f73dda09
JA
19340 bash_cv_printf_a_format=yes
19341else
ac50fbac 19342 bash_cv_printf_a_format=no
f73dda09 19343fi
ac50fbac
CR
19344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19345 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 19346fi
3185942a 19347
f73dda09 19348fi
d166f048 19349
ac50fbac 19350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_printf_a_format" >&5
3185942a 19351$as_echo "$bash_cv_printf_a_format" >&6; }
f73dda09 19352if test $bash_cv_printf_a_format = yes; then
ac50fbac 19353$as_echo "#define HAVE_PRINTF_A_FORMAT 1" >>confdefs.h
d166f048 19354
f73dda09 19355fi
ccc6cda3 19356
b80f6443 19357
d233b485
CR
19358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fnmatch can be used to check bracket equivalence classes" >&5
19359$as_echo_n "checking whether fnmatch can be used to check bracket equivalence classes... " >&6; }
19360if ${bash_cv_fnmatch_equiv_fallback+:} false; then :
19361 $as_echo_n "(cached) " >&6
19362else
19363 if test "$cross_compiling" = yes; then :
19364 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&5
19365$as_echo "$as_me: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&2;}
19366 bash_cv_fnmatch_equiv_fallback=no
19367
19368else
19369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19370/* end confdefs.h. */
19371
19372#include <stdlib.h>
19373#include <unistd.h>
19374#include <stdio.h>
19375#include <fnmatch.h>
19376#include <locale.h>
19377
19378char *pattern = "[[=a=]]";
19379
19380/* char *string = "ä"; */
19381unsigned char string[4] = { '\xc3', '\xa4', '\0' };
19382
19383int
19384main (int c, char **v)
19385{
8868edaf 19386 setlocale (LC_ALL, "en_US.UTF-8");
d233b485
CR
19387 if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH)
19388 exit (0);
19389 exit (1);
19390}
19391
19392
19393_ACEOF
19394if ac_fn_c_try_run "$LINENO"; then :
19395 bash_cv_fnmatch_equiv_fallback=yes
19396else
19397 bash_cv_fnmatch_equiv_fallback=no
19398fi
19399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19400 conftest.$ac_objext conftest.beam conftest.$ac_ext
19401fi
19402
19403fi
19404
19405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fnmatch_equiv_fallback" >&5
19406$as_echo "$bash_cv_fnmatch_equiv_fallback" >&6; }
19407if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then
19408 bash_cv_fnmatch_equiv_value=1
19409else
19410 bash_cv_fnmatch_equiv_value=0
19411fi
19412
19413cat >>confdefs.h <<_ACEOF
19414#define FNMATCH_EQUIV_FALLBACK $bash_cv_fnmatch_equiv_value
19415_ACEOF
19416
19417
19418
b80f6443
JA
19419
19420
ac50fbac 19421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5
3185942a 19422$as_echo_n "checking if signal handlers must be reinstalled when invoked... " >&6; }
ac50fbac 19423if ${bash_cv_must_reinstall_sighandlers+:} false; then :
3185942a 19424 $as_echo_n "(cached) " >&6
ccc6cda3 19425else
ac50fbac
CR
19426 if test "$cross_compiling" = yes; then :
19427 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5
3185942a 19428$as_echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
19429 bash_cv_must_reinstall_sighandlers=no
19430
ccc6cda3 19431else
ac50fbac 19432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19433/* end confdefs.h. */
ccc6cda3
JA
19434
19435#include <signal.h>
19436#ifdef HAVE_UNISTD_H
19437#include <unistd.h>
19438#endif
8868edaf 19439#include <stdlib.h>
ccc6cda3
JA
19440
19441typedef RETSIGTYPE sigfunc();
19442
d233b485 19443volatile int nsigint;
ccc6cda3
JA
19444
19445#ifdef HAVE_POSIX_SIGNALS
19446sigfunc *
19447set_signal_handler(sig, handler)
19448 int sig;
19449 sigfunc *handler;
19450{
19451 struct sigaction act, oact;
19452 act.sa_handler = handler;
19453 act.sa_flags = 0;
19454 sigemptyset (&act.sa_mask);
19455 sigemptyset (&oact.sa_mask);
19456 sigaction (sig, &act, &oact);
19457 return (oact.sa_handler);
19458}
19459#else
19460#define set_signal_handler(s, h) signal(s, h)
19461#endif
19462
19463RETSIGTYPE
19464sigint(s)
19465int s;
19466{
19467 nsigint++;
19468}
19469
8868edaf 19470int
ccc6cda3
JA
19471main()
19472{
19473 nsigint = 0;
19474 set_signal_handler(SIGINT, sigint);
19475 kill((int)getpid(), SIGINT);
19476 kill((int)getpid(), SIGINT);
19477 exit(nsigint != 2);
19478}
19479
f73dda09 19480_ACEOF
ac50fbac 19481if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
19482 bash_cv_must_reinstall_sighandlers=no
19483else
ac50fbac 19484 bash_cv_must_reinstall_sighandlers=yes
ccc6cda3 19485fi
ac50fbac
CR
19486rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19487 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 19488fi
3185942a 19489
ccc6cda3
JA
19490fi
19491
ac50fbac 19492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5
3185942a 19493$as_echo "$bash_cv_must_reinstall_sighandlers" >&6; }
ccc6cda3 19494if test $bash_cv_must_reinstall_sighandlers = yes; then
ac50fbac 19495$as_echo "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h
ccc6cda3
JA
19496
19497fi
19498
b80f6443 19499
ac50fbac 19500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of necessary job control definitions" >&5
3185942a 19501$as_echo_n "checking for presence of necessary job control definitions... " >&6; }
ac50fbac 19502if ${bash_cv_job_control_missing+:} false; then :
3185942a 19503 $as_echo_n "(cached) " >&6
ccc6cda3 19504else
ac50fbac 19505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19506/* end confdefs.h. */
ccc6cda3
JA
19507
19508#include <sys/types.h>
19509#ifdef HAVE_SYS_WAIT_H
19510#include <sys/wait.h>
19511#endif
19512#ifdef HAVE_UNISTD_H
19513#include <unistd.h>
19514#endif
19515#include <signal.h>
19516
d233b485
CR
19517/* add more tests in here as appropriate */
19518
ccc6cda3
JA
19519/* signal type */
19520#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
d233b485 19521#error
ccc6cda3
JA
19522#endif
19523
19524/* signals and tty control. */
19525#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
d233b485 19526#error
ccc6cda3
JA
19527#endif
19528
19529/* process control */
f73dda09 19530#if !defined (WNOHANG) || !defined (WUNTRACED)
d233b485 19531#error
ccc6cda3
JA
19532#endif
19533
19534/* Posix systems have tcgetpgrp and waitpid. */
19535#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
d233b485 19536#error
ccc6cda3
JA
19537#endif
19538
19539#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
d233b485 19540#error
ccc6cda3
JA
19541#endif
19542
19543/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
19544#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
d233b485 19545#error
ccc6cda3
JA
19546#endif
19547
d233b485
CR
19548
19549int
19550main ()
19551{
19552
19553 ;
19554 return 0;
ccc6cda3 19555}
f73dda09 19556_ACEOF
d233b485 19557if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
19558 bash_cv_job_control_missing=present
19559else
ac50fbac 19560 bash_cv_job_control_missing=missing
3185942a 19561
ccc6cda3 19562fi
d233b485
CR
19563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19564fi
ccc6cda3 19565
ac50fbac 19566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_job_control_missing" >&5
3185942a 19567$as_echo "$bash_cv_job_control_missing" >&6; }
ccc6cda3 19568if test $bash_cv_job_control_missing = missing; then
ac50fbac 19569$as_echo "#define JOB_CONTROL_MISSING 1" >>confdefs.h
ccc6cda3
JA
19570
19571fi
19572
ac50fbac 19573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of named pipes" >&5
3185942a 19574$as_echo_n "checking for presence of named pipes... " >&6; }
ac50fbac 19575if ${bash_cv_sys_named_pipes+:} false; then :
3185942a 19576 $as_echo_n "(cached) " >&6
ccc6cda3 19577else
ac50fbac
CR
19578 if test "$cross_compiling" = yes; then :
19579 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5
3185942a 19580$as_echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
19581 bash_cv_sys_named_pipes=missing
19582
ccc6cda3 19583else
ac50fbac 19584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19585/* end confdefs.h. */
ccc6cda3
JA
19586
19587#include <sys/types.h>
19588#include <sys/stat.h>
19589#ifdef HAVE_UNISTD_H
19590#include <unistd.h>
19591#endif
8868edaf
CR
19592#include <stdio.h>
19593#include <stdlib.h>
ccc6cda3
JA
19594
19595/* Add more tests in here as appropriate. */
8868edaf 19596int
ccc6cda3
JA
19597main()
19598{
bb70624e 19599int fd, err;
ccc6cda3
JA
19600
19601#if defined (HAVE_MKFIFO)
19602exit (0);
19603#endif
19604
19605#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
19606exit (1);
19607#endif
19608
19609#if defined (NeXT)
19610exit (1);
19611#endif
3185942a 19612err = mkdir("bash-aclocal", 0700);
bb70624e
JA
19613if (err < 0) {
19614 perror ("mkdir");
19615 exit(1);
19616}
3185942a 19617fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
bb70624e 19618if (fd == -1) {
3185942a 19619 rmdir ("bash-aclocal");
ccc6cda3 19620 exit (1);
bb70624e 19621}
ccc6cda3 19622close(fd);
3185942a
JA
19623unlink ("bash-aclocal/sh-np-autoconf");
19624rmdir ("bash-aclocal");
ccc6cda3
JA
19625exit(0);
19626}
f73dda09 19627_ACEOF
ac50fbac 19628if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
19629 bash_cv_sys_named_pipes=present
19630else
ac50fbac 19631 bash_cv_sys_named_pipes=missing
0628567a 19632fi
ac50fbac
CR
19633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19634 conftest.$ac_objext conftest.beam conftest.$ac_ext
95732b49 19635fi
3185942a 19636
95732b49 19637fi
95732b49 19638
ac50fbac 19639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_named_pipes" >&5
3185942a 19640$as_echo "$bash_cv_sys_named_pipes" >&6; }
0628567a 19641if test $bash_cv_sys_named_pipes = missing; then
ac50fbac 19642$as_echo "#define NAMED_PIPES_MISSING 1" >>confdefs.h
0628567a
JA
19643
19644fi
19645
19646
ac50fbac 19647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
3185942a 19648$as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
ac50fbac 19649if ${ac_cv_sys_tiocgwinsz_in_termios_h+:} false; then :
3185942a 19650 $as_echo_n "(cached) " >&6
f73dda09 19651else
ac50fbac 19652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19653/* end confdefs.h. */
f73dda09
JA
19654#include <sys/types.h>
19655#include <termios.h>
19656#ifdef TIOCGWINSZ
19657 yes
19658#endif
19659
19660_ACEOF
19661if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 19662 $EGREP "yes" >/dev/null 2>&1; then :
f73dda09
JA
19663 ac_cv_sys_tiocgwinsz_in_termios_h=yes
19664else
19665 ac_cv_sys_tiocgwinsz_in_termios_h=no
19666fi
19667rm -f conftest*
19668
19669fi
ac50fbac 19670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
3185942a 19671$as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
d166f048 19672
f73dda09 19673if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
ac50fbac 19674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
3185942a 19675$as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
ac50fbac 19676if ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+:} false; then :
3185942a 19677 $as_echo_n "(cached) " >&6
ccc6cda3 19678else
ac50fbac 19679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19680/* end confdefs.h. */
ccc6cda3
JA
19681#include <sys/types.h>
19682#include <sys/ioctl.h>
f73dda09
JA
19683#ifdef TIOCGWINSZ
19684 yes
19685#endif
19686
19687_ACEOF
19688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 19689 $EGREP "yes" >/dev/null 2>&1; then :
f73dda09 19690 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
ccc6cda3 19691else
f73dda09 19692 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
ccc6cda3
JA
19693fi
19694rm -f conftest*
f73dda09 19695
ccc6cda3 19696fi
ac50fbac 19697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
3185942a 19698$as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
f73dda09
JA
19699
19700 if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
ccc6cda3 19701
ac50fbac 19702$as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3 19703
f73dda09 19704 fi
ccc6cda3
JA
19705fi
19706
ac50fbac 19707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5
3185942a 19708$as_echo_n "checking for TIOCSTAT in sys/ioctl.h... " >&6; }
ac50fbac 19709if ${bash_cv_tiocstat_in_ioctl+:} false; then :
3185942a 19710 $as_echo_n "(cached) " >&6
ccc6cda3 19711else
ac50fbac 19712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19713/* end confdefs.h. */
ccc6cda3
JA
19714#include <sys/types.h>
19715#include <sys/ioctl.h>
f73dda09
JA
19716int
19717main ()
19718{
ccc6cda3 19719int x = TIOCSTAT;
f73dda09
JA
19720 ;
19721 return 0;
19722}
19723_ACEOF
ac50fbac 19724if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
19725 bash_cv_tiocstat_in_ioctl=yes
19726else
ac50fbac 19727 bash_cv_tiocstat_in_ioctl=no
ccc6cda3 19728fi
3185942a 19729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
19730fi
19731
ac50fbac 19732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5
3185942a 19733$as_echo "$bash_cv_tiocstat_in_ioctl" >&6; }
f73dda09 19734if test $bash_cv_tiocstat_in_ioctl = yes; then
ac50fbac 19735$as_echo "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3
JA
19736
19737fi
19738
ac50fbac 19739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5
3185942a 19740$as_echo_n "checking for FIONREAD in sys/ioctl.h... " >&6; }
ac50fbac 19741if ${bash_cv_fionread_in_ioctl+:} false; then :
3185942a 19742 $as_echo_n "(cached) " >&6
ccc6cda3 19743else
ac50fbac 19744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19745/* end confdefs.h. */
ccc6cda3
JA
19746#include <sys/types.h>
19747#include <sys/ioctl.h>
f73dda09
JA
19748int
19749main ()
19750{
ccc6cda3 19751int x = FIONREAD;
f73dda09
JA
19752 ;
19753 return 0;
19754}
19755_ACEOF
ac50fbac 19756if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
19757 bash_cv_fionread_in_ioctl=yes
19758else
ac50fbac 19759 bash_cv_fionread_in_ioctl=no
ccc6cda3 19760fi
3185942a 19761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
19762fi
19763
ac50fbac 19764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5
3185942a 19765$as_echo "$bash_cv_fionread_in_ioctl" >&6; }
f73dda09 19766if test $bash_cv_fionread_in_ioctl = yes; then
ac50fbac 19767$as_echo "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3
JA
19768
19769fi
19770
b80f6443 19771
95732b49 19772
ac50fbac 19773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5
3185942a 19774$as_echo_n "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; }
ac50fbac 19775if ${bash_cv_wcontinued_broken+:} false; then :
3185942a 19776 $as_echo_n "(cached) " >&6
95732b49 19777else
ac50fbac
CR
19778 if test "$cross_compiling" = yes; then :
19779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5
3185942a 19780$as_echo "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&2;}
95732b49
JA
19781 bash_cv_wcontinued_broken=no
19782
19783else
ac50fbac 19784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19785/* end confdefs.h. */
95732b49
JA
19786
19787#include <sys/types.h>
19788#include <sys/wait.h>
19789#include <unistd.h>
19790#include <errno.h>
8868edaf 19791#include <stdlib.h>
95732b49
JA
19792
19793#ifndef errno
19794extern int errno;
19795#endif
8868edaf 19796int
95732b49
JA
19797main()
19798{
19799 int x;
19800
19801 x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED);
19802 if (x == -1 && errno == EINVAL)
19803 exit (1);
19804 else
19805 exit (0);
19806}
19807
19808_ACEOF
ac50fbac 19809if ac_fn_c_try_run "$LINENO"; then :
95732b49
JA
19810 bash_cv_wcontinued_broken=no
19811else
ac50fbac 19812 bash_cv_wcontinued_broken=yes
95732b49 19813fi
ac50fbac
CR
19814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19815 conftest.$ac_objext conftest.beam conftest.$ac_ext
95732b49 19816fi
3185942a 19817
95732b49
JA
19818fi
19819
ac50fbac 19820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcontinued_broken" >&5
3185942a 19821$as_echo "$bash_cv_wcontinued_broken" >&6; }
95732b49 19822if test $bash_cv_wcontinued_broken = yes; then
ac50fbac 19823$as_echo "#define WCONTINUED_BROKEN 1" >>confdefs.h
95732b49
JA
19824
19825fi
19826
19827
ac50fbac 19828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5
3185942a 19829$as_echo_n "checking for speed_t in sys/types.h... " >&6; }
ac50fbac 19830if ${bash_cv_speed_t_in_sys_types+:} false; then :
3185942a 19831 $as_echo_n "(cached) " >&6
d166f048 19832else
ac50fbac 19833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19834/* end confdefs.h. */
d166f048 19835#include <sys/types.h>
f73dda09
JA
19836int
19837main ()
19838{
d166f048 19839speed_t x;
f73dda09
JA
19840 ;
19841 return 0;
19842}
19843_ACEOF
ac50fbac 19844if ac_fn_c_try_compile "$LINENO"; then :
d166f048
JA
19845 bash_cv_speed_t_in_sys_types=yes
19846else
ac50fbac 19847 bash_cv_speed_t_in_sys_types=no
d166f048 19848fi
3185942a 19849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
19850fi
19851
ac50fbac 19852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5
3185942a 19853$as_echo "$bash_cv_speed_t_in_sys_types" >&6; }
f73dda09 19854if test $bash_cv_speed_t_in_sys_types = yes; then
ac50fbac 19855$as_echo "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h
d166f048
JA
19856
19857fi
19858
ac50fbac 19859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5
3185942a 19860$as_echo_n "checking whether getpw functions are declared in pwd.h... " >&6; }
ac50fbac 19861if ${bash_cv_getpw_declared+:} false; then :
3185942a 19862 $as_echo_n "(cached) " >&6
ccc6cda3 19863else
ac50fbac 19864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19865/* end confdefs.h. */
28ef6c31 19866
ccc6cda3 19867#include <sys/types.h>
28ef6c31
JA
19868#ifdef HAVE_UNISTD_H
19869# include <unistd.h>
19870#endif
ccc6cda3 19871#include <pwd.h>
28ef6c31 19872
f73dda09 19873_ACEOF
28ef6c31 19874if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 19875 $EGREP "getpwuid" >/dev/null 2>&1; then :
28ef6c31 19876 bash_cv_getpw_declared=yes
ccc6cda3 19877else
28ef6c31 19878 bash_cv_getpw_declared=no
ccc6cda3
JA
19879fi
19880rm -f conftest*
28ef6c31 19881
ccc6cda3
JA
19882fi
19883
ac50fbac 19884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5
3185942a 19885$as_echo "$bash_cv_getpw_declared" >&6; }
28ef6c31 19886if test $bash_cv_getpw_declared = yes; then
ac50fbac 19887$as_echo "#define HAVE_GETPW_DECLS 1" >>confdefs.h
ccc6cda3
JA
19888
19889fi
19890
ac50fbac 19891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unusable real-time signals due to large values" >&5
3185942a 19892$as_echo_n "checking for unusable real-time signals due to large values... " >&6; }
ac50fbac 19893if ${bash_cv_unusable_rtsigs+:} false; then :
3185942a 19894 $as_echo_n "(cached) " >&6
28ef6c31 19895else
ac50fbac
CR
19896 if test "$cross_compiling" = yes; then :
19897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5
3185942a 19898$as_echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;}
28ef6c31
JA
19899 bash_cv_unusable_rtsigs=yes
19900
19901else
ac50fbac 19902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19903/* end confdefs.h. */
28ef6c31
JA
19904
19905#include <sys/types.h>
19906#include <signal.h>
8868edaf 19907#include <stdlib.h>
28ef6c31
JA
19908
19909#ifndef NSIG
19910# define NSIG 64
19911#endif
19912
8868edaf 19913int
28ef6c31
JA
19914main ()
19915{
19916 int n_sigs = 2 * NSIG;
19917#ifdef SIGRTMIN
19918 int rtmin = SIGRTMIN;
19919#else
19920 int rtmin = 0;
19921#endif
19922
19923 exit(rtmin < n_sigs);
19924}
f73dda09 19925_ACEOF
ac50fbac 19926if ac_fn_c_try_run "$LINENO"; then :
28ef6c31
JA
19927 bash_cv_unusable_rtsigs=yes
19928else
ac50fbac 19929 bash_cv_unusable_rtsigs=no
28ef6c31 19930fi
ac50fbac
CR
19931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19932 conftest.$ac_objext conftest.beam conftest.$ac_ext
28ef6c31 19933fi
3185942a 19934
28ef6c31
JA
19935fi
19936
ac50fbac 19937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_unusable_rtsigs" >&5
3185942a 19938$as_echo "$bash_cv_unusable_rtsigs" >&6; }
28ef6c31 19939if test $bash_cv_unusable_rtsigs = yes; then
ac50fbac 19940$as_echo "#define UNUSABLE_RT_SIGNALS 1" >>confdefs.h
28ef6c31
JA
19941
19942fi
19943
b80f6443
JA
19944
19945
19946
19947
f73dda09
JA
19948if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
19949 SIGLIST_O=siglist.o
19950else
19951 SIGLIST_O=
19952fi
ccc6cda3 19953
b80f6443
JA
19954
19955
ccc6cda3 19956case "$host_os" in
ac50fbac 19957hpux*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
3185942a 19958$as_echo_n "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; }
ac50fbac 19959if ${bash_cv_kernel_rlimit+:} false; then :
3185942a 19960 $as_echo_n "(cached) " >&6
ccc6cda3 19961else
ac50fbac 19962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19963/* end confdefs.h. */
ccc6cda3
JA
19964
19965#include <sys/types.h>
19966#include <sys/resource.h>
19967
f73dda09
JA
19968int
19969main ()
19970{
ccc6cda3
JA
19971
19972 int f;
19973 f = RLIMIT_DATA;
19974
f73dda09
JA
19975 ;
19976 return 0;
19977}
19978_ACEOF
ac50fbac 19979if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
19980 bash_cv_kernel_rlimit=no
19981else
ac50fbac 19982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19983/* end confdefs.h. */
ccc6cda3 19984
cce855bc
JA
19985#include <sys/types.h>
19986#define _KERNEL
19987#include <sys/resource.h>
19988#undef _KERNEL
19989
f73dda09
JA
19990int
19991main ()
19992{
ccc6cda3
JA
19993
19994 int f;
19995 f = RLIMIT_DATA;
cce855bc 19996
f73dda09
JA
19997 ;
19998 return 0;
19999}
20000_ACEOF
ac50fbac 20001if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
20002 bash_cv_kernel_rlimit=yes
20003else
ac50fbac 20004 bash_cv_kernel_rlimit=no
ccc6cda3 20005fi
3185942a 20006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
20007
20008fi
3185942a 20009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
20010fi
20011
ac50fbac 20012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_kernel_rlimit" >&5
3185942a 20013$as_echo "$bash_cv_kernel_rlimit" >&6; }
ccc6cda3 20014if test $bash_cv_kernel_rlimit = yes; then
ac50fbac 20015$as_echo "#define RLIMIT_NEEDS_KERNEL 1" >>confdefs.h
ccc6cda3
JA
20016
20017fi
20018 ;;
20019esac
20020
20021if test "$opt_readline" = yes; then
d166f048
JA
20022case "$host_os" in
20023aix*) prefer_curses=yes ;;
20024esac
ccc6cda3
JA
20025
20026if test "X$bash_cv_termcap_lib" = "X"; then
20027_bash_needmsg=yes
20028else
ac50fbac 20029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 20030$as_echo_n "checking which library has the termcap functions... " >&6; }
ccc6cda3
JA
20031_bash_needmsg=
20032fi
ac50fbac 20033if ${bash_cv_termcap_lib+:} false; then :
3185942a 20034 $as_echo_n "(cached) " >&6
b80f6443 20035else
ac50fbac
CR
20036 ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
20037if test "x$ac_cv_func_tgetent" = xyes; then :
b80f6443
JA
20038 bash_cv_termcap_lib=libc
20039else
ac50fbac 20040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
3185942a 20041$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
ac50fbac 20042if ${ac_cv_lib_termcap_tgetent+:} false; then :
3185942a 20043 $as_echo_n "(cached) " >&6
ccc6cda3 20044else
f73dda09 20045 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 20046LIBS="-ltermcap $LIBS"
ac50fbac 20047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20048/* end confdefs.h. */
f73dda09 20049
3185942a
JA
20050/* Override any GCC internal prototype to avoid an error.
20051 Use char because int might match the return type of a GCC
20052 builtin and then its argument prototype would still apply. */
f73dda09
JA
20053#ifdef __cplusplus
20054extern "C"
20055#endif
f73dda09
JA
20056char tgetent ();
20057int
20058main ()
20059{
3185942a 20060return tgetent ();
f73dda09
JA
20061 ;
20062 return 0;
20063}
20064_ACEOF
ac50fbac 20065if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
20066 ac_cv_lib_termcap_tgetent=yes
20067else
ac50fbac 20068 ac_cv_lib_termcap_tgetent=no
f73dda09 20069fi
ac50fbac
CR
20070rm -f core conftest.err conftest.$ac_objext \
20071 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
20072LIBS=$ac_check_lib_save_LIBS
20073fi
ac50fbac 20074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
3185942a 20075$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
ac50fbac 20076if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
ccc6cda3
JA
20077 bash_cv_termcap_lib=libtermcap
20078else
ac50fbac 20079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
3185942a 20080$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
ac50fbac 20081if ${ac_cv_lib_tinfo_tgetent+:} false; then :
3185942a 20082 $as_echo_n "(cached) " >&6
ccc6cda3 20083else
f73dda09
JA
20084 ac_check_lib_save_LIBS=$LIBS
20085LIBS="-ltinfo $LIBS"
ac50fbac 20086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20087/* end confdefs.h. */
f73dda09 20088
3185942a
JA
20089/* Override any GCC internal prototype to avoid an error.
20090 Use char because int might match the return type of a GCC
20091 builtin and then its argument prototype would still apply. */
f73dda09
JA
20092#ifdef __cplusplus
20093extern "C"
20094#endif
f73dda09
JA
20095char tgetent ();
20096int
20097main ()
20098{
3185942a 20099return tgetent ();
f73dda09
JA
20100 ;
20101 return 0;
20102}
20103_ACEOF
ac50fbac 20104if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
20105 ac_cv_lib_tinfo_tgetent=yes
20106else
ac50fbac 20107 ac_cv_lib_tinfo_tgetent=no
f73dda09 20108fi
ac50fbac
CR
20109rm -f core conftest.err conftest.$ac_objext \
20110 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
20111LIBS=$ac_check_lib_save_LIBS
20112fi
ac50fbac 20113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
3185942a 20114$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
ac50fbac 20115if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
7117c2d2 20116 bash_cv_termcap_lib=libtinfo
f73dda09 20117else
ac50fbac 20118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
3185942a 20119$as_echo_n "checking for tgetent in -lcurses... " >&6; }
ac50fbac 20120if ${ac_cv_lib_curses_tgetent+:} false; then :
3185942a 20121 $as_echo_n "(cached) " >&6
f73dda09
JA
20122else
20123 ac_check_lib_save_LIBS=$LIBS
20124LIBS="-lcurses $LIBS"
ac50fbac 20125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20126/* end confdefs.h. */
ccc6cda3 20127
3185942a
JA
20128/* Override any GCC internal prototype to avoid an error.
20129 Use char because int might match the return type of a GCC
20130 builtin and then its argument prototype would still apply. */
f73dda09
JA
20131#ifdef __cplusplus
20132extern "C"
20133#endif
f73dda09
JA
20134char tgetent ();
20135int
20136main ()
20137{
3185942a 20138return tgetent ();
f73dda09
JA
20139 ;
20140 return 0;
20141}
20142_ACEOF
ac50fbac 20143if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
20144 ac_cv_lib_curses_tgetent=yes
20145else
ac50fbac 20146 ac_cv_lib_curses_tgetent=no
f73dda09 20147fi
ac50fbac
CR
20148rm -f core conftest.err conftest.$ac_objext \
20149 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
20150LIBS=$ac_check_lib_save_LIBS
20151fi
ac50fbac 20152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
3185942a 20153$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
ac50fbac 20154if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
ccc6cda3
JA
20155 bash_cv_termcap_lib=libcurses
20156else
ac50fbac 20157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
3185942a 20158$as_echo_n "checking for tgetent in -lncurses... " >&6; }
ac50fbac 20159if ${ac_cv_lib_ncurses_tgetent+:} false; then :
3185942a 20160 $as_echo_n "(cached) " >&6
ccc6cda3 20161else
f73dda09 20162 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 20163LIBS="-lncurses $LIBS"
ac50fbac 20164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20165/* end confdefs.h. */
f73dda09 20166
3185942a
JA
20167/* Override any GCC internal prototype to avoid an error.
20168 Use char because int might match the return type of a GCC
20169 builtin and then its argument prototype would still apply. */
f73dda09
JA
20170#ifdef __cplusplus
20171extern "C"
20172#endif
f73dda09
JA
20173char tgetent ();
20174int
20175main ()
20176{
3185942a 20177return tgetent ();
f73dda09
JA
20178 ;
20179 return 0;
20180}
20181_ACEOF
ac50fbac 20182if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
20183 ac_cv_lib_ncurses_tgetent=yes
20184else
ac50fbac 20185 ac_cv_lib_ncurses_tgetent=no
f73dda09 20186fi
ac50fbac
CR
20187rm -f core conftest.err conftest.$ac_objext \
20188 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
20189LIBS=$ac_check_lib_save_LIBS
20190fi
ac50fbac 20191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
3185942a 20192$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
ac50fbac 20193if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
f73dda09 20194 bash_cv_termcap_lib=libncurses
d233b485
CR
20195else
20196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
20197$as_echo_n "checking for tgetent in -lncursesw... " >&6; }
20198if ${ac_cv_lib_ncursesw_tgetent+:} false; then :
20199 $as_echo_n "(cached) " >&6
20200else
20201 ac_check_lib_save_LIBS=$LIBS
20202LIBS="-lncursesw $LIBS"
20203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20204/* end confdefs.h. */
20205
20206/* Override any GCC internal prototype to avoid an error.
20207 Use char because int might match the return type of a GCC
20208 builtin and then its argument prototype would still apply. */
20209#ifdef __cplusplus
20210extern "C"
20211#endif
20212char tgetent ();
20213int
20214main ()
20215{
20216return tgetent ();
20217 ;
20218 return 0;
20219}
20220_ACEOF
20221if ac_fn_c_try_link "$LINENO"; then :
20222 ac_cv_lib_ncursesw_tgetent=yes
20223else
20224 ac_cv_lib_ncursesw_tgetent=no
20225fi
20226rm -f core conftest.err conftest.$ac_objext \
20227 conftest$ac_exeext conftest.$ac_ext
20228LIBS=$ac_check_lib_save_LIBS
20229fi
20230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
20231$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; }
20232if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then :
20233 bash_cv_termcap_lib=libncursesw
ccc6cda3 20234else
f73dda09 20235 bash_cv_termcap_lib=gnutermcap
ccc6cda3 20236fi
ccc6cda3 20237
ccc6cda3
JA
20238fi
20239
20240fi
20241
20242fi
20243
20244fi
20245
b80f6443
JA
20246fi
20247
d233b485
CR
20248fi
20249
ccc6cda3 20250if test "X$_bash_needmsg" = "Xyes"; then
ac50fbac 20251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 20252$as_echo_n "checking which library has the termcap functions... " >&6; }
ccc6cda3 20253fi
ac50fbac 20254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5
3185942a 20255$as_echo "using $bash_cv_termcap_lib" >&6; }
cce855bc 20256if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
20257LDFLAGS="$LDFLAGS -L./lib/termcap"
20258TERMCAP_LIB="./lib/termcap/libtermcap.a"
20259TERMCAP_DEP="./lib/termcap/libtermcap.a"
d166f048 20260elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
20261TERMCAP_LIB=-ltermcap
20262TERMCAP_DEP=
f73dda09
JA
20263elif test $bash_cv_termcap_lib = libtinfo; then
20264TERMCAP_LIB=-ltinfo
20265TERMCAP_DEP=
ccc6cda3
JA
20266elif test $bash_cv_termcap_lib = libncurses; then
20267TERMCAP_LIB=-lncurses
20268TERMCAP_DEP=
b80f6443
JA
20269elif test $bash_cv_termcap_lib = libc; then
20270TERMCAP_LIB=
20271TERMCAP_DEP=
ccc6cda3
JA
20272else
20273TERMCAP_LIB=-lcurses
20274TERMCAP_DEP=
20275fi
20276
20277fi
20278
b80f6443
JA
20279
20280
ac50fbac 20281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/fd is available" >&5
3185942a 20282$as_echo_n "checking whether /dev/fd is available... " >&6; }
ac50fbac 20283if ${bash_cv_dev_fd+:} false; then :
3185942a 20284 $as_echo_n "(cached) " >&6
d166f048 20285else
0628567a 20286 bash_cv_dev_fd=""
3185942a 20287if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then
95732b49 20288# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
3185942a 20289 if (exec test -r /dev/fd/3 3</dev/null) ; then
95732b49
JA
20290 bash_cv_dev_fd=standard
20291 else
20292 bash_cv_dev_fd=absent
20293 fi
0628567a
JA
20294fi
20295if test -z "$bash_cv_dev_fd" ; then
3185942a 20296 if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
0628567a
JA
20297 bash_cv_dev_fd=whacky
20298 else
20299 bash_cv_dev_fd=absent
20300 fi
20301fi
d166f048
JA
20302
20303fi
20304
ac50fbac 20305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_fd" >&5
3185942a 20306$as_echo "$bash_cv_dev_fd" >&6; }
d166f048 20307if test $bash_cv_dev_fd = "standard"; then
ac50fbac 20308 $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h
d166f048 20309
ac50fbac 20310 $as_echo "#define DEV_FD_PREFIX \"/dev/fd/\"" >>confdefs.h
d166f048
JA
20311
20312elif test $bash_cv_dev_fd = "whacky"; then
ac50fbac 20313 $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h
d166f048 20314
ac50fbac 20315 $as_echo "#define DEV_FD_PREFIX \"/proc/self/fd/\"" >>confdefs.h
d166f048
JA
20316
20317fi
20318
ac50fbac 20319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/stdin stdout stderr are available" >&5
3185942a 20320$as_echo_n "checking whether /dev/stdin stdout stderr are available... " >&6; }
ac50fbac 20321if ${bash_cv_dev_stdin+:} false; then :
3185942a 20322 $as_echo_n "(cached) " >&6
bb70624e 20323else
d233b485 20324 if (exec test -r /dev/stdin < /dev/null) ; then
bb70624e
JA
20325 bash_cv_dev_stdin=present
20326 else
20327 bash_cv_dev_stdin=absent
20328 fi
20329
20330fi
20331
ac50fbac 20332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_stdin" >&5
3185942a 20333$as_echo "$bash_cv_dev_stdin" >&6; }
bb70624e 20334if test $bash_cv_dev_stdin = "present"; then
ac50fbac 20335 $as_echo "#define HAVE_DEV_STDIN 1" >>confdefs.h
bb70624e
JA
20336
20337fi
20338
ac50fbac 20339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5
3185942a 20340$as_echo_n "checking for default mail directory... " >&6; }
ac50fbac 20341if ${bash_cv_mail_dir+:} false; then :
3185942a 20342 $as_echo_n "(cached) " >&6
ccc6cda3
JA
20343else
20344 if test -d /var/mail; then
20345 bash_cv_mail_dir=/var/mail
ccc6cda3
JA
20346 elif test -d /var/spool/mail; then
20347 bash_cv_mail_dir=/var/spool/mail
7117c2d2
JA
20348 elif test -d /usr/mail; then
20349 bash_cv_mail_dir=/usr/mail
e8ce775d
JA
20350 elif test -d /usr/spool/mail; then
20351 bash_cv_mail_dir=/usr/spool/mail
ccc6cda3
JA
20352 else
20353 bash_cv_mail_dir=unknown
20354 fi
20355
20356fi
20357
ac50fbac 20358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_mail_dir" >&5
3185942a 20359$as_echo "$bash_cv_mail_dir" >&6; }
b80f6443
JA
20360cat >>confdefs.h <<_ACEOF
20361#define DEFAULT_MAIL_DIRECTORY "$bash_cv_mail_dir"
20362_ACEOF
20363
20364
ccc6cda3 20365
ccc6cda3
JA
20366if test "$bash_cv_job_control_missing" = missing; then
20367 opt_job_control=no
20368fi
20369
20370if test "$opt_job_control" = yes; then
ac50fbac 20371$as_echo "#define JOB_CONTROL 1" >>confdefs.h
ccc6cda3
JA
20372
20373JOBS_O=jobs.o
20374else
20375JOBS_O=nojobs.o
20376fi
20377
b80f6443
JA
20378
20379
20380
d166f048
JA
20381LOCAL_DEFS=-DSHELL
20382
b80f6443 20383
b72432fd 20384case "${host_os}" in
ac50fbac 20385sysv4.2*) $as_echo "#define SVR4_2 1" >>confdefs.h
ccc6cda3 20386
ac50fbac 20387 $as_echo "#define SVR4 1" >>confdefs.h
ccc6cda3 20388 ;;
ac50fbac 20389sysv4*) $as_echo "#define SVR4 1" >>confdefs.h
ccc6cda3 20390 ;;
ac50fbac 20391sysv5*) $as_echo "#define SVR5 1" >>confdefs.h
b72432fd 20392 ;;
8868edaf
CR
20393hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;;
20394hpux*) LOCAL_CFLAGS="-DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;;
ccc6cda3 20395dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
bb70624e
JA
20396isc*) LOCAL_CFLAGS=-Disc386 ;;
20397rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;;
f73dda09 20398darwin*) LOCAL_CFLAGS=-DMACOSX ;;
7117c2d2
JA
20399sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;;
20400sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;;
ccc6cda3 20401sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
d166f048 20402sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
f1be666c 20403solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
17345e5a
JA
20404solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;;
20405solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;;
20406solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;;
f1be666c 20407solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
b72432fd 20408lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
95732b49
JA
20409linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
20410 case "`uname -r`" in
d233b485
CR
20411 1.*|2.[0123]*) : ;;
20412 *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h
95732b49
JA
20413 ;;
20414 esac ;;
d233b485 20415netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;;
8868edaf 20416freebsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;;
d233b485 20417*qnx[67]*) LOCAL_LIBS="-lncurses" ;;
7117c2d2 20418*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
b72432fd 20419powerux*) LOCAL_LIBS="-lgen" ;;
b80f6443 20420cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
ac50fbac
CR
20421opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;;
20422*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;;
b72432fd
JA
20423esac
20424
20425case "${host_os}-${CC}" in
20426aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;;
20427aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;
20428bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
a0c0a00f
CR
20429bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
20430hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading
ccc6cda3
JA
20431esac
20432
bb70624e 20433case "${host_os}" in
28ef6c31
JA
20434freebsd[3-9]*)
20435 if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then
bb70624e
JA
20436 LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
20437 fi ;;
28ef6c31 20438freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
95732b49 20439dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
bb70624e
JA
20440esac
20441
ccc6cda3
JA
20442case "$host_cpu" in
20443*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
20444esac
20445
20446case "$host_cpu-$host_os" in
20447ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
20448esac
20449
20450case "$host_cpu-$host_vendor-$host_os" in
20451m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
20452mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
20453esac
20454
d233b485 20455# turn off paren warnings in gcc
8868edaf 20456CFLAGS="$CFLAGS ${STYLE_CFLAGS}"
d233b485 20457
b72432fd
JA
20458#
20459# Shared object configuration section. These values are generated by
20460# ${srcdir}/support/shobj-conf
20461#
20462if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf
20463then
ac50fbac 20464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5
3185942a 20465$as_echo_n "checking shared object configuration for loadable builtins... " >&6; }
28ef6c31 20466 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
f73dda09 20467
b80f6443
JA
20468
20469
20470
20471
20472
20473
ac50fbac 20474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5
3185942a 20475$as_echo "$SHOBJ_STATUS" >&6; }
d233b485
CR
20476else
20477 SHOBJ_STATUS=unsupported
20478
b72432fd
JA
20479fi
20480
ccc6cda3
JA
20481# try to create a directory tree if the source is elsewhere
20482# this should be packaged into a script accessible via ${srcdir}/support
20483case "$srcdir" in
20484.) ;;
cce855bc 20485*) for d in doc tests support lib examples; do # dirs
ccc6cda3
JA
20486 test -d $d || mkdir $d
20487 done
cce855bc 20488 for ld in readline glob tilde malloc sh termcap; do # libdirs
ccc6cda3
JA
20489 test -d lib/$ld || mkdir lib/$ld
20490 done
cce855bc 20491 test -d examples/loadables || mkdir examples/loadables # loadable builtins
bb70624e 20492 test -d examples/loadables/perl || mkdir examples/loadables/perl
ccc6cda3
JA
20493 ;;
20494esac
20495
20496BUILD_DIR=`pwd`
95732b49
JA
20497case "$BUILD_DIR" in
20498*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
20499*) ;;
20500esac
ccc6cda3 20501
3185942a
JA
20502if test -z "$localedir"; then
20503 localedir='${datarootdir}/locale'
20504fi
20505if test -z "$datarootdir"; then
20506 datarootdir='${prefix}/share'
20507fi
20508
20509
20510
20511
b80f6443
JA
20512
20513
3185942a 20514# Some versions of autoconf don't substitute these automatically
b80f6443
JA
20515
20516
20517
a0c0a00f
CR
20518# directory where we install dynamically loadable builtins
20519if test -z "$loadablesdir"; then
20520 loadablesdir='${libdir}/bash'
20521fi
20522
20523if test -z "$headersdir"; then
20524 headersdir='$(includedir)/$(PACKAGE_NAME)'
20525fi
20526
20527
b80f6443
JA
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
d166f048
JA
20546#AC_SUBST(ALLOCA_SOURCE)
20547#AC_SUBST(ALLOCA_OBJECT)
20548
d233b485 20549ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/Makefile.inc examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh"
3185942a
JA
20550
20551ac_config_commands="$ac_config_commands default"
20552
f73dda09 20553cat >confcache <<\_ACEOF
ccc6cda3
JA
20554# This file is a shell script that caches the results of configure
20555# tests run on this system so they can be shared between configure
f73dda09
JA
20556# scripts and configure runs, see configure's option --config-cache.
20557# It is not useful on other systems. If it contains results you don't
20558# want to keep, you may remove or edit it.
726f6388 20559#
f73dda09
JA
20560# config.status only pays attention to the cache file if you give it
20561# the --recheck option to rerun configure.
ccc6cda3 20562#
0628567a 20563# `ac_cv_env_foo' variables (set or unset) will be overridden when
f73dda09
JA
20564# loading this file, other *unset* `ac_cv_foo' will be assigned the
20565# following values.
20566
20567_ACEOF
20568
ccc6cda3
JA
20569# The following way of writing the cache mishandles newlines in values,
20570# but we know of no workaround that is simple, portable, and efficient.
3185942a 20571# So, we kill variables containing newlines.
ccc6cda3
JA
20572# Ultrix sh set writes to stderr and can't be redirected directly,
20573# and sets the high bit in the cache file unless we assign to the vars.
3185942a
JA
20574(
20575 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20576 eval ac_val=\$$ac_var
20577 case $ac_val in #(
20578 *${as_nl}*)
20579 case $ac_var in #(
ac50fbac 20580 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3185942a
JA
20581$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20582 esac
20583 case $ac_var in #(
20584 _ | IFS | as_nl) ;; #(
20585 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
ac50fbac 20586 *) { eval $ac_var=; unset $ac_var;} ;;
3185942a
JA
20587 esac ;;
20588 esac
20589 done
20590
f73dda09 20591 (set) 2>&1 |
3185942a
JA
20592 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20593 *${as_nl}ac_space=\ *)
ac50fbac
CR
20594 # `set' does not quote correctly, so add quotes: double-quote
20595 # substitution turns \\\\ into \\, and sed turns \\ into \.
f73dda09 20596 sed -n \
0628567a
JA
20597 "s/'/'\\\\''/g;
20598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
3185942a 20599 ;; #(
f73dda09
JA
20600 *)
20601 # `set' quotes correctly as required by POSIX, so do not add quotes.
3185942a 20602 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
f73dda09 20603 ;;
3185942a
JA
20604 esac |
20605 sort
20606) |
f73dda09 20607 sed '
3185942a 20608 /^ac_cv_env_/b end
f73dda09 20609 t clear
3185942a 20610 :clear
f73dda09
JA
20611 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20612 t end
3185942a
JA
20613 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20614 :end' >>confcache
20615if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20616 if test -w "$cache_file"; then
ac50fbac
CR
20617 if test "x$cache_file" != "x/dev/null"; then
20618 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
3185942a 20619$as_echo "$as_me: updating cache $cache_file" >&6;}
ac50fbac
CR
20620 if test ! -f "$cache_file" || test -h "$cache_file"; then
20621 cat confcache >"$cache_file"
20622 else
20623 case $cache_file in #(
20624 */* | ?:*)
20625 mv -f confcache "$cache_file"$$ &&
20626 mv -f "$cache_file"$$ "$cache_file" ;; #(
20627 *)
20628 mv -f confcache "$cache_file" ;;
20629 esac
20630 fi
20631 fi
ccc6cda3 20632 else
ac50fbac 20633 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
3185942a 20634$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ccc6cda3
JA
20635 fi
20636fi
20637rm -f confcache
20638
ccc6cda3
JA
20639test "x$prefix" = xNONE && prefix=$ac_default_prefix
20640# Let make expand exec_prefix.
20641test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20642
ccc6cda3
JA
20643DEFS=-DHAVE_CONFIG_H
20644
0628567a
JA
20645ac_libobjs=
20646ac_ltlibobjs=
ac50fbac 20647U=
0628567a
JA
20648for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20649 # 1. Remove the extension, and $U if already installed.
3185942a
JA
20650 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20651 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20652 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20653 # will be set to the directory where LIBOBJS objects are built.
ac50fbac
CR
20654 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20655 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
0628567a
JA
20656done
20657LIBOBJS=$ac_libobjs
20658
20659LTLIBOBJS=$ac_ltlibobjs
20660
20661
b80f6443 20662
3185942a 20663
ac50fbac 20664: "${CONFIG_STATUS=./config.status}"
3185942a 20665ac_write_fail=0
f73dda09
JA
20666ac_clean_files_save=$ac_clean_files
20667ac_clean_files="$ac_clean_files $CONFIG_STATUS"
ac50fbac 20668{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
3185942a 20669$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
ac50fbac
CR
20670as_write_fail=0
20671cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
f73dda09 20672#! $SHELL
b80f6443 20673# Generated by $as_me.
ccc6cda3 20674# Run this file to recreate the current configuration.
ccc6cda3 20675# Compiler output produced by configure, useful for debugging
f73dda09 20676# configure, is in config.log if it exists.
ccc6cda3 20677
f73dda09 20678debug=false
0628567a
JA
20679ac_cs_recheck=false
20680ac_cs_silent=false
f73dda09 20681
ac50fbac
CR
20682SHELL=\${CONFIG_SHELL-$SHELL}
20683export SHELL
20684_ASEOF
20685cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20686## -------------------- ##
20687## M4sh Initialization. ##
20688## -------------------- ##
b80f6443 20689
3185942a
JA
20690# Be more Bourne compatible
20691DUALCASE=1; export DUALCASE # for MKS sh
ac50fbac 20692if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
f73dda09
JA
20693 emulate sh
20694 NULLCMD=:
3185942a 20695 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
0628567a
JA
20696 # is contrary to our usage. Disable this feature.
20697 alias -g '${1+"$@"}'='"$@"'
3185942a
JA
20698 setopt NO_GLOB_SUBST
20699else
ac50fbac
CR
20700 case `(set -o) 2>/dev/null` in #(
20701 *posix*) :
20702 set -o posix ;; #(
20703 *) :
20704 ;;
3185942a 20705esac
3185942a
JA
20706fi
20707
20708
3185942a
JA
20709as_nl='
20710'
20711export as_nl
20712# Printing a long string crashes Solaris 7 /usr/bin/printf.
20713as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20714as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20715as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
ac50fbac
CR
20716# Prefer a ksh shell builtin over an external printf program on Solaris,
20717# but without wasting forks for bash or zsh.
20718if test -z "$BASH_VERSION$ZSH_VERSION" \
20719 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20720 as_echo='print -r --'
20721 as_echo_n='print -rn --'
20722elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
3185942a
JA
20723 as_echo='printf %s\n'
20724 as_echo_n='printf %s'
20725else
20726 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20727 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20728 as_echo_n='/usr/ucb/echo -n'
20729 else
20730 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20731 as_echo_n_body='eval
20732 arg=$1;
ac50fbac 20733 case $arg in #(
3185942a
JA
20734 *"$as_nl"*)
20735 expr "X$arg" : "X\\(.*\\)$as_nl";
20736 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20737 esac;
20738 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20739 '
20740 export as_echo_n_body
20741 as_echo_n='sh -c $as_echo_n_body as_echo'
20742 fi
20743 export as_echo_body
20744 as_echo='sh -c $as_echo_body as_echo'
20745fi
20746
20747# The user is always right.
20748if test "${PATH_SEPARATOR+set}" != set; then
20749 PATH_SEPARATOR=:
20750 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20751 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20752 PATH_SEPARATOR=';'
20753 }
f73dda09
JA
20754fi
20755
0628567a 20756
3185942a
JA
20757# IFS
20758# We need space, tab and new line, in precisely that order. Quoting is
20759# there to prevent editors from complaining about space-tab.
20760# (If _AS_PATH_WALK were called with IFS unset, it would disable word
20761# splitting by setting IFS to empty value.)
20762IFS=" "" $as_nl"
20763
20764# Find who we are. Look in the path if we contain no directory separator.
ac50fbac
CR
20765as_myself=
20766case $0 in #((
3185942a
JA
20767 *[\\/]* ) as_myself=$0 ;;
20768 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20769for as_dir in $PATH
20770do
20771 IFS=$as_save_IFS
20772 test -z "$as_dir" && as_dir=.
ac50fbac
CR
20773 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20774 done
3185942a
JA
20775IFS=$as_save_IFS
20776
20777 ;;
20778esac
20779# We did not find ourselves, most probably we were run as `sh COMMAND'
20780# in which case we are not to be found in the path.
20781if test "x$as_myself" = x; then
20782 as_myself=$0
20783fi
20784if test ! -f "$as_myself"; then
20785 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ac50fbac 20786 exit 1
3185942a
JA
20787fi
20788
ac50fbac
CR
20789# Unset variables that we do not need and which cause bugs (e.g. in
20790# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20791# suppresses any "Segmentation fault" message there. '((' could
20792# trigger a bug in pdksh 5.2.14.
20793for as_var in BASH_ENV ENV MAIL MAILPATH
20794do eval test x\${$as_var+set} = xset \
20795 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
3185942a 20796done
0628567a
JA
20797PS1='$ '
20798PS2='> '
20799PS4='+ '
20800
20801# NLS nuisances.
3185942a
JA
20802LC_ALL=C
20803export LC_ALL
20804LANGUAGE=C
20805export LANGUAGE
0628567a 20806
ac50fbac
CR
20807# CDPATH.
20808(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20809
20810
20811# as_fn_error STATUS ERROR [LINENO LOG_FD]
20812# ----------------------------------------
20813# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20814# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20815# script with STATUS, using 1 if that was 0.
20816as_fn_error ()
20817{
20818 as_status=$1; test $as_status -eq 0 && as_status=1
20819 if test "$4"; then
20820 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20821 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20822 fi
20823 $as_echo "$as_me: error: $2" >&2
20824 as_fn_exit $as_status
20825} # as_fn_error
20826
20827
20828# as_fn_set_status STATUS
20829# -----------------------
20830# Set $? to STATUS, without forking.
20831as_fn_set_status ()
20832{
20833 return $1
20834} # as_fn_set_status
20835
20836# as_fn_exit STATUS
20837# -----------------
20838# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20839as_fn_exit ()
20840{
20841 set +e
20842 as_fn_set_status $1
20843 exit $1
20844} # as_fn_exit
20845
20846# as_fn_unset VAR
20847# ---------------
20848# Portably unset VAR.
20849as_fn_unset ()
20850{
20851 { eval $1=; unset $1;}
20852}
20853as_unset=as_fn_unset
20854# as_fn_append VAR VALUE
20855# ----------------------
20856# Append the text in VALUE to the end of the definition contained in VAR. Take
20857# advantage of any shell optimizations that allow amortized linear growth over
20858# repeated appends, instead of the typical quadratic growth present in naive
20859# implementations.
20860if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20861 eval 'as_fn_append ()
20862 {
20863 eval $1+=\$2
20864 }'
20865else
20866 as_fn_append ()
20867 {
20868 eval $1=\$$1\$2
20869 }
20870fi # as_fn_append
20871
20872# as_fn_arith ARG...
20873# ------------------
20874# Perform arithmetic evaluation on the ARGs, and store the result in the
20875# global $as_val. Take advantage of shells that can avoid forks. The arguments
20876# must be portable across $(()) and expr.
20877if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20878 eval 'as_fn_arith ()
20879 {
20880 as_val=$(( $* ))
20881 }'
20882else
20883 as_fn_arith ()
20884 {
20885 as_val=`expr "$@" || test $? -eq 1`
20886 }
20887fi # as_fn_arith
20888
20889
3185942a
JA
20890if expr a : '\(a\)' >/dev/null 2>&1 &&
20891 test "X`expr 00001 : '.*\(...\)'`" = X001; then
0628567a
JA
20892 as_expr=expr
20893else
20894 as_expr=false
20895fi
20896
3185942a 20897if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
0628567a
JA
20898 as_basename=basename
20899else
20900 as_basename=false
20901fi
b80f6443 20902
ac50fbac
CR
20903if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20904 as_dirname=dirname
20905else
20906 as_dirname=false
20907fi
b80f6443 20908
3185942a 20909as_me=`$as_basename -- "$0" ||
b80f6443
JA
20910$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20911 X"$0" : 'X\(//\)$' \| \
3185942a
JA
20912 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20913$as_echo X/"$0" |
20914 sed '/^.*\/\([^/][^/]*\)\/*$/{
20915 s//\1/
20916 q
20917 }
20918 /^X\/\(\/\/\)$/{
20919 s//\1/
20920 q
20921 }
20922 /^X\/\(\/\).*/{
20923 s//\1/
20924 q
20925 }
20926 s/.*/./; q'`
b80f6443 20927
ac50fbac
CR
20928# Avoid depending upon Character Ranges.
20929as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20930as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20931as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20932as_cr_digits='0123456789'
20933as_cr_alnum=$as_cr_Letters$as_cr_digits
f73dda09 20934
3185942a 20935ECHO_C= ECHO_N= ECHO_T=
ac50fbac 20936case `echo -n x` in #(((((
3185942a 20937-n*)
ac50fbac 20938 case `echo 'xy\c'` in
3185942a 20939 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
ac50fbac
CR
20940 xy) ECHO_C='\c';;
20941 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20942 ECHO_T=' ';;
3185942a
JA
20943 esac;;
20944*)
20945 ECHO_N='-n';;
20946esac
f73dda09
JA
20947
20948rm -f conf$$ conf$$.exe conf$$.file
3185942a
JA
20949if test -d conf$$.dir; then
20950 rm -f conf$$.dir/conf$$.file
20951else
20952 rm -f conf$$.dir
20953 mkdir conf$$.dir 2>/dev/null
20954fi
20955if (echo >conf$$.file) 2>/dev/null; then
20956 if ln -s conf$$.file conf$$ 2>/dev/null; then
f73dda09 20957 as_ln_s='ln -s'
3185942a
JA
20958 # ... but there are two gotchas:
20959 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20960 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
ac50fbac 20961 # In both cases, we have to default to `cp -pR'.
3185942a 20962 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
ac50fbac 20963 as_ln_s='cp -pR'
3185942a
JA
20964 elif ln conf$$.file conf$$ 2>/dev/null; then
20965 as_ln_s=ln
20966 else
ac50fbac 20967 as_ln_s='cp -pR'
f73dda09 20968 fi
f73dda09 20969else
ac50fbac 20970 as_ln_s='cp -pR'
f73dda09 20971fi
3185942a
JA
20972rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20973rmdir conf$$.dir 2>/dev/null
f73dda09 20974
ac50fbac
CR
20975
20976# as_fn_mkdir_p
20977# -------------
20978# Create "$as_dir" as a directory, including parents if necessary.
20979as_fn_mkdir_p ()
20980{
20981
20982 case $as_dir in #(
20983 -*) as_dir=./$as_dir;;
20984 esac
20985 test -d "$as_dir" || eval $as_mkdir_p || {
20986 as_dirs=
20987 while :; do
20988 case $as_dir in #(
20989 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20990 *) as_qdir=$as_dir;;
20991 esac
20992 as_dirs="'$as_qdir' $as_dirs"
20993 as_dir=`$as_dirname -- "$as_dir" ||
20994$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20995 X"$as_dir" : 'X\(//\)[^/]' \| \
20996 X"$as_dir" : 'X\(//\)$' \| \
20997 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20998$as_echo X"$as_dir" |
20999 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21000 s//\1/
21001 q
21002 }
21003 /^X\(\/\/\)[^/].*/{
21004 s//\1/
21005 q
21006 }
21007 /^X\(\/\/\)$/{
21008 s//\1/
21009 q
21010 }
21011 /^X\(\/\).*/{
21012 s//\1/
21013 q
21014 }
21015 s/.*/./; q'`
21016 test -d "$as_dir" && break
21017 done
21018 test -z "$as_dirs" || eval "mkdir $as_dirs"
21019 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
21020
21021
21022} # as_fn_mkdir_p
0628567a 21023if mkdir -p . 2>/dev/null; then
ac50fbac 21024 as_mkdir_p='mkdir -p "$as_dir"'
0628567a
JA
21025else
21026 test -d ./-p && rmdir ./-p
21027 as_mkdir_p=false
21028fi
21029
ac50fbac
CR
21030
21031# as_fn_executable_p FILE
21032# -----------------------
21033# Test if FILE is an executable regular file.
21034as_fn_executable_p ()
21035{
21036 test -f "$1" && test -x "$1"
21037} # as_fn_executable_p
21038as_test_x='test -x'
21039as_executable_p=as_fn_executable_p
b80f6443
JA
21040
21041# Sed expression to map a string onto a valid CPP name.
0628567a 21042as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
b80f6443
JA
21043
21044# Sed expression to map a string onto a valid variable name.
0628567a 21045as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
b80f6443 21046
f73dda09 21047
f73dda09 21048exec 6>&1
ac50fbac
CR
21049## ----------------------------------- ##
21050## Main body of $CONFIG_STATUS script. ##
21051## ----------------------------------- ##
21052_ASEOF
21053test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
f73dda09 21054
ac50fbac
CR
21055cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21056# Save the log message, to keep $0 and so on meaningful, and to
b80f6443 21057# report actual input values of CONFIG_FILES etc. instead of their
3185942a
JA
21058# values after options handling.
21059ac_log="
8868edaf 21060This file was extended by bash $as_me 5.1-release, which was
ac50fbac 21061generated by GNU Autoconf 2.69. Invocation command line was
b80f6443
JA
21062
21063 CONFIG_FILES = $CONFIG_FILES
21064 CONFIG_HEADERS = $CONFIG_HEADERS
21065 CONFIG_LINKS = $CONFIG_LINKS
21066 CONFIG_COMMANDS = $CONFIG_COMMANDS
21067 $ $0 $@
21068
3185942a
JA
21069on `(hostname || uname -n) 2>/dev/null | sed 1q`
21070"
21071
f73dda09
JA
21072_ACEOF
21073
3185942a
JA
21074case $ac_config_files in *"
21075"*) set x $ac_config_files; shift; ac_config_files=$*;;
21076esac
f73dda09 21077
3185942a
JA
21078case $ac_config_headers in *"
21079"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21080esac
f73dda09 21081
f73dda09 21082
3185942a
JA
21083cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21084# Files that config.status was made for.
21085config_files="$ac_config_files"
21086config_headers="$ac_config_headers"
21087config_commands="$ac_config_commands"
f73dda09 21088
3185942a 21089_ACEOF
f73dda09 21090
3185942a 21091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09 21092ac_cs_usage="\
ac50fbac
CR
21093\`$as_me' instantiates files and other configuration actions
21094from templates according to the current configuration. Unless the files
21095and actions are specified as TAGs, all are instantiated by default.
f73dda09 21096
ac50fbac 21097Usage: $0 [OPTION]... [TAG]...
f73dda09
JA
21098
21099 -h, --help print this help, then exit
3185942a 21100 -V, --version print version number and configuration settings, then exit
ac50fbac 21101 --config print configuration, then exit
3185942a
JA
21102 -q, --quiet, --silent
21103 do not print progress messages
f73dda09
JA
21104 -d, --debug don't remove temporary files
21105 --recheck update $as_me by reconfiguring in the same conditions
3185942a
JA
21106 --file=FILE[:TEMPLATE]
21107 instantiate the configuration file FILE
21108 --header=FILE[:TEMPLATE]
21109 instantiate the configuration header FILE
f73dda09
JA
21110
21111Configuration files:
21112$config_files
21113
21114Configuration headers:
21115$config_headers
21116
21117Configuration commands:
21118$config_commands
21119
ac50fbac 21120Report bugs to <bug-bash@gnu.org>."
f73dda09 21121
3185942a
JA
21122_ACEOF
21123cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac50fbac 21124ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
f73dda09 21125ac_cs_version="\\
8868edaf 21126bash config.status 5.1-release
ac50fbac
CR
21127configured by $0, generated by GNU Autoconf 2.69,
21128 with options \\"\$ac_cs_config\\"
f73dda09 21129
ac50fbac 21130Copyright (C) 2012 Free Software Foundation, Inc.
f73dda09
JA
21131This config.status script is free software; the Free Software Foundation
21132gives unlimited permission to copy, distribute and modify it."
3185942a
JA
21133
21134ac_pwd='$ac_pwd'
21135srcdir='$srcdir'
21136INSTALL='$INSTALL'
8868edaf 21137MKDIR_P='$MKDIR_P'
3185942a 21138test -n "\$AWK" || AWK=awk
b80f6443 21139_ACEOF
f73dda09 21140
3185942a
JA
21141cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21142# The default lists apply if the user does not specify any file.
f73dda09
JA
21143ac_need_defaults=:
21144while test $# != 0
ccc6cda3 21145do
f73dda09 21146 case $1 in
ac50fbac 21147 --*=?*)
3185942a
JA
21148 ac_option=`expr "X$1" : 'X\([^=]*\)='`
21149 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
0628567a
JA
21150 ac_shift=:
21151 ;;
ac50fbac
CR
21152 --*=)
21153 ac_option=`expr "X$1" : 'X\([^=]*\)='`
21154 ac_optarg=
21155 ac_shift=:
21156 ;;
3185942a 21157 *)
0628567a
JA
21158 ac_option=$1
21159 ac_optarg=$2
21160 ac_shift=shift
f73dda09 21161 ;;
f73dda09
JA
21162 esac
21163
0628567a 21164 case $ac_option in
f73dda09 21165 # Handling of the options.
0628567a
JA
21166 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21167 ac_cs_recheck=: ;;
3185942a
JA
21168 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21169 $as_echo "$ac_cs_version"; exit ;;
ac50fbac
CR
21170 --config | --confi | --conf | --con | --co | --c )
21171 $as_echo "$ac_cs_config"; exit ;;
3185942a 21172 --debug | --debu | --deb | --de | --d | -d )
f73dda09
JA
21173 debug=: ;;
21174 --file | --fil | --fi | --f )
0628567a 21175 $ac_shift
3185942a
JA
21176 case $ac_optarg in
21177 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
ac50fbac 21178 '') as_fn_error $? "missing file argument" ;;
3185942a 21179 esac
ac50fbac 21180 as_fn_append CONFIG_FILES " '$ac_optarg'"
f73dda09
JA
21181 ac_need_defaults=false;;
21182 --header | --heade | --head | --hea )
0628567a 21183 $ac_shift
3185942a
JA
21184 case $ac_optarg in
21185 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21186 esac
ac50fbac 21187 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
f73dda09 21188 ac_need_defaults=false;;
3185942a
JA
21189 --he | --h)
21190 # Conflict between --help and --header
ac50fbac
CR
21191 as_fn_error $? "ambiguous option: \`$1'
21192Try \`$0 --help' for more information.";;
3185942a
JA
21193 --help | --hel | -h )
21194 $as_echo "$ac_cs_usage"; exit ;;
0628567a
JA
21195 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21196 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21197 ac_cs_silent=: ;;
f73dda09
JA
21198
21199 # This is an error.
ac50fbac
CR
21200 -*) as_fn_error $? "unrecognized option: \`$1'
21201Try \`$0 --help' for more information." ;;
f73dda09 21202
ac50fbac 21203 *) as_fn_append ac_config_targets " $1"
3185942a 21204 ac_need_defaults=false ;;
f73dda09 21205
ccc6cda3 21206 esac
f73dda09 21207 shift
ccc6cda3
JA
21208done
21209
0628567a
JA
21210ac_configure_extra_args=
21211
21212if $ac_cs_silent; then
21213 exec 6>/dev/null
21214 ac_configure_extra_args="$ac_configure_extra_args --silent"
21215fi
21216
21217_ACEOF
3185942a 21218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
0628567a 21219if \$ac_cs_recheck; then
ac50fbac 21220 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
3185942a
JA
21221 shift
21222 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21223 CONFIG_SHELL='$SHELL'
21224 export CONFIG_SHELL
21225 exec "\$@"
0628567a
JA
21226fi
21227
b80f6443 21228_ACEOF
3185942a
JA
21229cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21230exec 5>>config.log
21231{
21232 echo
21233 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21234## Running $as_me. ##
21235_ASBOX
21236 $as_echo "$ac_log"
21237} >&5
b80f6443 21238
3185942a
JA
21239_ACEOF
21240cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
b80f6443 21241#
3185942a 21242# INIT-COMMANDS
b80f6443 21243#
b80f6443 21244# Capture the value of obsolete ALL_LINGUAS because we need it to compute
8868edaf
CR
21245 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
21246 OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
b80f6443
JA
21247 # Capture the value of LINGUAS because we need it to compute CATALOGS.
21248 LINGUAS="${LINGUAS-%UNSET%}"
f73dda09 21249
f73dda09
JA
21250
21251_ACEOF
ccc6cda3 21252
3185942a 21253cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b80f6443 21254
3185942a 21255# Handling of arguments.
f73dda09
JA
21256for ac_config_target in $ac_config_targets
21257do
3185942a
JA
21258 case $ac_config_target in
21259 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
8868edaf 21260 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
3185942a
JA
21261 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21262 "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;;
21263 "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;;
21264 "lib/glob/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;;
21265 "lib/intl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;;
21266 "lib/malloc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;;
21267 "lib/sh/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;;
21268 "lib/termcap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;;
21269 "lib/tilde/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;;
21270 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
21271 "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;;
21272 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
21273 "examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;;
a0c0a00f 21274 "examples/loadables/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;;
3185942a 21275 "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;;
a0c0a00f 21276 "support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;;
d233b485 21277 "support/bashbug.sh") CONFIG_FILES="$CONFIG_FILES support/bashbug.sh" ;;
3185942a
JA
21278 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21279
ac50fbac 21280 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
f73dda09
JA
21281 esac
21282done
21283
3185942a 21284
f73dda09
JA
21285# If the user did not use the arguments to specify the items to instantiate,
21286# then the envvar interface is used. Set only those that are not.
21287# We use the long form for the default assignment because of an extremely
21288# bizarre bug on SunOS 4.1.3.
21289if $ac_need_defaults; then
21290 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21291 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21292 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21293fi
21294
0628567a 21295# Have a temporary directory for convenience. Make it in the build tree
3185942a 21296# simply because there is no reason against having it here, and in addition,
0628567a 21297# creating and moving files from /tmp can sometimes cause problems.
3185942a
JA
21298# Hook for its removal unless debugging.
21299# Note that there is a small window in which the directory will not be cleaned:
21300# after its creation but before its name has been assigned to `$tmp'.
f73dda09
JA
21301$debug ||
21302{
ac50fbac 21303 tmp= ac_tmp=
3185942a 21304 trap 'exit_status=$?
ac50fbac
CR
21305 : "${ac_tmp:=$tmp}"
21306 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
3185942a 21307' 0
ac50fbac 21308 trap 'as_fn_exit 1' 1 2 13 15
f73dda09 21309}
f73dda09 21310# Create a (secure) tmp directory for tmp files.
0628567a 21311
f73dda09 21312{
3185942a 21313 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
ac50fbac 21314 test -d "$tmp"
f73dda09
JA
21315} ||
21316{
3185942a
JA
21317 tmp=./conf$$-$RANDOM
21318 (umask 077 && mkdir "$tmp")
ac50fbac
CR
21319} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
21320ac_tmp=$tmp
ccc6cda3 21321
3185942a
JA
21322# Set up the scripts for CONFIG_FILES section.
21323# No need to generate them if there are no CONFIG_FILES.
21324# This happens for instance with `./config.status config.h'.
21325if test -n "$CONFIG_FILES"; then
21326
21327
ac50fbac
CR
21328ac_cr=`echo X | tr X '\015'`
21329# On cygwin, bash can eat \r inside `` if the user requested igncr.
21330# But we know of no other shell where ac_cr would be empty at this
21331# point, so we can use a bashism as a fallback.
21332if test "x$ac_cr" = x; then
21333 eval ac_cr=\$\'\\r\'
21334fi
3185942a
JA
21335ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21336if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
21337 ac_cs_awk_cr='\\r'
21338else
21339 ac_cs_awk_cr=$ac_cr
21340fi
21341
ac50fbac 21342echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
b80f6443 21343_ACEOF
ccc6cda3 21344
ccc6cda3 21345
3185942a
JA
21346{
21347 echo "cat >conf$$subs.awk <<_ACEOF" &&
21348 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21349 echo "_ACEOF"
21350} >conf$$subs.sh ||
ac50fbac
CR
21351 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
21352ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
3185942a
JA
21353ac_delim='%!_!# '
21354for ac_last_try in false false false false false :; do
21355 . ./conf$$subs.sh ||
ac50fbac 21356 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
f73dda09 21357
3185942a
JA
21358 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
21359 if test $ac_delim_n = $ac_delim_num; then
21360 break
21361 elif $ac_last_try; then
ac50fbac 21362 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
3185942a
JA
21363 else
21364 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
ccc6cda3 21365 fi
3185942a
JA
21366done
21367rm -f conf$$subs.sh
21368
21369cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac50fbac 21370cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
3185942a
JA
21371_ACEOF
21372sed -n '
21373h
21374s/^/S["/; s/!.*/"]=/
21375p
21376g
21377s/^[^!]*!//
21378:repl
21379t repl
21380s/'"$ac_delim"'$//
21381t delim
21382:nl
21383h
ac50fbac 21384s/\(.\{148\}\)..*/\1/
3185942a
JA
21385t more1
21386s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
21387p
21388n
21389b repl
21390:more1
21391s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21392p
21393g
21394s/.\{148\}//
21395t nl
21396:delim
21397h
ac50fbac 21398s/\(.\{148\}\)..*/\1/
3185942a
JA
21399t more2
21400s/["\\]/\\&/g; s/^/"/; s/$/"/
21401p
21402b
21403:more2
21404s/["\\]/\\&/g; s/^/"/; s/$/"\\/
21405p
21406g
21407s/.\{148\}//
21408t delim
21409' <conf$$subs.awk | sed '
21410/^[^""]/{
21411 N
21412 s/\n//
21413}
21414' >>$CONFIG_STATUS || ac_write_fail=1
21415rm -f conf$$subs.awk
21416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21417_ACAWK
ac50fbac 21418cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
3185942a
JA
21419 for (key in S) S_is_set[key] = 1
21420 FS = "\a"
21421
21422}
21423{
21424 line = $ 0
21425 nfields = split(line, field, "@")
21426 substed = 0
21427 len = length(field[1])
21428 for (i = 2; i < nfields; i++) {
21429 key = field[i]
21430 keylen = length(key)
21431 if (S_is_set[key]) {
21432 value = S[key]
21433 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
21434 len += length(value) + length(field[++i])
21435 substed = 1
21436 } else
21437 len += 1 + keylen
21438 }
21439
21440 print line
21441}
21442
21443_ACAWK
21444_ACEOF
21445cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21446if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
21447 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
21448else
21449 cat
ac50fbac
CR
21450fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
21451 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
3185942a
JA
21452_ACEOF
21453
ac50fbac
CR
21454# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
21455# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
3185942a
JA
21456# trailing colons and then remove the whole line if VPATH becomes empty
21457# (actually we leave an empty line to preserve line numbers).
21458if test "x$srcdir" = x.; then
ac50fbac
CR
21459 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
21460h
21461s///
21462s/^/:/
21463s/[ ]*$/:/
21464s/:\$(srcdir):/:/g
21465s/:\${srcdir}:/:/g
21466s/:@srcdir@:/:/g
21467s/^:*//
3185942a 21468s/:*$//
ac50fbac
CR
21469x
21470s/\(=[ ]*\).*/\1/
21471G
21472s/\n//
3185942a
JA
21473s/^[^=]*=[ ]*$//
21474}'
21475fi
21476
21477cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09 21478fi # test -n "$CONFIG_FILES"
ccc6cda3 21479
3185942a
JA
21480# Set up the scripts for CONFIG_HEADERS section.
21481# No need to generate them if there are no CONFIG_HEADERS.
21482# This happens for instance with `./config.status Makefile'.
21483if test -n "$CONFIG_HEADERS"; then
ac50fbac 21484cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
3185942a 21485BEGIN {
b80f6443 21486_ACEOF
3185942a
JA
21487
21488# Transform confdefs.h into an awk script `defines.awk', embedded as
21489# here-document in config.status, that substitutes the proper values into
21490# config.h.in to produce config.h.
21491
21492# Create a delimiter string that does not exist in confdefs.h, to ease
21493# handling of long lines.
21494ac_delim='%!_!# '
21495for ac_last_try in false false :; do
ac50fbac
CR
21496 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
21497 if test -z "$ac_tt"; then
3185942a
JA
21498 break
21499 elif $ac_last_try; then
ac50fbac 21500 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
3185942a
JA
21501 else
21502 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21503 fi
21504done
21505
21506# For the awk script, D is an array of macro values keyed by name,
21507# likewise P contains macro parameters if any. Preserve backslash
21508# newline sequences.
21509
21510ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21511sed -n '
21512s/.\{148\}/&'"$ac_delim"'/g
21513t rset
21514:rset
21515s/^[ ]*#[ ]*define[ ][ ]*/ /
21516t def
21517d
21518:def
21519s/\\$//
21520t bsnl
21521s/["\\]/\\&/g
21522s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21523D["\1"]=" \3"/p
21524s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21525d
21526:bsnl
21527s/["\\]/\\&/g
21528s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21529D["\1"]=" \3\\\\\\n"\\/p
21530t cont
21531s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21532t cont
21533d
21534:cont
21535n
21536s/.\{148\}/&'"$ac_delim"'/g
21537t clear
21538:clear
21539s/\\$//
21540t bsnlc
21541s/["\\]/\\&/g; s/^/"/; s/$/"/p
21542d
21543:bsnlc
21544s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21545b cont
21546' <confdefs.h | sed '
21547s/'"$ac_delim"'/"\\\
21548"/g' >>$CONFIG_STATUS || ac_write_fail=1
21549
21550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21551 for (key in D) D_is_set[key] = 1
21552 FS = "\a"
21553}
21554/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21555 line = \$ 0
21556 split(line, arg, " ")
21557 if (arg[1] == "#") {
21558 defundef = arg[2]
21559 mac1 = arg[3]
21560 } else {
21561 defundef = substr(arg[1], 2)
21562 mac1 = arg[2]
21563 }
21564 split(mac1, mac2, "(") #)
21565 macro = mac2[1]
21566 prefix = substr(line, 1, index(line, defundef) - 1)
21567 if (D_is_set[macro]) {
21568 # Preserve the white space surrounding the "#".
21569 print prefix "define", macro P[macro] D[macro]
21570 next
21571 } else {
21572 # Replace #undef with comments. This is necessary, for example,
21573 # in the case of _POSIX_SOURCE, which is predefined and required
21574 # on some systems where configure will not decide to define it.
21575 if (defundef == "undef") {
21576 print "/*", prefix defundef, macro, "*/"
21577 next
21578 }
21579 }
21580}
21581{ print }
21582_ACAWK
21583_ACEOF
21584cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac50fbac 21585 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
3185942a
JA
21586fi # test -n "$CONFIG_HEADERS"
21587
21588
21589eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
21590shift
21591for ac_tag
21592do
21593 case $ac_tag in
21594 :[FHLC]) ac_mode=$ac_tag; continue;;
21595 esac
21596 case $ac_mode$ac_tag in
21597 :[FHL]*:*);;
ac50fbac 21598 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
3185942a
JA
21599 :[FH]-) ac_tag=-:-;;
21600 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21601 esac
21602 ac_save_IFS=$IFS
21603 IFS=:
21604 set x $ac_tag
21605 IFS=$ac_save_IFS
21606 shift
21607 ac_file=$1
21608 shift
21609
21610 case $ac_mode in
21611 :L) ac_source=$1;;
21612 :[FH])
21613 ac_file_inputs=
21614 for ac_f
21615 do
21616 case $ac_f in
ac50fbac 21617 -) ac_f="$ac_tmp/stdin";;
3185942a
JA
21618 *) # Look for the file first in the build tree, then in the source tree
21619 # (if the path is not absolute). The absolute path cannot be DOS-style,
21620 # because $ac_f cannot contain `:'.
21621 test -f "$ac_f" ||
21622 case $ac_f in
21623 [\\/$]*) false;;
21624 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21625 esac ||
ac50fbac 21626 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
3185942a
JA
21627 esac
21628 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
ac50fbac 21629 as_fn_append ac_file_inputs " '$ac_f'"
3185942a
JA
21630 done
21631
21632 # Let's still pretend it is `configure' which instantiates (i.e., don't
21633 # use $as_me), people would be surprised to read:
21634 # /* config.h. Generated by config.status. */
21635 configure_input='Generated from '`
21636 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21637 `' by configure.'
21638 if test x"$ac_file" != x-; then
21639 configure_input="$ac_file. $configure_input"
ac50fbac 21640 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
3185942a
JA
21641$as_echo "$as_me: creating $ac_file" >&6;}
21642 fi
21643 # Neutralize special characters interpreted by sed in replacement strings.
21644 case $configure_input in #(
21645 *\&* | *\|* | *\\* )
21646 ac_sed_conf_input=`$as_echo "$configure_input" |
21647 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21648 *) ac_sed_conf_input=$configure_input;;
21649 esac
21650
21651 case $ac_tag in
ac50fbac
CR
21652 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21653 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
3185942a
JA
21654 esac
21655 ;;
ccc6cda3
JA
21656 esac
21657
3185942a 21658 ac_dir=`$as_dirname -- "$ac_file" ||
b80f6443 21659$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
0628567a
JA
21660 X"$ac_file" : 'X\(//\)[^/]' \| \
21661 X"$ac_file" : 'X\(//\)$' \| \
3185942a
JA
21662 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21663$as_echo X"$ac_file" |
21664 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21665 s//\1/
21666 q
21667 }
21668 /^X\(\/\/\)[^/].*/{
21669 s//\1/
21670 q
21671 }
21672 /^X\(\/\/\)$/{
21673 s//\1/
21674 q
21675 }
21676 /^X\(\/\).*/{
21677 s//\1/
21678 q
21679 }
21680 s/.*/./; q'`
ac50fbac 21681 as_dir="$ac_dir"; as_fn_mkdir_p
b80f6443
JA
21682 ac_builddir=.
21683
3185942a
JA
21684case "$ac_dir" in
21685.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21686*)
21687 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21688 # A ".." for each directory in $ac_dir_suffix.
21689 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21690 case $ac_top_builddir_sub in
21691 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21692 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21693 esac ;;
21694esac
21695ac_abs_top_builddir=$ac_pwd
21696ac_abs_builddir=$ac_pwd$ac_dir_suffix
21697# for backward compatibility:
21698ac_top_builddir=$ac_top_build_prefix
b80f6443
JA
21699
21700case $srcdir in
3185942a 21701 .) # We are building in place.
b80f6443 21702 ac_srcdir=.
3185942a
JA
21703 ac_top_srcdir=$ac_top_builddir_sub
21704 ac_abs_top_srcdir=$ac_pwd ;;
21705 [\\/]* | ?:[\\/]* ) # Absolute name.
b80f6443 21706 ac_srcdir=$srcdir$ac_dir_suffix;
3185942a
JA
21707 ac_top_srcdir=$srcdir
21708 ac_abs_top_srcdir=$srcdir ;;
21709 *) # Relative name.
21710 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21711 ac_top_srcdir=$ac_top_build_prefix$srcdir
21712 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
b80f6443 21713esac
3185942a 21714ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
0628567a 21715
b80f6443 21716
3185942a
JA
21717 case $ac_mode in
21718 :F)
21719 #
21720 # CONFIG_FILE
21721 #
ccc6cda3 21722
f73dda09
JA
21723 case $INSTALL in
21724 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
3185942a 21725 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ccc6cda3 21726 esac
8868edaf
CR
21727 ac_MKDIR_P=$MKDIR_P
21728 case $MKDIR_P in
21729 [\\/$]* | ?:[\\/]* ) ;;
21730 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21731 esac
3185942a 21732_ACEOF
ccc6cda3 21733
3185942a
JA
21734cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21735# If the template does not know about datarootdir, expand it.
21736# FIXME: This hack should be removed a few years after 2.60.
21737ac_datarootdir_hack=; ac_datarootdir_seen=
3185942a
JA
21738ac_sed_dataroot='
21739/datarootdir/ {
21740 p
21741 q
21742}
21743/@datadir@/p
21744/@docdir@/p
21745/@infodir@/p
21746/@localedir@/p
ac50fbac 21747/@mandir@/p'
3185942a
JA
21748case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21749*datarootdir*) ac_datarootdir_seen=yes;;
21750*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
ac50fbac 21751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
3185942a
JA
21752$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21753_ACEOF
21754cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21755 ac_datarootdir_hack='
21756 s&@datadir@&$datadir&g
21757 s&@docdir@&$docdir&g
21758 s&@infodir@&$infodir&g
21759 s&@localedir@&$localedir&g
21760 s&@mandir@&$mandir&g
ac50fbac 21761 s&\\\${datarootdir}&$datarootdir&g' ;;
3185942a 21762esac
b80f6443 21763_ACEOF
3185942a
JA
21764
21765# Neutralize VPATH when `$srcdir' = `.'.
21766# Shell code in configure.ac might set extrasub.
21767# FIXME: do we really want to maintain this feature?
21768cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21769ac_sed_extra="$ac_vpsub
f73dda09 21770$extrasub
b80f6443 21771_ACEOF
3185942a 21772cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09
JA
21773:t
21774/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
3185942a
JA
21775s|@configure_input@|$ac_sed_conf_input|;t t
21776s&@top_builddir@&$ac_top_builddir_sub&;t t
21777s&@top_build_prefix@&$ac_top_build_prefix&;t t
21778s&@srcdir@&$ac_srcdir&;t t
21779s&@abs_srcdir@&$ac_abs_srcdir&;t t
21780s&@top_srcdir@&$ac_top_srcdir&;t t
21781s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21782s&@builddir@&$ac_builddir&;t t
21783s&@abs_builddir@&$ac_abs_builddir&;t t
21784s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21785s&@INSTALL@&$ac_INSTALL&;t t
8868edaf 21786s&@MKDIR_P@&$ac_MKDIR_P&;t t
3185942a
JA
21787$ac_datarootdir_hack
21788"
ac50fbac
CR
21789eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21790 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ccc6cda3 21791
3185942a 21792test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
ac50fbac
CR
21793 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21794 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21795 "$ac_tmp/out"`; test -z "$ac_out"; } &&
21796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21797which seems to be undefined. Please make sure it is defined" >&5
3185942a 21798$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ac50fbac 21799which seems to be undefined. Please make sure it is defined" >&2;}
ccc6cda3 21800
ac50fbac 21801 rm -f "$ac_tmp/stdin"
f73dda09 21802 case $ac_file in
ac50fbac
CR
21803 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21804 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
3185942a 21805 esac \
ac50fbac 21806 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
3185942a
JA
21807 ;;
21808 :H)
21809 #
21810 # CONFIG_HEADER
21811 #
f73dda09 21812 if test x"$ac_file" != x-; then
3185942a
JA
21813 {
21814 $as_echo "/* $configure_input */" \
ac50fbac
CR
21815 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21816 } >"$ac_tmp/config.h" \
21817 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21818 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21819 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
3185942a 21820$as_echo "$as_me: $ac_file is unchanged" >&6;}
f73dda09 21821 else
3185942a 21822 rm -f "$ac_file"
ac50fbac
CR
21823 mv "$ac_tmp/config.h" "$ac_file" \
21824 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ccc6cda3 21825 fi
f73dda09 21826 else
3185942a 21827 $as_echo "/* $configure_input */" \
ac50fbac
CR
21828 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21829 || as_fn_error $? "could not create -" "$LINENO" 5
ccc6cda3 21830 fi
3185942a 21831 ;;
0628567a 21832
ac50fbac 21833 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
3185942a
JA
21834$as_echo "$as_me: executing $ac_file commands" >&6;}
21835 ;;
21836 esac
b80f6443 21837
ccc6cda3 21838
3185942a 21839 case $ac_file$ac_mode in
8868edaf 21840 "po-directories":C)
b80f6443
JA
21841 for ac_file in $CONFIG_FILES; do
21842 # Support "outfile[:infile[:infile...]]"
21843 case "$ac_file" in
21844 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
21845 esac
21846 # PO directories have a Makefile.in generated from Makefile.in.in.
21847 case "$ac_file" in */Makefile.in)
21848 # Adjust a relative srcdir.
21849 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8868edaf 21850 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
b80f6443
JA
21851 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
21852 # In autoconf-2.13 it is called $ac_given_srcdir.
21853 # In autoconf-2.50 it is called $srcdir.
21854 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
21855 case "$ac_given_srcdir" in
21856 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
21857 /*) top_srcdir="$ac_given_srcdir" ;;
21858 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
21859 esac
8868edaf
CR
21860 # Treat a directory as a PO directory if and only if it has a
21861 # POTFILES.in file. This allows packages to have multiple PO
21862 # directories under different names or in different locations.
b80f6443
JA
21863 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
21864 rm -f "$ac_dir/POTFILES"
21865 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8868edaf
CR
21866 gt_tab=`printf '\t'`
21867 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"
b80f6443 21868 POMAKEFILEDEPS="POTFILES.in"
8868edaf 21869 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
b80f6443
JA
21870 # on $ac_dir but don't depend on user-specified configuration
21871 # parameters.
21872 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
21873 # The LINGUAS file contains the set of available languages.
21874 if test -n "$OBSOLETE_ALL_LINGUAS"; then
21875 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
21876 fi
8868edaf 21877 ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
b80f6443
JA
21878 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
21879 else
21880 # The set of available languages was given in configure.in.
8868edaf 21881 ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
b80f6443 21882 fi
8868edaf
CR
21883 # Compute POFILES
21884 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
21885 # Compute UPDATEPOFILES
21886 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
21887 # Compute DUMMYPOFILES
21888 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
21889 # Compute GMOFILES
21890 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
b80f6443
JA
21891 case "$ac_given_srcdir" in
21892 .) srcdirpre= ;;
21893 *) srcdirpre='$(srcdir)/' ;;
21894 esac
21895 POFILES=
b80f6443
JA
21896 UPDATEPOFILES=
21897 DUMMYPOFILES=
8868edaf 21898 GMOFILES=
b80f6443
JA
21899 for lang in $ALL_LINGUAS; do
21900 POFILES="$POFILES $srcdirpre$lang.po"
b80f6443
JA
21901 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
21902 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
8868edaf 21903 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
b80f6443
JA
21904 done
21905 # CATALOGS depends on both $ac_dir and the user's LINGUAS
21906 # environment variable.
21907 INST_LINGUAS=
21908 if test -n "$ALL_LINGUAS"; then
21909 for presentlang in $ALL_LINGUAS; do
21910 useit=no
21911 if test "%UNSET%" != "$LINGUAS"; then
21912 desiredlanguages="$LINGUAS"
21913 else
21914 desiredlanguages="$ALL_LINGUAS"
21915 fi
21916 for desiredlang in $desiredlanguages; do
21917 # Use the presentlang catalog if desiredlang is
21918 # a. equal to presentlang, or
21919 # b. a variant of presentlang (because in this case,
21920 # presentlang can be used as a fallback for messages
21921 # which are not translated in the desiredlang catalog).
21922 case "$desiredlang" in
21923 "$presentlang"*) useit=yes;;
21924 esac
21925 done
21926 if test $useit = yes; then
21927 INST_LINGUAS="$INST_LINGUAS $presentlang"
21928 fi
21929 done
21930 fi
21931 CATALOGS=
21932 if test -n "$INST_LINGUAS"; then
21933 for lang in $INST_LINGUAS; do
21934 CATALOGS="$CATALOGS $lang.gmo"
21935 done
21936 fi
21937 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8868edaf 21938 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"
b80f6443
JA
21939 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
21940 if test -f "$f"; then
21941 case "$f" in
21942 *.orig | *.bak | *~) ;;
21943 *) cat "$f" >> "$ac_dir/Makefile" ;;
21944 esac
21945 fi
21946 done
21947 fi
21948 ;;
21949 esac
21950 done ;;
3185942a 21951 "default":C)
ccc6cda3
JA
21952# Makefile uses this timestamp file to record whether config.h is up to date.
21953echo timestamp > stamp-h
f73dda09 21954 ;;
3185942a 21955
f73dda09 21956 esac
3185942a 21957done # for ac_tag
ccc6cda3 21958
f73dda09 21959
ac50fbac 21960as_fn_exit 0
b80f6443 21961_ACEOF
f73dda09
JA
21962ac_clean_files=$ac_clean_files_save
21963
3185942a 21964test $ac_write_fail = 0 ||
ac50fbac 21965 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
3185942a 21966
b80f6443 21967
f73dda09
JA
21968# configure is writing to config.log, and then calls config.status.
21969# config.status does its own redirection, appending to config.log.
21970# Unfortunately, on DOS this fails, as config.log is still kept open
21971# by configure, so config.status won't be able to write to it; its
21972# output is simply discarded. So we exec the FD to /dev/null,
21973# effectively closing config.log, so it can be properly (re)opened and
21974# appended to by config.status. When coming back to configure, we
21975# need to make the FD available again.
21976if test "$no_create" != yes; then
21977 ac_cs_success=:
0628567a
JA
21978 ac_config_status_args=
21979 test "$silent" = yes &&
21980 ac_config_status_args="$ac_config_status_args --quiet"
f73dda09 21981 exec 5>/dev/null
0628567a 21982 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
f73dda09
JA
21983 exec 5>>config.log
21984 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21985 # would make configure fail if this is the last instruction.
ac50fbac 21986 $ac_cs_success || as_fn_exit 1
f73dda09 21987fi
3185942a 21988if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
ac50fbac 21989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
3185942a
JA
21990$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21991fi
ccc6cda3 21992