]> git.ipfire.org Git - thirdparty/bash.git/blame - configure
bash-4.4 rc1 release
[thirdparty/bash.git] / configure
CommitLineData
ccc6cda3 1#! /bin/sh
690150f9 2# From configure.ac for Bash 4.4, version 4.078.
f73dda09 3# Guess values for system-dependent variables and create Makefiles.
690150f9 4# Generated by GNU Autoconf 2.69 for bash 4.4-rc1.
f73dda09
JA
5#
6# Report bugs to <bug-bash@gnu.org>.
7#
1b1fe467 8#
0ee50808 9# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
1b1fe467
CR
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.
1b1fe467
CR
14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
ccc6cda3 17
dd4f3dd8
CR
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
1b1fe467 20if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
a82a04b3
CR
21 emulate sh
22 NULLCMD=:
dd4f3dd8 23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
5e4a95c7
CR
24 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
b709b946
CR
26 setopt NO_GLOB_SUBST
27else
1b1fe467
CR
28 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
dd4f3dd8 33esac
a82a04b3 34fi
dd4f3dd8
CR
35
36
dd4f3dd8
CR
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
1b1fe467
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
dd4f3dd8
CR
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'
b709b946 57 else
dd4f3dd8
CR
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
1b1fe467 61 case $arg in #(
dd4f3dd8
CR
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'
b709b946 70 fi
dd4f3dd8
CR
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 }
b709b946
CR
82fi
83
5e4a95c7 84
b709b946
CR
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.)
b709b946
CR
90IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
1b1fe467
CR
93as_myself=
94case $0 in #((
b709b946
CR
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=.
1b1fe467
CR
101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
b709b946
CR
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
dd4f3dd8 113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
1b1fe467 114 exit 1
b709b946
CR
115fi
116
1b1fe467
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 || :
b709b946 124done
5e4a95c7
CR
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
dd4f3dd8
CR
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
5e4a95c7 134
1b1fe467
CR
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
0ee50808
CR
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;}
1b1fe467
CR
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
0ee50808
CR
196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
1b1fe467
CR
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 :
0ee50808
CR
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
1b1fe467
CR
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
0ee50808
CR
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
1b1fe467
CR
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
b709b946
CR
423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
5e4a95c7
CR
425 as_expr=expr
426else
427 as_expr=false
428fi
429
b709b946 430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
5e4a95c7
CR
431 as_basename=basename
432else
433 as_basename=false
434fi
a82a04b3 435
1b1fe467
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
a82a04b3 441
b709b946 442as_me=`$as_basename -- "$0" ||
a82a04b3
CR
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
b709b946 445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
dd4f3dd8 446$as_echo X/"$0" |
b709b946
CR
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'`
9d6e5e30 460
1b1fe467
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
9d6e5e30 467
9d6e5e30 468
1b1fe467
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; }
b709b946 491
0ee50808
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
1b1fe467
CR
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
b709b946
CR
502}
503
1b1fe467
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
e3db237e 516
1b1fe467
CR
517rm -f conf$$ conf$$.exe conf$$.file
518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
522 mkdir conf$$.dir 2>/dev/null
abe2eb5b 523fi
1b1fe467
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.
0ee50808 530 # In both cases, we have to default to `cp -pR'.
1b1fe467 531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
0ee50808 532 as_ln_s='cp -pR'
1b1fe467
CR
533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
0ee50808 536 as_ln_s='cp -pR'
1b1fe467 537 fi
b709b946 538else
0ee50808 539 as_ln_s='cp -pR'
b709b946 540fi
1b1fe467
CR
541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
b709b946 543
1b1fe467
CR
544if mkdir -p . 2>/dev/null; then
545 as_mkdir_p='mkdir -p "$as_dir"'
546else
547 test -d ./-p && rmdir ./-p
548 as_mkdir_p=false
7175a77f 549fi
b709b946 550
0ee50808
CR
551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
b709b946 553
1b1fe467
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'"
b709b946 556
1b1fe467
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'"
f73dda09 559
f73dda09 560
1b1fe467
CR
561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
7175a77f
CR
563
564# Name of the host.
1b1fe467 565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
7175a77f
CR
566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
569#
570# Initializations.
f73dda09 571#
ccc6cda3 572ac_default_prefix=/usr/local
b709b946 573ac_clean_files=
5e4a95c7 574ac_config_libobj_dir=.
b709b946 575LIBOBJS=
f73dda09
JA
576cross_compiling=no
577subdirs=
a82a04b3
CR
578MFLAGS=
579MAKEFLAGS=
f73dda09 580
a82a04b3
CR
581# Identity of this package.
582PACKAGE_NAME='bash'
583PACKAGE_TARNAME='bash'
690150f9
CR
584PACKAGE_VERSION='4.4-rc1'
585PACKAGE_STRING='bash 4.4-rc1'
a82a04b3 586PACKAGE_BUGREPORT='bug-bash@gnu.org'
1b1fe467 587PACKAGE_URL=''
a82a04b3 588
f73dda09
JA
589ac_unique_file="shell.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
dd4f3dd8 593#ifdef HAVE_SYS_TYPES_H
f73dda09
JA
594# include <sys/types.h>
595#endif
dd4f3dd8 596#ifdef HAVE_SYS_STAT_H
f73dda09
JA
597# include <sys/stat.h>
598#endif
dd4f3dd8 599#ifdef STDC_HEADERS
f73dda09
JA
600# include <stdlib.h>
601# include <stddef.h>
602#else
dd4f3dd8 603# ifdef HAVE_STDLIB_H
f73dda09
JA
604# include <stdlib.h>
605# endif
606#endif
dd4f3dd8
CR
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
dd4f3dd8 613#ifdef HAVE_STRINGS_H
f73dda09
JA
614# include <strings.h>
615#endif
dd4f3dd8 616#ifdef HAVE_INTTYPES_H
f73dda09 617# include <inttypes.h>
b709b946 618#endif
dd4f3dd8 619#ifdef HAVE_STDINT_H
b709b946 620# include <stdint.h>
f73dda09 621#endif
dd4f3dd8 622#ifdef HAVE_UNISTD_H
f73dda09
JA
623# include <unistd.h>
624#endif"
ccc6cda3 625
dd4f3dd8 626ac_header_list=
53ac45a3 627ac_func_list=
af98a2a6 628ac_subst_vars='LTLIBOBJS
691aebcb 629LOCAL_DEFS
af98a2a6
CR
630LOCAL_LDFLAGS
631LOCAL_CFLAGS
632LOCAL_LIBS
633MALLOC_DEBUG
634DEBUG
635RELSTATUS
636BASHVERS
637ARFLAGS
54a5fbe1
CR
638headersdir
639loadablesdir
af98a2a6
CR
640BUILD_DIR
641incdir
642PROFILE_FLAGS
643SHOBJ_STATUS
644SHOBJ_LIBS
645SHOBJ_XLDFLAGS
646SHOBJ_LDFLAGS
647SHOBJ_LD
648SHOBJ_CFLAGS
649SHOBJ_CC
650JOBS_O
651TERMCAP_DEP
652TERMCAP_LIB
653SIGLIST_O
278286c9
CR
654PTHREAD_H_DEFINES_STRUCT_TIMESPEC
655SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
656TIME_H_DEFINES_STRUCT_TIMESPEC
af98a2a6
CR
657LIBINTL_H
658INTL_INC
659INTL_DEP
660LIBOBJS
661POSUB
662LTLIBINTL
663LIBINTL
664INTLLIBS
665INTL_LIBTOOL_SUFFIX_PREFIX
666INTLOBJS
667GENCAT
668INSTOBJEXT
669DATADIRNAME
670CATOBJEXT
671USE_INCLUDED_LIBINTL
672BUILD_INCLUDED_LIBINTL
673INTLBISON
674LTLIBICONV
675LIBICONV
676GLIBC21
677ALLOCA
678MSGMERGE
679XGETTEXT
680GMSGFMT
681MSGFMT
682USE_NLS
683MKINSTALLDIRS
684SIZE
685MAKE_SHELL
686SET_MAKE
687YFLAGS
688YACC
689RANLIB
690AR
691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
694TILDE_LIB
695HIST_LIBDIR
696HISTORY_DEP
697HISTORY_LIB
698RL_INCLUDE
699RL_INCLUDEDIR
700RL_LIBDIR
701READLINE_DEP
702READLINE_LIB
703RL_MINOR
704RL_MAJOR
705RL_VERSION
7610e0c5 706LIBS_FOR_BUILD
af98a2a6 707STATIC_LD
af98a2a6
CR
708SIGNAMES_O
709SIGNAMES_H
710CROSS_COMPILE
711EGREP
712GREP
713CPP
714OBJEXT
715EXEEXT
716ac_ct_CC
717CPPFLAGS
718LDFLAGS
719CFLAGS
720CC
721HELPSTRINGS
abe2eb5b 722HELPFILES_TARGET
af98a2a6
CR
723HELPINSTALL
724HELPDIRDEFINE
725HELPDIR
726MALLOC_DEP
727MALLOC_LDFLAGS
728MALLOC_LIBRARY
729MALLOC_LIB
730MALLOC_SRC
731MALLOC_TARGET
af98a2a6 732TESTSCRIPT
7610e0c5
CR
733CPPFLAGS_FOR_BUILD
734LDFLAGS_FOR_BUILD
735CFLAGS_FOR_BUILD
736CC_FOR_BUILD
af98a2a6 737DEBUGGER_START_FILE
af98a2a6
CR
738host_os
739host_vendor
740host_cpu
741host
742build_os
743build_vendor
744build_cpu
745build
746target_alias
747host_alias
748build_alias
749LIBS
750ECHO_T
751ECHO_N
752ECHO_C
753DEFS
754mandir
755localedir
756libdir
757psdir
758pdfdir
759dvidir
760htmldir
761infodir
762docdir
763oldincludedir
764includedir
765localstatedir
766sharedstatedir
767sysconfdir
768datadir
769datarootdir
770libexecdir
771sbindir
772bindir
773program_transform_name
774prefix
775exec_prefix
1b1fe467 776PACKAGE_URL
af98a2a6
CR
777PACKAGE_BUGREPORT
778PACKAGE_STRING
779PACKAGE_VERSION
780PACKAGE_TARNAME
781PACKAGE_NAME
782PATH_SEPARATOR
783SHELL'
5e4a95c7 784ac_subst_files=''
dd4f3dd8
CR
785ac_user_opts='
786enable_option_checking
dd4f3dd8
CR
787with_afs
788with_bash_malloc
789with_curses
790with_gnu_malloc
791with_installed_readline
dd4f3dd8
CR
792enable_minimal_config
793enable_alias
794enable_arith_for_command
795enable_array_variables
796enable_bang_history
797enable_brace_expansion
798enable_casemod_attributes
799enable_casemod_expansions
800enable_command_timing
801enable_cond_command
802enable_cond_regexp
803enable_coprocesses
804enable_debugger
f14388d3 805enable_direxpand_default
dd4f3dd8
CR
806enable_directory_stack
807enable_disabled_builtins
808enable_dparen_arithmetic
809enable_extended_glob
691aebcb 810enable_extended_glob_default
85ec0778 811enable_function_import
c111d992 812enable_glob_asciiranges_default
dd4f3dd8
CR
813enable_help_builtin
814enable_history
815enable_job_control
816enable_multibyte
817enable_net_redirections
818enable_process_substitution
819enable_progcomp
820enable_prompt_string_decoding
821enable_readline
822enable_restricted
823enable_select
824enable_separate_helpfiles
825enable_single_help_strings
826enable_strict_posix_default
827enable_usg_echo_default
828enable_xpg_echo_default
829enable_mem_scramble
830enable_profiling
831enable_static_link
832enable_largefile
833enable_nls
834with_gnu_ld
835enable_rpath
836with_libiconv_prefix
837with_included_gettext
838with_libintl_prefix
839'
b709b946
CR
840 ac_precious_vars='build_alias
841host_alias
842target_alias
843DEBUGGER_START_FILE
7610e0c5
CR
844CC_FOR_BUILD
845CFLAGS_FOR_BUILD
846LDFLAGS_FOR_BUILD
847CPPFLAGS_FOR_BUILD
b709b946
CR
848CC
849CFLAGS
850LDFLAGS
dd4f3dd8 851LIBS
b709b946
CR
852CPPFLAGS
853CPP
854YACC
855YFLAGS'
856
a82a04b3 857
ccc6cda3 858# Initialize some variables set by options.
f73dda09
JA
859ac_init_help=
860ac_init_version=false
dd4f3dd8
CR
861ac_unrecognized_opts=
862ac_unrecognized_sep=
ccc6cda3
JA
863# The variables have the same names as the options, with
864# dashes changed to underlines.
f73dda09 865cache_file=/dev/null
ccc6cda3 866exec_prefix=NONE
ccc6cda3 867no_create=
ccc6cda3
JA
868no_recursion=
869prefix=NONE
870program_prefix=NONE
871program_suffix=NONE
872program_transform_name=s,x,x,
873silent=
874site=
875srcdir=
ccc6cda3
JA
876verbose=
877x_includes=NONE
878x_libraries=NONE
f73dda09
JA
879
880# Installation directory options.
881# These are left unexpanded so users can "make install exec_prefix=/foo"
882# and all the variables that are supposed to be based on exec_prefix
883# by default will actually change.
884# Use braces instead of parens because sh, perl, etc. also accept them.
b709b946 885# (The list follows the same order as the GNU Coding Standards.)
ccc6cda3
JA
886bindir='${exec_prefix}/bin'
887sbindir='${exec_prefix}/sbin'
888libexecdir='${exec_prefix}/libexec'
b709b946
CR
889datarootdir='${prefix}/share'
890datadir='${datarootdir}'
ccc6cda3
JA
891sysconfdir='${prefix}/etc'
892sharedstatedir='${prefix}/com'
893localstatedir='${prefix}/var'
ccc6cda3
JA
894includedir='${prefix}/include'
895oldincludedir='/usr/include'
b709b946
CR
896docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
897infodir='${datarootdir}/info'
898htmldir='${docdir}'
899dvidir='${docdir}'
900pdfdir='${docdir}'
901psdir='${docdir}'
902libdir='${exec_prefix}/lib'
903localedir='${datarootdir}/locale'
904mandir='${datarootdir}/man'
ccc6cda3 905
ccc6cda3 906ac_prev=
b709b946 907ac_dashdash=
ccc6cda3
JA
908for ac_option
909do
ccc6cda3
JA
910 # If the previous option needs an argument, assign it.
911 if test -n "$ac_prev"; then
b709b946 912 eval $ac_prev=\$ac_option
ccc6cda3
JA
913 ac_prev=
914 continue
915 fi
916
b709b946 917 case $ac_option in
1b1fe467
CR
918 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
919 *=) ac_optarg= ;;
920 *) ac_optarg=yes ;;
b709b946 921 esac
ccc6cda3
JA
922
923 # Accept the important Cygnus configure options, so we can diagnose typos.
924
b709b946
CR
925 case $ac_dashdash$ac_option in
926 --)
927 ac_dashdash=yes ;;
ccc6cda3
JA
928
929 -bindir | --bindir | --bindi | --bind | --bin | --bi)
930 ac_prev=bindir ;;
931 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
f73dda09 932 bindir=$ac_optarg ;;
ccc6cda3
JA
933
934 -build | --build | --buil | --bui | --bu)
f73dda09 935 ac_prev=build_alias ;;
ccc6cda3 936 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
f73dda09 937 build_alias=$ac_optarg ;;
ccc6cda3
JA
938
939 -cache-file | --cache-file | --cache-fil | --cache-fi \
940 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
941 ac_prev=cache_file ;;
942 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
943 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
f73dda09
JA
944 cache_file=$ac_optarg ;;
945
946 --config-cache | -C)
947 cache_file=config.cache ;;
ccc6cda3 948
b709b946 949 -datadir | --datadir | --datadi | --datad)
ccc6cda3 950 ac_prev=datadir ;;
b709b946 951 -datadir=* | --datadir=* | --datadi=* | --datad=*)
f73dda09 952 datadir=$ac_optarg ;;
ccc6cda3 953
b709b946
CR
954 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
955 | --dataroo | --dataro | --datar)
956 ac_prev=datarootdir ;;
957 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
958 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
959 datarootdir=$ac_optarg ;;
960
ccc6cda3 961 -disable-* | --disable-*)
dd4f3dd8 962 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ccc6cda3 963 # Reject names that are not valid shell variable names.
dd4f3dd8 964 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1b1fe467 965 as_fn_error $? "invalid feature name: $ac_useropt"
dd4f3dd8
CR
966 ac_useropt_orig=$ac_useropt
967 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
968 case $ac_user_opts in
969 *"
970"enable_$ac_useropt"
971"*) ;;
972 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
973 ac_unrecognized_sep=', ';;
974 esac
975 eval enable_$ac_useropt=no ;;
b709b946
CR
976
977 -docdir | --docdir | --docdi | --doc | --do)
978 ac_prev=docdir ;;
979 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
980 docdir=$ac_optarg ;;
981
982 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
983 ac_prev=dvidir ;;
984 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
985 dvidir=$ac_optarg ;;
ccc6cda3
JA
986
987 -enable-* | --enable-*)
dd4f3dd8 988 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ccc6cda3 989 # Reject names that are not valid shell variable names.
dd4f3dd8 990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1b1fe467 991 as_fn_error $? "invalid feature name: $ac_useropt"
dd4f3dd8
CR
992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
995 *"
996"enable_$ac_useropt"
997"*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
1000 esac
1001 eval enable_$ac_useropt=\$ac_optarg ;;
ccc6cda3
JA
1002
1003 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1004 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1005 | --exec | --exe | --ex)
1006 ac_prev=exec_prefix ;;
1007 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1008 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1009 | --exec=* | --exe=* | --ex=*)
f73dda09 1010 exec_prefix=$ac_optarg ;;
ccc6cda3
JA
1011
1012 -gas | --gas | --ga | --g)
1013 # Obsolete; use --with-gas.
1014 with_gas=yes ;;
1015
f73dda09
JA
1016 -help | --help | --hel | --he | -h)
1017 ac_init_help=long ;;
1018 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1019 ac_init_help=recursive ;;
1020 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1021 ac_init_help=short ;;
ccc6cda3
JA
1022
1023 -host | --host | --hos | --ho)
f73dda09 1024 ac_prev=host_alias ;;
ccc6cda3 1025 -host=* | --host=* | --hos=* | --ho=*)
f73dda09 1026 host_alias=$ac_optarg ;;
ccc6cda3 1027
b709b946
CR
1028 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1029 ac_prev=htmldir ;;
1030 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1031 | --ht=*)
1032 htmldir=$ac_optarg ;;
1033
ccc6cda3
JA
1034 -includedir | --includedir | --includedi | --included | --include \
1035 | --includ | --inclu | --incl | --inc)
1036 ac_prev=includedir ;;
1037 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1038 | --includ=* | --inclu=* | --incl=* | --inc=*)
f73dda09 1039 includedir=$ac_optarg ;;
ccc6cda3
JA
1040
1041 -infodir | --infodir | --infodi | --infod | --info | --inf)
1042 ac_prev=infodir ;;
1043 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
f73dda09 1044 infodir=$ac_optarg ;;
ccc6cda3
JA
1045
1046 -libdir | --libdir | --libdi | --libd)
1047 ac_prev=libdir ;;
1048 -libdir=* | --libdir=* | --libdi=* | --libd=*)
f73dda09 1049 libdir=$ac_optarg ;;
ccc6cda3
JA
1050
1051 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1052 | --libexe | --libex | --libe)
1053 ac_prev=libexecdir ;;
1054 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1055 | --libexe=* | --libex=* | --libe=*)
f73dda09 1056 libexecdir=$ac_optarg ;;
ccc6cda3 1057
b709b946
CR
1058 -localedir | --localedir | --localedi | --localed | --locale)
1059 ac_prev=localedir ;;
1060 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1061 localedir=$ac_optarg ;;
1062
ccc6cda3 1063 -localstatedir | --localstatedir | --localstatedi | --localstated \
b709b946 1064 | --localstate | --localstat | --localsta | --localst | --locals)
ccc6cda3
JA
1065 ac_prev=localstatedir ;;
1066 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
b709b946 1067 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
f73dda09 1068 localstatedir=$ac_optarg ;;
ccc6cda3
JA
1069
1070 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1071 ac_prev=mandir ;;
1072 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
f73dda09 1073 mandir=$ac_optarg ;;
ccc6cda3
JA
1074
1075 -nfp | --nfp | --nf)
1076 # Obsolete; use --without-fp.
1077 with_fp=no ;;
1078
1079 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
a82a04b3 1080 | --no-cr | --no-c | -n)
ccc6cda3
JA
1081 no_create=yes ;;
1082
1083 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1084 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1085 no_recursion=yes ;;
1086
1087 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1088 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1089 | --oldin | --oldi | --old | --ol | --o)
1090 ac_prev=oldincludedir ;;
1091 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1092 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1093 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
f73dda09 1094 oldincludedir=$ac_optarg ;;
ccc6cda3
JA
1095
1096 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1097 ac_prev=prefix ;;
1098 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
f73dda09 1099 prefix=$ac_optarg ;;
ccc6cda3
JA
1100
1101 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1102 | --program-pre | --program-pr | --program-p)
1103 ac_prev=program_prefix ;;
1104 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1105 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
f73dda09 1106 program_prefix=$ac_optarg ;;
ccc6cda3
JA
1107
1108 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1109 | --program-suf | --program-su | --program-s)
1110 ac_prev=program_suffix ;;
1111 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1112 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
f73dda09 1113 program_suffix=$ac_optarg ;;
ccc6cda3
JA
1114
1115 -program-transform-name | --program-transform-name \
1116 | --program-transform-nam | --program-transform-na \
1117 | --program-transform-n | --program-transform- \
1118 | --program-transform | --program-transfor \
1119 | --program-transfo | --program-transf \
1120 | --program-trans | --program-tran \
1121 | --progr-tra | --program-tr | --program-t)
1122 ac_prev=program_transform_name ;;
1123 -program-transform-name=* | --program-transform-name=* \
1124 | --program-transform-nam=* | --program-transform-na=* \
1125 | --program-transform-n=* | --program-transform-=* \
1126 | --program-transform=* | --program-transfor=* \
1127 | --program-transfo=* | --program-transf=* \
1128 | --program-trans=* | --program-tran=* \
1129 | --progr-tra=* | --program-tr=* | --program-t=*)
f73dda09 1130 program_transform_name=$ac_optarg ;;
ccc6cda3 1131
b709b946
CR
1132 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1133 ac_prev=pdfdir ;;
1134 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1135 pdfdir=$ac_optarg ;;
1136
1137 -psdir | --psdir | --psdi | --psd | --ps)
1138 ac_prev=psdir ;;
1139 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1140 psdir=$ac_optarg ;;
1141
ccc6cda3
JA
1142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1143 | -silent | --silent | --silen | --sile | --sil)
1144 silent=yes ;;
1145
1146 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1147 ac_prev=sbindir ;;
1148 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1149 | --sbi=* | --sb=*)
f73dda09 1150 sbindir=$ac_optarg ;;
ccc6cda3
JA
1151
1152 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1153 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1154 | --sharedst | --shareds | --shared | --share | --shar \
1155 | --sha | --sh)
1156 ac_prev=sharedstatedir ;;
1157 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1158 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1159 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1160 | --sha=* | --sh=*)
f73dda09 1161 sharedstatedir=$ac_optarg ;;
ccc6cda3
JA
1162
1163 -site | --site | --sit)
1164 ac_prev=site ;;
1165 -site=* | --site=* | --sit=*)
f73dda09 1166 site=$ac_optarg ;;
ccc6cda3
JA
1167
1168 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1169 ac_prev=srcdir ;;
1170 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
f73dda09 1171 srcdir=$ac_optarg ;;
ccc6cda3
JA
1172
1173 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1174 | --syscon | --sysco | --sysc | --sys | --sy)
1175 ac_prev=sysconfdir ;;
1176 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1177 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
f73dda09 1178 sysconfdir=$ac_optarg ;;
ccc6cda3
JA
1179
1180 -target | --target | --targe | --targ | --tar | --ta | --t)
f73dda09 1181 ac_prev=target_alias ;;
ccc6cda3 1182 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
f73dda09 1183 target_alias=$ac_optarg ;;
ccc6cda3
JA
1184
1185 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1186 verbose=yes ;;
1187
f73dda09
JA
1188 -version | --version | --versio | --versi | --vers | -V)
1189 ac_init_version=: ;;
ccc6cda3
JA
1190
1191 -with-* | --with-*)
dd4f3dd8 1192 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ccc6cda3 1193 # Reject names that are not valid shell variable names.
dd4f3dd8 1194 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1b1fe467 1195 as_fn_error $? "invalid package name: $ac_useropt"
dd4f3dd8
CR
1196 ac_useropt_orig=$ac_useropt
1197 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1198 case $ac_user_opts in
1199 *"
1200"with_$ac_useropt"
1201"*) ;;
1202 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1203 ac_unrecognized_sep=', ';;
1204 esac
1205 eval with_$ac_useropt=\$ac_optarg ;;
ccc6cda3
JA
1206
1207 -without-* | --without-*)
dd4f3dd8 1208 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ccc6cda3 1209 # Reject names that are not valid shell variable names.
dd4f3dd8 1210 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1b1fe467 1211 as_fn_error $? "invalid package name: $ac_useropt"
dd4f3dd8
CR
1212 ac_useropt_orig=$ac_useropt
1213 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214 case $ac_user_opts in
1215 *"
1216"with_$ac_useropt"
1217"*) ;;
1218 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1219 ac_unrecognized_sep=', ';;
1220 esac
1221 eval with_$ac_useropt=no ;;
ccc6cda3
JA
1222
1223 --x)
1224 # Obsolete; use --with-x.
1225 with_x=yes ;;
1226
1227 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1228 | --x-incl | --x-inc | --x-in | --x-i)
1229 ac_prev=x_includes ;;
1230 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1231 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
f73dda09 1232 x_includes=$ac_optarg ;;
ccc6cda3
JA
1233
1234 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1235 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1236 ac_prev=x_libraries ;;
1237 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1238 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
f73dda09 1239 x_libraries=$ac_optarg ;;
ccc6cda3 1240
1b1fe467
CR
1241 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1242Try \`$0 --help' for more information"
ccc6cda3
JA
1243 ;;
1244
f73dda09
JA
1245 *=*)
1246 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1247 # Reject names that are not valid shell variable names.
1b1fe467
CR
1248 case $ac_envvar in #(
1249 '' | [0-9]* | *[!_$as_cr_alnum]* )
1250 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1251 esac
b709b946 1252 eval $ac_envvar=\$ac_optarg
f73dda09
JA
1253 export $ac_envvar ;;
1254
ccc6cda3 1255 *)
f73dda09 1256 # FIXME: should be removed in autoconf 3.0.
dd4f3dd8 1257 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
f73dda09 1258 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
dd4f3dd8 1259 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1b1fe467 1260 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
ccc6cda3
JA
1261 ;;
1262
1263 esac
1264done
1265
1266if test -n "$ac_prev"; then
f73dda09 1267 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1b1fe467 1268 as_fn_error $? "missing argument to $ac_option"
ccc6cda3 1269fi
ccc6cda3 1270
dd4f3dd8
CR
1271if test -n "$ac_unrecognized_opts"; then
1272 case $enable_option_checking in
1273 no) ;;
1b1fe467 1274 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
af98a2a6 1275 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
dd4f3dd8
CR
1276 esac
1277fi
1278
1279# Check all directory arguments for consistency.
b709b946
CR
1280for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1281 datadir sysconfdir sharedstatedir localstatedir includedir \
1282 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1283 libdir localedir mandir
c184f645 1284do
b709b946 1285 eval ac_val=\$$ac_var
dd4f3dd8
CR
1286 # Remove trailing slashes.
1287 case $ac_val in
1288 */ )
1289 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1290 eval $ac_var=\$ac_val;;
1291 esac
1292 # Be sure to have absolute directory names.
c184f645 1293 case $ac_val in
b709b946
CR
1294 [\\/$]* | ?:[\\/]* ) continue;;
1295 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ccc6cda3 1296 esac
1b1fe467 1297 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
ccc6cda3
JA
1298done
1299
f73dda09
JA
1300# There might be people who depend on the old broken behavior: `$host'
1301# used to hold the argument of --host etc.
a82a04b3 1302# FIXME: To remove some day.
f73dda09
JA
1303build=$build_alias
1304host=$host_alias
1305target=$target_alias
1306
a82a04b3 1307# FIXME: To remove some day.
f73dda09
JA
1308if test "x$host_alias" != x; then
1309 if test "x$build_alias" = x; then
1310 cross_compiling=maybe
f73dda09
JA
1311 elif test "x$build_alias" != "x$host_alias"; then
1312 cross_compiling=yes
1313 fi
1314fi
ccc6cda3 1315
f73dda09
JA
1316ac_tool_prefix=
1317test -n "$host_alias" && ac_tool_prefix=$host_alias-
ccc6cda3 1318
f73dda09 1319test "$silent" = yes && exec 6>/dev/null
ccc6cda3 1320
a82a04b3 1321
b709b946
CR
1322ac_pwd=`pwd` && test -n "$ac_pwd" &&
1323ac_ls_di=`ls -di .` &&
1324ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1b1fe467 1325 as_fn_error $? "working directory cannot be determined"
b709b946 1326test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1b1fe467 1327 as_fn_error $? "pwd does not report name of working directory"
b709b946
CR
1328
1329
ccc6cda3
JA
1330# Find the source files, if location was not specified.
1331if test -z "$srcdir"; then
1332 ac_srcdir_defaulted=yes
b709b946 1333 # Try the directory containing this script, then the parent directory.
dd4f3dd8
CR
1334 ac_confdir=`$as_dirname -- "$as_myself" ||
1335$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1336 X"$as_myself" : 'X\(//\)[^/]' \| \
1337 X"$as_myself" : 'X\(//\)$' \| \
1338 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1339$as_echo X"$as_myself" |
b709b946
CR
1340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1341 s//\1/
1342 q
1343 }
1344 /^X\(\/\/\)[^/].*/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\).*/{
1353 s//\1/
1354 q
1355 }
1356 s/.*/./; q'`
ccc6cda3 1357 srcdir=$ac_confdir
b709b946 1358 if test ! -r "$srcdir/$ac_unique_file"; then
ccc6cda3
JA
1359 srcdir=..
1360 fi
1361else
1362 ac_srcdir_defaulted=no
1363fi
b709b946
CR
1364if test ! -r "$srcdir/$ac_unique_file"; then
1365 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1b1fe467 1366 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
c184f645 1367fi
b709b946
CR
1368ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1369ac_abs_confdir=`(
1b1fe467 1370 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
b709b946
CR
1371 pwd)`
1372# When building in place, set srcdir=.
1373if test "$ac_abs_confdir" = "$ac_pwd"; then
1374 srcdir=.
1375fi
1376# Remove unnecessary trailing slashes from srcdir.
1377# Double slashes in file names in object file debugging info
1378# mess up M-x gdb in Emacs.
1379case $srcdir in
1380*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1381esac
1382for ac_var in $ac_precious_vars; do
1383 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1384 eval ac_env_${ac_var}_value=\$${ac_var}
1385 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1386 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1387done
ccc6cda3 1388
f73dda09
JA
1389#
1390# Report the --help message.
1391#
1392if test "$ac_init_help" = "long"; then
1393 # Omit some internal or obsolete options to make the list less imposing.
1394 # This message is too long to be a string in the A/UX 3.1 sh.
a82a04b3 1395 cat <<_ACEOF
690150f9 1396\`configure' configures bash 4.4-rc1 to adapt to many kinds of systems.
ccc6cda3 1397
f73dda09 1398Usage: $0 [OPTION]... [VAR=VALUE]...
ccc6cda3 1399
f73dda09
JA
1400To assign environment variables (e.g., CC, CFLAGS...), specify them as
1401VAR=VALUE. See below for descriptions of some of the useful variables.
1402
1403Defaults for the options are specified in brackets.
ccc6cda3 1404
f73dda09
JA
1405Configuration:
1406 -h, --help display this help and exit
1407 --help=short display options specific to this package
1408 --help=recursive display the short help of all the included packages
1409 -V, --version display version information and exit
1b1fe467 1410 -q, --quiet, --silent do not print \`checking ...' messages
f73dda09
JA
1411 --cache-file=FILE cache test results in FILE [disabled]
1412 -C, --config-cache alias for \`--cache-file=config.cache'
1413 -n, --no-create do not create output files
1414 --srcdir=DIR find the sources in DIR [configure dir or \`..']
ccc6cda3 1415
f73dda09
JA
1416Installation directories:
1417 --prefix=PREFIX install architecture-independent files in PREFIX
dd4f3dd8 1418 [$ac_default_prefix]
f73dda09 1419 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
dd4f3dd8 1420 [PREFIX]
ccc6cda3 1421
f73dda09
JA
1422By default, \`make install' will install all the files in
1423\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1424an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1425for instance \`--prefix=\$HOME'.
ccc6cda3 1426
f73dda09 1427For better control, use the options below.
ccc6cda3 1428
f73dda09 1429Fine tuning of the installation directories:
dd4f3dd8
CR
1430 --bindir=DIR user executables [EPREFIX/bin]
1431 --sbindir=DIR system admin executables [EPREFIX/sbin]
1432 --libexecdir=DIR program executables [EPREFIX/libexec]
1433 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1434 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1435 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1436 --libdir=DIR object code libraries [EPREFIX/lib]
1437 --includedir=DIR C header files [PREFIX/include]
1438 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1439 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1440 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1441 --infodir=DIR info documentation [DATAROOTDIR/info]
1442 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1443 --mandir=DIR man documentation [DATAROOTDIR/man]
1444 --docdir=DIR documentation root [DATAROOTDIR/doc/bash]
1445 --htmldir=DIR html documentation [DOCDIR]
1446 --dvidir=DIR dvi documentation [DOCDIR]
1447 --pdfdir=DIR pdf documentation [DOCDIR]
1448 --psdir=DIR ps documentation [DOCDIR]
a82a04b3 1449_ACEOF
f73dda09 1450
a82a04b3 1451 cat <<\_ACEOF
f73dda09
JA
1452
1453System types:
1454 --build=BUILD configure for building on BUILD [guessed]
a82a04b3
CR
1455 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1456_ACEOF
ccc6cda3 1457fi
ccc6cda3 1458
f73dda09
JA
1459if test -n "$ac_init_help"; then
1460 case $ac_init_help in
690150f9 1461 short | recursive ) echo "Configuration of bash 4.4-rc1:";;
f73dda09 1462 esac
a82a04b3 1463 cat <<\_ACEOF
ccc6cda3 1464
f73dda09 1465Optional Features:
dd4f3dd8 1466 --disable-option-checking ignore unrecognized --enable/--with options
f73dda09
JA
1467 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1468 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
7117c2d2
JA
1469 --enable-minimal-config a minimal sh-like configuration
1470 --enable-alias enable shell aliases
1471 --enable-arith-for-command
1472 enable arithmetic for command
1473 --enable-array-variables
1474 include shell array variables
1475 --enable-bang-history turn on csh-style history substitution
1476 --enable-brace-expansion
1477 include brace expansion
fdf670ea
CR
1478 --enable-casemod-attributes
1479 include case-modifying variable attributes
1480 --enable-casemod-expansions
1481 include case-modifying word expansions
7117c2d2
JA
1482 --enable-command-timing enable the time reserved word and command timing
1483 --enable-cond-command enable the conditional command
35ee8ea0 1484 --enable-cond-regexp enable extended regular expression matching in
d3a24ed2 1485 conditional commands
09767ff0
CR
1486 --enable-coprocesses enable coprocess support and the coproc reserved
1487 word
d3a24ed2 1488 --enable-debugger enable support for bash debugger
f14388d3
CR
1489 --enable-direxpand-default
1490 enable the direxpand shell option by default
7117c2d2
JA
1491 --enable-directory-stack
1492 enable builtins pushd/popd/dirs
1493 --enable-disabled-builtins
1494 allow disabled builtins to still be invoked
1495 --enable-dparen-arithmetic
1496 include ((...)) command
1497 --enable-extended-glob include ksh-style extended pattern matching
691aebcb
CR
1498 --enable-extended-glob-default
1499 force extended pattern matching to be enabled by
1500 default
f3aad56d
CR
1501 --enable-function-import
1502 allow bash to import exported function definitions
1503 by default
c111d992
CR
1504 --enable-glob-asciiranges-default
1505 force bracket range expressions in pattern matching
1506 to use the C locale by default
7117c2d2
JA
1507 --enable-help-builtin include the help builtin
1508 --enable-history turn on command history
1509 --enable-job-control enable job control features
d3a24ed2 1510 --enable-multibyte enable multibyte characters if OS supports them
7117c2d2
JA
1511 --enable-net-redirections
1512 enable /dev/tcp/host/port redirection
1513 --enable-process-substitution
1514 enable process substitution
1515 --enable-progcomp enable programmable completion and the complete
1516 builtin
1517 --enable-prompt-string-decoding
1518 turn on escape character decoding in prompts
1519 --enable-readline turn on command line editing
1520 --enable-restricted enable a restricted shell
1521 --enable-select include select command
1522 --enable-separate-helpfiles
1523 use external files for help builtin documentation
01ed5ba4
CR
1524 --enable-single-help-strings
1525 store help documentation as a single string to ease
1526 translation
7790f917
CR
1527 --enable-strict-posix-default
1528 configure bash to be posix-conformant by default
7117c2d2
JA
1529 --enable-usg-echo-default
1530 a synonym for --enable-xpg-echo-default
1531 --enable-xpg-echo-default
1532 make the echo builtin expand escape sequences by
1533 default
1534 --enable-mem-scramble scramble memory on calls to malloc and free
1535 --enable-profiling allow profiling with gprof
1536 --enable-static-link link bash statically, for use as a root shell
f73dda09 1537 --disable-largefile omit support for large files
5e13499c
CR
1538 --disable-nls do not use Native Language Support
1539 --disable-rpath do not hardcode runtime library paths
f73dda09
JA
1540
1541Optional Packages:
1542 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1543 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
7117c2d2
JA
1544 --with-afs if you are running AFS
1545 --with-bash-malloc use the Bash version of malloc
1546 --with-curses use the curses library instead of the termcap
1547 library
1548 --with-gnu-malloc synonym for --with-bash-malloc
1549 --with-installed-readline
1550 use a version of the readline library that is
1551 already installed
5e13499c
CR
1552 --with-gnu-ld assume the C compiler uses GNU ld default=no
1553 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1554 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1555 --with-included-gettext use the GNU gettext library included here
1556 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1557 --without-libintl-prefix don't search for libintl in includedir and libdir
f73dda09
JA
1558
1559Some influential environment variables:
d3a24ed2
CR
1560 DEBUGGER_START_FILE
1561 location of bash debugger initialization file
7610e0c5
CR
1562 CC_FOR_BUILD
1563 C compiler used when compiling binaries used only at build time
1564 CFLAGS_FOR_BUILD
1565 Compliation options (CFLAGS) used when compiling binaries used
1566 only at build time
1567 LDFLAGS_FOR_BUILD
1568 Linker options (LDFLAGS) used when compiling binaries used only
1569 at build time
1570 CPPFLAGS_FOR_BUILD
1571 C preprocessor options (CPPFLAGS) used when compiling binaries
1572 used only at build time
f73dda09
JA
1573 CC C compiler command
1574 CFLAGS C compiler flags
1575 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1576 nonstandard directory <lib dir>
dd4f3dd8 1577 LIBS libraries to pass to the linker, e.g. -l<library>
1b1fe467 1578 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
b709b946 1579 you have headers in a nonstandard directory <include dir>
f73dda09 1580 CPP C preprocessor
1b1fe467
CR
1581 YACC The `Yet Another Compiler Compiler' implementation to use.
1582 Defaults to the first program found out of: `bison -y', `byacc',
1583 `yacc'.
b709b946
CR
1584 YFLAGS The list of arguments that will be passed by default to $YACC.
1585 This script will default YFLAGS to the empty string to avoid a
1586 default value of `-d' given by some make applications.
f73dda09
JA
1587
1588Use these variables to override the choices made by `configure' or to help
1589it to find libraries and programs with nonstandard names/locations.
1590
1591Report bugs to <bug-bash@gnu.org>.
a82a04b3 1592_ACEOF
b709b946 1593ac_status=$?
f73dda09
JA
1594fi
1595
1596if test "$ac_init_help" = "recursive"; then
1597 # If there are subdirs, report their specific --help.
a82a04b3 1598 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
dd4f3dd8
CR
1599 test -d "$ac_dir" ||
1600 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1601 continue
a82a04b3
CR
1602 ac_builddir=.
1603
b709b946
CR
1604case "$ac_dir" in
1605.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1606*)
dd4f3dd8 1607 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
b709b946 1608 # A ".." for each directory in $ac_dir_suffix.
dd4f3dd8 1609 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
b709b946
CR
1610 case $ac_top_builddir_sub in
1611 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1612 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1613 esac ;;
1614esac
1615ac_abs_top_builddir=$ac_pwd
1616ac_abs_builddir=$ac_pwd$ac_dir_suffix
1617# for backward compatibility:
1618ac_top_builddir=$ac_top_build_prefix
a82a04b3
CR
1619
1620case $srcdir in
b709b946 1621 .) # We are building in place.
a82a04b3 1622 ac_srcdir=.
b709b946
CR
1623 ac_top_srcdir=$ac_top_builddir_sub
1624 ac_abs_top_srcdir=$ac_pwd ;;
1625 [\\/]* | ?:[\\/]* ) # Absolute name.
a82a04b3 1626 ac_srcdir=$srcdir$ac_dir_suffix;
b709b946
CR
1627 ac_top_srcdir=$srcdir
1628 ac_abs_top_srcdir=$srcdir ;;
1629 *) # Relative name.
1630 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1631 ac_top_srcdir=$ac_top_build_prefix$srcdir
1632 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
5e4a95c7 1633esac
b709b946
CR
1634ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1635
1636 cd "$ac_dir" || { ac_status=$?; continue; }
1637 # Check for guested configure.
1638 if test -f "$ac_srcdir/configure.gnu"; then
1639 echo &&
1640 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1641 elif test -f "$ac_srcdir/configure"; then
1642 echo &&
1643 $SHELL "$ac_srcdir/configure" --help=recursive
f73dda09 1644 else
dd4f3dd8 1645 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
b709b946
CR
1646 fi || ac_status=$?
1647 cd "$ac_pwd" || { ac_status=$?; break; }
f73dda09
JA
1648 done
1649fi
ccc6cda3 1650
b709b946 1651test -n "$ac_init_help" && exit $ac_status
f73dda09 1652if $ac_init_version; then
a82a04b3 1653 cat <<\_ACEOF
690150f9 1654bash configure 4.4-rc1
0ee50808 1655generated by GNU Autoconf 2.69
ccc6cda3 1656
0ee50808 1657Copyright (C) 2012 Free Software Foundation, Inc.
f73dda09
JA
1658This configure script is free software; the Free Software Foundation
1659gives unlimited permission to copy, distribute and modify it.
a82a04b3 1660_ACEOF
b709b946 1661 exit
f73dda09 1662fi
7175a77f 1663
1b1fe467
CR
1664## ------------------------ ##
1665## Autoconf initialization. ##
1666## ------------------------ ##
ccc6cda3 1667
1b1fe467
CR
1668# ac_fn_c_try_compile LINENO
1669# --------------------------
1670# Try to compile conftest.$ac_ext, and return whether this succeeded.
1671ac_fn_c_try_compile ()
1672{
1673 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1674 rm -f conftest.$ac_objext
1675 if { { ac_try="$ac_compile"
1676case "(($ac_try" in
1677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1678 *) ac_try_echo=$ac_try;;
1679esac
1680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1681$as_echo "$ac_try_echo"; } >&5
1682 (eval "$ac_compile") 2>conftest.err
1683 ac_status=$?
1684 if test -s conftest.err; then
1685 grep -v '^ *+' conftest.err >conftest.er1
1686 cat conftest.er1 >&5
1687 mv -f conftest.er1 conftest.err
1688 fi
1689 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1690 test $ac_status = 0; } && {
1691 test -z "$ac_c_werror_flag" ||
1692 test ! -s conftest.err
1693 } && test -s conftest.$ac_objext; then :
1694 ac_retval=0
1695else
1696 $as_echo "$as_me: failed program was:" >&5
1697sed 's/^/| /' conftest.$ac_ext >&5
2dead0c4 1698
1b1fe467
CR
1699 ac_retval=1
1700fi
1701 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1702 as_fn_set_status $ac_retval
1703
1704} # ac_fn_c_try_compile
1705
1706# ac_fn_c_try_link LINENO
1707# -----------------------
1708# Try to link conftest.$ac_ext, and return whether this succeeded.
1709ac_fn_c_try_link ()
7f947b68 1710{
1b1fe467
CR
1711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712 rm -f conftest.$ac_objext conftest$ac_exeext
1713 if { { ac_try="$ac_link"
1714case "(($ac_try" in
1715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1716 *) ac_try_echo=$ac_try;;
1717esac
1718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1719$as_echo "$ac_try_echo"; } >&5
1720 (eval "$ac_link") 2>conftest.err
1721 ac_status=$?
1722 if test -s conftest.err; then
1723 grep -v '^ *+' conftest.err >conftest.er1
1724 cat conftest.er1 >&5
1725 mv -f conftest.er1 conftest.err
1726 fi
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; } && {
1729 test -z "$ac_c_werror_flag" ||
1730 test ! -s conftest.err
1731 } && test -s conftest$ac_exeext && {
1732 test "$cross_compiling" = yes ||
0ee50808 1733 test -x conftest$ac_exeext
1b1fe467
CR
1734 }; then :
1735 ac_retval=0
1736else
1737 $as_echo "$as_me: failed program was:" >&5
1738sed 's/^/| /' conftest.$ac_ext >&5
2dead0c4 1739
1b1fe467
CR
1740 ac_retval=1
1741fi
1742 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1743 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1744 # interfere with the next link command; also delete a directory that is
1745 # left behind by Apple's compiler. We do this before executing the actions.
1746 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1747 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1748 as_fn_set_status $ac_retval
7f947b68 1749
1b1fe467 1750} # ac_fn_c_try_link
7f947b68 1751
1b1fe467
CR
1752# ac_fn_c_try_cpp LINENO
1753# ----------------------
1754# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1755ac_fn_c_try_cpp ()
1756{
1757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758 if { { ac_try="$ac_cpp conftest.$ac_ext"
1759case "(($ac_try" in
1760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1761 *) ac_try_echo=$ac_try;;
1762esac
1763eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1764$as_echo "$ac_try_echo"; } >&5
1765 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1766 ac_status=$?
1767 if test -s conftest.err; then
1768 grep -v '^ *+' conftest.err >conftest.er1
1769 cat conftest.er1 >&5
1770 mv -f conftest.er1 conftest.err
1771 fi
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; } > conftest.i && {
1774 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1775 test ! -s conftest.err
1776 }; then :
1777 ac_retval=0
1778else
1779 $as_echo "$as_me: failed program was:" >&5
1780sed 's/^/| /' conftest.$ac_ext >&5
a82a04b3 1781
1b1fe467
CR
1782 ac_retval=1
1783fi
1784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1785 as_fn_set_status $ac_retval
a82a04b3 1786
1b1fe467 1787} # ac_fn_c_try_cpp
c920c360 1788
1b1fe467
CR
1789# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1790# -------------------------------------------------------
1791# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1792# the include files in INCLUDES and setting the cache variable VAR
1793# accordingly.
1794ac_fn_c_check_header_mongrel ()
1795{
1796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797 if eval \${$3+:} false; then :
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1799$as_echo_n "checking for $2... " >&6; }
1800if eval \${$3+:} false; then :
1801 $as_echo_n "(cached) " >&6
1802fi
1803eval ac_res=\$$3
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1805$as_echo "$ac_res" >&6; }
1806else
1807 # Is the header compilable?
1808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1809$as_echo_n "checking $2 usability... " >&6; }
1810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1811/* end confdefs.h. */
1812$4
1813#include <$2>
7f947b68 1814_ACEOF
1b1fe467
CR
1815if ac_fn_c_try_compile "$LINENO"; then :
1816 ac_header_compiler=yes
1817else
1818 ac_header_compiler=no
1819fi
1820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1822$as_echo "$ac_header_compiler" >&6; }
a82a04b3 1823
1b1fe467
CR
1824# Is the header present?
1825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1826$as_echo_n "checking $2 presence... " >&6; }
1827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1828/* end confdefs.h. */
1829#include <$2>
1830_ACEOF
1831if ac_fn_c_try_cpp "$LINENO"; then :
1832 ac_header_preproc=yes
1833else
1834 ac_header_preproc=no
1835fi
1836rm -f conftest.err conftest.i conftest.$ac_ext
1837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1838$as_echo "$ac_header_preproc" >&6; }
b709b946 1839
1b1fe467
CR
1840# So? What about this header?
1841case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1842 yes:no: )
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1844$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1846$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1847 ;;
1848 no:yes:* )
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1850$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1852$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1854$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1856$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1858$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1859( $as_echo "## ------------------------------- ##
1860## Report this to bug-bash@gnu.org ##
1861## ------------------------------- ##"
1862 ) | sed "s/^/$as_me: WARNING: /" >&2
1863 ;;
1864esac
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1866$as_echo_n "checking for $2... " >&6; }
1867if eval \${$3+:} false; then :
1868 $as_echo_n "(cached) " >&6
1869else
1870 eval "$3=\$ac_header_compiler"
1871fi
1872eval ac_res=\$$3
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1874$as_echo "$ac_res" >&6; }
1875fi
1876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
ccc6cda3 1877
1b1fe467 1878} # ac_fn_c_check_header_mongrel
ccc6cda3 1879
1b1fe467
CR
1880# ac_fn_c_try_run LINENO
1881# ----------------------
1882# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1883# that executables *can* be run.
1884ac_fn_c_try_run ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887 if { { ac_try="$ac_link"
1888case "(($ac_try" in
1889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1890 *) ac_try_echo=$ac_try;;
1891esac
1892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1893$as_echo "$ac_try_echo"; } >&5
1894 (eval "$ac_link") 2>&5
1895 ac_status=$?
1896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1898 { { case "(($ac_try" in
1899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1900 *) ac_try_echo=$ac_try;;
1901esac
1902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1903$as_echo "$ac_try_echo"; } >&5
1904 (eval "$ac_try") 2>&5
1905 ac_status=$?
1906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1907 test $ac_status = 0; }; }; then :
1908 ac_retval=0
1909else
1910 $as_echo "$as_me: program exited with status $ac_status" >&5
1911 $as_echo "$as_me: failed program was:" >&5
1912sed 's/^/| /' conftest.$ac_ext >&5
71412226 1913
1b1fe467
CR
1914 ac_retval=$ac_status
1915fi
1916 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1917 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1918 as_fn_set_status $ac_retval
ccc6cda3 1919
1b1fe467 1920} # ac_fn_c_try_run
71412226 1921
1b1fe467
CR
1922# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1923# -------------------------------------------------------
1924# Tests whether HEADER exists and can be compiled using the include files in
1925# INCLUDES, setting the cache variable VAR accordingly.
1926ac_fn_c_check_header_compile ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
1931if eval \${$3+:} false; then :
1932 $as_echo_n "(cached) " >&6
1933else
1934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h. */
1936$4
1937#include <$2>
7f947b68 1938_ACEOF
1b1fe467
CR
1939if ac_fn_c_try_compile "$LINENO"; then :
1940 eval "$3=yes"
1941else
1942 eval "$3=no"
1943fi
1944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1945fi
1946eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948$as_echo "$ac_res" >&6; }
1949 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
71412226 1950
1b1fe467 1951} # ac_fn_c_check_header_compile
71412226 1952
1b1fe467
CR
1953# ac_fn_c_check_func LINENO FUNC VAR
1954# ----------------------------------
1955# Tests whether FUNC exists, setting the cache variable VAR accordingly
1956ac_fn_c_check_func ()
1957{
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1960$as_echo_n "checking for $2... " >&6; }
1961if eval \${$3+:} false; then :
1962 $as_echo_n "(cached) " >&6
1963else
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1967 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1968#define $2 innocuous_$2
71412226 1969
1b1fe467
CR
1970/* System header to define __stub macros and hopefully few prototypes,
1971 which can conflict with char $2 (); below.
1972 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1973 <limits.h> exists even on freestanding compilers. */
7610e0c5 1974
1b1fe467
CR
1975#ifdef __STDC__
1976# include <limits.h>
1977#else
1978# include <assert.h>
1979#endif
7610e0c5 1980
1b1fe467 1981#undef $2
c920c360 1982
1b1fe467
CR
1983/* Override any GCC internal prototype to avoid an error.
1984 Use char because int might match the return type of a GCC
1985 builtin and then its argument prototype would still apply. */
1986#ifdef __cplusplus
1987extern "C"
1988#endif
1989char $2 ();
1990/* The GNU C library defines this for functions which it implements
1991 to always fail with ENOSYS. Some functions are actually named
1992 something starting with __ and the normal name is an alias. */
1993#if defined __stub_$2 || defined __stub___$2
1994choke me
1995#endif
1996
1997int
1998main ()
1999{
2000return $2 ();
2001 ;
2002 return 0;
2003}
7f947b68 2004_ACEOF
1b1fe467
CR
2005if ac_fn_c_try_link "$LINENO"; then :
2006 eval "$3=yes"
2007else
2008 eval "$3=no"
2009fi
2010rm -f core conftest.err conftest.$ac_objext \
2011 conftest$ac_exeext conftest.$ac_ext
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
2016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
7610e0c5 2017
1b1fe467 2018} # ac_fn_c_check_func
71412226 2019
1b1fe467
CR
2020# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2021# -------------------------------------------
2022# Tests whether TYPE exists after having included INCLUDES, setting cache
2023# variable VAR accordingly.
2024ac_fn_c_check_type ()
2025{
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2028$as_echo_n "checking for $2... " >&6; }
2029if eval \${$3+:} false; then :
2030 $as_echo_n "(cached) " >&6
7f947b68 2031else
1b1fe467
CR
2032 eval "$3=no"
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$4
2036int
2037main ()
2038{
2039if (sizeof ($2))
2040 return 0;
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052if (sizeof (($2)))
2053 return 0;
2054 ;
2055 return 0;
2056}
2057_ACEOF
2058if ac_fn_c_try_compile "$LINENO"; then :
c920c360 2059
7f947b68 2060else
1b1fe467 2061 eval "$3=yes"
7f947b68 2062fi
1b1fe467 2063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7175a77f 2064fi
1b1fe467
CR
2065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066fi
2067eval ac_res=\$$3
2068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2069$as_echo "$ac_res" >&6; }
2070 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
71412226 2071
1b1fe467 2072} # ac_fn_c_check_type
c920c360 2073
1b1fe467
CR
2074# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2075# ---------------------------------------------
2076# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2077# accordingly.
2078ac_fn_c_check_decl ()
2079{
2080 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2081 as_decl_name=`echo $2|sed 's/ *(.*//'`
2082 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2084$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2085if eval \${$3+:} false; then :
2086 $as_echo_n "(cached) " >&6
2087else
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094#ifndef $as_decl_name
2095#ifdef __cplusplus
2096 (void) $as_decl_use;
2097#else
2098 (void) $as_decl_name;
2099#endif
2100#endif
c920c360 2101
1b1fe467
CR
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 eval "$3=yes"
2108else
2109 eval "$3=no"
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112fi
2113eval ac_res=\$$3
2114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2115$as_echo "$ac_res" >&6; }
2116 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c920c360 2117
1b1fe467 2118} # ac_fn_c_check_decl
c920c360 2119
1b1fe467
CR
2120# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2121# --------------------------------------------
2122# Tries to find the compile-time value of EXPR in a program that includes
2123# INCLUDES, setting VAR accordingly. Returns whether the value could be
2124# computed
2125ac_fn_c_compute_int ()
2126{
2127 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128 if test "$cross_compiling" = yes; then
2129 # Depending upon the size, compute the lo and hi bounds.
2130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133int
2134main ()
2135{
2136static int test_array [1 - 2 * !(($2) >= 0)];
0ee50808
CR
2137test_array [0] = 0;
2138return test_array [0];
c920c360 2139
1b1fe467
CR
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_compile "$LINENO"; then :
2145 ac_lo=0 ac_mid=0
2146 while :; do
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h. */
2149$4
2150int
2151main ()
2152{
2153static int test_array [1 - 2 * !(($2) <= $ac_mid)];
0ee50808
CR
2154test_array [0] = 0;
2155return test_array [0];
c920c360 2156
1b1fe467
CR
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_c_try_compile "$LINENO"; then :
2162 ac_hi=$ac_mid; break
2163else
2164 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2165 if test $ac_lo -le $ac_mid; then
2166 ac_lo= ac_hi=
2167 break
2168 fi
2169 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2170fi
2171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172 done
2173else
2174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2175/* end confdefs.h. */
2176$4
2177int
2178main ()
2179{
2180static int test_array [1 - 2 * !(($2) < 0)];
0ee50808
CR
2181test_array [0] = 0;
2182return test_array [0];
c920c360 2183
1b1fe467
CR
2184 ;
2185 return 0;
2186}
2187_ACEOF
2188if ac_fn_c_try_compile "$LINENO"; then :
2189 ac_hi=-1 ac_mid=-1
2190 while :; do
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193$4
2194int
2195main ()
2196{
2197static int test_array [1 - 2 * !(($2) >= $ac_mid)];
0ee50808
CR
2198test_array [0] = 0;
2199return test_array [0];
c920c360 2200
1b1fe467
CR
2201 ;
2202 return 0;
2203}
2204_ACEOF
2205if ac_fn_c_try_compile "$LINENO"; then :
2206 ac_lo=$ac_mid; break
2207else
2208 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2209 if test $ac_mid -le $ac_hi; then
2210 ac_lo= ac_hi=
2211 break
2212 fi
2213 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2214fi
2215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2216 done
2217else
2218 ac_lo= ac_hi=
2219fi
2220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221fi
2222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2223# Binary search between lo and hi bounds.
2224while test "x$ac_lo" != "x$ac_hi"; do
2225 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) <= $ac_mid)];
0ee50808
CR
2233test_array [0] = 0;
2234return test_array [0];
c920c360 2235
1b1fe467
CR
2236 ;
2237 return 0;
2238}
2239_ACEOF
2240if ac_fn_c_try_compile "$LINENO"; then :
2241 ac_hi=$ac_mid
2242else
2243 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2244fi
2245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2246done
2247case $ac_lo in #((
2248?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2249'') ac_retval=1 ;;
2250esac
2251 else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$4
2255static long int longval () { return $2; }
2256static unsigned long int ulongval () { return $2; }
2257#include <stdio.h>
2258#include <stdlib.h>
2259int
2260main ()
2261{
c920c360 2262
1b1fe467
CR
2263 FILE *f = fopen ("conftest.val", "w");
2264 if (! f)
2265 return 1;
2266 if (($2) < 0)
2267 {
2268 long int i = longval ();
2269 if (i != ($2))
2270 return 1;
2271 fprintf (f, "%ld", i);
2272 }
2273 else
2274 {
2275 unsigned long int i = ulongval ();
2276 if (i != ($2))
2277 return 1;
2278 fprintf (f, "%lu", i);
2279 }
2280 /* Do not output a trailing newline, as this causes \r\n confusion
2281 on some platforms. */
2282 return ferror (f) || fclose (f) != 0;
2dead0c4 2283
1b1fe467
CR
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_run "$LINENO"; then :
2289 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2290else
2291 ac_retval=1
2292fi
2293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2294 conftest.$ac_objext conftest.beam conftest.$ac_ext
2295rm -f conftest.val
c920c360 2296
1b1fe467
CR
2297 fi
2298 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299 as_fn_set_status $ac_retval
c920c360 2300
1b1fe467 2301} # ac_fn_c_compute_int
2dead0c4 2302
1b1fe467
CR
2303# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2304# ----------------------------------------------------
2305# Tries to find if the field MEMBER exists in type AGGR, after including
2306# INCLUDES, setting cache variable VAR accordingly.
2307ac_fn_c_check_member ()
2308{
2309 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2311$as_echo_n "checking for $2.$3... " >&6; }
2312if eval \${$4+:} false; then :
7f947b68
CR
2313 $as_echo_n "(cached) " >&6
2314else
1b1fe467
CR
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$5
2318int
2319main ()
2320{
2321static $2 ac_aggr;
2322if (ac_aggr.$3)
2323return 0;
2324 ;
2325 return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"; then :
2329 eval "$4=yes"
7f947b68 2330else
1b1fe467
CR
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332/* end confdefs.h. */
2333$5
2334int
2335main ()
2336{
2337static $2 ac_aggr;
2338if (sizeof ac_aggr.$3)
2339return 0;
2340 ;
2341 return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_compile "$LINENO"; then :
2345 eval "$4=yes"
7f947b68 2346else
1b1fe467 2347 eval "$4=no"
2dead0c4 2348fi
1b1fe467 2349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2dead0c4 2350fi
1b1fe467 2351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7175a77f 2352fi
1b1fe467
CR
2353eval ac_res=\$$4
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2355$as_echo "$ac_res" >&6; }
2356 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
200aed9a 2357
1b1fe467
CR
2358} # ac_fn_c_check_member
2359cat >config.log <<_ACEOF
2360This file contains any messages produced by compilers while
2361running configure, to aid debugging if configure makes a mistake.
2dead0c4 2362
690150f9 2363It was created by bash $as_me 4.4-rc1, which was
0ee50808 2364generated by GNU Autoconf 2.69. Invocation command line was
2dead0c4 2365
1b1fe467 2366 $ $0 $@
2dead0c4 2367
1b1fe467
CR
2368_ACEOF
2369exec 5>>config.log
2370{
2371cat <<_ASUNAME
2372## --------- ##
2373## Platform. ##
2374## --------- ##
2dead0c4 2375
1b1fe467
CR
2376hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2377uname -m = `(uname -m) 2>/dev/null || echo unknown`
2378uname -r = `(uname -r) 2>/dev/null || echo unknown`
2379uname -s = `(uname -s) 2>/dev/null || echo unknown`
2380uname -v = `(uname -v) 2>/dev/null || echo unknown`
2dead0c4 2381
1b1fe467
CR
2382/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2383/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2dead0c4 2384
1b1fe467
CR
2385/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2386/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2387/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2388/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2389/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2390/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2391/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2dead0c4 2392
1b1fe467 2393_ASUNAME
2dead0c4 2394
1b1fe467
CR
2395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2396for as_dir in $PATH
2397do
2398 IFS=$as_save_IFS
2399 test -z "$as_dir" && as_dir=.
2400 $as_echo "PATH: $as_dir"
2401 done
2402IFS=$as_save_IFS
2dead0c4 2403
1b1fe467 2404} >&5
2dead0c4 2405
1b1fe467 2406cat >&5 <<_ACEOF
2dead0c4
CR
2407
2408
1b1fe467
CR
2409## ----------- ##
2410## Core tests. ##
2411## ----------- ##
2dead0c4 2412
1b1fe467 2413_ACEOF
2dead0c4
CR
2414
2415
1b1fe467
CR
2416# Keep a trace of the command line.
2417# Strip out --no-create and --no-recursion so they do not pile up.
2418# Strip out --silent because we don't want to record it for future runs.
2419# Also quote any args containing shell meta-characters.
2420# Make two passes to allow for proper duplicate-argument suppression.
2421ac_configure_args=
2422ac_configure_args0=
2423ac_configure_args1=
2424ac_must_keep_next=false
2425for ac_pass in 1 2
2426do
2427 for ac_arg
2428 do
2429 case $ac_arg in
2430 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2431 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2432 | -silent | --silent | --silen | --sile | --sil)
2433 continue ;;
2434 *\'*)
2435 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2436 esac
2437 case $ac_pass in
2438 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2439 2)
2440 as_fn_append ac_configure_args1 " '$ac_arg'"
2441 if test $ac_must_keep_next = true; then
2442 ac_must_keep_next=false # Got value, back to normal.
2443 else
2444 case $ac_arg in
2445 *=* | --config-cache | -C | -disable-* | --disable-* \
2446 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2447 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2448 | -with-* | --with-* | -without-* | --without-* | --x)
2449 case "$ac_configure_args0 " in
2450 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2451 esac
2452 ;;
2453 -* ) ac_must_keep_next=true ;;
2454 esac
2455 fi
2456 as_fn_append ac_configure_args " '$ac_arg'"
2457 ;;
2458 esac
2459 done
2460done
2461{ ac_configure_args0=; unset ac_configure_args0;}
2462{ ac_configure_args1=; unset ac_configure_args1;}
2dead0c4 2463
1b1fe467
CR
2464# When interrupted or exit'd, cleanup temporary files, and complete
2465# config.log. We remove comments because anyway the quotes in there
2466# would cause problems or look ugly.
2467# WARNING: Use '\'' to represent an apostrophe within the trap.
2468# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2469trap 'exit_status=$?
2470 # Save into config.log some information that might help in debugging.
2471 {
2472 echo
2dead0c4 2473
1b1fe467
CR
2474 $as_echo "## ---------------- ##
2475## Cache variables. ##
2476## ---------------- ##"
2477 echo
2478 # The following way of writing the cache mishandles newlines in values,
2479(
2480 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2481 eval ac_val=\$$ac_var
2482 case $ac_val in #(
2483 *${as_nl}*)
2484 case $ac_var in #(
2485 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2486$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2487 esac
2488 case $ac_var in #(
2489 _ | IFS | as_nl) ;; #(
2490 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2491 *) { eval $ac_var=; unset $ac_var;} ;;
2492 esac ;;
2493 esac
2494 done
2495 (set) 2>&1 |
2496 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2497 *${as_nl}ac_space=\ *)
2498 sed -n \
2499 "s/'\''/'\''\\\\'\'''\''/g;
2500 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2501 ;; #(
2502 *)
2503 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2504 ;;
2505 esac |
2506 sort
2507)
2508 echo
2509
2510 $as_echo "## ----------------- ##
2511## Output variables. ##
2512## ----------------- ##"
2513 echo
2514 for ac_var in $ac_subst_vars
2515 do
2516 eval ac_val=\$$ac_var
2517 case $ac_val in
2518 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2519 esac
2520 $as_echo "$ac_var='\''$ac_val'\''"
2521 done | sort
2522 echo
2dead0c4 2523
1b1fe467
CR
2524 if test -n "$ac_subst_files"; then
2525 $as_echo "## ------------------- ##
2526## File substitutions. ##
2527## ------------------- ##"
2528 echo
2529 for ac_var in $ac_subst_files
2530 do
2531 eval ac_val=\$$ac_var
2532 case $ac_val in
2533 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2534 esac
2535 $as_echo "$ac_var='\''$ac_val'\''"
2536 done | sort
2537 echo
2538 fi
7f947b68 2539
1b1fe467
CR
2540 if test -s confdefs.h; then
2541 $as_echo "## ----------- ##
2542## confdefs.h. ##
2543## ----------- ##"
2544 echo
2545 cat confdefs.h
2546 echo
2547 fi
2548 test "$ac_signal" != 0 &&
2549 $as_echo "$as_me: caught signal $ac_signal"
2550 $as_echo "$as_me: exit $exit_status"
2551 } >&5
2552 rm -f core *.core core.conftest.* &&
2553 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2554 exit $exit_status
2555' 0
2556for ac_signal in 1 2 13 15; do
2557 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2558done
2559ac_signal=0
2dead0c4 2560
1b1fe467
CR
2561# confdefs.h avoids OS command line length limits that DEFS can exceed.
2562rm -f -r conftest* confdefs.h
7f947b68 2563
1b1fe467 2564$as_echo "/* confdefs.h */" > confdefs.h
7f947b68 2565
1b1fe467 2566# Predefined preprocessor variables.
7f947b68 2567
1b1fe467
CR
2568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_NAME "$PACKAGE_NAME"
7175a77f 2570_ACEOF
7f947b68 2571
1b1fe467
CR
2572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2574_ACEOF
2dead0c4 2575
1b1fe467
CR
2576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_VERSION "$PACKAGE_VERSION"
7175a77f 2578_ACEOF
7f947b68 2579
1b1fe467
CR
2580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_STRING "$PACKAGE_STRING"
2582_ACEOF
2dead0c4 2583
1b1fe467
CR
2584cat >>confdefs.h <<_ACEOF
2585#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2586_ACEOF
7f947b68 2587
1b1fe467
CR
2588cat >>confdefs.h <<_ACEOF
2589#define PACKAGE_URL "$PACKAGE_URL"
7175a77f 2590_ACEOF
2dead0c4 2591
1b1fe467
CR
2592
2593# Let the site file select an alternate cache file if it wants to.
2594# Prefer an explicitly selected file to automatically selected ones.
2595ac_site_file1=NONE
2596ac_site_file2=NONE
2597if test -n "$CONFIG_SITE"; then
2598 # We do not want a PATH search for config.site.
2599 case $CONFIG_SITE in #((
2600 -*) ac_site_file1=./$CONFIG_SITE;;
2601 */*) ac_site_file1=$CONFIG_SITE;;
2602 *) ac_site_file1=./$CONFIG_SITE;;
2603 esac
2604elif test "x$prefix" != xNONE; then
2605 ac_site_file1=$prefix/share/config.site
2606 ac_site_file2=$prefix/etc/config.site
2607else
2608 ac_site_file1=$ac_default_prefix/share/config.site
2609 ac_site_file2=$ac_default_prefix/etc/config.site
2dead0c4 2610fi
1b1fe467
CR
2611for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2612do
2613 test "x$ac_site_file" = xNONE && continue
2614 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2616$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2617 sed 's/^/| /' "$ac_site_file" >&5
2618 . "$ac_site_file" \
2619 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2620$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2621as_fn_error $? "failed to load site script $ac_site_file
2622See \`config.log' for more details" "$LINENO" 5; }
2623 fi
2624done
2dead0c4 2625
1b1fe467
CR
2626if test -r "$cache_file"; then
2627 # Some versions of bash will fail to source /dev/null (special files
2628 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2629 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2630 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2631$as_echo "$as_me: loading cache $cache_file" >&6;}
2632 case $cache_file in
2633 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2634 *) . "./$cache_file";;
2635 esac
2636 fi
2637else
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2639$as_echo "$as_me: creating cache $cache_file" >&6;}
2640 >$cache_file
2dead0c4 2641fi
2dead0c4 2642
1b1fe467
CR
2643as_fn_append ac_header_list " stdlib.h"
2644as_fn_append ac_header_list " unistd.h"
2645as_fn_append ac_header_list " sys/param.h"
2646as_fn_append ac_header_list " sys/time.h"
2647as_fn_append ac_func_list " alarm"
2648as_fn_append ac_func_list " fpurge"
2649as_fn_append ac_func_list " __fpurge"
2650as_fn_append ac_func_list " snprintf"
2651as_fn_append ac_func_list " vsnprintf"
2652# Check that the precious variables saved in the cache have kept the same
2653# value.
2654ac_cache_corrupted=false
2655for ac_var in $ac_precious_vars; do
2656 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2657 eval ac_new_set=\$ac_env_${ac_var}_set
2658 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2659 eval ac_new_val=\$ac_env_${ac_var}_value
2660 case $ac_old_set,$ac_new_set in
2661 set,)
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2663$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2664 ac_cache_corrupted=: ;;
2665 ,set)
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2667$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2668 ac_cache_corrupted=: ;;
2669 ,);;
2670 *)
2671 if test "x$ac_old_val" != "x$ac_new_val"; then
2672 # differences in whitespace do not lead to failure.
2673 ac_old_val_w=`echo x $ac_old_val`
2674 ac_new_val_w=`echo x $ac_new_val`
2675 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2677$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2678 ac_cache_corrupted=:
2679 else
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2681$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2682 eval $ac_var=\$ac_old_val
2683 fi
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2685$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2687$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2688 fi;;
2689 esac
2690 # Pass precious variables to config.status.
2691 if test "$ac_new_set" = set; then
2692 case $ac_new_val in
2693 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2694 *) ac_arg=$ac_var=$ac_new_val ;;
2695 esac
2696 case " $ac_configure_args " in
2697 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2698 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2699 esac
2700 fi
2701done
2702if $ac_cache_corrupted; then
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2706$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2707 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2dead0c4 2708fi
1b1fe467
CR
2709## -------------------- ##
2710## Main body of script. ##
2711## -------------------- ##
2dead0c4 2712
1b1fe467
CR
2713ac_ext=c
2714ac_cpp='$CPP $CPPFLAGS'
2715ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2716ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2717ac_compiler_gnu=$ac_cv_c_compiler_gnu
2718
2719
2720
2721
2722
2723
2724ac_aux_dir=
2725for ac_dir in ./support "$srcdir"/./support; do
2726 if test -f "$ac_dir/install-sh"; then
2727 ac_aux_dir=$ac_dir
2728 ac_install_sh="$ac_aux_dir/install-sh -c"
2729 break
2730 elif test -f "$ac_dir/install.sh"; then
2731 ac_aux_dir=$ac_dir
2732 ac_install_sh="$ac_aux_dir/install.sh -c"
2733 break
2734 elif test -f "$ac_dir/shtool"; then
2735 ac_aux_dir=$ac_dir
2736 ac_install_sh="$ac_aux_dir/shtool install -c"
2737 break
2738 fi
2739done
2740if test -z "$ac_aux_dir"; then
2741 as_fn_error $? "cannot find install-sh, install.sh, or shtool in ./support \"$srcdir\"/./support" "$LINENO" 5
2742fi
2743
2744# These three variables are undocumented and unsupported,
2745# and are intended to be withdrawn in a future Autoconf release.
2746# They can cause serious problems if a builder's source tree is in a directory
2747# whose full name contains unusual characters.
2748ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2749ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2750ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2751
2752
2753ac_config_headers="$ac_config_headers config.h"
2754
2755
8f50a023 2756BASHVERS=4.4
690150f9 2757RELSTATUS=rc1
1b1fe467
CR
2758
2759case "$RELSTATUS" in
2760alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
2761*) DEBUG= MALLOC_DEBUG= ;;
2762esac
2763
2764# Make sure we can run config.sub.
2765$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2766 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2767
2768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2769$as_echo_n "checking build system type... " >&6; }
2770if ${ac_cv_build+:} false; then :
2771 $as_echo_n "(cached) " >&6
2772else
2773 ac_build_alias=$build_alias
2774test "x$ac_build_alias" = x &&
2775 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2776test "x$ac_build_alias" = x &&
2777 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2778ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2779 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2780
2781fi
2782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2783$as_echo "$ac_cv_build" >&6; }
2784case $ac_cv_build in
2785*-*-*) ;;
2786*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2787esac
2788build=$ac_cv_build
2789ac_save_IFS=$IFS; IFS='-'
2790set x $ac_cv_build
2791shift
2792build_cpu=$1
2793build_vendor=$2
2794shift; shift
2795# Remember, the first character of IFS is used to create $*,
2796# except with old shells:
2797build_os=$*
2798IFS=$ac_save_IFS
2799case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2800
2801
2802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2803$as_echo_n "checking host system type... " >&6; }
2804if ${ac_cv_host+:} false; then :
2805 $as_echo_n "(cached) " >&6
2806else
2807 if test "x$host_alias" = x; then
2808 ac_cv_host=$ac_cv_build
2809else
2810 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2811 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2812fi
2813
2814fi
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2816$as_echo "$ac_cv_host" >&6; }
2817case $ac_cv_host in
2818*-*-*) ;;
2819*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2820esac
2821host=$ac_cv_host
2822ac_save_IFS=$IFS; IFS='-'
2823set x $ac_cv_host
2824shift
2825host_cpu=$1
2826host_vendor=$2
2827shift; shift
2828# Remember, the first character of IFS is used to create $*,
2829# except with old shells:
2830host_os=$*
2831IFS=$ac_save_IFS
2832case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2833
2834
2835
2836
2837opt_bash_malloc=yes
1b1fe467
CR
2838opt_afs=no
2839opt_curses=no
2840opt_with_installed_readline=no
2841
2842#htmldir=
2843
2844case "${host_cpu}-${host_os}" in
2845alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux
2846*[Cc]ray*-*) opt_bash_malloc=no ;; # Crays
2847*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines
2848sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2
2849sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
2850mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
2851m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
2852sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
2853#*-freebsd*-gnu) opt_bash_malloc=no ;; # there's some undetermined problem here
2854#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree
2855*-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
2856*-mirbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
2857*-aix*) opt_bash_malloc=no ;; # AIX machines
2858*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
10e78433 2859*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep
1b1fe467
CR
2860*-macos*) opt_bash_malloc=no ;; # Apple MacOS X
2861*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X)
2862*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X)
2863*-dgux*) opt_bash_malloc=no ;; # DG/UX machines
2864*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX 6.x
2865*-machten4) opt_bash_malloc=no ;; # MachTen 4.x
2866*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
2867*-beos*) opt_bash_malloc=no ;; # they say it's suitable
2868*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
2869*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
2870*-nsk*) opt_bash_malloc=no ;; # HP NonStop
c51b384f 2871*-haiku*) opt_bash_malloc=no ;; # Haiku OS
1b1fe467
CR
2872esac
2873
2874# memory scrambling on free()
2875case "${host_os}" in
2876sco3.2v5*|sco3.2v4*) opt_memscramble=no ;;
2877*) opt_memscramble=yes ;;
2878esac
2879
2880
2881
2882
2883# Check whether --with-afs was given.
2884if test "${with_afs+set}" = set; then :
2885 withval=$with_afs; opt_afs=$withval
2886fi
2887
2888
2889# Check whether --with-bash-malloc was given.
2890if test "${with_bash_malloc+set}" = set; then :
2891 withval=$with_bash_malloc; opt_bash_malloc=$withval
2892fi
2893
2894
2895# Check whether --with-curses was given.
2896if test "${with_curses+set}" = set; then :
2897 withval=$with_curses; opt_curses=$withval
2898fi
2899
2900
2901# Check whether --with-gnu-malloc was given.
2902if test "${with_gnu_malloc+set}" = set; then :
2903 withval=$with_gnu_malloc; opt_bash_malloc=$withval
2904fi
2905
2906
2907# Check whether --with-installed-readline was given.
2908if test "${with_installed_readline+set}" = set; then :
2909 withval=$with_installed_readline; opt_with_installed_readline=$withval
2910fi
2911
2912
1b1fe467
CR
2913if test "$opt_bash_malloc" = yes; then
2914 MALLOC_TARGET=malloc
2915 MALLOC_SRC=malloc.c
2916
2917 MALLOC_LIB='-lmalloc'
2918 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
2919 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
2920 MALLOC_DEP='$(MALLOC_LIBRARY)'
2921
2922 $as_echo "#define USING_BASH_MALLOC 1" >>confdefs.h
2923
2924else
2925 MALLOC_LIB=
2926 MALLOC_LIBRARY=
2927 MALLOC_LDFLAGS=
2928 MALLOC_DEP=
2929fi
2930
1b1fe467
CR
2931if test "$opt_afs" = yes; then
2932 $as_echo "#define AFS 1" >>confdefs.h
2933
2934fi
2935
2936if test "$opt_curses" = yes; then
2937 prefer_curses=yes
2938fi
2939
2940if test -z "${DEBUGGER_START_FILE}"; then
2941 DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc'
2942fi
2943
2944opt_minimal_config=no
7f947b68
CR
2945
2946opt_job_control=yes
2947opt_alias=yes
2948opt_readline=yes
2949opt_history=yes
2950opt_bang_history=yes
2951opt_dirstack=yes
2952opt_restricted=yes
2953opt_process_subst=yes
2954opt_prompt_decoding=yes
2955opt_select=yes
2956opt_help=yes
2957opt_array_variables=yes
2958opt_dparen_arith=yes
2959opt_extended_glob=yes
2960opt_brace_expansion=yes
2961opt_disabled_builtins=no
2962opt_command_timing=yes
2963opt_xpg_echo=no
2964opt_strict_posix=no
2965opt_cond_command=yes
2966opt_cond_regexp=yes
2967opt_coproc=yes
2968opt_arith_for_command=yes
2969opt_net_redirs=yes
2970opt_progcomp=yes
2971opt_separate_help=no
2972opt_multibyte=yes
2973opt_debugger=yes
2974opt_single_longdoc_strings=yes
2975opt_casemod_attrs=yes
2976opt_casemod_expansions=yes
2977opt_extglob_default=no
f14388d3 2978opt_dircomplete_expand_default=no
c111d992 2979opt_globascii_default=no
f3aad56d 2980opt_function_import=yes
7f947b68
CR
2981
2982opt_static_link=no
2983opt_profiling=no
2984
2985# Check whether --enable-minimal-config was given.
1b1fe467 2986if test "${enable_minimal_config+set}" = set; then :
7f947b68 2987 enableval=$enable_minimal_config; opt_minimal_config=$enableval
2dead0c4 2988fi
2dead0c4 2989
7f947b68
CR
2990
2991if test $opt_minimal_config = yes; then
2992 opt_job_control=no opt_alias=no opt_readline=no
2993 opt_history=no opt_bang_history=no opt_dirstack=no
2994 opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
2995 opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
2996 opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
2997 opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no
2998 opt_net_redirs=no opt_progcomp=no opt_separate_help=no
2999 opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
3000 opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
c111d992 3001 opt_globascii_default=no
2dead0c4 3002fi
2dead0c4 3003
7f947b68 3004# Check whether --enable-alias was given.
1b1fe467 3005if test "${enable_alias+set}" = set; then :
7f947b68 3006 enableval=$enable_alias; opt_alias=$enableval
2dead0c4 3007fi
2dead0c4 3008
7f947b68 3009# Check whether --enable-arith-for-command was given.
1b1fe467 3010if test "${enable_arith_for_command+set}" = set; then :
7f947b68 3011 enableval=$enable_arith_for_command; opt_arith_for_command=$enableval
2dead0c4 3012fi
2dead0c4 3013
7f947b68 3014# Check whether --enable-array-variables was given.
1b1fe467 3015if test "${enable_array_variables+set}" = set; then :
7f947b68 3016 enableval=$enable_array_variables; opt_array_variables=$enableval
2dead0c4 3017fi
2dead0c4 3018
7f947b68 3019# Check whether --enable-bang-history was given.
1b1fe467 3020if test "${enable_bang_history+set}" = set; then :
7f947b68
CR
3021 enableval=$enable_bang_history; opt_bang_history=$enableval
3022fi
2dead0c4 3023
7f947b68 3024# Check whether --enable-brace-expansion was given.
1b1fe467 3025if test "${enable_brace_expansion+set}" = set; then :
7f947b68 3026 enableval=$enable_brace_expansion; opt_brace_expansion=$enableval
2dead0c4 3027fi
2dead0c4 3028
7f947b68 3029# Check whether --enable-casemod-attributes was given.
1b1fe467 3030if test "${enable_casemod_attributes+set}" = set; then :
7f947b68 3031 enableval=$enable_casemod_attributes; opt_casemod_attrs=$enableval
2dead0c4 3032fi
2dead0c4 3033
7f947b68 3034# Check whether --enable-casemod-expansions was given.
1b1fe467 3035if test "${enable_casemod_expansions+set}" = set; then :
7f947b68 3036 enableval=$enable_casemod_expansions; opt_casemod_expansions=$enableval
2dead0c4 3037fi
2dead0c4 3038
7f947b68 3039# Check whether --enable-command-timing was given.
1b1fe467 3040if test "${enable_command_timing+set}" = set; then :
7f947b68 3041 enableval=$enable_command_timing; opt_command_timing=$enableval
2dead0c4 3042fi
2dead0c4 3043
7f947b68 3044# Check whether --enable-cond-command was given.
1b1fe467 3045if test "${enable_cond_command+set}" = set; then :
7f947b68 3046 enableval=$enable_cond_command; opt_cond_command=$enableval
2dead0c4 3047fi
2dead0c4 3048
7f947b68 3049# Check whether --enable-cond-regexp was given.
1b1fe467 3050if test "${enable_cond_regexp+set}" = set; then :
7f947b68 3051 enableval=$enable_cond_regexp; opt_cond_regexp=$enableval
2dead0c4 3052fi
2dead0c4 3053
7f947b68 3054# Check whether --enable-coprocesses was given.
1b1fe467 3055if test "${enable_coprocesses+set}" = set; then :
7f947b68 3056 enableval=$enable_coprocesses; opt_coproc=$enableval
2dead0c4 3057fi
2dead0c4 3058
7f947b68 3059# Check whether --enable-debugger was given.
1b1fe467 3060if test "${enable_debugger+set}" = set; then :
7f947b68 3061 enableval=$enable_debugger; opt_debugger=$enableval
2dead0c4 3062fi
2dead0c4 3063
f14388d3 3064# Check whether --enable-direxpand-default was given.
1b1fe467 3065if test "${enable_direxpand_default+set}" = set; then :
f14388d3
CR
3066 enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval
3067fi
3068
7f947b68 3069# Check whether --enable-directory-stack was given.
1b1fe467 3070if test "${enable_directory_stack+set}" = set; then :
7f947b68 3071 enableval=$enable_directory_stack; opt_dirstack=$enableval
2dead0c4 3072fi
2dead0c4 3073
7f947b68 3074# Check whether --enable-disabled-builtins was given.
1b1fe467 3075if test "${enable_disabled_builtins+set}" = set; then :
7f947b68 3076 enableval=$enable_disabled_builtins; opt_disabled_builtins=$enableval
2dead0c4 3077fi
2dead0c4 3078
7f947b68 3079# Check whether --enable-dparen-arithmetic was given.
1b1fe467 3080if test "${enable_dparen_arithmetic+set}" = set; then :
7f947b68 3081 enableval=$enable_dparen_arithmetic; opt_dparen_arith=$enableval
2dead0c4
CR
3082fi
3083
7f947b68 3084# Check whether --enable-extended-glob was given.
1b1fe467 3085if test "${enable_extended_glob+set}" = set; then :
7f947b68
CR
3086 enableval=$enable_extended_glob; opt_extended_glob=$enableval
3087fi
2dead0c4 3088
7f947b68 3089# Check whether --enable-extended-glob-default was given.
1b1fe467 3090if test "${enable_extended_glob_default+set}" = set; then :
7f947b68 3091 enableval=$enable_extended_glob_default; opt_extglob_default=$enableval
2dead0c4
CR
3092fi
3093
85ec0778
CR
3094# Check whether --enable-function-import was given.
3095if test "${enable_function_import+set}" = set; then :
3096 enableval=$enable_function_import; opt_function_import=$enableval
f3aad56d
CR
3097fi
3098
c111d992
CR
3099# Check whether --enable-glob-asciiranges-default was given.
3100if test "${enable_glob_asciiranges_default+set}" = set; then :
3101 enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval
3102fi
3103
7f947b68 3104# Check whether --enable-help-builtin was given.
1b1fe467 3105if test "${enable_help_builtin+set}" = set; then :
7f947b68 3106 enableval=$enable_help_builtin; opt_help=$enableval
2dead0c4
CR
3107fi
3108
7f947b68 3109# Check whether --enable-history was given.
1b1fe467 3110if test "${enable_history+set}" = set; then :
7f947b68 3111 enableval=$enable_history; opt_history=$enableval
2dead0c4 3112fi
7f947b68
CR
3113
3114# Check whether --enable-job-control was given.
1b1fe467 3115if test "${enable_job_control+set}" = set; then :
7f947b68
CR
3116 enableval=$enable_job_control; opt_job_control=$enableval
3117fi
3118
3119# Check whether --enable-multibyte was given.
1b1fe467 3120if test "${enable_multibyte+set}" = set; then :
7f947b68
CR
3121 enableval=$enable_multibyte; opt_multibyte=$enableval
3122fi
3123
3124# Check whether --enable-net-redirections was given.
1b1fe467 3125if test "${enable_net_redirections+set}" = set; then :
7f947b68
CR
3126 enableval=$enable_net_redirections; opt_net_redirs=$enableval
3127fi
3128
3129# Check whether --enable-process-substitution was given.
1b1fe467 3130if test "${enable_process_substitution+set}" = set; then :
7f947b68
CR
3131 enableval=$enable_process_substitution; opt_process_subst=$enableval
3132fi
3133
3134# Check whether --enable-progcomp was given.
1b1fe467 3135if test "${enable_progcomp+set}" = set; then :
7f947b68
CR
3136 enableval=$enable_progcomp; opt_progcomp=$enableval
3137fi
3138
3139# Check whether --enable-prompt-string-decoding was given.
1b1fe467 3140if test "${enable_prompt_string_decoding+set}" = set; then :
7f947b68
CR
3141 enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval
3142fi
3143
3144# Check whether --enable-readline was given.
1b1fe467 3145if test "${enable_readline+set}" = set; then :
7f947b68
CR
3146 enableval=$enable_readline; opt_readline=$enableval
3147fi
3148
3149# Check whether --enable-restricted was given.
1b1fe467 3150if test "${enable_restricted+set}" = set; then :
7f947b68
CR
3151 enableval=$enable_restricted; opt_restricted=$enableval
3152fi
3153
3154# Check whether --enable-select was given.
1b1fe467 3155if test "${enable_select+set}" = set; then :
7f947b68
CR
3156 enableval=$enable_select; opt_select=$enableval
3157fi
3158
3159# Check whether --enable-separate-helpfiles was given.
1b1fe467 3160if test "${enable_separate_helpfiles+set}" = set; then :
7f947b68
CR
3161 enableval=$enable_separate_helpfiles; opt_separate_help=$enableval
3162fi
3163
3164# Check whether --enable-single-help-strings was given.
1b1fe467 3165if test "${enable_single_help_strings+set}" = set; then :
7f947b68
CR
3166 enableval=$enable_single_help_strings; opt_single_longdoc_strings=$enableval
3167fi
3168
3169# Check whether --enable-strict-posix-default was given.
1b1fe467 3170if test "${enable_strict_posix_default+set}" = set; then :
7f947b68
CR
3171 enableval=$enable_strict_posix_default; opt_strict_posix=$enableval
3172fi
3173
3174# Check whether --enable-usg-echo-default was given.
1b1fe467 3175if test "${enable_usg_echo_default+set}" = set; then :
7f947b68
CR
3176 enableval=$enable_usg_echo_default; opt_xpg_echo=$enableval
3177fi
3178
3179# Check whether --enable-xpg-echo-default was given.
1b1fe467 3180if test "${enable_xpg_echo_default+set}" = set; then :
7f947b68
CR
3181 enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval
3182fi
3183
3184
3185# Check whether --enable-mem-scramble was given.
1b1fe467 3186if test "${enable_mem_scramble+set}" = set; then :
7f947b68
CR
3187 enableval=$enable_mem_scramble; opt_memscramble=$enableval
3188fi
3189
3190# Check whether --enable-profiling was given.
1b1fe467 3191if test "${enable_profiling+set}" = set; then :
7f947b68
CR
3192 enableval=$enable_profiling; opt_profiling=$enableval
3193fi
3194
3195# Check whether --enable-static-link was given.
1b1fe467 3196if test "${enable_static_link+set}" = set; then :
7f947b68
CR
3197 enableval=$enable_static_link; opt_static_link=$enableval
3198fi
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208if test $opt_alias = yes; then
1b1fe467 3209$as_echo "#define ALIAS 1" >>confdefs.h
7f947b68
CR
3210
3211fi
3212if test $opt_dirstack = yes; then
1b1fe467 3213$as_echo "#define PUSHD_AND_POPD 1" >>confdefs.h
7f947b68
CR
3214
3215fi
3216if test $opt_restricted = yes; then
1b1fe467 3217$as_echo "#define RESTRICTED_SHELL 1" >>confdefs.h
7f947b68
CR
3218
3219fi
3220if test $opt_process_subst = yes; then
1b1fe467 3221$as_echo "#define PROCESS_SUBSTITUTION 1" >>confdefs.h
7f947b68
CR
3222
3223fi
3224if test $opt_prompt_decoding = yes; then
1b1fe467 3225$as_echo "#define PROMPT_STRING_DECODE 1" >>confdefs.h
7f947b68
CR
3226
3227fi
3228if test $opt_select = yes; then
1b1fe467 3229$as_echo "#define SELECT_COMMAND 1" >>confdefs.h
7f947b68
CR
3230
3231fi
3232if test $opt_help = yes; then
1b1fe467 3233$as_echo "#define HELP_BUILTIN 1" >>confdefs.h
7f947b68
CR
3234
3235fi
3236if test $opt_array_variables = yes; then
1b1fe467 3237$as_echo "#define ARRAY_VARS 1" >>confdefs.h
7f947b68
CR
3238
3239fi
3240if test $opt_dparen_arith = yes; then
1b1fe467 3241$as_echo "#define DPAREN_ARITHMETIC 1" >>confdefs.h
7f947b68
CR
3242
3243fi
3244if test $opt_brace_expansion = yes; then
1b1fe467 3245$as_echo "#define BRACE_EXPANSION 1" >>confdefs.h
7f947b68
CR
3246
3247fi
3248if test $opt_disabled_builtins = yes; then
1b1fe467 3249$as_echo "#define DISABLED_BUILTINS 1" >>confdefs.h
7f947b68
CR
3250
3251fi
3252if test $opt_command_timing = yes; then
1b1fe467 3253$as_echo "#define COMMAND_TIMING 1" >>confdefs.h
7f947b68
CR
3254
3255fi
3256if test $opt_xpg_echo = yes ; then
1b1fe467 3257$as_echo "#define DEFAULT_ECHO_TO_XPG 1" >>confdefs.h
7f947b68
CR
3258
3259fi
3260if test $opt_strict_posix = yes; then
1b1fe467 3261$as_echo "#define STRICT_POSIX 1" >>confdefs.h
7f947b68
CR
3262
3263fi
3264if test $opt_extended_glob = yes ; then
1b1fe467 3265$as_echo "#define EXTENDED_GLOB 1" >>confdefs.h
7f947b68
CR
3266
3267fi
3268if test $opt_extglob_default = yes; then
1b1fe467 3269$as_echo "#define EXTGLOB_DEFAULT 1" >>confdefs.h
7f947b68
CR
3270
3271else
1b1fe467 3272$as_echo "#define EXTGLOB_DEFAULT 0" >>confdefs.h
7f947b68
CR
3273
3274fi
3275if test $opt_cond_command = yes ; then
1b1fe467 3276$as_echo "#define COND_COMMAND 1" >>confdefs.h
7f947b68
CR
3277
3278fi
3279if test $opt_cond_regexp = yes ; then
1b1fe467 3280$as_echo "#define COND_REGEXP 1" >>confdefs.h
7f947b68
CR
3281
3282fi
3283if test $opt_coproc = yes; then
1b1fe467 3284$as_echo "#define COPROCESS_SUPPORT 1" >>confdefs.h
7f947b68
CR
3285
3286fi
3287if test $opt_arith_for_command = yes; then
1b1fe467 3288$as_echo "#define ARITH_FOR_COMMAND 1" >>confdefs.h
7f947b68
CR
3289
3290fi
3291if test $opt_net_redirs = yes; then
1b1fe467 3292$as_echo "#define NETWORK_REDIRECTIONS 1" >>confdefs.h
7f947b68
CR
3293
3294fi
3295if test $opt_progcomp = yes; then
1b1fe467 3296$as_echo "#define PROGRAMMABLE_COMPLETION 1" >>confdefs.h
7f947b68
CR
3297
3298fi
3299if test $opt_multibyte = no; then
1b1fe467 3300$as_echo "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h
7f947b68
CR
3301
3302fi
3303if test $opt_debugger = yes; then
1b1fe467 3304$as_echo "#define DEBUGGER 1" >>confdefs.h
7f947b68
CR
3305
3306fi
3307if test $opt_casemod_attrs = yes; then
1b1fe467 3308$as_echo "#define CASEMOD_ATTRS 1" >>confdefs.h
7f947b68
CR
3309
3310fi
3311if test $opt_casemod_expansions = yes; then
1b1fe467 3312$as_echo "#define CASEMOD_EXPANSIONS 1" >>confdefs.h
7f947b68 3313
f14388d3
CR
3314fi
3315if test $opt_dircomplete_expand_default = yes; then
1b1fe467 3316$as_echo "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h
f14388d3 3317
c111d992
CR
3318fi
3319if test $opt_globascii_default = yes; then
3320$as_echo "#define GLOBASCII_DEFAULT 1" >>confdefs.h
3321
3322else
3323$as_echo "#define GLOBASCII_DEFAULT 0" >>confdefs.h
3324
f3aad56d
CR
3325fi
3326if test $opt_function_import = yes; then
3327$as_echo "#define FUNCTION_IMPORT 1" >>confdefs.h
3328
7f947b68
CR
3329fi
3330
3331if test $opt_memscramble = yes; then
1b1fe467 3332$as_echo "#define MEMSCRAMBLE 1" >>confdefs.h
7f947b68
CR
3333
3334fi
3335
3336if test "$opt_minimal_config" = yes; then
3337 TESTSCRIPT=run-minimal
3338else
3339 TESTSCRIPT=run-all
3340fi
3341
3342HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET=
3343if test "$opt_separate_help" != no; then
3344 if test "$opt_separate_help" = "yes" ; then
3345 HELPDIR='${datadir}/bash'
3346 else
3347 HELPDIR=$opt_separate_help
3348 fi
3349 HELPDIRDEFINE='-H ${HELPDIR}'
3350 HELPINSTALL='install-help'
3351 HELPFILES_TARGET='helpdoc'
3352fi
3353HELPSTRINGS=
3354if test "$opt_single_longdoc_strings" != "yes"; then
3355 HELPSTRINGS='-S'
71412226
CR
3356fi
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
8f50a023
CR
3375if test -z "$CFLAGS"; then
3376 AUTO_CFLAGS="-g ${GCC+-O2} ${GCC+-Wno-parentheses}"
3377 AUTO_LDFLAGS="-g ${GCC+-O2}"
3378else
3379 AUTO_CFLAGS= AUTO_LDFLAGS=
3380fi
3381
71412226 3382echo ""
7117c2d2 3383echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
f73dda09 3384echo ""
d166f048 3385
f73dda09
JA
3386ac_ext=c
3387ac_cpp='$CPP $CPPFLAGS'
3388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3390ac_compiler_gnu=$ac_cv_c_compiler_gnu
3391if test -n "$ac_tool_prefix"; then
3392 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3393set dummy ${ac_tool_prefix}gcc; ac_word=$2
1b1fe467 3394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 3395$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 3396if ${ac_cv_prog_CC+:} false; then :
dd4f3dd8 3397 $as_echo_n "(cached) " >&6
f73dda09
JA
3398else
3399 if test -n "$CC"; then
3400 ac_cv_prog_CC="$CC" # Let the user override the test.
3401else
a82a04b3
CR
3402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3403for as_dir in $PATH
3404do
3405 IFS=$as_save_IFS
3406 test -z "$as_dir" && as_dir=.
1b1fe467 3407 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 3408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3 3409 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1b1fe467 3410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
3411 break 2
3412 fi
3413done
1b1fe467 3414 done
b709b946 3415IFS=$as_save_IFS
ccc6cda3 3416
f73dda09
JA
3417fi
3418fi
3419CC=$ac_cv_prog_CC
3420if test -n "$CC"; then
1b1fe467 3421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
dd4f3dd8 3422$as_echo "$CC" >&6; }
f73dda09 3423else
1b1fe467 3424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 3425$as_echo "no" >&6; }
f73dda09 3426fi
ccc6cda3 3427
b709b946 3428
f73dda09
JA
3429fi
3430if test -z "$ac_cv_prog_CC"; then
3431 ac_ct_CC=$CC
3432 # Extract the first word of "gcc", so it can be a program name with args.
3433set dummy gcc; ac_word=$2
1b1fe467 3434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 3435$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 3436if ${ac_cv_prog_ac_ct_CC+:} false; then :
dd4f3dd8 3437 $as_echo_n "(cached) " >&6
f73dda09
JA
3438else
3439 if test -n "$ac_ct_CC"; then
3440 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3441else
a82a04b3
CR
3442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3443for as_dir in $PATH
3444do
3445 IFS=$as_save_IFS
3446 test -z "$as_dir" && as_dir=.
1b1fe467 3447 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 3448 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3 3449 ac_cv_prog_ac_ct_CC="gcc"
1b1fe467 3450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
3451 break 2
3452 fi
3453done
1b1fe467 3454 done
b709b946 3455IFS=$as_save_IFS
ccc6cda3 3456
f73dda09
JA
3457fi
3458fi
3459ac_ct_CC=$ac_cv_prog_ac_ct_CC
3460if test -n "$ac_ct_CC"; then
1b1fe467 3461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
dd4f3dd8 3462$as_echo "$ac_ct_CC" >&6; }
f73dda09 3463else
1b1fe467 3464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 3465$as_echo "no" >&6; }
f73dda09 3466fi
ccc6cda3 3467
b709b946
CR
3468 if test "x$ac_ct_CC" = x; then
3469 CC=""
3470 else
3471 case $cross_compiling:$ac_tool_warned in
3472yes:)
1b1fe467 3473{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
af98a2a6 3474$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
b709b946
CR
3475ac_tool_warned=yes ;;
3476esac
3477 CC=$ac_ct_CC
3478 fi
f73dda09
JA
3479else
3480 CC="$ac_cv_prog_CC"
3481fi
bb70624e 3482
f73dda09 3483if test -z "$CC"; then
b709b946
CR
3484 if test -n "$ac_tool_prefix"; then
3485 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
f73dda09 3486set dummy ${ac_tool_prefix}cc; ac_word=$2
1b1fe467 3487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 3488$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 3489if ${ac_cv_prog_CC+:} false; then :
dd4f3dd8 3490 $as_echo_n "(cached) " >&6
ccc6cda3
JA
3491else
3492 if test -n "$CC"; then
3493 ac_cv_prog_CC="$CC" # Let the user override the test.
3494else
a82a04b3
CR
3495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3496for as_dir in $PATH
3497do
3498 IFS=$as_save_IFS
3499 test -z "$as_dir" && as_dir=.
1b1fe467 3500 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 3501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3 3502 ac_cv_prog_CC="${ac_tool_prefix}cc"
1b1fe467 3503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
3504 break 2
3505 fi
3506done
1b1fe467 3507 done
b709b946 3508IFS=$as_save_IFS
f73dda09 3509
ccc6cda3
JA
3510fi
3511fi
f73dda09 3512CC=$ac_cv_prog_CC
ccc6cda3 3513if test -n "$CC"; then
1b1fe467 3514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
dd4f3dd8 3515$as_echo "$CC" >&6; }
c184f645 3516else
1b1fe467 3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 3518$as_echo "no" >&6; }
c184f645
CR
3519fi
3520
c184f645 3521
b709b946 3522 fi
f73dda09 3523fi
ccc6cda3
JA
3524if test -z "$CC"; then
3525 # Extract the first word of "cc", so it can be a program name with args.
3526set dummy cc; ac_word=$2
1b1fe467 3527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 3528$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 3529if ${ac_cv_prog_CC+:} false; then :
dd4f3dd8 3530 $as_echo_n "(cached) " >&6
ccc6cda3
JA
3531else
3532 if test -n "$CC"; then
3533 ac_cv_prog_CC="$CC" # Let the user override the test.
3534else
ccc6cda3 3535 ac_prog_rejected=no
a82a04b3
CR
3536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3537for as_dir in $PATH
3538do
3539 IFS=$as_save_IFS
3540 test -z "$as_dir" && as_dir=.
1b1fe467 3541 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 3542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3
CR
3543 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3544 ac_prog_rejected=yes
3545 continue
3546 fi
3547 ac_cv_prog_CC="cc"
1b1fe467 3548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
3549 break 2
3550 fi
3551done
1b1fe467 3552 done
b709b946 3553IFS=$as_save_IFS
f73dda09 3554
ccc6cda3
JA
3555if test $ac_prog_rejected = yes; then
3556 # We found a bogon in the path, so make sure we never use it.
3557 set dummy $ac_cv_prog_CC
3558 shift
f73dda09 3559 if test $# != 0; then
ccc6cda3
JA
3560 # We chose a different compiler from the bogus one.
3561 # However, it has the same basename, so the bogon will be chosen
3562 # first if we set CC to just the basename; use the full file name.
3563 shift
5e4a95c7 3564 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ccc6cda3
JA
3565 fi
3566fi
3567fi
3568fi
f73dda09 3569CC=$ac_cv_prog_CC
ccc6cda3 3570if test -n "$CC"; then
1b1fe467 3571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
dd4f3dd8 3572$as_echo "$CC" >&6; }
ccc6cda3 3573else
1b1fe467 3574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 3575$as_echo "no" >&6; }
ccc6cda3
JA
3576fi
3577
b709b946 3578
f73dda09
JA
3579fi
3580if test -z "$CC"; then
3581 if test -n "$ac_tool_prefix"; then
b709b946 3582 for ac_prog in cl.exe
f73dda09
JA
3583 do
3584 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3585set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1b1fe467 3586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 3587$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 3588if ${ac_cv_prog_CC+:} false; then :
dd4f3dd8 3589 $as_echo_n "(cached) " >&6
bb70624e
JA
3590else
3591 if test -n "$CC"; then
3592 ac_cv_prog_CC="$CC" # Let the user override the test.
3593else
a82a04b3
CR
3594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3595for as_dir in $PATH
3596do
3597 IFS=$as_save_IFS
3598 test -z "$as_dir" && as_dir=.
1b1fe467 3599 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 3600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3 3601 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1b1fe467 3602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
3603 break 2
3604 fi
3605done
1b1fe467 3606 done
b709b946 3607IFS=$as_save_IFS
f73dda09 3608
bb70624e
JA
3609fi
3610fi
f73dda09 3611CC=$ac_cv_prog_CC
bb70624e 3612if test -n "$CC"; then
1b1fe467 3613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
dd4f3dd8 3614$as_echo "$CC" >&6; }
bb70624e 3615else
1b1fe467 3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 3617$as_echo "no" >&6; }
bb70624e 3618fi
ccc6cda3 3619
b709b946 3620
f73dda09
JA
3621 test -n "$CC" && break
3622 done
ccc6cda3 3623fi
f73dda09
JA
3624if test -z "$CC"; then
3625 ac_ct_CC=$CC
b709b946 3626 for ac_prog in cl.exe
f73dda09
JA
3627do
3628 # Extract the first word of "$ac_prog", so it can be a program name with args.
3629set dummy $ac_prog; ac_word=$2
1b1fe467 3630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 3631$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 3632if ${ac_cv_prog_ac_ct_CC+:} false; then :
dd4f3dd8 3633 $as_echo_n "(cached) " >&6
f73dda09
JA
3634else
3635 if test -n "$ac_ct_CC"; then
3636 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3637else
a82a04b3
CR
3638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3639for as_dir in $PATH
3640do
3641 IFS=$as_save_IFS
3642 test -z "$as_dir" && as_dir=.
1b1fe467 3643 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 3644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3 3645 ac_cv_prog_ac_ct_CC="$ac_prog"
1b1fe467 3646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
3647 break 2
3648 fi
3649done
1b1fe467 3650 done
b709b946 3651IFS=$as_save_IFS
ccc6cda3 3652
ccc6cda3 3653fi
ccc6cda3 3654fi
f73dda09
JA
3655ac_ct_CC=$ac_cv_prog_ac_ct_CC
3656if test -n "$ac_ct_CC"; then
1b1fe467 3657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
dd4f3dd8 3658$as_echo "$ac_ct_CC" >&6; }
f73dda09 3659else
1b1fe467 3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 3661$as_echo "no" >&6; }
ccc6cda3
JA
3662fi
3663
b709b946 3664
f73dda09
JA
3665 test -n "$ac_ct_CC" && break
3666done
ccc6cda3 3667
b709b946
CR
3668 if test "x$ac_ct_CC" = x; then
3669 CC=""
3670 else
3671 case $cross_compiling:$ac_tool_warned in
3672yes:)
1b1fe467 3673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
af98a2a6 3674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
b709b946
CR
3675ac_tool_warned=yes ;;
3676esac
3677 CC=$ac_ct_CC
3678 fi
bb70624e
JA
3679fi
3680
f73dda09
JA
3681fi
3682
a82a04b3 3683
1b1fe467 3684test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
af98a2a6 3685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1b1fe467
CR
3686as_fn_error $? "no acceptable C compiler found in \$PATH
3687See \`config.log' for more details" "$LINENO" 5; }
f73dda09
JA
3688
3689# Provide some information about the compiler.
1b1fe467 3690$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
dd4f3dd8
CR
3691set X $ac_compile
3692ac_compiler=$2
1b1fe467
CR
3693for ac_option in --version -v -V -qversion; do
3694 { { ac_try="$ac_compiler $ac_option >&5"
7175a77f
CR
3695case "(($ac_try" in
3696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3697 *) ac_try_echo=$ac_try;;
3698esac
1b1fe467
CR
3699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3700$as_echo "$ac_try_echo"; } >&5
3701 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
7175a77f 3702 ac_status=$?
1b1fe467
CR
3703 if test -s conftest.err; then
3704 sed '10a\
3705... rest of stderr output deleted ...
3706 10q' conftest.err >conftest.er1
3707 cat conftest.er1 >&5
3708 fi
3709 rm -f conftest.er1 conftest.err
3710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3711 test $ac_status = 0; }
3712done
f73dda09 3713
1b1fe467 3714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 3715/* end confdefs.h. */
f73dda09
JA
3716
3717int
3718main ()
3719{
3720
3721 ;
3722 return 0;
3723}
3724_ACEOF
3725ac_clean_files_save=$ac_clean_files
dd4f3dd8 3726ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
f73dda09
JA
3727# Try to create an executable without -o first, disregard a.out.
3728# It will help us diagnose broken compilers, and finding out an intuition
3729# of exeext.
1b1fe467
CR
3730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3731$as_echo_n "checking whether the C compiler works... " >&6; }
dd4f3dd8
CR
3732ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3733
3734# The possible output files:
3735ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3736
b709b946
CR
3737ac_rmfiles=
3738for ac_file in $ac_files
3739do
3740 case $ac_file in
dd4f3dd8 3741 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
b709b946
CR
3742 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3743 esac
3744done
3745rm -f $ac_rmfiles
3746
1b1fe467 3747if { { ac_try="$ac_link_default"
b709b946
CR
3748case "(($ac_try" in
3749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3750 *) ac_try_echo=$ac_try;;
3751esac
1b1fe467
CR
3752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3753$as_echo "$ac_try_echo"; } >&5
b709b946 3754 (eval "$ac_link_default") 2>&5
f73dda09 3755 ac_status=$?
1b1fe467
CR
3756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3757 test $ac_status = 0; }; then :
b709b946
CR
3758 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3759# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3760# in a Makefile. We should not override ac_cv_exeext if it was cached,
3761# so that the user can short-circuit this test for compilers unknown to
3762# Autoconf.
dd4f3dd8 3763for ac_file in $ac_files ''
5e4a95c7
CR
3764do
3765 test -f "$ac_file" || continue
f73dda09 3766 case $ac_file in
dd4f3dd8 3767 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5e4a95c7
CR
3768 ;;
3769 [ab].out )
3770 # We found the default executable, but exeext='' is most
3771 # certainly right.
3772 break;;
3773 *.* )
1b1fe467 3774 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
b709b946
CR
3775 then :; else
3776 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3777 fi
3778 # We set ac_cv_exeext here because the later test for it is not
3779 # safe: cross compilers may not add the suffix if given an `-o'
3780 # argument, so we may need to know it at that point already.
3781 # Even if this section looks crufty: it has the advantage of
3782 # actually working.
5e4a95c7
CR
3783 break;;
3784 * )
3785 break;;
f73dda09
JA
3786 esac
3787done
b709b946
CR
3788test "$ac_cv_exeext" = no && ac_cv_exeext=
3789
ccc6cda3 3790else
dd4f3dd8
CR
3791 ac_file=''
3792fi
1b1fe467
CR
3793if test -z "$ac_file"; then :
3794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3795$as_echo "no" >&6; }
3796$as_echo "$as_me: failed program was:" >&5
5e4a95c7
CR
3797sed 's/^/| /' conftest.$ac_ext >&5
3798
1b1fe467 3799{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
af98a2a6 3800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1b1fe467
CR
3801as_fn_error 77 "C compiler cannot create executables
3802See \`config.log' for more details" "$LINENO" 5; }
3803else
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3805$as_echo "yes" >&6; }
f73dda09 3806fi
1b1fe467
CR
3807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3808$as_echo_n "checking for C compiler default output file name... " >&6; }
3809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3810$as_echo "$ac_file" >&6; }
f73dda09 3811ac_exeext=$ac_cv_exeext
f73dda09 3812
dd4f3dd8 3813rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
f73dda09 3814ac_clean_files=$ac_clean_files_save
1b1fe467 3815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
dd4f3dd8 3816$as_echo_n "checking for suffix of executables... " >&6; }
1b1fe467 3817if { { ac_try="$ac_link"
b709b946
CR
3818case "(($ac_try" in
3819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3820 *) ac_try_echo=$ac_try;;
3821esac
1b1fe467
CR
3822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3823$as_echo "$ac_try_echo"; } >&5
b709b946 3824 (eval "$ac_link") 2>&5
f73dda09 3825 ac_status=$?
1b1fe467
CR
3826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3827 test $ac_status = 0; }; then :
f73dda09
JA
3828 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3829# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3830# work properly (i.e., refer to `conftest.exe'), while it won't with
3831# `rm'.
5e4a95c7
CR
3832for ac_file in conftest.exe conftest conftest.*; do
3833 test -f "$ac_file" || continue
f73dda09 3834 case $ac_file in
dd4f3dd8 3835 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
f73dda09 3836 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5e4a95c7 3837 break;;
f73dda09
JA
3838 * ) break;;
3839 esac
3840done
ccc6cda3 3841else
1b1fe467 3842 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
af98a2a6 3843$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1b1fe467
CR
3844as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3845See \`config.log' for more details" "$LINENO" 5; }
f73dda09 3846fi
1b1fe467
CR
3847rm -f conftest conftest$ac_cv_exeext
3848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
dd4f3dd8 3849$as_echo "$ac_cv_exeext" >&6; }
f73dda09
JA
3850
3851rm -f conftest.$ac_ext
3852EXEEXT=$ac_cv_exeext
3853ac_exeext=$EXEEXT
1b1fe467
CR
3854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3855/* end confdefs.h. */
3856#include <stdio.h>
3857int
3858main ()
3859{
3860FILE *f = fopen ("conftest.out", "w");
3861 return ferror (f) || fclose (f) != 0;
3862
3863 ;
3864 return 0;
3865}
3866_ACEOF
3867ac_clean_files="$ac_clean_files conftest.out"
3868# Check that the compiler produces executables we can run. If not, either
3869# the compiler is broken, or we cross compile.
3870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3871$as_echo_n "checking whether we are cross compiling... " >&6; }
3872if test "$cross_compiling" != yes; then
3873 { { ac_try="$ac_link"
3874case "(($ac_try" in
3875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3876 *) ac_try_echo=$ac_try;;
3877esac
3878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3879$as_echo "$ac_try_echo"; } >&5
3880 (eval "$ac_link") 2>&5
3881 ac_status=$?
3882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3883 test $ac_status = 0; }
3884 if { ac_try='./conftest$ac_cv_exeext'
3885 { { case "(($ac_try" in
3886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3887 *) ac_try_echo=$ac_try;;
3888esac
3889eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3890$as_echo "$ac_try_echo"; } >&5
3891 (eval "$ac_try") 2>&5
3892 ac_status=$?
3893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3894 test $ac_status = 0; }; }; then
3895 cross_compiling=no
3896 else
3897 if test "$cross_compiling" = maybe; then
3898 cross_compiling=yes
3899 else
3900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3902as_fn_error $? "cannot run C compiled programs.
3903If you meant to cross compile, use \`--host'.
3904See \`config.log' for more details" "$LINENO" 5; }
3905 fi
3906 fi
3907fi
3908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3909$as_echo "$cross_compiling" >&6; }
3910
3911rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3912ac_clean_files=$ac_clean_files_save
3913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
7175a77f 3914$as_echo_n "checking for suffix of object files... " >&6; }
1b1fe467 3915if ${ac_cv_objext+:} false; then :
7175a77f
CR
3916 $as_echo_n "(cached) " >&6
3917else
1b1fe467 3918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7f947b68 3919/* end confdefs.h. */
7175a77f 3920
7f947b68
CR
3921int
3922main ()
3923{
7f947b68
CR
3924
3925 ;
3926 return 0;
3927}
3928_ACEOF
7175a77f 3929rm -f conftest.o conftest.obj
1b1fe467 3930if { { ac_try="$ac_compile"
7f947b68
CR
3931case "(($ac_try" in
3932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3933 *) ac_try_echo=$ac_try;;
3934esac
1b1fe467
CR
3935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3936$as_echo "$ac_try_echo"; } >&5
7175a77f 3937 (eval "$ac_compile") 2>&5
7f947b68 3938 ac_status=$?
1b1fe467
CR
3939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3940 test $ac_status = 0; }; then :
7610e0c5
CR
3941 for ac_file in conftest.o conftest.obj conftest.*; do
3942 test -f "$ac_file" || continue;
3943 case $ac_file in
3944 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3945 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3946 break;;
3947 esac
3948done
3949else
3950 $as_echo "$as_me: failed program was:" >&5
3951sed 's/^/| /' conftest.$ac_ext >&5
3952
1b1fe467 3953{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
71412226 3954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1b1fe467
CR
3955as_fn_error $? "cannot compute suffix of object files: cannot compile
3956See \`config.log' for more details" "$LINENO" 5; }
71412226 3957fi
f73dda09 3958rm -f conftest.$ac_cv_objext conftest.$ac_ext
ccc6cda3 3959fi
1b1fe467 3960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
dd4f3dd8 3961$as_echo "$ac_cv_objext" >&6; }
f73dda09
JA
3962OBJEXT=$ac_cv_objext
3963ac_objext=$OBJEXT
1b1fe467 3964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
dd4f3dd8 3965$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
1b1fe467 3966if ${ac_cv_c_compiler_gnu+:} false; then :
dd4f3dd8 3967 $as_echo_n "(cached) " >&6
f73dda09 3968else
1b1fe467 3969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 3970/* end confdefs.h. */
f73dda09
JA
3971
3972int
3973main ()
3974{
3975#ifndef __GNUC__
3976 choke me
3977#endif
3978
3979 ;
3980 return 0;
3981}
3982_ACEOF
1b1fe467 3983if ac_fn_c_try_compile "$LINENO"; then :
f73dda09
JA
3984 ac_compiler_gnu=yes
3985else
1b1fe467 3986 ac_compiler_gnu=no
f73dda09 3987fi
b709b946 3988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09
JA
3989ac_cv_c_compiler_gnu=$ac_compiler_gnu
3990
3991fi
1b1fe467 3992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
dd4f3dd8
CR
3993$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3994if test $ac_compiler_gnu = yes; then
3995 GCC=yes
3996else
3997 GCC=
3998fi
f73dda09
JA
3999ac_test_CFLAGS=${CFLAGS+set}
4000ac_save_CFLAGS=$CFLAGS
1b1fe467 4001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
dd4f3dd8 4002$as_echo_n "checking whether $CC accepts -g... " >&6; }
1b1fe467 4003if ${ac_cv_prog_cc_g+:} false; then :
dd4f3dd8 4004 $as_echo_n "(cached) " >&6
f73dda09 4005else
b709b946
CR
4006 ac_save_c_werror_flag=$ac_c_werror_flag
4007 ac_c_werror_flag=yes
4008 ac_cv_prog_cc_g=no
4009 CFLAGS="-g"
1b1fe467 4010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4011/* end confdefs.h. */
f73dda09
JA
4012
4013int
4014main ()
4015{
ccc6cda3 4016
f73dda09
JA
4017 ;
4018 return 0;
4019}
4020_ACEOF
1b1fe467 4021if ac_fn_c_try_compile "$LINENO"; then :
f73dda09
JA
4022 ac_cv_prog_cc_g=yes
4023else
1b1fe467
CR
4024 CFLAGS=""
4025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 4026/* end confdefs.h. */
c184f645 4027
c184f645
CR
4028int
4029main ()
4030{
b709b946 4031
c184f645
CR
4032 ;
4033 return 0;
4034}
4035_ACEOF
1b1fe467 4036if ac_fn_c_try_compile "$LINENO"; then :
7175a77f 4037
1b1fe467
CR
4038else
4039 ac_c_werror_flag=$ac_save_c_werror_flag
b709b946 4040 CFLAGS="-g"
1b1fe467 4041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4042/* end confdefs.h. */
b709b946 4043
f73dda09
JA
4044int
4045main ()
4046{
b709b946 4047
f73dda09
JA
4048 ;
4049 return 0;
4050}
4051_ACEOF
1b1fe467 4052if ac_fn_c_try_compile "$LINENO"; then :
b709b946 4053 ac_cv_prog_cc_g=yes
d3ad40de 4054fi
b709b946
CR
4055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4056fi
b709b946
CR
4057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4058fi
b709b946
CR
4059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4060 ac_c_werror_flag=$ac_save_c_werror_flag
4061fi
1b1fe467 4062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
dd4f3dd8 4063$as_echo "$ac_cv_prog_cc_g" >&6; }
b709b946
CR
4064if test "$ac_test_CFLAGS" = set; then
4065 CFLAGS=$ac_save_CFLAGS
4066elif test $ac_cv_prog_cc_g = yes; then
4067 if test "$GCC" = yes; then
4068 CFLAGS="-g -O2"
4069 else
4070 CFLAGS="-g"
4071 fi
4072else
4073 if test "$GCC" = yes; then
4074 CFLAGS="-O2"
4075 else
4076 CFLAGS=
4077 fi
4078fi
1b1fe467 4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
dd4f3dd8 4080$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
1b1fe467 4081if ${ac_cv_prog_cc_c89+:} false; then :
dd4f3dd8 4082 $as_echo_n "(cached) " >&6
b709b946
CR
4083else
4084 ac_cv_prog_cc_c89=no
4085ac_save_CC=$CC
1b1fe467 4086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4087/* end confdefs.h. */
b709b946
CR
4088#include <stdarg.h>
4089#include <stdio.h>
0ee50808 4090struct stat;
b709b946
CR
4091/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4092struct buf { int x; };
4093FILE * (*rcsopen) (struct buf *, struct stat *, int);
4094static char *e (p, i)
4095 char **p;
4096 int i;
4097{
4098 return p[i];
4099}
4100static char *f (char * (*g) (char **, int), char **p, ...)
4101{
4102 char *s;
4103 va_list v;
4104 va_start (v,p);
4105 s = g (p, va_arg (v,int));
4106 va_end (v);
4107 return s;
4108}
4109
4110/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4111 function prototypes and stuff, but not '\xHH' hex character constants.
4112 These don't provoke an error unfortunately, instead are silently treated
4113 as 'x'. The following induces an error, until -std is added to get
4114 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4115 array size at least. It's necessary to write '\x00'==0 to get something
4116 that's true only with -std. */
4117int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4118
4119/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4120 inside strings and character constants. */
4121#define FOO(x) 'x'
4122int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4123
4124int test (int i, double x);
4125struct s1 {int (*f) (int a);};
4126struct s2 {int (*f) (double a);};
4127int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4128int argc;
4129char **argv;
f73dda09
JA
4130int
4131main ()
4132{
b709b946 4133return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
f73dda09
JA
4134 ;
4135 return 0;
4136}
4137_ACEOF
b709b946
CR
4138for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4139 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4140do
4141 CC="$ac_save_CC $ac_arg"
1b1fe467 4142 if ac_fn_c_try_compile "$LINENO"; then :
b709b946 4143 ac_cv_prog_cc_c89=$ac_arg
f73dda09 4144fi
b709b946
CR
4145rm -f core conftest.err conftest.$ac_objext
4146 test "x$ac_cv_prog_cc_c89" != "xno" && break
cce855bc 4147done
b709b946
CR
4148rm -f conftest.$ac_ext
4149CC=$ac_save_CC
4150
f73dda09 4151fi
b709b946
CR
4152# AC_CACHE_VAL
4153case "x$ac_cv_prog_cc_c89" in
4154 x)
1b1fe467 4155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
dd4f3dd8 4156$as_echo "none needed" >&6; } ;;
b709b946 4157 xno)
1b1fe467 4158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
dd4f3dd8 4159$as_echo "unsupported" >&6; } ;;
b709b946
CR
4160 *)
4161 CC="$CC $ac_cv_prog_cc_c89"
1b1fe467 4162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
dd4f3dd8 4163$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
b709b946 4164esac
1b1fe467 4165if test "x$ac_cv_prog_cc_c89" != xno; then :
cce855bc 4166
1b1fe467 4167fi
5e4a95c7 4168
f73dda09
JA
4169ac_ext=c
4170ac_cpp='$CPP $CPPFLAGS'
4171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4173ac_compiler_gnu=$ac_cv_c_compiler_gnu
bb70624e 4174
a82a04b3
CR
4175
4176
4177
1b1fe467 4178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5
dd4f3dd8 4179$as_echo_n "checking for strerror in -lcposix... " >&6; }
1b1fe467 4180if ${ac_cv_lib_cposix_strerror+:} false; then :
dd4f3dd8 4181 $as_echo_n "(cached) " >&6
5e13499c
CR
4182else
4183 ac_check_lib_save_LIBS=$LIBS
4184LIBS="-lcposix $LIBS"
1b1fe467 4185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4186/* end confdefs.h. */
ccc6cda3 4187
b709b946
CR
4188/* Override any GCC internal prototype to avoid an error.
4189 Use char because int might match the return type of a GCC
4190 builtin and then its argument prototype would still apply. */
5e13499c
CR
4191#ifdef __cplusplus
4192extern "C"
4193#endif
5e13499c
CR
4194char strerror ();
4195int
4196main ()
4197{
b709b946 4198return strerror ();
5e13499c
CR
4199 ;
4200 return 0;
4201}
4202_ACEOF
1b1fe467 4203if ac_fn_c_try_link "$LINENO"; then :
5e13499c 4204 ac_cv_lib_cposix_strerror=yes
ccc6cda3 4205else
1b1fe467 4206 ac_cv_lib_cposix_strerror=no
5e13499c 4207fi
1b1fe467
CR
4208rm -f core conftest.err conftest.$ac_objext \
4209 conftest$ac_exeext conftest.$ac_ext
5e13499c
CR
4210LIBS=$ac_check_lib_save_LIBS
4211fi
1b1fe467 4212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5
dd4f3dd8 4213$as_echo "$ac_cv_lib_cposix_strerror" >&6; }
1b1fe467 4214if test "x$ac_cv_lib_cposix_strerror" = xyes; then :
5e13499c 4215 LIBS="$LIBS -lcposix"
ccc6cda3
JA
4216fi
4217
a82a04b3
CR
4218
4219
f73dda09
JA
4220ac_ext=c
4221ac_cpp='$CPP $CPPFLAGS'
4222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4224ac_compiler_gnu=$ac_cv_c_compiler_gnu
1b1fe467 4225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
dd4f3dd8 4226$as_echo_n "checking how to run the C preprocessor... " >&6; }
ccc6cda3
JA
4227# On Suns, sometimes $CPP names a directory.
4228if test -n "$CPP" && test -d "$CPP"; then
4229 CPP=
4230fi
4231if test -z "$CPP"; then
1b1fe467 4232 if ${ac_cv_prog_CPP+:} false; then :
dd4f3dd8 4233 $as_echo_n "(cached) " >&6
f73dda09
JA
4234else
4235 # Double quotes because CPP needs to be expanded
4236 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4237 do
4238 ac_preproc_ok=false
4239for ac_c_preproc_warn_flag in '' yes
4240do
4241 # Use a header file that comes with gcc, so configuring glibc
4242 # with a fresh cross-compiler works.
5e4a95c7
CR
4243 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4244 # <limits.h> exists even on freestanding compilers.
ccc6cda3 4245 # On the NeXT, cc -E runs the code through the compiler's parser,
f73dda09 4246 # not just through cpp. "Syntax error" is here to catch this case.
1b1fe467 4247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7
CR
4248/* end confdefs.h. */
4249#ifdef __STDC__
4250# include <limits.h>
4251#else
4252# include <assert.h>
4253#endif
4254 Syntax error
f73dda09 4255_ACEOF
1b1fe467 4256if ac_fn_c_try_cpp "$LINENO"; then :
7175a77f 4257
1b1fe467 4258else
f73dda09
JA
4259 # Broken: fails on valid input.
4260continue
4261fi
1b1fe467 4262rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09 4263
b709b946 4264 # OK, works on sane cases. Now check whether nonexistent headers
f73dda09 4265 # can be detected and how.
1b1fe467 4266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4267/* end confdefs.h. */
f73dda09
JA
4268#include <ac_nonexistent.h>
4269_ACEOF
1b1fe467 4270if ac_fn_c_try_cpp "$LINENO"; then :
f73dda09
JA
4271 # Broken: success on invalid input.
4272continue
bb70624e 4273else
f73dda09
JA
4274 # Passes both tests.
4275ac_preproc_ok=:
4276break
4277fi
1b1fe467 4278rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09
JA
4279
4280done
4281# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1b1fe467
CR
4282rm -f conftest.i conftest.err conftest.$ac_ext
4283if $ac_preproc_ok; then :
f73dda09
JA
4284 break
4285fi
4286
4287 done
4288 ac_cv_prog_CPP=$CPP
4289
4290fi
4291 CPP=$ac_cv_prog_CPP
4292else
4293 ac_cv_prog_CPP=$CPP
4294fi
1b1fe467 4295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
dd4f3dd8 4296$as_echo "$CPP" >&6; }
f73dda09
JA
4297ac_preproc_ok=false
4298for ac_c_preproc_warn_flag in '' yes
4299do
4300 # Use a header file that comes with gcc, so configuring glibc
4301 # with a fresh cross-compiler works.
5e4a95c7
CR
4302 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4303 # <limits.h> exists even on freestanding compilers.
f73dda09
JA
4304 # On the NeXT, cc -E runs the code through the compiler's parser,
4305 # not just through cpp. "Syntax error" is here to catch this case.
1b1fe467 4306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7
CR
4307/* end confdefs.h. */
4308#ifdef __STDC__
4309# include <limits.h>
4310#else
4311# include <assert.h>
4312#endif
4313 Syntax error
f73dda09 4314_ACEOF
1b1fe467 4315if ac_fn_c_try_cpp "$LINENO"; then :
7175a77f 4316
1b1fe467 4317else
f73dda09
JA
4318 # Broken: fails on valid input.
4319continue
4320fi
1b1fe467 4321rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09 4322
b709b946 4323 # OK, works on sane cases. Now check whether nonexistent headers
f73dda09 4324 # can be detected and how.
1b1fe467 4325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4326/* end confdefs.h. */
f73dda09
JA
4327#include <ac_nonexistent.h>
4328_ACEOF
1b1fe467 4329if ac_fn_c_try_cpp "$LINENO"; then :
f73dda09
JA
4330 # Broken: success on invalid input.
4331continue
4332else
f73dda09
JA
4333 # Passes both tests.
4334ac_preproc_ok=:
4335break
ccc6cda3 4336fi
1b1fe467 4337rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09
JA
4338
4339done
4340# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1b1fe467
CR
4341rm -f conftest.i conftest.err conftest.$ac_ext
4342if $ac_preproc_ok; then :
4343
ccc6cda3 4344else
1b1fe467 4345 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
af98a2a6 4346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1b1fe467
CR
4347as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4348See \`config.log' for more details" "$LINENO" 5; }
ccc6cda3 4349fi
ccc6cda3 4350
f73dda09
JA
4351ac_ext=c
4352ac_cpp='$CPP $CPPFLAGS'
4353ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4354ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4355ac_compiler_gnu=$ac_cv_c_compiler_gnu
4356
a82a04b3 4357
1b1fe467 4358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
dd4f3dd8 4359$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
1b1fe467 4360if ${ac_cv_path_GREP+:} false; then :
dd4f3dd8 4361 $as_echo_n "(cached) " >&6
b709b946 4362else
dd4f3dd8 4363 if test -z "$GREP"; then
b709b946 4364 ac_path_GREP_found=false
dd4f3dd8
CR
4365 # Loop through the user's path and test for each of PROGNAME-LIST
4366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
b709b946
CR
4367for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4368do
4369 IFS=$as_save_IFS
4370 test -z "$as_dir" && as_dir=.
1b1fe467 4371 for ac_prog in grep ggrep; do
dd4f3dd8
CR
4372 for ac_exec_ext in '' $ac_executable_extensions; do
4373 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
0ee50808 4374 as_fn_executable_p "$ac_path_GREP" || continue
dd4f3dd8 4375# Check for GNU ac_path_GREP and select it if it is found.
b709b946
CR
4376 # Check for GNU $ac_path_GREP
4377case `"$ac_path_GREP" --version 2>&1` in
4378*GNU*)
4379 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4380*)
4381 ac_count=0
dd4f3dd8 4382 $as_echo_n 0123456789 >"conftest.in"
b709b946
CR
4383 while :
4384 do
4385 cat "conftest.in" "conftest.in" >"conftest.tmp"
4386 mv "conftest.tmp" "conftest.in"
4387 cp "conftest.in" "conftest.nl"
dd4f3dd8 4388 $as_echo 'GREP' >> "conftest.nl"
b709b946
CR
4389 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4390 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
1b1fe467 4391 as_fn_arith $ac_count + 1 && ac_count=$as_val
b709b946
CR
4392 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4393 # Best one so far, save it but keep looking for a better one
4394 ac_cv_path_GREP="$ac_path_GREP"
4395 ac_path_GREP_max=$ac_count
4396 fi
4397 # 10*(2^10) chars as input seems more than enough
4398 test $ac_count -gt 10 && break
4399 done
4400 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4401esac
4402
dd4f3dd8
CR
4403 $ac_path_GREP_found && break 3
4404 done
b709b946 4405 done
1b1fe467 4406 done
b709b946 4407IFS=$as_save_IFS
dd4f3dd8 4408 if test -z "$ac_cv_path_GREP"; then
1b1fe467 4409 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
dd4f3dd8 4410 fi
b709b946
CR
4411else
4412 ac_cv_path_GREP=$GREP
4413fi
4414
b709b946 4415fi
1b1fe467 4416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
dd4f3dd8 4417$as_echo "$ac_cv_path_GREP" >&6; }
b709b946
CR
4418 GREP="$ac_cv_path_GREP"
4419
4420
1b1fe467 4421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
dd4f3dd8 4422$as_echo_n "checking for egrep... " >&6; }
1b1fe467 4423if ${ac_cv_path_EGREP+:} false; then :
dd4f3dd8 4424 $as_echo_n "(cached) " >&6
b709b946
CR
4425else
4426 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4427 then ac_cv_path_EGREP="$GREP -E"
4428 else
dd4f3dd8 4429 if test -z "$EGREP"; then
b709b946 4430 ac_path_EGREP_found=false
dd4f3dd8
CR
4431 # Loop through the user's path and test for each of PROGNAME-LIST
4432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
b709b946
CR
4433for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4434do
4435 IFS=$as_save_IFS
4436 test -z "$as_dir" && as_dir=.
1b1fe467 4437 for ac_prog in egrep; do
dd4f3dd8
CR
4438 for ac_exec_ext in '' $ac_executable_extensions; do
4439 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
0ee50808 4440 as_fn_executable_p "$ac_path_EGREP" || continue
dd4f3dd8 4441# Check for GNU ac_path_EGREP and select it if it is found.
b709b946
CR
4442 # Check for GNU $ac_path_EGREP
4443case `"$ac_path_EGREP" --version 2>&1` in
4444*GNU*)
4445 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4446*)
4447 ac_count=0
dd4f3dd8 4448 $as_echo_n 0123456789 >"conftest.in"
b709b946
CR
4449 while :
4450 do
4451 cat "conftest.in" "conftest.in" >"conftest.tmp"
4452 mv "conftest.tmp" "conftest.in"
4453 cp "conftest.in" "conftest.nl"
dd4f3dd8 4454 $as_echo 'EGREP' >> "conftest.nl"
b709b946
CR
4455 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4456 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
1b1fe467 4457 as_fn_arith $ac_count + 1 && ac_count=$as_val
b709b946
CR
4458 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4459 # Best one so far, save it but keep looking for a better one
4460 ac_cv_path_EGREP="$ac_path_EGREP"
4461 ac_path_EGREP_max=$ac_count
5e4a95c7 4462 fi
b709b946
CR
4463 # 10*(2^10) chars as input seems more than enough
4464 test $ac_count -gt 10 && break
4465 done
4466 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4467esac
4468
dd4f3dd8
CR
4469 $ac_path_EGREP_found && break 3
4470 done
b709b946 4471 done
1b1fe467 4472 done
b709b946 4473IFS=$as_save_IFS
dd4f3dd8 4474 if test -z "$ac_cv_path_EGREP"; then
1b1fe467 4475 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
dd4f3dd8 4476 fi
b709b946
CR
4477else
4478 ac_cv_path_EGREP=$EGREP
4479fi
4480
b709b946 4481 fi
d3ad40de 4482fi
1b1fe467 4483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
dd4f3dd8 4484$as_echo "$ac_cv_path_EGREP" >&6; }
b709b946 4485 EGREP="$ac_cv_path_EGREP"
d3ad40de 4486
9d6e5e30 4487
1b1fe467 4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
dd4f3dd8 4489$as_echo_n "checking for ANSI C header files... " >&6; }
1b1fe467 4490if ${ac_cv_header_stdc+:} false; then :
dd4f3dd8 4491 $as_echo_n "(cached) " >&6
ccc6cda3 4492else
1b1fe467 4493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4494/* end confdefs.h. */
a82a04b3
CR
4495#include <stdlib.h>
4496#include <stdarg.h>
4497#include <string.h>
4498#include <float.h>
4499
5e4a95c7
CR
4500int
4501main ()
4502{
4503
4504 ;
4505 return 0;
4506}
a82a04b3 4507_ACEOF
1b1fe467 4508if ac_fn_c_try_compile "$LINENO"; then :
a82a04b3 4509 ac_cv_header_stdc=yes
f73dda09 4510else
1b1fe467 4511 ac_cv_header_stdc=no
a82a04b3 4512fi
b709b946 4513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a82a04b3
CR
4514
4515if test $ac_cv_header_stdc = yes; then
4516 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1b1fe467 4517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4518/* end confdefs.h. */
a82a04b3
CR
4519#include <string.h>
4520
4521_ACEOF
4522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467
CR
4523 $EGREP "memchr" >/dev/null 2>&1; then :
4524
a82a04b3
CR
4525else
4526 ac_cv_header_stdc=no
4527fi
4528rm -f conftest*
4529
4530fi
4531
4532if test $ac_cv_header_stdc = yes; then
4533 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1b1fe467 4534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4535/* end confdefs.h. */
a82a04b3
CR
4536#include <stdlib.h>
4537
4538_ACEOF
4539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467
CR
4540 $EGREP "free" >/dev/null 2>&1; then :
4541
a82a04b3
CR
4542else
4543 ac_cv_header_stdc=no
4544fi
4545rm -f conftest*
4546
4547fi
4548
4549if test $ac_cv_header_stdc = yes; then
4550 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1b1fe467 4551 if test "$cross_compiling" = yes; then :
a82a04b3
CR
4552 :
4553else
1b1fe467 4554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4555/* end confdefs.h. */
a82a04b3 4556#include <ctype.h>
b709b946 4557#include <stdlib.h>
a82a04b3
CR
4558#if ((' ' & 0x0FF) == 0x020)
4559# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4560# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4561#else
5e4a95c7
CR
4562# define ISLOWER(c) \
4563 (('a' <= (c) && (c) <= 'i') \
4564 || ('j' <= (c) && (c) <= 'r') \
4565 || ('s' <= (c) && (c) <= 'z'))
a82a04b3
CR
4566# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4567#endif
4568
4569#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4570int
4571main ()
4572{
4573 int i;
4574 for (i = 0; i < 256; i++)
4575 if (XOR (islower (i), ISLOWER (i))
5e4a95c7 4576 || toupper (i) != TOUPPER (i))
b709b946
CR
4577 return 2;
4578 return 0;
a82a04b3
CR
4579}
4580_ACEOF
1b1fe467 4581if ac_fn_c_try_run "$LINENO"; then :
7175a77f 4582
1b1fe467
CR
4583else
4584 ac_cv_header_stdc=no
a82a04b3 4585fi
1b1fe467
CR
4586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4587 conftest.$ac_objext conftest.beam conftest.$ac_ext
a82a04b3 4588fi
b709b946 4589
a82a04b3
CR
4590fi
4591fi
1b1fe467 4592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
dd4f3dd8 4593$as_echo "$ac_cv_header_stdc" >&6; }
a82a04b3
CR
4594if test $ac_cv_header_stdc = yes; then
4595
1b1fe467 4596$as_echo "#define STDC_HEADERS 1" >>confdefs.h
7f947b68
CR
4597
4598fi
4599
7175a77f 4600# On IRIX 5.3, sys/types and inttypes.h are conflicting.
7175a77f
CR
4601for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4602 inttypes.h stdint.h unistd.h
1b1fe467
CR
4603do :
4604 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4605ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4606"
4607if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7175a77f
CR
4608 cat >>confdefs.h <<_ACEOF
4609#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4610_ACEOF
4611
4612fi
4613
4614done
4615
4616
4617
1b1fe467
CR
4618 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4619if test "x$ac_cv_header_minix_config_h" = xyes; then :
7175a77f
CR
4620 MINIX=yes
4621else
4622 MINIX=
4623fi
4624
4625
4626 if test "$MINIX" = yes; then
4627
1b1fe467 4628$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
7175a77f
CR
4629
4630
1b1fe467 4631$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
7175a77f
CR
4632
4633
1b1fe467 4634$as_echo "#define _MINIX 1" >>confdefs.h
7175a77f
CR
4635
4636 fi
4637
4638
1b1fe467 4639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
7175a77f 4640$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
1b1fe467 4641if ${ac_cv_safe_to_define___extensions__+:} false; then :
7175a77f
CR
4642 $as_echo_n "(cached) " >&6
4643else
1b1fe467 4644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
4645/* end confdefs.h. */
4646
0ee50808
CR
4647# define __EXTENSIONS__ 1
4648 $ac_includes_default
7175a77f
CR
4649int
4650main ()
4651{
4652
4653 ;
4654 return 0;
4655}
4656_ACEOF
1b1fe467 4657if ac_fn_c_try_compile "$LINENO"; then :
7175a77f 4658 ac_cv_safe_to_define___extensions__=yes
7610e0c5 4659else
1b1fe467 4660 ac_cv_safe_to_define___extensions__=no
7610e0c5 4661fi
7610e0c5
CR
4662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4663fi
1b1fe467 4664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
7f947b68
CR
4665$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4666 test $ac_cv_safe_to_define___extensions__ = yes &&
1b1fe467 4667 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
2dead0c4 4668
1b1fe467 4669 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
7610e0c5 4670
1b1fe467 4671 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
7f947b68 4672
1b1fe467
CR
4673 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4674
4675 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
7610e0c5 4676
c920c360 4677
2dead0c4 4678
7f947b68
CR
4679
4680# Check whether --enable-largefile was given.
1b1fe467 4681if test "${enable_largefile+set}" = set; then :
7f947b68 4682 enableval=$enable_largefile;
7610e0c5
CR
4683fi
4684
7f947b68 4685if test "$enable_largefile" != no; then
7610e0c5 4686
1b1fe467 4687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
abe2eb5b 4688$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
1b1fe467 4689if ${ac_cv_sys_largefile_CC+:} false; then :
abe2eb5b
CR
4690 $as_echo_n "(cached) " >&6
4691else
4692 ac_cv_sys_largefile_CC=no
4693 if test "$GCC" != yes; then
4694 ac_save_CC=$CC
4695 while :; do
4696 # IRIX 6.2 and later do not support large files by default,
4697 # so use the C compiler's -n32 option if that helps.
1b1fe467 4698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b
CR
4699/* end confdefs.h. */
4700#include <sys/types.h>
4701 /* Check that off_t can represent 2**63 - 1 correctly.
e3db237e
CR
4702 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4703 since some C++ compilers masquerading as C compilers
4704 incorrectly reject 9223372036854775807. */
f73dda09
JA
4705#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4706 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4707 && LARGE_OFF_T % 2147483647 == 1)
4708 ? 1 : -1];
4709int
4710main ()
4711{
bb70624e 4712
f73dda09
JA
4713 ;
4714 return 0;
4715}
4716_ACEOF
1b1fe467 4717 if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4718 break
f73dda09 4719fi
b709b946
CR
4720rm -f core conftest.err conftest.$ac_objext
4721 CC="$CC -n32"
1b1fe467 4722 if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4723 ac_cv_sys_largefile_CC=' -n32'; break
f73dda09 4724fi
b709b946 4725rm -f core conftest.err conftest.$ac_objext
5e4a95c7 4726 break
f73dda09
JA
4727 done
4728 CC=$ac_save_CC
4729 rm -f conftest.$ac_ext
4730 fi
bb70624e 4731fi
1b1fe467 4732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
dd4f3dd8 4733$as_echo "$ac_cv_sys_largefile_CC" >&6; }
f73dda09
JA
4734 if test "$ac_cv_sys_largefile_CC" != no; then
4735 CC=$CC$ac_cv_sys_largefile_CC
4736 fi
bb70624e 4737
1b1fe467 4738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
dd4f3dd8 4739$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
1b1fe467 4740if ${ac_cv_sys_file_offset_bits+:} false; then :
dd4f3dd8 4741 $as_echo_n "(cached) " >&6
bb70624e 4742else
f73dda09 4743 while :; do
1b1fe467 4744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4745/* end confdefs.h. */
f73dda09
JA
4746#include <sys/types.h>
4747 /* Check that off_t can represent 2**63 - 1 correctly.
4748 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4749 since some C++ compilers masquerading as C compilers
4750 incorrectly reject 9223372036854775807. */
4751#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4752 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4753 && LARGE_OFF_T % 2147483647 == 1)
4754 ? 1 : -1];
4755int
4756main ()
4757{
bb70624e 4758
f73dda09
JA
4759 ;
4760 return 0;
4761}
4762_ACEOF
1b1fe467 4763if ac_fn_c_try_compile "$LINENO"; then :
dd4f3dd8 4764 ac_cv_sys_file_offset_bits=no; break
2e4498b3 4765fi
2e4498b3 4766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1b1fe467 4767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2e4498b3 4768/* end confdefs.h. */
f73dda09
JA
4769#define _FILE_OFFSET_BITS 64
4770#include <sys/types.h>
4771 /* Check that off_t can represent 2**63 - 1 correctly.
4772 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4773 since some C++ compilers masquerading as C compilers
4774 incorrectly reject 9223372036854775807. */
4775#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4776 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4777 && LARGE_OFF_T % 2147483647 == 1)
4778 ? 1 : -1];
4779int
4780main ()
4781{
bb70624e 4782
f73dda09
JA
4783 ;
4784 return 0;
4785}
4786_ACEOF
1b1fe467 4787if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4788 ac_cv_sys_file_offset_bits=64; break
f73dda09 4789fi
b709b946 4790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd4f3dd8 4791 ac_cv_sys_file_offset_bits=unknown
f73dda09
JA
4792 break
4793done
4794fi
1b1fe467 4795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
dd4f3dd8
CR
4796$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4797case $ac_cv_sys_file_offset_bits in #(
4798 no | unknown) ;;
4799 *)
a82a04b3 4800cat >>confdefs.h <<_ACEOF
f73dda09 4801#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
a82a04b3 4802_ACEOF
dd4f3dd8
CR
4803;;
4804esac
4805rm -rf conftest*
4806 if test $ac_cv_sys_file_offset_bits = unknown; then
1b1fe467 4807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
dd4f3dd8 4808$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
1b1fe467 4809if ${ac_cv_sys_large_files+:} false; then :
dd4f3dd8 4810 $as_echo_n "(cached) " >&6
bb70624e 4811else
f73dda09 4812 while :; do
1b1fe467 4813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4814/* end confdefs.h. */
f73dda09
JA
4815#include <sys/types.h>
4816 /* Check that off_t can represent 2**63 - 1 correctly.
4817 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4818 since some C++ compilers masquerading as C compilers
4819 incorrectly reject 9223372036854775807. */
4820#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4821 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4822 && LARGE_OFF_T % 2147483647 == 1)
4823 ? 1 : -1];
4824int
4825main ()
4826{
4827
4828 ;
4829 return 0;
4830}
4831_ACEOF
1b1fe467 4832if ac_fn_c_try_compile "$LINENO"; then :
dd4f3dd8 4833 ac_cv_sys_large_files=no; break
bb70624e 4834fi
b709b946 4835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1b1fe467 4836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4837/* end confdefs.h. */
f73dda09
JA
4838#define _LARGE_FILES 1
4839#include <sys/types.h>
4840 /* Check that off_t can represent 2**63 - 1 correctly.
4841 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4842 since some C++ compilers masquerading as C compilers
4843 incorrectly reject 9223372036854775807. */
4844#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4845 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4846 && LARGE_OFF_T % 2147483647 == 1)
4847 ? 1 : -1];
4848int
4849main ()
4850{
bb70624e 4851
f73dda09
JA
4852 ;
4853 return 0;
4854}
4855_ACEOF
1b1fe467 4856if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4857 ac_cv_sys_large_files=1; break
f73dda09 4858fi
b709b946 4859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd4f3dd8 4860 ac_cv_sys_large_files=unknown
f73dda09
JA
4861 break
4862done
4863fi
1b1fe467 4864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
dd4f3dd8
CR
4865$as_echo "$ac_cv_sys_large_files" >&6; }
4866case $ac_cv_sys_large_files in #(
4867 no | unknown) ;;
4868 *)
a82a04b3 4869cat >>confdefs.h <<_ACEOF
f73dda09 4870#define _LARGE_FILES $ac_cv_sys_large_files
a82a04b3 4871_ACEOF
dd4f3dd8
CR
4872;;
4873esac
4874rm -rf conftest*
4875 fi
0ee50808
CR
4876
4877
f73dda09 4878fi
cce855bc 4879
a82a04b3
CR
4880
4881
dc8fbaf9 4882SIGNAMES_O=
b72432fd
JA
4883SIGNAMES_H=lsignames.h
4884
a82a04b3
CR
4885
4886
d3ad40de 4887CROSS_COMPILE=
cce855bc
JA
4888if test "x$cross_compiling" = "xyes"; then
4889 case "${host}" in
28ef6c31 4890 *-cygwin*)
cce855bc 4891 cross_cache=${srcdir}/cross-build/cygwin32.cache
cce855bc 4892 ;;
9607141c
CR
4893 *-mingw*)
4894 cross_cache=${srcdir}/cross-build/cygwin32.cache
4895 ;;
b72432fd
JA
4896 i[3456]86-*-beos*)
4897 cross_cache=${srcdir}/cross-build/x86-beos.cache
b72432fd
JA
4898 ;;
4899 *) echo "configure: cross-compiling for $host is not supported" >&2
cce855bc
JA
4900 ;;
4901 esac
b72432fd
JA
4902 if test -n "${cross_cache}" && test -r "${cross_cache}"; then
4903 echo "loading cross-build cache file ${cross_cache}"
4904 . ${cross_cache}
4905 fi
4906 unset cross_cache
dc8fbaf9 4907 SIGNAMES_O='signames.o'
9607141c
CR
4908 CROSS_COMPILE='-DCROSS_COMPILING'
4909
cce855bc
JA
4910fi
4911
a82a04b3 4912
dc8fbaf9 4913
a82a04b3 4914
7610e0c5
CR
4915CFLAGS=${CFLAGS-"$AUTO_CFLAGS"}
4916# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX
ccc6cda3 4917
8f50a023
CR
4918# turn off paren warnings in gcc
4919if test "$GCC" = yes && test -n "$DEBUG"; then
4920 CFLAGS="$CFLAGS -Wno-parentheses -Wno-format-security"
4921fi
4922
cce855bc
JA
4923if test "$opt_profiling" = "yes"; then
4924 PROFILE_FLAGS=-pg
b72432fd
JA
4925 case "$host_os" in
4926 solaris2*) ;;
4927 *) opt_static_link=yes ;;
4928 esac
7117c2d2 4929 DEBUG= MALLOC_DEBUG=
cce855bc
JA
4930fi
4931
f4f5e1c2
CR
4932prefer_shared=yes
4933prefer_static=no
4934
cce855bc 4935if test "$opt_static_link" = yes; then
f4f5e1c2
CR
4936 prefer_static=yes
4937 prefer_shared=no
f73dda09
JA
4938 # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
4939 if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
b72432fd 4940 STATIC_LD="-static"
f73dda09
JA
4941 case "$host_os" in
4942 solaris2*) ;;
4943 *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental
4944 esac
cce855bc
JA
4945 fi
4946fi
4947
7610e0c5 4948# set the appropriate make variables for building the "build tools"
348a457e
CR
4949# modify defaults based on whether or not we are cross compiling, since the
4950# options for the target host may not be appropriate for the build host
da5b17cd 4951if test "X$cross_compiling" = "Xno"; then
7610e0c5
CR
4952 CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'}
4953 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)'
da5b17cd 4954 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'}
7610e0c5
CR
4955 # CFLAGS set above to default value if not passed in environment
4956 CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'}
4957 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'}
da5b17cd 4958else
7610e0c5 4959 CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"}
da5b17cd
CR
4960 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
4961 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
7610e0c5
CR
4962 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"}
4963 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""}
da5b17cd
CR
4964fi
4965
7610e0c5 4966
7117c2d2 4967
a82a04b3
CR
4968
4969
4970
4971
4972
4973
4974
4975
4976
f73dda09 4977if test $ac_cv_c_compiler_gnu = yes; then
1b1fe467 4978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
dd4f3dd8 4979$as_echo_n "checking whether $CC needs -traditional... " >&6; }
1b1fe467 4980if ${ac_cv_prog_gcc_traditional+:} false; then :
dd4f3dd8 4981 $as_echo_n "(cached) " >&6
ccc6cda3
JA
4982else
4983 ac_pattern="Autoconf.*'x'"
1b1fe467 4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 4985/* end confdefs.h. */
ccc6cda3
JA
4986#include <sgtty.h>
4987Autoconf TIOCGETP
f73dda09 4988_ACEOF
ccc6cda3 4989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 4990 $EGREP "$ac_pattern" >/dev/null 2>&1; then :
ccc6cda3
JA
4991 ac_cv_prog_gcc_traditional=yes
4992else
ccc6cda3
JA
4993 ac_cv_prog_gcc_traditional=no
4994fi
4995rm -f conftest*
4996
a82a04b3 4997
ccc6cda3 4998 if test $ac_cv_prog_gcc_traditional = no; then
1b1fe467 4999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 5000/* end confdefs.h. */
ccc6cda3
JA
5001#include <termio.h>
5002Autoconf TCGETA
f73dda09 5003_ACEOF
ccc6cda3 5004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 5005 $EGREP "$ac_pattern" >/dev/null 2>&1; then :
ccc6cda3
JA
5006 ac_cv_prog_gcc_traditional=yes
5007fi
5008rm -f conftest*
5009
5010 fi
5011fi
1b1fe467 5012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
dd4f3dd8 5013$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
ccc6cda3
JA
5014 if test $ac_cv_prog_gcc_traditional = yes; then
5015 CC="$CC -traditional"
5016 fi
5017fi
5018
a82a04b3
CR
5019
5020
f73dda09 5021if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no"
b72432fd 5022then
f73dda09
JA
5023 # If the user specified --with-installed-readline=PREFIX and PREFIX
5024 # is not `yes', set ac_cv_rl_prefix to PREFIX
5025 test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline
b72432fd 5026
a82a04b3 5027
bb70624e
JA
5028if test "X$bash_cv_termcap_lib" = "X"; then
5029_bash_needmsg=yes
5030else
1b1fe467 5031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
dd4f3dd8 5032$as_echo_n "checking which library has the termcap functions... " >&6; }
bb70624e
JA
5033_bash_needmsg=
5034fi
1b1fe467 5035if ${bash_cv_termcap_lib+:} false; then :
dd4f3dd8 5036 $as_echo_n "(cached) " >&6
bb70624e 5037else
1b1fe467
CR
5038 ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
5039if test "x$ac_cv_func_tgetent" = xyes; then :
5040 bash_cv_termcap_lib=libc
5041else
5042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
5043$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
5044if ${ac_cv_lib_termcap_tgetent+:} false; then :
dd4f3dd8 5045 $as_echo_n "(cached) " >&6
bb70624e 5046else
1b1fe467
CR
5047 ac_check_lib_save_LIBS=$LIBS
5048LIBS="-ltermcap $LIBS"
5049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
5050/* end confdefs.h. */
5051
5052/* Override any GCC internal prototype to avoid an error.
5053 Use char because int might match the return type of a GCC
5054 builtin and then its argument prototype would still apply. */
5055#ifdef __cplusplus
5056extern "C"
5057#endif
5058char tgetent ();
5059int
5060main ()
5061{
5062return tgetent ();
5063 ;
5064 return 0;
5065}
5066_ACEOF
1b1fe467 5067if ac_fn_c_try_link "$LINENO"; then :
7175a77f
CR
5068 ac_cv_lib_termcap_tgetent=yes
5069else
1b1fe467 5070 ac_cv_lib_termcap_tgetent=no
7175a77f 5071fi
1b1fe467
CR
5072rm -f core conftest.err conftest.$ac_objext \
5073 conftest$ac_exeext conftest.$ac_ext
7175a77f
CR
5074LIBS=$ac_check_lib_save_LIBS
5075fi
1b1fe467 5076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
7175a77f 5077$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
1b1fe467 5078if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
7f947b68 5079 bash_cv_termcap_lib=libtermcap
e3db237e 5080else
1b1fe467 5081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
7f947b68 5082$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
1b1fe467 5083if ${ac_cv_lib_tinfo_tgetent+:} false; then :
e3db237e
CR
5084 $as_echo_n "(cached) " >&6
5085else
5086 ac_check_lib_save_LIBS=$LIBS
7f947b68 5087LIBS="-ltinfo $LIBS"
1b1fe467 5088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e3db237e
CR
5089/* end confdefs.h. */
5090
5091/* Override any GCC internal prototype to avoid an error.
5092 Use char because int might match the return type of a GCC
5093 builtin and then its argument prototype would still apply. */
5094#ifdef __cplusplus
5095extern "C"
5096#endif
5097char tgetent ();
5098int
5099main ()
5100{
5101return tgetent ();
5102 ;
5103 return 0;
5104}
5105_ACEOF
1b1fe467 5106if ac_fn_c_try_link "$LINENO"; then :
7f947b68 5107 ac_cv_lib_tinfo_tgetent=yes
abe2eb5b 5108else
1b1fe467 5109 ac_cv_lib_tinfo_tgetent=no
abe2eb5b 5110fi
1b1fe467
CR
5111rm -f core conftest.err conftest.$ac_objext \
5112 conftest$ac_exeext conftest.$ac_ext
abe2eb5b
CR
5113LIBS=$ac_check_lib_save_LIBS
5114fi
1b1fe467 5115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
abe2eb5b 5116$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
1b1fe467 5117if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
abe2eb5b 5118 bash_cv_termcap_lib=libtinfo
bb70624e 5119else
1b1fe467 5120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
dd4f3dd8 5121$as_echo_n "checking for tgetent in -lcurses... " >&6; }
1b1fe467 5122if ${ac_cv_lib_curses_tgetent+:} false; then :
dd4f3dd8 5123 $as_echo_n "(cached) " >&6
f73dda09
JA
5124else
5125 ac_check_lib_save_LIBS=$LIBS
5126LIBS="-lcurses $LIBS"
1b1fe467 5127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 5128/* end confdefs.h. */
b72432fd 5129
b709b946
CR
5130/* Override any GCC internal prototype to avoid an error.
5131 Use char because int might match the return type of a GCC
5132 builtin and then its argument prototype would still apply. */
f73dda09
JA
5133#ifdef __cplusplus
5134extern "C"
5135#endif
f73dda09
JA
5136char tgetent ();
5137int
5138main ()
5139{
b709b946 5140return tgetent ();
f73dda09
JA
5141 ;
5142 return 0;
5143}
5144_ACEOF
1b1fe467 5145if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5146 ac_cv_lib_curses_tgetent=yes
5147else
1b1fe467 5148 ac_cv_lib_curses_tgetent=no
f73dda09 5149fi
1b1fe467
CR
5150rm -f core conftest.err conftest.$ac_objext \
5151 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5152LIBS=$ac_check_lib_save_LIBS
5153fi
1b1fe467 5154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
dd4f3dd8 5155$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
1b1fe467 5156if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
bb70624e
JA
5157 bash_cv_termcap_lib=libcurses
5158else
1b1fe467 5159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
dd4f3dd8 5160$as_echo_n "checking for tgetent in -lncurses... " >&6; }
1b1fe467 5161if ${ac_cv_lib_ncurses_tgetent+:} false; then :
dd4f3dd8 5162 $as_echo_n "(cached) " >&6
bb70624e 5163else
f73dda09 5164 ac_check_lib_save_LIBS=$LIBS
bb70624e 5165LIBS="-lncurses $LIBS"
1b1fe467 5166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 5167/* end confdefs.h. */
f73dda09 5168
b709b946
CR
5169/* Override any GCC internal prototype to avoid an error.
5170 Use char because int might match the return type of a GCC
5171 builtin and then its argument prototype would still apply. */
f73dda09
JA
5172#ifdef __cplusplus
5173extern "C"
5174#endif
f73dda09
JA
5175char tgetent ();
5176int
5177main ()
5178{
b709b946 5179return tgetent ();
f73dda09
JA
5180 ;
5181 return 0;
5182}
5183_ACEOF
1b1fe467 5184if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5185 ac_cv_lib_ncurses_tgetent=yes
5186else
1b1fe467 5187 ac_cv_lib_ncurses_tgetent=no
f73dda09 5188fi
1b1fe467
CR
5189rm -f core conftest.err conftest.$ac_objext \
5190 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5191LIBS=$ac_check_lib_save_LIBS
5192fi
1b1fe467 5193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
dd4f3dd8 5194$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
1b1fe467 5195if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
f73dda09 5196 bash_cv_termcap_lib=libncurses
bb70624e 5197else
f73dda09 5198 bash_cv_termcap_lib=gnutermcap
bb70624e 5199fi
bb70624e 5200
bb70624e
JA
5201fi
5202
5203fi
5204
5205fi
5206
5207fi
5208
d3a24ed2
CR
5209fi
5210
bb70624e 5211if test "X$_bash_needmsg" = "Xyes"; then
1b1fe467 5212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
dd4f3dd8 5213$as_echo_n "checking which library has the termcap functions... " >&6; }
bb70624e 5214fi
1b1fe467 5215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5
dd4f3dd8 5216$as_echo "using $bash_cv_termcap_lib" >&6; }
bb70624e
JA
5217if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
5218LDFLAGS="$LDFLAGS -L./lib/termcap"
5219TERMCAP_LIB="./lib/termcap/libtermcap.a"
5220TERMCAP_DEP="./lib/termcap/libtermcap.a"
5221elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
5222TERMCAP_LIB=-ltermcap
5223TERMCAP_DEP=
f73dda09
JA
5224elif test $bash_cv_termcap_lib = libtinfo; then
5225TERMCAP_LIB=-ltinfo
5226TERMCAP_DEP=
bb70624e
JA
5227elif test $bash_cv_termcap_lib = libncurses; then
5228TERMCAP_LIB=-lncurses
5229TERMCAP_DEP=
d3a24ed2
CR
5230elif test $bash_cv_termcap_lib = libc; then
5231TERMCAP_LIB=
5232TERMCAP_DEP=
bb70624e
JA
5233else
5234TERMCAP_LIB=-lcurses
5235TERMCAP_DEP=
5236fi
5237
a82a04b3
CR
5238
5239
5240
1b1fe467 5241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of installed readline library" >&5
dd4f3dd8 5242$as_echo_n "checking version of installed readline library... " >&6; }
f73dda09
JA
5243
5244# What a pain in the ass this is.
5245
5246# save cpp and ld options
5247_save_CFLAGS="$CFLAGS"
5248_save_LDFLAGS="$LDFLAGS"
5249_save_LIBS="$LIBS"
5250
5251# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
5252# allows the caller to do something like $_rl_prefix=$withval if the user
5253# specifies --with-installed-readline=PREFIX as an argument to configure
5254
5255if test -z "$ac_cv_rl_prefix"; then
5256test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
5257fi
5258
5259eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
5260eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
5261
5262LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
5263CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
5264LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
5265
1b1fe467 5266if ${ac_cv_rl_version+:} false; then :
dd4f3dd8 5267 $as_echo_n "(cached) " >&6
d3a24ed2 5268else
1b1fe467 5269 if test "$cross_compiling" = yes; then :
690150f9 5270 ac_cv_rl_version='6.3'
f73dda09 5271else
1b1fe467 5272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 5273/* end confdefs.h. */
f73dda09
JA
5274
5275#include <stdio.h>
5276#include <readline/readline.h>
5277
798a67db
CR
5278extern int rl_gnu_readline_p;
5279
f73dda09
JA
5280main()
5281{
5282 FILE *fp;
5283 fp = fopen("conftest.rlv", "w");
798a67db
CR
5284 if (fp == 0)
5285 exit(1);
5286 if (rl_gnu_readline_p != 1)
5287 fprintf(fp, "0.0\n");
5288 else
5289 fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
f73dda09
JA
5290 fclose(fp);
5291 exit(0);
5292}
5293
5294_ACEOF
1b1fe467 5295if ac_fn_c_try_run "$LINENO"; then :
f73dda09
JA
5296 ac_cv_rl_version=`cat conftest.rlv`
5297else
1b1fe467 5298 ac_cv_rl_version='0.0'
f73dda09 5299fi
1b1fe467
CR
5300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5301 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 5302fi
b709b946 5303
d3a24ed2 5304fi
f73dda09 5305
a82a04b3 5306
f73dda09
JA
5307CFLAGS="$_save_CFLAGS"
5308LDFLAGS="$_save_LDFLAGS"
5309LIBS="$_save_LIBS"
5310
5311RL_MAJOR=0
5312RL_MINOR=0
5313
5314# (
5315case "$ac_cv_rl_version" in
53162*|3*|4*|5*|6*|7*|8*|9*)
5317 RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
7117c2d2 5318 RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'`
f73dda09
JA
5319 ;;
5320esac
5321
5322# (((
5323case $RL_MAJOR in
5324[0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;;
5325[0-9]) _RL_MAJOR=0$RL_MAJOR ;;
5326*) _RL_MAJOR=00 ;;
5327esac
5328
5329# (((
5330case $RL_MINOR in
5331[0-9][0-9]) _RL_MINOR=$RL_MINOR ;;
5332[0-9]) _RL_MINOR=0$RL_MINOR ;;
5333*) _RL_MINOR=00 ;;
5334esac
5335
5336RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
5337
5338# Readline versions greater than 4.2 have these defines in readline.h
5339
5340if test $ac_cv_rl_version = '0.0' ; then
1b1fe467 5341 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not test version of installed readline library." >&5
dd4f3dd8 5342$as_echo "$as_me: WARNING: Could not test version of installed readline library." >&2;}
f73dda09
JA
5343elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
5344 # set these for use by the caller
5345 RL_PREFIX=$ac_cv_rl_prefix
5346 RL_LIBDIR=$ac_cv_rl_libdir
5347 RL_INCLUDEDIR=$ac_cv_rl_includedir
1b1fe467 5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5
dd4f3dd8 5349$as_echo "$ac_cv_rl_version" >&6; }
f73dda09
JA
5350else
5351
a82a04b3
CR
5352
5353cat >>confdefs.h <<_ACEOF
f73dda09 5354#define RL_READLINE_VERSION $RL_VERSION
a82a04b3 5355_ACEOF
f73dda09 5356
a82a04b3
CR
5357
5358cat >>confdefs.h <<_ACEOF
f73dda09 5359#define RL_VERSION_MAJOR $RL_MAJOR
a82a04b3 5360_ACEOF
f73dda09 5361
a82a04b3
CR
5362
5363cat >>confdefs.h <<_ACEOF
f73dda09 5364#define RL_VERSION_MINOR $RL_MINOR
a82a04b3
CR
5365_ACEOF
5366
5367
5368
5369
5370
545f34cf
CR
5371
5372# set these for use by the caller
5373RL_PREFIX=$ac_cv_rl_prefix
5374RL_LIBDIR=$ac_cv_rl_libdir
5375RL_INCLUDEDIR=$ac_cv_rl_includedir
5376
1b1fe467 5377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5
dd4f3dd8 5378$as_echo "$ac_cv_rl_version" >&6; }
bb70624e 5379
f73dda09 5380fi
bb70624e 5381
a82a04b3 5382
f73dda09 5383 case "$ac_cv_rl_version" in
d3a24ed2 5384 5*|6*|7*|8*|9*) ;;
f73dda09 5385 *) opt_with_installed_readline=no
1b1fe467 5386 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5
dd4f3dd8 5387$as_echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;}
1b1fe467 5388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using private bash version" >&5
dd4f3dd8 5389$as_echo "$as_me: WARNING: using private bash version" >&2;}
bb70624e
JA
5390 ;;
5391 esac
bb70624e
JA
5392fi
5393
fd3925f1 5394TILDE_LIB=-ltilde
bb70624e 5395if test $opt_readline = yes; then
1b1fe467 5396 $as_echo "#define READLINE 1" >>confdefs.h
bb70624e 5397
f73dda09 5398 if test "$opt_with_installed_readline" != "no" ; then
d3a24ed2
CR
5399 case "$opt_with_installed_readline" in
5400 yes) RL_INCLUDE= ;;
5401 *) case "$RL_INCLUDEDIR" in
5402 /usr/include) ;;
5403 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
5404 esac
5405 ;;
f73dda09 5406 esac
bb70624e 5407 READLINE_DEP=
233564d2 5408 READLINE_LIB=-lreadline
fd3925f1
CR
5409 # section for OS versions that don't allow unresolved symbols
5410 # to be compiled into dynamic libraries.
5411 case "$host_os" in
5412 cygwin*) TILDE_LIB= ;;
5413 esac
bb70624e
JA
5414 else
5415 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5416 READLINE_DEP='$(READLINE_LIBRARY)'
fd3925f1 5417 # section for OS versions that ship an older/broken version of
233564d2
CR
5418 # readline as a standard dynamic library and don't allow a
5419 # static version specified as -llibname to override the
5420 # dynamic version
5421 case "${host_os}" in
82a5df63 5422 darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
233564d2
CR
5423 *) READLINE_LIB=-lreadline ;;
5424 esac
bb70624e
JA
5425 fi
5426else
5427 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5428 READLINE_LIB= READLINE_DEP=
5429fi
5430if test $opt_history = yes || test $opt_bang_history = yes; then
5431 if test $opt_history = yes; then
1b1fe467 5432 $as_echo "#define HISTORY 1" >>confdefs.h
bb70624e
JA
5433
5434 fi
5435 if test $opt_bang_history = yes; then
1b1fe467 5436 $as_echo "#define BANG_HISTORY 1" >>confdefs.h
b72432fd
JA
5437
5438 fi
f73dda09
JA
5439 if test "$opt_with_installed_readline" != "no"; then
5440 HIST_LIBDIR=$RL_LIBDIR
b72432fd 5441 HISTORY_DEP=
233564d2 5442 HISTORY_LIB=-lhistory
d3a24ed2
CR
5443 case "$opt_with_installed_readline" in
5444 yes) RL_INCLUDE= ;;
5445 *) case "$RL_INCLUDEDIR" in
5446 /usr/include) ;;
5447 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
5448 esac
5449 ;;
f73dda09 5450 esac
b72432fd
JA
5451 else
5452 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5453 HISTORY_DEP='$(HISTORY_LIBRARY)'
233564d2
CR
5454 # section for OS versions that ship an older version of
5455 # readline as a standard dynamic library and don't allow a
5456 # static version specified as -llibname to override the
5457 # dynamic version
5458 case "${host_os}" in
82a5df63 5459 darwin[89]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;;
233564d2
CR
5460 *) HISTORY_LIB=-lhistory ;;
5461 esac
b72432fd
JA
5462 fi
5463else
5464 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5465 HISTORY_LIB= HISTORY_DEP=
5466fi
5467
a82a04b3
CR
5468
5469
5470
5471
5472
5473
5474
5475
5476
fd3925f1 5477
ccc6cda3
JA
5478# Find a good install program. We prefer a C program (faster),
5479# so one script is as good as another. But avoid the broken or
5480# incompatible versions:
5481# SysV /etc/install, /usr/sbin/install
5482# SunOS /usr/etc/install
5483# IRIX /sbin/install
5484# AIX /bin/install
f73dda09 5485# AmigaOS /C/install, which installs bootblocks on floppy discs
bb70624e 5486# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ccc6cda3
JA
5487# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5488# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5e4a95c7 5489# OS/2's system install, which has a completely different semantic
ccc6cda3 5490# ./install, which can be erroneously created by make from ./install.sh.
dd4f3dd8 5491# Reject install programs that cannot install multiple files.
1b1fe467 5492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
dd4f3dd8 5493$as_echo_n "checking for a BSD-compatible install... " >&6; }
ccc6cda3 5494if test -z "$INSTALL"; then
1b1fe467 5495if ${ac_cv_path_install+:} false; then :
dd4f3dd8 5496 $as_echo_n "(cached) " >&6
ccc6cda3 5497else
a82a04b3
CR
5498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5499for as_dir in $PATH
5500do
5501 IFS=$as_save_IFS
5502 test -z "$as_dir" && as_dir=.
1b1fe467
CR
5503 # Account for people who put trailing slashes in PATH elements.
5504case $as_dir/ in #((
5505 ./ | .// | /[cC]/* | \
a82a04b3 5506 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1b1fe467 5507 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
a82a04b3
CR
5508 /usr/ucb/* ) ;;
5509 *)
5510 # OSF1 and SCO ODT 3.0 have their own names for install.
5511 # Don't use installbsd from OSF since it installs stuff as root
5512 # by default.
5513 for ac_prog in ginstall scoinst install; do
5514 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 5515 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
5e4a95c7
CR
5516 if test $ac_prog = install &&
5517 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5518 # AIX install. It has an incompatible calling convention.
5519 :
5520 elif test $ac_prog = install &&
5521 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5522 # program-specific install script used by HP pwplus--don't use.
5523 :
5524 else
dd4f3dd8
CR
5525 rm -rf conftest.one conftest.two conftest.dir
5526 echo one > conftest.one
5527 echo two > conftest.two
5528 mkdir conftest.dir
5529 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5530 test -s conftest.one && test -s conftest.two &&
5531 test -s conftest.dir/conftest.one &&
5532 test -s conftest.dir/conftest.two
5533 then
5534 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5535 break 3
5536 fi
5e4a95c7
CR
5537 fi
5538 fi
ccc6cda3 5539 done
a82a04b3
CR
5540 done
5541 ;;
5542esac
dd4f3dd8 5543
1b1fe467 5544 done
b709b946 5545IFS=$as_save_IFS
a82a04b3 5546
dd4f3dd8 5547rm -rf conftest.one conftest.two conftest.dir
ccc6cda3
JA
5548
5549fi
5550 if test "${ac_cv_path_install+set}" = set; then
f73dda09 5551 INSTALL=$ac_cv_path_install
ccc6cda3 5552 else
b709b946
CR
5553 # As a last resort, use the slow shell script. Don't cache a
5554 # value for INSTALL within a source directory, because that will
ccc6cda3 5555 # break other packages using the cache if that directory is
b709b946 5556 # removed, or if the value is a relative name.
f73dda09 5557 INSTALL=$ac_install_sh
ccc6cda3
JA
5558 fi
5559fi
1b1fe467 5560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
dd4f3dd8 5561$as_echo "$INSTALL" >&6; }
ccc6cda3
JA
5562
5563# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5564# It thinks the first close brace ends the variable substitution.
5565test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5566
f73dda09 5567test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
bb70624e 5568
ccc6cda3
JA
5569test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5570
208fdb50
CR
5571if test -n "$ac_tool_prefix"; then
5572 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5573set dummy ${ac_tool_prefix}ar; ac_word=$2
1b1fe467 5574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 5575$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 5576if ${ac_cv_prog_AR+:} false; then :
dd4f3dd8 5577 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5578else
5579 if test -n "$AR"; then
5580 ac_cv_prog_AR="$AR" # Let the user override the test.
5581else
a82a04b3
CR
5582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585 IFS=$as_save_IFS
5586 test -z "$as_dir" && as_dir=.
1b1fe467 5587 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 5588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
208fdb50 5589 ac_cv_prog_AR="${ac_tool_prefix}ar"
1b1fe467 5590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
5591 break 2
5592 fi
5593done
1b1fe467 5594 done
b709b946 5595IFS=$as_save_IFS
f73dda09 5596
ccc6cda3
JA
5597fi
5598fi
f73dda09 5599AR=$ac_cv_prog_AR
ccc6cda3 5600if test -n "$AR"; then
1b1fe467 5601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
dd4f3dd8 5602$as_echo "$AR" >&6; }
ccc6cda3 5603else
1b1fe467 5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 5605$as_echo "no" >&6; }
ccc6cda3
JA
5606fi
5607
b709b946 5608
208fdb50
CR
5609fi
5610if test -z "$ac_cv_prog_AR"; then
5611 ac_ct_AR=$AR
5612 # Extract the first word of "ar", so it can be a program name with args.
5613set dummy ar; ac_word=$2
5614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5615$as_echo_n "checking for $ac_word... " >&6; }
5616if ${ac_cv_prog_ac_ct_AR+:} false; then :
5617 $as_echo_n "(cached) " >&6
5618else
5619 if test -n "$ac_ct_AR"; then
5620 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5621else
5622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5623for as_dir in $PATH
5624do
5625 IFS=$as_save_IFS
5626 test -z "$as_dir" && as_dir=.
5627 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 5628 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
208fdb50
CR
5629 ac_cv_prog_ac_ct_AR="ar"
5630 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5631 break 2
5632 fi
5633done
5634 done
5635IFS=$as_save_IFS
5636
5637fi
5638fi
5639ac_ct_AR=$ac_cv_prog_ac_ct_AR
5640if test -n "$ac_ct_AR"; then
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5642$as_echo "$ac_ct_AR" >&6; }
5643else
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5645$as_echo "no" >&6; }
5646fi
5647
5648 if test "x$ac_ct_AR" = x; then
5649 AR=""
5650 else
5651 case $cross_compiling:$ac_tool_warned in
5652yes:)
5653{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5654$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5655ac_tool_warned=yes ;;
5656esac
5657 AR=$ac_ct_AR
5658 fi
5659else
5660 AR="$ac_cv_prog_AR"
5661fi
5662
b72432fd 5663test -n "$ARFLAGS" || ARFLAGS="cr"
f73dda09
JA
5664if test -n "$ac_tool_prefix"; then
5665 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5666set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1b1fe467 5667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 5668$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 5669if ${ac_cv_prog_RANLIB+:} false; then :
dd4f3dd8 5670 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5671else
5672 if test -n "$RANLIB"; then
5673 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5674else
a82a04b3
CR
5675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5676for as_dir in $PATH
5677do
5678 IFS=$as_save_IFS
5679 test -z "$as_dir" && as_dir=.
1b1fe467 5680 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 5681 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3 5682 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1b1fe467 5683 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
5684 break 2
5685 fi
5686done
1b1fe467 5687 done
b709b946 5688IFS=$as_save_IFS
f73dda09 5689
ccc6cda3
JA
5690fi
5691fi
f73dda09 5692RANLIB=$ac_cv_prog_RANLIB
ccc6cda3 5693if test -n "$RANLIB"; then
1b1fe467 5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
dd4f3dd8 5695$as_echo "$RANLIB" >&6; }
f73dda09 5696else
1b1fe467 5697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 5698$as_echo "no" >&6; }
f73dda09
JA
5699fi
5700
b709b946 5701
f73dda09
JA
5702fi
5703if test -z "$ac_cv_prog_RANLIB"; then
5704 ac_ct_RANLIB=$RANLIB
5705 # Extract the first word of "ranlib", so it can be a program name with args.
5706set dummy ranlib; ac_word=$2
1b1fe467 5707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 5708$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 5709if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
dd4f3dd8 5710 $as_echo_n "(cached) " >&6
f73dda09
JA
5711else
5712 if test -n "$ac_ct_RANLIB"; then
5713 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5714else
a82a04b3
CR
5715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5716for as_dir in $PATH
5717do
5718 IFS=$as_save_IFS
5719 test -z "$as_dir" && as_dir=.
1b1fe467 5720 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 5721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3 5722 ac_cv_prog_ac_ct_RANLIB="ranlib"
1b1fe467 5723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
5724 break 2
5725 fi
5726done
1b1fe467 5727 done
b709b946 5728IFS=$as_save_IFS
f73dda09 5729
f73dda09
JA
5730fi
5731fi
5732ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5733if test -n "$ac_ct_RANLIB"; then
1b1fe467 5734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
dd4f3dd8 5735$as_echo "$ac_ct_RANLIB" >&6; }
ccc6cda3 5736else
1b1fe467 5737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 5738$as_echo "no" >&6; }
f73dda09
JA
5739fi
5740
b709b946
CR
5741 if test "x$ac_ct_RANLIB" = x; then
5742 RANLIB=":"
5743 else
5744 case $cross_compiling:$ac_tool_warned in
5745yes:)
1b1fe467 5746{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
af98a2a6 5747$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
b709b946
CR
5748ac_tool_warned=yes ;;
5749esac
5750 RANLIB=$ac_ct_RANLIB
5751 fi
f73dda09
JA
5752else
5753 RANLIB="$ac_cv_prog_RANLIB"
ccc6cda3
JA
5754fi
5755
5756for ac_prog in 'bison -y' byacc
5757do
f73dda09 5758 # Extract the first word of "$ac_prog", so it can be a program name with args.
ccc6cda3 5759set dummy $ac_prog; ac_word=$2
1b1fe467 5760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 5761$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 5762if ${ac_cv_prog_YACC+:} false; then :
dd4f3dd8 5763 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5764else
5765 if test -n "$YACC"; then
5766 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5767else
a82a04b3
CR
5768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5769for as_dir in $PATH
5770do
5771 IFS=$as_save_IFS
5772 test -z "$as_dir" && as_dir=.
1b1fe467 5773 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 5774 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3 5775 ac_cv_prog_YACC="$ac_prog"
1b1fe467 5776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
5777 break 2
5778 fi
5779done
1b1fe467 5780 done
b709b946 5781IFS=$as_save_IFS
f73dda09 5782
ccc6cda3
JA
5783fi
5784fi
f73dda09 5785YACC=$ac_cv_prog_YACC
ccc6cda3 5786if test -n "$YACC"; then
1b1fe467 5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
dd4f3dd8 5788$as_echo "$YACC" >&6; }
ccc6cda3 5789else
1b1fe467 5790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 5791$as_echo "no" >&6; }
ccc6cda3
JA
5792fi
5793
b709b946 5794
f73dda09 5795 test -n "$YACC" && break
ccc6cda3
JA
5796done
5797test -n "$YACC" || YACC="yacc"
5798
1b1fe467 5799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
dd4f3dd8
CR
5800$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5801set x ${MAKE-make}
5802ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
1b1fe467 5803if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
dd4f3dd8 5804 $as_echo_n "(cached) " >&6
ccc6cda3 5805else
a82a04b3 5806 cat >conftest.make <<\_ACEOF
b709b946 5807SHELL = /bin/sh
ccc6cda3 5808all:
b709b946 5809 @echo '@@@%%%=$(MAKE)=@@@%%%'
a82a04b3 5810_ACEOF
1b1fe467 5811# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
b709b946
CR
5812case `${MAKE-make} -f conftest.make 2>/dev/null` in
5813 *@@@%%%=?*=@@@%%%*)
5814 eval ac_cv_prog_make_${ac_make}_set=yes;;
5815 *)
5816 eval ac_cv_prog_make_${ac_make}_set=no;;
5817esac
f73dda09 5818rm -f conftest.make
ccc6cda3 5819fi
b709b946 5820if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
1b1fe467 5821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
dd4f3dd8 5822$as_echo "yes" >&6; }
ccc6cda3
JA
5823 SET_MAKE=
5824else
1b1fe467 5825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 5826$as_echo "no" >&6; }
ccc6cda3
JA
5827 SET_MAKE="MAKE=${MAKE-make}"
5828fi
5829
a82a04b3 5830
41d203e2
CR
5831case "$ac_cv_prog_YACC" in
5832*bison*) ;;
5833*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5
5834$as_echo "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;;
5835esac
5836
b72432fd 5837case "$host_os" in
bb70624e 5838opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
b72432fd
JA
5839*) MAKE_SHELL=/bin/sh ;;
5840esac
5841
a82a04b3 5842
10590446
CR
5843if test x$SIZE = x; then
5844 if test x$ac_tool_prefix = x; then
5845 SIZE=size
5846 else
5847 SIZE=${ac_tool_prefix}size
5848 save_IFS=$IFS ; IFS=:
5849 size_found=0
5850 for dir in $PATH; do
5851 if test -x $dir/$SIZE ; then
5852 size_found=1
5853 break
5854 fi
5855 done
5856 if test $size_found -eq 0; then
233564d2 5857 SIZE=:
10590446
CR
5858 fi
5859 IFS=$save_IFS
5860 fi
5861fi
5862
e624d0f7 5863
278286c9
CR
5864# Checks for stat-related time functions.
5865
5866# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software
5867# Foundation, Inc.
5868
5869# This file is free software; the Free Software Foundation
5870# gives unlimited permission to copy and/or distribute it,
5871# with or without modifications, as long as this notice is preserved.
5872
5873
5874# st_atim.tv_nsec - Linux, Solaris, Cygwin
5875# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
5876# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
5877# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
5878
5879# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
5880# st_birthtim - Cygwin 1.7.0+
5881
5882
5883
5884# Configure checks for struct timespec
5885
5886# Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc.
5887
5888# This file is free software; the Free Software Foundation
5889# gives unlimited permission to copy and/or distribute it,
5890# with or without modifications, as long as this notice is preserved.
5891
5892# Original written by Paul Eggert and Jim Meyering.
5893# Modified by Chet Ramey for bash
5894
5895
5896
5897
5898
1b1fe467 5899$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
ccc6cda3 5900
e624d0f7 5901
1b1fe467 5902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
dd4f3dd8 5903$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
1b1fe467 5904if ${ac_cv_c_const+:} false; then :
dd4f3dd8 5905 $as_echo_n "(cached) " >&6
ccc6cda3 5906else
1b1fe467 5907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7
CR
5908/* end confdefs.h. */
5909
5910int
5911main ()
5c26afb8 5912{
0ee50808 5913
5c26afb8 5914#ifndef __cplusplus
0ee50808 5915 /* Ultrix mips cc rejects this sort of thing. */
5c26afb8 5916 typedef int charset[2];
0ee50808 5917 const charset cs = { 0, 0 };
5c26afb8 5918 /* SunOS 4.1.1 cc rejects this. */
dd4f3dd8
CR
5919 char const *const *pcpcc;
5920 char **ppc;
5c26afb8
CR
5921 /* NEC SVR4.0.2 mips cc rejects this. */
5922 struct point {int x, y;};
5923 static struct point const zero = {0,0};
5924 /* AIX XL C 1.02.0.0 rejects this.
5925 It does not let you subtract one const X* pointer from another in
5926 an arm of an if-expression whose if-part is not a constant
5927 expression */
f73dda09 5928 const char *g = "string";
dd4f3dd8 5929 pcpcc = &g + (g ? g-g : 0);
f73dda09 5930 /* HPUX 7.0 cc rejects these. */
dd4f3dd8
CR
5931 ++pcpcc;
5932 ppc = (char**) pcpcc;
5933 pcpcc = (char const *const *) ppc;
0ee50808
CR
5934 { /* SCO 3.2v4 cc rejects this sort of thing. */
5935 char tx;
5936 char *t = &tx;
f73dda09
JA
5937 char const *s = 0 ? (char *) 0 : (char const *) 0;
5938
5939 *t++ = 0;
b709b946 5940 if (s) return 0;
f73dda09
JA
5941 }
5942 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5943 int x[] = {25, 17};
5944 const int *foo = &x[0];
5945 ++foo;
5946 }
5947 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5948 typedef const int *iptr;
5949 iptr p = 0;
5950 ++p;
5951 }
0ee50808 5952 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
f73dda09 5953 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
0ee50808
CR
5954 struct s { int j; const int *ap[3]; } bx;
5955 struct s *b = &bx; b->j = 5;
f73dda09
JA
5956 }
5957 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5958 const int foo = 10;
b709b946 5959 if (!foo) return 0;
f73dda09 5960 }
dd4f3dd8 5961 return !cs[0] && !zero.x;
ccc6cda3
JA
5962#endif
5963
f73dda09
JA
5964 ;
5965 return 0;
5966}
5967_ACEOF
1b1fe467 5968if ac_fn_c_try_compile "$LINENO"; then :
f73dda09
JA
5969 ac_cv_c_const=yes
5970else
1b1fe467 5971 ac_cv_c_const=no
f73dda09 5972fi
b709b946 5973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 5974fi
1b1fe467 5975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
dd4f3dd8 5976$as_echo "$ac_cv_c_const" >&6; }
f73dda09
JA
5977if test $ac_cv_c_const = no; then
5978
1b1fe467 5979$as_echo "#define const /**/" >>confdefs.h
ccc6cda3
JA
5980
5981fi
5982
1b1fe467 5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
dd4f3dd8 5984$as_echo_n "checking for inline... " >&6; }
1b1fe467 5985if ${ac_cv_c_inline+:} false; then :
dd4f3dd8 5986 $as_echo_n "(cached) " >&6
ccc6cda3 5987else
f73dda09
JA
5988 ac_cv_c_inline=no
5989for ac_kw in inline __inline__ __inline; do
1b1fe467 5990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 5991/* end confdefs.h. */
f73dda09 5992#ifndef __cplusplus
5e4a95c7
CR
5993typedef int foo_t;
5994static $ac_kw foo_t static_foo () {return 0; }
5995$ac_kw foo_t foo () {return 0; }
ccc6cda3
JA
5996#endif
5997
f73dda09 5998_ACEOF
1b1fe467 5999if ac_fn_c_try_compile "$LINENO"; then :
b709b946 6000 ac_cv_c_inline=$ac_kw
f73dda09 6001fi
b709b946
CR
6002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6003 test "$ac_cv_c_inline" != no && break
f73dda09 6004done
ccc6cda3
JA
6005
6006fi
1b1fe467 6007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
dd4f3dd8 6008$as_echo "$ac_cv_c_inline" >&6; }
5e4a95c7 6009
f73dda09
JA
6010case $ac_cv_c_inline in
6011 inline | yes) ;;
5e4a95c7
CR
6012 *)
6013 case $ac_cv_c_inline in
6014 no) ac_val=;;
6015 *) ac_val=$ac_cv_c_inline;;
6016 esac
6017 cat >>confdefs.h <<_ACEOF
6018#ifndef __cplusplus
6019#define inline $ac_val
6020#endif
5c26afb8 6021_ACEOF
5e4a95c7 6022 ;;
f73dda09 6023esac
ccc6cda3 6024
1b1fe467 6025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
dd4f3dd8 6026$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
1b1fe467 6027if ${ac_cv_c_bigendian+:} false; then :
dd4f3dd8 6028 $as_echo_n "(cached) " >&6
ccc6cda3 6029else
dd4f3dd8 6030 ac_cv_c_bigendian=unknown
af98a2a6 6031 # See if we're dealing with a universal compiler.
1b1fe467 6032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 6033/* end confdefs.h. */
af98a2a6
CR
6034#ifndef __APPLE_CC__
6035 not a universal capable compiler
dd4f3dd8
CR
6036 #endif
6037 typedef int dummy;
ccc6cda3 6038
f73dda09 6039_ACEOF
1b1fe467 6040if ac_fn_c_try_compile "$LINENO"; then :
af98a2a6
CR
6041
6042 # Check for potential -arch flags. It is not universal unless
1b1fe467
CR
6043 # there are at least two -arch flags with different values.
6044 ac_arch=
6045 ac_prev=
6046 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
6047 if test -n "$ac_prev"; then
6048 case $ac_word in
6049 i?86 | x86_64 | ppc | ppc64)
6050 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
6051 ac_arch=$ac_word
6052 else
6053 ac_cv_c_bigendian=universal
6054 break
6055 fi
6056 ;;
6057 esac
6058 ac_prev=
6059 elif test "x$ac_word" = "x-arch"; then
6060 ac_prev=arch
6061 fi
6062 done
dd4f3dd8 6063fi
dd4f3dd8
CR
6064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6065 if test $ac_cv_c_bigendian = unknown; then
6066 # See if sys/param.h defines the BYTE_ORDER macro.
1b1fe467 6067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dd4f3dd8
CR
6068/* end confdefs.h. */
6069#include <sys/types.h>
6070 #include <sys/param.h>
6071
6072int
6073main ()
6074{
6075#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
6076 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
6077 && LITTLE_ENDIAN)
6078 bogus endian macros
6079 #endif
6080
6081 ;
6082 return 0;
6083}
6084_ACEOF
1b1fe467 6085if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 6086 # It does; now see whether it defined to BIG_ENDIAN or not.
1b1fe467 6087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 6088/* end confdefs.h. */
f73dda09 6089#include <sys/types.h>
dd4f3dd8 6090 #include <sys/param.h>
ccc6cda3 6091
f73dda09
JA
6092int
6093main ()
6094{
6095#if BYTE_ORDER != BIG_ENDIAN
dd4f3dd8
CR
6096 not big endian
6097 #endif
ccc6cda3 6098
f73dda09
JA
6099 ;
6100 return 0;
6101}
6102_ACEOF
1b1fe467 6103if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 6104 ac_cv_c_bigendian=yes
ccc6cda3 6105else
1b1fe467 6106 ac_cv_c_bigendian=no
ccc6cda3 6107fi
b709b946 6108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd4f3dd8 6109fi
dd4f3dd8
CR
6110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6111 fi
6112 if test $ac_cv_c_bigendian = unknown; then
6113 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
1b1fe467 6114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 6115/* end confdefs.h. */
dd4f3dd8
CR
6116#include <limits.h>
6117
a82a04b3
CR
6118int
6119main ()
6120{
dd4f3dd8
CR
6121#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6122 bogus endian macros
6123 #endif
6124
a82a04b3
CR
6125 ;
6126 return 0;
6127}
6128_ACEOF
1b1fe467 6129if ac_fn_c_try_compile "$LINENO"; then :
dd4f3dd8 6130 # It does; now see whether it defined to _BIG_ENDIAN or not.
1b1fe467 6131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dd4f3dd8
CR
6132/* end confdefs.h. */
6133#include <limits.h>
6134
6135int
6136main ()
6137{
6138#ifndef _BIG_ENDIAN
6139 not big endian
6140 #endif
6141
6142 ;
6143 return 0;
6144}
6145_ACEOF
1b1fe467 6146if ac_fn_c_try_compile "$LINENO"; then :
dd4f3dd8
CR
6147 ac_cv_c_bigendian=yes
6148else
1b1fe467 6149 ac_cv_c_bigendian=no
dd4f3dd8 6150fi
dd4f3dd8 6151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dd4f3dd8 6152fi
dd4f3dd8
CR
6153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6154 fi
6155 if test $ac_cv_c_bigendian = unknown; then
6156 # Compile a test program.
1b1fe467 6157 if test "$cross_compiling" = yes; then :
dd4f3dd8 6158 # Try to guess by grepping values from an object file.
1b1fe467 6159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dd4f3dd8
CR
6160/* end confdefs.h. */
6161short int ascii_mm[] =
6162 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6163 short int ascii_ii[] =
6164 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6165 int use_ascii (int i) {
6166 return ascii_mm[i] + ascii_ii[i];
6167 }
6168 short int ebcdic_ii[] =
6169 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6170 short int ebcdic_mm[] =
6171 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6172 int use_ebcdic (int i) {
6173 return ebcdic_mm[i] + ebcdic_ii[i];
6174 }
6175 extern int foo;
6176
6177int
6178main ()
6179{
6180return use_ascii (foo) == use_ebcdic (foo);
6181 ;
6182 return 0;
6183}
6184_ACEOF
1b1fe467 6185if ac_fn_c_try_compile "$LINENO"; then :
dd4f3dd8
CR
6186 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6187 ac_cv_c_bigendian=yes
6188 fi
6189 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6190 if test "$ac_cv_c_bigendian" = unknown; then
6191 ac_cv_c_bigendian=no
6192 else
6193 # finding both strings is unlikely to happen, but who knows?
6194 ac_cv_c_bigendian=unknown
6195 fi
6196 fi
1b1fe467
CR
6197fi
6198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7175a77f 6199else
1b1fe467 6200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7610e0c5 6201/* end confdefs.h. */
b709b946 6202$ac_includes_default
f73dda09
JA
6203int
6204main ()
ccc6cda3 6205{
b709b946 6206
dd4f3dd8
CR
6207 /* Are we little or big endian? From Harbison&Steele. */
6208 union
6209 {
6210 long int l;
6211 char c[sizeof (long int)];
6212 } u;
6213 u.l = 1;
6214 return u.c[sizeof (long int) - 1] == 1;
b709b946
CR
6215
6216 ;
6217 return 0;
ccc6cda3 6218}
f73dda09 6219_ACEOF
1b1fe467 6220if ac_fn_c_try_run "$LINENO"; then :
abe2eb5b
CR
6221 ac_cv_c_bigendian=no
6222else
1b1fe467 6223 ac_cv_c_bigendian=yes
abe2eb5b 6224fi
1b1fe467
CR
6225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6226 conftest.$ac_objext conftest.beam conftest.$ac_ext
abe2eb5b
CR
6227fi
6228
abe2eb5b
CR
6229 fi
6230fi
1b1fe467 6231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
abe2eb5b
CR
6232$as_echo "$ac_cv_c_bigendian" >&6; }
6233 case $ac_cv_c_bigendian in #(
dd4f3dd8 6234 yes)
1b1fe467 6235 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
dd4f3dd8
CR
6236;; #(
6237 no)
6238 ;; #(
6239 universal)
af98a2a6 6240
1b1fe467 6241$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
af98a2a6
CR
6242
6243 ;; #(
dd4f3dd8 6244 *)
1b1fe467
CR
6245 as_fn_error $? "unknown endianness
6246 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
dd4f3dd8 6247 esac
ccc6cda3 6248
1b1fe467 6249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5
dd4f3dd8 6250$as_echo_n "checking for preprocessor stringizing operator... " >&6; }
1b1fe467 6251if ${ac_cv_c_stringize+:} false; then :
dd4f3dd8 6252 $as_echo_n "(cached) " >&6
ccc6cda3 6253else
1b1fe467 6254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 6255/* end confdefs.h. */
f73dda09 6256#define x(y) #y
ccc6cda3 6257
f73dda09
JA
6258char *s = x(teststring);
6259_ACEOF
6260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 6261 $EGREP "#teststring" >/dev/null 2>&1; then :
f73dda09 6262 ac_cv_c_stringize=no
ccc6cda3 6263else
f73dda09 6264 ac_cv_c_stringize=yes
ccc6cda3 6265fi
f73dda09 6266rm -f conftest*
ccc6cda3
JA
6267
6268fi
1b1fe467 6269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5
dd4f3dd8 6270$as_echo "$ac_cv_c_stringize" >&6; }
f73dda09 6271if test $ac_cv_c_stringize = yes; then
ccc6cda3 6272
1b1fe467 6273$as_echo "#define HAVE_STRINGIZE 1" >>confdefs.h
ccc6cda3
JA
6274
6275fi
6276
b709b946
CR
6277
6278
1b1fe467 6279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5
dd4f3dd8 6280$as_echo_n "checking for long double with more range or precision than double... " >&6; }
1b1fe467 6281if ${ac_cv_type_long_double_wider+:} false; then :
dd4f3dd8 6282 $as_echo_n "(cached) " >&6
ccc6cda3 6283else
1b1fe467 6284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 6285/* end confdefs.h. */
a82a04b3 6286#include <float.h>
b709b946
CR
6287 long double const a[] =
6288 {
6289 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON,
6290 LDBL_MIN, LDBL_MAX, LDBL_EPSILON
6291 };
6292 long double
6293 f (long double x)
6294 {
6295 return ((x + (unsigned long int) 10) * (-1 / x) + a[0]
6296 + (x ? f (x) : 'c'));
6297 }
6298
f73dda09
JA
6299int
6300main ()
6301{
b709b946
CR
6302static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
6303 + (DBL_MANT_DIG < LDBL_MANT_DIG)
6304 - (LDBL_MAX_EXP < DBL_MAX_EXP)
6305 - (LDBL_MANT_DIG < DBL_MANT_DIG)))
6306 && (int) LDBL_EPSILON == 0
6307 )];
0ee50808
CR
6308test_array [0] = 0;
6309return test_array [0];
a82a04b3
CR
6310
6311 ;
6312 return 0;
ccc6cda3 6313}
f73dda09 6314_ACEOF
1b1fe467 6315if ac_fn_c_try_compile "$LINENO"; then :
b709b946 6316 ac_cv_type_long_double_wider=yes
ccc6cda3 6317else
1b1fe467 6318 ac_cv_type_long_double_wider=no
f73dda09 6319fi
b709b946 6320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e624d0f7 6321fi
1b1fe467 6322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5
dd4f3dd8 6323$as_echo "$ac_cv_type_long_double_wider" >&6; }
b709b946
CR
6324 if test $ac_cv_type_long_double_wider = yes; then
6325
1b1fe467 6326$as_echo "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h
b709b946
CR
6327
6328 fi
6329
6330 ac_cv_c_long_double=$ac_cv_type_long_double_wider
6331 if test $ac_cv_c_long_double = yes; then
ccc6cda3 6332
1b1fe467 6333$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
ccc6cda3 6334
b709b946 6335 fi
ccc6cda3 6336
1b1fe467 6337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
dd4f3dd8 6338$as_echo_n "checking for function prototypes... " >&6; }
b709b946 6339if test "$ac_cv_prog_cc_c89" != no; then
1b1fe467 6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
dd4f3dd8 6341$as_echo "yes" >&6; }
ccc6cda3 6342
1b1fe467 6343$as_echo "#define PROTOTYPES 1" >>confdefs.h
ccc6cda3 6344
545f34cf 6345
1b1fe467 6346$as_echo "#define __PROTOTYPES 1" >>confdefs.h
e624d0f7 6347
e624d0f7 6348else
1b1fe467 6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 6350$as_echo "no" >&6; }
e624d0f7 6351fi
e624d0f7 6352
1b1fe467 6353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
dd4f3dd8 6354$as_echo_n "checking whether char is unsigned... " >&6; }
1b1fe467 6355if ${ac_cv_c_char_unsigned+:} false; then :
dd4f3dd8 6356 $as_echo_n "(cached) " >&6
ccc6cda3 6357else
1b1fe467 6358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 6359/* end confdefs.h. */
545f34cf
CR
6360$ac_includes_default
6361int
6362main ()
6363{
a82a04b3 6364static int test_array [1 - 2 * !(((char) -1) < 0)];
0ee50808
CR
6365test_array [0] = 0;
6366return test_array [0];
a82a04b3 6367
545f34cf
CR
6368 ;
6369 return 0;
6370}
f73dda09 6371_ACEOF
1b1fe467 6372if ac_fn_c_try_compile "$LINENO"; then :
545f34cf 6373 ac_cv_c_char_unsigned=no
f73dda09 6374else
1b1fe467 6375 ac_cv_c_char_unsigned=yes
5e13499c 6376fi
b709b946 6377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e13499c 6378fi
1b1fe467 6379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
dd4f3dd8 6380$as_echo "$ac_cv_c_char_unsigned" >&6; }
5e13499c 6381if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
1b1fe467 6382 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
5e13499c 6383
a927e029
CR
6384fi
6385
1b1fe467 6386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
a927e029 6387$as_echo_n "checking for working volatile... " >&6; }
1b1fe467 6388if ${ac_cv_c_volatile+:} false; then :
a927e029
CR
6389 $as_echo_n "(cached) " >&6
6390else
1b1fe467 6391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a927e029
CR
6392/* end confdefs.h. */
6393
6394int
6395main ()
6396{
6397
6398volatile int x;
6399int * volatile y = (int *) 0;
6400return !x && !y;
6401 ;
6402 return 0;
6403}
6404_ACEOF
1b1fe467 6405if ac_fn_c_try_compile "$LINENO"; then :
a927e029
CR
6406 ac_cv_c_volatile=yes
6407else
1b1fe467 6408 ac_cv_c_volatile=no
a927e029 6409fi
a927e029
CR
6410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6411fi
1b1fe467 6412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
a927e029
CR
6413$as_echo "$ac_cv_c_volatile" >&6; }
6414if test $ac_cv_c_volatile = no; then
6415
1b1fe467 6416$as_echo "#define volatile /**/" >>confdefs.h
a927e029 6417
5e13499c
CR
6418fi
6419
1b1fe467 6420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
c1d39fb8 6421$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
1b1fe467 6422if ${ac_cv_c_restrict+:} false; then :
c1d39fb8
CR
6423 $as_echo_n "(cached) " >&6
6424else
6425 ac_cv_c_restrict=no
6426 # The order here caters to the fact that C++ does not require restrict.
6427 for ac_kw in __restrict __restrict__ _Restrict restrict; do
1b1fe467 6428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c1d39fb8
CR
6429/* end confdefs.h. */
6430typedef int * int_ptr;
6431 int foo (int_ptr $ac_kw ip) {
6432 return ip[0];
6433 }
6434int
6435main ()
6436{
6437int s[1];
6438 int * $ac_kw t = s;
6439 t[0] = 0;
6440 return foo(t)
6441 ;
6442 return 0;
6443}
6444_ACEOF
1b1fe467 6445if ac_fn_c_try_compile "$LINENO"; then :
c1d39fb8 6446 ac_cv_c_restrict=$ac_kw
c1d39fb8 6447fi
c1d39fb8
CR
6448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6449 test "$ac_cv_c_restrict" != no && break
6450 done
6451
6452fi
1b1fe467 6453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
c1d39fb8
CR
6454$as_echo "$ac_cv_c_restrict" >&6; }
6455
c1d39fb8
CR
6456 case $ac_cv_c_restrict in
6457 restrict) ;;
1b1fe467 6458 no) $as_echo "#define restrict /**/" >>confdefs.h
c1d39fb8
CR
6459 ;;
6460 *) cat >>confdefs.h <<_ACEOF
6461#define restrict $ac_cv_c_restrict
6462_ACEOF
6463 ;;
6464 esac
6465
a82a04b3
CR
6466
6467
5e13499c
CR
6468 MKINSTALLDIRS=
6469 if test -n "$ac_aux_dir"; then
6470 case "$ac_aux_dir" in
6471 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
6472 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
6473 esac
6474 fi
6475 if test -z "$MKINSTALLDIRS"; then
6476 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6477 fi
6478
a82a04b3
CR
6479
6480
1b1fe467 6481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
dd4f3dd8 6482$as_echo_n "checking whether NLS is requested... " >&6; }
b709b946 6483 # Check whether --enable-nls was given.
1b1fe467 6484if test "${enable_nls+set}" = set; then :
b709b946 6485 enableval=$enable_nls; USE_NLS=$enableval
5e13499c
CR
6486else
6487 USE_NLS=yes
b709b946
CR
6488fi
6489
1b1fe467 6490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
dd4f3dd8 6491$as_echo "$USE_NLS" >&6; }
5e13499c 6492
a82a04b3
CR
6493
6494
6495
6496
6497
5e13499c
CR
6498# Prepare PATH_SEPARATOR.
6499# The user is always right.
6500if test "${PATH_SEPARATOR+set}" != set; then
6501 echo "#! /bin/sh" >conf$$.sh
6502 echo "exit 0" >>conf$$.sh
6503 chmod +x conf$$.sh
6504 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6505 PATH_SEPARATOR=';'
6506 else
6507 PATH_SEPARATOR=:
6508 fi
6509 rm -f conf$$.sh
6510fi
6511
6512# Find out how to test for executable files. Don't use a zero-byte file,
6513# as systems may use methods other than mode bits to determine executability.
6514cat >conf$$.file <<_ASEOF
6515#! /bin/sh
6516exit 0
6517_ASEOF
6518chmod +x conf$$.file
6519if test -x conf$$.file >/dev/null 2>&1; then
6520 ac_executable_p="test -x"
6521else
6522 ac_executable_p="test -f"
6523fi
6524rm -f conf$$.file
6525
6526# Extract the first word of "msgfmt", so it can be a program name with args.
6527set dummy msgfmt; ac_word=$2
1b1fe467 6528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 6529$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 6530if ${ac_cv_path_MSGFMT+:} false; then :
dd4f3dd8 6531 $as_echo_n "(cached) " >&6
5e13499c
CR
6532else
6533 case "$MSGFMT" in
6534 [\\/]* | ?:[\\/]*)
6535 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6536 ;;
6537 *)
6538 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6539 for ac_dir in $PATH; do
6540 IFS="$ac_save_IFS"
6541 test -z "$ac_dir" && ac_dir=.
6542 for ac_exec_ext in '' $ac_executable_extensions; do
6543 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6544 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
6545 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
6546 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
6547 break 2
6548 fi
6549 fi
6550 done
6551 done
6552 IFS="$ac_save_IFS"
6553 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6554 ;;
6555esac
6556fi
6557MSGFMT="$ac_cv_path_MSGFMT"
6558if test "$MSGFMT" != ":"; then
1b1fe467 6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
dd4f3dd8 6560$as_echo "$MSGFMT" >&6; }
5e13499c 6561else
1b1fe467 6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 6563$as_echo "no" >&6; }
5e13499c
CR
6564fi
6565
6566 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6567set dummy gmsgfmt; ac_word=$2
1b1fe467 6568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 6569$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 6570if ${ac_cv_path_GMSGFMT+:} false; then :
dd4f3dd8 6571 $as_echo_n "(cached) " >&6
5e13499c
CR
6572else
6573 case $GMSGFMT in
6574 [\\/]* | ?:[\\/]*)
6575 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6576 ;;
6577 *)
a82a04b3
CR
6578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6579for as_dir in $PATH
6580do
6581 IFS=$as_save_IFS
6582 test -z "$as_dir" && as_dir=.
1b1fe467 6583 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 6584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3 6585 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
1b1fe467 6586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
6587 break 2
6588 fi
6589done
1b1fe467 6590 done
b709b946 6591IFS=$as_save_IFS
5e13499c
CR
6592
6593 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6594 ;;
6595esac
6596fi
6597GMSGFMT=$ac_cv_path_GMSGFMT
5e13499c 6598if test -n "$GMSGFMT"; then
1b1fe467 6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
dd4f3dd8 6600$as_echo "$GMSGFMT" >&6; }
5e13499c 6601else
1b1fe467 6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 6603$as_echo "no" >&6; }
5e13499c
CR
6604fi
6605
a82a04b3
CR
6606
6607
b709b946 6608
5e13499c
CR
6609# Prepare PATH_SEPARATOR.
6610# The user is always right.
6611if test "${PATH_SEPARATOR+set}" != set; then
6612 echo "#! /bin/sh" >conf$$.sh
6613 echo "exit 0" >>conf$$.sh
6614 chmod +x conf$$.sh
6615 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6616 PATH_SEPARATOR=';'
6617 else
6618 PATH_SEPARATOR=:
6619 fi
6620 rm -f conf$$.sh
6621fi
6622
6623# Find out how to test for executable files. Don't use a zero-byte file,
6624# as systems may use methods other than mode bits to determine executability.
6625cat >conf$$.file <<_ASEOF
6626#! /bin/sh
6627exit 0
6628_ASEOF
6629chmod +x conf$$.file
6630if test -x conf$$.file >/dev/null 2>&1; then
6631 ac_executable_p="test -x"
6632else
6633 ac_executable_p="test -f"
6634fi
6635rm -f conf$$.file
6636
6637# Extract the first word of "xgettext", so it can be a program name with args.
6638set dummy xgettext; ac_word=$2
1b1fe467 6639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 6640$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 6641if ${ac_cv_path_XGETTEXT+:} false; then :
dd4f3dd8 6642 $as_echo_n "(cached) " >&6
5e13499c
CR
6643else
6644 case "$XGETTEXT" in
6645 [\\/]* | ?:[\\/]*)
6646 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6647 ;;
6648 *)
6649 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6650 for ac_dir in $PATH; do
6651 IFS="$ac_save_IFS"
6652 test -z "$ac_dir" && ac_dir=.
6653 for ac_exec_ext in '' $ac_executable_extensions; do
6654 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6655 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
6656 (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
6657 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
6658 break 2
6659 fi
6660 fi
6661 done
6662 done
6663 IFS="$ac_save_IFS"
6664 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6665 ;;
6666esac
6667fi
6668XGETTEXT="$ac_cv_path_XGETTEXT"
6669if test "$XGETTEXT" != ":"; then
1b1fe467 6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
dd4f3dd8 6671$as_echo "$XGETTEXT" >&6; }
5e13499c 6672else
1b1fe467 6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 6674$as_echo "no" >&6; }
5e13499c
CR
6675fi
6676
6677 rm -f messages.po
6678
a82a04b3 6679
5e13499c
CR
6680# Prepare PATH_SEPARATOR.
6681# The user is always right.
6682if test "${PATH_SEPARATOR+set}" != set; then
6683 echo "#! /bin/sh" >conf$$.sh
6684 echo "exit 0" >>conf$$.sh
6685 chmod +x conf$$.sh
6686 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6687 PATH_SEPARATOR=';'
6688 else
6689 PATH_SEPARATOR=:
6690 fi
6691 rm -f conf$$.sh
6692fi
6693
6694# Find out how to test for executable files. Don't use a zero-byte file,
6695# as systems may use methods other than mode bits to determine executability.
6696cat >conf$$.file <<_ASEOF
6697#! /bin/sh
6698exit 0
6699_ASEOF
6700chmod +x conf$$.file
6701if test -x conf$$.file >/dev/null 2>&1; then
6702 ac_executable_p="test -x"
6703else
6704 ac_executable_p="test -f"
6705fi
6706rm -f conf$$.file
6707
6708# Extract the first word of "msgmerge", so it can be a program name with args.
6709set dummy msgmerge; ac_word=$2
1b1fe467 6710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 6711$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 6712if ${ac_cv_path_MSGMERGE+:} false; then :
dd4f3dd8 6713 $as_echo_n "(cached) " >&6
5e13499c
CR
6714else
6715 case "$MSGMERGE" in
6716 [\\/]* | ?:[\\/]*)
6717 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
6718 ;;
6719 *)
6720 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6721 for ac_dir in $PATH; do
6722 IFS="$ac_save_IFS"
6723 test -z "$ac_dir" && ac_dir=.
6724 for ac_exec_ext in '' $ac_executable_extensions; do
6725 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6726 if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
6727 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
6728 break 2
6729 fi
6730 fi
6731 done
6732 done
6733 IFS="$ac_save_IFS"
6734 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
6735 ;;
6736esac
6737fi
6738MSGMERGE="$ac_cv_path_MSGMERGE"
6739if test "$MSGMERGE" != ":"; then
1b1fe467 6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
dd4f3dd8 6741$as_echo "$MSGMERGE" >&6; }
5e13499c 6742else
1b1fe467 6743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 6744$as_echo "no" >&6; }
5e13499c
CR
6745fi
6746
a82a04b3 6747
5e13499c
CR
6748 if test "$GMSGFMT" != ":"; then
6749 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
6750 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
6751 : ;
6752 else
6753 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1b1fe467 6754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
dd4f3dd8 6755$as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
5e13499c
CR
6756 GMSGFMT=":"
6757 fi
6758 fi
6759
6760 if test "$XGETTEXT" != ":"; then
6761 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
6762 (if $XGETTEXT --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
6763 : ;
6764 else
1b1fe467 6765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
dd4f3dd8 6766$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
5e13499c
CR
6767 XGETTEXT=":"
6768 fi
6769 rm -f messages.po
6770 fi
6771
b709b946 6772 ac_config_commands="$ac_config_commands default-1"
a82a04b3 6773
5e13499c 6774
1b1fe467
CR
6775ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6776if test "x$ac_cv_type_off_t" = xyes; then :
7175a77f 6777
5e13499c
CR
6778else
6779
a82a04b3 6780cat >>confdefs.h <<_ACEOF
b709b946 6781#define off_t long int
a82a04b3 6782_ACEOF
5e13499c
CR
6783
6784fi
6785
1b1fe467
CR
6786ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6787if test "x$ac_cv_type_size_t" = xyes; then :
abe2eb5b 6788
5e13499c
CR
6789else
6790
a82a04b3 6791cat >>confdefs.h <<_ACEOF
b709b946 6792#define size_t unsigned int
a82a04b3 6793_ACEOF
5e13499c
CR
6794
6795fi
6796
6797# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6798# for constant arguments. Useless!
1b1fe467 6799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
dd4f3dd8 6800$as_echo_n "checking for working alloca.h... " >&6; }
1b1fe467 6801if ${ac_cv_working_alloca_h+:} false; then :
dd4f3dd8 6802 $as_echo_n "(cached) " >&6
5e13499c 6803else
1b1fe467 6804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 6805/* end confdefs.h. */
5e13499c
CR
6806#include <alloca.h>
6807int
6808main ()
6809{
6810char *p = (char *) alloca (2 * sizeof (int));
b709b946 6811 if (p) return 0;
5e13499c
CR
6812 ;
6813 return 0;
6814}
6815_ACEOF
1b1fe467 6816if ac_fn_c_try_link "$LINENO"; then :
5e13499c
CR
6817 ac_cv_working_alloca_h=yes
6818else
1b1fe467 6819 ac_cv_working_alloca_h=no
5e13499c 6820fi
1b1fe467
CR
6821rm -f core conftest.err conftest.$ac_objext \
6822 conftest$ac_exeext conftest.$ac_ext
5e13499c 6823fi
1b1fe467 6824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
dd4f3dd8 6825$as_echo "$ac_cv_working_alloca_h" >&6; }
5e13499c
CR
6826if test $ac_cv_working_alloca_h = yes; then
6827
1b1fe467 6828$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
5e13499c
CR
6829
6830fi
6831
1b1fe467 6832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
dd4f3dd8 6833$as_echo_n "checking for alloca... " >&6; }
1b1fe467 6834if ${ac_cv_func_alloca_works+:} false; then :
dd4f3dd8 6835 $as_echo_n "(cached) " >&6
5e13499c 6836else
1b1fe467 6837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 6838/* end confdefs.h. */
5e13499c
CR
6839#ifdef __GNUC__
6840# define alloca __builtin_alloca
6841#else
6842# ifdef _MSC_VER
6843# include <malloc.h>
6844# define alloca _alloca
6845# else
dd4f3dd8 6846# ifdef HAVE_ALLOCA_H
5e13499c
CR
6847# include <alloca.h>
6848# else
6849# ifdef _AIX
6850 #pragma alloca
6851# else
6852# ifndef alloca /* predefined by HP cc +Olibcalls */
1b1fe467 6853void *alloca (size_t);
5e13499c
CR
6854# endif
6855# endif
6856# endif
6857# endif
6858#endif
6859
6860int
6861main ()
6862{
6863char *p = (char *) alloca (1);
b709b946 6864 if (p) return 0;
5e13499c
CR
6865 ;
6866 return 0;
6867}
6868_ACEOF
1b1fe467 6869if ac_fn_c_try_link "$LINENO"; then :
5e13499c
CR
6870 ac_cv_func_alloca_works=yes
6871else
1b1fe467 6872 ac_cv_func_alloca_works=no
5e13499c 6873fi
1b1fe467
CR
6874rm -f core conftest.err conftest.$ac_objext \
6875 conftest$ac_exeext conftest.$ac_ext
5e13499c 6876fi
1b1fe467 6877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
dd4f3dd8 6878$as_echo "$ac_cv_func_alloca_works" >&6; }
5e13499c
CR
6879
6880if test $ac_cv_func_alloca_works = yes; then
6881
1b1fe467 6882$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
5e13499c
CR
6883
6884else
6885 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6886# that cause trouble. Some versions do not even contain alloca or
6887# contain a buggy version. If you still want to use their alloca,
6888# use ar to extract alloca.o from them instead of compiling alloca.c.
6889
b709b946 6890ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
5e13499c 6891
1b1fe467 6892$as_echo "#define C_ALLOCA 1" >>confdefs.h
a82a04b3 6893
545f34cf 6894
1b1fe467 6895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
dd4f3dd8 6896$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
1b1fe467 6897if ${ac_cv_os_cray+:} false; then :
dd4f3dd8 6898 $as_echo_n "(cached) " >&6
5e13499c 6899else
1b1fe467 6900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 6901/* end confdefs.h. */
b709b946 6902#if defined CRAY && ! defined CRAY2
5e13499c
CR
6903webecray
6904#else
6905wenotbecray
6906#endif
6907
6908_ACEOF
6909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 6910 $EGREP "webecray" >/dev/null 2>&1; then :
5e13499c
CR
6911 ac_cv_os_cray=yes
6912else
6913 ac_cv_os_cray=no
6914fi
6915rm -f conftest*
6916
6917fi
1b1fe467 6918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
dd4f3dd8 6919$as_echo "$ac_cv_os_cray" >&6; }
5e13499c
CR
6920if test $ac_cv_os_cray = yes; then
6921 for ac_func in _getb67 GETB67 getb67; do
dd4f3dd8 6922 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1b1fe467
CR
6923ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6924if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5e13499c 6925
1b1fe467
CR
6926cat >>confdefs.h <<_ACEOF
6927#define CRAY_STACKSEG_END $ac_func
6928_ACEOF
7175a77f 6929
1b1fe467
CR
6930 break
6931fi
7175a77f 6932
1b1fe467
CR
6933 done
6934fi
7175a77f 6935
1b1fe467 6936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7175a77f 6937$as_echo_n "checking stack direction for C alloca... " >&6; }
1b1fe467 6938if ${ac_cv_c_stack_direction+:} false; then :
7175a77f
CR
6939 $as_echo_n "(cached) " >&6
6940else
1b1fe467 6941 if test "$cross_compiling" = yes; then :
7175a77f
CR
6942 ac_cv_c_stack_direction=0
6943else
1b1fe467 6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
6945/* end confdefs.h. */
6946$ac_includes_default
6947int
0ee50808 6948find_stack_direction (int *addr, int depth)
7175a77f 6949{
0ee50808
CR
6950 int dir, dummy = 0;
6951 if (! addr)
6952 addr = &dummy;
6953 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6954 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6955 return dir + dummy;
7175a77f
CR
6956}
6957
6958int
0ee50808 6959main (int argc, char **argv)
5e13499c 6960{
0ee50808 6961 return find_stack_direction (0, argc + !argv + 20) < 0;
5e13499c
CR
6962}
6963_ACEOF
1b1fe467 6964if ac_fn_c_try_run "$LINENO"; then :
5e13499c
CR
6965 ac_cv_c_stack_direction=1
6966else
1b1fe467 6967 ac_cv_c_stack_direction=-1
5e13499c 6968fi
1b1fe467
CR
6969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6970 conftest.$ac_objext conftest.beam conftest.$ac_ext
5e13499c 6971fi
b709b946 6972
5e13499c 6973fi
1b1fe467 6974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
dd4f3dd8 6975$as_echo "$ac_cv_c_stack_direction" >&6; }
a82a04b3 6976cat >>confdefs.h <<_ACEOF
5e13499c 6977#define STACK_DIRECTION $ac_cv_c_stack_direction
a82a04b3
CR
6978_ACEOF
6979
5e13499c
CR
6980
6981fi
6982
a82a04b3
CR
6983
6984
7175a77f 6985
1b1fe467
CR
6986 for ac_header in $ac_header_list
6987do :
6988 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6989ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6990"
6991if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
2dead0c4
CR
6992 cat >>confdefs.h <<_ACEOF
6993#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6994_ACEOF
6995
e3db237e 6996fi
2dead0c4
CR
6997
6998done
6999
7000
7001
7002
7003
7004
7005
7006
1b1fe467
CR
7007for ac_func in getpagesize
7008do :
7009 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7010if test "x$ac_cv_func_getpagesize" = xyes; then :
2dead0c4 7011 cat >>confdefs.h <<_ACEOF
1b1fe467 7012#define HAVE_GETPAGESIZE 1
a82a04b3 7013_ACEOF
5e13499c
CR
7014
7015fi
7016done
7017
1b1fe467 7018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
dd4f3dd8 7019$as_echo_n "checking for working mmap... " >&6; }
1b1fe467 7020if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
dd4f3dd8 7021 $as_echo_n "(cached) " >&6
5e13499c 7022else
1b1fe467 7023 if test "$cross_compiling" = yes; then :
5e13499c
CR
7024 ac_cv_func_mmap_fixed_mapped=no
7025else
1b1fe467 7026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 7027/* end confdefs.h. */
5e13499c 7028$ac_includes_default
a82a04b3
CR
7029/* malloc might have been renamed as rpl_malloc. */
7030#undef malloc
7031
5e13499c
CR
7032/* Thanks to Mike Haertel and Jim Avera for this test.
7033 Here is a matrix of mmap possibilities:
7034 mmap private not fixed
7035 mmap private fixed at somewhere currently unmapped
7036 mmap private fixed at somewhere already mapped
7037 mmap shared not fixed
7038 mmap shared fixed at somewhere currently unmapped
7039 mmap shared fixed at somewhere already mapped
7040 For private mappings, we should verify that changes cannot be read()
7041 back from the file, nor mmap's back from the file at a different
7042 address. (There have been systems where private was not correctly
7043 implemented like the infamous i386 svr4.0, and systems where the
7044 VM page cache was not coherent with the file system buffer cache
7045 like early versions of FreeBSD and possibly contemporary NetBSD.)
7046 For shared mappings, we should conversely verify that changes get
a82a04b3 7047 propagated back to all the places they're supposed to be.
5e13499c
CR
7048
7049 Grep wants private fixed already mapped.
7050 The main things grep needs to know about mmap are:
7051 * does it exist and is it safe to write into the mmap'd area
7052 * how to use it (BSD variants) */
7053
7054#include <fcntl.h>
7055#include <sys/mman.h>
7056
dd4f3dd8 7057#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
5e13499c
CR
7058char *malloc ();
7059#endif
7060
7061/* This mess was copied from the GNU getpagesize.h. */
dd4f3dd8 7062#ifndef HAVE_GETPAGESIZE
5e13499c
CR
7063# ifdef _SC_PAGESIZE
7064# define getpagesize() sysconf(_SC_PAGESIZE)
7065# else /* no _SC_PAGESIZE */
dd4f3dd8 7066# ifdef HAVE_SYS_PARAM_H
5e13499c
CR
7067# include <sys/param.h>
7068# ifdef EXEC_PAGESIZE
7069# define getpagesize() EXEC_PAGESIZE
7070# else /* no EXEC_PAGESIZE */
7071# ifdef NBPG
7072# define getpagesize() NBPG * CLSIZE
7073# ifndef CLSIZE
7074# define CLSIZE 1
7075# endif /* no CLSIZE */
7076# else /* no NBPG */
7077# ifdef NBPC
7078# define getpagesize() NBPC
7079# else /* no NBPC */
7080# ifdef PAGESIZE
7081# define getpagesize() PAGESIZE
7082# endif /* PAGESIZE */
7083# endif /* no NBPC */
7084# endif /* no NBPG */
7085# endif /* no EXEC_PAGESIZE */
7086# else /* no HAVE_SYS_PARAM_H */
7087# define getpagesize() 8192 /* punt totally */
7088# endif /* no HAVE_SYS_PARAM_H */
7089# endif /* no _SC_PAGESIZE */
7090
7091#endif /* no HAVE_GETPAGESIZE */
7092
7093int
7094main ()
7095{
7096 char *data, *data2, *data3;
1b1fe467 7097 const char *cdata2;
5e13499c 7098 int i, pagesize;
1b1fe467 7099 int fd, fd2;
5e13499c
CR
7100
7101 pagesize = getpagesize ();
7102
7103 /* First, make a file with some known garbage in it. */
7104 data = (char *) malloc (pagesize);
7105 if (!data)
b709b946 7106 return 1;
5e13499c
CR
7107 for (i = 0; i < pagesize; ++i)
7108 *(data + i) = rand ();
7109 umask (0);
7110 fd = creat ("conftest.mmap", 0600);
7111 if (fd < 0)
1b1fe467 7112 return 2;
5e13499c 7113 if (write (fd, data, pagesize) != pagesize)
1b1fe467 7114 return 3;
5e13499c
CR
7115 close (fd);
7116
1b1fe467
CR
7117 /* Next, check that the tail of a page is zero-filled. File must have
7118 non-zero length, otherwise we risk SIGBUS for entire page. */
7119 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7120 if (fd2 < 0)
7121 return 4;
7122 cdata2 = "";
7123 if (write (fd2, cdata2, 1) != 1)
7124 return 5;
7125 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7126 if (data2 == MAP_FAILED)
7127 return 6;
7128 for (i = 0; i < pagesize; ++i)
7129 if (*(data2 + i))
7130 return 7;
7131 close (fd2);
7132 if (munmap (data2, pagesize))
7133 return 8;
7134
5e13499c
CR
7135 /* Next, try to mmap the file at a fixed address which already has
7136 something else allocated at it. If we can, also make sure that
7137 we see the same garbage. */
7138 fd = open ("conftest.mmap", O_RDWR);
7139 if (fd < 0)
1b1fe467 7140 return 9;
5e13499c 7141 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5e4a95c7 7142 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1b1fe467 7143 return 10;
5e13499c
CR
7144 for (i = 0; i < pagesize; ++i)
7145 if (*(data + i) != *(data2 + i))
1b1fe467 7146 return 11;
5e13499c
CR
7147
7148 /* Finally, make sure that changes to the mapped area do not
7149 percolate back to the file as seen by read(). (This is a bug on
7150 some variants of i386 svr4.0.) */
7151 for (i = 0; i < pagesize; ++i)
7152 *(data2 + i) = *(data2 + i) + 1;
7153 data3 = (char *) malloc (pagesize);
7154 if (!data3)
1b1fe467 7155 return 12;
5e13499c 7156 if (read (fd, data3, pagesize) != pagesize)
1b1fe467 7157 return 13;
5e13499c
CR
7158 for (i = 0; i < pagesize; ++i)
7159 if (*(data + i) != *(data3 + i))
1b1fe467 7160 return 14;
5e13499c 7161 close (fd);
b709b946 7162 return 0;
5e13499c
CR
7163}
7164_ACEOF
1b1fe467 7165if ac_fn_c_try_run "$LINENO"; then :
5e13499c
CR
7166 ac_cv_func_mmap_fixed_mapped=yes
7167else
1b1fe467 7168 ac_cv_func_mmap_fixed_mapped=no
5e13499c 7169fi
1b1fe467
CR
7170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7171 conftest.$ac_objext conftest.beam conftest.$ac_ext
5e13499c 7172fi
b709b946 7173
5e13499c 7174fi
1b1fe467 7175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
dd4f3dd8 7176$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
5e13499c
CR
7177if test $ac_cv_func_mmap_fixed_mapped = yes; then
7178
1b1fe467 7179$as_echo "#define HAVE_MMAP 1" >>confdefs.h
5e13499c
CR
7180
7181fi
1b1fe467 7182rm -f conftest.mmap conftest.txt
5e13499c 7183
a82a04b3 7184
1b1fe467 7185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
dd4f3dd8 7186$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
1b1fe467 7187if ${ac_cv_gnu_library_2_1+:} false; then :
dd4f3dd8 7188 $as_echo_n "(cached) " >&6
5e13499c 7189else
1b1fe467 7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 7191/* end confdefs.h. */
5e13499c
CR
7192
7193#include <features.h>
7194#ifdef __GNU_LIBRARY__
7195 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
7196 Lucky GNU user
7197 #endif
7198#endif
7199
7200_ACEOF
7201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 7202 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
5e13499c
CR
7203 ac_cv_gnu_library_2_1=yes
7204else
7205 ac_cv_gnu_library_2_1=no
7206fi
7207rm -f conftest*
7208
a82a04b3
CR
7209
7210
5e13499c 7211fi
1b1fe467 7212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
dd4f3dd8 7213$as_echo "$ac_cv_gnu_library_2_1" >&6; }
5e13499c
CR
7214
7215 GLIBC21="$ac_cv_gnu_library_2_1"
7216
a82a04b3
CR
7217
7218
7219
1b1fe467 7220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5
dd4f3dd8 7221$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
1b1fe467 7222if ${gt_cv_int_divbyzero_sigfpe+:} false; then :
dd4f3dd8 7223 $as_echo_n "(cached) " >&6
5e13499c
CR
7224else
7225
1b1fe467 7226 if test "$cross_compiling" = yes; then :
5e13499c
CR
7227
7228 # Guess based on the CPU.
7229 case "$host_cpu" in
7230 alpha* | i3456786 | m68k | s390*)
7231 gt_cv_int_divbyzero_sigfpe="guessing yes";;
7232 *)
7233 gt_cv_int_divbyzero_sigfpe="guessing no";;
7234 esac
7235
7236else
1b1fe467 7237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 7238/* end confdefs.h. */
5e13499c
CR
7239
7240#include <stdlib.h>
7241#include <signal.h>
7242
7243static void
7244#ifdef __cplusplus
7245sigfpe_handler (int sig)
7246#else
7247sigfpe_handler (sig) int sig;
7248#endif
7249{
7250 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
7251 exit (sig != SIGFPE);
7252}
7253
7254int x = 1;
7255int y = 0;
7256int z;
7257int nan;
7258
7259int main ()
7260{
7261 signal (SIGFPE, sigfpe_handler);
7262/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
7263#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
7264 signal (SIGTRAP, sigfpe_handler);
7265#endif
7266/* Linux/SPARC yields signal SIGILL. */
7267#if defined (__sparc__) && defined (__linux__)
7268 signal (SIGILL, sigfpe_handler);
7269#endif
7270
7271 z = x / y;
7272 nan = y / y;
7273 exit (1);
7274}
7275
7276_ACEOF
1b1fe467 7277if ac_fn_c_try_run "$LINENO"; then :
7175a77f
CR
7278 gt_cv_int_divbyzero_sigfpe=yes
7279else
1b1fe467 7280 gt_cv_int_divbyzero_sigfpe=no
7175a77f 7281fi
1b1fe467
CR
7282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7283 conftest.$ac_objext conftest.beam conftest.$ac_ext
7175a77f
CR
7284fi
7285
7286
5e13499c 7287fi
1b1fe467 7288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5
dd4f3dd8 7289$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; }
5e13499c
CR
7290 case "$gt_cv_int_divbyzero_sigfpe" in
7291 *yes) value=1;;
7292 *) value=0;;
7293 esac
7294
a82a04b3 7295cat >>confdefs.h <<_ACEOF
5e13499c 7296#define INTDIV0_RAISES_SIGFPE $value
a82a04b3
CR
7297_ACEOF
7298
545f34cf 7299
a82a04b3 7300
1b1fe467 7301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
dd4f3dd8 7302$as_echo_n "checking for inttypes.h... " >&6; }
1b1fe467 7303if ${jm_ac_cv_header_inttypes_h+:} false; then :
dd4f3dd8 7304 $as_echo_n "(cached) " >&6
5e13499c 7305else
1b1fe467 7306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 7307/* end confdefs.h. */
5e13499c
CR
7308#include <sys/types.h>
7309#include <inttypes.h>
7310int
7311main ()
7312{
7313uintmax_t i = (uintmax_t) -1;
7314 ;
7315 return 0;
7316}
7317_ACEOF
1b1fe467 7318if ac_fn_c_try_compile "$LINENO"; then :
5e13499c
CR
7319 jm_ac_cv_header_inttypes_h=yes
7320else
1b1fe467 7321 jm_ac_cv_header_inttypes_h=no
5e13499c 7322fi
b709b946 7323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e13499c 7324fi
1b1fe467 7325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_inttypes_h" >&5
dd4f3dd8 7326$as_echo "$jm_ac_cv_header_inttypes_h" >&6; }
5e13499c
CR
7327 if test $jm_ac_cv_header_inttypes_h = yes; then
7328
a82a04b3 7329cat >>confdefs.h <<_ACEOF
5e13499c 7330#define HAVE_INTTYPES_H_WITH_UINTMAX 1
a82a04b3 7331_ACEOF
5e13499c
CR
7332
7333 fi
7334
a82a04b3 7335
1b1fe467 7336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
dd4f3dd8 7337$as_echo_n "checking for stdint.h... " >&6; }
1b1fe467 7338if ${jm_ac_cv_header_stdint_h+:} false; then :
dd4f3dd8 7339 $as_echo_n "(cached) " >&6
5e13499c 7340else
1b1fe467 7341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 7342/* end confdefs.h. */
5e13499c
CR
7343#include <sys/types.h>
7344#include <stdint.h>
7345int
7346main ()
7347{
7348uintmax_t i = (uintmax_t) -1;
7349 ;
7350 return 0;
7351}
7352_ACEOF
1b1fe467 7353if ac_fn_c_try_compile "$LINENO"; then :
abe2eb5b
CR
7354 jm_ac_cv_header_stdint_h=yes
7355else
1b1fe467 7356 jm_ac_cv_header_stdint_h=no
7610e0c5 7357fi
abe2eb5b
CR
7358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7359fi
1b1fe467 7360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_stdint_h" >&5
7610e0c5 7361$as_echo "$jm_ac_cv_header_stdint_h" >&6; }
5e13499c
CR
7362 if test $jm_ac_cv_header_stdint_h = yes; then
7363
a82a04b3 7364cat >>confdefs.h <<_ACEOF
5e13499c 7365#define HAVE_STDINT_H_WITH_UINTMAX 1
a82a04b3 7366_ACEOF
5e13499c
CR
7367
7368 fi
7369
a82a04b3 7370
1b1fe467 7371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5
dd4f3dd8 7372$as_echo_n "checking for unsigned long long... " >&6; }
1b1fe467 7373if ${ac_cv_type_unsigned_long_long+:} false; then :
dd4f3dd8 7374 $as_echo_n "(cached) " >&6
5e13499c 7375else
1b1fe467 7376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 7377/* end confdefs.h. */
5e13499c
CR
7378unsigned long long ull = 1; int i = 63;
7379int
7380main ()
7381{
7382unsigned long long ullmax = (unsigned long long) -1;
7383 return ull << i | ull >> i | ullmax / ull | ullmax % ull;
7384 ;
7385 return 0;
7386}
7387_ACEOF
1b1fe467 7388if ac_fn_c_try_link "$LINENO"; then :
e3db237e 7389 ac_cv_type_unsigned_long_long=yes
5e13499c 7390else
1b1fe467 7391 ac_cv_type_unsigned_long_long=no
5e13499c 7392fi
1b1fe467
CR
7393rm -f core conftest.err conftest.$ac_objext \
7394 conftest$ac_exeext conftest.$ac_ext
5e13499c 7395fi
1b1fe467 7396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long" >&5
dd4f3dd8 7397$as_echo "$ac_cv_type_unsigned_long_long" >&6; }
5e13499c
CR
7398 if test $ac_cv_type_unsigned_long_long = yes; then
7399
1b1fe467 7400$as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h
5e13499c
CR
7401
7402 fi
7403
a82a04b3
CR
7404
7405
7406
5e13499c
CR
7407 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
7408
7409 test $ac_cv_type_unsigned_long_long = yes \
7410 && ac_type='unsigned long long' \
7411 || ac_type='unsigned long'
7412
a82a04b3 7413cat >>confdefs.h <<_ACEOF
5e13499c 7414#define uintmax_t $ac_type
a82a04b3 7415_ACEOF
5e13499c
CR
7416
7417 else
7418
1b1fe467 7419$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
5e13499c
CR
7420
7421 fi
7422
a82a04b3 7423
1b1fe467 7424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
dd4f3dd8 7425$as_echo_n "checking for inttypes.h... " >&6; }
1b1fe467 7426if ${gt_cv_header_inttypes_h+:} false; then :
dd4f3dd8 7427 $as_echo_n "(cached) " >&6
5e13499c
CR
7428else
7429
1b1fe467 7430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 7431/* end confdefs.h. */
5e13499c
CR
7432#include <sys/types.h>
7433#include <inttypes.h>
7434int
7435main ()
7436{
7437
7438 ;
7439 return 0;
7440}
7441_ACEOF
1b1fe467 7442if ac_fn_c_try_compile "$LINENO"; then :
5e13499c
CR
7443 gt_cv_header_inttypes_h=yes
7444else
1b1fe467 7445 gt_cv_header_inttypes_h=no
5e13499c 7446fi
b709b946 7447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e13499c
CR
7448
7449fi
1b1fe467 7450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_header_inttypes_h" >&5
dd4f3dd8 7451$as_echo "$gt_cv_header_inttypes_h" >&6; }
5e13499c
CR
7452 if test $gt_cv_header_inttypes_h = yes; then
7453
a82a04b3 7454cat >>confdefs.h <<_ACEOF
5e13499c 7455#define HAVE_INTTYPES_H 1
a82a04b3 7456_ACEOF
5e13499c
CR
7457
7458 fi
7459
a82a04b3
CR
7460
7461
5e13499c 7462 if test $gt_cv_header_inttypes_h = yes; then
1b1fe467 7463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
dd4f3dd8 7464$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
1b1fe467 7465if ${gt_cv_inttypes_pri_broken+:} false; then :
dd4f3dd8 7466 $as_echo_n "(cached) " >&6
5e13499c
CR
7467else
7468
1b1fe467 7469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 7470/* end confdefs.h. */
5e13499c
CR
7471#include <inttypes.h>
7472#ifdef PRId32
7473char *p = PRId32;
7474#endif
7475
7476int
7477main ()
7478{
7479
7480 ;
7481 return 0;
7482}
7483_ACEOF
1b1fe467 7484if ac_fn_c_try_compile "$LINENO"; then :
2e4498b3
CR
7485 gt_cv_inttypes_pri_broken=no
7486else
1b1fe467 7487 gt_cv_inttypes_pri_broken=yes
5e13499c 7488fi
b709b946 7489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e13499c
CR
7490
7491fi
1b1fe467 7492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
dd4f3dd8 7493$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
5e13499c
CR
7494 fi
7495 if test "$gt_cv_inttypes_pri_broken" = yes; then
7496
a82a04b3 7497cat >>confdefs.h <<_ACEOF
5e13499c 7498#define PRI_MACROS_BROKEN 1
a82a04b3 7499_ACEOF
5e13499c
CR
7500
7501 fi
7502
a82a04b3 7503
5e13499c
CR
7504 if test "X$prefix" = "XNONE"; then
7505 acl_final_prefix="$ac_default_prefix"
7506 else
7507 acl_final_prefix="$prefix"
7508 fi
7509 if test "X$exec_prefix" = "XNONE"; then
7510 acl_final_exec_prefix='${prefix}'
7511 else
7512 acl_final_exec_prefix="$exec_prefix"
7513 fi
7514 acl_save_prefix="$prefix"
7515 prefix="$acl_final_prefix"
7516 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7517 prefix="$acl_save_prefix"
7518
a82a04b3 7519
b709b946 7520# Check whether --with-gnu-ld was given.
1b1fe467 7521if test "${with_gnu_ld+set}" = set; then :
b709b946 7522 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5e13499c
CR
7523else
7524 with_gnu_ld=no
b709b946
CR
7525fi
7526
5e13499c
CR
7527# Prepare PATH_SEPARATOR.
7528# The user is always right.
7529if test "${PATH_SEPARATOR+set}" != set; then
7530 echo "#! /bin/sh" >conf$$.sh
7531 echo "exit 0" >>conf$$.sh
7532 chmod +x conf$$.sh
7533 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7534 PATH_SEPARATOR=';'
7535 else
7536 PATH_SEPARATOR=:
7537 fi
7538 rm -f conf$$.sh
7539fi
7540ac_prog=ld
7541if test "$GCC" = yes; then
7542 # Check if gcc -print-prog-name=ld gives a path.
1b1fe467 7543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
dd4f3dd8 7544$as_echo_n "checking for ld used by GCC... " >&6; }
5e13499c
CR
7545 case $host in
7546 *-*-mingw*)
7547 # gcc leaves a trailing carriage return which upsets mingw
7548 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7549 *)
7550 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7551 esac
7552 case $ac_prog in
7553 # Accept absolute paths.
7554 [\\/]* | [A-Za-z]:[\\/]*)
7555 re_direlt='/[^/][^/]*/\.\./'
7556 # Canonicalize the path of ld
7557 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7558 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7559 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7560 done
7561 test -z "$LD" && LD="$ac_prog"
7562 ;;
7563 "")
7564 # If it fails, then pretend we aren't using GCC.
7565 ac_prog=ld
7566 ;;
7567 *)
7568 # If it is relative, then search for the first ld in PATH.
7569 with_gnu_ld=unknown
7570 ;;
7571 esac
7572elif test "$with_gnu_ld" = yes; then
1b1fe467 7573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
dd4f3dd8 7574$as_echo_n "checking for GNU ld... " >&6; }
5e13499c 7575else
1b1fe467 7576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
dd4f3dd8 7577$as_echo_n "checking for non-GNU ld... " >&6; }
5e13499c 7578fi
1b1fe467 7579if ${acl_cv_path_LD+:} false; then :
dd4f3dd8 7580 $as_echo_n "(cached) " >&6
5e13499c
CR
7581else
7582 if test -z "$LD"; then
7583 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7584 for ac_dir in $PATH; do
7585 test -z "$ac_dir" && ac_dir=.
7586 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7587 acl_cv_path_LD="$ac_dir/$ac_prog"
7588 # Check to see if the program is GNU ld. I'd rather use --version,
7589 # but apparently some GNU ld's only accept -v.
7590 # Break only if it was the GNU/non-GNU ld that we prefer.
7591 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7592 test "$with_gnu_ld" != no && break
7593 else
7594 test "$with_gnu_ld" != yes && break
7595 fi
7596 fi
7597 done
7598 IFS="$ac_save_ifs"
7599else
7600 acl_cv_path_LD="$LD" # Let the user override the test with a path.
7601fi
7602fi
7603
7604LD="$acl_cv_path_LD"
7605if test -n "$LD"; then
1b1fe467 7606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
dd4f3dd8 7607$as_echo "$LD" >&6; }
5e13499c 7608else
1b1fe467 7609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 7610$as_echo "no" >&6; }
5e13499c 7611fi
1b1fe467
CR
7612test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
dd4f3dd8 7614$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
1b1fe467 7615if ${acl_cv_prog_gnu_ld+:} false; then :
dd4f3dd8 7616 $as_echo_n "(cached) " >&6
5e13499c
CR
7617else
7618 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7619if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7620 acl_cv_prog_gnu_ld=yes
7621else
7622 acl_cv_prog_gnu_ld=no
7623fi
7624fi
1b1fe467 7625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
dd4f3dd8 7626$as_echo "$acl_cv_prog_gnu_ld" >&6; }
5e13499c
CR
7627with_gnu_ld=$acl_cv_prog_gnu_ld
7628
a82a04b3
CR
7629
7630
1b1fe467 7631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
dd4f3dd8 7632$as_echo_n "checking for shared library run path origin... " >&6; }
1b1fe467 7633if ${acl_cv_rpath+:} false; then :
dd4f3dd8 7634 $as_echo_n "(cached) " >&6
5e13499c
CR
7635else
7636
7637 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7638 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7639 . ./conftest.sh
7640 rm -f ./conftest.sh
7641 acl_cv_rpath=done
7642
7643fi
1b1fe467 7644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
dd4f3dd8 7645$as_echo "$acl_cv_rpath" >&6; }
5e13499c
CR
7646 wl="$acl_cv_wl"
7647 libext="$acl_cv_libext"
7648 shlibext="$acl_cv_shlibext"
7649 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7650 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7651 hardcode_direct="$acl_cv_hardcode_direct"
7652 hardcode_minus_L="$acl_cv_hardcode_minus_L"
b709b946 7653 # Check whether --enable-rpath was given.
1b1fe467 7654if test "${enable_rpath+set}" = set; then :
b709b946 7655 enableval=$enable_rpath; :
5e13499c
CR
7656else
7657 enable_rpath=yes
b709b946
CR
7658fi
7659
5e13499c 7660
a82a04b3
CR
7661
7662
7663
7664
7665
7666
5e13499c
CR
7667 use_additional=yes
7668
7669 acl_save_prefix="$prefix"
7670 prefix="$acl_final_prefix"
7671 acl_save_exec_prefix="$exec_prefix"
7672 exec_prefix="$acl_final_exec_prefix"
7673
7674 eval additional_includedir=\"$includedir\"
7675 eval additional_libdir=\"$libdir\"
7676
7677 exec_prefix="$acl_save_exec_prefix"
7678 prefix="$acl_save_prefix"
7679
a82a04b3 7680
b709b946 7681# Check whether --with-libiconv-prefix was given.
1b1fe467 7682if test "${with_libiconv_prefix+set}" = set; then :
b709b946 7683 withval=$with_libiconv_prefix;
5e13499c
CR
7684 if test "X$withval" = "Xno"; then
7685 use_additional=no
7686 else
7687 if test "X$withval" = "X"; then
7688
7689 acl_save_prefix="$prefix"
7690 prefix="$acl_final_prefix"
7691 acl_save_exec_prefix="$exec_prefix"
7692 exec_prefix="$acl_final_exec_prefix"
7693
7694 eval additional_includedir=\"$includedir\"
7695 eval additional_libdir=\"$libdir\"
7696
7697 exec_prefix="$acl_save_exec_prefix"
7698 prefix="$acl_save_prefix"
7699
7700 else
7701 additional_includedir="$withval/include"
7702 additional_libdir="$withval/lib"
7703 fi
7704 fi
7705
b709b946
CR
7706fi
7707
5e13499c
CR
7708 LIBICONV=
7709 LTLIBICONV=
7710 INCICONV=
7711 rpathdirs=
7712 ltrpathdirs=
7713 names_already_handled=
7714 names_next_round='iconv '
7715 while test -n "$names_next_round"; do
7716 names_this_round="$names_next_round"
7717 names_next_round=
7718 for name in $names_this_round; do
7719 already_handled=
7720 for n in $names_already_handled; do
7721 if test "$n" = "$name"; then
7722 already_handled=yes
7723 break
7724 fi
7725 done
7726 if test -z "$already_handled"; then
7727 names_already_handled="$names_already_handled $name"
7728 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7729 eval value=\"\$HAVE_LIB$uppername\"
7730 if test -n "$value"; then
7731 if test "$value" = yes; then
7732 eval value=\"\$LIB$uppername\"
7733 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7734 eval value=\"\$LTLIB$uppername\"
7735 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7736 else
7737 :
7738 fi
7739 else
7740 found_dir=
7741 found_la=
7742 found_so=
7743 found_a=
7744 if test $use_additional = yes; then
f4f5e1c2 7745 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
5e13499c
CR
7746 found_dir="$additional_libdir"
7747 found_so="$additional_libdir/lib$name.$shlibext"
7748 if test -f "$additional_libdir/lib$name.la"; then
7749 found_la="$additional_libdir/lib$name.la"
7750 fi
7751 else
7752 if test -f "$additional_libdir/lib$name.$libext"; then
7753 found_dir="$additional_libdir"
7754 found_a="$additional_libdir/lib$name.$libext"
7755 if test -f "$additional_libdir/lib$name.la"; then
7756 found_la="$additional_libdir/lib$name.la"
7757 fi
7758 fi
7759 fi
7760 fi
7761 if test "X$found_dir" = "X"; then
7762 for x in $LDFLAGS $LTLIBICONV; do
7763
7764 acl_save_prefix="$prefix"
7765 prefix="$acl_final_prefix"
7766 acl_save_exec_prefix="$exec_prefix"
7767 exec_prefix="$acl_final_exec_prefix"
7768 eval x=\"$x\"
7769 exec_prefix="$acl_save_exec_prefix"
7770 prefix="$acl_save_prefix"
7771
7772 case "$x" in
7773 -L*)
7774 dir=`echo "X$x" | sed -e 's/^X-L//'`
f4f5e1c2 7775 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
5e13499c
CR
7776 found_dir="$dir"
7777 found_so="$dir/lib$name.$shlibext"
7778 if test -f "$dir/lib$name.la"; then
7779 found_la="$dir/lib$name.la"
7780 fi
7781 else
7782 if test -f "$dir/lib$name.$libext"; then
7783 found_dir="$dir"
7784 found_a="$dir/lib$name.$libext"
7785 if test -f "$dir/lib$name.la"; then
7786 found_la="$dir/lib$name.la"
7787 fi
7788 fi
7789 fi
7790 ;;
7791 esac
7792 if test "X$found_dir" != "X"; then
7793 break
7794 fi
7795 done
7796 fi
7797 if test "X$found_dir" != "X"; then
7798 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7799 if test "X$found_so" != "X"; then
7800 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7801 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7802 else
7803 haveit=
7804 for x in $ltrpathdirs; do
7805 if test "X$x" = "X$found_dir"; then
7806 haveit=yes
7807 break
7808 fi
7809 done
7810 if test -z "$haveit"; then
7811 ltrpathdirs="$ltrpathdirs $found_dir"
7812 fi
7813 if test "$hardcode_direct" = yes; then
7814 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7815 else
7816 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7817 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7818 haveit=
7819 for x in $rpathdirs; do
7820 if test "X$x" = "X$found_dir"; then
7821 haveit=yes
7822 break
7823 fi
7824 done
7825 if test -z "$haveit"; then
7826 rpathdirs="$rpathdirs $found_dir"
7827 fi
7828 else
7829 haveit=
7830 for x in $LDFLAGS $LIBICONV; do
7831
7832 acl_save_prefix="$prefix"
7833 prefix="$acl_final_prefix"
7834 acl_save_exec_prefix="$exec_prefix"
7835 exec_prefix="$acl_final_exec_prefix"
7836 eval x=\"$x\"
7837 exec_prefix="$acl_save_exec_prefix"
7838 prefix="$acl_save_prefix"
7839
7840 if test "X$x" = "X-L$found_dir"; then
7841 haveit=yes
7842 break
7843 fi
7844 done
7845 if test -z "$haveit"; then
7846 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7847 fi
7848 if test "$hardcode_minus_L" != no; then
7849 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7850 else
7851 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7852 fi
7853 fi
7854 fi
7855 fi
7856 else
7857 if test "X$found_a" != "X"; then
7858 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7859 else
7860 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7861 fi
7862 fi
7863 additional_includedir=
7864 case "$found_dir" in
7865 */lib | */lib/)
7866 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7867 additional_includedir="$basedir/include"
7868 ;;
7869 esac
7870 if test "X$additional_includedir" != "X"; then
7871 if test "X$additional_includedir" != "X/usr/include"; then
7872 haveit=
7873 if test "X$additional_includedir" = "X/usr/local/include"; then
7874 if test -n "$GCC"; then
7875 case $host_os in
7876 linux*) haveit=yes;;
7877 esac
7878 fi
7879 fi
7880 if test -z "$haveit"; then
7881 for x in $CPPFLAGS $INCICONV; do
7882
7883 acl_save_prefix="$prefix"
7884 prefix="$acl_final_prefix"
7885 acl_save_exec_prefix="$exec_prefix"
7886 exec_prefix="$acl_final_exec_prefix"
7887 eval x=\"$x\"
7888 exec_prefix="$acl_save_exec_prefix"
7889 prefix="$acl_save_prefix"
7890
7891 if test "X$x" = "X-I$additional_includedir"; then
7892 haveit=yes
7893 break
7894 fi
7895 done
7896 if test -z "$haveit"; then
7897 if test -d "$additional_includedir"; then
7898 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7899 fi
7900 fi
7901 fi
7902 fi
7903 fi
7904 if test -n "$found_la"; then
7905 save_libdir="$libdir"
7906 case "$found_la" in
7907 */* | *\\*) . "$found_la" ;;
7908 *) . "./$found_la" ;;
7909 esac
7910 libdir="$save_libdir"
7911 for dep in $dependency_libs; do
7912 case "$dep" in
7913 -L*)
7914 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7915 if test "X$additional_libdir" != "X/usr/lib"; then
7916 haveit=
7917 if test "X$additional_libdir" = "X/usr/local/lib"; then
7918 if test -n "$GCC"; then
7919 case $host_os in
7920 linux*) haveit=yes;;
7921 esac
7922 fi
7923 fi
7924 if test -z "$haveit"; then
7925 haveit=
7926 for x in $LDFLAGS $LIBICONV; do
7927
7928 acl_save_prefix="$prefix"
7929 prefix="$acl_final_prefix"
7930 acl_save_exec_prefix="$exec_prefix"
7931 exec_prefix="$acl_final_exec_prefix"
7932 eval x=\"$x\"
7933 exec_prefix="$acl_save_exec_prefix"
7934 prefix="$acl_save_prefix"
7935
7936 if test "X$x" = "X-L$additional_libdir"; then
7937 haveit=yes
7938 break
7939 fi
7940 done
7941 if test -z "$haveit"; then
7942 if test -d "$additional_libdir"; then
7943 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7944 fi
7945 fi
7946 haveit=
7947 for x in $LDFLAGS $LTLIBICONV; do
7948
7949 acl_save_prefix="$prefix"
7950 prefix="$acl_final_prefix"
7951 acl_save_exec_prefix="$exec_prefix"
7952 exec_prefix="$acl_final_exec_prefix"
7953 eval x=\"$x\"
7954 exec_prefix="$acl_save_exec_prefix"
7955 prefix="$acl_save_prefix"
7956
7957 if test "X$x" = "X-L$additional_libdir"; then
7958 haveit=yes
7959 break
7960 fi
7961 done
7962 if test -z "$haveit"; then
7963 if test -d "$additional_libdir"; then
7964 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7965 fi
7966 fi
7967 fi
7968 fi
7969 ;;
7970 -R*)
7971 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7972 if test "$enable_rpath" != no; then
7973 haveit=
7974 for x in $rpathdirs; do
7975 if test "X$x" = "X$dir"; then
7976 haveit=yes
7977 break
7978 fi
7979 done
7980 if test -z "$haveit"; then
7981 rpathdirs="$rpathdirs $dir"
7982 fi
7983 haveit=
7984 for x in $ltrpathdirs; do
7985 if test "X$x" = "X$dir"; then
7986 haveit=yes
7987 break
7988 fi
7989 done
7990 if test -z "$haveit"; then
7991 ltrpathdirs="$ltrpathdirs $dir"
7992 fi
7993 fi
7994 ;;
7995 -l*)
7996 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7997 ;;
7998 *.la)
7999 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8000 ;;
8001 *)
8002 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8003 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8004 ;;
8005 esac
8006 done
8007 fi
8008 else
8009 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8010 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8011 fi
8012 fi
8013 fi
8014 done
8015 done
8016 if test "X$rpathdirs" != "X"; then
8017 if test -n "$hardcode_libdir_separator"; then
8018 alldirs=
8019 for found_dir in $rpathdirs; do
8020 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8021 done
8022 acl_save_libdir="$libdir"
8023 libdir="$alldirs"
8024 eval flag=\"$hardcode_libdir_flag_spec\"
8025 libdir="$acl_save_libdir"
8026 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8027 else
8028 for found_dir in $rpathdirs; do
8029 acl_save_libdir="$libdir"
8030 libdir="$found_dir"
8031 eval flag=\"$hardcode_libdir_flag_spec\"
8032 libdir="$acl_save_libdir"
8033 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8034 done
8035 fi
8036 fi
8037 if test "X$ltrpathdirs" != "X"; then
8038 for found_dir in $ltrpathdirs; do
8039 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8040 done
8041 fi
8042
a82a04b3
CR
8043
8044
8045
1b1fe467 8046 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
7f947b68 8047stdlib.h string.h unistd.h sys/param.h
1b1fe467
CR
8048do :
8049 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8050ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8051if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7f947b68
CR
8052 cat >>confdefs.h <<_ACEOF
8053#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8054_ACEOF
abe2eb5b 8055
7f947b68 8056fi
abe2eb5b 8057
7f947b68 8058done
abe2eb5b 8059
1b1fe467 8060 for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
7f947b68
CR
8061geteuid getgid getuid mempcpy munmap putenv setenv setlocale localeconv stpcpy \
8062strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
8063__fsetlocking
1b1fe467
CR
8064do :
8065 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8066ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8067if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7f947b68
CR
8068 cat >>confdefs.h <<_ACEOF
8069#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8070_ACEOF
abe2eb5b 8071
7f947b68
CR
8072fi
8073done
5e13499c 8074
a82a04b3
CR
8075
8076
8077
8078
8079
8080
5e13499c
CR
8081 am_save_CPPFLAGS="$CPPFLAGS"
8082
8083 for element in $INCICONV; do
8084 haveit=
8085 for x in $CPPFLAGS; do
8086
8087 acl_save_prefix="$prefix"
8088 prefix="$acl_final_prefix"
8089 acl_save_exec_prefix="$exec_prefix"
8090 exec_prefix="$acl_final_exec_prefix"
8091 eval x=\"$x\"
8092 exec_prefix="$acl_save_exec_prefix"
8093 prefix="$acl_save_prefix"
8094
8095 if test "X$x" = "X$element"; then
8096 haveit=yes
8097 break
8098 fi
8099 done
8100 if test -z "$haveit"; then
8101 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8102 fi
8103 done
8104
a82a04b3 8105
1b1fe467 8106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
dd4f3dd8 8107$as_echo_n "checking for iconv... " >&6; }
1b1fe467 8108if ${am_cv_func_iconv+:} false; then :
dd4f3dd8 8109 $as_echo_n "(cached) " >&6
5e13499c
CR
8110else
8111
8112 am_cv_func_iconv="no, consider installing GNU libiconv"
8113 am_cv_lib_iconv=no
1b1fe467 8114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 8115/* end confdefs.h. */
5e13499c
CR
8116#include <stdlib.h>
8117#include <iconv.h>
8118int
8119main ()
8120{
8121iconv_t cd = iconv_open("","");
8122 iconv(cd,NULL,NULL,NULL,NULL);
8123 iconv_close(cd);
8124 ;
8125 return 0;
8126}
8127_ACEOF
1b1fe467 8128if ac_fn_c_try_link "$LINENO"; then :
5e13499c 8129 am_cv_func_iconv=yes
5e13499c 8130fi
1b1fe467
CR
8131rm -f core conftest.err conftest.$ac_objext \
8132 conftest$ac_exeext conftest.$ac_ext
5e13499c
CR
8133 if test "$am_cv_func_iconv" != yes; then
8134 am_save_LIBS="$LIBS"
8135 LIBS="$LIBS $LIBICONV"
1b1fe467 8136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 8137/* end confdefs.h. */
5e13499c
CR
8138#include <stdlib.h>
8139#include <iconv.h>
8140int
8141main ()
8142{
8143iconv_t cd = iconv_open("","");
8144 iconv(cd,NULL,NULL,NULL,NULL);
8145 iconv_close(cd);
8146 ;
8147 return 0;
8148}
8149_ACEOF
1b1fe467 8150if ac_fn_c_try_link "$LINENO"; then :
5e13499c
CR
8151 am_cv_lib_iconv=yes
8152 am_cv_func_iconv=yes
5e13499c 8153fi
1b1fe467
CR
8154rm -f core conftest.err conftest.$ac_objext \
8155 conftest$ac_exeext conftest.$ac_ext
5e13499c
CR
8156 LIBS="$am_save_LIBS"
8157 fi
8158
8159fi
1b1fe467 8160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
dd4f3dd8 8161$as_echo "$am_cv_func_iconv" >&6; }
5e13499c
CR
8162 if test "$am_cv_func_iconv" = yes; then
8163
1b1fe467 8164$as_echo "#define HAVE_ICONV 1" >>confdefs.h
5e13499c
CR
8165
8166 fi
8167 if test "$am_cv_lib_iconv" = yes; then
1b1fe467 8168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
dd4f3dd8 8169$as_echo_n "checking how to link with libiconv... " >&6; }
1b1fe467 8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
dd4f3dd8 8171$as_echo "$LIBICONV" >&6; }
5e13499c
CR
8172 else
8173 CPPFLAGS="$am_save_CPPFLAGS"
8174 LIBICONV=
8175 LTLIBICONV=
8176 fi
8177
a82a04b3
CR
8178
8179
5e13499c 8180 if test "$am_cv_func_iconv" = yes; then
1b1fe467 8181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
dd4f3dd8 8182$as_echo_n "checking for iconv declaration... " >&6; }
1b1fe467 8183 if ${am_cv_proto_iconv+:} false; then :
dd4f3dd8 8184 $as_echo_n "(cached) " >&6
5e13499c
CR
8185else
8186
1b1fe467 8187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 8188/* end confdefs.h. */
5e13499c
CR
8189
8190#include <stdlib.h>
8191#include <iconv.h>
8192extern
8193#ifdef __cplusplus
8194"C"
8195#endif
8196#if defined(__STDC__) || defined(__cplusplus)
8197size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8198#else
8199size_t iconv();
8200#endif
8201
8202int
8203main ()
8204{
8205
8206 ;
8207 return 0;
8208}
8209_ACEOF
1b1fe467 8210if ac_fn_c_try_compile "$LINENO"; then :
5e13499c
CR
8211 am_cv_proto_iconv_arg1=""
8212else
1b1fe467 8213 am_cv_proto_iconv_arg1="const"
5e13499c 8214fi
b709b946 8215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5e13499c
CR
8216 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);"
8217fi
8218
8219 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
1b1fe467 8220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
5e13499c 8221 }$am_cv_proto_iconv" >&5
dd4f3dd8 8222$as_echo "${ac_t:-
b709b946 8223 }$am_cv_proto_iconv" >&6; }
5e13499c 8224
a82a04b3 8225cat >>confdefs.h <<_ACEOF
5e13499c 8226#define ICONV_CONST $am_cv_proto_iconv_arg1
a82a04b3 8227_ACEOF
5e13499c
CR
8228
8229 fi
8230
a82a04b3 8231
1b1fe467 8232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
dd4f3dd8 8233$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
1b1fe467 8234if ${am_cv_langinfo_codeset+:} false; then :
dd4f3dd8 8235 $as_echo_n "(cached) " >&6
5e13499c 8236else
1b1fe467 8237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 8238/* end confdefs.h. */
5e13499c
CR
8239#include <langinfo.h>
8240int
8241main ()
8242{
8243char* cs = nl_langinfo(CODESET);
8244 ;
8245 return 0;
8246}
8247_ACEOF
1b1fe467 8248if ac_fn_c_try_link "$LINENO"; then :
abe2eb5b 8249 am_cv_langinfo_codeset=yes
5e13499c 8250else
1b1fe467 8251 am_cv_langinfo_codeset=no
5e13499c 8252fi
1b1fe467
CR
8253rm -f core conftest.err conftest.$ac_objext \
8254 conftest$ac_exeext conftest.$ac_ext
5e13499c
CR
8255
8256fi
1b1fe467 8257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
dd4f3dd8 8258$as_echo "$am_cv_langinfo_codeset" >&6; }
5e13499c
CR
8259 if test $am_cv_langinfo_codeset = yes; then
8260
1b1fe467 8261$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
5e13499c
CR
8262
8263 fi
8264
8265 if test $ac_cv_header_locale_h = yes; then
8266
1b1fe467 8267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
dd4f3dd8 8268$as_echo_n "checking for LC_MESSAGES... " >&6; }
1b1fe467 8269if ${am_cv_val_LC_MESSAGES+:} false; then :
dd4f3dd8 8270 $as_echo_n "(cached) " >&6
5e13499c 8271else
1b1fe467 8272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 8273/* end confdefs.h. */
5e13499c
CR
8274#include <locale.h>
8275int
8276main ()
8277{
8278return LC_MESSAGES
8279 ;
8280 return 0;
8281}
8282_ACEOF
1b1fe467 8283if ac_fn_c_try_link "$LINENO"; then :
5e13499c
CR
8284 am_cv_val_LC_MESSAGES=yes
8285else
1b1fe467 8286 am_cv_val_LC_MESSAGES=no
5e13499c 8287fi
1b1fe467
CR
8288rm -f core conftest.err conftest.$ac_objext \
8289 conftest$ac_exeext conftest.$ac_ext
5e13499c 8290fi
1b1fe467 8291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
dd4f3dd8 8292$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
5e13499c
CR
8293 if test $am_cv_val_LC_MESSAGES = yes; then
8294
1b1fe467 8295$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
5e13499c
CR
8296
8297 fi
8298
8299 fi
8300
8301 for ac_prog in bison
8302do
8303 # Extract the first word of "$ac_prog", so it can be a program name with args.
8304set dummy $ac_prog; ac_word=$2
1b1fe467 8305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
dd4f3dd8 8306$as_echo_n "checking for $ac_word... " >&6; }
1b1fe467 8307if ${ac_cv_prog_INTLBISON+:} false; then :
dd4f3dd8 8308 $as_echo_n "(cached) " >&6
5e13499c
CR
8309else
8310 if test -n "$INTLBISON"; then
8311 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
8312else
a82a04b3
CR
8313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8314for as_dir in $PATH
8315do
8316 IFS=$as_save_IFS
8317 test -z "$as_dir" && as_dir=.
1b1fe467 8318 for ac_exec_ext in '' $ac_executable_extensions; do
0ee50808 8319 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
a82a04b3 8320 ac_cv_prog_INTLBISON="$ac_prog"
1b1fe467 8321 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
a82a04b3
CR
8322 break 2
8323 fi
8324done
1b1fe467 8325 done
b709b946 8326IFS=$as_save_IFS
5e13499c
CR
8327
8328fi
8329fi
8330INTLBISON=$ac_cv_prog_INTLBISON
8331if test -n "$INTLBISON"; then
1b1fe467 8332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5
dd4f3dd8 8333$as_echo "$INTLBISON" >&6; }
5e13499c 8334else
1b1fe467 8335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
dd4f3dd8 8336$as_echo "no" >&6; }
5e13499c
CR
8337fi
8338
b709b946 8339
5e13499c
CR
8340 test -n "$INTLBISON" && break
8341done
8342
8343 if test -z "$INTLBISON"; then
8344 ac_verc_fail=yes
8345 else
1b1fe467 8346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5
dd4f3dd8 8347$as_echo_n "checking version of bison... " >&6; }
e624d0f7
CR
8348 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
8349 case $ac_prog_version in
8350 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
8351 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
8352 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
8353 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
8354 esac
1b1fe467 8355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
dd4f3dd8 8356$as_echo "$ac_prog_version" >&6; }
e624d0f7
CR
8357 fi
8358 if test $ac_verc_fail = yes; then
8359 INTLBISON=:
8360 fi
545f34cf 8361
a82a04b3
CR
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
1b1fe467 8377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
dd4f3dd8 8378$as_echo_n "checking whether NLS is requested... " >&6; }
b709b946 8379 # Check whether --enable-nls was given.
1b1fe467 8380if test "${enable_nls+set}" = set; then :
b709b946 8381 enableval=$enable_nls; USE_NLS=$enableval
5e13499c
CR
8382else
8383 USE_NLS=yes
b709b946
CR
8384fi
8385
1b1fe467 8386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
dd4f3dd8 8387$as_echo "$USE_NLS" >&6; }
5e13499c 8388
a82a04b3
CR
8389
8390
8391
5e13499c
CR
8392 BUILD_INCLUDED_LIBINTL=no
8393 USE_INCLUDED_LIBINTL=no
8394
8395 LIBINTL=
8396 LTLIBINTL=
8397 POSUB=
8398
8399 if test "$USE_NLS" = "yes"; then
8400 gt_use_preinstalled_gnugettext=no
8401
1b1fe467 8402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5
dd4f3dd8 8403$as_echo_n "checking whether included gettext is requested... " >&6; }
5e13499c 8404
b709b946 8405# Check whether --with-included-gettext was given.
1b1fe467 8406if test "${with_included_gettext+set}" = set; then :
b709b946 8407 withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
5e13499c
CR
8408else
8409 nls_cv_force_use_gnu_gettext=no
b709b946
CR
8410fi
8411
1b1fe467 8412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5
dd4f3dd8 8413$as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
5e13499c
CR
8414
8415 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8416 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8417
a82a04b3
CR
8418
8419
8420
8421
8422
1b1fe467 8423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
dd4f3dd8 8424$as_echo_n "checking for GNU gettext in libc... " >&6; }
1b1fe467 8425if ${gt_cv_func_gnugettext2_libc+:} false; then :
dd4f3dd8 8426 $as_echo_n "(cached) " >&6
5e13499c 8427else
1b1fe467 8428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 8429/* end confdefs.h. */
5e13499c
CR
8430#include <libintl.h>
8431extern int _nl_msg_cat_cntr;
8432extern int *_nl_domain_bindings;
8433int
8434main ()
8435{
8436bindtextdomain ("", "");
8437return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_domain_bindings
8438 ;
8439 return 0;
8440}
8441_ACEOF
1b1fe467 8442if ac_fn_c_try_link "$LINENO"; then :
5e13499c
CR
8443 gt_cv_func_gnugettext2_libc=yes
8444else
1b1fe467 8445 gt_cv_func_gnugettext2_libc=no
5e13499c 8446fi
1b1fe467
CR
8447rm -f core conftest.err conftest.$ac_objext \
8448 conftest$ac_exeext conftest.$ac_ext
5e13499c 8449fi
1b1fe467 8450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext2_libc" >&5
dd4f3dd8 8451$as_echo "$gt_cv_func_gnugettext2_libc" >&6; }
5e13499c
CR
8452
8453 if test "$gt_cv_func_gnugettext2_libc" != "yes"; then
8454
a82a04b3
CR
8455
8456
5e13499c
CR
8457 use_additional=yes
8458
8459 acl_save_prefix="$prefix"
8460 prefix="$acl_final_prefix"
8461 acl_save_exec_prefix="$exec_prefix"
8462 exec_prefix="$acl_final_exec_prefix"
8463
8464 eval additional_includedir=\"$includedir\"
8465 eval additional_libdir=\"$libdir\"
8466
8467 exec_prefix="$acl_save_exec_prefix"
8468 prefix="$acl_save_prefix"
8469
a82a04b3 8470
b709b946 8471# Check whether --with-libintl-prefix was given.
1b1fe467 8472if test "${with_libintl_prefix+set}" = set; then :
b709b946 8473 withval=$with_libintl_prefix;
5e13499c
CR
8474 if test "X$withval" = "Xno"; then
8475 use_additional=no
8476 else
8477 if test "X$withval" = "X"; then
8478
8479 acl_save_prefix="$prefix"
8480 prefix="$acl_final_prefix"
8481 acl_save_exec_prefix="$exec_prefix"
8482 exec_prefix="$acl_final_exec_prefix"
8483
8484 eval additional_includedir=\"$includedir\"
8485 eval additional_libdir=\"$libdir\"
8486
8487 exec_prefix="$acl_save_exec_prefix"
8488 prefix="$acl_save_prefix"
8489
8490 else
8491 additional_includedir="$withval/include"
8492 additional_libdir="$withval/lib"
8493 fi
8494 fi
8495
b709b946
CR
8496fi
8497
5e13499c
CR
8498 LIBINTL=
8499 LTLIBINTL=
8500 INCINTL=
8501 rpathdirs=
8502 ltrpathdirs=
8503 names_already_handled=
8504 names_next_round='intl '
8505 while test -n "$names_next_round"; do
8506 names_this_round="$names_next_round"
8507 names_next_round=
8508 for name in $names_this_round; do
8509 already_handled=
8510 for n in $names_already_handled; do
8511 if test "$n" = "$name"; then
8512 already_handled=yes
8513 break
8514 fi
8515 done
8516 if test -z "$already_handled"; then
8517 names_already_handled="$names_already_handled $name"
8518 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8519 eval value=\"\$HAVE_LIB$uppername\"
8520 if test -n "$value"; then
8521 if test "$value" = yes; then
8522 eval value=\"\$LIB$uppername\"
8523 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
8524 eval value=\"\$LTLIB$uppername\"
8525 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
8526 else
8527 :
8528 fi
8529 else
8530 found_dir=
8531 found_la=
8532 found_so=
8533 found_a=
8534 if test $use_additional = yes; then
f4f5e1c2 8535 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
5e13499c
CR
8536 found_dir="$additional_libdir"
8537 found_so="$additional_libdir/lib$name.$shlibext"
8538 if test -f "$additional_libdir/lib$name.la"; then
8539 found_la="$additional_libdir/lib$name.la"
8540 fi
8541 else
8542 if test -f "$additional_libdir/lib$name.$libext"; then
8543 found_dir="$additional_libdir"
8544 found_a="$additional_libdir/lib$name.$libext"
8545 if test -f "$additional_libdir/lib$name.la"; then
8546 found_la="$additional_libdir/lib$name.la"
8547 fi
8548 fi
8549 fi
8550 fi
8551 if test "X$found_dir" = "X"; then
8552 for x in $LDFLAGS $LTLIBINTL; do
8553
8554 acl_save_prefix="$prefix"
8555 prefix="$acl_final_prefix"
8556 acl_save_exec_prefix="$exec_prefix"
8557 exec_prefix="$acl_final_exec_prefix"
8558 eval x=\"$x\"
8559 exec_prefix="$acl_save_exec_prefix"
8560 prefix="$acl_save_prefix"
8561
8562 case "$x" in
8563 -L*)
8564 dir=`echo "X$x" | sed -e 's/^X-L//'`
f4f5e1c2 8565 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
5e13499c
CR
8566 found_dir="$dir"
8567 found_so="$dir/lib$name.$shlibext"
8568 if test -f "$dir/lib$name.la"; then
8569 found_la="$dir/lib$name.la"
8570 fi
8571 else
8572 if test -f "$dir/lib$name.$libext"; then
8573 found_dir="$dir"
8574 found_a="$dir/lib$name.$libext"
8575 if test -f "$dir/lib$name.la"; then
8576 found_la="$dir/lib$name.la"
8577 fi
8578 fi
8579 fi
8580 ;;
8581 esac
8582 if test "X$found_dir" != "X"; then
8583 break
8584 fi
8585 done
8586 fi
8587 if test "X$found_dir" != "X"; then
8588 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
8589 if test "X$found_so" != "X"; then
8590 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8591 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8592 else
8593 haveit=
8594 for x in $ltrpathdirs; do
8595 if test "X$x" = "X$found_dir"; then
8596 haveit=yes
8597 break
8598 fi
8599 done
8600 if test -z "$haveit"; then
8601 ltrpathdirs="$ltrpathdirs $found_dir"
8602 fi
8603 if test "$hardcode_direct" = yes; then
8604 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8605 else
8606 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8607 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8608 haveit=
8609 for x in $rpathdirs; do
8610 if test "X$x" = "X$found_dir"; then
8611 haveit=yes
8612 break
8613 fi
8614 done
8615 if test -z "$haveit"; then
8616 rpathdirs="$rpathdirs $found_dir"
8617 fi
8618 else
8619 haveit=
8620 for x in $LDFLAGS $LIBINTL; do
8621
8622 acl_save_prefix="$prefix"
8623 prefix="$acl_final_prefix"
8624 acl_save_exec_prefix="$exec_prefix"
8625 exec_prefix="$acl_final_exec_prefix"
8626 eval x=\"$x\"
8627 exec_prefix="$acl_save_exec_prefix"
8628 prefix="$acl_save_prefix"
8629
8630 if test "X$x" = "X-L$found_dir"; then
8631 haveit=yes
8632 break
8633 fi
8634 done
8635 if test -z "$haveit"; then
8636 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
8637 fi
8638 if test "$hardcode_minus_L" != no; then
8639 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8640 else
8641 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
8642 fi
8643 fi
8644 fi
8645 fi
8646 else
8647 if test "X$found_a" != "X"; then
8648 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
8649 else
8650 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
8651 fi
8652 fi
8653 additional_includedir=
8654 case "$found_dir" in
8655 */lib | */lib/)
8656 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8657 additional_includedir="$basedir/include"
8658 ;;
8659 esac
8660 if test "X$additional_includedir" != "X"; then
8661 if test "X$additional_includedir" != "X/usr/include"; then
8662 haveit=
8663 if test "X$additional_includedir" = "X/usr/local/include"; then
8664 if test -n "$GCC"; then
8665 case $host_os in
8666 linux*) haveit=yes;;
8667 esac
8668 fi
8669 fi
8670 if test -z "$haveit"; then
8671 for x in $CPPFLAGS $INCINTL; do
8672
8673 acl_save_prefix="$prefix"
8674 prefix="$acl_final_prefix"
8675 acl_save_exec_prefix="$exec_prefix"
8676 exec_prefix="$acl_final_exec_prefix"
8677 eval x=\"$x\"
8678 exec_prefix="$acl_save_exec_prefix"
8679 prefix="$acl_save_prefix"
8680
8681 if test "X$x" = "X-I$additional_includedir"; then
8682 haveit=yes
8683 break
8684 fi
8685 done
8686 if test -z "$haveit"; then
8687 if test -d "$additional_includedir"; then
8688 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
8689 fi
8690 fi
8691 fi
8692 fi
8693 fi
8694 if test -n "$found_la"; then
8695 save_libdir="$libdir"
8696 case "$found_la" in
8697 */* | *\\*) . "$found_la" ;;
8698 *) . "./$found_la" ;;
8699 esac
8700 libdir="$save_libdir"
8701 for dep in $dependency_libs; do
8702 case "$dep" in
8703 -L*)
8704 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8705 if test "X$additional_libdir" != "X/usr/lib"; then
8706 haveit=
8707 if test "X$additional_libdir" = "X/usr/local/lib"; then
8708 if test -n "$GCC"; then
8709 case $host_os in
8710 linux*) haveit=yes;;
8711 esac
8712 fi
8713 fi
8714 if test -z "$haveit"; then
8715 haveit=
8716 for x in $LDFLAGS $LIBINTL; do
8717
8718 acl_save_prefix="$prefix"
8719 prefix="$acl_final_prefix"
8720 acl_save_exec_prefix="$exec_prefix"
8721 exec_prefix="$acl_final_exec_prefix"
8722 eval x=\"$x\"
8723 exec_prefix="$acl_save_exec_prefix"
8724 prefix="$acl_save_prefix"
8725
8726 if test "X$x" = "X-L$additional_libdir"; then
8727 haveit=yes
8728 break
8729 fi
8730 done
8731 if test -z "$haveit"; then
8732 if test -d "$additional_libdir"; then
8733 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
8734 fi
8735 fi
8736 haveit=
8737 for x in $LDFLAGS $LTLIBINTL; do
8738
8739 acl_save_prefix="$prefix"
8740 prefix="$acl_final_prefix"
8741 acl_save_exec_prefix="$exec_prefix"
8742 exec_prefix="$acl_final_exec_prefix"
8743 eval x=\"$x\"
8744 exec_prefix="$acl_save_exec_prefix"
8745 prefix="$acl_save_prefix"
8746
8747 if test "X$x" = "X-L$additional_libdir"; then
8748 haveit=yes
8749 break
8750 fi
8751 done
8752 if test -z "$haveit"; then
8753 if test -d "$additional_libdir"; then
8754 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
8755 fi
8756 fi
8757 fi
8758 fi
8759 ;;
8760 -R*)
8761 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8762 if test "$enable_rpath" != no; then
8763 haveit=
8764 for x in $rpathdirs; do
8765 if test "X$x" = "X$dir"; then
8766 haveit=yes
8767 break
8768 fi
8769 done
8770 if test -z "$haveit"; then
8771 rpathdirs="$rpathdirs $dir"
8772 fi
8773 haveit=
8774 for x in $ltrpathdirs; do
8775 if test "X$x" = "X$dir"; then
8776 haveit=yes
8777 break
8778 fi
8779 done
8780 if test -z "$haveit"; then
8781 ltrpathdirs="$ltrpathdirs $dir"
8782 fi
8783 fi
8784 ;;
8785 -l*)
8786 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8787 ;;
7f947b68
CR
8788 *.la)
8789 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8790 ;;
8791 *)
8792 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
8793 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
8794 ;;
8795 esac
8796 done
8797 fi
8798 else
8799 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
8800 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
8801 fi
8802 fi
8803 fi
8804 done
8805 done
8806 if test "X$rpathdirs" != "X"; then
8807 if test -n "$hardcode_libdir_separator"; then
8808 alldirs=
8809 for found_dir in $rpathdirs; do
8810 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8811 done
8812 acl_save_libdir="$libdir"
8813 libdir="$alldirs"
8814 eval flag=\"$hardcode_libdir_flag_spec\"
8815 libdir="$acl_save_libdir"
8816 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
8817 else
8818 for found_dir in $rpathdirs; do
8819 acl_save_libdir="$libdir"
1b1fe467
CR
8820 libdir="$found_dir"
8821 eval flag=\"$hardcode_libdir_flag_spec\"
8822 libdir="$acl_save_libdir"
8823 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
8824 done
8825 fi
8826 fi
8827 if test "X$ltrpathdirs" != "X"; then
8828 for found_dir in $ltrpathdirs; do
8829 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
8830 done
8831 fi
7f947b68 8832
1b1fe467
CR
8833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
8834$as_echo_n "checking for GNU gettext in libintl... " >&6; }
8835if ${gt_cv_func_gnugettext2_libintl+:} false; then :
7175a77f
CR
8836 $as_echo_n "(cached) " >&6
8837else
1b1fe467
CR
8838 gt_save_CPPFLAGS="$CPPFLAGS"
8839 CPPFLAGS="$CPPFLAGS $INCINTL"
8840 gt_save_LIBS="$LIBS"
8841 LIBS="$LIBS $LIBINTL"
8842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 8843/* end confdefs.h. */
1b1fe467
CR
8844#include <libintl.h>
8845extern int _nl_msg_cat_cntr;
8846extern
8847#ifdef __cplusplus
8848"C"
8849#endif
8850const char *_nl_expand_alias ();
7175a77f
CR
8851int
8852main ()
8853{
1b1fe467
CR
8854bindtextdomain ("", "");
8855return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0)
7175a77f
CR
8856 ;
8857 return 0;
8858}
8859_ACEOF
1b1fe467
CR
8860if ac_fn_c_try_link "$LINENO"; then :
8861 gt_cv_func_gnugettext2_libintl=yes
7175a77f 8862else
1b1fe467 8863 gt_cv_func_gnugettext2_libintl=no
7175a77f 8864fi
1b1fe467
CR
8865rm -f core conftest.err conftest.$ac_objext \
8866 conftest$ac_exeext conftest.$ac_ext
8867 if test "$gt_cv_func_gnugettext2_libintl" != yes && test -n "$LIBICONV"; then
8868 LIBS="$LIBS $LIBICONV"
8869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7610e0c5 8870/* end confdefs.h. */
1b1fe467
CR
8871#include <libintl.h>
8872extern int _nl_msg_cat_cntr;
8873extern
8874#ifdef __cplusplus
8875"C"
8876#endif
8877const char *_nl_expand_alias ();
abe2eb5b
CR
8878int
8879main ()
2dead0c4 8880{
1b1fe467
CR
8881bindtextdomain ("", "");
8882return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0)
abe2eb5b
CR
8883 ;
8884 return 0;
2dead0c4 8885}
abe2eb5b 8886_ACEOF
1b1fe467
CR
8887if ac_fn_c_try_link "$LINENO"; then :
8888 LIBINTL="$LIBINTL $LIBICONV"
8889 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
8890 gt_cv_func_gnugettext2_libintl=yes
7175a77f 8891
7f947b68 8892fi
1b1fe467
CR
8893rm -f core conftest.err conftest.$ac_objext \
8894 conftest$ac_exeext conftest.$ac_ext
8895 fi
8896 CPPFLAGS="$gt_save_CPPFLAGS"
8897 LIBS="$gt_save_LIBS"
7f947b68 8898fi
1b1fe467
CR
8899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext2_libintl" >&5
8900$as_echo "$gt_cv_func_gnugettext2_libintl" >&6; }
8901 fi
7175a77f 8902
1b1fe467
CR
8903 if test "$gt_cv_func_gnugettext2_libc" = "yes" \
8904 || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \
8905 && test "$PACKAGE" != gettext-runtime \
8906 && test "$PACKAGE" != gettext-tools; }; then
8907 gt_use_preinstalled_gnugettext=yes
8908 else
8909 LIBINTL=
8910 LTLIBINTL=
8911 INCINTL=
8912 fi
abe2eb5b 8913
2dead0c4 8914
1b1fe467
CR
8915 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
8916 nls_cv_use_gnu_gettext=yes
8917 fi
8918 fi
7f947b68 8919
1b1fe467
CR
8920 if test "$nls_cv_use_gnu_gettext" = "yes"; then
8921 BUILD_INCLUDED_LIBINTL=yes
8922 USE_INCLUDED_LIBINTL=yes
8923 LIBINTL="lib/intl/libintl.a $LIBICONV"
8924 LTLIBINTL="lib/intl/libintl.a $LTLIBICONV"
8925 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
8926 fi
7175a77f 8927
1b1fe467
CR
8928 if test "$gt_use_preinstalled_gnugettext" = "yes" \
8929 || test "$nls_cv_use_gnu_gettext" = "yes"; then
8930 CATOBJEXT=.gmo
8931 fi
f73dda09 8932
c920c360 8933
1b1fe467
CR
8934 if test "$gt_use_preinstalled_gnugettext" = "yes" \
8935 || test "$nls_cv_use_gnu_gettext" = "yes"; then
8936
8937$as_echo "#define ENABLE_NLS 1" >>confdefs.h
8938
8939 else
8940 USE_NLS=no
8941 fi
8942 fi
8943
8944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
8945$as_echo_n "checking whether to use NLS... " >&6; }
8946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
8947$as_echo "$USE_NLS" >&6; }
8948 if test "$USE_NLS" = "yes"; then
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
8950$as_echo_n "checking where the gettext function comes from... " >&6; }
8951 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
8952 if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
8953 gt_source="external libintl"
8954 else
8955 gt_source="libc"
8956 fi
8957 else
8958 gt_source="included intl directory"
8959 fi
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
8961$as_echo "$gt_source" >&6; }
8962 fi
8963
8964 if test "$USE_NLS" = "yes"; then
8965
8966 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
8967 if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
8968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
8969$as_echo_n "checking how to link with libintl... " >&6; }
8970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
8971$as_echo "$LIBINTL" >&6; }
8972
8973 for element in $INCINTL; do
8974 haveit=
8975 for x in $CPPFLAGS; do
8976
8977 acl_save_prefix="$prefix"
8978 prefix="$acl_final_prefix"
8979 acl_save_exec_prefix="$exec_prefix"
8980 exec_prefix="$acl_final_exec_prefix"
8981 eval x=\"$x\"
8982 exec_prefix="$acl_save_exec_prefix"
8983 prefix="$acl_save_prefix"
8984
8985 if test "X$x" = "X$element"; then
8986 haveit=yes
8987 break
8988 fi
8989 done
8990 if test -z "$haveit"; then
8991 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8992 fi
8993 done
8994
8995 fi
8996
2dead0c4 8997
1b1fe467 8998$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
b709b946 8999
2dead0c4 9000
1b1fe467 9001$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
7f947b68 9002
1b1fe467 9003 fi
2dead0c4 9004
1b1fe467
CR
9005 POSUB=po
9006 fi
2dead0c4 9007
7f947b68 9008
1b1fe467
CR
9009 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
9010 BUILD_INCLUDED_LIBINTL=yes
9011 fi
7f947b68 9012
7f947b68 9013
7f947b68 9014
1b1fe467
CR
9015
9016
9017 nls_cv_header_intl=
9018 nls_cv_header_libgt=
9019
9020 DATADIRNAME=share
9021
9022
9023 INSTOBJEXT=.mo
9024
9025
9026 GENCAT=gencat
9027
9028
9029 if test "$USE_INCLUDED_LIBINTL" = yes; then
9030 INTLOBJS="\$(GETTOBJS)"
9031 fi
9032
9033
9034 INTL_LIBTOOL_SUFFIX_PREFIX=
9035
9036
9037
9038 INTLLIBS="$LIBINTL"
9039
9040
9041
9042
9043
9044
9045
9046ac_header_dirent=no
9047for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9048 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
9050$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
9051if eval \${$as_ac_Header+:} false; then :
7175a77f
CR
9052 $as_echo_n "(cached) " >&6
9053else
1b1fe467 9054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 9055/* end confdefs.h. */
1b1fe467
CR
9056#include <sys/types.h>
9057#include <$ac_hdr>
7f947b68 9058
7175a77f
CR
9059int
9060main ()
9061{
1b1fe467
CR
9062if ((DIR *) 0)
9063return 0;
7175a77f
CR
9064 ;
9065 return 0;
9066}
9067_ACEOF
1b1fe467
CR
9068if ac_fn_c_try_compile "$LINENO"; then :
9069 eval "$as_ac_Header=yes"
7175a77f 9070else
1b1fe467
CR
9071 eval "$as_ac_Header=no"
9072fi
9073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9074fi
9075eval ac_res=\$$as_ac_Header
9076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9077$as_echo "$ac_res" >&6; }
9078if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9079 cat >>confdefs.h <<_ACEOF
9080#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
9081_ACEOF
7f947b68 9082
1b1fe467 9083ac_header_dirent=$ac_hdr; break
7f947b68
CR
9084fi
9085
1b1fe467
CR
9086done
9087# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9088if test $ac_header_dirent = dirent.h; then
9089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9090$as_echo_n "checking for library containing opendir... " >&6; }
9091if ${ac_cv_search_opendir+:} false; then :
9092 $as_echo_n "(cached) " >&6
7175a77f 9093else
1b1fe467
CR
9094 ac_func_search_save_LIBS=$LIBS
9095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 9096/* end confdefs.h. */
7f947b68 9097
1b1fe467
CR
9098/* Override any GCC internal prototype to avoid an error.
9099 Use char because int might match the return type of a GCC
9100 builtin and then its argument prototype would still apply. */
9101#ifdef __cplusplus
9102extern "C"
9103#endif
9104char opendir ();
abe2eb5b
CR
9105int
9106main ()
9107{
1b1fe467 9108return opendir ();
abe2eb5b
CR
9109 ;
9110 return 0;
9111}
71412226 9112_ACEOF
1b1fe467
CR
9113for ac_lib in '' dir; do
9114 if test -z "$ac_lib"; then
9115 ac_res="none required"
9116 else
9117 ac_res=-l$ac_lib
9118 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9119 fi
9120 if ac_fn_c_try_link "$LINENO"; then :
9121 ac_cv_search_opendir=$ac_res
7f947b68 9122fi
1b1fe467
CR
9123rm -f core conftest.err conftest.$ac_objext \
9124 conftest$ac_exeext
9125 if ${ac_cv_search_opendir+:} false; then :
9126 break
9127fi
9128done
9129if ${ac_cv_search_opendir+:} false; then :
7f947b68 9130
7175a77f 9131else
1b1fe467
CR
9132 ac_cv_search_opendir=no
9133fi
9134rm conftest.$ac_ext
9135LIBS=$ac_func_search_save_LIBS
d166f048 9136fi
1b1fe467
CR
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9138$as_echo "$ac_cv_search_opendir" >&6; }
9139ac_res=$ac_cv_search_opendir
9140if test "$ac_res" != no; then :
9141 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
b709b946 9142
7175a77f 9143fi
7f947b68 9144
1b1fe467
CR
9145else
9146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9147$as_echo_n "checking for library containing opendir... " >&6; }
9148if ${ac_cv_search_opendir+:} false; then :
9149 $as_echo_n "(cached) " >&6
9150else
9151 ac_func_search_save_LIBS=$LIBS
9152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 9153/* end confdefs.h. */
1b1fe467
CR
9154
9155/* Override any GCC internal prototype to avoid an error.
9156 Use char because int might match the return type of a GCC
9157 builtin and then its argument prototype would still apply. */
9158#ifdef __cplusplus
9159extern "C"
9160#endif
9161char opendir ();
abe2eb5b
CR
9162int
9163main ()
9164{
1b1fe467 9165return opendir ();
abe2eb5b
CR
9166 ;
9167 return 0;
9168}
2dead0c4 9169_ACEOF
1b1fe467
CR
9170for ac_lib in '' x; do
9171 if test -z "$ac_lib"; then
9172 ac_res="none required"
9173 else
9174 ac_res=-l$ac_lib
9175 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9176 fi
9177 if ac_fn_c_try_link "$LINENO"; then :
9178 ac_cv_search_opendir=$ac_res
9179fi
9180rm -f core conftest.err conftest.$ac_objext \
9181 conftest$ac_exeext
9182 if ${ac_cv_search_opendir+:} false; then :
9183 break
9184fi
9185done
9186if ${ac_cv_search_opendir+:} false; then :
9187
7f947b68 9188else
1b1fe467
CR
9189 ac_cv_search_opendir=no
9190fi
9191rm conftest.$ac_ext
9192LIBS=$ac_func_search_save_LIBS
9193fi
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9195$as_echo "$ac_cv_search_opendir" >&6; }
9196ac_res=$ac_cv_search_opendir
9197if test "$ac_res" != no; then :
9198 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7f947b68 9199
7175a77f 9200fi
7f947b68 9201
1b1fe467
CR
9202fi
9203
9204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9205$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9206if ${ac_cv_header_time+:} false; then :
9207 $as_echo_n "(cached) " >&6
7f947b68 9208else
1b1fe467 9209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7f947b68 9210/* end confdefs.h. */
1b1fe467
CR
9211#include <sys/types.h>
9212#include <sys/time.h>
9213#include <time.h>
9214
7175a77f
CR
9215int
9216main ()
9217{
1b1fe467
CR
9218if ((struct tm *) 0)
9219return 0;
7175a77f
CR
9220 ;
9221 return 0;
9222}
7f947b68 9223_ACEOF
1b1fe467
CR
9224if ac_fn_c_try_compile "$LINENO"; then :
9225 ac_cv_header_time=yes
7f947b68 9226else
1b1fe467 9227 ac_cv_header_time=no
7f947b68 9228fi
1b1fe467 9229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7175a77f 9230fi
1b1fe467
CR
9231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9232$as_echo "$ac_cv_header_time" >&6; }
9233if test $ac_cv_header_time = yes; then
9234
9235$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9236
7175a77f 9237fi
7175a77f
CR
9238
9239
abe2eb5b 9240
1b1fe467
CR
9241 for ac_header in inttypes.h
9242do :
9243 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
9244if test "x$ac_cv_header_inttypes_h" = xyes; then :
9245 cat >>confdefs.h <<_ACEOF
9246#define HAVE_INTTYPES_H 1
2dead0c4 9247_ACEOF
c920c360 9248
1b1fe467 9249fi
d166f048 9250
1b1fe467
CR
9251done
9252
9253
9254
9255for ac_header in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
9256 memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
9257 stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \
9258 regex.h syslog.h ulimit.h
9259do :
9260 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9261ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9262if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9263 cat >>confdefs.h <<_ACEOF
9264#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7175a77f 9265_ACEOF
7f947b68 9266
1b1fe467
CR
9267fi
9268
9269done
9270
48abf0fd 9271for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \
690150f9 9272 sys/param.h sys/socket.h sys/stat.h \
1b1fe467
CR
9273 sys/time.h sys/times.h sys/types.h sys/wait.h
9274do :
9275 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9276ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9277if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9278 cat >>confdefs.h <<_ACEOF
9279#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7175a77f 9280_ACEOF
1b1fe467
CR
9281
9282fi
9283
9284done
9285
9286for ac_header in netinet/in.h arpa/inet.h
9287do :
9288 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9289ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9290if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9291 cat >>confdefs.h <<_ACEOF
9292#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7175a77f 9293_ACEOF
1b1fe467
CR
9294
9295fi
9296
9297done
9298
9299
9300ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "
9301#if HAVE_SYS_STREAM_H
9302# include <sys/stream.h>
9303#endif
9304
9305"
9306if test "x$ac_cv_header_sys_ptem_h" = xyes; then :
9307
9308fi
9309
9310
9311
690150f9
CR
9312ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
9313#if HAVE_SYS_TIME_H
9314# include <sys/time.h>
9315#endif
9316
9317"
9318if test "x$ac_cv_header_sys_resource_h" = xyes; then :
9319 $as_echo "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
9320
9321fi
9322
9323
9324
1b1fe467
CR
9325# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9326# for constant arguments. Useless!
9327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9328$as_echo_n "checking for working alloca.h... " >&6; }
9329if ${ac_cv_working_alloca_h+:} false; then :
9330 $as_echo_n "(cached) " >&6
9331else
9332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 9333/* end confdefs.h. */
1b1fe467 9334#include <alloca.h>
abe2eb5b
CR
9335int
9336main ()
9337{
1b1fe467
CR
9338char *p = (char *) alloca (2 * sizeof (int));
9339 if (p) return 0;
7175a77f
CR
9340 ;
9341 return 0;
abe2eb5b
CR
9342}
9343_ACEOF
1b1fe467
CR
9344if ac_fn_c_try_link "$LINENO"; then :
9345 ac_cv_working_alloca_h=yes
abe2eb5b 9346else
1b1fe467
CR
9347 ac_cv_working_alloca_h=no
9348fi
9349rm -f core conftest.err conftest.$ac_objext \
9350 conftest$ac_exeext conftest.$ac_ext
9351fi
9352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9353$as_echo "$ac_cv_working_alloca_h" >&6; }
9354if test $ac_cv_working_alloca_h = yes; then
9355
9356$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
d166f048
JA
9357
9358fi
9359
1b1fe467
CR
9360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9361$as_echo_n "checking for alloca... " >&6; }
9362if ${ac_cv_func_alloca_works+:} false; then :
9363 $as_echo_n "(cached) " >&6
7175a77f 9364else
1b1fe467 9365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 9366/* end confdefs.h. */
1b1fe467
CR
9367#ifdef __GNUC__
9368# define alloca __builtin_alloca
9369#else
9370# ifdef _MSC_VER
9371# include <malloc.h>
9372# define alloca _alloca
9373# else
9374# ifdef HAVE_ALLOCA_H
9375# include <alloca.h>
9376# else
9377# ifdef _AIX
9378 #pragma alloca
9379# else
9380# ifndef alloca /* predefined by HP cc +Olibcalls */
9381void *alloca (size_t);
9382# endif
9383# endif
9384# endif
9385# endif
9386#endif
7f947b68 9387
abe2eb5b
CR
9388int
9389main ()
9390{
1b1fe467
CR
9391char *p = (char *) alloca (1);
9392 if (p) return 0;
abe2eb5b
CR
9393 ;
9394 return 0;
9395}
9396_ACEOF
1b1fe467
CR
9397if ac_fn_c_try_link "$LINENO"; then :
9398 ac_cv_func_alloca_works=yes
7f947b68 9399else
1b1fe467
CR
9400 ac_cv_func_alloca_works=no
9401fi
9402rm -f core conftest.err conftest.$ac_objext \
9403 conftest$ac_exeext conftest.$ac_ext
7f947b68 9404fi
1b1fe467
CR
9405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9406$as_echo "$ac_cv_func_alloca_works" >&6; }
9407
9408if test $ac_cv_func_alloca_works = yes; then
9409
9410$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7f947b68 9411
7f947b68 9412else
1b1fe467
CR
9413 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9414# that cause trouble. Some versions do not even contain alloca or
9415# contain a buggy version. If you still want to use their alloca,
9416# use ar to extract alloca.o from them instead of compiling alloca.c.
9417
9418ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
9419
9420$as_echo "#define C_ALLOCA 1" >>confdefs.h
9421
9422
9423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9424$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9425if ${ac_cv_os_cray+:} false; then :
9426 $as_echo_n "(cached) " >&6
9427else
9428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9429/* end confdefs.h. */
9430#if defined CRAY && ! defined CRAY2
9431webecray
9432#else
9433wenotbecray
9434#endif
7f947b68 9435
1b1fe467
CR
9436_ACEOF
9437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9438 $EGREP "webecray" >/dev/null 2>&1; then :
9439 ac_cv_os_cray=yes
9440else
9441 ac_cv_os_cray=no
7f947b68 9442fi
1b1fe467 9443rm -f conftest*
7f947b68
CR
9444
9445fi
1b1fe467
CR
9446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9447$as_echo "$ac_cv_os_cray" >&6; }
9448if test $ac_cv_os_cray = yes; then
9449 for ac_func in _getb67 GETB67 getb67; do
9450 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9451ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9452if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7f947b68 9453
1b1fe467
CR
9454cat >>confdefs.h <<_ACEOF
9455#define CRAY_STACKSEG_END $ac_func
7175a77f 9456_ACEOF
7175a77f 9457
1b1fe467
CR
9458 break
9459fi
e3db237e 9460
1b1fe467 9461 done
d166f048 9462fi
e3db237e 9463
1b1fe467
CR
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9465$as_echo_n "checking stack direction for C alloca... " >&6; }
9466if ${ac_cv_c_stack_direction+:} false; then :
9467 $as_echo_n "(cached) " >&6
abe2eb5b 9468else
1b1fe467
CR
9469 if test "$cross_compiling" = yes; then :
9470 ac_cv_c_stack_direction=0
9471else
9472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 9473/* end confdefs.h. */
7175a77f 9474$ac_includes_default
abe2eb5b 9475int
0ee50808 9476find_stack_direction (int *addr, int depth)
abe2eb5b 9477{
0ee50808
CR
9478 int dir, dummy = 0;
9479 if (! addr)
9480 addr = &dummy;
9481 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
9482 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
9483 return dir + dummy;
1b1fe467 9484}
7175a77f 9485
1b1fe467 9486int
0ee50808 9487main (int argc, char **argv)
1b1fe467 9488{
0ee50808 9489 return find_stack_direction (0, argc + !argv + 20) < 0;
abe2eb5b
CR
9490}
9491_ACEOF
1b1fe467
CR
9492if ac_fn_c_try_run "$LINENO"; then :
9493 ac_cv_c_stack_direction=1
abe2eb5b 9494else
1b1fe467 9495 ac_cv_c_stack_direction=-1
7610e0c5 9496fi
1b1fe467
CR
9497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9498 conftest.$ac_objext conftest.beam conftest.$ac_ext
2dead0c4 9499fi
2dead0c4 9500
1b1fe467
CR
9501fi
9502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9503$as_echo "$ac_cv_c_stack_direction" >&6; }
7175a77f 9504cat >>confdefs.h <<_ACEOF
1b1fe467 9505#define STACK_DIRECTION $ac_cv_c_stack_direction
7175a77f 9506_ACEOF
7f947b68 9507
7f947b68 9508
03d922b1
CR
9509fi
9510
9511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9512$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9513if ${ac_cv_type_uid_t+:} false; then :
9514 $as_echo_n "(cached) " >&6
9515else
9516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9517/* end confdefs.h. */
9518#include <sys/types.h>
9519
9520_ACEOF
9521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9522 $EGREP "uid_t" >/dev/null 2>&1; then :
9523 ac_cv_type_uid_t=yes
9524else
9525 ac_cv_type_uid_t=no
9526fi
9527rm -f conftest*
9528
9529fi
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9531$as_echo "$ac_cv_type_uid_t" >&6; }
9532if test $ac_cv_type_uid_t = no; then
9533
9534$as_echo "#define uid_t int" >>confdefs.h
9535
9536
9537$as_echo "#define gid_t int" >>confdefs.h
9538
9539fi
9540
9541for ac_header in unistd.h
9542do :
9543 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
9544if test "x$ac_cv_header_unistd_h" = xyes; then :
9545 cat >>confdefs.h <<_ACEOF
9546#define HAVE_UNISTD_H 1
9547_ACEOF
9548
9549fi
9550
9551done
9552
9553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9554$as_echo_n "checking for working chown... " >&6; }
9555if ${ac_cv_func_chown_works+:} false; then :
9556 $as_echo_n "(cached) " >&6
9557else
9558 if test "$cross_compiling" = yes; then :
9559 ac_cv_func_chown_works=no
9560else
9561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9562/* end confdefs.h. */
9563$ac_includes_default
9564#include <fcntl.h>
9565
9566int
9567main ()
9568{
9569 char *f = "conftest.chown";
9570 struct stat before, after;
9571
9572 if (creat (f, 0600) < 0)
9573 return 1;
9574 if (stat (f, &before) < 0)
9575 return 1;
9576 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9577 return 1;
9578 if (stat (f, &after) < 0)
9579 return 1;
9580 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9581
9582 ;
9583 return 0;
9584}
9585_ACEOF
9586if ac_fn_c_try_run "$LINENO"; then :
9587 ac_cv_func_chown_works=yes
9588else
9589 ac_cv_func_chown_works=no
9590fi
9591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9592 conftest.$ac_objext conftest.beam conftest.$ac_ext
9593fi
9594
9595rm -f conftest.chown
9596
9597fi
9598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9599$as_echo "$ac_cv_func_chown_works" >&6; }
9600if test $ac_cv_func_chown_works = yes; then
9601
9602$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9603
1b1fe467
CR
9604fi
9605
9606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
9607$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
9608if ${ac_cv_func_getpgrp_void+:} false; then :
7175a77f 9609 $as_echo_n "(cached) " >&6
7f947b68 9610else
1b1fe467
CR
9611 # Use it with a single arg.
9612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
9613/* end confdefs.h. */
9614$ac_includes_default
9615int
9616main ()
9617{
1b1fe467 9618getpgrp (0);
7175a77f
CR
9619 ;
9620 return 0;
9621}
9622_ACEOF
1b1fe467
CR
9623if ac_fn_c_try_compile "$LINENO"; then :
9624 ac_cv_func_getpgrp_void=no
9625else
9626 ac_cv_func_getpgrp_void=yes
9627fi
9628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9629
9630fi
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
9632$as_echo "$ac_cv_func_getpgrp_void" >&6; }
9633if test $ac_cv_func_getpgrp_void = yes; then
9634
9635$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
9636
9637fi
9638
9639if ${ac_cv_func_setvbuf_reversed+:} false; then :
9640 $as_echo_n "(cached) " >&6
9641else
9642 ac_cv_func_setvbuf_reversed=no
9643fi
9644
9645
9646for ac_func in vprintf
9647do :
9648 ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
9649if test "x$ac_cv_func_vprintf" = xyes; then :
9650 cat >>confdefs.h <<_ACEOF
9651#define HAVE_VPRINTF 1
7175a77f 9652_ACEOF
1b1fe467
CR
9653
9654ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
9655if test "x$ac_cv_func__doprnt" = xyes; then :
9656
9657$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
9658
9659fi
9660
9661fi
9662done
9663
9664
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5
9666$as_echo_n "checking for working strcoll... " >&6; }
9667if ${ac_cv_func_strcoll_works+:} false; then :
9668 $as_echo_n "(cached) " >&6
9669else
9670 if test "$cross_compiling" = yes; then :
9671 ac_cv_func_strcoll_works=no
9672else
9673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
9674/* end confdefs.h. */
9675$ac_includes_default
9676int
9677main ()
9678{
1b1fe467
CR
9679return (strcoll ("abc", "def") >= 0 ||
9680 strcoll ("ABC", "DEF") >= 0 ||
9681 strcoll ("123", "456") >= 0)
7175a77f
CR
9682 ;
9683 return 0;
9684}
abe2eb5b 9685_ACEOF
1b1fe467
CR
9686if ac_fn_c_try_run "$LINENO"; then :
9687 ac_cv_func_strcoll_works=yes
7175a77f 9688else
1b1fe467
CR
9689 ac_cv_func_strcoll_works=no
9690fi
9691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9692 conftest.$ac_objext conftest.beam conftest.$ac_ext
9693fi
2dead0c4 9694
7f947b68 9695fi
1b1fe467
CR
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5
9697$as_echo "$ac_cv_func_strcoll_works" >&6; }
9698if test $ac_cv_func_strcoll_works = yes; then
7f947b68 9699
1b1fe467 9700$as_echo "#define HAVE_STRCOLL 1" >>confdefs.h
7f947b68 9701
1b1fe467
CR
9702fi
9703
9704
9705
9706if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then
9707 MALLOC_TARGET=alloca
9708 MALLOC_SRC=alloca.c
9709
9710 MALLOC_LIB='-lmalloc'
9711 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
9712 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
9713 MALLOC_DEP='$(MALLOC_LIBRARY)'
9714fi
9715
9716if test "$ac_cv_func_vprintf" = no; then
9717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of vprintf in stdio.h" >&5
9718$as_echo_n "checking for declaration of vprintf in stdio.h... " >&6; }
9719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 9720/* end confdefs.h. */
1b1fe467 9721#include <stdio.h>
7f947b68 9722
abe2eb5b 9723_ACEOF
1b1fe467
CR
9724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9725 $EGREP "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then :
9726 ac_cv_func_vprintf=yes
9727fi
9728rm -f conftest*
9729
9730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vprintf" >&5
9731$as_echo "$ac_cv_func_vprintf" >&6; }
9732 if test $ac_cv_func_vprintf = yes; then
9733 $as_echo "#define HAVE_VPRINTF 1" >>confdefs.h
9734
9735 fi
9736fi
9737
9738if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then
9739 case " $LIBOBJS " in
9740 *" vprint.$ac_objext "* ) ;;
9741 *) LIBOBJS="$LIBOBJS vprint.$ac_objext"
9742 ;;
7175a77f 9743esac
1b1fe467
CR
9744
9745fi
9746
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9748$as_echo_n "checking return type of signal handlers... " >&6; }
9749if ${ac_cv_type_signal+:} false; then :
9750 $as_echo_n "(cached) " >&6
9751else
9752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 9753/* end confdefs.h. */
1b1fe467
CR
9754#include <sys/types.h>
9755#include <signal.h>
9756
7175a77f
CR
9757int
9758main ()
9759{
1b1fe467 9760return *(signal (0, 0)) (0) == 1;
7175a77f
CR
9761 ;
9762 return 0;
9763}
9764_ACEOF
1b1fe467
CR
9765if ac_fn_c_try_compile "$LINENO"; then :
9766 ac_cv_type_signal=int
7175a77f 9767else
1b1fe467
CR
9768 ac_cv_type_signal=void
9769fi
9770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9771fi
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9773$as_echo "$ac_cv_type_signal" >&6; }
9774
9775cat >>confdefs.h <<_ACEOF
9776#define RETSIGTYPE $ac_cv_type_signal
9777_ACEOF
9778
9779
9780
9781ac_fn_c_check_func "$LINENO" "__setostype" "ac_cv_func___setostype"
9782if test "x$ac_cv_func___setostype" = xyes; then :
9783 $as_echo "#define HAVE_SETOSTYPE 1" >>confdefs.h
7f947b68
CR
9784
9785fi
9786
1b1fe467
CR
9787ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
9788if test "x$ac_cv_func_wait3" = xyes; then :
9789 $as_echo "#define HAVE_WAIT3 1" >>confdefs.h
2dead0c4
CR
9790
9791fi
9792
1b1fe467
CR
9793
9794ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
9795if test "x$ac_cv_func_mkfifo" = xyes; then :
9796 $as_echo "#define HAVE_MKFIFO 1" >>confdefs.h
9797
9798else
9799 $as_echo "#define MKFIFO_MISSING 1" >>confdefs.h
9800
7175a77f 9801fi
7f947b68 9802
7f947b68 9803
1b1fe467
CR
9804for ac_func in dup2 eaccess fcntl getdtablesize getgroups gethostname \
9805 getpagesize getpeername getrlimit getrusage gettimeofday \
09f70f2f 9806 kill killpg lstat pselect readlink sbrk select setdtablesize \
1b1fe467
CR
9807 setitimer tcgetpgrp uname ulimit waitpid
9808do :
9809 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9810ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9811if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9812 cat >>confdefs.h <<_ACEOF
9813#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7175a77f 9814_ACEOF
1b1fe467
CR
9815
9816fi
9817done
9818
9819ac_fn_c_check_func "$LINENO" "rename" "ac_cv_func_rename"
9820if test "x$ac_cv_func_rename" = xyes; then :
9821 $as_echo "#define HAVE_RENAME 1" >>confdefs.h
9822
7175a77f 9823else
1b1fe467
CR
9824 case " $LIBOBJS " in
9825 *" rename.$ac_objext "* ) ;;
9826 *) LIBOBJS="$LIBOBJS rename.$ac_objext"
9827 ;;
9828esac
2dead0c4 9829
7f947b68 9830fi
2dead0c4 9831
1b1fe467
CR
9832
9833
9834for ac_func in bcopy bzero confstr faccessat fnmatch \
9835 getaddrinfo gethostbyname getservbyname getservent inet_aton \
690150f9 9836 imaxdiv memmove pathconf putenv raise random regcomp regexec \
1b1fe467
CR
9837 setenv setlinebuf setlocale setvbuf siginterrupt strchr \
9838 sysconf syslog tcgetattr times ttyname tzset unsetenv
9839do :
9840 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9841ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9842if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9843 cat >>confdefs.h <<_ACEOF
9844#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9845_ACEOF
9846
9847fi
7175a77f 9848done
1b1fe467
CR
9849
9850
9851for ac_func in vasprintf asprintf
9852do :
9853 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9854ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9855if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9856 cat >>confdefs.h <<_ACEOF
9857#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7175a77f 9858_ACEOF
abe2eb5b 9859
1b1fe467
CR
9860fi
9861done
7f947b68 9862
1b1fe467
CR
9863for ac_func in isascii isblank isgraph isprint isspace isxdigit
9864do :
9865 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9866ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9867if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9868 cat >>confdefs.h <<_ACEOF
9869#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7175a77f 9870_ACEOF
1b1fe467
CR
9871
9872fi
9873done
9874
9875for ac_func in getpwent getpwnam getpwuid
9876do :
9877 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9878ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9879if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9880 cat >>confdefs.h <<_ACEOF
9881#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9882_ACEOF
9883
9884fi
9885done
9886
9887ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
9888if test "x$ac_cv_func_getcwd" = xyes; then :
9889 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
9890
9891else
9892 case " $LIBOBJS " in
9893 *" getcwd.$ac_objext "* ) ;;
9894 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
9895 ;;
abe2eb5b 9896esac
1b1fe467
CR
9897
9898fi
9899
9900ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
9901if test "x$ac_cv_func_memset" = xyes; then :
9902 $as_echo "#define HAVE_MEMSET 1" >>confdefs.h
9903
7175a77f 9904else
1b1fe467
CR
9905 case " $LIBOBJS " in
9906 *" memset.$ac_objext "* ) ;;
9907 *) LIBOBJS="$LIBOBJS memset.$ac_objext"
9908 ;;
9909esac
7f947b68 9910
7175a77f 9911fi
1b1fe467
CR
9912
9913
9914ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
9915if test "x$ac_cv_func_strcasecmp" = xyes; then :
9916 $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h
9917
9918else
9919 case " $LIBOBJS " in
9920 *" strcasecmp.$ac_objext "* ) ;;
9921 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
9922 ;;
9923esac
9924
7175a77f 9925fi
1b1fe467
CR
9926
9927ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
9928if test "x$ac_cv_func_strcasestr" = xyes; then :
9929 $as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h
9930
9931else
9932 case " $LIBOBJS " in
9933 *" strcasestr.$ac_objext "* ) ;;
9934 *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext"
9935 ;;
9936esac
9937
7f947b68
CR
9938fi
9939
1b1fe467
CR
9940ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
9941if test "x$ac_cv_func_strerror" = xyes; then :
9942 $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
7f947b68 9943
1b1fe467
CR
9944else
9945 case " $LIBOBJS " in
9946 *" strerror.$ac_objext "* ) ;;
9947 *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
9948 ;;
9949esac
e8ce775d 9950
1b1fe467 9951fi
71412226 9952
1b1fe467
CR
9953ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
9954if test "x$ac_cv_func_strftime" = xyes; then :
9955 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
7f947b68 9956
abe2eb5b 9957else
1b1fe467
CR
9958 case " $LIBOBJS " in
9959 *" strftime.$ac_objext "* ) ;;
9960 *) LIBOBJS="$LIBOBJS strftime.$ac_objext"
9961 ;;
9962esac
cce855bc 9963
1b1fe467
CR
9964fi
9965
9966ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
9967if test "x$ac_cv_func_strnlen" = xyes; then :
9968 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
9969
9970else
9971 case " $LIBOBJS " in
9972 *" strnlen.$ac_objext "* ) ;;
9973 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
9974 ;;
7175a77f 9975esac
7f947b68 9976
1b1fe467
CR
9977fi
9978
9979ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
9980if test "x$ac_cv_func_strpbrk" = xyes; then :
9981 $as_echo "#define HAVE_STRPBRK 1" >>confdefs.h
9982
9983else
9984 case " $LIBOBJS " in
9985 *" strpbrk.$ac_objext "* ) ;;
9986 *) LIBOBJS="$LIBOBJS strpbrk.$ac_objext"
9987 ;;
7f947b68 9988esac
1b1fe467
CR
9989
9990fi
9991
9992ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
9993if test "x$ac_cv_func_strstr" = xyes; then :
9994 $as_echo "#define HAVE_STRSTR 1" >>confdefs.h
9995
7175a77f 9996else
1b1fe467
CR
9997 case " $LIBOBJS " in
9998 *" strstr.$ac_objext "* ) ;;
9999 *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
10000 ;;
10001esac
7f947b68 10002
abe2eb5b 10003fi
71412226 10004
1b1fe467
CR
10005
10006ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod"
10007if test "x$ac_cv_func_strtod" = xyes; then :
10008 $as_echo "#define HAVE_STRTOD 1" >>confdefs.h
10009
7f947b68 10010else
1b1fe467
CR
10011 case " $LIBOBJS " in
10012 *" strtod.$ac_objext "* ) ;;
10013 *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
10014 ;;
10015esac
7f947b68 10016
1b1fe467 10017fi
7f947b68 10018
1b1fe467
CR
10019ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
10020if test "x$ac_cv_func_strtol" = xyes; then :
10021 $as_echo "#define HAVE_STRTOL 1" >>confdefs.h
10022
10023else
10024 case " $LIBOBJS " in
10025 *" strtol.$ac_objext "* ) ;;
10026 *) LIBOBJS="$LIBOBJS strtol.$ac_objext"
10027 ;;
7175a77f 10028esac
7f947b68 10029
1b1fe467
CR
10030fi
10031
10032ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
10033if test "x$ac_cv_func_strtoul" = xyes; then :
10034 $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h
10035
10036else
10037 case " $LIBOBJS " in
10038 *" strtoul.$ac_objext "* ) ;;
10039 *) LIBOBJS="$LIBOBJS strtoul.$ac_objext"
10040 ;;
7f947b68 10041esac
1b1fe467
CR
10042
10043fi
10044
10045ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
10046if test "x$ac_cv_func_strtoll" = xyes; then :
10047 $as_echo "#define HAVE_STRTOLL 1" >>confdefs.h
10048
2dead0c4 10049else
1b1fe467
CR
10050 case " $LIBOBJS " in
10051 *" strtoll.$ac_objext "* ) ;;
10052 *) LIBOBJS="$LIBOBJS strtoll.$ac_objext"
10053 ;;
10054esac
2dead0c4 10055
7f947b68 10056fi
2dead0c4 10057
1b1fe467
CR
10058ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
10059if test "x$ac_cv_func_strtoull" = xyes; then :
10060 $as_echo "#define HAVE_STRTOULL 1" >>confdefs.h
10061
7f947b68 10062else
1b1fe467
CR
10063 case " $LIBOBJS " in
10064 *" strtoull.$ac_objext "* ) ;;
10065 *) LIBOBJS="$LIBOBJS strtoull.$ac_objext"
10066 ;;
10067esac
7f947b68
CR
10068
10069fi
10070
1b1fe467
CR
10071ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
10072if test "x$ac_cv_func_strtoimax" = xyes; then :
10073 $as_echo "#define HAVE_STRTOIMAX 1" >>confdefs.h
10074
10075else
10076 case " $LIBOBJS " in
10077 *" strtoimax.$ac_objext "* ) ;;
10078 *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext"
10079 ;;
10080esac
10081
2dead0c4 10082fi
7f947b68 10083
1b1fe467
CR
10084ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax"
10085if test "x$ac_cv_func_strtoumax" = xyes; then :
10086 $as_echo "#define HAVE_STRTOUMAX 1" >>confdefs.h
7f947b68 10087
1b1fe467
CR
10088else
10089 case " $LIBOBJS " in
10090 *" strtoumax.$ac_objext "* ) ;;
10091 *) LIBOBJS="$LIBOBJS strtoumax.$ac_objext"
10092 ;;
7f947b68 10093esac
1b1fe467
CR
10094
10095fi
10096
10097
10098ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf"
10099if test "x$ac_cv_func_dprintf" = xyes; then :
10100 $as_echo "#define HAVE_DPRINTF 1" >>confdefs.h
10101
7f947b68 10102else
1b1fe467
CR
10103 case " $LIBOBJS " in
10104 *" dprintf.$ac_objext "* ) ;;
10105 *) LIBOBJS="$LIBOBJS dprintf.$ac_objext"
10106 ;;
10107esac
7f947b68 10108
abe2eb5b 10109fi
2dead0c4 10110
1b1fe467
CR
10111
10112ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
10113if test "x$ac_cv_func_strchrnul" = xyes; then :
10114 $as_echo "#define HAVE_STRCHRNUL 1" >>confdefs.h
10115
10116else
10117 case " $LIBOBJS " in
10118 *" strchrnul.$ac_objext "* ) ;;
10119 *) LIBOBJS="$LIBOBJS strchrnul.$ac_objext"
10120 ;;
7f947b68 10121esac
1b1fe467
CR
10122
10123fi
10124
10125
67440bc5
CR
10126ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10127if test "x$ac_cv_func_strdup" = xyes; then :
10128 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10129
10130else
10131 case " $LIBOBJS " in
10132 *" strdup.$ac_objext "* ) ;;
10133 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10134 ;;
10135esac
10136
10137fi
10138
10139
1b1fe467 10140
54a5fbe1
CR
10141for ac_header in libaudit.h
10142do :
10143 ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
10144if test "x$ac_cv_header_libaudit_h" = xyes; then :
10145 cat >>confdefs.h <<_ACEOF
10146#define HAVE_LIBAUDIT_H 1
10147_ACEOF
10148
10149fi
10150
10151done
10152
1b1fe467
CR
10153ac_fn_c_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include <linux/audit.h>
10154"
10155if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes; then :
10156 ac_have_decl=1
ccc6cda3 10157else
1b1fe467
CR
10158 ac_have_decl=0
10159fi
10160
10161cat >>confdefs.h <<_ACEOF
10162#define HAVE_DECL_AUDIT_USER_TTY $ac_have_decl
7175a77f 10163_ACEOF
2dead0c4 10164
7610e0c5 10165
1b1fe467
CR
10166ac_fn_c_check_decl "$LINENO" "confstr" "ac_cv_have_decl_confstr" "$ac_includes_default"
10167if test "x$ac_cv_have_decl_confstr" = xyes; then :
10168 ac_have_decl=1
7175a77f 10169else
1b1fe467 10170 ac_have_decl=0
2dead0c4 10171fi
1b1fe467
CR
10172
10173cat >>confdefs.h <<_ACEOF
10174#define HAVE_DECL_CONFSTR $ac_have_decl
10175_ACEOF
10176
10177ac_fn_c_check_decl "$LINENO" "printf" "ac_cv_have_decl_printf" "$ac_includes_default"
10178if test "x$ac_cv_have_decl_printf" = xyes; then :
10179 ac_have_decl=1
10180else
10181 ac_have_decl=0
7175a77f 10182fi
7f947b68 10183
1b1fe467
CR
10184cat >>confdefs.h <<_ACEOF
10185#define HAVE_DECL_PRINTF $ac_have_decl
10186_ACEOF
7f947b68 10187
1b1fe467
CR
10188ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default"
10189if test "x$ac_cv_have_decl_sbrk" = xyes; then :
10190 ac_have_decl=1
10191else
10192 ac_have_decl=0
10193fi
7f947b68 10194
abe2eb5b 10195cat >>confdefs.h <<_ACEOF
1b1fe467 10196#define HAVE_DECL_SBRK $ac_have_decl
2dead0c4 10197_ACEOF
c920c360 10198
1b1fe467
CR
10199ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default"
10200if test "x$ac_cv_have_decl_setregid" = xyes; then :
10201 ac_have_decl=1
10202else
10203 ac_have_decl=0
10204fi
c920c360 10205
1b1fe467
CR
10206cat >>confdefs.h <<_ACEOF
10207#define HAVE_DECL_SETREGID $ac_have_decl
10208_ACEOF
10209
10210ac_fn_c_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" "$ac_includes_default"
10211if test "x$ac_cv_have_decl_strcpy" = xyes; then :
10212 ac_have_decl=1
c920c360 10213else
1b1fe467
CR
10214 ac_have_decl=0
10215fi
10216
10217cat >>confdefs.h <<_ACEOF
10218#define HAVE_DECL_STRCPY $ac_have_decl
2dead0c4 10219_ACEOF
c920c360 10220
1b1fe467
CR
10221ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
10222if test "x$ac_cv_have_decl_strsignal" = xyes; then :
10223 ac_have_decl=1
10224else
10225 ac_have_decl=0
10226fi
10227
10228cat >>confdefs.h <<_ACEOF
10229#define HAVE_DECL_STRSIGNAL $ac_have_decl
7175a77f 10230_ACEOF
1b1fe467
CR
10231
10232
10233ac_fn_c_check_decl "$LINENO" "strtold" "ac_cv_have_decl_strtold" "$ac_includes_default"
10234if test "x$ac_cv_have_decl_strtold" = xyes; then :
10235 ac_have_decl=1
10236else
10237 ac_have_decl=0
10238fi
10239
10240cat >>confdefs.h <<_ACEOF
10241#define HAVE_DECL_STRTOLD $ac_have_decl
7f947b68 10242_ACEOF
1b1fe467
CR
10243if test $ac_have_decl = 1; then :
10244
10245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken strtold" >&5
10246$as_echo_n "checking for broken strtold... " >&6; }
10247 if ${bash_cv_strtold_broken+:} false; then :
10248 $as_echo_n "(cached) " >&6
10249else
10250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 10251/* end confdefs.h. */
1b1fe467 10252#include <stdlib.h>
7175a77f
CR
10253int
10254main ()
10255{
1b1fe467 10256int main() { long double r; char *foo, bar; r = strtold(foo, &bar);}
7175a77f
CR
10257 ;
10258 return 0;
10259}
10260_ACEOF
1b1fe467
CR
10261if ac_fn_c_try_compile "$LINENO"; then :
10262 bash_cv_strtold_broken=no
abe2eb5b 10263else
1b1fe467
CR
10264 bash_cv_strtold_broken=yes
10265fi
10266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10267
2dead0c4 10268
7175a77f 10269fi
2dead0c4 10270
1b1fe467
CR
10271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_strtold_broken" >&5
10272$as_echo "$bash_cv_strtold_broken" >&6; }
10273 if test "$bash_cv_strtold_broken" = "yes" ; then
10274 $as_echo "#define STRTOLD_BROKEN 1" >>confdefs.h
71412226 10275
1b1fe467
CR
10276 fi
10277
10278fi
10279
10280
10281
10282
10283
10284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoimax" >&5
10285$as_echo_n "checking for declaration of strtoimax... " >&6; }
10286if ${bash_cv_decl_strtoimax+:} false; then :
10287 $as_echo_n "(cached) " >&6
10288else
10289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 10290/* end confdefs.h. */
1b1fe467
CR
10291
10292#if STDC_HEADERS
10293# include <stdlib.h>
10294#endif
10295#if HAVE_INTTYPES_H
10296# include <inttypes.h>
10297#endif
10298
7175a77f
CR
10299int
10300main ()
10301{
1b1fe467 10302return !strtoimax;
7175a77f
CR
10303 ;
10304 return 0;
10305}
e3db237e 10306_ACEOF
1b1fe467
CR
10307if ac_fn_c_try_link "$LINENO"; then :
10308 bash_cv_decl_strtoimax=yes
10309else
10310 bash_cv_decl_strtoimax=no
10311fi
10312rm -f core conftest.err conftest.$ac_objext \
10313 conftest$ac_exeext conftest.$ac_ext
10314fi
10315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoimax" >&5
10316$as_echo "$bash_cv_decl_strtoimax" >&6; }
10317bash_tr_func=HAVE_DECL_`echo strtoimax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10318if test $bash_cv_decl_strtoimax = yes; then
10319 cat >>confdefs.h <<_ACEOF
10320#define $bash_tr_func 1
10321_ACEOF
10322
10323else
10324 cat >>confdefs.h <<_ACEOF
10325#define $bash_tr_func 0
7175a77f 10326_ACEOF
1b1fe467
CR
10327
10328fi
10329
10330
10331
10332
10333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtol" >&5
10334$as_echo_n "checking for declaration of strtol... " >&6; }
10335if ${bash_cv_decl_strtol+:} false; then :
10336 $as_echo_n "(cached) " >&6
10337else
10338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 10339/* end confdefs.h. */
1b1fe467
CR
10340
10341#if STDC_HEADERS
10342# include <stdlib.h>
10343#endif
10344#if HAVE_INTTYPES_H
10345# include <inttypes.h>
10346#endif
10347
7175a77f
CR
10348int
10349main ()
10350{
1b1fe467 10351return !strtol;
7175a77f
CR
10352 ;
10353 return 0;
10354}
10355_ACEOF
1b1fe467
CR
10356if ac_fn_c_try_link "$LINENO"; then :
10357 bash_cv_decl_strtol=yes
7f947b68 10358else
1b1fe467 10359 bash_cv_decl_strtol=no
abe2eb5b 10360fi
1b1fe467
CR
10361rm -f core conftest.err conftest.$ac_objext \
10362 conftest$ac_exeext conftest.$ac_ext
10363fi
10364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtol" >&5
10365$as_echo "$bash_cv_decl_strtol" >&6; }
10366bash_tr_func=HAVE_DECL_`echo strtol | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10367if test $bash_cv_decl_strtol = yes; then
10368 cat >>confdefs.h <<_ACEOF
10369#define $bash_tr_func 1
10370_ACEOF
71412226 10371
7175a77f 10372else
1b1fe467
CR
10373 cat >>confdefs.h <<_ACEOF
10374#define $bash_tr_func 0
10375_ACEOF
71412226 10376
7175a77f 10377fi
ccc6cda3 10378
7f947b68 10379
1b1fe467
CR
10380
10381
10382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoll" >&5
10383$as_echo_n "checking for declaration of strtoll... " >&6; }
10384if ${bash_cv_decl_strtoll+:} false; then :
10385 $as_echo_n "(cached) " >&6
10386else
10387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 10388/* end confdefs.h. */
1b1fe467
CR
10389
10390#if STDC_HEADERS
10391# include <stdlib.h>
10392#endif
10393#if HAVE_INTTYPES_H
10394# include <inttypes.h>
10395#endif
10396
abe2eb5b 10397int
7f947b68
CR
10398main ()
10399{
1b1fe467 10400return !strtoll;
7f947b68
CR
10401 ;
10402 return 0;
10403}
10404_ACEOF
1b1fe467
CR
10405if ac_fn_c_try_link "$LINENO"; then :
10406 bash_cv_decl_strtoll=yes
e3db237e 10407else
1b1fe467
CR
10408 bash_cv_decl_strtoll=no
10409fi
10410rm -f core conftest.err conftest.$ac_objext \
10411 conftest$ac_exeext conftest.$ac_ext
abe2eb5b 10412fi
1b1fe467
CR
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoll" >&5
10414$as_echo "$bash_cv_decl_strtoll" >&6; }
10415bash_tr_func=HAVE_DECL_`echo strtoll | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10416if test $bash_cv_decl_strtoll = yes; then
10417 cat >>confdefs.h <<_ACEOF
10418#define $bash_tr_func 1
10419_ACEOF
abe2eb5b 10420
c920c360 10421else
1b1fe467
CR
10422 cat >>confdefs.h <<_ACEOF
10423#define $bash_tr_func 0
7175a77f 10424_ACEOF
1b1fe467
CR
10425
10426fi
10427
10428
10429
10430
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoul" >&5
10432$as_echo_n "checking for declaration of strtoul... " >&6; }
10433if ${bash_cv_decl_strtoul+:} false; then :
10434 $as_echo_n "(cached) " >&6
10435else
10436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e3db237e 10437/* end confdefs.h. */
1b1fe467
CR
10438
10439#if STDC_HEADERS
10440# include <stdlib.h>
10441#endif
10442#if HAVE_INTTYPES_H
10443# include <inttypes.h>
10444#endif
10445
e3db237e
CR
10446int
10447main ()
10448{
1b1fe467 10449return !strtoul;
e3db237e
CR
10450 ;
10451 return 0;
10452}
10453_ACEOF
1b1fe467
CR
10454if ac_fn_c_try_link "$LINENO"; then :
10455 bash_cv_decl_strtoul=yes
7f947b68 10456else
1b1fe467
CR
10457 bash_cv_decl_strtoul=no
10458fi
10459rm -f core conftest.err conftest.$ac_objext \
10460 conftest$ac_exeext conftest.$ac_ext
10461fi
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoul" >&5
10463$as_echo "$bash_cv_decl_strtoul" >&6; }
10464bash_tr_func=HAVE_DECL_`echo strtoul | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10465if test $bash_cv_decl_strtoul = yes; then
10466 cat >>confdefs.h <<_ACEOF
10467#define $bash_tr_func 1
10468_ACEOF
10469
10470else
10471 cat >>confdefs.h <<_ACEOF
10472#define $bash_tr_func 0
10473_ACEOF
7175a77f 10474
7f947b68 10475fi
7175a77f 10476
7f947b68
CR
10477
10478
7f947b68 10479
1b1fe467
CR
10480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoull" >&5
10481$as_echo_n "checking for declaration of strtoull... " >&6; }
10482if ${bash_cv_decl_strtoull+:} false; then :
7f947b68
CR
10483 $as_echo_n "(cached) " >&6
10484else
1b1fe467 10485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e3db237e 10486/* end confdefs.h. */
1b1fe467
CR
10487
10488#if STDC_HEADERS
10489# include <stdlib.h>
10490#endif
10491#if HAVE_INTTYPES_H
10492# include <inttypes.h>
10493#endif
10494
e3db237e
CR
10495int
10496main ()
10497{
1b1fe467 10498return !strtoull;
e3db237e
CR
10499 ;
10500 return 0;
10501}
7610e0c5 10502_ACEOF
1b1fe467
CR
10503if ac_fn_c_try_link "$LINENO"; then :
10504 bash_cv_decl_strtoull=yes
10505else
10506 bash_cv_decl_strtoull=no
10507fi
10508rm -f core conftest.err conftest.$ac_objext \
10509 conftest$ac_exeext conftest.$ac_ext
10510fi
10511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoull" >&5
10512$as_echo "$bash_cv_decl_strtoull" >&6; }
10513bash_tr_func=HAVE_DECL_`echo strtoull | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10514if test $bash_cv_decl_strtoull = yes; then
10515 cat >>confdefs.h <<_ACEOF
10516#define $bash_tr_func 1
10517_ACEOF
10518
10519else
10520 cat >>confdefs.h <<_ACEOF
10521#define $bash_tr_func 0
7f947b68 10522_ACEOF
1b1fe467
CR
10523
10524fi
10525
10526
10527
10528
10529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoumax" >&5
10530$as_echo_n "checking for declaration of strtoumax... " >&6; }
10531if ${bash_cv_decl_strtoumax+:} false; then :
10532 $as_echo_n "(cached) " >&6
10533else
10534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e3db237e 10535/* end confdefs.h. */
1b1fe467
CR
10536
10537#if STDC_HEADERS
10538# include <stdlib.h>
10539#endif
10540#if HAVE_INTTYPES_H
10541# include <inttypes.h>
10542#endif
10543
e3db237e
CR
10544int
10545main ()
10546{
1b1fe467 10547return !strtoumax;
e3db237e
CR
10548 ;
10549 return 0;
10550}
f73dda09 10551_ACEOF
1b1fe467
CR
10552if ac_fn_c_try_link "$LINENO"; then :
10553 bash_cv_decl_strtoumax=yes
7f947b68 10554else
1b1fe467
CR
10555 bash_cv_decl_strtoumax=no
10556fi
10557rm -f core conftest.err conftest.$ac_objext \
10558 conftest$ac_exeext conftest.$ac_ext
10559fi
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoumax" >&5
10561$as_echo "$bash_cv_decl_strtoumax" >&6; }
10562bash_tr_func=HAVE_DECL_`echo strtoumax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10563if test $bash_cv_decl_strtoumax = yes; then
10564 cat >>confdefs.h <<_ACEOF
10565#define $bash_tr_func 1
10566_ACEOF
10567
10568else
10569 cat >>confdefs.h <<_ACEOF
10570#define $bash_tr_func 0
10571_ACEOF
7f947b68
CR
10572
10573fi
10574
1b1fe467
CR
10575
10576
10577
10578
10579
10580
10581 for ac_func in $ac_func_list
10582do :
10583 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10584ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10585if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10586 cat >>confdefs.h <<_ACEOF
10587#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10588_ACEOF
10589
10590fi
10591done
10592
10593
10594
10595
10596
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
10598$as_echo_n "checking for working mktime... " >&6; }
10599if ${ac_cv_func_working_mktime+:} false; then :
10600 $as_echo_n "(cached) " >&6
7f947b68 10601else
1b1fe467
CR
10602 if test "$cross_compiling" = yes; then :
10603 ac_cv_func_working_mktime=no
10604else
10605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10606/* end confdefs.h. */
10607/* Test program from Paul Eggert and Tony Leneis. */
10608#ifdef TIME_WITH_SYS_TIME
10609# include <sys/time.h>
10610# include <time.h>
10611#else
10612# ifdef HAVE_SYS_TIME_H
10613# include <sys/time.h>
10614# else
10615# include <time.h>
10616# endif
10617#endif
10618
10619#include <limits.h>
10620#include <stdlib.h>
10621
10622#ifdef HAVE_UNISTD_H
10623# include <unistd.h>
10624#endif
10625
10626#ifndef HAVE_ALARM
10627# define alarm(X) /* empty */
10628#endif
10629
10630/* Work around redefinition to rpl_putenv by other config tests. */
10631#undef putenv
10632
10633static time_t time_t_max;
10634static time_t time_t_min;
10635
10636/* Values we'll use to set the TZ environment variable. */
10637static const char *tz_strings[] = {
10638 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
10639 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
10640};
10641#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
10642
10643/* Return 0 if mktime fails to convert a date in the spring-forward gap.
10644 Based on a problem report from Andreas Jaeger. */
10645static int
10646spring_forward_gap ()
10647{
10648 /* glibc (up to about 1998-10-07) failed this test. */
10649 struct tm tm;
10650
10651 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
10652 instead of "TZ=America/Vancouver" in order to detect the bug even
10653 on systems that don't support the Olson extension, or don't have the
10654 full zoneinfo tables installed. */
10655 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
10656
10657 tm.tm_year = 98;
10658 tm.tm_mon = 3;
10659 tm.tm_mday = 5;
10660 tm.tm_hour = 2;
10661 tm.tm_min = 0;
10662 tm.tm_sec = 0;
10663 tm.tm_isdst = -1;
10664 return mktime (&tm) != (time_t) -1;
10665}
10666
10667static int
10668mktime_test1 (time_t now)
10669{
10670 struct tm *lt;
10671 return ! (lt = localtime (&now)) || mktime (lt) == now;
10672}
10673
10674static int
10675mktime_test (time_t now)
10676{
10677 return (mktime_test1 (now)
10678 && mktime_test1 ((time_t) (time_t_max - now))
10679 && mktime_test1 ((time_t) (time_t_min + now)));
10680}
10681
10682static int
10683irix_6_4_bug ()
10684{
10685 /* Based on code from Ariel Faigon. */
10686 struct tm tm;
10687 tm.tm_year = 96;
10688 tm.tm_mon = 3;
10689 tm.tm_mday = 0;
10690 tm.tm_hour = 0;
10691 tm.tm_min = 0;
10692 tm.tm_sec = 0;
10693 tm.tm_isdst = -1;
10694 mktime (&tm);
10695 return tm.tm_mon == 2 && tm.tm_mday == 31;
10696}
10697
10698static int
10699bigtime_test (int j)
10700{
10701 struct tm tm;
10702 time_t now;
10703 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
10704 now = mktime (&tm);
10705 if (now != (time_t) -1)
10706 {
10707 struct tm *lt = localtime (&now);
10708 if (! (lt
10709 && lt->tm_year == tm.tm_year
10710 && lt->tm_mon == tm.tm_mon
10711 && lt->tm_mday == tm.tm_mday
10712 && lt->tm_hour == tm.tm_hour
10713 && lt->tm_min == tm.tm_min
10714 && lt->tm_sec == tm.tm_sec
10715 && lt->tm_yday == tm.tm_yday
10716 && lt->tm_wday == tm.tm_wday
10717 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
10718 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
10719 return 0;
10720 }
10721 return 1;
10722}
10723
10724static int
10725year_2050_test ()
10726{
10727 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
10728 ignoring leap seconds. */
10729 unsigned long int answer = 2527315200UL;
10730
10731 struct tm tm;
10732 time_t t;
10733 tm.tm_year = 2050 - 1900;
10734 tm.tm_mon = 2 - 1;
10735 tm.tm_mday = 1;
10736 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
10737 tm.tm_isdst = -1;
10738
10739 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
10740 instead of "TZ=America/Vancouver" in order to detect the bug even
10741 on systems that don't support the Olson extension, or don't have the
10742 full zoneinfo tables installed. */
10743 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
7f947b68 10744
1b1fe467 10745 t = mktime (&tm);
7f947b68 10746
1b1fe467
CR
10747 /* Check that the result is either a failure, or close enough
10748 to the correct answer that we can assume the discrepancy is
10749 due to leap seconds. */
10750 return (t == (time_t) -1
10751 || (0 < t && answer - 120 <= t && t <= answer + 120));
7175a77f 10752}
1b1fe467 10753
abe2eb5b
CR
10754int
10755main ()
10756{
1b1fe467
CR
10757 time_t t, delta;
10758 int i, j;
7175a77f 10759
1b1fe467
CR
10760 /* This test makes some buggy mktime implementations loop.
10761 Give up after 60 seconds; a mktime slower than that
10762 isn't worth using anyway. */
10763 alarm (60);
10764
10765 for (;;)
10766 {
10767 t = (time_t_max << 1) + 1;
10768 if (t <= time_t_max)
10769 break;
10770 time_t_max = t;
10771 }
10772 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
10773
10774 delta = time_t_max / 997; /* a suitable prime number */
10775 for (i = 0; i < N_STRINGS; i++)
10776 {
10777 if (tz_strings[i])
10778 putenv ((char*) tz_strings[i]);
10779
10780 for (t = 0; t <= time_t_max - delta; t += delta)
10781 if (! mktime_test (t))
10782 return 1;
10783 if (! (mktime_test ((time_t) 1)
10784 && mktime_test ((time_t) (60 * 60))
10785 && mktime_test ((time_t) (60 * 60 * 24))))
10786 return 1;
10787
10788 for (j = 1; ; j <<= 1)
10789 if (! bigtime_test (j))
10790 return 1;
10791 else if (INT_MAX / 2 < j)
10792 break;
10793 if (! bigtime_test (INT_MAX))
10794 return 1;
10795 }
10796 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
abe2eb5b
CR
10797}
10798_ACEOF
1b1fe467
CR
10799if ac_fn_c_try_run "$LINENO"; then :
10800 ac_cv_func_working_mktime=yes
e3db237e 10801else
1b1fe467
CR
10802 ac_cv_func_working_mktime=no
10803fi
10804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10805 conftest.$ac_objext conftest.beam conftest.$ac_ext
c920c360
CR
10806fi
10807
ccc6cda3 10808fi
1b1fe467
CR
10809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
10810$as_echo "$ac_cv_func_working_mktime" >&6; }
10811if test $ac_cv_func_working_mktime = no; then
10812 case " $LIBOBJS " in
10813 *" mktime.$ac_objext "* ) ;;
10814 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
10815 ;;
10816esac
c920c360 10817
7175a77f 10818fi
abe2eb5b 10819
7175a77f 10820
1b1fe467
CR
10821
10822for ac_header in argz.h errno.h fcntl.h malloc.h stdio_ext.h
10823do :
10824 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10825ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10826if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10827 cat >>confdefs.h <<_ACEOF
10828#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
e3db237e 10829_ACEOF
7f947b68
CR
10830
10831fi
10832
7175a77f 10833done
7175a77f 10834
7175a77f 10835
1b1fe467
CR
10836
10837for ac_func in getpagesize
10838do :
10839 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10840if test "x$ac_cv_func_getpagesize" = xyes; then :
10841 cat >>confdefs.h <<_ACEOF
10842#define HAVE_GETPAGESIZE 1
abe2eb5b 10843_ACEOF
7175a77f 10844
c920c360 10845fi
1b1fe467 10846done
2dead0c4 10847
1b1fe467
CR
10848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10849$as_echo_n "checking for working mmap... " >&6; }
10850if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
10851 $as_echo_n "(cached) " >&6
10852else
10853 if test "$cross_compiling" = yes; then :
10854 ac_cv_func_mmap_fixed_mapped=no
10855else
10856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10857/* end confdefs.h. */
10858$ac_includes_default
10859/* malloc might have been renamed as rpl_malloc. */
10860#undef malloc
7610e0c5 10861
1b1fe467
CR
10862/* Thanks to Mike Haertel and Jim Avera for this test.
10863 Here is a matrix of mmap possibilities:
10864 mmap private not fixed
10865 mmap private fixed at somewhere currently unmapped
10866 mmap private fixed at somewhere already mapped
10867 mmap shared not fixed
10868 mmap shared fixed at somewhere currently unmapped
10869 mmap shared fixed at somewhere already mapped
10870 For private mappings, we should verify that changes cannot be read()
10871 back from the file, nor mmap's back from the file at a different
10872 address. (There have been systems where private was not correctly
10873 implemented like the infamous i386 svr4.0, and systems where the
10874 VM page cache was not coherent with the file system buffer cache
10875 like early versions of FreeBSD and possibly contemporary NetBSD.)
10876 For shared mappings, we should conversely verify that changes get
10877 propagated back to all the places they're supposed to be.
7f947b68 10878
1b1fe467
CR
10879 Grep wants private fixed already mapped.
10880 The main things grep needs to know about mmap are:
10881 * does it exist and is it safe to write into the mmap'd area
10882 * how to use it (BSD variants) */
10883
10884#include <fcntl.h>
10885#include <sys/mman.h>
10886
10887#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10888char *malloc ();
10889#endif
10890
10891/* This mess was copied from the GNU getpagesize.h. */
10892#ifndef HAVE_GETPAGESIZE
10893# ifdef _SC_PAGESIZE
10894# define getpagesize() sysconf(_SC_PAGESIZE)
10895# else /* no _SC_PAGESIZE */
10896# ifdef HAVE_SYS_PARAM_H
10897# include <sys/param.h>
10898# ifdef EXEC_PAGESIZE
10899# define getpagesize() EXEC_PAGESIZE
10900# else /* no EXEC_PAGESIZE */
10901# ifdef NBPG
10902# define getpagesize() NBPG * CLSIZE
10903# ifndef CLSIZE
10904# define CLSIZE 1
10905# endif /* no CLSIZE */
10906# else /* no NBPG */
10907# ifdef NBPC
10908# define getpagesize() NBPC
10909# else /* no NBPC */
10910# ifdef PAGESIZE
10911# define getpagesize() PAGESIZE
10912# endif /* PAGESIZE */
10913# endif /* no NBPC */
10914# endif /* no NBPG */
10915# endif /* no EXEC_PAGESIZE */
10916# else /* no HAVE_SYS_PARAM_H */
10917# define getpagesize() 8192 /* punt totally */
10918# endif /* no HAVE_SYS_PARAM_H */
10919# endif /* no _SC_PAGESIZE */
2dead0c4 10920
1b1fe467 10921#endif /* no HAVE_GETPAGESIZE */
7f947b68 10922
7175a77f
CR
10923int
10924main ()
10925{
1b1fe467
CR
10926 char *data, *data2, *data3;
10927 const char *cdata2;
10928 int i, pagesize;
10929 int fd, fd2;
7f947b68 10930
1b1fe467 10931 pagesize = getpagesize ();
7175a77f 10932
1b1fe467
CR
10933 /* First, make a file with some known garbage in it. */
10934 data = (char *) malloc (pagesize);
10935 if (!data)
10936 return 1;
10937 for (i = 0; i < pagesize; ++i)
10938 *(data + i) = rand ();
10939 umask (0);
10940 fd = creat ("conftest.mmap", 0600);
10941 if (fd < 0)
10942 return 2;
10943 if (write (fd, data, pagesize) != pagesize)
10944 return 3;
10945 close (fd);
10946
10947 /* Next, check that the tail of a page is zero-filled. File must have
10948 non-zero length, otherwise we risk SIGBUS for entire page. */
10949 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10950 if (fd2 < 0)
10951 return 4;
10952 cdata2 = "";
10953 if (write (fd2, cdata2, 1) != 1)
10954 return 5;
10955 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10956 if (data2 == MAP_FAILED)
10957 return 6;
10958 for (i = 0; i < pagesize; ++i)
10959 if (*(data2 + i))
10960 return 7;
10961 close (fd2);
10962 if (munmap (data2, pagesize))
10963 return 8;
10964
10965 /* Next, try to mmap the file at a fixed address which already has
10966 something else allocated at it. If we can, also make sure that
10967 we see the same garbage. */
10968 fd = open ("conftest.mmap", O_RDWR);
10969 if (fd < 0)
10970 return 9;
10971 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10972 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10973 return 10;
10974 for (i = 0; i < pagesize; ++i)
10975 if (*(data + i) != *(data2 + i))
10976 return 11;
10977
10978 /* Finally, make sure that changes to the mapped area do not
10979 percolate back to the file as seen by read(). (This is a bug on
10980 some variants of i386 svr4.0.) */
10981 for (i = 0; i < pagesize; ++i)
10982 *(data2 + i) = *(data2 + i) + 1;
10983 data3 = (char *) malloc (pagesize);
10984 if (!data3)
10985 return 12;
10986 if (read (fd, data3, pagesize) != pagesize)
10987 return 13;
10988 for (i = 0; i < pagesize; ++i)
10989 if (*(data + i) != *(data3 + i))
10990 return 14;
10991 close (fd);
7175a77f
CR
10992 return 0;
10993}
10994_ACEOF
1b1fe467
CR
10995if ac_fn_c_try_run "$LINENO"; then :
10996 ac_cv_func_mmap_fixed_mapped=yes
7175a77f 10997else
1b1fe467
CR
10998 ac_cv_func_mmap_fixed_mapped=no
10999fi
11000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11001 conftest.$ac_objext conftest.beam conftest.$ac_ext
7175a77f 11002fi
7f947b68 11003
1b1fe467
CR
11004fi
11005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11006$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
11007if test $ac_cv_func_mmap_fixed_mapped = yes; then
7f947b68 11008
1b1fe467 11009$as_echo "#define HAVE_MMAP 1" >>confdefs.h
7f947b68 11010
1b1fe467
CR
11011fi
11012rm -f conftest.mmap conftest.txt
7f947b68 11013
1b1fe467 11014for ac_func in __argz_count __argz_next __argz_stringify dcgettext mempcpy \
67440bc5 11015 munmap stpcpy strcspn
1b1fe467
CR
11016do :
11017 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11018ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11019if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11020 cat >>confdefs.h <<_ACEOF
11021#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7175a77f 11022_ACEOF
7f947b68 11023
7175a77f 11024fi
1b1fe467 11025done
7f947b68 11026
7f947b68 11027
1b1fe467
CR
11028INTL_DEP= INTL_INC= LIBINTL_H=
11029if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then
11030 INTL_DEP='${INTL_LIBDIR}/libintl.a'
11031 INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}'
11032 LIBINTL_H='${INTL_BUILDDIR}/libintl.h'
7175a77f 11033fi
7f947b68 11034
7f947b68 11035
7175a77f 11036
1b1fe467
CR
11037
11038
11039
11040for ac_header in wctype.h
11041do :
11042 ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
11043if test "x$ac_cv_header_wctype_h" = xyes; then :
11044 cat >>confdefs.h <<_ACEOF
11045#define HAVE_WCTYPE_H 1
7175a77f 11046_ACEOF
7175a77f 11047
7175a77f 11048fi
7f947b68 11049
7175a77f 11050done
1b1fe467
CR
11051
11052for ac_header in wchar.h
11053do :
11054 ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11055if test "x$ac_cv_header_wchar_h" = xyes; then :
11056 cat >>confdefs.h <<_ACEOF
11057#define HAVE_WCHAR_H 1
7175a77f 11058_ACEOF
7f947b68 11059
1b1fe467 11060fi
7175a77f 11061
1b1fe467
CR
11062done
11063
11064for ac_header in langinfo.h
11065do :
11066 ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
11067if test "x$ac_cv_header_langinfo_h" = xyes; then :
11068 cat >>confdefs.h <<_ACEOF
11069#define HAVE_LANGINFO_H 1
11070_ACEOF
7175a77f 11071
7f947b68 11072fi
1b1fe467
CR
11073
11074done
11075
11076
c4c90ef8
CR
11077for ac_header in mbstr.h
11078do :
11079 ac_fn_c_check_header_mongrel "$LINENO" "mbstr.h" "ac_cv_header_mbstr_h" "$ac_includes_default"
11080if test "x$ac_cv_header_mbstr_h" = xyes; then :
11081 cat >>confdefs.h <<_ACEOF
11082#define HAVE_MBSTR_H 1
11083_ACEOF
11084
11085fi
11086
11087done
11088
11089
1b1fe467
CR
11090ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen"
11091if test "x$ac_cv_func_mbrlen" = xyes; then :
11092 $as_echo "#define HAVE_MBRLEN 1" >>confdefs.h
11093
7f947b68 11094fi
1b1fe467
CR
11095
11096ac_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp"
11097if test "x$ac_cv_func_mbscasecmp" = xyes; then :
11098 $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h
11099
7f947b68 11100fi
7175a77f 11101
1b1fe467
CR
11102ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp"
11103if test "x$ac_cv_func_mbscmp" = xyes; then :
11104 $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h
7610e0c5 11105
1b1fe467 11106fi
a82a04b3 11107
1b1fe467
CR
11108ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs"
11109if test "x$ac_cv_func_mbsnrtowcs" = xyes; then :
11110 $as_echo "#define HAVE_MBSNRTOWCS 1" >>confdefs.h
71412226 11111
1b1fe467 11112fi
f73dda09 11113
1b1fe467
CR
11114ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs"
11115if test "x$ac_cv_func_mbsrtowcs" = xyes; then :
11116 $as_echo "#define HAVE_MBSRTOWCS 1" >>confdefs.h
11117
11118fi
11119
11120
11121ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr"
11122if test "x$ac_cv_func_mbschr" = xyes; then :
11123 $as_echo "#define HAVE_MBSCHR 1" >>confdefs.h
7175a77f 11124
7175a77f 11125else
1b1fe467
CR
11126 case " $LIBOBJS " in
11127 *" mbschr.$ac_objext "* ) ;;
11128 *) LIBOBJS="$LIBOBJS mbschr.$ac_objext"
11129 ;;
7175a77f 11130esac
a82a04b3 11131
abe2eb5b 11132fi
7610e0c5 11133
7f947b68
CR
11134
11135
1b1fe467
CR
11136ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
11137if test "x$ac_cv_func_wcrtomb" = xyes; then :
11138 $as_echo "#define HAVE_WCRTOMB 1" >>confdefs.h
11139
7175a77f 11140fi
7f947b68 11141
1b1fe467
CR
11142ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll"
11143if test "x$ac_cv_func_wcscoll" = xyes; then :
11144 $as_echo "#define HAVE_WCSCOLL 1" >>confdefs.h
11145
7175a77f 11146fi
7175a77f 11147
1b1fe467
CR
11148ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup"
11149if test "x$ac_cv_func_wcsdup" = xyes; then :
11150 $as_echo "#define HAVE_WCSDUP 1" >>confdefs.h
f73dda09 11151
2dead0c4
CR
11152fi
11153
1b1fe467
CR
11154ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth"
11155if test "x$ac_cv_func_wcwidth" = xyes; then :
11156 $as_echo "#define HAVE_WCWIDTH 1" >>confdefs.h
11157
11158fi
11159
11160ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
11161if test "x$ac_cv_func_wctype" = xyes; then :
11162 $as_echo "#define HAVE_WCTYPE 1" >>confdefs.h
11163
11164fi
11165
11166
11167ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth"
11168if test "x$ac_cv_func_wcswidth" = xyes; then :
11169 $as_echo "#define HAVE_WCSWIDTH 1" >>confdefs.h
11170
e3db237e 11171else
1b1fe467
CR
11172 case " $LIBOBJS " in
11173 *" wcswidth.$ac_objext "* ) ;;
11174 *) LIBOBJS="$LIBOBJS wcswidth.$ac_objext"
11175 ;;
7175a77f 11176esac
1b1fe467
CR
11177
11178fi
11179
11180
11181
11182
11183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
11184$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
11185if ${ac_cv_func_mbrtowc+:} false; then :
11186 $as_echo_n "(cached) " >&6
11187else
11188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 11189/* end confdefs.h. */
1b1fe467 11190#include <wchar.h>
7175a77f
CR
11191int
11192main ()
11193{
1b1fe467
CR
11194wchar_t wc;
11195 char const s[] = "";
11196 size_t n = 1;
11197 mbstate_t state;
11198 return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
7175a77f
CR
11199 ;
11200 return 0;
11201}
11202_ACEOF
1b1fe467
CR
11203if ac_fn_c_try_link "$LINENO"; then :
11204 ac_cv_func_mbrtowc=yes
7175a77f 11205else
1b1fe467
CR
11206 ac_cv_func_mbrtowc=no
11207fi
11208rm -f core conftest.err conftest.$ac_objext \
11209 conftest$ac_exeext conftest.$ac_ext
7175a77f 11210fi
1b1fe467
CR
11211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
11212$as_echo "$ac_cv_func_mbrtowc" >&6; }
11213 if test $ac_cv_func_mbrtowc = yes; then
7f947b68 11214
1b1fe467 11215$as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h
7f947b68 11216
1b1fe467 11217 fi
7f947b68 11218
1b1fe467
CR
11219if test $ac_cv_func_mbrtowc = yes; then
11220 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
7f947b68 11221
7175a77f 11222fi
7f947b68 11223
1b1fe467
CR
11224for ac_func in iswlower iswupper towlower towupper iswctype
11225do :
11226 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11227ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11228if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11229 cat >>confdefs.h <<_ACEOF
11230#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7175a77f 11231_ACEOF
7f947b68 11232
7175a77f 11233fi
1b1fe467 11234done
7f947b68 11235
7f947b68 11236
1b1fe467
CR
11237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11238$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11239if ${bash_cv_langinfo_codeset+:} false; then :
7175a77f
CR
11240 $as_echo_n "(cached) " >&6
11241else
1b1fe467 11242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 11243/* end confdefs.h. */
1b1fe467 11244#include <langinfo.h>
7175a77f
CR
11245int
11246main ()
11247{
1b1fe467 11248char* cs = nl_langinfo(CODESET);
7175a77f
CR
11249 ;
11250 return 0;
11251}
11252_ACEOF
1b1fe467
CR
11253if ac_fn_c_try_link "$LINENO"; then :
11254 bash_cv_langinfo_codeset=yes
11255else
11256 bash_cv_langinfo_codeset=no
11257fi
11258rm -f core conftest.err conftest.$ac_objext \
11259 conftest$ac_exeext conftest.$ac_ext
11260fi
11261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_langinfo_codeset" >&5
11262$as_echo "$bash_cv_langinfo_codeset" >&6; }
11263if test $bash_cv_langinfo_codeset = yes; then
11264 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11265
11266fi
11267
11268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5
11269$as_echo_n "checking for wchar_t in wchar.h... " >&6; }
11270if ${bash_cv_type_wchar_t+:} false; then :
11271 $as_echo_n "(cached) " >&6
11272else
11273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 11274/* end confdefs.h. */
1b1fe467
CR
11275#include <wchar.h>
11276
7175a77f
CR
11277int
11278main ()
11279{
1b1fe467
CR
11280
11281 wchar_t foo;
11282 foo = 0;
11283
7175a77f 11284 ;
abe2eb5b
CR
11285 return 0;
11286}
11287_ACEOF
1b1fe467
CR
11288if ac_fn_c_try_compile "$LINENO"; then :
11289 bash_cv_type_wchar_t=yes
e3db237e 11290else
1b1fe467
CR
11291 bash_cv_type_wchar_t=no
11292fi
11293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11294fi
11295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5
11296$as_echo "$bash_cv_type_wchar_t" >&6; }
11297if test $bash_cv_type_wchar_t = yes; then
11298
11299$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
f73dda09 11300
c920c360 11301fi
7610e0c5 11302
1b1fe467
CR
11303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5
11304$as_echo_n "checking for wctype_t in wctype.h... " >&6; }
11305if ${bash_cv_type_wctype_t+:} false; then :
11306 $as_echo_n "(cached) " >&6
7175a77f 11307else
1b1fe467
CR
11308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11309/* end confdefs.h. */
11310#include <wctype.h>
11311int
11312main ()
11313{
7610e0c5 11314
1b1fe467
CR
11315 wctype_t foo;
11316 foo = 0;
f73dda09 11317
1b1fe467
CR
11318 ;
11319 return 0;
11320}
11321_ACEOF
11322if ac_fn_c_try_compile "$LINENO"; then :
11323 bash_cv_type_wctype_t=yes
11324else
11325 bash_cv_type_wctype_t=no
e3db237e 11326fi
7175a77f 11327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abe2eb5b 11328fi
1b1fe467
CR
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5
11330$as_echo "$bash_cv_type_wctype_t" >&6; }
11331if test $bash_cv_type_wctype_t = yes; then
7610e0c5 11332
1b1fe467 11333$as_echo "#define HAVE_WCTYPE_T 1" >>confdefs.h
f73dda09 11334
71412226 11335fi
7610e0c5 11336
1b1fe467
CR
11337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5
11338$as_echo_n "checking for wint_t in wctype.h... " >&6; }
11339if ${bash_cv_type_wint_t+:} false; then :
7175a77f
CR
11340 $as_echo_n "(cached) " >&6
11341else
1b1fe467 11342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 11343/* end confdefs.h. */
1b1fe467 11344#include <wctype.h>
7175a77f
CR
11345int
11346main ()
11347{
1b1fe467
CR
11348
11349 wint_t foo;
11350 foo = 0;
11351
7175a77f
CR
11352 ;
11353 return 0;
11354}
11355_ACEOF
1b1fe467
CR
11356if ac_fn_c_try_compile "$LINENO"; then :
11357 bash_cv_type_wint_t=yes
11358else
11359 bash_cv_type_wint_t=no
11360fi
11361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11362fi
11363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5
11364$as_echo "$bash_cv_type_wint_t" >&6; }
11365if test $bash_cv_type_wint_t = yes; then
11366
11367$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
11368
11369fi
11370
11371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcwidth broken with unicode combining characters" >&5
11372$as_echo_n "checking for wcwidth broken with unicode combining characters... " >&6; }
11373if ${bash_cv_wcwidth_broken+:} false; then :
11374 $as_echo_n "(cached) " >&6
11375else
11376 if test "$cross_compiling" = yes; then :
d76edd30 11377 bash_cv_wcwidth_broken=no
1b1fe467
CR
11378else
11379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 11380/* end confdefs.h. */
1b1fe467
CR
11381
11382#include <unistd.h>
11383#include <stdlib.h>
11384#include <stdio.h>
11385
11386#include <locale.h>
11387#include <wchar.h>
11388
11389main(c, v)
11390int c;
11391char **v;
7175a77f 11392{
1b1fe467
CR
11393 int w;
11394
11395 setlocale(LC_ALL, "en_US.UTF-8");
11396 w = wcwidth (0x0301);
11397 exit (w == 0); /* exit 0 if wcwidth broken */
7175a77f 11398}
1b1fe467 11399
7f947b68 11400_ACEOF
1b1fe467
CR
11401if ac_fn_c_try_run "$LINENO"; then :
11402 bash_cv_wcwidth_broken=yes
7175a77f 11403else
15baad62 11404 bash_cv_wcwidth_broken=no
1b1fe467
CR
11405fi
11406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11407 conftest.$ac_objext conftest.beam conftest.$ac_ext
11408fi
7f947b68 11409
abe2eb5b 11410fi
1b1fe467
CR
11411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5
11412$as_echo "$bash_cv_wcwidth_broken" >&6; }
c7e43312 11413if test "$bash_cv_wcwidth_broken" = yes; then
abe2eb5b 11414
1b1fe467
CR
11415$as_echo "#define WCWIDTH_BROKEN 1" >>confdefs.h
11416
11417fi
2dead0c4 11418
1b1fe467
CR
11419if test "$am_cv_func_iconv" = yes; then
11420 OLDLIBS="$LIBS"
74b8cbb4 11421 LIBS="$LIBS $LIBINTL $LIBICONV"
1b1fe467
CR
11422 for ac_func in locale_charset
11423do :
11424 ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset"
11425if test "x$ac_cv_func_locale_charset" = xyes; then :
11426 cat >>confdefs.h <<_ACEOF
11427#define HAVE_LOCALE_CHARSET 1
11428_ACEOF
2dead0c4 11429
c920c360 11430fi
1b1fe467 11431done
71412226 11432
1b1fe467 11433 LIBS="$OLDLIBS"
7175a77f 11434fi
c920c360 11435
71412226 11436
71412226 11437
1b1fe467
CR
11438if test "$opt_static_link" != yes; then
11439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11440$as_echo_n "checking for dlopen in -ldl... " >&6; }
11441if ${ac_cv_lib_dl_dlopen+:} false; then :
7175a77f
CR
11442 $as_echo_n "(cached) " >&6
11443else
1b1fe467
CR
11444 ac_check_lib_save_LIBS=$LIBS
11445LIBS="-ldl $LIBS"
11446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 11447/* end confdefs.h. */
1b1fe467
CR
11448
11449/* Override any GCC internal prototype to avoid an error.
11450 Use char because int might match the return type of a GCC
11451 builtin and then its argument prototype would still apply. */
11452#ifdef __cplusplus
11453extern "C"
11454#endif
11455char dlopen ();
7175a77f
CR
11456int
11457main ()
11458{
1b1fe467 11459return dlopen ();
7175a77f
CR
11460 ;
11461 return 0;
11462}
11463_ACEOF
1b1fe467
CR
11464if ac_fn_c_try_link "$LINENO"; then :
11465 ac_cv_lib_dl_dlopen=yes
7175a77f 11466else
1b1fe467
CR
11467 ac_cv_lib_dl_dlopen=no
11468fi
11469rm -f core conftest.err conftest.$ac_objext \
11470 conftest$ac_exeext conftest.$ac_ext
11471LIBS=$ac_check_lib_save_LIBS
abe2eb5b 11472fi
1b1fe467
CR
11473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11474$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11475if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11476 cat >>confdefs.h <<_ACEOF
11477#define HAVE_LIBDL 1
11478_ACEOF
c920c360 11479
1b1fe467
CR
11480 LIBS="-ldl $LIBS"
11481
11482fi
7175a77f 11483
1b1fe467
CR
11484for ac_func in dlopen dlclose dlsym
11485do :
11486 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11487ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11488if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11489 cat >>confdefs.h <<_ACEOF
11490#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11491_ACEOF
7610e0c5 11492
71412226 11493fi
1b1fe467 11494done
7610e0c5 11495
7f947b68 11496fi
1b1fe467
CR
11497
11498ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
11499/* NetBSD declares sys_siglist in unistd.h. */
11500#ifdef HAVE_UNISTD_H
11501# include <unistd.h>
11502#endif
11503
11504"
11505if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
11506 ac_have_decl=1
7175a77f 11507else
1b1fe467
CR
11508 ac_have_decl=0
11509fi
7f947b68 11510
7175a77f 11511cat >>confdefs.h <<_ACEOF
1b1fe467 11512#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
7175a77f 11513_ACEOF
7f947b68 11514
7f947b68
CR
11515
11516
1b1fe467 11517if test "$ac_cv_func_inet_aton" != 'yes'; then
7f947b68 11518
1b1fe467
CR
11519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11520$as_echo_n "checking for inet_aton... " >&6; }
11521if ${bash_cv_func_inet_aton+:} false; then :
7175a77f 11522 $as_echo_n "(cached) " >&6
e3db237e 11523else
1b1fe467 11524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 11525/* end confdefs.h. */
1b1fe467
CR
11526
11527#include <sys/types.h>
11528#include <netinet/in.h>
11529#include <arpa/inet.h>
11530struct in_addr ap;
7175a77f
CR
11531int
11532main ()
11533{
1b1fe467 11534 inet_aton("127.0.0.1", &ap);
7175a77f
CR
11535 ;
11536 return 0;
11537}
11538_ACEOF
1b1fe467
CR
11539if ac_fn_c_try_link "$LINENO"; then :
11540 bash_cv_func_inet_aton=yes
7175a77f 11541else
1b1fe467 11542 bash_cv_func_inet_aton=no
71412226 11543fi
1b1fe467
CR
11544rm -f core conftest.err conftest.$ac_objext \
11545 conftest$ac_exeext conftest.$ac_ext
e3db237e 11546fi
1b1fe467
CR
11547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_inet_aton" >&5
11548$as_echo "$bash_cv_func_inet_aton" >&6; }
11549if test $bash_cv_func_inet_aton = yes; then
11550 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
abe2eb5b 11551
7175a77f 11552else
1b1fe467
CR
11553 case " $LIBOBJS " in
11554 *" inet_aton.$ac_objext "* ) ;;
11555 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11556 ;;
11557esac
7f947b68 11558
1b1fe467 11559fi
7f947b68
CR
11560
11561fi
11562
1b1fe467
CR
11563case "$host_os" in
11564irix4*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent in -lsun" >&5
11565$as_echo_n "checking for getpwent in -lsun... " >&6; }
11566if ${ac_cv_lib_sun_getpwent+:} false; then :
7175a77f
CR
11567 $as_echo_n "(cached) " >&6
11568else
1b1fe467
CR
11569 ac_check_lib_save_LIBS=$LIBS
11570LIBS="-lsun $LIBS"
11571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 11572/* end confdefs.h. */
1b1fe467
CR
11573
11574/* Override any GCC internal prototype to avoid an error.
11575 Use char because int might match the return type of a GCC
11576 builtin and then its argument prototype would still apply. */
11577#ifdef __cplusplus
11578extern "C"
11579#endif
11580char getpwent ();
7175a77f
CR
11581int
11582main ()
11583{
1b1fe467 11584return getpwent ();
7175a77f
CR
11585 ;
11586 return 0;
11587}
11588_ACEOF
1b1fe467
CR
11589if ac_fn_c_try_link "$LINENO"; then :
11590 ac_cv_lib_sun_getpwent=yes
11591else
11592 ac_cv_lib_sun_getpwent=no
11593fi
11594rm -f core conftest.err conftest.$ac_objext \
11595 conftest$ac_exeext conftest.$ac_ext
11596LIBS=$ac_check_lib_save_LIBS
11597fi
11598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwent" >&5
11599$as_echo "$ac_cv_lib_sun_getpwent" >&6; }
11600if test "x$ac_cv_lib_sun_getpwent" = xyes; then :
11601 cat >>confdefs.h <<_ACEOF
11602#define HAVE_LIBSUN 1
7175a77f 11603_ACEOF
1b1fe467
CR
11604
11605 LIBS="-lsun $LIBS"
11606
11607fi
11608 ;;
11609esac
11610
11611if test "$ac_cv_func_getpeername" = no; then
11612
11613if test "X$bash_cv_have_socklib" = "X"; then
11614_bash_needmsg=
11615else
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket library" >&5
11617$as_echo_n "checking for socket library... " >&6; }
11618_bash_needmsg=yes
11619fi
11620if ${bash_cv_have_socklib+:} false; then :
11621 $as_echo_n "(cached) " >&6
11622else
11623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpeername in -lsocket" >&5
11624$as_echo_n "checking for getpeername in -lsocket... " >&6; }
11625if ${ac_cv_lib_socket_getpeername+:} false; then :
11626 $as_echo_n "(cached) " >&6
11627else
11628 ac_check_lib_save_LIBS=$LIBS
11629LIBS="-lsocket -lnsl $LIBS"
11630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 11631/* end confdefs.h. */
1b1fe467
CR
11632
11633/* Override any GCC internal prototype to avoid an error.
11634 Use char because int might match the return type of a GCC
11635 builtin and then its argument prototype would still apply. */
11636#ifdef __cplusplus
11637extern "C"
11638#endif
11639char getpeername ();
7175a77f
CR
11640int
11641main ()
11642{
1b1fe467 11643return getpeername ();
7175a77f
CR
11644 ;
11645 return 0;
11646}
11647_ACEOF
1b1fe467
CR
11648if ac_fn_c_try_link "$LINENO"; then :
11649 ac_cv_lib_socket_getpeername=yes
7175a77f 11650else
1b1fe467 11651 ac_cv_lib_socket_getpeername=no
abe2eb5b 11652fi
1b1fe467
CR
11653rm -f core conftest.err conftest.$ac_objext \
11654 conftest$ac_exeext conftest.$ac_ext
11655LIBS=$ac_check_lib_save_LIBS
11656fi
11657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getpeername" >&5
11658$as_echo "$ac_cv_lib_socket_getpeername" >&6; }
11659if test "x$ac_cv_lib_socket_getpeername" = xyes; then :
11660 bash_cv_have_socklib=yes
abe2eb5b 11661else
1b1fe467 11662 bash_cv_have_socklib=no
7f947b68
CR
11663fi
11664
7175a77f 11665fi
7f947b68 11666
1b1fe467
CR
11667if test "X$_bash_needmsg" = Xyes; then
11668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_socklib" >&5
11669$as_echo "$bash_cv_have_socklib" >&6; }
11670 _bash_needmsg=
7175a77f 11671fi
1b1fe467
CR
11672if test $bash_cv_have_socklib = yes; then
11673 # check for libnsl, add it to LIBS if present
11674 if test "X$bash_cv_have_libnsl" = "X"; then
11675 _bash_needmsg=
11676 else
11677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5
11678$as_echo_n "checking for libnsl... " >&6; }
11679 _bash_needmsg=yes
11680 fi
11681 if ${bash_cv_have_libnsl+:} false; then :
11682 $as_echo_n "(cached) " >&6
7175a77f 11683else
1b1fe467
CR
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
11685$as_echo_n "checking for t_open in -lnsl... " >&6; }
11686if ${ac_cv_lib_nsl_t_open+:} false; then :
e3db237e
CR
11687 $as_echo_n "(cached) " >&6
11688else
1b1fe467
CR
11689 ac_check_lib_save_LIBS=$LIBS
11690LIBS="-lnsl $LIBS"
11691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 11692/* end confdefs.h. */
1b1fe467
CR
11693
11694/* Override any GCC internal prototype to avoid an error.
11695 Use char because int might match the return type of a GCC
11696 builtin and then its argument prototype would still apply. */
11697#ifdef __cplusplus
11698extern "C"
11699#endif
11700char t_open ();
7175a77f
CR
11701int
11702main ()
11703{
1b1fe467 11704return t_open ();
7175a77f
CR
11705 ;
11706 return 0;
11707}
11708_ACEOF
1b1fe467
CR
11709if ac_fn_c_try_link "$LINENO"; then :
11710 ac_cv_lib_nsl_t_open=yes
c920c360 11711else
1b1fe467 11712 ac_cv_lib_nsl_t_open=no
e3db237e 11713fi
1b1fe467
CR
11714rm -f core conftest.err conftest.$ac_objext \
11715 conftest$ac_exeext conftest.$ac_ext
11716LIBS=$ac_check_lib_save_LIBS
11717fi
11718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
11719$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
11720if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
11721 bash_cv_have_libnsl=yes
7175a77f 11722else
1b1fe467 11723 bash_cv_have_libnsl=no
7175a77f 11724fi
71412226
CR
11725
11726fi
c920c360 11727
1b1fe467
CR
11728 if test "X$_bash_needmsg" = Xyes; then
11729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_libnsl" >&5
11730$as_echo "$bash_cv_have_libnsl" >&6; }
11731 _bash_needmsg=
11732 fi
11733 if test $bash_cv_have_libnsl = yes; then
11734 LIBS="-lsocket -lnsl $LIBS"
11735 else
11736 LIBS="-lsocket $LIBS"
11737 fi
11738 $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
2dead0c4 11739
1b1fe467 11740 $as_echo "#define HAVE_GETPEERNAME 1" >>confdefs.h
7175a77f
CR
11741
11742fi
5f8cde23 11743
1b1fe467
CR
11744fi
11745if test "$ac_cv_func_gethostbyname" = no; then
11746 if test "X$bash_cv_have_gethostbyname" = "X"; then
11747_bash_needmsg=yes
11748else
11749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5
11750$as_echo_n "checking for gethostbyname in socket library... " >&6; }
11751_bash_needmsg=
11752fi
11753if ${bash_cv_have_gethostbyname+:} false; then :
c920c360
CR
11754 $as_echo_n "(cached) " >&6
11755else
1b1fe467 11756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 11757/* end confdefs.h. */
1b1fe467 11758#include <netdb.h>
abe2eb5b
CR
11759int
11760main ()
11761{
1b1fe467
CR
11762 struct hostent *hp;
11763 hp = gethostbyname("localhost");
11764
abe2eb5b
CR
11765 ;
11766 return 0;
11767}
11768_ACEOF
1b1fe467
CR
11769if ac_fn_c_try_link "$LINENO"; then :
11770 bash_cv_have_gethostbyname=yes
7175a77f 11771else
1b1fe467 11772 bash_cv_have_gethostbyname=no
7175a77f 11773fi
1b1fe467
CR
11774rm -f core conftest.err conftest.$ac_objext \
11775 conftest$ac_exeext conftest.$ac_ext
7175a77f 11776
1b1fe467 11777fi
7175a77f 11778
1b1fe467
CR
11779if test "X$_bash_needmsg" = Xyes; then
11780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5
11781$as_echo_n "checking for gethostbyname in socket library... " >&6; }
11782fi
11783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_gethostbyname" >&5
11784$as_echo "$bash_cv_have_gethostbyname" >&6; }
11785if test "$bash_cv_have_gethostbyname" = yes; then
11786$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
7175a77f 11787
7f947b68 11788fi
7175a77f 11789
7f947b68 11790fi
1b1fe467 11791
1b1fe467
CR
11792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
11793$as_echo_n "checking type of array argument to getgroups... " >&6; }
11794if ${ac_cv_type_getgroups+:} false; then :
7f947b68 11795 $as_echo_n "(cached) " >&6
71412226 11796else
1b1fe467
CR
11797 if test "$cross_compiling" = yes; then :
11798 ac_cv_type_getgroups=cross
11799else
11800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7f947b68 11801/* end confdefs.h. */
1b1fe467 11802/* Thanks to Mike Rendell for this test. */
7175a77f 11803$ac_includes_default
1b1fe467
CR
11804#define NGID 256
11805#undef MAX
11806#define MAX(x, y) ((x) > (y) ? (x) : (y))
11807
7f947b68
CR
11808int
11809main ()
11810{
1b1fe467
CR
11811 gid_t gidset[NGID];
11812 int i, n;
11813 union { gid_t gval; long int lval; } val;
11814
11815 val.lval = -1;
11816 for (i = 0; i < NGID; i++)
11817 gidset[i] = val.gval;
11818 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
11819 gidset);
11820 /* Exit non-zero if getgroups seems to require an array of ints. This
11821 happens when gid_t is short int but getgroups modifies an array
11822 of ints. */
11823 return n > 0 && gidset[n] != val.gval;
7f947b68
CR
11824}
11825_ACEOF
1b1fe467
CR
11826if ac_fn_c_try_run "$LINENO"; then :
11827 ac_cv_type_getgroups=gid_t
11828else
11829 ac_cv_type_getgroups=int
11830fi
11831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11832 conftest.$ac_objext conftest.beam conftest.$ac_ext
11833fi
11834
11835if test $ac_cv_type_getgroups = cross; then
11836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 11837/* end confdefs.h. */
1b1fe467
CR
11838#include <unistd.h>
11839
abe2eb5b 11840_ACEOF
1b1fe467
CR
11841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11842 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
11843 ac_cv_type_getgroups=gid_t
7f947b68 11844else
1b1fe467
CR
11845 ac_cv_type_getgroups=int
11846fi
11847rm -f conftest*
7f947b68
CR
11848
11849fi
1b1fe467
CR
11850fi
11851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
11852$as_echo "$ac_cv_type_getgroups" >&6; }
11853
11854cat >>confdefs.h <<_ACEOF
11855#define GETGROUPS_T $ac_cv_type_getgroups
11856_ACEOF
11857
11858
11859ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
11860if test "x$ac_cv_type_off_t" = xyes; then :
7f947b68 11861
7f947b68 11862else
7f947b68 11863
1b1fe467
CR
11864cat >>confdefs.h <<_ACEOF
11865#define off_t long int
11866_ACEOF
e3db237e 11867
71412226 11868fi
7f947b68 11869
1b1fe467
CR
11870ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11871if test "x$ac_cv_type_mode_t" = xyes; then :
11872
7175a77f 11873else
2dead0c4 11874
7175a77f 11875cat >>confdefs.h <<_ACEOF
1b1fe467 11876#define mode_t int
7f947b68 11877_ACEOF
2dead0c4 11878
abe2eb5b 11879fi
5f8cde23 11880
1b1fe467
CR
11881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
11882$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
11883if ${ac_cv_type_uid_t+:} false; then :
2dead0c4
CR
11884 $as_echo_n "(cached) " >&6
11885else
1b1fe467 11886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 11887/* end confdefs.h. */
1b1fe467
CR
11888#include <sys/types.h>
11889
abe2eb5b 11890_ACEOF
1b1fe467
CR
11891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11892 $EGREP "uid_t" >/dev/null 2>&1; then :
11893 ac_cv_type_uid_t=yes
2dead0c4 11894else
1b1fe467
CR
11895 ac_cv_type_uid_t=no
11896fi
11897rm -f conftest*
7f947b68
CR
11898
11899fi
1b1fe467
CR
11900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
11901$as_echo "$ac_cv_type_uid_t" >&6; }
11902if test $ac_cv_type_uid_t = no; then
2dead0c4 11903
1b1fe467 11904$as_echo "#define uid_t int" >>confdefs.h
2dead0c4
CR
11905
11906
1b1fe467 11907$as_echo "#define gid_t int" >>confdefs.h
7f947b68 11908
7f947b68 11909fi
1b1fe467
CR
11910
11911ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11912if test "x$ac_cv_type_pid_t" = xyes; then :
11913
7175a77f 11914else
c920c360 11915
abe2eb5b 11916cat >>confdefs.h <<_ACEOF
1b1fe467 11917#define pid_t int
abe2eb5b 11918_ACEOF
c920c360 11919
7175a77f 11920fi
c920c360 11921
1b1fe467
CR
11922ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
11923if test "x$ac_cv_type_size_t" = xyes; then :
5f8cde23 11924
abe2eb5b 11925else
1b1fe467
CR
11926
11927cat >>confdefs.h <<_ACEOF
11928#define size_t unsigned int
abe2eb5b 11929_ACEOF
7175a77f 11930
7f947b68 11931fi
7f947b68 11932
1b1fe467
CR
11933ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
11934if test "x$ac_cv_type_ssize_t" = xyes; then :
11935
7175a77f 11936else
7f947b68 11937
1b1fe467
CR
11938cat >>confdefs.h <<_ACEOF
11939#define ssize_t int
11940_ACEOF
7f947b68 11941
7175a77f 11942fi
7f947b68 11943
1b1fe467
CR
11944ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default"
11945if test "x$ac_cv_type_time_t" = xyes; then :
11946
7f947b68 11947else
7175a77f
CR
11948
11949cat >>confdefs.h <<_ACEOF
1b1fe467 11950#define time_t long
7175a77f
CR
11951_ACEOF
11952
11953fi
11954
1b1fe467
CR
11955
11956
11957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5
11958$as_echo_n "checking for long long... " >&6; }
11959if ${bash_cv_type_long_long+:} false; then :
7f947b68
CR
11960 $as_echo_n "(cached) " >&6
11961else
1b1fe467 11962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 11963/* end confdefs.h. */
1b1fe467
CR
11964
11965long long ll = 1; int i = 63;
abe2eb5b
CR
11966int
11967main ()
11968{
1b1fe467
CR
11969
11970long long llm = (long long) -1;
11971return ll << i | ll >> i | llm / ll | llm % ll;
11972
abe2eb5b
CR
11973 ;
11974 return 0;
11975}
e3db237e 11976_ACEOF
1b1fe467
CR
11977if ac_fn_c_try_link "$LINENO"; then :
11978 bash_cv_type_long_long='long long'
11979else
11980 bash_cv_type_long_long='long'
11981fi
11982rm -f core conftest.err conftest.$ac_objext \
11983 conftest$ac_exeext conftest.$ac_ext
11984fi
11985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_long_long" >&5
11986$as_echo "$bash_cv_type_long_long" >&6; }
11987if test "$bash_cv_type_long_long" = 'long long'; then
11988 $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
11989
11990fi
11991
11992
11993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5
11994$as_echo_n "checking for unsigned long long... " >&6; }
11995if ${bash_cv_type_unsigned_long_long+:} false; then :
11996 $as_echo_n "(cached) " >&6
11997else
11998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 11999/* end confdefs.h. */
1b1fe467
CR
12000
12001unsigned long long ull = 1; int i = 63;
abe2eb5b
CR
12002int
12003main ()
12004{
1b1fe467
CR
12005
12006unsigned long long ullmax = (unsigned long long) -1;
12007return ull << i | ull >> i | ullmax / ull | ullmax % ull;
12008
abe2eb5b
CR
12009 ;
12010 return 0;
12011}
7610e0c5 12012_ACEOF
1b1fe467
CR
12013if ac_fn_c_try_link "$LINENO"; then :
12014 bash_cv_type_unsigned_long_long='unsigned long long'
abe2eb5b 12015else
1b1fe467 12016 bash_cv_type_unsigned_long_long='unsigned long'
7f947b68 12017fi
1b1fe467
CR
12018rm -f core conftest.err conftest.$ac_objext \
12019 conftest$ac_exeext conftest.$ac_ext
2dead0c4 12020fi
1b1fe467
CR
12021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_unsigned_long_long" >&5
12022$as_echo "$bash_cv_type_unsigned_long_long" >&6; }
12023if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
12024 $as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h
2dead0c4 12025
7175a77f 12026fi
2dead0c4 12027
2dead0c4 12028
1b1fe467
CR
12029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
12030$as_echo_n "checking return type of signal handlers... " >&6; }
12031if ${ac_cv_type_signal+:} false; then :
abe2eb5b 12032 $as_echo_n "(cached) " >&6
7610e0c5 12033else
1b1fe467 12034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 12035/* end confdefs.h. */
1b1fe467
CR
12036#include <sys/types.h>
12037#include <signal.h>
12038
abe2eb5b
CR
12039int
12040main ()
12041{
1b1fe467 12042return *(signal (0, 0)) (0) == 1;
abe2eb5b
CR
12043 ;
12044 return 0;
12045}
12046_ACEOF
1b1fe467
CR
12047if ac_fn_c_try_compile "$LINENO"; then :
12048 ac_cv_type_signal=int
12049else
12050 ac_cv_type_signal=void
12051fi
12052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12053fi
12054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
12055$as_echo "$ac_cv_type_signal" >&6; }
12056
12057cat >>confdefs.h <<_ACEOF
12058#define RETSIGTYPE $ac_cv_type_signal
7175a77f 12059_ACEOF
1b1fe467
CR
12060
12061
12062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5
12063$as_echo_n "checking for sig_atomic_t in signal.h... " >&6; }
12064if ${ac_cv_have_sig_atomic_t+:} false; then :
12065 $as_echo_n "(cached) " >&6
12066else
12067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 12068/* end confdefs.h. */
1b1fe467
CR
12069
12070#include <signal.h>
12071
7175a77f
CR
12072int
12073main ()
12074{
1b1fe467 12075 sig_atomic_t x;
7175a77f
CR
12076 ;
12077 return 0;
12078}
12079_ACEOF
1b1fe467
CR
12080if ac_fn_c_try_link "$LINENO"; then :
12081 ac_cv_have_sig_atomic_t=yes
12082else
12083 ac_cv_have_sig_atomic_t=no
12084fi
12085rm -f core conftest.err conftest.$ac_objext \
12086 conftest$ac_exeext conftest.$ac_ext
12087fi
12088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5
12089$as_echo "$ac_cv_have_sig_atomic_t" >&6; }
12090if test "$ac_cv_have_sig_atomic_t" = "no"
12091then
12092 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default"
12093if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
12094
abe2eb5b 12095else
7610e0c5 12096
1b1fe467
CR
12097cat >>confdefs.h <<_ACEOF
12098#define sig_atomic_t int
12099_ACEOF
12100
12101fi
12102
7f947b68 12103fi
7610e0c5
CR
12104
12105
1b1fe467
CR
12106# The cast to long int works around a bug in the HP C Compiler
12107# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12108# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12109# This bug is HP SR number 8606223364.
12110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
12111$as_echo_n "checking size of char... " >&6; }
12112if ${ac_cv_sizeof_char+:} false; then :
12113 $as_echo_n "(cached) " >&6
12114else
12115 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then :
7610e0c5 12116
1b1fe467
CR
12117else
12118 if test "$ac_cv_type_char" = yes; then
12119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12121as_fn_error 77 "cannot compute sizeof (char)
12122See \`config.log' for more details" "$LINENO" 5; }
12123 else
12124 ac_cv_sizeof_char=0
12125 fi
2dead0c4 12126fi
7f947b68 12127
7175a77f 12128fi
1b1fe467
CR
12129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
12130$as_echo "$ac_cv_sizeof_char" >&6; }
12131
12132
e3db237e 12133
7175a77f 12134cat >>confdefs.h <<_ACEOF
1b1fe467 12135#define SIZEOF_CHAR $ac_cv_sizeof_char
2dead0c4
CR
12136_ACEOF
12137
1b1fe467
CR
12138
12139# The cast to long int works around a bug in the HP C Compiler
12140# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12141# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12142# This bug is HP SR number 8606223364.
12143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
12144$as_echo_n "checking size of short... " >&6; }
12145if ${ac_cv_sizeof_short+:} false; then :
12146 $as_echo_n "(cached) " >&6
12147else
12148 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
12149
12150else
12151 if test "$ac_cv_type_short" = yes; then
12152 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12154as_fn_error 77 "cannot compute sizeof (short)
12155See \`config.log' for more details" "$LINENO" 5; }
12156 else
12157 ac_cv_sizeof_short=0
12158 fi
7610e0c5 12159fi
7f947b68
CR
12160
12161fi
1b1fe467
CR
12162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
12163$as_echo "$ac_cv_sizeof_short" >&6; }
7f947b68 12164
7175a77f 12165
1b1fe467
CR
12166
12167cat >>confdefs.h <<_ACEOF
12168#define SIZEOF_SHORT $ac_cv_sizeof_short
2dead0c4 12169_ACEOF
e3db237e 12170
71412226 12171
1b1fe467
CR
12172# The cast to long int works around a bug in the HP C Compiler
12173# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12174# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12175# This bug is HP SR number 8606223364.
12176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
12177$as_echo_n "checking size of int... " >&6; }
12178if ${ac_cv_sizeof_int+:} false; then :
12179 $as_echo_n "(cached) " >&6
71412226 12180else
1b1fe467 12181 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
7610e0c5 12182
1b1fe467
CR
12183else
12184 if test "$ac_cv_type_int" = yes; then
12185 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12186$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12187as_fn_error 77 "cannot compute sizeof (int)
12188See \`config.log' for more details" "$LINENO" 5; }
12189 else
12190 ac_cv_sizeof_int=0
12191 fi
2dead0c4 12192fi
5f8cde23 12193
7175a77f 12194fi
1b1fe467
CR
12195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
12196$as_echo "$ac_cv_sizeof_int" >&6; }
12197
12198
e3db237e 12199
7f947b68 12200cat >>confdefs.h <<_ACEOF
1b1fe467 12201#define SIZEOF_INT $ac_cv_sizeof_int
7f947b68 12202_ACEOF
71412226 12203
7f947b68 12204
1b1fe467
CR
12205# The cast to long int works around a bug in the HP C Compiler
12206# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12207# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12208# This bug is HP SR number 8606223364.
12209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
12210$as_echo_n "checking size of long... " >&6; }
12211if ${ac_cv_sizeof_long+:} false; then :
abe2eb5b
CR
12212 $as_echo_n "(cached) " >&6
12213else
1b1fe467
CR
12214 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
12215
abe2eb5b 12216else
1b1fe467
CR
12217 if test "$ac_cv_type_long" = yes; then
12218 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12220as_fn_error 77 "cannot compute sizeof (long)
12221See \`config.log' for more details" "$LINENO" 5; }
12222 else
12223 ac_cv_sizeof_long=0
12224 fi
12225fi
71412226 12226
2dead0c4 12227fi
1b1fe467
CR
12228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
12229$as_echo "$ac_cv_sizeof_long" >&6; }
e3db237e 12230
e3db237e 12231
5f8cde23 12232
1b1fe467
CR
12233cat >>confdefs.h <<_ACEOF
12234#define SIZEOF_LONG $ac_cv_sizeof_long
12235_ACEOF
12236
12237
12238# The cast to long int works around a bug in the HP C Compiler
12239# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12240# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12241# This bug is HP SR number 8606223364.
12242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
12243$as_echo_n "checking size of char *... " >&6; }
12244if ${ac_cv_sizeof_char_p+:} false; then :
12245 $as_echo_n "(cached) " >&6
12246else
12247 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then :
12248
12249else
12250 if test "$ac_cv_type_char_p" = yes; then
12251 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12253as_fn_error 77 "cannot compute sizeof (char *)
12254See \`config.log' for more details" "$LINENO" 5; }
12255 else
12256 ac_cv_sizeof_char_p=0
12257 fi
abe2eb5b 12258fi
7f947b68 12259
7175a77f 12260fi
1b1fe467
CR
12261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
12262$as_echo "$ac_cv_sizeof_char_p" >&6; }
12263
12264
e3db237e 12265
2dead0c4 12266cat >>confdefs.h <<_ACEOF
1b1fe467 12267#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
2dead0c4 12268_ACEOF
5f8cde23 12269
e3db237e 12270
1b1fe467
CR
12271# The cast to long int works around a bug in the HP C Compiler
12272# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12273# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12274# This bug is HP SR number 8606223364.
12275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
12276$as_echo_n "checking size of double... " >&6; }
12277if ${ac_cv_sizeof_double+:} false; then :
7175a77f
CR
12278 $as_echo_n "(cached) " >&6
12279else
1b1fe467
CR
12280 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
12281
12282else
12283 if test "$ac_cv_type_double" = yes; then
12284 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12285$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12286as_fn_error 77 "cannot compute sizeof (double)
12287See \`config.log' for more details" "$LINENO" 5; }
12288 else
12289 ac_cv_sizeof_double=0
12290 fi
12291fi
12292
12293fi
12294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
12295$as_echo "$ac_cv_sizeof_double" >&6; }
12296
12297
12298
12299cat >>confdefs.h <<_ACEOF
12300#define SIZEOF_DOUBLE $ac_cv_sizeof_double
7175a77f 12301_ACEOF
1b1fe467
CR
12302
12303
12304# The cast to long int works around a bug in the HP C Compiler
12305# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12306# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12307# This bug is HP SR number 8606223364.
12308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12309$as_echo_n "checking size of long long... " >&6; }
12310if ${ac_cv_sizeof_long_long+:} false; then :
12311 $as_echo_n "(cached) " >&6
2dead0c4 12312else
1b1fe467 12313 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
7f947b68 12314
1b1fe467
CR
12315else
12316 if test "$ac_cv_type_long_long" = yes; then
12317 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12318$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12319as_fn_error 77 "cannot compute sizeof (long long)
12320See \`config.log' for more details" "$LINENO" 5; }
12321 else
12322 ac_cv_sizeof_long_long=0
12323 fi
2dead0c4 12324fi
c920c360 12325
1b1fe467
CR
12326fi
12327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12328$as_echo "$ac_cv_sizeof_long_long" >&6; }
2dead0c4 12329
c920c360 12330
c920c360 12331
1b1fe467
CR
12332cat >>confdefs.h <<_ACEOF
12333#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12334_ACEOF
12335
12336
12337
12338ac_fn_c_check_type "$LINENO" "u_int" "ac_cv_type_u_int" "$ac_includes_default"
12339if test "x$ac_cv_type_u_int" = xyes; then :
12340
ccc6cda3 12341else
2dead0c4
CR
12342
12343cat >>confdefs.h <<_ACEOF
1b1fe467 12344#define u_int unsigned int
7610e0c5 12345_ACEOF
e3db237e 12346
c920c360 12347fi
e3db237e 12348
1b1fe467
CR
12349ac_fn_c_check_type "$LINENO" "u_long" "ac_cv_type_u_long" "$ac_includes_default"
12350if test "x$ac_cv_type_u_long" = xyes; then :
12351
abe2eb5b 12352else
1b1fe467
CR
12353
12354cat >>confdefs.h <<_ACEOF
12355#define u_long unsigned long
abe2eb5b 12356_ACEOF
7175a77f 12357
c920c360 12358fi
7175a77f 12359
1b1fe467
CR
12360
12361
12362if test "$ac_cv_sizeof_short" = 2; then
12363 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
12364if test "x$ac_cv_type_bits16_t" = xyes; then :
12365
7175a77f 12366else
7175a77f 12367
1b1fe467
CR
12368cat >>confdefs.h <<_ACEOF
12369#define bits16_t short
12370_ACEOF
7175a77f 12371
abe2eb5b 12372fi
2dead0c4 12373
1b1fe467
CR
12374elif test "$ac_cv_sizeof_char" = 2; then
12375 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
12376if test "x$ac_cv_type_bits16_t" = xyes; then :
12377
7175a77f
CR
12378else
12379
12380cat >>confdefs.h <<_ACEOF
1b1fe467 12381#define bits16_t char
7175a77f 12382_ACEOF
f73dda09 12383
7175a77f 12384fi
a82a04b3 12385
7175a77f 12386else
1b1fe467
CR
12387 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
12388if test "x$ac_cv_type_bits16_t" = xyes; then :
12389
abe2eb5b 12390else
1b1fe467
CR
12391
12392cat >>confdefs.h <<_ACEOF
12393#define bits16_t short
abe2eb5b 12394_ACEOF
7175a77f 12395
abe2eb5b 12396fi
7f947b68 12397
1b1fe467
CR
12398fi
12399
12400
12401if test "$ac_cv_sizeof_short" = 2; then
12402 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
12403if test "x$ac_cv_type_u_bits16_t" = xyes; then :
12404
c920c360 12405else
e3db237e 12406
1b1fe467
CR
12407cat >>confdefs.h <<_ACEOF
12408#define u_bits16_t unsigned short
12409_ACEOF
e3db237e 12410
c920c360 12411fi
c920c360 12412
1b1fe467
CR
12413elif test "$ac_cv_sizeof_char" = 2; then
12414 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
12415if test "x$ac_cv_type_u_bits16_t" = xyes; then :
12416
12417else
12418
12419cat >>confdefs.h <<_ACEOF
12420#define u_bits16_t unsigned char
12421_ACEOF
12422
c920c360 12423fi
1b1fe467
CR
12424
12425else
12426 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
12427if test "x$ac_cv_type_u_bits16_t" = xyes; then :
12428
7f947b68 12429else
2dead0c4 12430
7f947b68 12431cat >>confdefs.h <<_ACEOF
1b1fe467 12432#define u_bits16_t unsigned short
5e4a95c7 12433_ACEOF
7f947b68 12434
c920c360 12435fi
abe2eb5b 12436
c920c360 12437fi
e3db237e 12438
7f947b68 12439
1b1fe467
CR
12440if test "$ac_cv_sizeof_int" = 4; then
12441 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
12442if test "x$ac_cv_type_bits32_t" = xyes; then :
2dead0c4 12443
2dead0c4 12444else
1b1fe467
CR
12445
12446cat >>confdefs.h <<_ACEOF
12447#define bits32_t int
7175a77f 12448_ACEOF
7175a77f 12449
7175a77f 12450fi
2dead0c4 12451
1b1fe467
CR
12452elif test "$ac_cv_sizeof_long" = 4; then
12453 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
12454if test "x$ac_cv_type_bits32_t" = xyes; then :
12455
7f947b68 12456else
2dead0c4 12457
1b1fe467
CR
12458cat >>confdefs.h <<_ACEOF
12459#define bits32_t long
12460_ACEOF
7f947b68 12461
7175a77f 12462fi
7f947b68 12463
1b1fe467
CR
12464else
12465 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
12466if test "x$ac_cv_type_bits32_t" = xyes; then :
12467
7175a77f 12468else
7f947b68
CR
12469
12470cat >>confdefs.h <<_ACEOF
1b1fe467 12471#define bits32_t int
7610e0c5 12472_ACEOF
7f947b68 12473
7175a77f 12474fi
7f947b68 12475
1b1fe467
CR
12476fi
12477
12478
12479if test "$ac_cv_sizeof_int" = 4; then
12480 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
12481if test "x$ac_cv_type_u_bits32_t" = xyes; then :
12482
7f947b68 12483else
abe2eb5b 12484
1b1fe467
CR
12485cat >>confdefs.h <<_ACEOF
12486#define u_bits32_t unsigned int
12487_ACEOF
12488
c920c360 12489fi
7f947b68 12490
1b1fe467
CR
12491elif test "$ac_cv_sizeof_long" = 4; then
12492 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
12493if test "x$ac_cv_type_u_bits32_t" = xyes; then :
12494
7175a77f 12495else
7175a77f 12496
1b1fe467
CR
12497cat >>confdefs.h <<_ACEOF
12498#define u_bits32_t unsigned long
12499_ACEOF
7175a77f
CR
12500
12501fi
7f947b68 12502
1b1fe467
CR
12503else
12504 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
12505if test "x$ac_cv_type_u_bits32_t" = xyes; then :
12506
7175a77f 12507else
7f947b68
CR
12508
12509cat >>confdefs.h <<_ACEOF
1b1fe467 12510#define u_bits32_t unsigned int
abe2eb5b 12511_ACEOF
7610e0c5 12512
7175a77f 12513fi
7f947b68 12514
1b1fe467
CR
12515fi
12516
12517
12518if test "$ac_cv_sizeof_char_p" = 8; then
12519 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12520if test "x$ac_cv_type_bits64_t" = xyes; then :
12521
7f947b68 12522else
1b1fe467
CR
12523
12524cat >>confdefs.h <<_ACEOF
12525#define bits64_t char *
7175a77f 12526_ACEOF
7610e0c5 12527
2dead0c4 12528fi
c920c360 12529
1b1fe467
CR
12530elif test "$ac_cv_sizeof_double" = 8; then
12531 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12532if test "x$ac_cv_type_bits64_t" = xyes; then :
12533
7175a77f 12534else
7175a77f 12535
1b1fe467
CR
12536cat >>confdefs.h <<_ACEOF
12537#define bits64_t double
12538_ACEOF
7175a77f
CR
12539
12540fi
c920c360 12541
1b1fe467
CR
12542elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
12543 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12544if test "x$ac_cv_type_bits64_t" = xyes; then :
12545
12546else
12547
12548cat >>confdefs.h <<_ACEOF
12549#define bits64_t long long
12550_ACEOF
12551
7175a77f 12552fi
1b1fe467
CR
12553
12554elif test "$ac_cv_sizeof_long" = 8; then
12555 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12556if test "x$ac_cv_type_bits64_t" = xyes; then :
12557
7175a77f 12558else
7f947b68
CR
12559
12560cat >>confdefs.h <<_ACEOF
1b1fe467 12561#define bits64_t long
7f947b68
CR
12562_ACEOF
12563
7175a77f 12564fi
7f947b68 12565
7175a77f 12566else
1b1fe467
CR
12567 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12568if test "x$ac_cv_type_bits64_t" = xyes; then :
12569
7610e0c5 12570else
1b1fe467
CR
12571
12572cat >>confdefs.h <<_ACEOF
12573#define bits64_t double
7175a77f 12574_ACEOF
1b1fe467
CR
12575
12576fi
12577
12578fi
12579
12580
12581
12582if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
12583 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12584if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12585
2dead0c4 12586else
2dead0c4 12587
1b1fe467
CR
12588cat >>confdefs.h <<_ACEOF
12589#define ptrdiff_t int
12590_ACEOF
12591
7f947b68 12592fi
7f947b68 12593
1b1fe467
CR
12594elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
12595 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12596if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12597
7175a77f 12598else
7f947b68 12599
1b1fe467
CR
12600cat >>confdefs.h <<_ACEOF
12601#define ptrdiff_t long
12602_ACEOF
7f947b68 12603
7175a77f 12604fi
7f947b68 12605
1b1fe467
CR
12606elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
12607 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12608if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12609
12610else
12611
12612cat >>confdefs.h <<_ACEOF
12613#define ptrdiff_t long long
12614_ACEOF
12615
7175a77f 12616fi
1b1fe467
CR
12617
12618else
12619 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12620if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12621
c920c360 12622else
abe2eb5b 12623
7f947b68 12624cat >>confdefs.h <<_ACEOF
7175a77f 12625#define ptrdiff_t int
7f947b68
CR
12626_ACEOF
12627
5e4a95c7 12628fi
b709b946 12629
7175a77f 12630fi
abe2eb5b 12631
e3db237e 12632
1b1fe467 12633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
7175a77f 12634$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
1b1fe467 12635if ${ac_cv_header_stat_broken+:} false; then :
7175a77f
CR
12636 $as_echo_n "(cached) " >&6
12637else
1b1fe467 12638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
12639/* end confdefs.h. */
12640#include <sys/types.h>
12641#include <sys/stat.h>
e3db237e 12642
7175a77f
CR
12643#if defined S_ISBLK && defined S_IFDIR
12644extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12645#endif
e3db237e 12646
7175a77f
CR
12647#if defined S_ISBLK && defined S_IFCHR
12648extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12649#endif
7f947b68 12650
7175a77f
CR
12651#if defined S_ISLNK && defined S_IFREG
12652extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12653#endif
7f947b68 12654
7175a77f
CR
12655#if defined S_ISSOCK && defined S_IFREG
12656extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12657#endif
7f947b68 12658
7175a77f 12659_ACEOF
1b1fe467 12660if ac_fn_c_try_compile "$LINENO"; then :
7175a77f 12661 ac_cv_header_stat_broken=no
2dead0c4 12662else
1b1fe467 12663 ac_cv_header_stat_broken=yes
7175a77f 12664fi
7175a77f
CR
12665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12666fi
1b1fe467 12667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
7175a77f
CR
12668$as_echo "$ac_cv_header_stat_broken" >&6; }
12669if test $ac_cv_header_stat_broken = yes; then
12670
1b1fe467 12671$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
2dead0c4 12672
7f947b68
CR
12673fi
12674
e3db237e 12675
1b1fe467 12676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5
7175a77f 12677$as_echo_n "checking whether #! works in shell scripts... " >&6; }
1b1fe467 12678if ${ac_cv_sys_interpreter+:} false; then :
7175a77f
CR
12679 $as_echo_n "(cached) " >&6
12680else
12681 echo '#! /bin/cat
12682exit 69
12683' >conftest
12684chmod u+x conftest
12685(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
12686if test $? -ne 69; then
12687 ac_cv_sys_interpreter=yes
7f947b68 12688else
7175a77f
CR
12689 ac_cv_sys_interpreter=no
12690fi
12691rm -f conftest
12692fi
1b1fe467 12693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5
7175a77f
CR
12694$as_echo "$ac_cv_sys_interpreter" >&6; }
12695interpval=$ac_cv_sys_interpreter
7f947b68 12696
7175a77f 12697if test $ac_cv_sys_interpreter = yes; then
1b1fe467 12698$as_echo "#define HAVE_HASH_BANG_EXEC 1" >>confdefs.h
7f947b68
CR
12699
12700fi
12701
7175a77f 12702if test "$ac_cv_func_lstat" = "no"; then
1b1fe467 12703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5
7175a77f 12704$as_echo_n "checking for lstat... " >&6; }
1b1fe467 12705if ${bash_cv_func_lstat+:} false; then :
7175a77f 12706 $as_echo_n "(cached) " >&6
7f947b68 12707else
1b1fe467 12708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 12709/* end confdefs.h. */
7f947b68 12710
7175a77f
CR
12711#include <sys/types.h>
12712#include <sys/stat.h>
abe2eb5b 12713
7175a77f
CR
12714int
12715main ()
12716{
12717 lstat(".",(struct stat *)0);
12718 ;
12719 return 0;
12720}
7f947b68 12721_ACEOF
1b1fe467 12722if ac_fn_c_try_link "$LINENO"; then :
7175a77f
CR
12723 bash_cv_func_lstat=yes
12724else
1b1fe467 12725 bash_cv_func_lstat=no
e3db237e 12726fi
1b1fe467
CR
12727rm -f core conftest.err conftest.$ac_objext \
12728 conftest$ac_exeext conftest.$ac_ext
e3db237e 12729fi
1b1fe467 12730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5
7175a77f
CR
12731$as_echo "$bash_cv_func_lstat" >&6; }
12732if test $bash_cv_func_lstat = yes; then
1b1fe467 12733 $as_echo "#define HAVE_LSTAT 1" >>confdefs.h
2dead0c4
CR
12734
12735fi
e3db237e 12736
7f947b68 12737fi
e3db237e 12738
e3db237e 12739
1b1fe467 12740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the ctype macros accept non-ascii characters" >&5
7175a77f 12741$as_echo_n "checking whether the ctype macros accept non-ascii characters... " >&6; }
1b1fe467 12742if ${bash_cv_func_ctype_nonascii+:} false; then :
7175a77f 12743 $as_echo_n "(cached) " >&6
7f947b68 12744else
1b1fe467
CR
12745 if test "$cross_compiling" = yes; then :
12746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5
7175a77f
CR
12747$as_echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;}
12748 bash_cv_func_ctype_nonascii=no
e3db237e 12749
7175a77f 12750else
1b1fe467 12751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 12752/* end confdefs.h. */
e3db237e 12753
7175a77f
CR
12754#ifdef HAVE_LOCALE_H
12755#include <locale.h>
12756#endif
12757#include <stdio.h>
12758#include <ctype.h>
7f947b68 12759
7175a77f
CR
12760main(c, v)
12761int c;
12762char *v[];
12763{
12764 char *deflocale;
12765 unsigned char x;
12766 int r1, r2;
7f947b68 12767
7175a77f
CR
12768#ifdef HAVE_SETLOCALE
12769 /* We take a shot here. If that locale is not known, try the
12770 system default. We try this one because '\342' (226) is
12771 known to be a printable character in that locale. */
12772 deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
12773 if (deflocale == 0)
12774 deflocale = setlocale(LC_ALL, "");
12775#endif
e3db237e 12776
7175a77f
CR
12777 x = '\342';
12778 r1 = isprint(x);
12779 x -= 128;
12780 r2 = isprint(x);
12781 exit (r1 == 0 || r2 == 0);
12782}
abe2eb5b 12783
7f947b68 12784_ACEOF
1b1fe467 12785if ac_fn_c_try_run "$LINENO"; then :
7175a77f
CR
12786 bash_cv_func_ctype_nonascii=yes
12787else
1b1fe467 12788 bash_cv_func_ctype_nonascii=no
7175a77f 12789fi
1b1fe467
CR
12790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12791 conftest.$ac_objext conftest.beam conftest.$ac_ext
e3db237e
CR
12792fi
12793
7175a77f 12794fi
2dead0c4 12795
1b1fe467 12796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_ctype_nonascii" >&5
7175a77f
CR
12797$as_echo "$bash_cv_func_ctype_nonascii" >&6; }
12798if test $bash_cv_func_ctype_nonascii = yes; then
1b1fe467 12799$as_echo "#define CTYPE_NON_ASCII 1" >>confdefs.h
abe2eb5b 12800
c920c360
CR
12801fi
12802
1b1fe467 12803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5
7175a77f 12804$as_echo_n "checking if dup2 fails to clear the close-on-exec flag... " >&6; }
1b1fe467 12805if ${bash_cv_dup2_broken+:} false; then :
7175a77f 12806 $as_echo_n "(cached) " >&6
7f947b68 12807else
1b1fe467
CR
12808 if test "$cross_compiling" = yes; then :
12809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5
7175a77f
CR
12810$as_echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;}
12811 bash_cv_dup2_broken=no
7f947b68 12812else
1b1fe467 12813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
12814/* end confdefs.h. */
12815
12816#include <sys/types.h>
12817#include <fcntl.h>
12818main()
12819{
12820 int fd1, fd2, fl;
12821 fd1 = open("/dev/null", 2);
12822 if (fcntl(fd1, 2, 1) < 0)
12823 exit(1);
12824 fd2 = dup2(fd1, 1);
12825 if (fd2 < 0)
12826 exit(2);
12827 fl = fcntl(fd2, 1, 0);
12828 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
12829 exit(fl != 1);
12830}
7f947b68 12831
abe2eb5b 12832_ACEOF
1b1fe467 12833if ac_fn_c_try_run "$LINENO"; then :
7175a77f
CR
12834 bash_cv_dup2_broken=yes
12835else
1b1fe467 12836 bash_cv_dup2_broken=no
2dead0c4 12837fi
1b1fe467
CR
12838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12839 conftest.$ac_objext conftest.beam conftest.$ac_ext
7f947b68
CR
12840fi
12841
12842
7175a77f 12843fi
2dead0c4 12844
1b1fe467 12845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dup2_broken" >&5
7175a77f
CR
12846$as_echo "$bash_cv_dup2_broken" >&6; }
12847if test $bash_cv_dup2_broken = yes; then
1b1fe467 12848$as_echo "#define DUP2_BROKEN 1" >>confdefs.h
e3db237e 12849
7f947b68 12850fi
71412226 12851
abe2eb5b 12852
1b1fe467 12853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pgrps need synchronization" >&5
7175a77f 12854$as_echo_n "checking whether pgrps need synchronization... " >&6; }
1b1fe467 12855if ${bash_cv_pgrp_pipe+:} false; then :
7175a77f 12856 $as_echo_n "(cached) " >&6
7f947b68 12857else
1b1fe467
CR
12858 if test "$cross_compiling" = yes; then :
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5
7175a77f
CR
12860$as_echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;}
12861 bash_cv_pgrp_pipe=no
12862else
1b1fe467 12863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 12864/* end confdefs.h. */
ccc6cda3 12865
7175a77f
CR
12866#ifdef HAVE_UNISTD_H
12867# include <unistd.h>
12868#endif
12869main()
12870{
12871# ifdef GETPGRP_VOID
12872# define getpgID() getpgrp()
12873# else
12874# define getpgID() getpgrp(0)
12875# define setpgid(x,y) setpgrp(x,y)
12876# endif
12877 int pid1, pid2, fds[2];
12878 int status;
12879 char ok;
c920c360 12880
7175a77f
CR
12881 switch (pid1 = fork()) {
12882 case -1:
12883 exit(1);
12884 case 0:
12885 setpgid(0, getpid());
12886 exit(0);
12887 }
12888 setpgid(pid1, pid1);
12889
12890 sleep(2); /* let first child die */
abe2eb5b 12891
7175a77f
CR
12892 if (pipe(fds) < 0)
12893 exit(2);
12894
12895 switch (pid2 = fork()) {
12896 case -1:
12897 exit(3);
12898 case 0:
12899 setpgid(0, pid1);
12900 ok = getpgID() == pid1;
12901 write(fds[1], &ok, 1);
12902 exit(0);
12903 }
12904 setpgid(pid2, pid1);
12905
12906 close(fds[1]);
12907 if (read(fds[0], &ok, 1) != 1)
12908 exit(4);
12909 wait(&status);
12910 wait(&status);
12911 exit(ok ? 0 : 5);
12912}
12913
1b1fe467
CR
12914_ACEOF
12915if ac_fn_c_try_run "$LINENO"; then :
12916 bash_cv_pgrp_pipe=no
12917else
12918 bash_cv_pgrp_pipe=yes
7f947b68 12919fi
1b1fe467
CR
12920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12921 conftest.$ac_objext conftest.beam conftest.$ac_ext
7f947b68
CR
12922fi
12923
c920c360 12924
7175a77f 12925fi
abe2eb5b 12926
1b1fe467 12927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_pgrp_pipe" >&5
7175a77f
CR
12928$as_echo "$bash_cv_pgrp_pipe" >&6; }
12929if test $bash_cv_pgrp_pipe = yes; then
1b1fe467 12930$as_echo "#define PGRP_PIPE 1" >>confdefs.h
71412226 12931
c920c360 12932fi
abe2eb5b 12933
71412226 12934
1b1fe467 12935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5
7175a77f 12936$as_echo_n "checking for type of signal functions... " >&6; }
1b1fe467 12937if ${bash_cv_signal_vintage+:} false; then :
7175a77f 12938 $as_echo_n "(cached) " >&6
7f947b68 12939else
abe2eb5b 12940
1b1fe467 12941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
12942/* end confdefs.h. */
12943#include <signal.h>
12944int
12945main ()
12946{
7610e0c5 12947
7175a77f
CR
12948 sigset_t ss;
12949 struct sigaction sa;
12950 sigemptyset(&ss); sigsuspend(&ss);
12951 sigaction(SIGINT, &sa, (struct sigaction *) 0);
12952 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
f73dda09 12953
7175a77f
CR
12954 ;
12955 return 0;
12956}
12957_ACEOF
1b1fe467 12958if ac_fn_c_try_link "$LINENO"; then :
7175a77f 12959 bash_cv_signal_vintage=posix
7f947b68 12960else
a82a04b3 12961
1b1fe467 12962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
12963/* end confdefs.h. */
12964#include <signal.h>
12965int
12966main ()
12967{
2dead0c4 12968
7175a77f
CR
12969 int mask = sigmask(SIGINT);
12970 sigsetmask(mask); sigblock(mask); sigpause(mask);
7f947b68 12971
7175a77f
CR
12972 ;
12973 return 0;
12974}
12975_ACEOF
1b1fe467 12976if ac_fn_c_try_link "$LINENO"; then :
7175a77f 12977 bash_cv_signal_vintage=4.2bsd
7f947b68
CR
12978else
12979
1b1fe467 12980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 12981/* end confdefs.h. */
2dead0c4 12982
7175a77f
CR
12983 #include <signal.h>
12984 RETSIGTYPE foo() { }
12985int
12986main ()
12987{
2dead0c4 12988
7175a77f
CR
12989 int mask = sigmask(SIGINT);
12990 sigset(SIGINT, foo); sigrelse(SIGINT);
12991 sighold(SIGINT); sigpause(SIGINT);
7f947b68 12992
7175a77f
CR
12993 ;
12994 return 0;
12995}
e3db237e 12996_ACEOF
1b1fe467 12997if ac_fn_c_try_link "$LINENO"; then :
7175a77f
CR
12998 bash_cv_signal_vintage=svr3
12999else
1b1fe467 13000 bash_cv_signal_vintage=v7
abe2eb5b 13001
2dead0c4 13002fi
1b1fe467
CR
13003rm -f core conftest.err conftest.$ac_objext \
13004 conftest$ac_exeext conftest.$ac_ext
7f947b68 13005
7175a77f 13006fi
1b1fe467
CR
13007rm -f core conftest.err conftest.$ac_objext \
13008 conftest$ac_exeext conftest.$ac_ext
7f947b68 13009
7175a77f 13010fi
1b1fe467
CR
13011rm -f core conftest.err conftest.$ac_objext \
13012 conftest$ac_exeext conftest.$ac_ext
7610e0c5 13013
2dead0c4 13014fi
7610e0c5 13015
1b1fe467 13016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5
7175a77f
CR
13017$as_echo "$bash_cv_signal_vintage" >&6; }
13018if test "$bash_cv_signal_vintage" = posix; then
1b1fe467 13019$as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
2dead0c4 13020
7175a77f 13021elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
1b1fe467 13022$as_echo "#define HAVE_BSD_SIGNALS 1" >>confdefs.h
e3db237e 13023
7175a77f 13024elif test "$bash_cv_signal_vintage" = svr3; then
1b1fe467 13025$as_echo "#define HAVE_USG_SIGHOLD 1" >>confdefs.h
abe2eb5b 13026
c920c360
CR
13027fi
13028
abe2eb5b 13029
1b1fe467 13030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_errlist and sys_nerr" >&5
7175a77f 13031$as_echo_n "checking for sys_errlist and sys_nerr... " >&6; }
1b1fe467 13032if ${bash_cv_sys_errlist+:} false; then :
7175a77f 13033 $as_echo_n "(cached) " >&6
7f947b68 13034else
1b1fe467 13035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
13036/* end confdefs.h. */
13037#include <errno.h>
13038int
13039main ()
13040{
13041extern char *sys_errlist[];
13042 extern int sys_nerr;
13043 char *msg = sys_errlist[sys_nerr - 1];
13044 ;
13045 return 0;
13046}
13047_ACEOF
1b1fe467 13048if ac_fn_c_try_link "$LINENO"; then :
7175a77f 13049 bash_cv_sys_errlist=yes
2dead0c4 13050else
1b1fe467 13051 bash_cv_sys_errlist=no
7175a77f 13052fi
1b1fe467
CR
13053rm -f core conftest.err conftest.$ac_objext \
13054 conftest$ac_exeext conftest.$ac_ext
2dead0c4 13055fi
1b1fe467 13056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_errlist" >&5
7175a77f
CR
13057$as_echo "$bash_cv_sys_errlist" >&6; }
13058if test $bash_cv_sys_errlist = yes; then
1b1fe467 13059$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
2dead0c4
CR
13060
13061fi
13062
13063
1b1fe467 13064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_siglist in system C library" >&5
7175a77f 13065$as_echo_n "checking for sys_siglist in system C library... " >&6; }
1b1fe467 13066if ${bash_cv_sys_siglist+:} false; then :
2dead0c4
CR
13067 $as_echo_n "(cached) " >&6
13068else
1b1fe467
CR
13069 if test "$cross_compiling" = yes; then :
13070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5
7175a77f
CR
13071$as_echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;}
13072 bash_cv_sys_siglist=no
13073else
1b1fe467 13074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e3db237e 13075/* end confdefs.h. */
7f947b68 13076
7175a77f
CR
13077#include <sys/types.h>
13078#include <signal.h>
13079#ifdef HAVE_UNISTD_H
13080#include <unistd.h>
7f947b68 13081#endif
7175a77f
CR
13082#if !HAVE_DECL_SYS_SIGLIST
13083extern char *sys_siglist[];
7f947b68 13084#endif
7175a77f
CR
13085main()
13086{
13087char *msg = sys_siglist[2];
13088exit(msg == 0);
13089}
5e4a95c7 13090_ACEOF
1b1fe467 13091if ac_fn_c_try_run "$LINENO"; then :
7175a77f 13092 bash_cv_sys_siglist=yes
f73dda09 13093else
1b1fe467 13094 bash_cv_sys_siglist=no
7175a77f 13095fi
1b1fe467
CR
13096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13097 conftest.$ac_objext conftest.beam conftest.$ac_ext
e3db237e
CR
13098fi
13099
7f947b68 13100fi
7f947b68 13101
1b1fe467 13102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_siglist" >&5
7175a77f
CR
13103$as_echo "$bash_cv_sys_siglist" >&6; }
13104if test $bash_cv_sys_siglist = yes; then
1b1fe467 13105$as_echo "#define HAVE_SYS_SIGLIST 1" >>confdefs.h
e3db237e 13106
2dead0c4 13107fi
e3db237e 13108
1b1fe467 13109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in signal.h or unistd.h" >&5
7175a77f 13110$as_echo_n "checking for _sys_siglist in signal.h or unistd.h... " >&6; }
1b1fe467 13111if ${bash_cv_decl_under_sys_siglist+:} false; then :
2dead0c4
CR
13112 $as_echo_n "(cached) " >&6
13113else
1b1fe467 13114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e3db237e 13115/* end confdefs.h. */
7f947b68 13116
2dead0c4 13117#include <sys/types.h>
7175a77f
CR
13118#include <signal.h>
13119#ifdef HAVE_UNISTD_H
13120#include <unistd.h>
13121#endif
e3db237e
CR
13122int
13123main ()
13124{
7175a77f 13125 char *msg = _sys_siglist[2];
e3db237e
CR
13126 ;
13127 return 0;
13128}
13129_ACEOF
1b1fe467 13130if ac_fn_c_try_compile "$LINENO"; then :
7175a77f 13131 bash_cv_decl_under_sys_siglist=yes
e3db237e 13132else
1b1fe467 13133 bash_cv_decl_under_sys_siglist=no
2dead0c4 13134fi
7175a77f 13135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e3db237e 13136fi
1b1fe467 13137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_under_sys_siglist" >&5
7175a77f
CR
13138$as_echo "$bash_cv_decl_under_sys_siglist" >&6; }
13139if test $bash_cv_decl_under_sys_siglist = yes; then
1b1fe467 13140$as_echo "#define UNDER_SYS_SIGLIST_DECLARED 1" >>confdefs.h
e3db237e 13141
7f947b68 13142fi
2dead0c4
CR
13143
13144
1b1fe467 13145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in system C library" >&5
7175a77f 13146$as_echo_n "checking for _sys_siglist in system C library... " >&6; }
1b1fe467 13147if ${bash_cv_under_sys_siglist+:} false; then :
2dead0c4 13148 $as_echo_n "(cached) " >&6
e3db237e 13149else
1b1fe467
CR
13150 if test "$cross_compiling" = yes; then :
13151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5
7175a77f
CR
13152$as_echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;}
13153 bash_cv_under_sys_siglist=no
7f947b68 13154else
1b1fe467 13155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2dead0c4 13156/* end confdefs.h. */
7f947b68 13157
7175a77f
CR
13158#include <sys/types.h>
13159#include <signal.h>
13160#ifdef HAVE_UNISTD_H
13161#include <unistd.h>
2dead0c4 13162#endif
7175a77f
CR
13163#ifndef UNDER_SYS_SIGLIST_DECLARED
13164extern char *_sys_siglist[];
2dead0c4 13165#endif
7175a77f
CR
13166main()
13167{
13168char *msg = (char *)_sys_siglist[2];
13169exit(msg == 0);
7f947b68 13170}
2dead0c4 13171_ACEOF
1b1fe467 13172if ac_fn_c_try_run "$LINENO"; then :
7175a77f 13173 bash_cv_under_sys_siglist=yes
2dead0c4 13174else
1b1fe467 13175 bash_cv_under_sys_siglist=no
71412226 13176fi
1b1fe467
CR
13177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13178 conftest.$ac_objext conftest.beam conftest.$ac_ext
5e4a95c7 13179fi
b709b946 13180
abe2eb5b
CR
13181fi
13182
1b1fe467 13183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_under_sys_siglist" >&5
7175a77f
CR
13184$as_echo "$bash_cv_under_sys_siglist" >&6; }
13185if test $bash_cv_under_sys_siglist = yes; then
1b1fe467 13186$as_echo "#define HAVE_UNDER_SYS_SIGLIST 1" >>confdefs.h
abe2eb5b 13187
7f947b68 13188fi
abe2eb5b 13189
7175a77f 13190
1b1fe467 13191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signal handlers are of type void" >&5
7175a77f 13192$as_echo_n "checking whether signal handlers are of type void... " >&6; }
1b1fe467 13193if ${bash_cv_void_sighandler+:} false; then :
abe2eb5b
CR
13194 $as_echo_n "(cached) " >&6
13195else
1b1fe467 13196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b
CR
13197/* end confdefs.h. */
13198#include <sys/types.h>
7175a77f
CR
13199#include <signal.h>
13200#ifdef signal
13201#undef signal
13202#endif
13203#ifdef __cplusplus
13204extern "C"
13205#endif
13206void (*signal ()) ();
13207int
13208main ()
7f947b68 13209{
7175a77f
CR
13210int i;
13211 ;
13212 return 0;
7f947b68 13213}
abe2eb5b 13214_ACEOF
1b1fe467 13215if ac_fn_c_try_compile "$LINENO"; then :
7175a77f 13216 bash_cv_void_sighandler=yes
abe2eb5b 13217else
1b1fe467 13218 bash_cv_void_sighandler=no
abe2eb5b 13219fi
7175a77f 13220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1b1fe467
CR
13221fi
13222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_void_sighandler" >&5
13223$as_echo "$bash_cv_void_sighandler" >&6; }
13224if test $bash_cv_void_sighandler = yes; then
13225$as_echo "#define VOID_SIGHANDLER 1" >>confdefs.h
2dead0c4 13226
7175a77f 13227fi
2dead0c4
CR
13228
13229
c920c360 13230
1b1fe467
CR
13231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
13232$as_echo_n "checking for clock_t... " >&6; }
13233if ${bash_cv_type_clock_t+:} false; then :
7175a77f 13234 $as_echo_n "(cached) " >&6
c920c360 13235else
1b1fe467 13236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f
CR
13237/* end confdefs.h. */
13238#include <sys/types.h>
13239#if STDC_HEADERS
13240#include <stdlib.h>
13241#include <stddef.h>
13242#endif
13243#if HAVE_INTTYPES_H
13244#include <inttypes.h>
13245#endif
13246#if HAVE_STDINT_H
13247#include <stdint.h>
13248#endif
1b1fe467 13249#include <sys/times.h>
e3db237e 13250
7175a77f
CR
13251_ACEOF
13252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467
CR
13253 $EGREP "clock_t" >/dev/null 2>&1; then :
13254 bash_cv_type_clock_t=yes
7175a77f 13255else
1b1fe467 13256 bash_cv_type_clock_t=no
7f947b68 13257fi
7175a77f 13258rm -f conftest*
71412226 13259
2dead0c4 13260fi
71412226 13261
1b1fe467
CR
13262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_clock_t" >&5
13263$as_echo "$bash_cv_type_clock_t" >&6; }
7f947b68 13264
1b1fe467 13265if test $bash_cv_type_clock_t = no; then
7175a77f 13266 cat >>confdefs.h <<_ACEOF
1b1fe467 13267#define clock_t long
7175a77f 13268_ACEOF
7f947b68 13269
abe2eb5b 13270fi
7f947b68
CR
13271
13272
7175a77f 13273
1b1fe467
CR
13274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset_t" >&5
13275$as_echo_n "checking for sigset_t... " >&6; }
13276if ${bash_cv_type_sigset_t+:} false; then :
c920c360
CR
13277 $as_echo_n "(cached) " >&6
13278else
1b1fe467 13279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c920c360 13280/* end confdefs.h. */
7175a77f
CR
13281#include <sys/types.h>
13282#if STDC_HEADERS
13283#include <stdlib.h>
13284#include <stddef.h>
13285#endif
13286#if HAVE_INTTYPES_H
13287#include <inttypes.h>
13288#endif
13289#if HAVE_STDINT_H
13290#include <stdint.h>
13291#endif
1b1fe467 13292#include <signal.h>
7175a77f 13293
abe2eb5b 13294_ACEOF
7175a77f 13295if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467
CR
13296 $EGREP "sigset_t" >/dev/null 2>&1; then :
13297 bash_cv_type_sigset_t=yes
abe2eb5b 13298else
1b1fe467 13299 bash_cv_type_sigset_t=no
7f947b68 13300fi
7175a77f
CR
13301rm -f conftest*
13302
7f947b68 13303fi
7175a77f 13304
1b1fe467
CR
13305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sigset_t" >&5
13306$as_echo "$bash_cv_type_sigset_t" >&6; }
7175a77f 13307
1b1fe467 13308if test $bash_cv_type_sigset_t = no; then
7175a77f 13309 cat >>confdefs.h <<_ACEOF
1b1fe467 13310#define sigset_t int
7175a77f 13311_ACEOF
e3db237e 13312
7f947b68 13313fi
e3db237e 13314
7175a77f 13315
7f947b68 13316
73a146be
CR
13317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5
13318$as_echo_n "checking for sig_atomic_t... " >&6; }
13319if ${bash_cv_type_sig_atomic_t+:} false; then :
13320 $as_echo_n "(cached) " >&6
13321else
13322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13323/* end confdefs.h. */
13324#include <sys/types.h>
13325#if STDC_HEADERS
13326#include <stdlib.h>
13327#include <stddef.h>
13328#endif
13329#if HAVE_INTTYPES_H
13330#include <inttypes.h>
13331#endif
13332#if HAVE_STDINT_H
13333#include <stdint.h>
13334#endif
13335#include <signal.h>
13336
13337_ACEOF
13338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13339 $EGREP "sig_atomic_t" >/dev/null 2>&1; then :
13340 bash_cv_type_sig_atomic_t=yes
13341else
13342 bash_cv_type_sig_atomic_t=no
13343fi
13344rm -f conftest*
13345
13346fi
13347
13348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5
13349$as_echo "$bash_cv_type_sig_atomic_t" >&6; }
13350
13351if test $bash_cv_type_sig_atomic_t = no; then
13352 cat >>confdefs.h <<_ACEOF
13353#define sig_atomic_t int
13354_ACEOF
13355
13356fi
13357
13358
13359
1b1fe467
CR
13360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for quad_t" >&5
13361$as_echo_n "checking for quad_t... " >&6; }
13362if ${bash_cv_type_quad_t+:} false; then :
7f947b68 13363 $as_echo_n "(cached) " >&6
abe2eb5b 13364else
1b1fe467 13365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 13366/* end confdefs.h. */
abe2eb5b 13367#include <sys/types.h>
7175a77f
CR
13368#if STDC_HEADERS
13369#include <stdlib.h>
13370#include <stddef.h>
7f947b68 13371#endif
7175a77f
CR
13372#if HAVE_INTTYPES_H
13373#include <inttypes.h>
7f947b68 13374#endif
7175a77f
CR
13375#if HAVE_STDINT_H
13376#include <stdint.h>
13377#endif
1b1fe467 13378
7175a77f 13379
abe2eb5b 13380_ACEOF
7175a77f 13381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467
CR
13382 $EGREP "quad_t" >/dev/null 2>&1; then :
13383 bash_cv_type_quad_t=yes
7610e0c5 13384else
1b1fe467 13385 bash_cv_type_quad_t=no
2dead0c4 13386fi
7175a77f 13387rm -f conftest*
2dead0c4 13388
abe2eb5b
CR
13389fi
13390
1b1fe467
CR
13391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_quad_t" >&5
13392$as_echo "$bash_cv_type_quad_t" >&6; }
13393if test $bash_cv_type_quad_t = yes; then
13394 $as_echo "#define HAVE_QUAD_T 1" >>confdefs.h
7175a77f
CR
13395
13396 fi
1b1fe467 13397if test $bash_cv_type_quad_t = no; then
7175a77f 13398 cat >>confdefs.h <<_ACEOF
1b1fe467 13399#define quad_t long
7175a77f 13400_ACEOF
2dead0c4 13401
abe2eb5b 13402fi
2dead0c4 13403
7f947b68
CR
13404
13405
1b1fe467
CR
13406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
13407$as_echo_n "checking for intmax_t... " >&6; }
13408if ${bash_cv_type_intmax_t+:} false; then :
13409 $as_echo_n "(cached) " >&6
7f947b68 13410else
1b1fe467 13411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
abe2eb5b 13412/* end confdefs.h. */
7f947b68 13413#include <sys/types.h>
1b1fe467
CR
13414#if STDC_HEADERS
13415#include <stdlib.h>
13416#include <stddef.h>
13417#endif
13418#if HAVE_INTTYPES_H
13419#include <inttypes.h>
13420#endif
13421#if HAVE_STDINT_H
13422#include <stdint.h>
7175a77f 13423#endif
7175a77f
CR
13424
13425
1b1fe467
CR
13426_ACEOF
13427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13428 $EGREP "intmax_t" >/dev/null 2>&1; then :
13429 bash_cv_type_intmax_t=yes
13430else
13431 bash_cv_type_intmax_t=no
7f947b68 13432fi
1b1fe467 13433rm -f conftest*
7175a77f 13434
abe2eb5b
CR
13435fi
13436
1b1fe467
CR
13437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_intmax_t" >&5
13438$as_echo "$bash_cv_type_intmax_t" >&6; }
7175a77f 13439
1b1fe467
CR
13440if test $bash_cv_type_intmax_t = no; then
13441 cat >>confdefs.h <<_ACEOF
13442#define intmax_t $bash_cv_type_long_long
7175a77f 13443_ACEOF
abe2eb5b 13444
7f947b68 13445fi
abe2eb5b 13446
7f947b68 13447
71412226 13448
1b1fe467
CR
13449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintmax_t" >&5
13450$as_echo_n "checking for uintmax_t... " >&6; }
13451if ${bash_cv_type_uintmax_t+:} false; then :
13452 $as_echo_n "(cached) " >&6
7175a77f 13453else
1b1fe467 13454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175a77f 13455/* end confdefs.h. */
1b1fe467
CR
13456#include <sys/types.h>
13457#if STDC_HEADERS
13458#include <stdlib.h>
13459#include <stddef.h>
13460#endif
13461#if HAVE_INTTYPES_H
13462#include <inttypes.h>
13463#endif
13464#if HAVE_STDINT_H
13465#include <stdint.h>
13466#endif
7f947b68
CR
13467
13468
1b1fe467
CR
13469_ACEOF
13470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13471 $EGREP "uintmax_t" >/dev/null 2>&1; then :
13472 bash_cv_type_uintmax_t=yes
7f947b68 13473else
1b1fe467 13474 bash_cv_type_uintmax_t=no
7f947b68 13475fi
1b1fe467 13476rm -f conftest*
c920c360
CR
13477
13478fi
13479
1b1fe467
CR
13480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_uintmax_t" >&5
13481$as_echo "$bash_cv_type_uintmax_t" >&6; }
7f947b68 13482
1b1fe467
CR
13483if test $bash_cv_type_uintmax_t = no; then
13484 cat >>confdefs.h <<_ACEOF
13485#define uintmax_t $bash_cv_type_unsigned_long_long
abe2eb5b 13486_ACEOF
7f947b68
CR
13487
13488fi
13489
1b1fe467
CR
13490if test "$ac_cv_header_sys_socket_h" = "yes"; then
13491
13492
13493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
13494$as_echo_n "checking for socklen_t... " >&6; }
13495if ${bash_cv_type_socklen_t+:} false; then :
13496 $as_echo_n "(cached) " >&6
7f947b68 13497else
1b1fe467 13498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e3db237e 13499/* end confdefs.h. */
1b1fe467
CR
13500#include <sys/types.h>
13501#if STDC_HEADERS
2dead0c4 13502#include <stdlib.h>
1b1fe467
CR
13503#include <stddef.h>
13504#endif
13505#if HAVE_INTTYPES_H
13506#include <inttypes.h>
13507#endif
13508#if HAVE_STDINT_H
13509#include <stdint.h>
13510#endif
13511#include <sys/socket.h>
2dead0c4
CR
13512
13513_ACEOF
1b1fe467
CR
13514if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13515 $EGREP "socklen_t" >/dev/null 2>&1; then :
13516 bash_cv_type_socklen_t=yes
2dead0c4 13517else
1b1fe467 13518 bash_cv_type_socklen_t=no
7175a77f 13519fi
1b1fe467 13520rm -f conftest*
2dead0c4 13521
1b1fe467 13522fi
abe2eb5b 13523
1b1fe467
CR
13524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_socklen_t" >&5
13525$as_echo "$bash_cv_type_socklen_t" >&6; }
13526if test $bash_cv_type_socklen_t = yes; then
13527 $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
7175a77f 13528
1b1fe467
CR
13529 fi
13530if test $bash_cv_type_socklen_t = no; then
13531 cat >>confdefs.h <<_ACEOF
c2fa6583 13532#define socklen_t unsigned int
2dead0c4 13533_ACEOF
c920c360 13534
1b1fe467 13535fi
c920c360 13536
1b1fe467
CR
13537fi
13538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size and type of struct rlimit fields" >&5
13539$as_echo_n "checking for size and type of struct rlimit fields... " >&6; }
13540if ${bash_cv_type_rlimit+:} false; then :
2dead0c4
CR
13541 $as_echo_n "(cached) " >&6
13542else
1b1fe467 13543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2dead0c4
CR
13544/* end confdefs.h. */
13545#include <sys/types.h>
1b1fe467 13546#include <sys/resource.h>
7175a77f
CR
13547int
13548main ()
13549{
1b1fe467 13550rlim_t xxx;
7175a77f
CR
13551 ;
13552 return 0;
13553}
7610e0c5 13554_ACEOF
1b1fe467
CR
13555if ac_fn_c_try_compile "$LINENO"; then :
13556 bash_cv_type_rlimit=rlim_t
e3db237e 13557else
71412226 13558
1b1fe467
CR
13559if test "$cross_compiling" = yes; then :
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5
13561$as_echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&2;}
13562 bash_cv_type_rlimit=long
13563else
13564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7f947b68 13565/* end confdefs.h. */
7175a77f 13566
c920c360 13567#include <sys/types.h>
1b1fe467
CR
13568#include <sys/time.h>
13569#include <sys/resource.h>
13570main()
7175a77f 13571{
1b1fe467
CR
13572#ifdef HAVE_QUAD_T
13573 struct rlimit rl;
13574 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
13575 exit(0);
13576#endif
13577 exit(1);
7175a77f 13578}
e3db237e 13579_ACEOF
1b1fe467
CR
13580if ac_fn_c_try_run "$LINENO"; then :
13581 bash_cv_type_rlimit=quad_t
e3db237e 13582else
1b1fe467 13583 bash_cv_type_rlimit=long
e3db237e 13584fi
1b1fe467
CR
13585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13586 conftest.$ac_objext conftest.beam conftest.$ac_ext
7175a77f 13587fi
7f947b68 13588
7175a77f 13589fi
1b1fe467 13590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2dead0c4
CR
13591
13592fi
13593
1b1fe467
CR
13594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_rlimit" >&5
13595$as_echo "$bash_cv_type_rlimit" >&6; }
13596if test $bash_cv_type_rlimit = quad_t; then
13597$as_echo "#define RLIMTYPE quad_t" >>confdefs.h
2dead0c4 13598
1b1fe467
CR
13599elif test $bash_cv_type_rlimit = rlim_t; then
13600$as_echo "#define RLIMTYPE rlim_t" >>confdefs.h
2dead0c4 13601
1b1fe467 13602fi
7f947b68 13603
2dead0c4 13604
1b1fe467
CR
13605# The cast to long int works around a bug in the HP C Compiler
13606# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13607# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13608# This bug is HP SR number 8606223364.
13609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5
13610$as_echo_n "checking size of intmax_t... " >&6; }
13611if ${ac_cv_sizeof_intmax_t+:} false; then :
13612 $as_echo_n "(cached) " >&6
13613else
13614 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default"; then :
2dead0c4 13615
abe2eb5b 13616else
1b1fe467
CR
13617 if test "$ac_cv_type_intmax_t" = yes; then
13618 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13619$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13620as_fn_error 77 "cannot compute sizeof (intmax_t)
13621See \`config.log' for more details" "$LINENO" 5; }
13622 else
13623 ac_cv_sizeof_intmax_t=0
13624 fi
13625fi
c920c360 13626
1b1fe467
CR
13627fi
13628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5
13629$as_echo "$ac_cv_sizeof_intmax_t" >&6; }
2dead0c4 13630
7175a77f
CR
13631
13632
1b1fe467
CR
13633cat >>confdefs.h <<_ACEOF
13634#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t
13635_ACEOF
7f947b68 13636
7f947b68 13637
7f947b68 13638
1b1fe467
CR
13639
13640ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" "
13641#include <sys/types.h>
13642#include <termios.h>
13643
13644"
13645if test "x$ac_cv_member_struct_termios_c_line" = xyes; then :
13646 $as_echo "#define TERMIOS_LDISC 1" >>confdefs.h
13647
7175a77f 13648fi
1b1fe467
CR
13649
13650
13651
13652ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" "
13653#include <sys/types.h>
13654#include <termio.h>
13655
13656"
13657if test "x$ac_cv_member_struct_termio_c_line" = xyes; then :
13658 $as_echo "#define TERMIO_LDISC 1" >>confdefs.h
7f947b68 13659
ccc6cda3
JA
13660fi
13661
a82a04b3
CR
13662
13663
1b1fe467 13664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5
dd4f3dd8 13665$as_echo_n "checking for struct dirent.d_ino... " >&6; }
1b1fe467 13666if ${bash_cv_dirent_has_dino+:} false; then :
dd4f3dd8 13667 $as_echo_n "(cached) " >&6
ccc6cda3 13668else
1b1fe467 13669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 13670/* end confdefs.h. */
ccc6cda3
JA
13671
13672#include <stdio.h>
13673#include <sys/types.h>
13674#ifdef HAVE_UNISTD_H
13675# include <unistd.h>
13676#endif /* HAVE_UNISTD_H */
13677#if defined(HAVE_DIRENT_H)
13678# include <dirent.h>
13679#else
13680# define dirent direct
13681# ifdef HAVE_SYS_NDIR_H
13682# include <sys/ndir.h>
13683# endif /* SYSNDIR */
13684# ifdef HAVE_SYS_DIR_H
13685# include <sys/dir.h>
13686# endif /* SYSDIR */
13687# ifdef HAVE_NDIR_H
13688# include <ndir.h>
13689# endif
13690#endif /* HAVE_DIRENT_H */
13691
f73dda09
JA
13692int
13693main ()
13694{
ccc6cda3
JA
13695
13696struct dirent d; int z; z = d.d_ino;
13697
f73dda09
JA
13698 ;
13699 return 0;
13700}
13701_ACEOF
1b1fe467 13702if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
13703 bash_cv_dirent_has_dino=yes
13704else
1b1fe467 13705 bash_cv_dirent_has_dino=no
ccc6cda3 13706fi
b709b946 13707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
13708fi
13709
1b1fe467 13710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_dino" >&5
dd4f3dd8 13711$as_echo "$bash_cv_dirent_has_dino" >&6; }
ccc6cda3 13712if test $bash_cv_dirent_has_dino = yes; then
1b1fe467 13713$as_echo "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h
ccc6cda3
JA
13714
13715fi
13716
a82a04b3 13717
1b1fe467 13718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5
dd4f3dd8 13719$as_echo_n "checking for struct dirent.d_fileno... " >&6; }
1b1fe467 13720if ${bash_cv_dirent_has_d_fileno+:} false; then :
dd4f3dd8 13721 $as_echo_n "(cached) " >&6
d166f048 13722else
1b1fe467 13723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 13724/* end confdefs.h. */
d166f048
JA
13725
13726#include <stdio.h>
13727#include <sys/types.h>
13728#ifdef HAVE_UNISTD_H
13729# include <unistd.h>
13730#endif /* HAVE_UNISTD_H */
13731#if defined(HAVE_DIRENT_H)
13732# include <dirent.h>
13733#else
13734# define dirent direct
13735# ifdef HAVE_SYS_NDIR_H
13736# include <sys/ndir.h>
13737# endif /* SYSNDIR */
13738# ifdef HAVE_SYS_DIR_H
13739# include <sys/dir.h>
13740# endif /* SYSDIR */
13741# ifdef HAVE_NDIR_H
13742# include <ndir.h>
13743# endif
13744#endif /* HAVE_DIRENT_H */
13745
f73dda09
JA
13746int
13747main ()
13748{
d166f048
JA
13749
13750struct dirent d; int z; z = d.d_fileno;
13751
f73dda09
JA
13752 ;
13753 return 0;
13754}
5c26afb8 13755_ACEOF
1b1fe467 13756if ac_fn_c_try_compile "$LINENO"; then :
d166f048
JA
13757 bash_cv_dirent_has_d_fileno=yes
13758else
1b1fe467 13759 bash_cv_dirent_has_d_fileno=no
d166f048 13760fi
b709b946 13761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
13762fi
13763
1b1fe467 13764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5
dd4f3dd8 13765$as_echo "$bash_cv_dirent_has_d_fileno" >&6; }
d166f048 13766if test $bash_cv_dirent_has_d_fileno = yes; then
1b1fe467 13767$as_echo "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h
4931aca6
CR
13768
13769fi
13770
a82a04b3 13771
1b1fe467 13772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_namlen" >&5
dd4f3dd8 13773$as_echo_n "checking for struct dirent.d_namlen... " >&6; }
1b1fe467 13774if ${bash_cv_dirent_has_d_namlen+:} false; then :
dd4f3dd8 13775 $as_echo_n "(cached) " >&6
4931aca6 13776else
1b1fe467 13777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 13778/* end confdefs.h. */
4931aca6
CR
13779
13780#include <stdio.h>
13781#include <sys/types.h>
13782#ifdef HAVE_UNISTD_H
13783# include <unistd.h>
13784#endif /* HAVE_UNISTD_H */
13785#if defined(HAVE_DIRENT_H)
13786# include <dirent.h>
13787#else
13788# define dirent direct
13789# ifdef HAVE_SYS_NDIR_H
13790# include <sys/ndir.h>
13791# endif /* SYSNDIR */
13792# ifdef HAVE_SYS_DIR_H
13793# include <sys/dir.h>
13794# endif /* SYSDIR */
13795# ifdef HAVE_NDIR_H
13796# include <ndir.h>
13797# endif
13798#endif /* HAVE_DIRENT_H */
13799
13800int
13801main ()
13802{
13803
13804struct dirent d; int z; z = d.d_namlen;
13805
13806 ;
13807 return 0;
13808}
13809_ACEOF
1b1fe467 13810if ac_fn_c_try_compile "$LINENO"; then :
4931aca6
CR
13811 bash_cv_dirent_has_d_namlen=yes
13812else
1b1fe467 13813 bash_cv_dirent_has_d_namlen=no
4931aca6 13814fi
b709b946 13815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4931aca6
CR
13816fi
13817
1b1fe467 13818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_namlen" >&5
dd4f3dd8 13819$as_echo "$bash_cv_dirent_has_d_namlen" >&6; }
4931aca6 13820if test $bash_cv_dirent_has_d_namlen = yes; then
1b1fe467 13821$as_echo "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h
d166f048
JA
13822
13823fi
13824
1b1fe467 13825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5
dd4f3dd8 13826$as_echo_n "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; }
1b1fe467 13827if ${bash_cv_struct_winsize_header+:} false; then :
dd4f3dd8 13828 $as_echo_n "(cached) " >&6
d166f048 13829else
1b1fe467 13830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 13831/* end confdefs.h. */
d166f048
JA
13832#include <sys/types.h>
13833#include <sys/ioctl.h>
f73dda09
JA
13834int
13835main ()
13836{
d166f048 13837struct winsize x;
f73dda09
JA
13838 ;
13839 return 0;
13840}
13841_ACEOF
1b1fe467 13842if ac_fn_c_try_compile "$LINENO"; then :
cce855bc
JA
13843 bash_cv_struct_winsize_header=ioctl_h
13844else
1b1fe467 13845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 13846/* end confdefs.h. */
cce855bc
JA
13847#include <sys/types.h>
13848#include <termios.h>
f73dda09
JA
13849int
13850main ()
13851{
cce855bc 13852struct winsize x;
f73dda09
JA
13853 ;
13854 return 0;
13855}
13856_ACEOF
1b1fe467 13857if ac_fn_c_try_compile "$LINENO"; then :
cce855bc 13858 bash_cv_struct_winsize_header=termios_h
d166f048 13859else
1b1fe467 13860 bash_cv_struct_winsize_header=other
cce855bc 13861fi
b709b946 13862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cce855bc 13863
d166f048 13864fi
b709b946 13865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
13866fi
13867
cce855bc 13868if test $bash_cv_struct_winsize_header = ioctl_h; then
1b1fe467 13869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5
dd4f3dd8 13870$as_echo "sys/ioctl.h" >&6; }
1b1fe467 13871 $as_echo "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h
d166f048 13872
cce855bc 13873elif test $bash_cv_struct_winsize_header = termios_h; then
1b1fe467 13874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5
dd4f3dd8 13875$as_echo "termios.h" >&6; }
1b1fe467 13876 $as_echo "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h
cce855bc
JA
13877
13878else
1b1fe467 13879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
dd4f3dd8 13880$as_echo "not found" >&6; }
d166f048
JA
13881fi
13882
1b1fe467 13883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5
dd4f3dd8 13884$as_echo_n "checking for struct timeval in sys/time.h and time.h... " >&6; }
1b1fe467 13885if ${bash_cv_struct_timeval+:} false; then :
dd4f3dd8 13886 $as_echo_n "(cached) " >&6
bb70624e 13887else
f73dda09 13888
1b1fe467 13889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 13890/* end confdefs.h. */
bb70624e 13891#include <sys/time.h>
f73dda09
JA
13892
13893_ACEOF
bb70624e 13894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 13895 $EGREP "struct timeval" >/dev/null 2>&1; then :
bb70624e
JA
13896 bash_cv_struct_timeval=yes
13897else
1b1fe467 13898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 13899/* end confdefs.h. */
bb70624e 13900#include <time.h>
f73dda09
JA
13901
13902_ACEOF
bb70624e 13903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 13904 $EGREP "struct timeval" >/dev/null 2>&1; then :
bb70624e
JA
13905 bash_cv_struct_timeval=yes
13906else
bb70624e
JA
13907 bash_cv_struct_timeval=no
13908fi
13909rm -f conftest*
13910
13911fi
13912rm -f conftest*
13913
a82a04b3 13914
bb70624e
JA
13915fi
13916
1b1fe467 13917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timeval" >&5
dd4f3dd8 13918$as_echo "$bash_cv_struct_timeval" >&6; }
bb70624e 13919if test $bash_cv_struct_timeval = yes; then
1b1fe467 13920 $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
7175a77f 13921
7175a77f 13922fi
b709b946 13923
1b1fe467
CR
13924ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13925if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
f73dda09 13926
a82a04b3 13927cat >>confdefs.h <<_ACEOF
f73dda09 13928#define HAVE_STRUCT_STAT_ST_BLOCKS 1
a82a04b3
CR
13929_ACEOF
13930
f73dda09
JA
13931
13932fi
d166f048 13933
1b1fe467 13934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
dd4f3dd8 13935$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
1b1fe467 13936if ${ac_cv_struct_tm+:} false; then :
dd4f3dd8 13937 $as_echo_n "(cached) " >&6
7117c2d2 13938else
1b1fe467 13939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 13940/* end confdefs.h. */
7117c2d2
JA
13941#include <sys/types.h>
13942#include <time.h>
13943
13944int
13945main ()
13946{
dd4f3dd8
CR
13947struct tm tm;
13948 int *p = &tm.tm_sec;
13949 return !p;
7117c2d2
JA
13950 ;
13951 return 0;
13952}
13953_ACEOF
1b1fe467 13954if ac_fn_c_try_compile "$LINENO"; then :
7117c2d2
JA
13955 ac_cv_struct_tm=time.h
13956else
1b1fe467 13957 ac_cv_struct_tm=sys/time.h
7117c2d2 13958fi
b709b946 13959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7117c2d2 13960fi
1b1fe467 13961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
dd4f3dd8 13962$as_echo "$ac_cv_struct_tm" >&6; }
7117c2d2
JA
13963if test $ac_cv_struct_tm = sys/time.h; then
13964
1b1fe467 13965$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
7175a77f
CR
13966
13967fi
13968
1b1fe467 13969ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
7175a77f
CR
13970#include <$ac_cv_struct_tm>
13971
1b1fe467
CR
13972"
13973if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
7175a77f
CR
13974
13975cat >>confdefs.h <<_ACEOF
13976#define HAVE_STRUCT_TM_TM_ZONE 1
13977_ACEOF
13978
13979
13980fi
13981
1b1fe467
CR
13982if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13983
13984$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
d3ad40de 13985
1b1fe467
CR
13986else
13987 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13988"
13989if test "x$ac_cv_have_decl_tzname" = xyes; then :
13990 ac_have_decl=1
13991else
13992 ac_have_decl=0
abe2eb5b
CR
13993fi
13994
1b1fe467
CR
13995cat >>confdefs.h <<_ACEOF
13996#define HAVE_DECL_TZNAME $ac_have_decl
13997_ACEOF
9d6e5e30 13998
1b1fe467 13999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
dd4f3dd8 14000$as_echo_n "checking for tzname... " >&6; }
1b1fe467 14001if ${ac_cv_var_tzname+:} false; then :
dd4f3dd8 14002 $as_echo_n "(cached) " >&6
9d6e5e30 14003else
1b1fe467 14004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9d6e5e30
CR
14005/* end confdefs.h. */
14006#include <time.h>
b709b946
CR
14007#if !HAVE_DECL_TZNAME
14008extern char *tzname[];
14009#endif
9d6e5e30 14010
b709b946
CR
14011int
14012main ()
14013{
14014return tzname[0][0];
14015 ;
14016 return 0;
14017}
14018_ACEOF
1b1fe467 14019if ac_fn_c_try_link "$LINENO"; then :
b709b946
CR
14020 ac_cv_var_tzname=yes
14021else
1b1fe467 14022 ac_cv_var_tzname=no
b709b946 14023fi
1b1fe467
CR
14024rm -f core conftest.err conftest.$ac_objext \
14025 conftest$ac_exeext conftest.$ac_ext
b709b946 14026fi
1b1fe467 14027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
dd4f3dd8 14028$as_echo "$ac_cv_var_tzname" >&6; }
b709b946
CR
14029 if test $ac_cv_var_tzname = yes; then
14030
1b1fe467 14031$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
b709b946
CR
14032
14033 fi
14034fi
14035
1b1fe467 14036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timezone in sys/time.h and time.h" >&5
dd4f3dd8 14037$as_echo_n "checking for struct timezone in sys/time.h and time.h... " >&6; }
1b1fe467 14038if ${bash_cv_struct_timezone+:} false; then :
dd4f3dd8 14039 $as_echo_n "(cached) " >&6
b709b946
CR
14040else
14041
1b1fe467 14042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b709b946
CR
14043/* end confdefs.h. */
14044#include <sys/time.h>
14045
14046_ACEOF
14047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 14048 $EGREP "struct timezone" >/dev/null 2>&1; then :
b709b946
CR
14049 bash_cv_struct_timezone=yes
14050else
1b1fe467 14051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b709b946
CR
14052/* end confdefs.h. */
14053#include <time.h>
14054
14055_ACEOF
14056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 14057 $EGREP "struct timezone" >/dev/null 2>&1; then :
d3a24ed2
CR
14058 bash_cv_struct_timezone=yes
14059else
14060 bash_cv_struct_timezone=no
14061fi
14062rm -f conftest*
14063
14064fi
14065rm -f conftest*
14066
a82a04b3 14067
d3a24ed2
CR
14068fi
14069
1b1fe467 14070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timezone" >&5
dd4f3dd8 14071$as_echo "$bash_cv_struct_timezone" >&6; }
d3a24ed2 14072if test $bash_cv_struct_timezone = yes; then
1b1fe467 14073 $as_echo "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h
d3a24ed2
CR
14074
14075fi
14076
a82a04b3 14077
1b1fe467 14078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for offset of exit status in return status from wait" >&5
7d92f73f 14079$as_echo_n "checking for offset of exit status in return status from wait... " >&6; }
1b1fe467 14080if ${bash_cv_wexitstatus_offset+:} false; then :
7d92f73f
CR
14081 $as_echo_n "(cached) " >&6
14082else
1b1fe467
CR
14083 if test "$cross_compiling" = yes; then :
14084 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&5
7d92f73f
CR
14085$as_echo "$as_me: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&2;}
14086 bash_cv_wexitstatus_offset=0
14087
14088else
1b1fe467 14089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71412226 14090/* end confdefs.h. */
7d92f73f
CR
14091
14092#include <stdlib.h>
14093#include <unistd.h>
14094
14095#include <sys/wait.h>
14096
14097main(c, v)
14098 int c;
14099 char **v;
14100{
14101 pid_t pid, p;
14102 int s, i, n;
14103
14104 s = 0;
14105 pid = fork();
14106 if (pid == 0)
14107 exit (42);
14108
14109 /* wait for the process */
14110 p = wait(&s);
14111 if (p != pid)
14112 exit (255);
14113
14114 /* crack s */
14115 for (i = 0; i < (sizeof(s) - 8); i++)
14116 {
14117 n = (s >> i) & 0xff;
14118 if (n == 42)
14119 exit (i);
14120 }
14121
7175a77f
CR
14122 exit (254);
14123}
14124
14125_ACEOF
1b1fe467 14126if ac_fn_c_try_run "$LINENO"; then :
7175a77f
CR
14127 bash_cv_wexitstatus_offset=0
14128else
1b1fe467 14129 bash_cv_wexitstatus_offset=$?
7175a77f 14130fi
1b1fe467
CR
14131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14132 conftest.$ac_objext conftest.beam conftest.$ac_ext
7175a77f
CR
14133fi
14134
7175a77f
CR
14135fi
14136
14137if test "$bash_cv_wexitstatus_offset" -gt 32 ; then
1b1fe467
CR
14138 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad exit status from test program -- defaulting to 0" >&5
14139$as_echo "$as_me: WARNING: bad exit status from test program -- defaulting to 0" >&2;}
14140 bash_cv_wexitstatus_offset=0
7d92f73f 14141fi
1b1fe467
CR
14142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wexitstatus_offset" >&5
14143$as_echo "$bash_cv_wexitstatus_offset" >&6; }
7d92f73f
CR
14144
14145cat >>confdefs.h <<_ACEOF
1b1fe467 14146#define WEXITSTATUS_OFFSET $bash_cv_wexitstatus_offset
7d92f73f
CR
14147_ACEOF
14148
1b1fe467
CR
14149
14150
14151
14152
14153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
14154$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
14155if ${bash_cv_sys_struct_timespec_in_time_h+:} false; then :
278286c9
CR
14156 $as_echo_n "(cached) " >&6
14157else
1b1fe467 14158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
278286c9 14159/* end confdefs.h. */
1b1fe467 14160#include <time.h>
278286c9
CR
14161
14162int
14163main ()
14164{
1b1fe467 14165static struct timespec x; x.tv_sec = x.tv_nsec;
278286c9
CR
14166 ;
14167 return 0;
14168}
14169_ACEOF
1b1fe467
CR
14170if ac_fn_c_try_compile "$LINENO"; then :
14171 bash_cv_sys_struct_timespec_in_time_h=yes
278286c9 14172else
1b1fe467 14173 bash_cv_sys_struct_timespec_in_time_h=no
278286c9
CR
14174fi
14175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14176fi
1b1fe467
CR
14177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_time_h" >&5
14178$as_echo "$bash_cv_sys_struct_timespec_in_time_h" >&6; }
278286c9 14179
1b1fe467
CR
14180 HAVE_STRUCT_TIMESPEC=0
14181 TIME_H_DEFINES_STRUCT_TIMESPEC=0
14182 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
14183 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
14184 if test $bash_cv_sys_struct_timespec_in_time_h = yes; then
14185 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
278286c9 14186
1b1fe467
CR
14187 $as_echo "#define TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
14188
14189 TIME_H_DEFINES_STRUCT_TIMESPEC=1
14190 else
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
14192$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
14193if ${bash_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
278286c9
CR
14194 $as_echo_n "(cached) " >&6
14195else
1b1fe467 14196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
278286c9 14197/* end confdefs.h. */
1b1fe467 14198#include <sys/time.h>
278286c9
CR
14199
14200int
14201main ()
14202{
1b1fe467 14203static struct timespec x; x.tv_sec = x.tv_nsec;
278286c9
CR
14204 ;
14205 return 0;
14206}
14207_ACEOF
1b1fe467
CR
14208if ac_fn_c_try_compile "$LINENO"; then :
14209 bash_cv_sys_struct_timespec_in_sys_time_h=yes
278286c9 14210else
1b1fe467
CR
14211 bash_cv_sys_struct_timespec_in_sys_time_h=no
14212fi
14213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14214fi
14215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_sys_time_h" >&5
14216$as_echo "$bash_cv_sys_struct_timespec_in_sys_time_h" >&6; }
14217 if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then
14218 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
14219 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
278286c9 14220
1b1fe467
CR
14221 $as_echo "#define SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
14222
14223 else
14224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
14225$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
14226if ${bash_cv_sys_struct_timespec_in_pthread_h+:} false; then :
14227 $as_echo_n "(cached) " >&6
14228else
14229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
278286c9 14230/* end confdefs.h. */
1b1fe467 14231#include <pthread.h>
278286c9
CR
14232
14233int
14234main ()
14235{
1b1fe467 14236static struct timespec x; x.tv_sec = x.tv_nsec;
278286c9
CR
14237 ;
14238 return 0;
14239}
14240_ACEOF
1b1fe467
CR
14241if ac_fn_c_try_compile "$LINENO"; then :
14242 bash_cv_sys_struct_timespec_in_pthread_h=yes
278286c9 14243else
1b1fe467 14244 bash_cv_sys_struct_timespec_in_pthread_h=no
278286c9
CR
14245fi
14246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14247fi
1b1fe467
CR
14248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_pthread_h" >&5
14249$as_echo "$bash_cv_sys_struct_timespec_in_pthread_h" >&6; }
14250 if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then
14251 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
14252 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
14253
14254 $as_echo "#define PTHREAD_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
14255
14256 fi
14257 fi
14258 fi
14259
14260
14261
278286c9 14262
1b1fe467
CR
14263
14264
14265
14266
14267
14268 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>
14269 #include <sys/stat.h>
14270"
14271if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
278286c9
CR
14272
14273cat >>confdefs.h <<_ACEOF
1b1fe467 14274#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
278286c9
CR
14275_ACEOF
14276
1b1fe467
CR
14277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
14278$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
14279if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
278286c9
CR
14280 $as_echo_n "(cached) " >&6
14281else
1b1fe467 14282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
278286c9 14283/* end confdefs.h. */
1b1fe467
CR
14284
14285 #include <sys/types.h>
14286 #include <sys/stat.h>
14287 #if HAVE_SYS_TIME_H
14288 # include <sys/time.h>
14289 #endif
14290 #include <time.h>
14291 struct timespec ts;
14292 struct stat st;
278286c9
CR
14293
14294int
14295main ()
14296{
14297
1b1fe467 14298 st.st_atim = ts;
278286c9
CR
14299
14300 ;
14301 return 0;
14302}
14303_ACEOF
1b1fe467
CR
14304if ac_fn_c_try_compile "$LINENO"; then :
14305 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
278286c9 14306else
1b1fe467 14307 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
278286c9
CR
14308fi
14309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14310fi
1b1fe467
CR
14311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
14312$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
14313 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
278286c9 14314
1b1fe467
CR
14315$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
14316
14317 fi
14318else
14319 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>
14320 #include <sys/stat.h>
14321"
14322if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
7175a77f
CR
14323
14324cat >>confdefs.h <<_ACEOF
1b1fe467 14325#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
7175a77f
CR
14326_ACEOF
14327
278286c9 14328
278286c9 14329else
1b1fe467
CR
14330 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
14331 #include <sys/stat.h>
14332"
14333if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
278286c9 14334
1b1fe467
CR
14335cat >>confdefs.h <<_ACEOF
14336#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
278286c9
CR
14337_ACEOF
14338
14339
14340else
1b1fe467
CR
14341 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>
14342 #include <sys/stat.h>
14343"
14344if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
278286c9
CR
14345
14346cat >>confdefs.h <<_ACEOF
14347#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
14348_ACEOF
14349
14350
14351fi
14352
14353fi
14354
14355fi
14356
14357fi
14358
14359
14360
1b1fe467 14361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5
dd4f3dd8 14362$as_echo_n "checking for the existence of strsignal... " >&6; }
1b1fe467 14363if ${bash_cv_have_strsignal+:} false; then :
dd4f3dd8 14364 $as_echo_n "(cached) " >&6
ccc6cda3 14365else
1b1fe467 14366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 14367/* end confdefs.h. */
ccc6cda3
JA
14368#include <sys/types.h>
14369#include <signal.h>
f73dda09
JA
14370int
14371main ()
14372{
ccc6cda3 14373char *s = (char *)strsignal(2);
1b1fe467
CR
14374 ;
14375 return 0;
14376}
14377_ACEOF
14378if ac_fn_c_try_link "$LINENO"; then :
ccc6cda3
JA
14379 bash_cv_have_strsignal=yes
14380else
1b1fe467 14381 bash_cv_have_strsignal=no
ccc6cda3 14382fi
1b1fe467
CR
14383rm -f core conftest.err conftest.$ac_objext \
14384 conftest$ac_exeext conftest.$ac_ext
ccc6cda3
JA
14385fi
14386
1b1fe467 14387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_strsignal" >&5
dd4f3dd8 14388$as_echo "$bash_cv_have_strsignal" >&6; }
ccc6cda3 14389if test $bash_cv_have_strsignal = yes; then
1b1fe467 14390$as_echo "#define HAVE_STRSIGNAL 1" >>confdefs.h
ccc6cda3
JA
14391
14392fi
14393
1b1fe467 14394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if opendir() opens non-directories" >&5
dd4f3dd8 14395$as_echo_n "checking if opendir() opens non-directories... " >&6; }
1b1fe467 14396if ${bash_cv_opendir_not_robust+:} false; then :
dd4f3dd8 14397 $as_echo_n "(cached) " >&6
ccc6cda3 14398else
1b1fe467
CR
14399 if test "$cross_compiling" = yes; then :
14400 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5
dd4f3dd8 14401$as_echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14402 bash_cv_opendir_not_robust=no
14403
ccc6cda3 14404else
1b1fe467 14405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 14406/* end confdefs.h. */
ccc6cda3
JA
14407
14408#include <stdio.h>
14409#include <sys/types.h>
14410#include <fcntl.h>
14411#ifdef HAVE_UNISTD_H
14412# include <unistd.h>
14413#endif /* HAVE_UNISTD_H */
14414#if defined(HAVE_DIRENT_H)
14415# include <dirent.h>
14416#else
14417# define dirent direct
14418# ifdef HAVE_SYS_NDIR_H
14419# include <sys/ndir.h>
14420# endif /* SYSNDIR */
14421# ifdef HAVE_SYS_DIR_H
14422# include <sys/dir.h>
14423# endif /* SYSDIR */
14424# ifdef HAVE_NDIR_H
14425# include <ndir.h>
14426# endif
14427#endif /* HAVE_DIRENT_H */
14428main()
14429{
14430DIR *dir;
bb70624e 14431int fd, err;
30915f17 14432err = mkdir("bash-aclocal", 0700);
bb70624e
JA
14433if (err < 0) {
14434 perror("mkdir");
14435 exit(1);
14436}
30915f17
CR
14437unlink("bash-aclocal/not_a_directory");
14438fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
ccc6cda3
JA
14439write(fd, "\n", 1);
14440close(fd);
30915f17
CR
14441dir = opendir("bash-aclocal/not_a_directory");
14442unlink("bash-aclocal/not_a_directory");
14443rmdir("bash-aclocal");
ccc6cda3
JA
14444exit (dir == 0);
14445}
f73dda09 14446_ACEOF
1b1fe467 14447if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14448 bash_cv_opendir_not_robust=yes
14449else
1b1fe467 14450 bash_cv_opendir_not_robust=no
ccc6cda3 14451fi
1b1fe467
CR
14452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14453 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14454fi
b709b946 14455
ccc6cda3
JA
14456fi
14457
1b1fe467 14458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_opendir_not_robust" >&5
dd4f3dd8 14459$as_echo "$bash_cv_opendir_not_robust" >&6; }
ccc6cda3 14460if test $bash_cv_opendir_not_robust = yes; then
1b1fe467 14461$as_echo "#define OPENDIR_NOT_ROBUST 1" >>confdefs.h
ccc6cda3
JA
14462
14463fi
14464
1b1fe467 14465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ulimit can substitute for getdtablesize" >&5
dd4f3dd8 14466$as_echo_n "checking whether ulimit can substitute for getdtablesize... " >&6; }
1b1fe467 14467if ${bash_cv_ulimit_maxfds+:} false; then :
dd4f3dd8 14468 $as_echo_n "(cached) " >&6
ccc6cda3 14469else
1b1fe467
CR
14470 if test "$cross_compiling" = yes; then :
14471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5
dd4f3dd8 14472$as_echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14473 bash_cv_ulimit_maxfds=no
14474
ccc6cda3 14475else
1b1fe467 14476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 14477/* end confdefs.h. */
ccc6cda3
JA
14478
14479main()
14480{
14481long maxfds = ulimit(4, 0L);
14482exit (maxfds == -1L);
14483}
14484
f73dda09 14485_ACEOF
1b1fe467 14486if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14487 bash_cv_ulimit_maxfds=yes
14488else
1b1fe467 14489 bash_cv_ulimit_maxfds=no
547ef914 14490fi
1b1fe467
CR
14491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14492 conftest.$ac_objext conftest.beam conftest.$ac_ext
09767ff0
CR
14493fi
14494
09767ff0 14495fi
547ef914 14496
1b1fe467 14497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_ulimit_maxfds" >&5
dd4f3dd8 14498$as_echo "$bash_cv_ulimit_maxfds" >&6; }
2e4498b3 14499if test $bash_cv_ulimit_maxfds = yes; then
1b1fe467 14500$as_echo "#define ULIMIT_MAXFDS 1" >>confdefs.h
2e4498b3
CR
14501
14502fi
14503
14504
14505
14506
14507
53ac45a3
CR
14508
14509
14510
1b1fe467
CR
14511 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
14512"
14513if test "x$ac_cv_have_decl_fpurge" = xyes; then :
14514 ac_have_decl=1
53ac45a3 14515else
1b1fe467 14516 ac_have_decl=0
53ac45a3 14517fi
53ac45a3
CR
14518
14519cat >>confdefs.h <<_ACEOF
1b1fe467 14520#define HAVE_DECL_FPURGE $ac_have_decl
7175a77f
CR
14521_ACEOF
14522
14523
1b1fe467 14524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if getenv can be redefined" >&5
dd4f3dd8 14525$as_echo_n "checking to see if getenv can be redefined... " >&6; }
1b1fe467 14526if ${bash_cv_getenv_redef+:} false; then :
dd4f3dd8 14527 $as_echo_n "(cached) " >&6
ccc6cda3 14528else
1b1fe467
CR
14529 if test "$cross_compiling" = yes; then :
14530 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5
dd4f3dd8 14531$as_echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;}
cce855bc
JA
14532 bash_cv_getenv_redef=yes
14533
ccc6cda3 14534else
1b1fe467 14535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 14536/* end confdefs.h. */
ccc6cda3
JA
14537
14538#ifdef HAVE_UNISTD_H
14539# include <unistd.h>
14540#endif
14541#ifndef __STDC__
14542# ifndef const
14543# define const
14544# endif
14545#endif
14546char *
14547getenv (name)
14548#if defined (__linux__) || defined (__bsdi__) || defined (convex)
14549 const char *name;
14550#else
14551 char const *name;
14552#endif /* !__linux__ && !__bsdi__ && !convex */
14553{
14554return "42";
14555}
14556main()
14557{
14558char *s;
14559/* The next allows this program to run, but does not allow bash to link
14560 when it redefines getenv. I'm not really interested in figuring out
14561 why not. */
14562#if defined (NeXT)
14563exit(1);
14564#endif
14565s = getenv("ABCDE");
14566exit(s == 0); /* force optimizer to leave getenv in */
14567}
14568
f73dda09 14569_ACEOF
1b1fe467 14570if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14571 bash_cv_getenv_redef=yes
14572else
1b1fe467 14573 bash_cv_getenv_redef=no
ccc6cda3 14574fi
1b1fe467
CR
14575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14576 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14577fi
b709b946 14578
ccc6cda3
JA
14579fi
14580
1b1fe467 14581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getenv_redef" >&5
dd4f3dd8 14582$as_echo "$bash_cv_getenv_redef" >&6; }
ccc6cda3 14583if test $bash_cv_getenv_redef = yes; then
1b1fe467 14584$as_echo "#define CAN_REDEFINE_GETENV 1" >>confdefs.h
ccc6cda3
JA
14585
14586fi
14587
7117c2d2 14588if test "$ac_cv_func_getcwd" = "yes"; then
1b1fe467 14589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getcwd() will dynamically allocate memory with 0 size" >&5
dd4f3dd8 14590$as_echo_n "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; }
1b1fe467 14591if ${bash_cv_getcwd_malloc+:} false; then :
dd4f3dd8 14592 $as_echo_n "(cached) " >&6
ccc6cda3 14593else
1b1fe467
CR
14594 if test "$cross_compiling" = yes; then :
14595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5
dd4f3dd8 14596$as_echo "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;}
f085a21f 14597 bash_cv_getcwd_malloc=no
cce855bc 14598
ccc6cda3 14599else
1b1fe467 14600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 14601/* end confdefs.h. */
ccc6cda3
JA
14602
14603#include <stdio.h>
14604#ifdef HAVE_UNISTD_H
14605#include <unistd.h>
14606#endif
14607
ccc6cda3
JA
14608main()
14609{
f085a21f
CR
14610 char *xpwd;
14611 xpwd = getcwd(0, 0);
14612 exit (xpwd == 0);
ccc6cda3
JA
14613}
14614
f73dda09 14615_ACEOF
1b1fe467 14616if ac_fn_c_try_run "$LINENO"; then :
f085a21f 14617 bash_cv_getcwd_malloc=yes
ccc6cda3 14618else
1b1fe467 14619 bash_cv_getcwd_malloc=no
ccc6cda3 14620fi
1b1fe467
CR
14621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14622 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14623fi
b709b946 14624
ccc6cda3
JA
14625fi
14626
1b1fe467 14627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getcwd_malloc" >&5
dd4f3dd8 14628$as_echo "$bash_cv_getcwd_malloc" >&6; }
f085a21f 14629if test $bash_cv_getcwd_malloc = no; then
1b1fe467 14630$as_echo "#define GETCWD_BROKEN 1" >>confdefs.h
a82a04b3 14631
b709b946 14632case " $LIBOBJS " in
5e4a95c7 14633 *" getcwd.$ac_objext "* ) ;;
b709b946
CR
14634 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
14635 ;;
5e4a95c7
CR
14636esac
14637
ccc6cda3
JA
14638fi
14639
ccc6cda3
JA
14640fi
14641
1b1fe467 14642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
dd4f3dd8 14643$as_echo_n "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; }
1b1fe467 14644if ${bash_cv_func_sigsetjmp+:} false; then :
dd4f3dd8 14645 $as_echo_n "(cached) " >&6
ccc6cda3 14646else
1b1fe467
CR
14647 if test "$cross_compiling" = yes; then :
14648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5
dd4f3dd8 14649$as_echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
14650 bash_cv_func_sigsetjmp=missing
14651
ccc6cda3 14652else
1b1fe467 14653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 14654/* end confdefs.h. */
ccc6cda3
JA
14655
14656#ifdef HAVE_UNISTD_H
14657#include <unistd.h>
14658#endif
14659#include <sys/types.h>
14660#include <signal.h>
14661#include <setjmp.h>
14662
14663main()
14664{
14665#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
14666exit (1);
14667#else
14668
14669int code;
14670sigset_t set, oset;
14671sigjmp_buf xx;
14672
14673/* get the mask */
14674sigemptyset(&set);
14675sigemptyset(&oset);
14676sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
14677sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
14678
14679/* save it */
14680code = sigsetjmp(xx, 1);
14681if (code)
14682 exit(0); /* could get sigmask and compare to oset here. */
14683
14684/* change it */
14685sigaddset(&set, SIGINT);
14686sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
14687
14688/* and siglongjmp */
14689siglongjmp(xx, 10);
14690exit(1);
14691#endif
14692}
f73dda09 14693_ACEOF
1b1fe467 14694if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14695 bash_cv_func_sigsetjmp=present
14696else
1b1fe467 14697 bash_cv_func_sigsetjmp=missing
ccc6cda3 14698fi
1b1fe467
CR
14699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14700 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14701fi
b709b946 14702
ccc6cda3
JA
14703fi
14704
1b1fe467 14705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5
dd4f3dd8 14706$as_echo "$bash_cv_func_sigsetjmp" >&6; }
ccc6cda3 14707if test $bash_cv_func_sigsetjmp = present; then
1b1fe467 14708$as_echo "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h
ccc6cda3
JA
14709
14710fi
14711
a82a04b3 14712
1b1fe467 14713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5
dd4f3dd8 14714$as_echo_n "checking whether or not strcoll and strcmp differ... " >&6; }
1b1fe467 14715if ${bash_cv_func_strcoll_broken+:} false; then :
dd4f3dd8 14716 $as_echo_n "(cached) " >&6
d166f048 14717else
1b1fe467
CR
14718 if test "$cross_compiling" = yes; then :
14719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5
dd4f3dd8 14720$as_echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14721 bash_cv_func_strcoll_broken=no
14722
d166f048 14723else
1b1fe467 14724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 14725/* end confdefs.h. */
d166f048
JA
14726
14727#include <stdio.h>
14728#if defined (HAVE_LOCALE_H)
14729#include <locale.h>
14730#endif
14731
14732main(c, v)
14733int c;
14734char *v[];
14735{
14736 int r1, r2;
14737 char *deflocale, *defcoll;
14738
14739#ifdef HAVE_SETLOCALE
14740 deflocale = setlocale(LC_ALL, "");
14741 defcoll = setlocale(LC_COLLATE, "");
14742#endif
14743
14744#ifdef HAVE_STRCOLL
14745 /* These two values are taken from tests/glob-test. */
14746 r1 = strcoll("abd", "aXd");
14747#else
14748 r1 = 0;
14749#endif
14750 r2 = strcmp("abd", "aXd");
14751
14752 /* These two should both be greater than 0. It is permissible for
14753 a system to return different values, as long as the sign is the
14754 same. */
14755
14756 /* Exit with 1 (failure) if these two values are both > 0, since
14757 this tests whether strcoll(3) is broken with respect to strcmp(3)
14758 in the default locale. */
14759 exit (r1 > 0 && r2 > 0);
14760}
14761
f73dda09 14762_ACEOF
1b1fe467 14763if ac_fn_c_try_run "$LINENO"; then :
d166f048
JA
14764 bash_cv_func_strcoll_broken=yes
14765else
1b1fe467 14766 bash_cv_func_strcoll_broken=no
d166f048 14767fi
1b1fe467
CR
14768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14769 conftest.$ac_objext conftest.beam conftest.$ac_ext
d166f048 14770fi
b709b946 14771
d166f048
JA
14772fi
14773
1b1fe467 14774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5
dd4f3dd8 14775$as_echo "$bash_cv_func_strcoll_broken" >&6; }
d166f048 14776if test $bash_cv_func_strcoll_broken = yes; then
1b1fe467 14777$as_echo "#define STRCOLL_BROKEN 1" >>confdefs.h
d166f048
JA
14778
14779fi
14780
a82a04b3
CR
14781
14782
cd0ef727
CR
14783
14784
cd0ef727 14785 if test X$ac_cv_func_snprintf = Xyes; then
1b1fe467 14786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant snprintf" >&5
cd0ef727 14787$as_echo_n "checking for standard-conformant snprintf... " >&6; }
1b1fe467 14788if ${bash_cv_func_snprintf+:} false; then :
cd0ef727
CR
14789 $as_echo_n "(cached) " >&6
14790else
1b1fe467
CR
14791 if test "$cross_compiling" = yes; then :
14792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard snprintf if cross-compiling" >&5
cd0ef727
CR
14793$as_echo "$as_me: WARNING: cannot check standard snprintf if cross-compiling" >&2;}
14794 bash_cv_func_snprintf=yes
14795
14796else
1b1fe467 14797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cd0ef727
CR
14798/* end confdefs.h. */
14799
14800#include <stdio.h>
14801
14802main()
14803{
14804 int n;
14805 n = snprintf (0, 0, "%s", "0123456");
14806 exit(n != 7);
14807}
14808
14809_ACEOF
1b1fe467 14810if ac_fn_c_try_run "$LINENO"; then :
cd0ef727
CR
14811 bash_cv_func_snprintf=yes
14812else
1b1fe467 14813 bash_cv_func_snprintf=no
cd0ef727 14814fi
1b1fe467
CR
14815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14816 conftest.$ac_objext conftest.beam conftest.$ac_ext
cd0ef727
CR
14817fi
14818
cd0ef727 14819fi
1b1fe467 14820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_snprintf" >&5
cd0ef727
CR
14821$as_echo "$bash_cv_func_snprintf" >&6; }
14822 if test $bash_cv_func_snprintf = no; then
14823 ac_cv_func_snprintf=no
14824 fi
14825 fi
14826 if test $ac_cv_func_snprintf = no; then
14827
1b1fe467 14828$as_echo "#define HAVE_SNPRINTF 0" >>confdefs.h
cd0ef727
CR
14829
14830 fi
14831
14832
14833
14834
14835
cd0ef727 14836 if test X$ac_cv_func_vsnprintf = Xyes; then
1b1fe467 14837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant vsnprintf" >&5
cd0ef727 14838$as_echo_n "checking for standard-conformant vsnprintf... " >&6; }
1b1fe467 14839if ${bash_cv_func_vsnprintf+:} false; then :
cd0ef727
CR
14840 $as_echo_n "(cached) " >&6
14841else
1b1fe467
CR
14842 if test "$cross_compiling" = yes; then :
14843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard vsnprintf if cross-compiling" >&5
cd0ef727
CR
14844$as_echo "$as_me: WARNING: cannot check standard vsnprintf if cross-compiling" >&2;}
14845 bash_cv_func_vsnprintf=yes
14846
14847else
1b1fe467 14848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cd0ef727
CR
14849/* end confdefs.h. */
14850
14851#if HAVE_STDARG_H
14852#include <stdarg.h>
14853#else
14854#include <varargs.h>
14855#endif
14856#include <stdio.h>
14857#include <stdlib.h>
14858
14859static int
14860#if HAVE_STDARG_H
14861foo(const char *fmt, ...)
14862#else
14863foo(format, va_alist)
14864 const char *format;
14865 va_dcl
14866#endif
14867{
14868 va_list args;
14869 int n;
14870
14871#if HAVE_STDARG_H
14872 va_start(args, fmt);
14873#else
14874 va_start(args);
14875#endif
14876 n = vsnprintf(0, 0, fmt, args);
14877 va_end (args);
14878 return n;
14879}
14880
14881main()
14882{
14883 int n;
14884 n = foo("%s", "0123456");
14885 exit(n != 7);
14886}
14887
14888_ACEOF
1b1fe467 14889if ac_fn_c_try_run "$LINENO"; then :
cd0ef727
CR
14890 bash_cv_func_vsnprintf=yes
14891else
1b1fe467 14892 bash_cv_func_vsnprintf=no
cd0ef727 14893fi
1b1fe467
CR
14894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14895 conftest.$ac_objext conftest.beam conftest.$ac_ext
cd0ef727
CR
14896fi
14897
cd0ef727 14898fi
1b1fe467 14899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_vsnprintf" >&5
cd0ef727
CR
14900$as_echo "$bash_cv_func_vsnprintf" >&6; }
14901 if test $bash_cv_func_vsnprintf = no; then
14902 ac_cv_func_vsnprintf=no
14903 fi
14904 fi
14905 if test $ac_cv_func_vsnprintf = no; then
14906
1b1fe467 14907$as_echo "#define HAVE_VSNPRINTF 0" >>confdefs.h
cd0ef727
CR
14908
14909 fi
14910
14911
14912
7117c2d2
JA
14913if test "$ac_cv_func_putenv" = "yes"; then
14914
a82a04b3
CR
14915
14916
1b1fe467 14917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant putenv declaration" >&5
dd4f3dd8 14918$as_echo_n "checking for standard-conformant putenv declaration... " >&6; }
1b1fe467 14919if ${bash_cv_std_putenv+:} false; then :
dd4f3dd8 14920 $as_echo_n "(cached) " >&6
7117c2d2 14921else
1b1fe467 14922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 14923/* end confdefs.h. */
7117c2d2
JA
14924
14925#if STDC_HEADERS
14926#include <stdlib.h>
14927#include <stddef.h>
14928#endif
14929#ifndef __STDC__
14930# ifndef const
14931# define const
14932# endif
14933#endif
14934#ifdef PROTOTYPES
14935extern int putenv (char *);
14936#else
14937extern int putenv ();
14938#endif
14939
14940int
14941main ()
14942{
14943return (putenv == 0);
14944 ;
14945 return 0;
14946}
14947_ACEOF
1b1fe467 14948if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
14949 bash_cv_std_putenv=yes
14950else
1b1fe467 14951 bash_cv_std_putenv=no
7117c2d2
JA
14952
14953fi
1b1fe467
CR
14954rm -f core conftest.err conftest.$ac_objext \
14955 conftest$ac_exeext conftest.$ac_ext
7117c2d2 14956fi
1b1fe467 14957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_putenv" >&5
dd4f3dd8 14958$as_echo "$bash_cv_std_putenv" >&6; }
7117c2d2 14959if test $bash_cv_std_putenv = yes; then
1b1fe467 14960$as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h
7117c2d2
JA
14961
14962fi
14963
14964else
1b1fe467 14965$as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h
7117c2d2
JA
14966
14967fi
14968if test "$ac_cv_func_unsetenv" = "yes"; then
14969
a82a04b3
CR
14970
14971
1b1fe467 14972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant unsetenv declaration" >&5
dd4f3dd8 14973$as_echo_n "checking for standard-conformant unsetenv declaration... " >&6; }
1b1fe467 14974if ${bash_cv_std_unsetenv+:} false; then :
dd4f3dd8 14975 $as_echo_n "(cached) " >&6
7117c2d2 14976else
1b1fe467 14977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 14978/* end confdefs.h. */
7117c2d2
JA
14979
14980#if STDC_HEADERS
14981#include <stdlib.h>
14982#include <stddef.h>
14983#endif
14984#ifndef __STDC__
14985# ifndef const
14986# define const
14987# endif
14988#endif
14989#ifdef PROTOTYPES
14990extern int unsetenv (const char *);
14991#else
14992extern int unsetenv ();
14993#endif
1b1fe467
CR
14994
14995int
14996main ()
14997{
14998return (unsetenv == 0);
14999 ;
15000 return 0;
15001}
15002_ACEOF
15003if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
15004 bash_cv_std_unsetenv=yes
15005else
1b1fe467 15006 bash_cv_std_unsetenv=no
7117c2d2
JA
15007
15008fi
1b1fe467
CR
15009rm -f core conftest.err conftest.$ac_objext \
15010 conftest$ac_exeext conftest.$ac_ext
7117c2d2 15011fi
1b1fe467 15012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_unsetenv" >&5
dd4f3dd8 15013$as_echo "$bash_cv_std_unsetenv" >&6; }
7117c2d2 15014if test $bash_cv_std_unsetenv = yes; then
1b1fe467 15015$as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h
7117c2d2
JA
15016
15017fi
15018
15019else
1b1fe467 15020$as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h
7117c2d2
JA
15021
15022fi
15023
1b1fe467 15024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf floating point output in hex notation" >&5
dd4f3dd8 15025$as_echo_n "checking for printf floating point output in hex notation... " >&6; }
1b1fe467 15026if ${bash_cv_printf_a_format+:} false; then :
dd4f3dd8 15027 $as_echo_n "(cached) " >&6
f73dda09 15028else
1b1fe467
CR
15029 if test "$cross_compiling" = yes; then :
15030 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5
dd4f3dd8 15031$as_echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;}
f73dda09
JA
15032 bash_cv_printf_a_format=no
15033
15034else
1b1fe467 15035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15036/* end confdefs.h. */
f73dda09
JA
15037
15038#include <stdio.h>
15039#include <string.h>
15040
15041int
15042main()
15043{
15044 double y = 0.0;
15045 char abuf[1024];
15046
15047 sprintf(abuf, "%A", y);
15048 exit(strchr(abuf, 'P') == (char *)0);
15049}
15050
15051_ACEOF
1b1fe467 15052if ac_fn_c_try_run "$LINENO"; then :
f73dda09
JA
15053 bash_cv_printf_a_format=yes
15054else
1b1fe467 15055 bash_cv_printf_a_format=no
f73dda09 15056fi
1b1fe467
CR
15057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15058 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 15059fi
b709b946 15060
f73dda09 15061fi
d166f048 15062
1b1fe467 15063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_printf_a_format" >&5
dd4f3dd8 15064$as_echo "$bash_cv_printf_a_format" >&6; }
f73dda09 15065if test $bash_cv_printf_a_format = yes; then
1b1fe467 15066$as_echo "#define HAVE_PRINTF_A_FORMAT 1" >>confdefs.h
d166f048 15067
f73dda09 15068fi
ccc6cda3 15069
a82a04b3
CR
15070
15071
15072
1b1fe467 15073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5
dd4f3dd8 15074$as_echo_n "checking if signal handlers must be reinstalled when invoked... " >&6; }
1b1fe467 15075if ${bash_cv_must_reinstall_sighandlers+:} false; then :
dd4f3dd8 15076 $as_echo_n "(cached) " >&6
ccc6cda3 15077else
1b1fe467
CR
15078 if test "$cross_compiling" = yes; then :
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5
dd4f3dd8 15080$as_echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
15081 bash_cv_must_reinstall_sighandlers=no
15082
ccc6cda3 15083else
1b1fe467 15084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15085/* end confdefs.h. */
ccc6cda3
JA
15086
15087#include <signal.h>
15088#ifdef HAVE_UNISTD_H
15089#include <unistd.h>
15090#endif
15091
15092typedef RETSIGTYPE sigfunc();
15093
15094int nsigint;
15095
15096#ifdef HAVE_POSIX_SIGNALS
15097sigfunc *
15098set_signal_handler(sig, handler)
15099 int sig;
15100 sigfunc *handler;
15101{
15102 struct sigaction act, oact;
15103 act.sa_handler = handler;
15104 act.sa_flags = 0;
15105 sigemptyset (&act.sa_mask);
15106 sigemptyset (&oact.sa_mask);
15107 sigaction (sig, &act, &oact);
15108 return (oact.sa_handler);
15109}
15110#else
15111#define set_signal_handler(s, h) signal(s, h)
15112#endif
15113
15114RETSIGTYPE
15115sigint(s)
15116int s;
15117{
15118 nsigint++;
15119}
15120
15121main()
15122{
15123 nsigint = 0;
15124 set_signal_handler(SIGINT, sigint);
15125 kill((int)getpid(), SIGINT);
15126 kill((int)getpid(), SIGINT);
15127 exit(nsigint != 2);
15128}
15129
f73dda09 15130_ACEOF
1b1fe467 15131if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
15132 bash_cv_must_reinstall_sighandlers=no
15133else
1b1fe467 15134 bash_cv_must_reinstall_sighandlers=yes
ccc6cda3 15135fi
1b1fe467
CR
15136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15137 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 15138fi
b709b946 15139
ccc6cda3
JA
15140fi
15141
1b1fe467 15142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5
dd4f3dd8 15143$as_echo "$bash_cv_must_reinstall_sighandlers" >&6; }
ccc6cda3 15144if test $bash_cv_must_reinstall_sighandlers = yes; then
1b1fe467 15145$as_echo "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h
ccc6cda3
JA
15146
15147fi
15148
a82a04b3 15149
1b1fe467 15150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of necessary job control definitions" >&5
dd4f3dd8 15151$as_echo_n "checking for presence of necessary job control definitions... " >&6; }
1b1fe467 15152if ${bash_cv_job_control_missing+:} false; then :
dd4f3dd8 15153 $as_echo_n "(cached) " >&6
ccc6cda3 15154else
1b1fe467
CR
15155 if test "$cross_compiling" = yes; then :
15156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&5
dd4f3dd8 15157$as_echo "$as_me: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
15158 bash_cv_job_control_missing=missing
15159
ccc6cda3 15160else
1b1fe467 15161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15162/* end confdefs.h. */
ccc6cda3
JA
15163
15164#include <sys/types.h>
15165#ifdef HAVE_SYS_WAIT_H
15166#include <sys/wait.h>
15167#endif
15168#ifdef HAVE_UNISTD_H
15169#include <unistd.h>
15170#endif
15171#include <signal.h>
15172
15173/* Add more tests in here as appropriate. */
15174main()
15175{
15176/* signal type */
15177#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
15178exit(1);
15179#endif
15180
15181/* signals and tty control. */
15182#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
15183exit (1);
15184#endif
15185
15186/* process control */
f73dda09 15187#if !defined (WNOHANG) || !defined (WUNTRACED)
ccc6cda3
JA
15188exit(1);
15189#endif
15190
15191/* Posix systems have tcgetpgrp and waitpid. */
15192#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
15193exit(1);
15194#endif
15195
15196#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
15197exit(1);
15198#endif
15199
15200/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
15201#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
15202exit(1);
15203#endif
15204
15205exit(0);
15206}
f73dda09 15207_ACEOF
1b1fe467 15208if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
15209 bash_cv_job_control_missing=present
15210else
1b1fe467 15211 bash_cv_job_control_missing=missing
ccc6cda3 15212fi
1b1fe467
CR
15213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15214 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 15215fi
b709b946 15216
ccc6cda3
JA
15217fi
15218
1b1fe467 15219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_job_control_missing" >&5
dd4f3dd8 15220$as_echo "$bash_cv_job_control_missing" >&6; }
ccc6cda3 15221if test $bash_cv_job_control_missing = missing; then
1b1fe467 15222$as_echo "#define JOB_CONTROL_MISSING 1" >>confdefs.h
ccc6cda3
JA
15223
15224fi
15225
1b1fe467 15226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of named pipes" >&5
dd4f3dd8 15227$as_echo_n "checking for presence of named pipes... " >&6; }
1b1fe467 15228if ${bash_cv_sys_named_pipes+:} false; then :
dd4f3dd8 15229 $as_echo_n "(cached) " >&6
ccc6cda3 15230else
1b1fe467
CR
15231 if test "$cross_compiling" = yes; then :
15232 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5
dd4f3dd8 15233$as_echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
15234 bash_cv_sys_named_pipes=missing
15235
ccc6cda3 15236else
1b1fe467 15237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15238/* end confdefs.h. */
ccc6cda3
JA
15239
15240#include <sys/types.h>
15241#include <sys/stat.h>
15242#ifdef HAVE_UNISTD_H
15243#include <unistd.h>
15244#endif
15245
15246/* Add more tests in here as appropriate. */
15247main()
15248{
bb70624e 15249int fd, err;
ccc6cda3
JA
15250
15251#if defined (HAVE_MKFIFO)
15252exit (0);
15253#endif
15254
15255#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
15256exit (1);
15257#endif
15258
15259#if defined (NeXT)
15260exit (1);
15261#endif
30915f17 15262err = mkdir("bash-aclocal", 0700);
bb70624e
JA
15263if (err < 0) {
15264 perror ("mkdir");
15265 exit(1);
15266}
30915f17 15267fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
bb70624e 15268if (fd == -1) {
30915f17 15269 rmdir ("bash-aclocal");
ccc6cda3 15270 exit (1);
bb70624e 15271}
ccc6cda3 15272close(fd);
30915f17
CR
15273unlink ("bash-aclocal/sh-np-autoconf");
15274rmdir ("bash-aclocal");
ccc6cda3
JA
15275exit(0);
15276}
f73dda09 15277_ACEOF
1b1fe467 15278if ac_fn_c_try_run "$LINENO"; then :
5e4a95c7 15279 bash_cv_sys_named_pipes=present
ccc6cda3 15280else
1b1fe467 15281 bash_cv_sys_named_pipes=missing
5e4a95c7 15282fi
1b1fe467
CR
15283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15284 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 15285fi
b709b946 15286
ccc6cda3
JA
15287fi
15288
1b1fe467 15289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_named_pipes" >&5
dd4f3dd8 15290$as_echo "$bash_cv_sys_named_pipes" >&6; }
5e4a95c7 15291if test $bash_cv_sys_named_pipes = missing; then
1b1fe467 15292$as_echo "#define NAMED_PIPES_MISSING 1" >>confdefs.h
5e4a95c7
CR
15293
15294fi
15295
15296
1b1fe467 15297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
dd4f3dd8 15298$as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
1b1fe467 15299if ${ac_cv_sys_tiocgwinsz_in_termios_h+:} false; then :
dd4f3dd8 15300 $as_echo_n "(cached) " >&6
f73dda09 15301else
1b1fe467 15302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15303/* end confdefs.h. */
f73dda09
JA
15304#include <sys/types.h>
15305#include <termios.h>
15306#ifdef TIOCGWINSZ
15307 yes
15308#endif
15309
15310_ACEOF
15311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 15312 $EGREP "yes" >/dev/null 2>&1; then :
f73dda09
JA
15313 ac_cv_sys_tiocgwinsz_in_termios_h=yes
15314else
15315 ac_cv_sys_tiocgwinsz_in_termios_h=no
15316fi
15317rm -f conftest*
15318
15319fi
1b1fe467 15320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
dd4f3dd8 15321$as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
d166f048 15322
f73dda09 15323if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
1b1fe467 15324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
dd4f3dd8 15325$as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
1b1fe467 15326if ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+:} false; then :
dd4f3dd8 15327 $as_echo_n "(cached) " >&6
ccc6cda3 15328else
1b1fe467 15329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15330/* end confdefs.h. */
ccc6cda3
JA
15331#include <sys/types.h>
15332#include <sys/ioctl.h>
f73dda09
JA
15333#ifdef TIOCGWINSZ
15334 yes
15335#endif
15336
15337_ACEOF
15338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 15339 $EGREP "yes" >/dev/null 2>&1; then :
f73dda09 15340 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
ccc6cda3 15341else
f73dda09 15342 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
ccc6cda3
JA
15343fi
15344rm -f conftest*
f73dda09 15345
ccc6cda3 15346fi
1b1fe467 15347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
dd4f3dd8 15348$as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
f73dda09
JA
15349
15350 if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
ccc6cda3 15351
1b1fe467 15352$as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3 15353
f73dda09 15354 fi
ccc6cda3
JA
15355fi
15356
1b1fe467 15357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5
dd4f3dd8 15358$as_echo_n "checking for TIOCSTAT in sys/ioctl.h... " >&6; }
1b1fe467 15359if ${bash_cv_tiocstat_in_ioctl+:} false; then :
dd4f3dd8 15360 $as_echo_n "(cached) " >&6
ccc6cda3 15361else
1b1fe467 15362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15363/* end confdefs.h. */
ccc6cda3
JA
15364#include <sys/types.h>
15365#include <sys/ioctl.h>
f73dda09
JA
15366int
15367main ()
15368{
ccc6cda3 15369int x = TIOCSTAT;
f73dda09
JA
15370 ;
15371 return 0;
15372}
15373_ACEOF
1b1fe467 15374if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15375 bash_cv_tiocstat_in_ioctl=yes
15376else
1b1fe467 15377 bash_cv_tiocstat_in_ioctl=no
ccc6cda3 15378fi
b709b946 15379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15380fi
15381
1b1fe467 15382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5
dd4f3dd8 15383$as_echo "$bash_cv_tiocstat_in_ioctl" >&6; }
f73dda09 15384if test $bash_cv_tiocstat_in_ioctl = yes; then
1b1fe467 15385$as_echo "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3
JA
15386
15387fi
15388
1b1fe467 15389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5
dd4f3dd8 15390$as_echo_n "checking for FIONREAD in sys/ioctl.h... " >&6; }
1b1fe467 15391if ${bash_cv_fionread_in_ioctl+:} false; then :
dd4f3dd8 15392 $as_echo_n "(cached) " >&6
ccc6cda3 15393else
1b1fe467 15394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15395/* end confdefs.h. */
ccc6cda3
JA
15396#include <sys/types.h>
15397#include <sys/ioctl.h>
f73dda09
JA
15398int
15399main ()
15400{
ccc6cda3 15401int x = FIONREAD;
f73dda09
JA
15402 ;
15403 return 0;
15404}
15405_ACEOF
1b1fe467 15406if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15407 bash_cv_fionread_in_ioctl=yes
15408else
1b1fe467 15409 bash_cv_fionread_in_ioctl=no
ccc6cda3 15410fi
b709b946 15411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15412fi
15413
1b1fe467 15414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5
dd4f3dd8 15415$as_echo "$bash_cv_fionread_in_ioctl" >&6; }
f73dda09 15416if test $bash_cv_fionread_in_ioctl = yes; then
1b1fe467 15417$as_echo "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3
JA
15418
15419fi
15420
a82a04b3
CR
15421
15422
1b1fe467 15423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5
dd4f3dd8 15424$as_echo_n "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; }
1b1fe467 15425if ${bash_cv_wcontinued_broken+:} false; then :
dd4f3dd8 15426 $as_echo_n "(cached) " >&6
cac4cdbf 15427else
1b1fe467
CR
15428 if test "$cross_compiling" = yes; then :
15429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5
dd4f3dd8 15430$as_echo "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&2;}
cac4cdbf
CR
15431 bash_cv_wcontinued_broken=no
15432
15433else
1b1fe467 15434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15435/* end confdefs.h. */
cac4cdbf
CR
15436
15437#include <sys/types.h>
15438#include <sys/wait.h>
15439#include <unistd.h>
15440#include <errno.h>
15441
15442#ifndef errno
15443extern int errno;
15444#endif
15445main()
15446{
15447 int x;
15448
15449 x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED);
15450 if (x == -1 && errno == EINVAL)
15451 exit (1);
15452 else
15453 exit (0);
15454}
15455
15456_ACEOF
1b1fe467 15457if ac_fn_c_try_run "$LINENO"; then :
cac4cdbf
CR
15458 bash_cv_wcontinued_broken=no
15459else
1b1fe467 15460 bash_cv_wcontinued_broken=yes
cac4cdbf 15461fi
1b1fe467
CR
15462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15463 conftest.$ac_objext conftest.beam conftest.$ac_ext
cac4cdbf 15464fi
b709b946 15465
cac4cdbf
CR
15466fi
15467
1b1fe467 15468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcontinued_broken" >&5
dd4f3dd8 15469$as_echo "$bash_cv_wcontinued_broken" >&6; }
cac4cdbf 15470if test $bash_cv_wcontinued_broken = yes; then
1b1fe467 15471$as_echo "#define WCONTINUED_BROKEN 1" >>confdefs.h
cac4cdbf
CR
15472
15473fi
15474
a82a04b3 15475
1b1fe467 15476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5
dd4f3dd8 15477$as_echo_n "checking for speed_t in sys/types.h... " >&6; }
1b1fe467 15478if ${bash_cv_speed_t_in_sys_types+:} false; then :
dd4f3dd8 15479 $as_echo_n "(cached) " >&6
d166f048 15480else
1b1fe467 15481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15482/* end confdefs.h. */
d166f048 15483#include <sys/types.h>
f73dda09
JA
15484int
15485main ()
15486{
d166f048 15487speed_t x;
f73dda09
JA
15488 ;
15489 return 0;
15490}
15491_ACEOF
1b1fe467 15492if ac_fn_c_try_compile "$LINENO"; then :
d166f048
JA
15493 bash_cv_speed_t_in_sys_types=yes
15494else
1b1fe467 15495 bash_cv_speed_t_in_sys_types=no
d166f048 15496fi
b709b946 15497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
15498fi
15499
1b1fe467 15500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5
dd4f3dd8 15501$as_echo "$bash_cv_speed_t_in_sys_types" >&6; }
f73dda09 15502if test $bash_cv_speed_t_in_sys_types = yes; then
1b1fe467 15503$as_echo "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h
d166f048
JA
15504
15505fi
15506
1b1fe467 15507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5
dd4f3dd8 15508$as_echo_n "checking whether getpw functions are declared in pwd.h... " >&6; }
1b1fe467 15509if ${bash_cv_getpw_declared+:} false; then :
dd4f3dd8 15510 $as_echo_n "(cached) " >&6
ccc6cda3 15511else
1b1fe467 15512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15513/* end confdefs.h. */
28ef6c31 15514
ccc6cda3 15515#include <sys/types.h>
28ef6c31
JA
15516#ifdef HAVE_UNISTD_H
15517# include <unistd.h>
15518#endif
ccc6cda3 15519#include <pwd.h>
28ef6c31 15520
f73dda09 15521_ACEOF
28ef6c31 15522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1b1fe467 15523 $EGREP "getpwuid" >/dev/null 2>&1; then :
28ef6c31 15524 bash_cv_getpw_declared=yes
ccc6cda3 15525else
28ef6c31 15526 bash_cv_getpw_declared=no
ccc6cda3
JA
15527fi
15528rm -f conftest*
28ef6c31 15529
ccc6cda3
JA
15530fi
15531
1b1fe467 15532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5
dd4f3dd8 15533$as_echo "$bash_cv_getpw_declared" >&6; }
28ef6c31 15534if test $bash_cv_getpw_declared = yes; then
1b1fe467 15535$as_echo "#define HAVE_GETPW_DECLS 1" >>confdefs.h
ccc6cda3
JA
15536
15537fi
15538
1b1fe467 15539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unusable real-time signals due to large values" >&5
dd4f3dd8 15540$as_echo_n "checking for unusable real-time signals due to large values... " >&6; }
1b1fe467 15541if ${bash_cv_unusable_rtsigs+:} false; then :
dd4f3dd8 15542 $as_echo_n "(cached) " >&6
28ef6c31 15543else
1b1fe467
CR
15544 if test "$cross_compiling" = yes; then :
15545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5
dd4f3dd8 15546$as_echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;}
28ef6c31
JA
15547 bash_cv_unusable_rtsigs=yes
15548
15549else
1b1fe467 15550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15551/* end confdefs.h. */
28ef6c31
JA
15552
15553#include <sys/types.h>
15554#include <signal.h>
15555
15556#ifndef NSIG
15557# define NSIG 64
15558#endif
15559
15560main ()
15561{
15562 int n_sigs = 2 * NSIG;
15563#ifdef SIGRTMIN
15564 int rtmin = SIGRTMIN;
15565#else
15566 int rtmin = 0;
15567#endif
15568
15569 exit(rtmin < n_sigs);
15570}
f73dda09 15571_ACEOF
1b1fe467 15572if ac_fn_c_try_run "$LINENO"; then :
28ef6c31
JA
15573 bash_cv_unusable_rtsigs=yes
15574else
1b1fe467 15575 bash_cv_unusable_rtsigs=no
28ef6c31 15576fi
1b1fe467
CR
15577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15578 conftest.$ac_objext conftest.beam conftest.$ac_ext
28ef6c31 15579fi
b709b946 15580
28ef6c31
JA
15581fi
15582
1b1fe467 15583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_unusable_rtsigs" >&5
dd4f3dd8 15584$as_echo "$bash_cv_unusable_rtsigs" >&6; }
28ef6c31 15585if test $bash_cv_unusable_rtsigs = yes; then
1b1fe467 15586$as_echo "#define UNUSABLE_RT_SIGNALS 1" >>confdefs.h
28ef6c31
JA
15587
15588fi
15589
a82a04b3
CR
15590
15591
15592
15593
f73dda09
JA
15594if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
15595 SIGLIST_O=siglist.o
15596else
15597 SIGLIST_O=
15598fi
ccc6cda3 15599
a82a04b3
CR
15600
15601
ccc6cda3 15602case "$host_os" in
1b1fe467 15603hpux*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
dd4f3dd8 15604$as_echo_n "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; }
1b1fe467 15605if ${bash_cv_kernel_rlimit+:} false; then :
dd4f3dd8 15606 $as_echo_n "(cached) " >&6
ccc6cda3 15607else
1b1fe467 15608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15609/* end confdefs.h. */
ccc6cda3
JA
15610
15611#include <sys/types.h>
15612#include <sys/resource.h>
15613
f73dda09
JA
15614int
15615main ()
15616{
ccc6cda3
JA
15617
15618 int f;
15619 f = RLIMIT_DATA;
15620
f73dda09
JA
15621 ;
15622 return 0;
15623}
15624_ACEOF
1b1fe467 15625if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15626 bash_cv_kernel_rlimit=no
15627else
1b1fe467 15628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15629/* end confdefs.h. */
ccc6cda3 15630
cce855bc
JA
15631#include <sys/types.h>
15632#define _KERNEL
15633#include <sys/resource.h>
15634#undef _KERNEL
15635
f73dda09
JA
15636int
15637main ()
15638{
ccc6cda3
JA
15639
15640 int f;
15641 f = RLIMIT_DATA;
cce855bc 15642
f73dda09
JA
15643 ;
15644 return 0;
15645}
15646_ACEOF
1b1fe467 15647if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15648 bash_cv_kernel_rlimit=yes
15649else
1b1fe467 15650 bash_cv_kernel_rlimit=no
ccc6cda3 15651fi
b709b946 15652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15653
15654fi
b709b946 15655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15656fi
15657
1b1fe467 15658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_kernel_rlimit" >&5
dd4f3dd8 15659$as_echo "$bash_cv_kernel_rlimit" >&6; }
ccc6cda3 15660if test $bash_cv_kernel_rlimit = yes; then
1b1fe467 15661$as_echo "#define RLIMIT_NEEDS_KERNEL 1" >>confdefs.h
ccc6cda3
JA
15662
15663fi
15664 ;;
15665esac
15666
15667if test "$opt_readline" = yes; then
d166f048
JA
15668case "$host_os" in
15669aix*) prefer_curses=yes ;;
15670esac
ccc6cda3
JA
15671
15672if test "X$bash_cv_termcap_lib" = "X"; then
15673_bash_needmsg=yes
15674else
1b1fe467 15675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
dd4f3dd8 15676$as_echo_n "checking which library has the termcap functions... " >&6; }
ccc6cda3
JA
15677_bash_needmsg=
15678fi
1b1fe467
CR
15679if ${bash_cv_termcap_lib+:} false; then :
15680 $as_echo_n "(cached) " >&6
15681else
15682 ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
15683if test "x$ac_cv_func_tgetent" = xyes; then :
d3a24ed2
CR
15684 bash_cv_termcap_lib=libc
15685else
1b1fe467 15686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
dd4f3dd8 15687$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
1b1fe467 15688if ${ac_cv_lib_termcap_tgetent+:} false; then :
dd4f3dd8 15689 $as_echo_n "(cached) " >&6
ccc6cda3 15690else
f73dda09 15691 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 15692LIBS="-ltermcap $LIBS"
1b1fe467 15693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15694/* end confdefs.h. */
f73dda09 15695
b709b946
CR
15696/* Override any GCC internal prototype to avoid an error.
15697 Use char because int might match the return type of a GCC
15698 builtin and then its argument prototype would still apply. */
f73dda09
JA
15699#ifdef __cplusplus
15700extern "C"
15701#endif
f73dda09
JA
15702char tgetent ();
15703int
15704main ()
15705{
b709b946 15706return tgetent ();
f73dda09
JA
15707 ;
15708 return 0;
15709}
15710_ACEOF
1b1fe467 15711if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
15712 ac_cv_lib_termcap_tgetent=yes
15713else
1b1fe467 15714 ac_cv_lib_termcap_tgetent=no
f73dda09 15715fi
1b1fe467
CR
15716rm -f core conftest.err conftest.$ac_objext \
15717 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
15718LIBS=$ac_check_lib_save_LIBS
15719fi
1b1fe467 15720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
dd4f3dd8 15721$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
1b1fe467 15722if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
ccc6cda3
JA
15723 bash_cv_termcap_lib=libtermcap
15724else
1b1fe467 15725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
dd4f3dd8 15726$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
1b1fe467 15727if ${ac_cv_lib_tinfo_tgetent+:} false; then :
dd4f3dd8 15728 $as_echo_n "(cached) " >&6
ccc6cda3 15729else
f73dda09
JA
15730 ac_check_lib_save_LIBS=$LIBS
15731LIBS="-ltinfo $LIBS"
1b1fe467 15732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15733/* end confdefs.h. */
f73dda09 15734
b709b946
CR
15735/* Override any GCC internal prototype to avoid an error.
15736 Use char because int might match the return type of a GCC
15737 builtin and then its argument prototype would still apply. */
f73dda09
JA
15738#ifdef __cplusplus
15739extern "C"
15740#endif
f73dda09
JA
15741char tgetent ();
15742int
15743main ()
15744{
b709b946 15745return tgetent ();
f73dda09
JA
15746 ;
15747 return 0;
15748}
15749_ACEOF
1b1fe467 15750if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
15751 ac_cv_lib_tinfo_tgetent=yes
15752else
1b1fe467 15753 ac_cv_lib_tinfo_tgetent=no
f73dda09 15754fi
1b1fe467
CR
15755rm -f core conftest.err conftest.$ac_objext \
15756 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
15757LIBS=$ac_check_lib_save_LIBS
15758fi
1b1fe467 15759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
dd4f3dd8 15760$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
1b1fe467 15761if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
7117c2d2 15762 bash_cv_termcap_lib=libtinfo
f73dda09 15763else
1b1fe467 15764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
dd4f3dd8 15765$as_echo_n "checking for tgetent in -lcurses... " >&6; }
1b1fe467 15766if ${ac_cv_lib_curses_tgetent+:} false; then :
dd4f3dd8 15767 $as_echo_n "(cached) " >&6
f73dda09
JA
15768else
15769 ac_check_lib_save_LIBS=$LIBS
15770LIBS="-lcurses $LIBS"
1b1fe467 15771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15772/* end confdefs.h. */
ccc6cda3 15773
b709b946
CR
15774/* Override any GCC internal prototype to avoid an error.
15775 Use char because int might match the return type of a GCC
15776 builtin and then its argument prototype would still apply. */
f73dda09
JA
15777#ifdef __cplusplus
15778extern "C"
15779#endif
f73dda09
JA
15780char tgetent ();
15781int
15782main ()
15783{
b709b946 15784return tgetent ();
f73dda09
JA
15785 ;
15786 return 0;
15787}
15788_ACEOF
1b1fe467 15789if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
15790 ac_cv_lib_curses_tgetent=yes
15791else
1b1fe467 15792 ac_cv_lib_curses_tgetent=no
f73dda09 15793fi
1b1fe467
CR
15794rm -f core conftest.err conftest.$ac_objext \
15795 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
15796LIBS=$ac_check_lib_save_LIBS
15797fi
1b1fe467 15798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
dd4f3dd8 15799$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
1b1fe467 15800if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
ccc6cda3
JA
15801 bash_cv_termcap_lib=libcurses
15802else
1b1fe467 15803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
dd4f3dd8 15804$as_echo_n "checking for tgetent in -lncurses... " >&6; }
1b1fe467 15805if ${ac_cv_lib_ncurses_tgetent+:} false; then :
dd4f3dd8 15806 $as_echo_n "(cached) " >&6
ccc6cda3 15807else
f73dda09 15808 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 15809LIBS="-lncurses $LIBS"
1b1fe467 15810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5e4a95c7 15811/* end confdefs.h. */
f73dda09 15812
b709b946
CR
15813/* Override any GCC internal prototype to avoid an error.
15814 Use char because int might match the return type of a GCC
15815 builtin and then its argument prototype would still apply. */
f73dda09
JA
15816#ifdef __cplusplus
15817extern "C"
15818#endif
f73dda09
JA
15819char tgetent ();
15820int
15821main ()
15822{
b709b946 15823return tgetent ();
f73dda09
JA
15824 ;
15825 return 0;
15826}
15827_ACEOF
1b1fe467 15828if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
15829 ac_cv_lib_ncurses_tgetent=yes
15830else
1b1fe467 15831 ac_cv_lib_ncurses_tgetent=no
f73dda09 15832fi
1b1fe467
CR
15833rm -f core conftest.err conftest.$ac_objext \
15834 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
15835LIBS=$ac_check_lib_save_LIBS
15836fi
1b1fe467 15837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
dd4f3dd8 15838$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
1b1fe467 15839if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
f73dda09 15840 bash_cv_termcap_lib=libncurses
ccc6cda3 15841else
f73dda09 15842 bash_cv_termcap_lib=gnutermcap
ccc6cda3 15843fi
ccc6cda3 15844
ccc6cda3
JA
15845fi
15846
15847fi
15848
15849fi
15850
15851fi
15852
d3a24ed2
CR
15853fi
15854
ccc6cda3 15855if test "X$_bash_needmsg" = "Xyes"; then
1b1fe467 15856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
dd4f3dd8 15857$as_echo_n "checking which library has the termcap functions... " >&6; }
ccc6cda3 15858fi
1b1fe467 15859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5
dd4f3dd8 15860$as_echo "using $bash_cv_termcap_lib" >&6; }
cce855bc 15861if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
15862LDFLAGS="$LDFLAGS -L./lib/termcap"
15863TERMCAP_LIB="./lib/termcap/libtermcap.a"
15864TERMCAP_DEP="./lib/termcap/libtermcap.a"
d166f048 15865elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
15866TERMCAP_LIB=-ltermcap
15867TERMCAP_DEP=
f73dda09
JA
15868elif test $bash_cv_termcap_lib = libtinfo; then
15869TERMCAP_LIB=-ltinfo
15870TERMCAP_DEP=
ccc6cda3
JA
15871elif test $bash_cv_termcap_lib = libncurses; then
15872TERMCAP_LIB=-lncurses
15873TERMCAP_DEP=
d3a24ed2
CR
15874elif test $bash_cv_termcap_lib = libc; then
15875TERMCAP_LIB=
15876TERMCAP_DEP=
ccc6cda3
JA
15877else
15878TERMCAP_LIB=-lcurses
15879TERMCAP_DEP=
15880fi
15881
15882fi
15883
a82a04b3
CR
15884
15885
1b1fe467 15886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/fd is available" >&5
dd4f3dd8 15887$as_echo_n "checking whether /dev/fd is available... " >&6; }
1b1fe467 15888if ${bash_cv_dev_fd+:} false; then :
dd4f3dd8 15889 $as_echo_n "(cached) " >&6
d166f048 15890else
d3ad40de
CR
15891 bash_cv_dev_fd=""
15892if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then
de3341d1 15893# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
d3ad40de 15894 if (exec test -r /dev/fd/3 3</dev/null) ; then
de3341d1
CR
15895 bash_cv_dev_fd=standard
15896 else
15897 bash_cv_dev_fd=absent
15898 fi
d3ad40de
CR
15899fi
15900if test -z "$bash_cv_dev_fd" ; then
15901 if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
15902 bash_cv_dev_fd=whacky
15903 else
15904 bash_cv_dev_fd=absent
15905 fi
15906fi
d166f048
JA
15907
15908fi
15909
1b1fe467 15910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_fd" >&5
dd4f3dd8 15911$as_echo "$bash_cv_dev_fd" >&6; }
d166f048 15912if test $bash_cv_dev_fd = "standard"; then
1b1fe467 15913 $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h
d166f048 15914
1b1fe467 15915 $as_echo "#define DEV_FD_PREFIX \"/dev/fd/\"" >>confdefs.h
d166f048
JA
15916
15917elif test $bash_cv_dev_fd = "whacky"; then
1b1fe467 15918 $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h
d166f048 15919
1b1fe467 15920 $as_echo "#define DEV_FD_PREFIX \"/proc/self/fd/\"" >>confdefs.h
d166f048
JA
15921
15922fi
15923
1b1fe467 15924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/stdin stdout stderr are available" >&5
dd4f3dd8 15925$as_echo_n "checking whether /dev/stdin stdout stderr are available... " >&6; }
1b1fe467 15926if ${bash_cv_dev_stdin+:} false; then :
dd4f3dd8 15927 $as_echo_n "(cached) " >&6
bb70624e 15928else
d3ad40de 15929 if test -d /dev/fd && (exec test -r /dev/stdin < /dev/null) ; then
bb70624e 15930 bash_cv_dev_stdin=present
d3ad40de 15931 elif test -d /proc/self/fd && (exec test -r /dev/stdin < /dev/null) ; then
bb70624e
JA
15932 bash_cv_dev_stdin=present
15933 else
15934 bash_cv_dev_stdin=absent
15935 fi
15936
15937fi
15938
1b1fe467 15939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_stdin" >&5
dd4f3dd8 15940$as_echo "$bash_cv_dev_stdin" >&6; }
bb70624e 15941if test $bash_cv_dev_stdin = "present"; then
1b1fe467 15942 $as_echo "#define HAVE_DEV_STDIN 1" >>confdefs.h
bb70624e
JA
15943
15944fi
15945
1b1fe467 15946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5
dd4f3dd8 15947$as_echo_n "checking for default mail directory... " >&6; }
1b1fe467 15948if ${bash_cv_mail_dir+:} false; then :
dd4f3dd8 15949 $as_echo_n "(cached) " >&6
ccc6cda3
JA
15950else
15951 if test -d /var/mail; then
15952 bash_cv_mail_dir=/var/mail
ccc6cda3
JA
15953 elif test -d /var/spool/mail; then
15954 bash_cv_mail_dir=/var/spool/mail
7117c2d2
JA
15955 elif test -d /usr/mail; then
15956 bash_cv_mail_dir=/usr/mail
e8ce775d
JA
15957 elif test -d /usr/spool/mail; then
15958 bash_cv_mail_dir=/usr/spool/mail
ccc6cda3
JA
15959 else
15960 bash_cv_mail_dir=unknown
15961 fi
15962
15963fi
15964
1b1fe467 15965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_mail_dir" >&5
dd4f3dd8 15966$as_echo "$bash_cv_mail_dir" >&6; }
a82a04b3 15967cat >>confdefs.h <<_ACEOF
7117c2d2 15968#define DEFAULT_MAIL_DIRECTORY "$bash_cv_mail_dir"
a82a04b3
CR
15969_ACEOF
15970
15971
ccc6cda3 15972
ccc6cda3
JA
15973if test "$bash_cv_job_control_missing" = missing; then
15974 opt_job_control=no
15975fi
15976
15977if test "$opt_job_control" = yes; then
1b1fe467 15978$as_echo "#define JOB_CONTROL 1" >>confdefs.h
ccc6cda3
JA
15979
15980JOBS_O=jobs.o
15981else
15982JOBS_O=nojobs.o
15983fi
15984
a82a04b3
CR
15985
15986
15987
d166f048
JA
15988LOCAL_DEFS=-DSHELL
15989
a82a04b3 15990
b72432fd 15991case "${host_os}" in
1b1fe467 15992sysv4.2*) $as_echo "#define SVR4_2 1" >>confdefs.h
ccc6cda3 15993
1b1fe467 15994 $as_echo "#define SVR4 1" >>confdefs.h
ccc6cda3 15995 ;;
1b1fe467 15996sysv4*) $as_echo "#define SVR4 1" >>confdefs.h
ccc6cda3 15997 ;;
1b1fe467 15998sysv5*) $as_echo "#define SVR5 1" >>confdefs.h
b72432fd
JA
15999 ;;
16000hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;;
ccc6cda3
JA
16001hpux*) LOCAL_CFLAGS=-DHPUX ;;
16002dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
bb70624e
JA
16003isc*) LOCAL_CFLAGS=-Disc386 ;;
16004rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;;
f73dda09 16005darwin*) LOCAL_CFLAGS=-DMACOSX ;;
7117c2d2
JA
16006sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;;
16007sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;;
ccc6cda3 16008sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
d166f048 16009sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
d3ad40de 16010solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
db31fb26
CR
16011solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;;
16012solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;;
16013solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;;
d3ad40de 16014solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
b72432fd 16015lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
3ffb039a
CR
16016linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
16017 case "`uname -r`" in
3bf257a5 16018 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h
3ffb039a
CR
16019 ;;
16020 esac ;;
fd3925f1 16021*qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
7117c2d2 16022*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
b72432fd 16023powerux*) LOCAL_LIBS="-lgen" ;;
d3a24ed2 16024cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
fd58d46e 16025opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;;
10e78433 16026*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;;
b72432fd
JA
16027esac
16028
16029case "${host_os}-${CC}" in
16030aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;;
16031aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;
16032bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
690150f9
CR
16033bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
16034hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading
ccc6cda3
JA
16035esac
16036
bb70624e 16037case "${host_os}" in
28ef6c31
JA
16038freebsd[3-9]*)
16039 if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then
bb70624e
JA
16040 LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
16041 fi ;;
28ef6c31 16042freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
798a67db 16043dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
bb70624e
JA
16044esac
16045
ccc6cda3
JA
16046case "$host_cpu" in
16047*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
16048esac
16049
16050case "$host_cpu-$host_os" in
16051ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
16052esac
16053
16054case "$host_cpu-$host_vendor-$host_os" in
16055m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
16056mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
16057esac
16058
b72432fd
JA
16059#
16060# Shared object configuration section. These values are generated by
16061# ${srcdir}/support/shobj-conf
16062#
16063if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf
16064then
1b1fe467 16065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5
dd4f3dd8 16066$as_echo_n "checking shared object configuration for loadable builtins... " >&6; }
28ef6c31 16067 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
f73dda09 16068
a82a04b3
CR
16069
16070
16071
16072
16073
16074
1b1fe467 16075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5
dd4f3dd8 16076$as_echo "$SHOBJ_STATUS" >&6; }
b72432fd
JA
16077fi
16078
ccc6cda3
JA
16079# try to create a directory tree if the source is elsewhere
16080# this should be packaged into a script accessible via ${srcdir}/support
16081case "$srcdir" in
16082.) ;;
cce855bc 16083*) for d in doc tests support lib examples; do # dirs
ccc6cda3
JA
16084 test -d $d || mkdir $d
16085 done
cce855bc 16086 for ld in readline glob tilde malloc sh termcap; do # libdirs
ccc6cda3
JA
16087 test -d lib/$ld || mkdir lib/$ld
16088 done
cce855bc 16089 test -d examples/loadables || mkdir examples/loadables # loadable builtins
bb70624e 16090 test -d examples/loadables/perl || mkdir examples/loadables/perl
ccc6cda3
JA
16091 ;;
16092esac
16093
16094BUILD_DIR=`pwd`
10590446
CR
16095case "$BUILD_DIR" in
16096*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
16097*) ;;
16098esac
ccc6cda3 16099
c184f645
CR
16100if test -z "$localedir"; then
16101 localedir='${datarootdir}/locale'
16102fi
16103if test -z "$datarootdir"; then
16104 datarootdir='${prefix}/share'
16105fi
a82a04b3
CR
16106
16107
16108
16109
16110
16111
c184f645
CR
16112# Some versions of autoconf don't substitute these automatically
16113
a82a04b3
CR
16114
16115
54a5fbe1
CR
16116# directory where we install dynamically loadable builtins
16117if test -z "$loadablesdir"; then
16118 loadablesdir='${libdir}/bash'
16119fi
16120
16121if test -z "$headersdir"; then
16122 headersdir='$(includedir)/$(PACKAGE_NAME)'
16123fi
16124
16125
a82a04b3
CR
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
d166f048 16141
d3ad40de 16142
d3ad40de 16143
c184f645
CR
16144#AC_SUBST(ALLOCA_SOURCE)
16145#AC_SUBST(ALLOCA_OBJECT)
16146
54a5fbe1 16147ac_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"
b709b946
CR
16148
16149ac_config_commands="$ac_config_commands default"
16150
f73dda09 16151cat >confcache <<\_ACEOF
ccc6cda3
JA
16152# This file is a shell script that caches the results of configure
16153# tests run on this system so they can be shared between configure
f73dda09
JA
16154# scripts and configure runs, see configure's option --config-cache.
16155# It is not useful on other systems. If it contains results you don't
16156# want to keep, you may remove or edit it.
726f6388 16157#
f73dda09
JA
16158# config.status only pays attention to the cache file if you give it
16159# the --recheck option to rerun configure.
ccc6cda3 16160#
5e4a95c7 16161# `ac_cv_env_foo' variables (set or unset) will be overridden when
f73dda09
JA
16162# loading this file, other *unset* `ac_cv_foo' will be assigned the
16163# following values.
16164
16165_ACEOF
16166
ccc6cda3
JA
16167# The following way of writing the cache mishandles newlines in values,
16168# but we know of no workaround that is simple, portable, and efficient.
b709b946 16169# So, we kill variables containing newlines.
ccc6cda3
JA
16170# Ultrix sh set writes to stderr and can't be redirected directly,
16171# and sets the high bit in the cache file unless we assign to the vars.
b709b946
CR
16172(
16173 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16174 eval ac_val=\$$ac_var
16175 case $ac_val in #(
16176 *${as_nl}*)
16177 case $ac_var in #(
1b1fe467 16178 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
af98a2a6 16179$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
b709b946
CR
16180 esac
16181 case $ac_var in #(
16182 _ | IFS | as_nl) ;; #(
dd4f3dd8 16183 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1b1fe467 16184 *) { eval $ac_var=; unset $ac_var;} ;;
b709b946
CR
16185 esac ;;
16186 esac
16187 done
16188
f73dda09 16189 (set) 2>&1 |
b709b946
CR
16190 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16191 *${as_nl}ac_space=\ *)
1b1fe467
CR
16192 # `set' does not quote correctly, so add quotes: double-quote
16193 # substitution turns \\\\ into \\, and sed turns \\ into \.
f73dda09 16194 sed -n \
5e4a95c7
CR
16195 "s/'/'\\\\''/g;
16196 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
b709b946 16197 ;; #(
f73dda09
JA
16198 *)
16199 # `set' quotes correctly as required by POSIX, so do not add quotes.
b709b946 16200 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
f73dda09 16201 ;;
b709b946
CR
16202 esac |
16203 sort
16204) |
f73dda09 16205 sed '
b709b946 16206 /^ac_cv_env_/b end
f73dda09 16207 t clear
b709b946 16208 :clear
f73dda09
JA
16209 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16210 t end
b709b946
CR
16211 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16212 :end' >>confcache
16213if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16214 if test -w "$cache_file"; then
1b1fe467
CR
16215 if test "x$cache_file" != "x/dev/null"; then
16216 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
dd4f3dd8 16217$as_echo "$as_me: updating cache $cache_file" >&6;}
1b1fe467
CR
16218 if test ! -f "$cache_file" || test -h "$cache_file"; then
16219 cat confcache >"$cache_file"
16220 else
16221 case $cache_file in #(
16222 */* | ?:*)
16223 mv -f confcache "$cache_file"$$ &&
16224 mv -f "$cache_file"$$ "$cache_file" ;; #(
16225 *)
16226 mv -f confcache "$cache_file" ;;
16227 esac
16228 fi
16229 fi
ccc6cda3 16230 else
1b1fe467 16231 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
dd4f3dd8 16232$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ccc6cda3
JA
16233 fi
16234fi
16235rm -f confcache
16236
ccc6cda3
JA
16237test "x$prefix" = xNONE && prefix=$ac_default_prefix
16238# Let make expand exec_prefix.
16239test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16240
ccc6cda3
JA
16241DEFS=-DHAVE_CONFIG_H
16242
5e4a95c7
CR
16243ac_libobjs=
16244ac_ltlibobjs=
1b1fe467 16245U=
5e4a95c7
CR
16246for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16247 # 1. Remove the extension, and $U if already installed.
b709b946 16248 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
dd4f3dd8 16249 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
b709b946
CR
16250 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16251 # will be set to the directory where LIBOBJS objects are built.
1b1fe467
CR
16252 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16253 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
5e4a95c7
CR
16254done
16255LIBOBJS=$ac_libobjs
16256
16257LTLIBOBJS=$ac_ltlibobjs
16258
16259
a82a04b3 16260
af98a2a6 16261
1b1fe467 16262: "${CONFIG_STATUS=./config.status}"
dd4f3dd8 16263ac_write_fail=0
f73dda09
JA
16264ac_clean_files_save=$ac_clean_files
16265ac_clean_files="$ac_clean_files $CONFIG_STATUS"
1b1fe467 16266{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
dd4f3dd8 16267$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
1b1fe467
CR
16268as_write_fail=0
16269cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
f73dda09 16270#! $SHELL
a82a04b3 16271# Generated by $as_me.
ccc6cda3 16272# Run this file to recreate the current configuration.
ccc6cda3 16273# Compiler output produced by configure, useful for debugging
f73dda09 16274# configure, is in config.log if it exists.
ccc6cda3 16275
f73dda09 16276debug=false
5e4a95c7
CR
16277ac_cs_recheck=false
16278ac_cs_silent=false
7175a77f 16279
1b1fe467
CR
16280SHELL=\${CONFIG_SHELL-$SHELL}
16281export SHELL
16282_ASEOF
16283cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16284## -------------------- ##
16285## M4sh Initialization. ##
16286## -------------------- ##
a82a04b3 16287
dd4f3dd8
CR
16288# Be more Bourne compatible
16289DUALCASE=1; export DUALCASE # for MKS sh
1b1fe467 16290if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
f73dda09
JA
16291 emulate sh
16292 NULLCMD=:
dd4f3dd8 16293 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
5e4a95c7
CR
16294 # is contrary to our usage. Disable this feature.
16295 alias -g '${1+"$@"}'='"$@"'
b709b946
CR
16296 setopt NO_GLOB_SUBST
16297else
1b1fe467
CR
16298 case `(set -o) 2>/dev/null` in #(
16299 *posix*) :
16300 set -o posix ;; #(
16301 *) :
16302 ;;
dd4f3dd8 16303esac
f73dda09 16304fi
dd4f3dd8
CR
16305
16306
dd4f3dd8
CR
16307as_nl='
16308'
16309export as_nl
16310# Printing a long string crashes Solaris 7 /usr/bin/printf.
16311as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16312as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16313as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
1b1fe467
CR
16314# Prefer a ksh shell builtin over an external printf program on Solaris,
16315# but without wasting forks for bash or zsh.
16316if test -z "$BASH_VERSION$ZSH_VERSION" \
16317 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16318 as_echo='print -r --'
16319 as_echo_n='print -rn --'
16320elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
dd4f3dd8
CR
16321 as_echo='printf %s\n'
16322 as_echo_n='printf %s'
16323else
16324 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16325 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16326 as_echo_n='/usr/ucb/echo -n'
b709b946 16327 else
dd4f3dd8
CR
16328 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16329 as_echo_n_body='eval
16330 arg=$1;
1b1fe467 16331 case $arg in #(
dd4f3dd8
CR
16332 *"$as_nl"*)
16333 expr "X$arg" : "X\\(.*\\)$as_nl";
16334 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16335 esac;
16336 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16337 '
16338 export as_echo_n_body
16339 as_echo_n='sh -c $as_echo_n_body as_echo'
b709b946 16340 fi
dd4f3dd8
CR
16341 export as_echo_body
16342 as_echo='sh -c $as_echo_body as_echo'
16343fi
16344
16345# The user is always right.
16346if test "${PATH_SEPARATOR+set}" != set; then
16347 PATH_SEPARATOR=:
16348 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16349 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16350 PATH_SEPARATOR=';'
16351 }
b709b946
CR
16352fi
16353
5e4a95c7 16354
b709b946
CR
16355# IFS
16356# We need space, tab and new line, in precisely that order. Quoting is
16357# there to prevent editors from complaining about space-tab.
16358# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16359# splitting by setting IFS to empty value.)
b709b946
CR
16360IFS=" "" $as_nl"
16361
16362# Find who we are. Look in the path if we contain no directory separator.
1b1fe467
CR
16363as_myself=
16364case $0 in #((
b709b946
CR
16365 *[\\/]* ) as_myself=$0 ;;
16366 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16367for as_dir in $PATH
16368do
16369 IFS=$as_save_IFS
16370 test -z "$as_dir" && as_dir=.
1b1fe467
CR
16371 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16372 done
b709b946
CR
16373IFS=$as_save_IFS
16374
16375 ;;
16376esac
16377# We did not find ourselves, most probably we were run as `sh COMMAND'
16378# in which case we are not to be found in the path.
16379if test "x$as_myself" = x; then
16380 as_myself=$0
16381fi
16382if test ! -f "$as_myself"; then
dd4f3dd8 16383 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
1b1fe467 16384 exit 1
b709b946
CR
16385fi
16386
1b1fe467
CR
16387# Unset variables that we do not need and which cause bugs (e.g. in
16388# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16389# suppresses any "Segmentation fault" message there. '((' could
16390# trigger a bug in pdksh 5.2.14.
16391for as_var in BASH_ENV ENV MAIL MAILPATH
16392do eval test x\${$as_var+set} = xset \
16393 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
b709b946 16394done
5e4a95c7
CR
16395PS1='$ '
16396PS2='> '
16397PS4='+ '
16398
16399# NLS nuisances.
dd4f3dd8
CR
16400LC_ALL=C
16401export LC_ALL
16402LANGUAGE=C
16403export LANGUAGE
5e4a95c7 16404
1b1fe467
CR
16405# CDPATH.
16406(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16407
16408
16409# as_fn_error STATUS ERROR [LINENO LOG_FD]
16410# ----------------------------------------
16411# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16412# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16413# script with STATUS, using 1 if that was 0.
16414as_fn_error ()
16415{
16416 as_status=$1; test $as_status -eq 0 && as_status=1
16417 if test "$4"; then
16418 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16419 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16420 fi
16421 $as_echo "$as_me: error: $2" >&2
16422 as_fn_exit $as_status
16423} # as_fn_error
16424
16425
16426# as_fn_set_status STATUS
16427# -----------------------
16428# Set $? to STATUS, without forking.
16429as_fn_set_status ()
16430{
16431 return $1
16432} # as_fn_set_status
16433
16434# as_fn_exit STATUS
16435# -----------------
16436# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16437as_fn_exit ()
16438{
16439 set +e
16440 as_fn_set_status $1
16441 exit $1
16442} # as_fn_exit
16443
16444# as_fn_unset VAR
16445# ---------------
16446# Portably unset VAR.
16447as_fn_unset ()
16448{
16449 { eval $1=; unset $1;}
16450}
16451as_unset=as_fn_unset
16452# as_fn_append VAR VALUE
16453# ----------------------
16454# Append the text in VALUE to the end of the definition contained in VAR. Take
16455# advantage of any shell optimizations that allow amortized linear growth over
16456# repeated appends, instead of the typical quadratic growth present in naive
16457# implementations.
16458if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16459 eval 'as_fn_append ()
16460 {
16461 eval $1+=\$2
16462 }'
16463else
16464 as_fn_append ()
16465 {
16466 eval $1=\$$1\$2
16467 }
16468fi # as_fn_append
16469
16470# as_fn_arith ARG...
16471# ------------------
16472# Perform arithmetic evaluation on the ARGs, and store the result in the
16473# global $as_val. Take advantage of shells that can avoid forks. The arguments
16474# must be portable across $(()) and expr.
16475if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16476 eval 'as_fn_arith ()
16477 {
16478 as_val=$(( $* ))
16479 }'
16480else
16481 as_fn_arith ()
16482 {
16483 as_val=`expr "$@" || test $? -eq 1`
16484 }
16485fi # as_fn_arith
16486
16487
b709b946
CR
16488if expr a : '\(a\)' >/dev/null 2>&1 &&
16489 test "X`expr 00001 : '.*\(...\)'`" = X001; then
5e4a95c7
CR
16490 as_expr=expr
16491else
16492 as_expr=false
16493fi
16494
b709b946 16495if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
5e4a95c7
CR
16496 as_basename=basename
16497else
16498 as_basename=false
16499fi
a82a04b3 16500
1b1fe467
CR
16501if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16502 as_dirname=dirname
16503else
16504 as_dirname=false
16505fi
f73dda09 16506
b709b946 16507as_me=`$as_basename -- "$0" ||
a82a04b3
CR
16508$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16509 X"$0" : 'X\(//\)$' \| \
b709b946 16510 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
dd4f3dd8 16511$as_echo X/"$0" |
b709b946
CR
16512 sed '/^.*\/\([^/][^/]*\)\/*$/{
16513 s//\1/
16514 q
16515 }
16516 /^X\/\(\/\/\)$/{
16517 s//\1/
16518 q
16519 }
16520 /^X\/\(\/\).*/{
16521 s//\1/
16522 q
16523 }
16524 s/.*/./; q'`
a82a04b3 16525
1b1fe467
CR
16526# Avoid depending upon Character Ranges.
16527as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16528as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16529as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16530as_cr_digits='0123456789'
16531as_cr_alnum=$as_cr_Letters$as_cr_digits
b709b946
CR
16532
16533ECHO_C= ECHO_N= ECHO_T=
1b1fe467 16534case `echo -n x` in #(((((
b709b946 16535-n*)
1b1fe467 16536 case `echo 'xy\c'` in
b709b946 16537 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
1b1fe467
CR
16538 xy) ECHO_C='\c';;
16539 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16540 ECHO_T=' ';;
b709b946
CR
16541 esac;;
16542*)
16543 ECHO_N='-n';;
a82a04b3 16544esac
f73dda09
JA
16545
16546rm -f conf$$ conf$$.exe conf$$.file
b709b946
CR
16547if test -d conf$$.dir; then
16548 rm -f conf$$.dir/conf$$.file
16549else
16550 rm -f conf$$.dir
dd4f3dd8
CR
16551 mkdir conf$$.dir 2>/dev/null
16552fi
16553if (echo >conf$$.file) 2>/dev/null; then
16554 if ln -s conf$$.file conf$$ 2>/dev/null; then
16555 as_ln_s='ln -s'
16556 # ... but there are two gotchas:
16557 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16558 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
0ee50808 16559 # In both cases, we have to default to `cp -pR'.
dd4f3dd8 16560 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
0ee50808 16561 as_ln_s='cp -pR'
dd4f3dd8
CR
16562 elif ln conf$$.file conf$$ 2>/dev/null; then
16563 as_ln_s=ln
16564 else
0ee50808 16565 as_ln_s='cp -pR'
dd4f3dd8 16566 fi
f73dda09 16567else
0ee50808 16568 as_ln_s='cp -pR'
f73dda09 16569fi
b709b946
CR
16570rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16571rmdir conf$$.dir 2>/dev/null
f73dda09 16572
1b1fe467
CR
16573
16574# as_fn_mkdir_p
16575# -------------
16576# Create "$as_dir" as a directory, including parents if necessary.
16577as_fn_mkdir_p ()
16578{
16579
16580 case $as_dir in #(
16581 -*) as_dir=./$as_dir;;
16582 esac
16583 test -d "$as_dir" || eval $as_mkdir_p || {
16584 as_dirs=
16585 while :; do
16586 case $as_dir in #(
16587 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16588 *) as_qdir=$as_dir;;
16589 esac
16590 as_dirs="'$as_qdir' $as_dirs"
16591 as_dir=`$as_dirname -- "$as_dir" ||
16592$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16593 X"$as_dir" : 'X\(//\)[^/]' \| \
16594 X"$as_dir" : 'X\(//\)$' \| \
16595 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16596$as_echo X"$as_dir" |
16597 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16598 s//\1/
16599 q
16600 }
16601 /^X\(\/\/\)[^/].*/{
16602 s//\1/
16603 q
16604 }
16605 /^X\(\/\/\)$/{
16606 s//\1/
16607 q
16608 }
16609 /^X\(\/\).*/{
16610 s//\1/
16611 q
16612 }
16613 s/.*/./; q'`
16614 test -d "$as_dir" && break
16615 done
16616 test -z "$as_dirs" || eval "mkdir $as_dirs"
16617 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16618
16619
16620} # as_fn_mkdir_p
5e4a95c7 16621if mkdir -p . 2>/dev/null; then
1b1fe467 16622 as_mkdir_p='mkdir -p "$as_dir"'
5e4a95c7
CR
16623else
16624 test -d ./-p && rmdir ./-p
16625 as_mkdir_p=false
16626fi
16627
0ee50808
CR
16628
16629# as_fn_executable_p FILE
16630# -----------------------
16631# Test if FILE is an executable regular file.
16632as_fn_executable_p ()
16633{
16634 test -f "$1" && test -x "$1"
16635} # as_fn_executable_p
16636as_test_x='test -x'
16637as_executable_p=as_fn_executable_p
a82a04b3
CR
16638
16639# Sed expression to map a string onto a valid CPP name.
5e4a95c7 16640as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
a82a04b3
CR
16641
16642# Sed expression to map a string onto a valid variable name.
5e4a95c7 16643as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
a82a04b3 16644
f73dda09 16645
f73dda09 16646exec 6>&1
1b1fe467
CR
16647## ----------------------------------- ##
16648## Main body of $CONFIG_STATUS script. ##
16649## ----------------------------------- ##
16650_ASEOF
16651test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
f73dda09 16652
1b1fe467
CR
16653cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16654# Save the log message, to keep $0 and so on meaningful, and to
a82a04b3 16655# report actual input values of CONFIG_FILES etc. instead of their
b709b946
CR
16656# values after options handling.
16657ac_log="
690150f9 16658This file was extended by bash $as_me 4.4-rc1, which was
0ee50808 16659generated by GNU Autoconf 2.69. Invocation command line was
a82a04b3
CR
16660
16661 CONFIG_FILES = $CONFIG_FILES
16662 CONFIG_HEADERS = $CONFIG_HEADERS
16663 CONFIG_LINKS = $CONFIG_LINKS
16664 CONFIG_COMMANDS = $CONFIG_COMMANDS
16665 $ $0 $@
16666
b709b946
CR
16667on `(hostname || uname -n) 2>/dev/null | sed 1q`
16668"
16669
f73dda09
JA
16670_ACEOF
16671
af98a2a6
CR
16672case $ac_config_files in *"
16673"*) set x $ac_config_files; shift; ac_config_files=$*;;
16674esac
16675
16676case $ac_config_headers in *"
16677"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16678esac
16679
16680
dd4f3dd8 16681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
f73dda09 16682# Files that config.status was made for.
b709b946
CR
16683config_files="$ac_config_files"
16684config_headers="$ac_config_headers"
16685config_commands="$ac_config_commands"
c184f645 16686
b709b946 16687_ACEOF
f73dda09 16688
dd4f3dd8 16689cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09 16690ac_cs_usage="\
1b1fe467
CR
16691\`$as_me' instantiates files and other configuration actions
16692from templates according to the current configuration. Unless the files
16693and actions are specified as TAGs, all are instantiated by default.
f73dda09 16694
1b1fe467 16695Usage: $0 [OPTION]... [TAG]...
f73dda09
JA
16696
16697 -h, --help print this help, then exit
dd4f3dd8 16698 -V, --version print version number and configuration settings, then exit
1b1fe467 16699 --config print configuration, then exit
af98a2a6
CR
16700 -q, --quiet, --silent
16701 do not print progress messages
f73dda09
JA
16702 -d, --debug don't remove temporary files
16703 --recheck update $as_me by reconfiguring in the same conditions
af98a2a6 16704 --file=FILE[:TEMPLATE]
dd4f3dd8 16705 instantiate the configuration file FILE
af98a2a6 16706 --header=FILE[:TEMPLATE]
dd4f3dd8 16707 instantiate the configuration header FILE
f73dda09
JA
16708
16709Configuration files:
16710$config_files
16711
16712Configuration headers:
16713$config_headers
16714
16715Configuration commands:
16716$config_commands
16717
1b1fe467 16718Report bugs to <bug-bash@gnu.org>."
c184f645 16719
b709b946 16720_ACEOF
dd4f3dd8 16721cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1b1fe467 16722ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
f73dda09 16723ac_cs_version="\\
690150f9 16724bash config.status 4.4-rc1
0ee50808 16725configured by $0, generated by GNU Autoconf 2.69,
1b1fe467 16726 with options \\"\$ac_cs_config\\"
f73dda09 16727
0ee50808 16728Copyright (C) 2012 Free Software Foundation, Inc.
f73dda09
JA
16729This config.status script is free software; the Free Software Foundation
16730gives unlimited permission to copy, distribute and modify it."
b709b946
CR
16731
16732ac_pwd='$ac_pwd'
16733srcdir='$srcdir'
16734INSTALL='$INSTALL'
dd4f3dd8 16735test -n "\$AWK" || AWK=awk
a82a04b3 16736_ACEOF
f73dda09 16737
dd4f3dd8
CR
16738cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16739# The default lists apply if the user does not specify any file.
f73dda09
JA
16740ac_need_defaults=:
16741while test $# != 0
ccc6cda3 16742do
f73dda09 16743 case $1 in
1b1fe467 16744 --*=?*)
b709b946
CR
16745 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16746 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
5e4a95c7
CR
16747 ac_shift=:
16748 ;;
1b1fe467
CR
16749 --*=)
16750 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16751 ac_optarg=
16752 ac_shift=:
16753 ;;
b709b946 16754 *)
5e4a95c7
CR
16755 ac_option=$1
16756 ac_optarg=$2
16757 ac_shift=shift
f73dda09 16758 ;;
f73dda09
JA
16759 esac
16760
5e4a95c7 16761 case $ac_option in
f73dda09 16762 # Handling of the options.
5e4a95c7
CR
16763 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16764 ac_cs_recheck=: ;;
b709b946 16765 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
dd4f3dd8 16766 $as_echo "$ac_cs_version"; exit ;;
1b1fe467
CR
16767 --config | --confi | --conf | --con | --co | --c )
16768 $as_echo "$ac_cs_config"; exit ;;
b709b946 16769 --debug | --debu | --deb | --de | --d | -d )
f73dda09
JA
16770 debug=: ;;
16771 --file | --fil | --fi | --f )
5e4a95c7 16772 $ac_shift
dd4f3dd8
CR
16773 case $ac_optarg in
16774 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
1b1fe467 16775 '') as_fn_error $? "missing file argument" ;;
dd4f3dd8 16776 esac
1b1fe467 16777 as_fn_append CONFIG_FILES " '$ac_optarg'"
f73dda09
JA
16778 ac_need_defaults=false;;
16779 --header | --heade | --head | --hea )
5e4a95c7 16780 $ac_shift
dd4f3dd8
CR
16781 case $ac_optarg in
16782 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16783 esac
1b1fe467 16784 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
f73dda09 16785 ac_need_defaults=false;;
b709b946
CR
16786 --he | --h)
16787 # Conflict between --help and --header
1b1fe467
CR
16788 as_fn_error $? "ambiguous option: \`$1'
16789Try \`$0 --help' for more information.";;
b709b946 16790 --help | --hel | -h )
dd4f3dd8 16791 $as_echo "$ac_cs_usage"; exit ;;
5e4a95c7
CR
16792 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16793 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16794 ac_cs_silent=: ;;
f73dda09
JA
16795
16796 # This is an error.
1b1fe467
CR
16797 -*) as_fn_error $? "unrecognized option: \`$1'
16798Try \`$0 --help' for more information." ;;
f73dda09 16799
1b1fe467 16800 *) as_fn_append ac_config_targets " $1"
b709b946 16801 ac_need_defaults=false ;;
f73dda09 16802
ccc6cda3 16803 esac
f73dda09 16804 shift
ccc6cda3
JA
16805done
16806
5e4a95c7
CR
16807ac_configure_extra_args=
16808
16809if $ac_cs_silent; then
16810 exec 6>/dev/null
16811 ac_configure_extra_args="$ac_configure_extra_args --silent"
16812fi
16813
16814_ACEOF
dd4f3dd8 16815cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5e4a95c7 16816if \$ac_cs_recheck; then
0ee50808 16817 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
dd4f3dd8
CR
16818 shift
16819 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16820 CONFIG_SHELL='$SHELL'
b709b946 16821 export CONFIG_SHELL
dd4f3dd8 16822 exec "\$@"
5e4a95c7
CR
16823fi
16824
f73dda09 16825_ACEOF
dd4f3dd8 16826cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b709b946
CR
16827exec 5>>config.log
16828{
16829 echo
16830 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16831## Running $as_me. ##
16832_ASBOX
dd4f3dd8 16833 $as_echo "$ac_log"
b709b946 16834} >&5
ccc6cda3 16835
b709b946 16836_ACEOF
dd4f3dd8 16837cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5e13499c 16838#
b709b946 16839# INIT-COMMANDS
5e13499c 16840#
5e13499c
CR
16841# Capture the value of obsolete ALL_LINGUAS because we need it to compute
16842 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
16843 # from automake.
16844 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
16845 # Capture the value of LINGUAS because we need it to compute CATALOGS.
16846 LINGUAS="${LINGUAS-%UNSET%}"
16847
5e13499c 16848
a82a04b3
CR
16849_ACEOF
16850
dd4f3dd8 16851cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b709b946
CR
16852
16853# Handling of arguments.
f73dda09
JA
16854for ac_config_target in $ac_config_targets
16855do
b709b946
CR
16856 case $ac_config_target in
16857 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
16858 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
16859 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16860 "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;;
16861 "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;;
16862 "lib/glob/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;;
16863 "lib/intl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;;
16864 "lib/malloc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;;
16865 "lib/sh/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;;
16866 "lib/termcap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;;
16867 "lib/tilde/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;;
16868 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
16869 "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;;
16870 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
16871 "examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;;
54a5fbe1 16872 "examples/loadables/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;;
b709b946 16873 "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;;
54a5fbe1 16874 "support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;;
b709b946
CR
16875 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16876
1b1fe467 16877 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
f73dda09
JA
16878 esac
16879done
16880
b709b946 16881
f73dda09
JA
16882# If the user did not use the arguments to specify the items to instantiate,
16883# then the envvar interface is used. Set only those that are not.
16884# We use the long form for the default assignment because of an extremely
16885# bizarre bug on SunOS 4.1.3.
16886if $ac_need_defaults; then
16887 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16888 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16889 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16890fi
16891
5e4a95c7 16892# Have a temporary directory for convenience. Make it in the build tree
b709b946 16893# simply because there is no reason against having it here, and in addition,
5e4a95c7 16894# creating and moving files from /tmp can sometimes cause problems.
b709b946
CR
16895# Hook for its removal unless debugging.
16896# Note that there is a small window in which the directory will not be cleaned:
16897# after its creation but before its name has been assigned to `$tmp'.
f73dda09
JA
16898$debug ||
16899{
1b1fe467 16900 tmp= ac_tmp=
b709b946 16901 trap 'exit_status=$?
1b1fe467
CR
16902 : "${ac_tmp:=$tmp}"
16903 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
b709b946 16904' 0
1b1fe467 16905 trap 'as_fn_exit 1' 1 2 13 15
f73dda09 16906}
f73dda09 16907# Create a (secure) tmp directory for tmp files.
5e4a95c7 16908
f73dda09 16909{
b709b946 16910 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
1b1fe467 16911 test -d "$tmp"
f73dda09
JA
16912} ||
16913{
b709b946
CR
16914 tmp=./conf$$-$RANDOM
16915 (umask 077 && mkdir "$tmp")
1b1fe467
CR
16916} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16917ac_tmp=$tmp
ccc6cda3 16918
dd4f3dd8
CR
16919# Set up the scripts for CONFIG_FILES section.
16920# No need to generate them if there are no CONFIG_FILES.
16921# This happens for instance with `./config.status config.h'.
b709b946
CR
16922if test -n "$CONFIG_FILES"; then
16923
b709b946 16924
1b1fe467
CR
16925ac_cr=`echo X | tr X '\015'`
16926# On cygwin, bash can eat \r inside `` if the user requested igncr.
16927# But we know of no other shell where ac_cr would be empty at this
16928# point, so we can use a bashism as a fallback.
16929if test "x$ac_cr" = x; then
16930 eval ac_cr=\$\'\\r\'
16931fi
dd4f3dd8
CR
16932ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16933if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16934 ac_cs_awk_cr='\\r'
16935else
16936 ac_cs_awk_cr=$ac_cr
b709b946
CR
16937fi
16938
1b1fe467 16939echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
b709b946
CR
16940_ACEOF
16941
16942
dd4f3dd8
CR
16943{
16944 echo "cat >conf$$subs.awk <<_ACEOF" &&
16945 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16946 echo "_ACEOF"
16947} >conf$$subs.sh ||
1b1fe467
CR
16948 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16949ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
b709b946
CR
16950ac_delim='%!_!# '
16951for ac_last_try in false false false false false :; do
dd4f3dd8 16952 . ./conf$$subs.sh ||
1b1fe467 16953 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
dd4f3dd8 16954
af98a2a6
CR
16955 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16956 if test $ac_delim_n = $ac_delim_num; then
b709b946
CR
16957 break
16958 elif $ac_last_try; then
1b1fe467 16959 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
b709b946
CR
16960 else
16961 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16962 fi
16963done
dd4f3dd8
CR
16964rm -f conf$$subs.sh
16965
16966cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1b1fe467 16967cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
dd4f3dd8
CR
16968_ACEOF
16969sed -n '
16970h
16971s/^/S["/; s/!.*/"]=/
16972p
16973g
16974s/^[^!]*!//
16975:repl
16976t repl
16977s/'"$ac_delim"'$//
16978t delim
16979:nl
16980h
1b1fe467 16981s/\(.\{148\}\)..*/\1/
dd4f3dd8
CR
16982t more1
16983s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16984p
16985n
16986b repl
16987:more1
16988s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16989p
16990g
16991s/.\{148\}//
16992t nl
16993:delim
16994h
1b1fe467 16995s/\(.\{148\}\)..*/\1/
dd4f3dd8
CR
16996t more2
16997s/["\\]/\\&/g; s/^/"/; s/$/"/
16998p
16999b
17000:more2
17001s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17002p
17003g
17004s/.\{148\}//
17005t delim
17006' <conf$$subs.awk | sed '
17007/^[^""]/{
17008 N
17009 s/\n//
17010}
17011' >>$CONFIG_STATUS || ac_write_fail=1
17012rm -f conf$$subs.awk
17013cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17014_ACAWK
1b1fe467 17015cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
dd4f3dd8
CR
17016 for (key in S) S_is_set[key] = 1
17017 FS = "\a"
17018
17019}
17020{
17021 line = $ 0
17022 nfields = split(line, field, "@")
17023 substed = 0
17024 len = length(field[1])
17025 for (i = 2; i < nfields; i++) {
17026 key = field[i]
17027 keylen = length(key)
17028 if (S_is_set[key]) {
17029 value = S[key]
17030 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17031 len += length(value) + length(field[++i])
17032 substed = 1
17033 } else
17034 len += 1 + keylen
17035 }
b709b946 17036
dd4f3dd8
CR
17037 print line
17038}
d3ad40de 17039
dd4f3dd8 17040_ACAWK
b709b946 17041_ACEOF
dd4f3dd8
CR
17042cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17043if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17044 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17045else
17046 cat
1b1fe467
CR
17047fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17048 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
a82a04b3 17049_ACEOF
b709b946 17050
1b1fe467
CR
17051# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17052# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
b709b946
CR
17053# trailing colons and then remove the whole line if VPATH becomes empty
17054# (actually we leave an empty line to preserve line numbers).
17055if test "x$srcdir" = x.; then
1b1fe467
CR
17056 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17057h
17058s///
17059s/^/:/
17060s/[ ]*$/:/
17061s/:\$(srcdir):/:/g
17062s/:\${srcdir}:/:/g
17063s/:@srcdir@:/:/g
17064s/^:*//
b709b946 17065s/:*$//
1b1fe467
CR
17066x
17067s/\(=[ ]*\).*/\1/
17068G
17069s/\n//
b709b946
CR
17070s/^[^=]*=[ ]*$//
17071}'
17072fi
17073
dd4f3dd8 17074cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b709b946
CR
17075fi # test -n "$CONFIG_FILES"
17076
dd4f3dd8
CR
17077# Set up the scripts for CONFIG_HEADERS section.
17078# No need to generate them if there are no CONFIG_HEADERS.
17079# This happens for instance with `./config.status Makefile'.
17080if test -n "$CONFIG_HEADERS"; then
1b1fe467 17081cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
dd4f3dd8
CR
17082BEGIN {
17083_ACEOF
17084
17085# Transform confdefs.h into an awk script `defines.awk', embedded as
17086# here-document in config.status, that substitutes the proper values into
17087# config.h.in to produce config.h.
17088
17089# Create a delimiter string that does not exist in confdefs.h, to ease
17090# handling of long lines.
17091ac_delim='%!_!# '
17092for ac_last_try in false false :; do
1b1fe467
CR
17093 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17094 if test -z "$ac_tt"; then
dd4f3dd8
CR
17095 break
17096 elif $ac_last_try; then
1b1fe467 17097 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
dd4f3dd8
CR
17098 else
17099 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17100 fi
17101done
17102
17103# For the awk script, D is an array of macro values keyed by name,
17104# likewise P contains macro parameters if any. Preserve backslash
17105# newline sequences.
17106
17107ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17108sed -n '
17109s/.\{148\}/&'"$ac_delim"'/g
17110t rset
17111:rset
17112s/^[ ]*#[ ]*define[ ][ ]*/ /
17113t def
17114d
17115:def
17116s/\\$//
17117t bsnl
17118s/["\\]/\\&/g
17119s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17120D["\1"]=" \3"/p
17121s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17122d
17123:bsnl
17124s/["\\]/\\&/g
17125s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17126D["\1"]=" \3\\\\\\n"\\/p
17127t cont
17128s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17129t cont
17130d
17131:cont
17132n
17133s/.\{148\}/&'"$ac_delim"'/g
17134t clear
17135:clear
17136s/\\$//
17137t bsnlc
17138s/["\\]/\\&/g; s/^/"/; s/$/"/p
17139d
17140:bsnlc
17141s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17142b cont
17143' <confdefs.h | sed '
17144s/'"$ac_delim"'/"\\\
17145"/g' >>$CONFIG_STATUS || ac_write_fail=1
17146
17147cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17148 for (key in D) D_is_set[key] = 1
17149 FS = "\a"
17150}
17151/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17152 line = \$ 0
17153 split(line, arg, " ")
17154 if (arg[1] == "#") {
17155 defundef = arg[2]
17156 mac1 = arg[3]
17157 } else {
17158 defundef = substr(arg[1], 2)
17159 mac1 = arg[2]
17160 }
17161 split(mac1, mac2, "(") #)
17162 macro = mac2[1]
af98a2a6 17163 prefix = substr(line, 1, index(line, defundef) - 1)
dd4f3dd8
CR
17164 if (D_is_set[macro]) {
17165 # Preserve the white space surrounding the "#".
dd4f3dd8
CR
17166 print prefix "define", macro P[macro] D[macro]
17167 next
17168 } else {
17169 # Replace #undef with comments. This is necessary, for example,
17170 # in the case of _POSIX_SOURCE, which is predefined and required
17171 # on some systems where configure will not decide to define it.
17172 if (defundef == "undef") {
af98a2a6 17173 print "/*", prefix defundef, macro, "*/"
dd4f3dd8
CR
17174 next
17175 }
17176 }
17177}
17178{ print }
17179_ACAWK
17180_ACEOF
17181cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1b1fe467 17182 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
dd4f3dd8
CR
17183fi # test -n "$CONFIG_HEADERS"
17184
b709b946 17185
dd4f3dd8
CR
17186eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
17187shift
17188for ac_tag
b709b946
CR
17189do
17190 case $ac_tag in
17191 :[FHLC]) ac_mode=$ac_tag; continue;;
9d6e5e30 17192 esac
b709b946
CR
17193 case $ac_mode$ac_tag in
17194 :[FHL]*:*);;
1b1fe467 17195 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
b709b946
CR
17196 :[FH]-) ac_tag=-:-;;
17197 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17198 esac
17199 ac_save_IFS=$IFS
17200 IFS=:
17201 set x $ac_tag
17202 IFS=$ac_save_IFS
17203 shift
17204 ac_file=$1
17205 shift
17206
17207 case $ac_mode in
17208 :L) ac_source=$1;;
17209 :[FH])
17210 ac_file_inputs=
17211 for ac_f
17212 do
17213 case $ac_f in
1b1fe467 17214 -) ac_f="$ac_tmp/stdin";;
b709b946
CR
17215 *) # Look for the file first in the build tree, then in the source tree
17216 # (if the path is not absolute). The absolute path cannot be DOS-style,
17217 # because $ac_f cannot contain `:'.
17218 test -f "$ac_f" ||
17219 case $ac_f in
17220 [\\/$]*) false;;
17221 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17222 esac ||
1b1fe467 17223 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
b709b946 17224 esac
dd4f3dd8 17225 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
1b1fe467 17226 as_fn_append ac_file_inputs " '$ac_f'"
b709b946 17227 done
9d6e5e30 17228
b709b946
CR
17229 # Let's still pretend it is `configure' which instantiates (i.e., don't
17230 # use $as_me), people would be surprised to read:
17231 # /* config.h. Generated by config.status. */
dd4f3dd8
CR
17232 configure_input='Generated from '`
17233 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17234 `' by configure.'
b709b946
CR
17235 if test x"$ac_file" != x-; then
17236 configure_input="$ac_file. $configure_input"
1b1fe467 17237 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
dd4f3dd8 17238$as_echo "$as_me: creating $ac_file" >&6;}
b709b946 17239 fi
dd4f3dd8
CR
17240 # Neutralize special characters interpreted by sed in replacement strings.
17241 case $configure_input in #(
17242 *\&* | *\|* | *\\* )
17243 ac_sed_conf_input=`$as_echo "$configure_input" |
17244 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17245 *) ac_sed_conf_input=$configure_input;;
17246 esac
b709b946
CR
17247
17248 case $ac_tag in
1b1fe467
CR
17249 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17250 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
b709b946
CR
17251 esac
17252 ;;
17253 esac
17254
17255 ac_dir=`$as_dirname -- "$ac_file" ||
a82a04b3 17256$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5e4a95c7
CR
17257 X"$ac_file" : 'X\(//\)[^/]' \| \
17258 X"$ac_file" : 'X\(//\)$' \| \
b709b946 17259 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
dd4f3dd8 17260$as_echo X"$ac_file" |
b709b946
CR
17261 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17262 s//\1/
17263 q
17264 }
17265 /^X\(\/\/\)[^/].*/{
17266 s//\1/
17267 q
17268 }
17269 /^X\(\/\/\)$/{
17270 s//\1/
17271 q
17272 }
17273 /^X\(\/\).*/{
17274 s//\1/
17275 q
17276 }
17277 s/.*/./; q'`
1b1fe467 17278 as_dir="$ac_dir"; as_fn_mkdir_p
a82a04b3
CR
17279 ac_builddir=.
17280
b709b946
CR
17281case "$ac_dir" in
17282.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17283*)
dd4f3dd8 17284 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
b709b946 17285 # A ".." for each directory in $ac_dir_suffix.
dd4f3dd8 17286 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
b709b946
CR
17287 case $ac_top_builddir_sub in
17288 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17289 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17290 esac ;;
17291esac
17292ac_abs_top_builddir=$ac_pwd
17293ac_abs_builddir=$ac_pwd$ac_dir_suffix
17294# for backward compatibility:
17295ac_top_builddir=$ac_top_build_prefix
a82a04b3
CR
17296
17297case $srcdir in
b709b946 17298 .) # We are building in place.
a82a04b3 17299 ac_srcdir=.
b709b946
CR
17300 ac_top_srcdir=$ac_top_builddir_sub
17301 ac_abs_top_srcdir=$ac_pwd ;;
17302 [\\/]* | ?:[\\/]* ) # Absolute name.
a82a04b3 17303 ac_srcdir=$srcdir$ac_dir_suffix;
b709b946
CR
17304 ac_top_srcdir=$srcdir
17305 ac_abs_top_srcdir=$srcdir ;;
17306 *) # Relative name.
17307 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17308 ac_top_srcdir=$ac_top_build_prefix$srcdir
17309 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
a82a04b3 17310esac
b709b946 17311ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
5e4a95c7 17312
a82a04b3 17313
b709b946
CR
17314 case $ac_mode in
17315 :F)
17316 #
17317 # CONFIG_FILE
17318 #
ccc6cda3 17319
f73dda09
JA
17320 case $INSTALL in
17321 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
b709b946 17322 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ccc6cda3 17323 esac
b709b946 17324_ACEOF
ccc6cda3 17325
dd4f3dd8 17326cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b709b946
CR
17327# If the template does not know about datarootdir, expand it.
17328# FIXME: This hack should be removed a few years after 2.60.
17329ac_datarootdir_hack=; ac_datarootdir_seen=
dd4f3dd8
CR
17330ac_sed_dataroot='
17331/datarootdir/ {
b709b946
CR
17332 p
17333 q
17334}
17335/@datadir@/p
17336/@docdir@/p
17337/@infodir@/p
17338/@localedir@/p
1b1fe467 17339/@mandir@/p'
dd4f3dd8 17340case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
b709b946
CR
17341*datarootdir*) ac_datarootdir_seen=yes;;
17342*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
1b1fe467 17343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
dd4f3dd8 17344$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
9d6e5e30 17345_ACEOF
dd4f3dd8 17346cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
b709b946
CR
17347 ac_datarootdir_hack='
17348 s&@datadir@&$datadir&g
17349 s&@docdir@&$docdir&g
17350 s&@infodir@&$infodir&g
17351 s&@localedir@&$localedir&g
17352 s&@mandir@&$mandir&g
1b1fe467 17353 s&\\\${datarootdir}&$datarootdir&g' ;;
b709b946
CR
17354esac
17355_ACEOF
17356
17357# Neutralize VPATH when `$srcdir' = `.'.
17358# Shell code in configure.ac might set extrasub.
17359# FIXME: do we really want to maintain this feature?
dd4f3dd8
CR
17360cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17361ac_sed_extra="$ac_vpsub
f73dda09 17362$extrasub
a82a04b3 17363_ACEOF
dd4f3dd8 17364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09
JA
17365:t
17366/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
dd4f3dd8 17367s|@configure_input@|$ac_sed_conf_input|;t t
b709b946 17368s&@top_builddir@&$ac_top_builddir_sub&;t t
dd4f3dd8 17369s&@top_build_prefix@&$ac_top_build_prefix&;t t
b709b946
CR
17370s&@srcdir@&$ac_srcdir&;t t
17371s&@abs_srcdir@&$ac_abs_srcdir&;t t
17372s&@top_srcdir@&$ac_top_srcdir&;t t
17373s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17374s&@builddir@&$ac_builddir&;t t
17375s&@abs_builddir@&$ac_abs_builddir&;t t
17376s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17377s&@INSTALL@&$ac_INSTALL&;t t
17378$ac_datarootdir_hack
dd4f3dd8 17379"
1b1fe467
CR
17380eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17381 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
b709b946
CR
17382
17383test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
1b1fe467
CR
17384 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17385 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17386 "$ac_tmp/out"`; test -z "$ac_out"; } &&
17387 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17388which seems to be undefined. Please make sure it is defined" >&5
dd4f3dd8 17389$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
1b1fe467 17390which seems to be undefined. Please make sure it is defined" >&2;}
b709b946 17391
1b1fe467 17392 rm -f "$ac_tmp/stdin"
f73dda09 17393 case $ac_file in
1b1fe467
CR
17394 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17395 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
dd4f3dd8 17396 esac \
1b1fe467 17397 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
b709b946
CR
17398 ;;
17399 :H)
17400 #
17401 # CONFIG_HEADER
17402 #
f73dda09 17403 if test x"$ac_file" != x-; then
dd4f3dd8
CR
17404 {
17405 $as_echo "/* $configure_input */" \
1b1fe467
CR
17406 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17407 } >"$ac_tmp/config.h" \
17408 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17409 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17410 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
dd4f3dd8 17411$as_echo "$as_me: $ac_file is unchanged" >&6;}
f73dda09 17412 else
dd4f3dd8 17413 rm -f "$ac_file"
1b1fe467
CR
17414 mv "$ac_tmp/config.h" "$ac_file" \
17415 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ccc6cda3 17416 fi
f73dda09 17417 else
dd4f3dd8 17418 $as_echo "/* $configure_input */" \
1b1fe467
CR
17419 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17420 || as_fn_error $? "could not create -" "$LINENO" 5
ccc6cda3 17421 fi
b709b946 17422 ;;
c184f645 17423
1b1fe467 17424 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
dd4f3dd8 17425$as_echo "$as_me: executing $ac_file commands" >&6;}
b709b946
CR
17426 ;;
17427 esac
a82a04b3 17428
ccc6cda3 17429
b709b946
CR
17430 case $ac_file$ac_mode in
17431 "default-1":C)
5e13499c
CR
17432 for ac_file in $CONFIG_FILES; do
17433 # Support "outfile[:infile[:infile...]]"
17434 case "$ac_file" in
17435 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17436 esac
17437 # PO directories have a Makefile.in generated from Makefile.in.in.
17438 case "$ac_file" in */Makefile.in)
17439 # Adjust a relative srcdir.
17440 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
17441 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
17442 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
17443 # In autoconf-2.13 it is called $ac_given_srcdir.
17444 # In autoconf-2.50 it is called $srcdir.
17445 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
17446 case "$ac_given_srcdir" in
17447 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
17448 /*) top_srcdir="$ac_given_srcdir" ;;
17449 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
17450 esac
17451 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
17452 rm -f "$ac_dir/POTFILES"
17453 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
17454 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
17455 POMAKEFILEDEPS="POTFILES.in"
17456 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
17457 # on $ac_dir but don't depend on user-specified configuration
17458 # parameters.
17459 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
17460 # The LINGUAS file contains the set of available languages.
17461 if test -n "$OBSOLETE_ALL_LINGUAS"; then
17462 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
17463 fi
17464 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
17465 # Hide the ALL_LINGUAS assigment from automake.
17466 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
17467 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
17468 else
17469 # The set of available languages was given in configure.in.
17470 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
17471 fi
17472 case "$ac_given_srcdir" in
17473 .) srcdirpre= ;;
17474 *) srcdirpre='$(srcdir)/' ;;
17475 esac
17476 POFILES=
17477 GMOFILES=
17478 UPDATEPOFILES=
17479 DUMMYPOFILES=
17480 for lang in $ALL_LINGUAS; do
17481 POFILES="$POFILES $srcdirpre$lang.po"
17482 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
17483 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
17484 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
17485 done
17486 # CATALOGS depends on both $ac_dir and the user's LINGUAS
17487 # environment variable.
17488 INST_LINGUAS=
17489 if test -n "$ALL_LINGUAS"; then
17490 for presentlang in $ALL_LINGUAS; do
17491 useit=no
17492 if test "%UNSET%" != "$LINGUAS"; then
17493 desiredlanguages="$LINGUAS"
17494 else
17495 desiredlanguages="$ALL_LINGUAS"
17496 fi
17497 for desiredlang in $desiredlanguages; do
17498 # Use the presentlang catalog if desiredlang is
17499 # a. equal to presentlang, or
17500 # b. a variant of presentlang (because in this case,
17501 # presentlang can be used as a fallback for messages
17502 # which are not translated in the desiredlang catalog).
17503 case "$desiredlang" in
17504 "$presentlang"*) useit=yes;;
17505 esac
17506 done
17507 if test $useit = yes; then
17508 INST_LINGUAS="$INST_LINGUAS $presentlang"
17509 fi
17510 done
17511 fi
17512 CATALOGS=
17513 if test -n "$INST_LINGUAS"; then
17514 for lang in $INST_LINGUAS; do
17515 CATALOGS="$CATALOGS $lang.gmo"
17516 done
17517 fi
17518 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
17519 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
17520 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
17521 if test -f "$f"; then
17522 case "$f" in
17523 *.orig | *.bak | *~) ;;
17524 *) cat "$f" >> "$ac_dir/Makefile" ;;
17525 esac
17526 fi
17527 done
17528 fi
17529 ;;
17530 esac
17531 done ;;
b709b946 17532 "default":C)
ccc6cda3
JA
17533# Makefile uses this timestamp file to record whether config.h is up to date.
17534echo timestamp > stamp-h
f73dda09 17535 ;;
b709b946 17536
f73dda09 17537 esac
b709b946 17538done # for ac_tag
ccc6cda3 17539
f73dda09 17540
1b1fe467 17541as_fn_exit 0
a82a04b3 17542_ACEOF
f73dda09
JA
17543ac_clean_files=$ac_clean_files_save
17544
dd4f3dd8 17545test $ac_write_fail = 0 ||
1b1fe467 17546 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
dd4f3dd8 17547
a82a04b3 17548
f73dda09
JA
17549# configure is writing to config.log, and then calls config.status.
17550# config.status does its own redirection, appending to config.log.
17551# Unfortunately, on DOS this fails, as config.log is still kept open
17552# by configure, so config.status won't be able to write to it; its
17553# output is simply discarded. So we exec the FD to /dev/null,
17554# effectively closing config.log, so it can be properly (re)opened and
17555# appended to by config.status. When coming back to configure, we
17556# need to make the FD available again.
17557if test "$no_create" != yes; then
17558 ac_cs_success=:
5e4a95c7
CR
17559 ac_config_status_args=
17560 test "$silent" = yes &&
17561 ac_config_status_args="$ac_config_status_args --quiet"
f73dda09 17562 exec 5>/dev/null
5e4a95c7 17563 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
f73dda09
JA
17564 exec 5>>config.log
17565 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17566 # would make configure fail if this is the last instruction.
1b1fe467 17567 $ac_cs_success || as_fn_exit 1
f73dda09 17568fi
dd4f3dd8 17569if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
1b1fe467 17570 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
af98a2a6 17571$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
dd4f3dd8 17572fi
bc7bed50 17573