]> git.ipfire.org Git - thirdparty/bash.git/blame - configure
Bash-5.0 patch 4: the wait builtin without arguments only waits for known children...
[thirdparty/bash.git] / configure
CommitLineData
ccc6cda3 1#! /bin/sh
d233b485 2# From configure.ac for Bash 5.0, version 5.005.
f73dda09 3# Guess values for system-dependent variables and create Makefiles.
d233b485 4# Generated by GNU Autoconf 2.69 for bash 5.0-release.
f73dda09
JA
5#
6# Report bugs to <bug-bash@gnu.org>.
7#
ac50fbac
CR
8#
9# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
10#
11#
f73dda09
JA
12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
ac50fbac
CR
14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
ccc6cda3 17
3185942a
JA
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
ac50fbac 20if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
b80f6443
JA
21 emulate sh
22 NULLCMD=:
3185942a 23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
0628567a
JA
24 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
3185942a
JA
26 setopt NO_GLOB_SUBST
27else
ac50fbac
CR
28 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
3185942a 33esac
3185942a
JA
34fi
35
36
3185942a
JA
37as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
ac50fbac
CR
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
3185942a
JA
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
ac50fbac 61 case $arg in #(
3185942a
JA
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
74
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
77 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
b80f6443
JA
82fi
83
0628567a 84
3185942a
JA
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
90IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
ac50fbac
CR
93as_myself=
94case $0 in #((
3185942a
JA
95 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
ac50fbac
CR
101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
3185942a
JA
103IFS=$as_save_IFS
104
105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ac50fbac 114 exit 1
3185942a
JA
115fi
116
ac50fbac
CR
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
3185942a 124done
0628567a
JA
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
3185942a
JA
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
0628567a 134
ac50fbac
CR
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-bash@gnu.org
271$0: about your system, including any error possibly output
272$0: before this message. Then install a modern shell, or
273$0: manually run the script under such a shell if you do
274$0: have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
360
361
362} # as_fn_mkdir_p
363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
411# script with STATUS, using 1 if that was 0.
412as_fn_error ()
413{
414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
418 fi
419 $as_echo "$as_me: error: $2" >&2
420 as_fn_exit $as_status
421} # as_fn_error
422
3185942a
JA
423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
0628567a
JA
425 as_expr=expr
426else
427 as_expr=false
428fi
429
3185942a 430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
0628567a
JA
431 as_basename=basename
432else
433 as_basename=false
434fi
b80f6443 435
ac50fbac
CR
436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
b80f6443 441
3185942a 442as_me=`$as_basename -- "$0" ||
b80f6443
JA
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
3185942a
JA
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
446$as_echo X/"$0" |
447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
b80f6443 460
ac50fbac
CR
461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
0628567a 467
ccc6cda3 468
ac50fbac
CR
469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
478 sed '
479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
483 N
484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
486 t loop
487 s/-\n.*//
488 ' >$as_me.lineno &&
489 chmod +x "$as_me.lineno" ||
490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
ccc6cda3 491
ac50fbac
CR
492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
500 # Exit status is that of the last command.
501 exit
3185942a 502}
ccc6cda3 503
ac50fbac
CR
504ECHO_C= ECHO_N= ECHO_T=
505case `echo -n x` in #(((((
506-n*)
507 case `echo 'xy\c'` in
508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
512 esac;;
513*)
514 ECHO_N='-n';;
515esac
3185942a 516
ac50fbac
CR
517rm -f conf$$ conf$$.exe conf$$.file
518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
3185942a 520else
ac50fbac
CR
521 rm -f conf$$.dir
522 mkdir conf$$.dir 2>/dev/null
3185942a 523fi
ac50fbac
CR
524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
530 # In both cases, we have to default to `cp -pR'.
531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
532 as_ln_s='cp -pR'
533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
536 as_ln_s='cp -pR'
537 fi
538else
539 as_ln_s='cp -pR'
3185942a 540fi
ac50fbac
CR
541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
3185942a 543
ac50fbac
CR
544if mkdir -p . 2>/dev/null; then
545 as_mkdir_p='mkdir -p "$as_dir"'
3185942a 546else
ac50fbac
CR
547 test -d ./-p && rmdir ./-p
548 as_mkdir_p=false
3185942a
JA
549fi
550
ac50fbac
CR
551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
3185942a 553
ac50fbac
CR
554# Sed expression to map a string onto a valid CPP name.
555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
3185942a 556
ac50fbac
CR
557# Sed expression to map a string onto a valid variable name.
558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
3185942a 559
3185942a 560
ac50fbac
CR
561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
3185942a 563
ac50fbac
CR
564# Name of the host.
565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
3185942a 568
ac50fbac
CR
569#
570# Initializations.
571#
572ac_default_prefix=/usr/local
573ac_clean_files=
574ac_config_libobj_dir=.
575LIBOBJS=
576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
f73dda09 580
b80f6443
JA
581# Identity of this package.
582PACKAGE_NAME='bash'
583PACKAGE_TARNAME='bash'
d233b485
CR
584PACKAGE_VERSION='5.0-release'
585PACKAGE_STRING='bash 5.0-release'
b80f6443 586PACKAGE_BUGREPORT='bug-bash@gnu.org'
ac50fbac 587PACKAGE_URL=''
b80f6443 588
f73dda09
JA
589ac_unique_file="shell.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
3185942a 593#ifdef HAVE_SYS_TYPES_H
f73dda09
JA
594# include <sys/types.h>
595#endif
3185942a 596#ifdef HAVE_SYS_STAT_H
f73dda09
JA
597# include <sys/stat.h>
598#endif
3185942a 599#ifdef STDC_HEADERS
f73dda09
JA
600# include <stdlib.h>
601# include <stddef.h>
602#else
3185942a 603# ifdef HAVE_STDLIB_H
f73dda09
JA
604# include <stdlib.h>
605# endif
606#endif
3185942a
JA
607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
f73dda09
JA
609# include <memory.h>
610# endif
611# include <string.h>
612#endif
3185942a 613#ifdef HAVE_STRINGS_H
f73dda09
JA
614# include <strings.h>
615#endif
3185942a 616#ifdef HAVE_INTTYPES_H
f73dda09 617# include <inttypes.h>
f73dda09 618#endif
3185942a
JA
619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
f73dda09
JA
623# include <unistd.h>
624#endif"
ccc6cda3 625
3185942a
JA
626ac_header_list=
627ac_func_list=
628ac_subst_vars='LTLIBOBJS
629LOCAL_DEFS
630LOCAL_LDFLAGS
631LOCAL_CFLAGS
632LOCAL_LIBS
633MALLOC_DEBUG
634DEBUG
635RELSTATUS
636BASHVERS
637ARFLAGS
a0c0a00f
CR
638headersdir
639loadablesdir
3185942a
JA
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
ac50fbac
CR
654PTHREAD_H_DEFINES_STRUCT_TIMESPEC
655SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
656TIME_H_DEFINES_STRUCT_TIMESPEC
3185942a
JA
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
ac50fbac 706LIBS_FOR_BUILD
3185942a 707STATIC_LD
3185942a
JA
708SIGNAMES_O
709SIGNAMES_H
710CROSS_COMPILE
711EGREP
712GREP
713CPP
714OBJEXT
715EXEEXT
716ac_ct_CC
717CPPFLAGS
718LDFLAGS
719CFLAGS
720CC
721HELPSTRINGS
ac50fbac 722HELPFILES_TARGET
3185942a
JA
723HELPINSTALL
724HELPDIRDEFINE
725HELPDIR
726MALLOC_DEP
727MALLOC_LDFLAGS
728MALLOC_LIBRARY
729MALLOC_LIB
730MALLOC_SRC
731MALLOC_TARGET
3185942a 732TESTSCRIPT
ac50fbac
CR
733CPPFLAGS_FOR_BUILD
734LDFLAGS_FOR_BUILD
735CFLAGS_FOR_BUILD
736CC_FOR_BUILD
3185942a 737DEBUGGER_START_FILE
3185942a
JA
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
ac50fbac 776PACKAGE_URL
3185942a
JA
777PACKAGE_BUGREPORT
778PACKAGE_STRING
779PACKAGE_VERSION
780PACKAGE_TARNAME
781PACKAGE_NAME
782PATH_SEPARATOR
783SHELL'
0628567a 784ac_subst_files=''
3185942a
JA
785ac_user_opts='
786enable_option_checking
3185942a
JA
787with_afs
788with_bash_malloc
789with_curses
790with_gnu_malloc
791with_installed_readline
3185942a
JA
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
d233b485 805enable_dev_fd_stat_broken
ac50fbac 806enable_direxpand_default
3185942a
JA
807enable_directory_stack
808enable_disabled_builtins
809enable_dparen_arithmetic
810enable_extended_glob
0001803f 811enable_extended_glob_default
a0c0a00f 812enable_function_import
ac50fbac 813enable_glob_asciiranges_default
3185942a
JA
814enable_help_builtin
815enable_history
816enable_job_control
817enable_multibyte
818enable_net_redirections
819enable_process_substitution
820enable_progcomp
821enable_prompt_string_decoding
822enable_readline
823enable_restricted
824enable_select
825enable_separate_helpfiles
826enable_single_help_strings
827enable_strict_posix_default
828enable_usg_echo_default
829enable_xpg_echo_default
830enable_mem_scramble
831enable_profiling
832enable_static_link
833enable_largefile
834enable_nls
835with_gnu_ld
836enable_rpath
837with_libiconv_prefix
838with_included_gettext
839with_libintl_prefix
840'
841 ac_precious_vars='build_alias
842host_alias
843target_alias
844DEBUGGER_START_FILE
ac50fbac
CR
845CC_FOR_BUILD
846CFLAGS_FOR_BUILD
847LDFLAGS_FOR_BUILD
848CPPFLAGS_FOR_BUILD
3185942a
JA
849CC
850CFLAGS
851LDFLAGS
852LIBS
853CPPFLAGS
854CPP
855YACC
856YFLAGS'
857
b80f6443 858
ccc6cda3 859# Initialize some variables set by options.
f73dda09
JA
860ac_init_help=
861ac_init_version=false
3185942a
JA
862ac_unrecognized_opts=
863ac_unrecognized_sep=
ccc6cda3
JA
864# The variables have the same names as the options, with
865# dashes changed to underlines.
f73dda09 866cache_file=/dev/null
ccc6cda3 867exec_prefix=NONE
ccc6cda3 868no_create=
ccc6cda3
JA
869no_recursion=
870prefix=NONE
871program_prefix=NONE
872program_suffix=NONE
873program_transform_name=s,x,x,
874silent=
875site=
876srcdir=
ccc6cda3
JA
877verbose=
878x_includes=NONE
879x_libraries=NONE
f73dda09
JA
880
881# Installation directory options.
882# These are left unexpanded so users can "make install exec_prefix=/foo"
883# and all the variables that are supposed to be based on exec_prefix
884# by default will actually change.
885# Use braces instead of parens because sh, perl, etc. also accept them.
3185942a 886# (The list follows the same order as the GNU Coding Standards.)
ccc6cda3
JA
887bindir='${exec_prefix}/bin'
888sbindir='${exec_prefix}/sbin'
889libexecdir='${exec_prefix}/libexec'
3185942a
JA
890datarootdir='${prefix}/share'
891datadir='${datarootdir}'
ccc6cda3
JA
892sysconfdir='${prefix}/etc'
893sharedstatedir='${prefix}/com'
894localstatedir='${prefix}/var'
ccc6cda3
JA
895includedir='${prefix}/include'
896oldincludedir='/usr/include'
3185942a
JA
897docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
898infodir='${datarootdir}/info'
899htmldir='${docdir}'
900dvidir='${docdir}'
901pdfdir='${docdir}'
902psdir='${docdir}'
903libdir='${exec_prefix}/lib'
904localedir='${datarootdir}/locale'
905mandir='${datarootdir}/man'
ccc6cda3 906
ccc6cda3 907ac_prev=
3185942a 908ac_dashdash=
ccc6cda3
JA
909for ac_option
910do
ccc6cda3
JA
911 # If the previous option needs an argument, assign it.
912 if test -n "$ac_prev"; then
3185942a 913 eval $ac_prev=\$ac_option
ccc6cda3
JA
914 ac_prev=
915 continue
916 fi
917
3185942a 918 case $ac_option in
ac50fbac
CR
919 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
920 *=) ac_optarg= ;;
921 *) ac_optarg=yes ;;
3185942a 922 esac
ccc6cda3
JA
923
924 # Accept the important Cygnus configure options, so we can diagnose typos.
925
3185942a
JA
926 case $ac_dashdash$ac_option in
927 --)
928 ac_dashdash=yes ;;
ccc6cda3
JA
929
930 -bindir | --bindir | --bindi | --bind | --bin | --bi)
931 ac_prev=bindir ;;
932 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
f73dda09 933 bindir=$ac_optarg ;;
ccc6cda3
JA
934
935 -build | --build | --buil | --bui | --bu)
f73dda09 936 ac_prev=build_alias ;;
ccc6cda3 937 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
f73dda09 938 build_alias=$ac_optarg ;;
ccc6cda3
JA
939
940 -cache-file | --cache-file | --cache-fil | --cache-fi \
941 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
942 ac_prev=cache_file ;;
943 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
944 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
f73dda09
JA
945 cache_file=$ac_optarg ;;
946
947 --config-cache | -C)
948 cache_file=config.cache ;;
ccc6cda3 949
3185942a 950 -datadir | --datadir | --datadi | --datad)
ccc6cda3 951 ac_prev=datadir ;;
3185942a 952 -datadir=* | --datadir=* | --datadi=* | --datad=*)
f73dda09 953 datadir=$ac_optarg ;;
ccc6cda3 954
3185942a
JA
955 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
956 | --dataroo | --dataro | --datar)
957 ac_prev=datarootdir ;;
958 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
959 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
960 datarootdir=$ac_optarg ;;
961
ccc6cda3 962 -disable-* | --disable-*)
3185942a 963 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ccc6cda3 964 # Reject names that are not valid shell variable names.
3185942a 965 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 966 as_fn_error $? "invalid feature name: $ac_useropt"
3185942a
JA
967 ac_useropt_orig=$ac_useropt
968 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969 case $ac_user_opts in
970 *"
971"enable_$ac_useropt"
972"*) ;;
973 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
974 ac_unrecognized_sep=', ';;
975 esac
976 eval enable_$ac_useropt=no ;;
977
978 -docdir | --docdir | --docdi | --doc | --do)
979 ac_prev=docdir ;;
980 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
981 docdir=$ac_optarg ;;
982
983 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
984 ac_prev=dvidir ;;
985 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
986 dvidir=$ac_optarg ;;
ccc6cda3
JA
987
988 -enable-* | --enable-*)
3185942a 989 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ccc6cda3 990 # Reject names that are not valid shell variable names.
3185942a 991 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 992 as_fn_error $? "invalid feature name: $ac_useropt"
3185942a
JA
993 ac_useropt_orig=$ac_useropt
994 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
995 case $ac_user_opts in
996 *"
997"enable_$ac_useropt"
998"*) ;;
999 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1000 ac_unrecognized_sep=', ';;
ccc6cda3 1001 esac
3185942a 1002 eval enable_$ac_useropt=\$ac_optarg ;;
ccc6cda3
JA
1003
1004 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1005 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1006 | --exec | --exe | --ex)
1007 ac_prev=exec_prefix ;;
1008 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1009 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1010 | --exec=* | --exe=* | --ex=*)
f73dda09 1011 exec_prefix=$ac_optarg ;;
ccc6cda3
JA
1012
1013 -gas | --gas | --ga | --g)
1014 # Obsolete; use --with-gas.
1015 with_gas=yes ;;
1016
f73dda09
JA
1017 -help | --help | --hel | --he | -h)
1018 ac_init_help=long ;;
1019 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1020 ac_init_help=recursive ;;
1021 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1022 ac_init_help=short ;;
ccc6cda3
JA
1023
1024 -host | --host | --hos | --ho)
f73dda09 1025 ac_prev=host_alias ;;
ccc6cda3 1026 -host=* | --host=* | --hos=* | --ho=*)
f73dda09 1027 host_alias=$ac_optarg ;;
ccc6cda3 1028
3185942a
JA
1029 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1030 ac_prev=htmldir ;;
1031 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1032 | --ht=*)
1033 htmldir=$ac_optarg ;;
1034
ccc6cda3
JA
1035 -includedir | --includedir | --includedi | --included | --include \
1036 | --includ | --inclu | --incl | --inc)
1037 ac_prev=includedir ;;
1038 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1039 | --includ=* | --inclu=* | --incl=* | --inc=*)
f73dda09 1040 includedir=$ac_optarg ;;
ccc6cda3
JA
1041
1042 -infodir | --infodir | --infodi | --infod | --info | --inf)
1043 ac_prev=infodir ;;
1044 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
f73dda09 1045 infodir=$ac_optarg ;;
ccc6cda3
JA
1046
1047 -libdir | --libdir | --libdi | --libd)
1048 ac_prev=libdir ;;
1049 -libdir=* | --libdir=* | --libdi=* | --libd=*)
f73dda09 1050 libdir=$ac_optarg ;;
ccc6cda3
JA
1051
1052 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1053 | --libexe | --libex | --libe)
1054 ac_prev=libexecdir ;;
1055 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1056 | --libexe=* | --libex=* | --libe=*)
f73dda09 1057 libexecdir=$ac_optarg ;;
ccc6cda3 1058
3185942a
JA
1059 -localedir | --localedir | --localedi | --localed | --locale)
1060 ac_prev=localedir ;;
1061 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1062 localedir=$ac_optarg ;;
1063
ccc6cda3 1064 -localstatedir | --localstatedir | --localstatedi | --localstated \
3185942a 1065 | --localstate | --localstat | --localsta | --localst | --locals)
ccc6cda3
JA
1066 ac_prev=localstatedir ;;
1067 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
3185942a 1068 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
f73dda09 1069 localstatedir=$ac_optarg ;;
ccc6cda3
JA
1070
1071 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1072 ac_prev=mandir ;;
1073 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
f73dda09 1074 mandir=$ac_optarg ;;
ccc6cda3
JA
1075
1076 -nfp | --nfp | --nf)
1077 # Obsolete; use --without-fp.
1078 with_fp=no ;;
1079
1080 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
b80f6443 1081 | --no-cr | --no-c | -n)
ccc6cda3
JA
1082 no_create=yes ;;
1083
1084 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1085 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1086 no_recursion=yes ;;
1087
1088 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1089 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1090 | --oldin | --oldi | --old | --ol | --o)
1091 ac_prev=oldincludedir ;;
1092 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1093 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1094 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
f73dda09 1095 oldincludedir=$ac_optarg ;;
ccc6cda3
JA
1096
1097 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1098 ac_prev=prefix ;;
1099 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
f73dda09 1100 prefix=$ac_optarg ;;
ccc6cda3
JA
1101
1102 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1103 | --program-pre | --program-pr | --program-p)
1104 ac_prev=program_prefix ;;
1105 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1106 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
f73dda09 1107 program_prefix=$ac_optarg ;;
ccc6cda3
JA
1108
1109 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1110 | --program-suf | --program-su | --program-s)
1111 ac_prev=program_suffix ;;
1112 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1113 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
f73dda09 1114 program_suffix=$ac_optarg ;;
ccc6cda3
JA
1115
1116 -program-transform-name | --program-transform-name \
1117 | --program-transform-nam | --program-transform-na \
1118 | --program-transform-n | --program-transform- \
1119 | --program-transform | --program-transfor \
1120 | --program-transfo | --program-transf \
1121 | --program-trans | --program-tran \
1122 | --progr-tra | --program-tr | --program-t)
1123 ac_prev=program_transform_name ;;
1124 -program-transform-name=* | --program-transform-name=* \
1125 | --program-transform-nam=* | --program-transform-na=* \
1126 | --program-transform-n=* | --program-transform-=* \
1127 | --program-transform=* | --program-transfor=* \
1128 | --program-transfo=* | --program-transf=* \
1129 | --program-trans=* | --program-tran=* \
1130 | --progr-tra=* | --program-tr=* | --program-t=*)
f73dda09 1131 program_transform_name=$ac_optarg ;;
ccc6cda3 1132
3185942a
JA
1133 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1134 ac_prev=pdfdir ;;
1135 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1136 pdfdir=$ac_optarg ;;
1137
1138 -psdir | --psdir | --psdi | --psd | --ps)
1139 ac_prev=psdir ;;
1140 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1141 psdir=$ac_optarg ;;
1142
ccc6cda3
JA
1143 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1144 | -silent | --silent | --silen | --sile | --sil)
1145 silent=yes ;;
1146
1147 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1148 ac_prev=sbindir ;;
1149 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1150 | --sbi=* | --sb=*)
f73dda09 1151 sbindir=$ac_optarg ;;
ccc6cda3
JA
1152
1153 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1154 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1155 | --sharedst | --shareds | --shared | --share | --shar \
1156 | --sha | --sh)
1157 ac_prev=sharedstatedir ;;
1158 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1159 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1160 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1161 | --sha=* | --sh=*)
f73dda09 1162 sharedstatedir=$ac_optarg ;;
ccc6cda3
JA
1163
1164 -site | --site | --sit)
1165 ac_prev=site ;;
1166 -site=* | --site=* | --sit=*)
f73dda09 1167 site=$ac_optarg ;;
ccc6cda3
JA
1168
1169 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1170 ac_prev=srcdir ;;
1171 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
f73dda09 1172 srcdir=$ac_optarg ;;
ccc6cda3
JA
1173
1174 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1175 | --syscon | --sysco | --sysc | --sys | --sy)
1176 ac_prev=sysconfdir ;;
1177 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1178 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
f73dda09 1179 sysconfdir=$ac_optarg ;;
ccc6cda3
JA
1180
1181 -target | --target | --targe | --targ | --tar | --ta | --t)
f73dda09 1182 ac_prev=target_alias ;;
ccc6cda3 1183 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
f73dda09 1184 target_alias=$ac_optarg ;;
ccc6cda3
JA
1185
1186 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1187 verbose=yes ;;
1188
f73dda09
JA
1189 -version | --version | --versio | --versi | --vers | -V)
1190 ac_init_version=: ;;
ccc6cda3
JA
1191
1192 -with-* | --with-*)
3185942a 1193 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ccc6cda3 1194 # Reject names that are not valid shell variable names.
3185942a 1195 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 1196 as_fn_error $? "invalid package name: $ac_useropt"
3185942a
JA
1197 ac_useropt_orig=$ac_useropt
1198 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199 case $ac_user_opts in
1200 *"
1201"with_$ac_useropt"
1202"*) ;;
1203 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1204 ac_unrecognized_sep=', ';;
ccc6cda3 1205 esac
3185942a 1206 eval with_$ac_useropt=\$ac_optarg ;;
ccc6cda3
JA
1207
1208 -without-* | --without-*)
3185942a 1209 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ccc6cda3 1210 # Reject names that are not valid shell variable names.
3185942a 1211 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 1212 as_fn_error $? "invalid package name: $ac_useropt"
3185942a
JA
1213 ac_useropt_orig=$ac_useropt
1214 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1215 case $ac_user_opts in
1216 *"
1217"with_$ac_useropt"
1218"*) ;;
1219 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1220 ac_unrecognized_sep=', ';;
1221 esac
1222 eval with_$ac_useropt=no ;;
ccc6cda3
JA
1223
1224 --x)
1225 # Obsolete; use --with-x.
1226 with_x=yes ;;
1227
1228 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1229 | --x-incl | --x-inc | --x-in | --x-i)
1230 ac_prev=x_includes ;;
1231 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1232 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
f73dda09 1233 x_includes=$ac_optarg ;;
ccc6cda3
JA
1234
1235 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1236 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1237 ac_prev=x_libraries ;;
1238 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1239 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
f73dda09 1240 x_libraries=$ac_optarg ;;
ccc6cda3 1241
ac50fbac
CR
1242 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1243Try \`$0 --help' for more information"
ccc6cda3
JA
1244 ;;
1245
f73dda09
JA
1246 *=*)
1247 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1248 # Reject names that are not valid shell variable names.
ac50fbac
CR
1249 case $ac_envvar in #(
1250 '' | [0-9]* | *[!_$as_cr_alnum]* )
1251 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1252 esac
3185942a 1253 eval $ac_envvar=\$ac_optarg
f73dda09
JA
1254 export $ac_envvar ;;
1255
ccc6cda3 1256 *)
f73dda09 1257 # FIXME: should be removed in autoconf 3.0.
3185942a 1258 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
f73dda09 1259 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
3185942a 1260 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
ac50fbac 1261 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
ccc6cda3
JA
1262 ;;
1263
1264 esac
1265done
1266
1267if test -n "$ac_prev"; then
f73dda09 1268 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
ac50fbac 1269 as_fn_error $? "missing argument to $ac_option"
ccc6cda3 1270fi
ccc6cda3 1271
3185942a
JA
1272if test -n "$ac_unrecognized_opts"; then
1273 case $enable_option_checking in
1274 no) ;;
ac50fbac 1275 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
3185942a 1276 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
f73dda09 1277 esac
3185942a 1278fi
ccc6cda3 1279
3185942a
JA
1280# Check all directory arguments for consistency.
1281for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1282 datadir sysconfdir sharedstatedir localstatedir includedir \
1283 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1284 libdir localedir mandir
ccc6cda3 1285do
3185942a
JA
1286 eval ac_val=\$$ac_var
1287 # Remove trailing slashes.
f73dda09 1288 case $ac_val in
3185942a
JA
1289 */ )
1290 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1291 eval $ac_var=\$ac_val;;
ccc6cda3 1292 esac
3185942a
JA
1293 # Be sure to have absolute directory names.
1294 case $ac_val in
1295 [\\/$]* | ?:[\\/]* ) continue;;
1296 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1297 esac
ac50fbac 1298 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
ccc6cda3
JA
1299done
1300
f73dda09
JA
1301# There might be people who depend on the old broken behavior: `$host'
1302# used to hold the argument of --host etc.
b80f6443 1303# FIXME: To remove some day.
f73dda09
JA
1304build=$build_alias
1305host=$host_alias
1306target=$target_alias
1307
b80f6443 1308# FIXME: To remove some day.
f73dda09
JA
1309if test "x$host_alias" != x; then
1310 if test "x$build_alias" = x; then
1311 cross_compiling=maybe
f73dda09
JA
1312 elif test "x$build_alias" != "x$host_alias"; then
1313 cross_compiling=yes
1314 fi
1315fi
ccc6cda3 1316
f73dda09
JA
1317ac_tool_prefix=
1318test -n "$host_alias" && ac_tool_prefix=$host_alias-
ccc6cda3 1319
f73dda09 1320test "$silent" = yes && exec 6>/dev/null
ccc6cda3 1321
b80f6443 1322
3185942a
JA
1323ac_pwd=`pwd` && test -n "$ac_pwd" &&
1324ac_ls_di=`ls -di .` &&
1325ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
ac50fbac 1326 as_fn_error $? "working directory cannot be determined"
3185942a 1327test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
ac50fbac 1328 as_fn_error $? "pwd does not report name of working directory"
3185942a
JA
1329
1330
ccc6cda3
JA
1331# Find the source files, if location was not specified.
1332if test -z "$srcdir"; then
1333 ac_srcdir_defaulted=yes
3185942a
JA
1334 # Try the directory containing this script, then the parent directory.
1335 ac_confdir=`$as_dirname -- "$as_myself" ||
1336$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1337 X"$as_myself" : 'X\(//\)[^/]' \| \
1338 X"$as_myself" : 'X\(//\)$' \| \
1339 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1340$as_echo X"$as_myself" |
1341 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\/\)[^/].*/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\).*/{
1354 s//\1/
1355 q
1356 }
1357 s/.*/./; q'`
ccc6cda3 1358 srcdir=$ac_confdir
3185942a 1359 if test ! -r "$srcdir/$ac_unique_file"; then
ccc6cda3
JA
1360 srcdir=..
1361 fi
1362else
1363 ac_srcdir_defaulted=no
1364fi
3185942a
JA
1365if test ! -r "$srcdir/$ac_unique_file"; then
1366 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
ac50fbac 1367 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
ccc6cda3 1368fi
3185942a
JA
1369ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1370ac_abs_confdir=`(
ac50fbac 1371 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
3185942a
JA
1372 pwd)`
1373# When building in place, set srcdir=.
1374if test "$ac_abs_confdir" = "$ac_pwd"; then
1375 srcdir=.
1376fi
1377# Remove unnecessary trailing slashes from srcdir.
1378# Double slashes in file names in object file debugging info
1379# mess up M-x gdb in Emacs.
1380case $srcdir in
1381*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1382esac
1383for ac_var in $ac_precious_vars; do
1384 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1385 eval ac_env_${ac_var}_value=\$${ac_var}
1386 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1388done
ccc6cda3 1389
f73dda09
JA
1390#
1391# Report the --help message.
1392#
1393if test "$ac_init_help" = "long"; then
1394 # Omit some internal or obsolete options to make the list less imposing.
1395 # This message is too long to be a string in the A/UX 3.1 sh.
b80f6443 1396 cat <<_ACEOF
d233b485 1397\`configure' configures bash 5.0-release to adapt to many kinds of systems.
ccc6cda3 1398
f73dda09 1399Usage: $0 [OPTION]... [VAR=VALUE]...
ccc6cda3 1400
f73dda09
JA
1401To assign environment variables (e.g., CC, CFLAGS...), specify them as
1402VAR=VALUE. See below for descriptions of some of the useful variables.
1403
1404Defaults for the options are specified in brackets.
ccc6cda3 1405
f73dda09
JA
1406Configuration:
1407 -h, --help display this help and exit
1408 --help=short display options specific to this package
1409 --help=recursive display the short help of all the included packages
1410 -V, --version display version information and exit
ac50fbac 1411 -q, --quiet, --silent do not print \`checking ...' messages
f73dda09
JA
1412 --cache-file=FILE cache test results in FILE [disabled]
1413 -C, --config-cache alias for \`--cache-file=config.cache'
1414 -n, --no-create do not create output files
1415 --srcdir=DIR find the sources in DIR [configure dir or \`..']
ccc6cda3 1416
f73dda09
JA
1417Installation directories:
1418 --prefix=PREFIX install architecture-independent files in PREFIX
3185942a 1419 [$ac_default_prefix]
f73dda09 1420 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
3185942a 1421 [PREFIX]
ccc6cda3 1422
f73dda09
JA
1423By default, \`make install' will install all the files in
1424\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1425an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1426for instance \`--prefix=\$HOME'.
ccc6cda3 1427
f73dda09 1428For better control, use the options below.
ccc6cda3 1429
f73dda09 1430Fine tuning of the installation directories:
3185942a
JA
1431 --bindir=DIR user executables [EPREFIX/bin]
1432 --sbindir=DIR system admin executables [EPREFIX/sbin]
1433 --libexecdir=DIR program executables [EPREFIX/libexec]
1434 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1435 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1436 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1437 --libdir=DIR object code libraries [EPREFIX/lib]
1438 --includedir=DIR C header files [PREFIX/include]
1439 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1440 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1441 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1442 --infodir=DIR info documentation [DATAROOTDIR/info]
1443 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1444 --mandir=DIR man documentation [DATAROOTDIR/man]
1445 --docdir=DIR documentation root [DATAROOTDIR/doc/bash]
1446 --htmldir=DIR html documentation [DOCDIR]
1447 --dvidir=DIR dvi documentation [DOCDIR]
1448 --pdfdir=DIR pdf documentation [DOCDIR]
1449 --psdir=DIR ps documentation [DOCDIR]
b80f6443 1450_ACEOF
f73dda09 1451
b80f6443 1452 cat <<\_ACEOF
f73dda09
JA
1453
1454System types:
1455 --build=BUILD configure for building on BUILD [guessed]
b80f6443
JA
1456 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1457_ACEOF
ccc6cda3 1458fi
ccc6cda3 1459
f73dda09
JA
1460if test -n "$ac_init_help"; then
1461 case $ac_init_help in
d233b485 1462 short | recursive ) echo "Configuration of bash 5.0-release:";;
f73dda09 1463 esac
b80f6443 1464 cat <<\_ACEOF
ccc6cda3 1465
f73dda09 1466Optional Features:
3185942a 1467 --disable-option-checking ignore unrecognized --enable/--with options
f73dda09
JA
1468 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1469 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
7117c2d2
JA
1470 --enable-minimal-config a minimal sh-like configuration
1471 --enable-alias enable shell aliases
1472 --enable-arith-for-command
1473 enable arithmetic for command
1474 --enable-array-variables
1475 include shell array variables
1476 --enable-bang-history turn on csh-style history substitution
1477 --enable-brace-expansion
1478 include brace expansion
3185942a
JA
1479 --enable-casemod-attributes
1480 include case-modifying variable attributes
1481 --enable-casemod-expansions
1482 include case-modifying word expansions
7117c2d2
JA
1483 --enable-command-timing enable the time reserved word and command timing
1484 --enable-cond-command enable the conditional command
3185942a 1485 --enable-cond-regexp enable extended regular expression matching in
b80f6443 1486 conditional commands
3185942a
JA
1487 --enable-coprocesses enable coprocess support and the coproc reserved
1488 word
b80f6443 1489 --enable-debugger enable support for bash debugger
d233b485
CR
1490 --enable-dev-fd-stat-broken
1491 enable this option if stat on /dev/fd/N and fstat on
1492 file descriptor N don't return the same results
ac50fbac
CR
1493 --enable-direxpand-default
1494 enable the direxpand shell option by default
7117c2d2
JA
1495 --enable-directory-stack
1496 enable builtins pushd/popd/dirs
1497 --enable-disabled-builtins
1498 allow disabled builtins to still be invoked
1499 --enable-dparen-arithmetic
1500 include ((...)) command
1501 --enable-extended-glob include ksh-style extended pattern matching
0001803f
CR
1502 --enable-extended-glob-default
1503 force extended pattern matching to be enabled by
1504 default
a0c0a00f
CR
1505 --enable-function-import
1506 allow bash to import exported function definitions
1507 by default
ac50fbac
CR
1508 --enable-glob-asciiranges-default
1509 force bracket range expressions in pattern matching
1510 to use the C locale by default
7117c2d2
JA
1511 --enable-help-builtin include the help builtin
1512 --enable-history turn on command history
1513 --enable-job-control enable job control features
b80f6443 1514 --enable-multibyte enable multibyte characters if OS supports them
7117c2d2
JA
1515 --enable-net-redirections
1516 enable /dev/tcp/host/port redirection
1517 --enable-process-substitution
1518 enable process substitution
1519 --enable-progcomp enable programmable completion and the complete
1520 builtin
1521 --enable-prompt-string-decoding
1522 turn on escape character decoding in prompts
1523 --enable-readline turn on command line editing
1524 --enable-restricted enable a restricted shell
1525 --enable-select include select command
1526 --enable-separate-helpfiles
1527 use external files for help builtin documentation
95732b49
JA
1528 --enable-single-help-strings
1529 store help documentation as a single string to ease
1530 translation
1531 --enable-strict-posix-default
1532 configure bash to be posix-conformant by default
7117c2d2
JA
1533 --enable-usg-echo-default
1534 a synonym for --enable-xpg-echo-default
1535 --enable-xpg-echo-default
1536 make the echo builtin expand escape sequences by
1537 default
1538 --enable-mem-scramble scramble memory on calls to malloc and free
1539 --enable-profiling allow profiling with gprof
1540 --enable-static-link link bash statically, for use as a root shell
f73dda09 1541 --disable-largefile omit support for large files
b80f6443
JA
1542 --disable-nls do not use Native Language Support
1543 --disable-rpath do not hardcode runtime library paths
f73dda09
JA
1544
1545Optional Packages:
1546 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1547 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
7117c2d2
JA
1548 --with-afs if you are running AFS
1549 --with-bash-malloc use the Bash version of malloc
1550 --with-curses use the curses library instead of the termcap
1551 library
1552 --with-gnu-malloc synonym for --with-bash-malloc
1553 --with-installed-readline
1554 use a version of the readline library that is
1555 already installed
b80f6443
JA
1556 --with-gnu-ld assume the C compiler uses GNU ld default=no
1557 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1558 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1559 --with-included-gettext use the GNU gettext library included here
1560 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1561 --without-libintl-prefix don't search for libintl in includedir and libdir
f73dda09
JA
1562
1563Some influential environment variables:
b80f6443
JA
1564 DEBUGGER_START_FILE
1565 location of bash debugger initialization file
ac50fbac
CR
1566 CC_FOR_BUILD
1567 C compiler used when compiling binaries used only at build time
1568 CFLAGS_FOR_BUILD
d233b485 1569 Compilation options (CFLAGS) used when compiling binaries used
ac50fbac
CR
1570 only at build time
1571 LDFLAGS_FOR_BUILD
1572 Linker options (LDFLAGS) used when compiling binaries used only
1573 at build time
1574 CPPFLAGS_FOR_BUILD
1575 C preprocessor options (CPPFLAGS) used when compiling binaries
1576 used only at build time
f73dda09
JA
1577 CC C compiler command
1578 CFLAGS C compiler flags
1579 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1580 nonstandard directory <lib dir>
3185942a 1581 LIBS libraries to pass to the linker, e.g. -l<library>
ac50fbac 1582 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
3185942a 1583 you have headers in a nonstandard directory <include dir>
f73dda09 1584 CPP C preprocessor
ac50fbac
CR
1585 YACC The `Yet Another Compiler Compiler' implementation to use.
1586 Defaults to the first program found out of: `bison -y', `byacc',
1587 `yacc'.
3185942a
JA
1588 YFLAGS The list of arguments that will be passed by default to $YACC.
1589 This script will default YFLAGS to the empty string to avoid a
1590 default value of `-d' given by some make applications.
f73dda09
JA
1591
1592Use these variables to override the choices made by `configure' or to help
1593it to find libraries and programs with nonstandard names/locations.
1594
1595Report bugs to <bug-bash@gnu.org>.
b80f6443 1596_ACEOF
3185942a 1597ac_status=$?
f73dda09
JA
1598fi
1599
1600if test "$ac_init_help" = "recursive"; then
1601 # If there are subdirs, report their specific --help.
b80f6443 1602 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
3185942a
JA
1603 test -d "$ac_dir" ||
1604 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1605 continue
b80f6443
JA
1606 ac_builddir=.
1607
3185942a
JA
1608case "$ac_dir" in
1609.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1610*)
1611 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1612 # A ".." for each directory in $ac_dir_suffix.
1613 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1614 case $ac_top_builddir_sub in
1615 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1616 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1617 esac ;;
1618esac
1619ac_abs_top_builddir=$ac_pwd
1620ac_abs_builddir=$ac_pwd$ac_dir_suffix
1621# for backward compatibility:
1622ac_top_builddir=$ac_top_build_prefix
ccc6cda3 1623
b80f6443 1624case $srcdir in
3185942a 1625 .) # We are building in place.
b80f6443 1626 ac_srcdir=.
3185942a
JA
1627 ac_top_srcdir=$ac_top_builddir_sub
1628 ac_abs_top_srcdir=$ac_pwd ;;
1629 [\\/]* | ?:[\\/]* ) # Absolute name.
b80f6443 1630 ac_srcdir=$srcdir$ac_dir_suffix;
3185942a
JA
1631 ac_top_srcdir=$srcdir
1632 ac_abs_top_srcdir=$srcdir ;;
1633 *) # Relative name.
1634 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1635 ac_top_srcdir=$ac_top_build_prefix$srcdir
1636 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
0628567a 1637esac
3185942a
JA
1638ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1639
1640 cd "$ac_dir" || { ac_status=$?; continue; }
1641 # Check for guested configure.
1642 if test -f "$ac_srcdir/configure.gnu"; then
1643 echo &&
1644 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1645 elif test -f "$ac_srcdir/configure"; then
1646 echo &&
1647 $SHELL "$ac_srcdir/configure" --help=recursive
f73dda09 1648 else
3185942a
JA
1649 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1650 fi || ac_status=$?
1651 cd "$ac_pwd" || { ac_status=$?; break; }
f73dda09
JA
1652 done
1653fi
ccc6cda3 1654
3185942a 1655test -n "$ac_init_help" && exit $ac_status
f73dda09 1656if $ac_init_version; then
b80f6443 1657 cat <<\_ACEOF
d233b485 1658bash configure 5.0-release
ac50fbac 1659generated by GNU Autoconf 2.69
ccc6cda3 1660
ac50fbac 1661Copyright (C) 2012 Free Software Foundation, Inc.
f73dda09
JA
1662This configure script is free software; the Free Software Foundation
1663gives unlimited permission to copy, distribute and modify it.
b80f6443 1664_ACEOF
3185942a 1665 exit
f73dda09 1666fi
ccc6cda3 1667
ac50fbac
CR
1668## ------------------------ ##
1669## Autoconf initialization. ##
1670## ------------------------ ##
bb70624e 1671
ac50fbac
CR
1672# ac_fn_c_try_compile LINENO
1673# --------------------------
1674# Try to compile conftest.$ac_ext, and return whether this succeeded.
1675ac_fn_c_try_compile ()
f73dda09 1676{
ac50fbac
CR
1677 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1678 rm -f conftest.$ac_objext
1679 if { { ac_try="$ac_compile"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_compile") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1694 test $ac_status = 0; } && {
1695 test -z "$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 } && test -s conftest.$ac_objext; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1702
ac50fbac
CR
1703 ac_retval=1
1704fi
1705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1706 as_fn_set_status $ac_retval
f73dda09 1707
ac50fbac 1708} # ac_fn_c_try_compile
f73dda09 1709
ac50fbac
CR
1710# ac_fn_c_try_link LINENO
1711# -----------------------
1712# Try to link conftest.$ac_ext, and return whether this succeeded.
1713ac_fn_c_try_link ()
1714{
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1716 rm -f conftest.$ac_objext conftest$ac_exeext
1717 if { { ac_try="$ac_link"
1718case "(($ac_try" in
1719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1720 *) ac_try_echo=$ac_try;;
1721esac
1722eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1723$as_echo "$ac_try_echo"; } >&5
1724 (eval "$ac_link") 2>conftest.err
1725 ac_status=$?
1726 if test -s conftest.err; then
1727 grep -v '^ *+' conftest.err >conftest.er1
1728 cat conftest.er1 >&5
1729 mv -f conftest.er1 conftest.err
1730 fi
1731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1732 test $ac_status = 0; } && {
1733 test -z "$ac_c_werror_flag" ||
1734 test ! -s conftest.err
1735 } && test -s conftest$ac_exeext && {
1736 test "$cross_compiling" = yes ||
1737 test -x conftest$ac_exeext
1738 }; then :
1739 ac_retval=0
1740else
1741 $as_echo "$as_me: failed program was:" >&5
1742sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1743
ac50fbac
CR
1744 ac_retval=1
1745fi
1746 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1747 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1748 # interfere with the next link command; also delete a directory that is
1749 # left behind by Apple's compiler. We do this before executing the actions.
1750 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1751 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1752 as_fn_set_status $ac_retval
b80f6443 1753
ac50fbac 1754} # ac_fn_c_try_link
b80f6443 1755
ac50fbac
CR
1756# ac_fn_c_try_cpp LINENO
1757# ----------------------
1758# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1759ac_fn_c_try_cpp ()
1760{
1761 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1762 if { { ac_try="$ac_cpp conftest.$ac_ext"
1763case "(($ac_try" in
1764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1765 *) ac_try_echo=$ac_try;;
1766esac
1767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1768$as_echo "$ac_try_echo"; } >&5
1769 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1770 ac_status=$?
1771 if test -s conftest.err; then
1772 grep -v '^ *+' conftest.err >conftest.er1
1773 cat conftest.er1 >&5
1774 mv -f conftest.er1 conftest.err
1775 fi
1776 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1777 test $ac_status = 0; } > conftest.i && {
1778 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1779 test ! -s conftest.err
1780 }; then :
1781 ac_retval=0
1782else
1783 $as_echo "$as_me: failed program was:" >&5
1784sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1785
ac50fbac
CR
1786 ac_retval=1
1787fi
1788 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1789 as_fn_set_status $ac_retval
b80f6443 1790
ac50fbac 1791} # ac_fn_c_try_cpp
b80f6443 1792
ac50fbac
CR
1793# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1794# -------------------------------------------------------
1795# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1796# the include files in INCLUDES and setting the cache variable VAR
1797# accordingly.
1798ac_fn_c_check_header_mongrel ()
1799{
1800 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1801 if eval \${$3+:} false; then :
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1803$as_echo_n "checking for $2... " >&6; }
1804if eval \${$3+:} false; then :
1805 $as_echo_n "(cached) " >&6
1806fi
1807eval ac_res=\$$3
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1809$as_echo "$ac_res" >&6; }
1810else
1811 # Is the header compilable?
1812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1813$as_echo_n "checking $2 usability... " >&6; }
1814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1815/* end confdefs.h. */
1816$4
1817#include <$2>
1818_ACEOF
1819if ac_fn_c_try_compile "$LINENO"; then :
1820 ac_header_compiler=yes
1821else
1822 ac_header_compiler=no
1823fi
1824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1826$as_echo "$ac_header_compiler" >&6; }
b80f6443 1827
ac50fbac
CR
1828# Is the header present?
1829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1830$as_echo_n "checking $2 presence... " >&6; }
1831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833#include <$2>
b80f6443 1834_ACEOF
ac50fbac
CR
1835if ac_fn_c_try_cpp "$LINENO"; then :
1836 ac_header_preproc=yes
1837else
1838 ac_header_preproc=no
1839fi
1840rm -f conftest.err conftest.i conftest.$ac_ext
1841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1842$as_echo "$ac_header_preproc" >&6; }
f73dda09 1843
ac50fbac
CR
1844# So? What about this header?
1845case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1846 yes:no: )
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1848$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1850$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1851 ;;
1852 no:yes:* )
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1854$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1856$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1858$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1860$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1862$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1863( $as_echo "## ------------------------------- ##
1864## Report this to bug-bash@gnu.org ##
1865## ------------------------------- ##"
1866 ) | sed "s/^/$as_me: WARNING: /" >&2
1867 ;;
1868esac
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1870$as_echo_n "checking for $2... " >&6; }
1871if eval \${$3+:} false; then :
1872 $as_echo_n "(cached) " >&6
1873else
1874 eval "$3=\$ac_header_compiler"
1875fi
1876eval ac_res=\$$3
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878$as_echo "$ac_res" >&6; }
1879fi
1880 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
f73dda09 1881
ac50fbac 1882} # ac_fn_c_check_header_mongrel
f73dda09 1883
ac50fbac
CR
1884# ac_fn_c_try_run LINENO
1885# ----------------------
1886# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1887# that executables *can* be run.
1888ac_fn_c_try_run ()
1889{
1890 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1891 if { { ac_try="$ac_link"
1892case "(($ac_try" in
1893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1894 *) ac_try_echo=$ac_try;;
1895esac
1896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1897$as_echo "$ac_try_echo"; } >&5
1898 (eval "$ac_link") 2>&5
1899 ac_status=$?
1900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1901 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1902 { { case "(($ac_try" in
1903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1904 *) ac_try_echo=$ac_try;;
1905esac
1906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1907$as_echo "$ac_try_echo"; } >&5
1908 (eval "$ac_try") 2>&5
1909 ac_status=$?
1910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1911 test $ac_status = 0; }; }; then :
1912 ac_retval=0
1913else
1914 $as_echo "$as_me: program exited with status $ac_status" >&5
1915 $as_echo "$as_me: failed program was:" >&5
1916sed 's/^/| /' conftest.$ac_ext >&5
0628567a 1917
ac50fbac
CR
1918 ac_retval=$ac_status
1919fi
1920 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1921 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1922 as_fn_set_status $ac_retval
0628567a 1923
ac50fbac 1924} # ac_fn_c_try_run
0628567a 1925
ac50fbac
CR
1926# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1927# -------------------------------------------------------
1928# Tests whether HEADER exists and can be compiled using the include files in
1929# INCLUDES, setting the cache variable VAR accordingly.
1930ac_fn_c_check_header_compile ()
1931{
1932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934$as_echo_n "checking for $2... " >&6; }
1935if eval \${$3+:} false; then :
1936 $as_echo_n "(cached) " >&6
1937else
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941#include <$2>
1942_ACEOF
1943if ac_fn_c_try_compile "$LINENO"; then :
1944 eval "$3=yes"
1945else
1946 eval "$3=no"
1947fi
1948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1949fi
1950eval ac_res=\$$3
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1952$as_echo "$ac_res" >&6; }
1953 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
0628567a 1954
ac50fbac 1955} # ac_fn_c_check_header_compile
f73dda09 1956
ac50fbac
CR
1957# ac_fn_c_check_func LINENO FUNC VAR
1958# ----------------------------------
1959# Tests whether FUNC exists, setting the cache variable VAR accordingly
1960ac_fn_c_check_func ()
1961{
1962 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1964$as_echo_n "checking for $2... " >&6; }
1965if eval \${$3+:} false; then :
1966 $as_echo_n "(cached) " >&6
1967else
1968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969/* end confdefs.h. */
1970/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1971 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1972#define $2 innocuous_$2
f73dda09 1973
ac50fbac
CR
1974/* System header to define __stub macros and hopefully few prototypes,
1975 which can conflict with char $2 (); below.
1976 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1977 <limits.h> exists even on freestanding compilers. */
b80f6443 1978
ac50fbac
CR
1979#ifdef __STDC__
1980# include <limits.h>
1981#else
1982# include <assert.h>
1983#endif
b80f6443 1984
ac50fbac 1985#undef $2
b80f6443 1986
ac50fbac
CR
1987/* Override any GCC internal prototype to avoid an error.
1988 Use char because int might match the return type of a GCC
1989 builtin and then its argument prototype would still apply. */
1990#ifdef __cplusplus
1991extern "C"
1992#endif
1993char $2 ();
1994/* The GNU C library defines this for functions which it implements
1995 to always fail with ENOSYS. Some functions are actually named
1996 something starting with __ and the normal name is an alias. */
1997#if defined __stub_$2 || defined __stub___$2
1998choke me
1999#endif
2000
2001int
2002main ()
2003{
2004return $2 ();
2005 ;
2006 return 0;
2007}
b80f6443 2008_ACEOF
ac50fbac
CR
2009if ac_fn_c_try_link "$LINENO"; then :
2010 eval "$3=yes"
2011else
2012 eval "$3=no"
2013fi
2014rm -f core conftest.err conftest.$ac_objext \
2015 conftest$ac_exeext conftest.$ac_ext
2016fi
2017eval ac_res=\$$3
2018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2019$as_echo "$ac_res" >&6; }
2020 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
b80f6443 2021
ac50fbac 2022} # ac_fn_c_check_func
b80f6443 2023
ac50fbac
CR
2024# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2025# -------------------------------------------
2026# Tests whether TYPE exists after having included INCLUDES, setting cache
2027# variable VAR accordingly.
2028ac_fn_c_check_type ()
2029{
2030 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2032$as_echo_n "checking for $2... " >&6; }
2033if eval \${$3+:} false; then :
2034 $as_echo_n "(cached) " >&6
2035else
2036 eval "$3=no"
2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038/* end confdefs.h. */
2039$4
2040int
2041main ()
2042{
2043if (sizeof ($2))
2044 return 0;
2045 ;
2046 return 0;
2047}
b80f6443 2048_ACEOF
ac50fbac
CR
2049if ac_fn_c_try_compile "$LINENO"; then :
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056if (sizeof (($2)))
2057 return 0;
2058 ;
2059 return 0;
2060}
b80f6443 2061_ACEOF
ac50fbac 2062if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 2063
3185942a 2064else
ac50fbac 2065 eval "$3=yes"
3185942a 2066fi
ac50fbac 2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 2068fi
ac50fbac 2069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 2070fi
ac50fbac
CR
2071eval ac_res=\$$3
2072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2073$as_echo "$ac_res" >&6; }
2074 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
f73dda09 2075
ac50fbac 2076} # ac_fn_c_check_type
b80f6443 2077
ac50fbac
CR
2078# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2079# ---------------------------------------------
2080# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2081# accordingly.
2082ac_fn_c_check_decl ()
2083{
2084 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2085 as_decl_name=`echo $2|sed 's/ *(.*//'`
2086 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2088$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2089if eval \${$3+:} false; then :
2090 $as_echo_n "(cached) " >&6
2091else
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098#ifndef $as_decl_name
2099#ifdef __cplusplus
2100 (void) $as_decl_use;
2101#else
2102 (void) $as_decl_name;
2103#endif
2104#endif
b80f6443 2105
ac50fbac
CR
2106 ;
2107 return 0;
2108}
2109_ACEOF
2110if ac_fn_c_try_compile "$LINENO"; then :
2111 eval "$3=yes"
2112else
2113 eval "$3=no"
2114fi
2115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116fi
2117eval ac_res=\$$3
2118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2119$as_echo "$ac_res" >&6; }
2120 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
b80f6443 2121
ac50fbac 2122} # ac_fn_c_check_decl
b80f6443 2123
ac50fbac
CR
2124# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2125# --------------------------------------------
2126# Tries to find the compile-time value of EXPR in a program that includes
2127# INCLUDES, setting VAR accordingly. Returns whether the value could be
2128# computed
2129ac_fn_c_compute_int ()
2130{
2131 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2132 if test "$cross_compiling" = yes; then
2133 # Depending upon the size, compute the lo and hi bounds.
2134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h. */
2136$4
2137int
2138main ()
2139{
2140static int test_array [1 - 2 * !(($2) >= 0)];
2141test_array [0] = 0;
2142return test_array [0];
b80f6443 2143
ac50fbac
CR
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_compile "$LINENO"; then :
2149 ac_lo=0 ac_mid=0
2150 while :; do
2151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152/* end confdefs.h. */
2153$4
2154int
2155main ()
2156{
2157static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2158test_array [0] = 0;
2159return test_array [0];
b80f6443 2160
ac50fbac
CR
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_compile "$LINENO"; then :
2166 ac_hi=$ac_mid; break
2167else
2168 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2169 if test $ac_lo -le $ac_mid; then
2170 ac_lo= ac_hi=
2171 break
2172 fi
2173 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2174fi
2175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176 done
2177else
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180$4
2181int
2182main ()
2183{
2184static int test_array [1 - 2 * !(($2) < 0)];
2185test_array [0] = 0;
2186return test_array [0];
b80f6443 2187
ac50fbac
CR
2188 ;
2189 return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_compile "$LINENO"; then :
2193 ac_hi=-1 ac_mid=-1
2194 while :; do
2195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196/* end confdefs.h. */
2197$4
2198int
2199main ()
2200{
2201static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2202test_array [0] = 0;
2203return test_array [0];
b80f6443 2204
ac50fbac
CR
2205 ;
2206 return 0;
2207}
2208_ACEOF
2209if ac_fn_c_try_compile "$LINENO"; then :
2210 ac_lo=$ac_mid; break
2211else
2212 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2213 if test $ac_mid -le $ac_hi; then
2214 ac_lo= ac_hi=
2215 break
2216 fi
2217 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2218fi
2219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2220 done
2221else
2222 ac_lo= ac_hi=
2223fi
2224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2225fi
2226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227# Binary search between lo and hi bounds.
2228while test "x$ac_lo" != "x$ac_hi"; do
2229 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2231/* end confdefs.h. */
2232$4
2233int
2234main ()
2235{
2236static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2237test_array [0] = 0;
2238return test_array [0];
b80f6443 2239
ac50fbac
CR
2240 ;
2241 return 0;
2242}
2243_ACEOF
2244if ac_fn_c_try_compile "$LINENO"; then :
2245 ac_hi=$ac_mid
2246else
2247 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2248fi
2249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2250done
2251case $ac_lo in #((
2252?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2253'') ac_retval=1 ;;
2254esac
2255 else
2256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257/* end confdefs.h. */
2258$4
2259static long int longval () { return $2; }
2260static unsigned long int ulongval () { return $2; }
2261#include <stdio.h>
2262#include <stdlib.h>
2263int
2264main ()
2265{
b80f6443 2266
ac50fbac
CR
2267 FILE *f = fopen ("conftest.val", "w");
2268 if (! f)
2269 return 1;
2270 if (($2) < 0)
2271 {
2272 long int i = longval ();
2273 if (i != ($2))
2274 return 1;
2275 fprintf (f, "%ld", i);
2276 }
2277 else
2278 {
2279 unsigned long int i = ulongval ();
2280 if (i != ($2))
2281 return 1;
2282 fprintf (f, "%lu", i);
2283 }
2284 /* Do not output a trailing newline, as this causes \r\n confusion
2285 on some platforms. */
2286 return ferror (f) || fclose (f) != 0;
b80f6443 2287
ac50fbac
CR
2288 ;
2289 return 0;
2290}
2291_ACEOF
2292if ac_fn_c_try_run "$LINENO"; then :
2293 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2294else
2295 ac_retval=1
2296fi
2297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2298 conftest.$ac_objext conftest.beam conftest.$ac_ext
2299rm -f conftest.val
b80f6443 2300
ac50fbac
CR
2301 fi
2302 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2303 as_fn_set_status $ac_retval
b80f6443 2304
ac50fbac 2305} # ac_fn_c_compute_int
b80f6443 2306
ac50fbac
CR
2307# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2308# ----------------------------------------------------
2309# Tries to find if the field MEMBER exists in type AGGR, after including
2310# INCLUDES, setting cache variable VAR accordingly.
2311ac_fn_c_check_member ()
2312{
2313 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2315$as_echo_n "checking for $2.$3... " >&6; }
2316if eval \${$4+:} false; then :
3185942a
JA
2317 $as_echo_n "(cached) " >&6
2318else
ac50fbac
CR
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h. */
2321$5
2322int
2323main ()
2324{
2325static $2 ac_aggr;
2326if (ac_aggr.$3)
2327return 0;
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332if ac_fn_c_try_compile "$LINENO"; then :
2333 eval "$4=yes"
3185942a 2334else
ac50fbac
CR
2335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336/* end confdefs.h. */
2337$5
2338int
2339main ()
2340{
2341static $2 ac_aggr;
2342if (sizeof ac_aggr.$3)
2343return 0;
2344 ;
2345 return 0;
2346}
2347_ACEOF
2348if ac_fn_c_try_compile "$LINENO"; then :
2349 eval "$4=yes"
3185942a 2350else
ac50fbac 2351 eval "$4=no"
3185942a 2352fi
ac50fbac 2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185942a 2354fi
ac50fbac 2355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185942a 2356fi
ac50fbac
CR
2357eval ac_res=\$$4
2358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2359$as_echo "$ac_res" >&6; }
2360 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
d166f048 2361
ac50fbac
CR
2362} # ac_fn_c_check_member
2363cat >config.log <<_ACEOF
2364This file contains any messages produced by compilers while
2365running configure, to aid debugging if configure makes a mistake.
3185942a 2366
d233b485 2367It was created by bash $as_me 5.0-release, which was
ac50fbac 2368generated by GNU Autoconf 2.69. Invocation command line was
3185942a 2369
ac50fbac 2370 $ $0 $@
d166f048 2371
ac50fbac
CR
2372_ACEOF
2373exec 5>>config.log
2374{
2375cat <<_ASUNAME
2376## --------- ##
2377## Platform. ##
2378## --------- ##
3185942a 2379
ac50fbac
CR
2380hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2381uname -m = `(uname -m) 2>/dev/null || echo unknown`
2382uname -r = `(uname -r) 2>/dev/null || echo unknown`
2383uname -s = `(uname -s) 2>/dev/null || echo unknown`
2384uname -v = `(uname -v) 2>/dev/null || echo unknown`
3185942a 2385
ac50fbac
CR
2386/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2387/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
ccc6cda3 2388
ac50fbac
CR
2389/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2390/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2391/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2392/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2393/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2394/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2395/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
f73dda09 2396
ac50fbac 2397_ASUNAME
f73dda09 2398
ac50fbac
CR
2399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2400for as_dir in $PATH
2401do
2402 IFS=$as_save_IFS
2403 test -z "$as_dir" && as_dir=.
2404 $as_echo "PATH: $as_dir"
2405 done
2406IFS=$as_save_IFS
bb70624e 2407
ac50fbac 2408} >&5
ccc6cda3 2409
ac50fbac 2410cat >&5 <<_ACEOF
7117c2d2 2411
ccc6cda3 2412
ac50fbac
CR
2413## ----------- ##
2414## Core tests. ##
2415## ----------- ##
d166f048 2416
b80f6443 2417_ACEOF
ccc6cda3 2418
d166f048 2419
ac50fbac
CR
2420# Keep a trace of the command line.
2421# Strip out --no-create and --no-recursion so they do not pile up.
2422# Strip out --silent because we don't want to record it for future runs.
2423# Also quote any args containing shell meta-characters.
2424# Make two passes to allow for proper duplicate-argument suppression.
2425ac_configure_args=
2426ac_configure_args0=
2427ac_configure_args1=
2428ac_must_keep_next=false
2429for ac_pass in 1 2
2430do
2431 for ac_arg
2432 do
2433 case $ac_arg in
2434 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2435 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2436 | -silent | --silent | --silen | --sile | --sil)
2437 continue ;;
2438 *\'*)
2439 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2440 esac
2441 case $ac_pass in
2442 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2443 2)
2444 as_fn_append ac_configure_args1 " '$ac_arg'"
2445 if test $ac_must_keep_next = true; then
2446 ac_must_keep_next=false # Got value, back to normal.
2447 else
2448 case $ac_arg in
2449 *=* | --config-cache | -C | -disable-* | --disable-* \
2450 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2451 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2452 | -with-* | --with-* | -without-* | --without-* | --x)
2453 case "$ac_configure_args0 " in
2454 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2455 esac
2456 ;;
2457 -* ) ac_must_keep_next=true ;;
2458 esac
2459 fi
2460 as_fn_append ac_configure_args " '$ac_arg'"
2461 ;;
2462 esac
2463 done
2464done
2465{ ac_configure_args0=; unset ac_configure_args0;}
2466{ ac_configure_args1=; unset ac_configure_args1;}
b80f6443 2467
ac50fbac
CR
2468# When interrupted or exit'd, cleanup temporary files, and complete
2469# config.log. We remove comments because anyway the quotes in there
2470# would cause problems or look ugly.
2471# WARNING: Use '\'' to represent an apostrophe within the trap.
2472# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2473trap 'exit_status=$?
2474 # Save into config.log some information that might help in debugging.
2475 {
2476 echo
ccc6cda3 2477
ac50fbac
CR
2478 $as_echo "## ---------------- ##
2479## Cache variables. ##
2480## ---------------- ##"
2481 echo
2482 # The following way of writing the cache mishandles newlines in values,
2483(
2484 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2485 eval ac_val=\$$ac_var
2486 case $ac_val in #(
2487 *${as_nl}*)
2488 case $ac_var in #(
2489 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2490$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2491 esac
2492 case $ac_var in #(
2493 _ | IFS | as_nl) ;; #(
2494 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2495 *) { eval $ac_var=; unset $ac_var;} ;;
2496 esac ;;
2497 esac
2498 done
2499 (set) 2>&1 |
2500 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2501 *${as_nl}ac_space=\ *)
2502 sed -n \
2503 "s/'\''/'\''\\\\'\'''\''/g;
2504 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2505 ;; #(
2506 *)
2507 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2508 ;;
2509 esac |
2510 sort
2511)
2512 echo
cce855bc 2513
ac50fbac
CR
2514 $as_echo "## ----------------- ##
2515## Output variables. ##
2516## ----------------- ##"
2517 echo
2518 for ac_var in $ac_subst_vars
2519 do
2520 eval ac_val=\$$ac_var
2521 case $ac_val in
2522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2523 esac
2524 $as_echo "$ac_var='\''$ac_val'\''"
2525 done | sort
2526 echo
ccc6cda3 2527
ac50fbac
CR
2528 if test -n "$ac_subst_files"; then
2529 $as_echo "## ------------------- ##
2530## File substitutions. ##
2531## ------------------- ##"
2532 echo
2533 for ac_var in $ac_subst_files
2534 do
2535 eval ac_val=\$$ac_var
2536 case $ac_val in
2537 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2538 esac
2539 $as_echo "$ac_var='\''$ac_val'\''"
2540 done | sort
2541 echo
2542 fi
3185942a 2543
ac50fbac
CR
2544 if test -s confdefs.h; then
2545 $as_echo "## ----------- ##
2546## confdefs.h. ##
2547## ----------- ##"
2548 echo
2549 cat confdefs.h
2550 echo
2551 fi
2552 test "$ac_signal" != 0 &&
2553 $as_echo "$as_me: caught signal $ac_signal"
2554 $as_echo "$as_me: exit $exit_status"
2555 } >&5
2556 rm -f core *.core core.conftest.* &&
2557 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2558 exit $exit_status
2559' 0
2560for ac_signal in 1 2 13 15; do
2561 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2562done
2563ac_signal=0
ccc6cda3 2564
ac50fbac
CR
2565# confdefs.h avoids OS command line length limits that DEFS can exceed.
2566rm -f -r conftest* confdefs.h
ccc6cda3 2567
ac50fbac 2568$as_echo "/* confdefs.h */" > confdefs.h
3185942a 2569
ac50fbac 2570# Predefined preprocessor variables.
3185942a 2571
ac50fbac
CR
2572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_NAME "$PACKAGE_NAME"
2574_ACEOF
3185942a 2575
ac50fbac
CR
2576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2578_ACEOF
3185942a 2579
ac50fbac
CR
2580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_VERSION "$PACKAGE_VERSION"
2582_ACEOF
3185942a 2583
ac50fbac
CR
2584cat >>confdefs.h <<_ACEOF
2585#define PACKAGE_STRING "$PACKAGE_STRING"
2586_ACEOF
3185942a 2587
ac50fbac
CR
2588cat >>confdefs.h <<_ACEOF
2589#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2590_ACEOF
3185942a 2591
ac50fbac
CR
2592cat >>confdefs.h <<_ACEOF
2593#define PACKAGE_URL "$PACKAGE_URL"
2594_ACEOF
3185942a 2595
3185942a 2596
ac50fbac
CR
2597# Let the site file select an alternate cache file if it wants to.
2598# Prefer an explicitly selected file to automatically selected ones.
2599ac_site_file1=NONE
2600ac_site_file2=NONE
2601if test -n "$CONFIG_SITE"; then
2602 # We do not want a PATH search for config.site.
2603 case $CONFIG_SITE in #((
2604 -*) ac_site_file1=./$CONFIG_SITE;;
2605 */*) ac_site_file1=$CONFIG_SITE;;
2606 *) ac_site_file1=./$CONFIG_SITE;;
2607 esac
2608elif test "x$prefix" != xNONE; then
2609 ac_site_file1=$prefix/share/config.site
2610 ac_site_file2=$prefix/etc/config.site
2611else
2612 ac_site_file1=$ac_default_prefix/share/config.site
2613 ac_site_file2=$ac_default_prefix/etc/config.site
3185942a 2614fi
ac50fbac
CR
2615for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2616do
2617 test "x$ac_site_file" = xNONE && continue
2618 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2620$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2621 sed 's/^/| /' "$ac_site_file" >&5
2622 . "$ac_site_file" \
2623 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2625as_fn_error $? "failed to load site script $ac_site_file
2626See \`config.log' for more details" "$LINENO" 5; }
2627 fi
2628done
3185942a 2629
ac50fbac
CR
2630if test -r "$cache_file"; then
2631 # Some versions of bash will fail to source /dev/null (special files
2632 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2633 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2635$as_echo "$as_me: loading cache $cache_file" >&6;}
2636 case $cache_file in
2637 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2638 *) . "./$cache_file";;
2639 esac
2640 fi
2641else
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2643$as_echo "$as_me: creating cache $cache_file" >&6;}
2644 >$cache_file
3185942a
JA
2645fi
2646
ac50fbac
CR
2647as_fn_append ac_header_list " stdlib.h"
2648as_fn_append ac_header_list " unistd.h"
2649as_fn_append ac_header_list " sys/param.h"
2650as_fn_append ac_header_list " sys/time.h"
2651as_fn_append ac_func_list " alarm"
d233b485 2652as_fn_append ac_func_list " sbrk"
ac50fbac
CR
2653as_fn_append ac_func_list " fpurge"
2654as_fn_append ac_func_list " __fpurge"
2655as_fn_append ac_func_list " snprintf"
2656as_fn_append ac_func_list " vsnprintf"
2657# Check that the precious variables saved in the cache have kept the same
2658# value.
2659ac_cache_corrupted=false
2660for ac_var in $ac_precious_vars; do
2661 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2662 eval ac_new_set=\$ac_env_${ac_var}_set
2663 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2664 eval ac_new_val=\$ac_env_${ac_var}_value
2665 case $ac_old_set,$ac_new_set in
2666 set,)
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2668$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2669 ac_cache_corrupted=: ;;
2670 ,set)
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2672$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2673 ac_cache_corrupted=: ;;
2674 ,);;
2675 *)
2676 if test "x$ac_old_val" != "x$ac_new_val"; then
2677 # differences in whitespace do not lead to failure.
2678 ac_old_val_w=`echo x $ac_old_val`
2679 ac_new_val_w=`echo x $ac_new_val`
2680 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2682$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2683 ac_cache_corrupted=:
2684 else
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2686$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2687 eval $ac_var=\$ac_old_val
2688 fi
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2690$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2692$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2693 fi;;
2694 esac
2695 # Pass precious variables to config.status.
2696 if test "$ac_new_set" = set; then
2697 case $ac_new_val in
2698 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2699 *) ac_arg=$ac_var=$ac_new_val ;;
2700 esac
2701 case " $ac_configure_args " in
2702 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2703 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2704 esac
2705 fi
2706done
2707if $ac_cache_corrupted; then
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2711$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2712 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3185942a 2713fi
ac50fbac
CR
2714## -------------------- ##
2715## Main body of script. ##
2716## -------------------- ##
3185942a 2717
ac50fbac
CR
2718ac_ext=c
2719ac_cpp='$CPP $CPPFLAGS'
2720ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2721ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2722ac_compiler_gnu=$ac_cv_c_compiler_gnu
3185942a 2723
3185942a 2724
3185942a 2725
0001803f 2726
3185942a 2727
3185942a 2728
ac50fbac
CR
2729ac_aux_dir=
2730for ac_dir in ./support "$srcdir"/./support; do
2731 if test -f "$ac_dir/install-sh"; then
2732 ac_aux_dir=$ac_dir
2733 ac_install_sh="$ac_aux_dir/install-sh -c"
2734 break
2735 elif test -f "$ac_dir/install.sh"; then
2736 ac_aux_dir=$ac_dir
2737 ac_install_sh="$ac_aux_dir/install.sh -c"
2738 break
2739 elif test -f "$ac_dir/shtool"; then
2740 ac_aux_dir=$ac_dir
2741 ac_install_sh="$ac_aux_dir/shtool install -c"
2742 break
2743 fi
2744done
2745if test -z "$ac_aux_dir"; then
2746 as_fn_error $? "cannot find install-sh, install.sh, or shtool in ./support \"$srcdir\"/./support" "$LINENO" 5
3185942a
JA
2747fi
2748
ac50fbac
CR
2749# These three variables are undocumented and unsupported,
2750# and are intended to be withdrawn in a future Autoconf release.
2751# They can cause serious problems if a builder's source tree is in a directory
2752# whose full name contains unusual characters.
2753ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2754ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2755ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3185942a 2756
3185942a 2757
ac50fbac 2758ac_config_headers="$ac_config_headers config.h"
3185942a 2759
3185942a 2760
d233b485 2761BASHVERS=5.0
ac50fbac 2762RELSTATUS=release
3185942a 2763
ac50fbac 2764case "$RELSTATUS" in
a0c0a00f 2765alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
ac50fbac
CR
2766*) DEBUG= MALLOC_DEBUG= ;;
2767esac
3185942a 2768
ac50fbac
CR
2769# Make sure we can run config.sub.
2770$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2771 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3185942a 2772
ac50fbac
CR
2773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2774$as_echo_n "checking build system type... " >&6; }
2775if ${ac_cv_build+:} false; then :
2776 $as_echo_n "(cached) " >&6
2777else
2778 ac_build_alias=$build_alias
2779test "x$ac_build_alias" = x &&
2780 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2781test "x$ac_build_alias" = x &&
2782 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2783ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2784 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3185942a 2785
3185942a 2786fi
ac50fbac
CR
2787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2788$as_echo "$ac_cv_build" >&6; }
2789case $ac_cv_build in
2790*-*-*) ;;
2791*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2792esac
2793build=$ac_cv_build
2794ac_save_IFS=$IFS; IFS='-'
2795set x $ac_cv_build
2796shift
2797build_cpu=$1
2798build_vendor=$2
2799shift; shift
2800# Remember, the first character of IFS is used to create $*,
2801# except with old shells:
2802build_os=$*
2803IFS=$ac_save_IFS
2804case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3185942a 2805
3185942a 2806
ac50fbac
CR
2807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2808$as_echo_n "checking host system type... " >&6; }
2809if ${ac_cv_host+:} false; then :
2810 $as_echo_n "(cached) " >&6
2811else
2812 if test "x$host_alias" = x; then
2813 ac_cv_host=$ac_cv_build
2814else
2815 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2816 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3185942a
JA
2817fi
2818
3185942a 2819fi
ac50fbac
CR
2820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2821$as_echo "$ac_cv_host" >&6; }
2822case $ac_cv_host in
2823*-*-*) ;;
2824*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2825esac
2826host=$ac_cv_host
2827ac_save_IFS=$IFS; IFS='-'
2828set x $ac_cv_host
2829shift
2830host_cpu=$1
2831host_vendor=$2
2832shift; shift
2833# Remember, the first character of IFS is used to create $*,
2834# except with old shells:
2835host_os=$*
2836IFS=$ac_save_IFS
2837case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3185942a 2838
ccc6cda3 2839
3185942a 2840
3185942a 2841
ac50fbac 2842opt_bash_malloc=yes
ac50fbac
CR
2843opt_afs=no
2844opt_curses=no
2845opt_with_installed_readline=no
3185942a 2846
ac50fbac 2847#htmldir=
3185942a 2848
ac50fbac 2849case "${host_cpu}-${host_os}" in
d233b485 2850# mostly obsolete platforms
ac50fbac
CR
2851alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux
2852*[Cc]ray*-*) opt_bash_malloc=no ;; # Crays
2853*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines
d233b485 2854*-dgux*) opt_bash_malloc=no ;; # DG/UX machines
ac50fbac 2855sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2
ac50fbac 2856m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
d233b485
CR
2857*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
2858*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
2859*-beos*) opt_bash_malloc=no ;; # they say it's suitable
2860# These need additional investigation
ac50fbac 2861sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
ac50fbac 2862*-aix*) opt_bash_malloc=no ;; # AIX machines
d233b485
CR
2863*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
2864# Mach-derived systems have a ton of extra malloc functions and lack sbrk(2)
ac50fbac
CR
2865*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
2866*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep
2867*-macos*) opt_bash_malloc=no ;; # Apple MacOS X
2868*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X)
2869*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X)
ac50fbac 2870*-machten4) opt_bash_malloc=no ;; # MachTen 4.x
d233b485
CR
2871# Niche or non-mainstream-shell-user systems
2872*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x
ac50fbac
CR
2873*-nsk*) opt_bash_malloc=no ;; # HP NonStop
2874*-haiku*) opt_bash_malloc=no ;; # Haiku OS
d233b485
CR
2875# Deprecated -- bash malloc is suitable
2876#sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
2877#mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
2878#*-freebsd*-gnu) opt_bash_malloc=no ;; # there's some undetermined problem here
2879#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree
2880#*-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
2881#*-mirbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
ac50fbac 2882esac
b72432fd 2883
ac50fbac
CR
2884# memory scrambling on free()
2885case "${host_os}" in
2886sco3.2v5*|sco3.2v4*) opt_memscramble=no ;;
2887*) opt_memscramble=yes ;;
2888esac
b80f6443
JA
2889
2890
ccc6cda3 2891
ccc6cda3 2892
ac50fbac
CR
2893# Check whether --with-afs was given.
2894if test "${with_afs+set}" = set; then :
2895 withval=$with_afs; opt_afs=$withval
ccc6cda3 2896fi
ccc6cda3 2897
ccc6cda3 2898
ac50fbac
CR
2899# Check whether --with-bash-malloc was given.
2900if test "${with_bash_malloc+set}" = set; then :
2901 withval=$with_bash_malloc; opt_bash_malloc=$withval
ccc6cda3 2902fi
ccc6cda3 2903
ccc6cda3 2904
ac50fbac
CR
2905# Check whether --with-curses was given.
2906if test "${with_curses+set}" = set; then :
2907 withval=$with_curses; opt_curses=$withval
ccc6cda3 2908fi
ccc6cda3 2909
ac50fbac
CR
2910
2911# Check whether --with-gnu-malloc was given.
2912if test "${with_gnu_malloc+set}" = set; then :
2913 withval=$with_gnu_malloc; opt_bash_malloc=$withval
ccc6cda3 2914fi
ccc6cda3 2915
ac50fbac
CR
2916
2917# Check whether --with-installed-readline was given.
2918if test "${with_installed_readline+set}" = set; then :
2919 withval=$with_installed_readline; opt_with_installed_readline=$withval
ccc6cda3 2920fi
ccc6cda3 2921
ac50fbac 2922
ac50fbac
CR
2923if test "$opt_bash_malloc" = yes; then
2924 MALLOC_TARGET=malloc
2925 MALLOC_SRC=malloc.c
2926
2927 MALLOC_LIB='-lmalloc'
2928 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
2929 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
2930 MALLOC_DEP='$(MALLOC_LIBRARY)'
2931
2932 $as_echo "#define USING_BASH_MALLOC 1" >>confdefs.h
2933
2934else
2935 MALLOC_LIB=
2936 MALLOC_LIBRARY=
2937 MALLOC_LDFLAGS=
2938 MALLOC_DEP=
ccc6cda3 2939fi
ccc6cda3 2940
ac50fbac
CR
2941if test "$opt_afs" = yes; then
2942 $as_echo "#define AFS 1" >>confdefs.h
95732b49 2943
cce855bc 2944fi
cce855bc 2945
ac50fbac
CR
2946if test "$opt_curses" = yes; then
2947 prefer_curses=yes
0001803f 2948fi
0001803f 2949
ac50fbac
CR
2950if test -z "${DEBUGGER_START_FILE}"; then
2951 DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc'
2952fi
0001803f 2953
ac50fbac
CR
2954opt_minimal_config=no
2955
2956opt_job_control=yes
2957opt_alias=yes
2958opt_readline=yes
2959opt_history=yes
2960opt_bang_history=yes
2961opt_dirstack=yes
2962opt_restricted=yes
2963opt_process_subst=yes
2964opt_prompt_decoding=yes
2965opt_select=yes
2966opt_help=yes
2967opt_array_variables=yes
2968opt_dparen_arith=yes
2969opt_extended_glob=yes
2970opt_brace_expansion=yes
2971opt_disabled_builtins=no
2972opt_command_timing=yes
2973opt_xpg_echo=no
2974opt_strict_posix=no
2975opt_cond_command=yes
2976opt_cond_regexp=yes
2977opt_coproc=yes
2978opt_arith_for_command=yes
2979opt_net_redirs=yes
2980opt_progcomp=yes
2981opt_separate_help=no
2982opt_multibyte=yes
2983opt_debugger=yes
2984opt_single_longdoc_strings=yes
2985opt_casemod_attrs=yes
2986opt_casemod_expansions=yes
2987opt_extglob_default=no
2988opt_dircomplete_expand_default=no
d233b485 2989opt_globascii_default=yes
a0c0a00f 2990opt_function_import=yes
d233b485 2991opt_dev_fd_stat_broken=no
ac50fbac
CR
2992
2993opt_static_link=no
2994opt_profiling=no
2995
2996# Check whether --enable-minimal-config was given.
2997if test "${enable_minimal_config+set}" = set; then :
2998 enableval=$enable_minimal_config; opt_minimal_config=$enableval
cce855bc 2999fi
b80f6443 3000
ac50fbac
CR
3001
3002if test $opt_minimal_config = yes; then
3003 opt_job_control=no opt_alias=no opt_readline=no
3004 opt_history=no opt_bang_history=no opt_dirstack=no
3005 opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
3006 opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
3007 opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
3008 opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no
3009 opt_net_redirs=no opt_progcomp=no opt_separate_help=no
3010 opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
3011 opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
d233b485 3012 opt_globascii_default=yes
b80f6443 3013fi
cce855bc 3014
ac50fbac
CR
3015# Check whether --enable-alias was given.
3016if test "${enable_alias+set}" = set; then :
3017 enableval=$enable_alias; opt_alias=$enableval
3185942a 3018fi
3185942a 3019
ac50fbac
CR
3020# Check whether --enable-arith-for-command was given.
3021if test "${enable_arith_for_command+set}" = set; then :
3022 enableval=$enable_arith_for_command; opt_arith_for_command=$enableval
bb70624e 3023fi
bb70624e 3024
ac50fbac
CR
3025# Check whether --enable-array-variables was given.
3026if test "${enable_array_variables+set}" = set; then :
3027 enableval=$enable_array_variables; opt_array_variables=$enableval
bb70624e 3028fi
bb70624e 3029
ac50fbac
CR
3030# Check whether --enable-bang-history was given.
3031if test "${enable_bang_history+set}" = set; then :
3032 enableval=$enable_bang_history; opt_bang_history=$enableval
bb70624e 3033fi
b80f6443 3034
ac50fbac
CR
3035# Check whether --enable-brace-expansion was given.
3036if test "${enable_brace_expansion+set}" = set; then :
3037 enableval=$enable_brace_expansion; opt_brace_expansion=$enableval
b80f6443 3038fi
b80f6443 3039
ac50fbac
CR
3040# Check whether --enable-casemod-attributes was given.
3041if test "${enable_casemod_attributes+set}" = set; then :
3042 enableval=$enable_casemod_attributes; opt_casemod_attrs=$enableval
b80f6443 3043fi
bb70624e 3044
ac50fbac
CR
3045# Check whether --enable-casemod-expansions was given.
3046if test "${enable_casemod_expansions+set}" = set; then :
3047 enableval=$enable_casemod_expansions; opt_casemod_expansions=$enableval
3185942a 3048fi
3185942a 3049
ac50fbac
CR
3050# Check whether --enable-command-timing was given.
3051if test "${enable_command_timing+set}" = set; then :
3052 enableval=$enable_command_timing; opt_command_timing=$enableval
3185942a 3053fi
3185942a 3054
ac50fbac
CR
3055# Check whether --enable-cond-command was given.
3056if test "${enable_cond_command+set}" = set; then :
3057 enableval=$enable_cond_command; opt_cond_command=$enableval
ccc6cda3
JA
3058fi
3059
ac50fbac
CR
3060# Check whether --enable-cond-regexp was given.
3061if test "${enable_cond_regexp+set}" = set; then :
3062 enableval=$enable_cond_regexp; opt_cond_regexp=$enableval
3063fi
7117c2d2 3064
ac50fbac
CR
3065# Check whether --enable-coprocesses was given.
3066if test "${enable_coprocesses+set}" = set; then :
3067 enableval=$enable_coprocesses; opt_coproc=$enableval
7117c2d2
JA
3068fi
3069
ac50fbac
CR
3070# Check whether --enable-debugger was given.
3071if test "${enable_debugger+set}" = set; then :
3072 enableval=$enable_debugger; opt_debugger=$enableval
d166f048
JA
3073fi
3074
d233b485
CR
3075# Check whether --enable-dev-fd-stat-broken was given.
3076if test "${enable_dev_fd_stat_broken+set}" = set; then :
3077 enableval=$enable_dev_fd_stat_broken; opt_dev_fd_stat_broken=$enableval
3078fi
3079
ac50fbac
CR
3080# Check whether --enable-direxpand-default was given.
3081if test "${enable_direxpand_default+set}" = set; then :
3082 enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval
7117c2d2 3083fi
ac50fbac
CR
3084
3085# Check whether --enable-directory-stack was given.
3086if test "${enable_directory_stack+set}" = set; then :
3087 enableval=$enable_directory_stack; opt_dirstack=$enableval
95732b49
JA
3088fi
3089
ac50fbac
CR
3090# Check whether --enable-disabled-builtins was given.
3091if test "${enable_disabled_builtins+set}" = set; then :
3092 enableval=$enable_disabled_builtins; opt_disabled_builtins=$enableval
3093fi
7117c2d2 3094
ac50fbac
CR
3095# Check whether --enable-dparen-arithmetic was given.
3096if test "${enable_dparen_arithmetic+set}" = set; then :
3097 enableval=$enable_dparen_arithmetic; opt_dparen_arith=$enableval
3098fi
b80f6443 3099
ac50fbac
CR
3100# Check whether --enable-extended-glob was given.
3101if test "${enable_extended_glob+set}" = set; then :
3102 enableval=$enable_extended_glob; opt_extended_glob=$enableval
3103fi
b80f6443 3104
ac50fbac
CR
3105# Check whether --enable-extended-glob-default was given.
3106if test "${enable_extended_glob_default+set}" = set; then :
3107 enableval=$enable_extended_glob_default; opt_extglob_default=$enableval
3108fi
b80f6443 3109
a0c0a00f
CR
3110# Check whether --enable-function-import was given.
3111if test "${enable_function_import+set}" = set; then :
3112 enableval=$enable_function_import; opt_function_import=$enableval
3113fi
3114
ac50fbac
CR
3115# Check whether --enable-glob-asciiranges-default was given.
3116if test "${enable_glob_asciiranges_default+set}" = set; then :
3117 enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval
3118fi
b80f6443 3119
ac50fbac
CR
3120# Check whether --enable-help-builtin was given.
3121if test "${enable_help_builtin+set}" = set; then :
3122 enableval=$enable_help_builtin; opt_help=$enableval
3123fi
b80f6443 3124
ac50fbac
CR
3125# Check whether --enable-history was given.
3126if test "${enable_history+set}" = set; then :
3127 enableval=$enable_history; opt_history=$enableval
3128fi
b80f6443 3129
ac50fbac
CR
3130# Check whether --enable-job-control was given.
3131if test "${enable_job_control+set}" = set; then :
3132 enableval=$enable_job_control; opt_job_control=$enableval
3133fi
b80f6443 3134
ac50fbac
CR
3135# Check whether --enable-multibyte was given.
3136if test "${enable_multibyte+set}" = set; then :
3137 enableval=$enable_multibyte; opt_multibyte=$enableval
3138fi
b80f6443 3139
ac50fbac
CR
3140# Check whether --enable-net-redirections was given.
3141if test "${enable_net_redirections+set}" = set; then :
3142 enableval=$enable_net_redirections; opt_net_redirs=$enableval
3143fi
b80f6443 3144
ac50fbac
CR
3145# Check whether --enable-process-substitution was given.
3146if test "${enable_process_substitution+set}" = set; then :
3147 enableval=$enable_process_substitution; opt_process_subst=$enableval
3148fi
b80f6443 3149
ac50fbac
CR
3150# Check whether --enable-progcomp was given.
3151if test "${enable_progcomp+set}" = set; then :
3152 enableval=$enable_progcomp; opt_progcomp=$enableval
3153fi
b80f6443 3154
ac50fbac
CR
3155# Check whether --enable-prompt-string-decoding was given.
3156if test "${enable_prompt_string_decoding+set}" = set; then :
3157 enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval
3158fi
b80f6443 3159
ac50fbac
CR
3160# Check whether --enable-readline was given.
3161if test "${enable_readline+set}" = set; then :
3162 enableval=$enable_readline; opt_readline=$enableval
3163fi
b80f6443 3164
ac50fbac
CR
3165# Check whether --enable-restricted was given.
3166if test "${enable_restricted+set}" = set; then :
3167 enableval=$enable_restricted; opt_restricted=$enableval
3168fi
b80f6443 3169
ac50fbac
CR
3170# Check whether --enable-select was given.
3171if test "${enable_select+set}" = set; then :
3172 enableval=$enable_select; opt_select=$enableval
3173fi
b80f6443 3174
ac50fbac
CR
3175# Check whether --enable-separate-helpfiles was given.
3176if test "${enable_separate_helpfiles+set}" = set; then :
3177 enableval=$enable_separate_helpfiles; opt_separate_help=$enableval
3178fi
b80f6443 3179
ac50fbac
CR
3180# Check whether --enable-single-help-strings was given.
3181if test "${enable_single_help_strings+set}" = set; then :
3182 enableval=$enable_single_help_strings; opt_single_longdoc_strings=$enableval
3183fi
d166f048 3184
ac50fbac
CR
3185# Check whether --enable-strict-posix-default was given.
3186if test "${enable_strict_posix_default+set}" = set; then :
3187 enableval=$enable_strict_posix_default; opt_strict_posix=$enableval
3188fi
3189
3190# Check whether --enable-usg-echo-default was given.
3191if test "${enable_usg_echo_default+set}" = set; then :
3192 enableval=$enable_usg_echo_default; opt_xpg_echo=$enableval
3193fi
3194
3195# Check whether --enable-xpg-echo-default was given.
3196if test "${enable_xpg_echo_default+set}" = set; then :
3197 enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval
3198fi
3199
3200
3201# Check whether --enable-mem-scramble was given.
3202if test "${enable_mem_scramble+set}" = set; then :
3203 enableval=$enable_mem_scramble; opt_memscramble=$enableval
3204fi
3205
3206# Check whether --enable-profiling was given.
3207if test "${enable_profiling+set}" = set; then :
3208 enableval=$enable_profiling; opt_profiling=$enableval
3209fi
3210
3211# Check whether --enable-static-link was given.
3212if test "${enable_static_link+set}" = set; then :
3213 enableval=$enable_static_link; opt_static_link=$enableval
3214fi
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224if test $opt_alias = yes; then
3225$as_echo "#define ALIAS 1" >>confdefs.h
3226
3227fi
3228if test $opt_dirstack = yes; then
3229$as_echo "#define PUSHD_AND_POPD 1" >>confdefs.h
3230
3231fi
3232if test $opt_restricted = yes; then
3233$as_echo "#define RESTRICTED_SHELL 1" >>confdefs.h
3234
3235fi
3236if test $opt_process_subst = yes; then
3237$as_echo "#define PROCESS_SUBSTITUTION 1" >>confdefs.h
3238
3239fi
3240if test $opt_prompt_decoding = yes; then
3241$as_echo "#define PROMPT_STRING_DECODE 1" >>confdefs.h
3242
3243fi
3244if test $opt_select = yes; then
3245$as_echo "#define SELECT_COMMAND 1" >>confdefs.h
3246
3247fi
3248if test $opt_help = yes; then
3249$as_echo "#define HELP_BUILTIN 1" >>confdefs.h
3250
3251fi
3252if test $opt_array_variables = yes; then
3253$as_echo "#define ARRAY_VARS 1" >>confdefs.h
3254
3255fi
3256if test $opt_dparen_arith = yes; then
3257$as_echo "#define DPAREN_ARITHMETIC 1" >>confdefs.h
3258
3259fi
3260if test $opt_brace_expansion = yes; then
3261$as_echo "#define BRACE_EXPANSION 1" >>confdefs.h
3262
3263fi
3264if test $opt_disabled_builtins = yes; then
3265$as_echo "#define DISABLED_BUILTINS 1" >>confdefs.h
3266
3267fi
3268if test $opt_command_timing = yes; then
3269$as_echo "#define COMMAND_TIMING 1" >>confdefs.h
3270
3271fi
3272if test $opt_xpg_echo = yes ; then
3273$as_echo "#define DEFAULT_ECHO_TO_XPG 1" >>confdefs.h
3274
3275fi
3276if test $opt_strict_posix = yes; then
3277$as_echo "#define STRICT_POSIX 1" >>confdefs.h
3278
3279fi
3280if test $opt_extended_glob = yes ; then
3281$as_echo "#define EXTENDED_GLOB 1" >>confdefs.h
3282
3283fi
3284if test $opt_extglob_default = yes; then
3285$as_echo "#define EXTGLOB_DEFAULT 1" >>confdefs.h
3286
3287else
3288$as_echo "#define EXTGLOB_DEFAULT 0" >>confdefs.h
3289
3290fi
3291if test $opt_cond_command = yes ; then
3292$as_echo "#define COND_COMMAND 1" >>confdefs.h
3293
3294fi
3295if test $opt_cond_regexp = yes ; then
3296$as_echo "#define COND_REGEXP 1" >>confdefs.h
3297
3298fi
3299if test $opt_coproc = yes; then
3300$as_echo "#define COPROCESS_SUPPORT 1" >>confdefs.h
3301
3302fi
3303if test $opt_arith_for_command = yes; then
3304$as_echo "#define ARITH_FOR_COMMAND 1" >>confdefs.h
3305
3306fi
3307if test $opt_net_redirs = yes; then
3308$as_echo "#define NETWORK_REDIRECTIONS 1" >>confdefs.h
3309
3310fi
3311if test $opt_progcomp = yes; then
3312$as_echo "#define PROGRAMMABLE_COMPLETION 1" >>confdefs.h
3313
3314fi
3315if test $opt_multibyte = no; then
3316$as_echo "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h
3317
3318fi
3319if test $opt_debugger = yes; then
3320$as_echo "#define DEBUGGER 1" >>confdefs.h
3321
3322fi
3323if test $opt_casemod_attrs = yes; then
3324$as_echo "#define CASEMOD_ATTRS 1" >>confdefs.h
3325
3326fi
3327if test $opt_casemod_expansions = yes; then
3328$as_echo "#define CASEMOD_EXPANSIONS 1" >>confdefs.h
3329
3330fi
3331if test $opt_dircomplete_expand_default = yes; then
3332$as_echo "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h
3333
3334fi
3335if test $opt_globascii_default = yes; then
3336$as_echo "#define GLOBASCII_DEFAULT 1" >>confdefs.h
3337
3338else
3339$as_echo "#define GLOBASCII_DEFAULT 0" >>confdefs.h
3340
a0c0a00f
CR
3341fi
3342if test $opt_function_import = yes; then
3343$as_echo "#define FUNCTION_IMPORT 1" >>confdefs.h
3344
d233b485
CR
3345fi
3346if test $opt_dev_fd_stat_broken = yes; then
3347$as_echo "#define DEV_FD_STAT_BROKEN 1" >>confdefs.h
3348
ac50fbac
CR
3349fi
3350
3351if test $opt_memscramble = yes; then
3352$as_echo "#define MEMSCRAMBLE 1" >>confdefs.h
3353
3354fi
3355
3356if test "$opt_minimal_config" = yes; then
3357 TESTSCRIPT=run-minimal
3358else
3359 TESTSCRIPT=run-all
3360fi
3361
3362HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET=
3363if test "$opt_separate_help" != no; then
3364 if test "$opt_separate_help" = "yes" ; then
3365 HELPDIR='${datadir}/bash'
3366 else
3367 HELPDIR=$opt_separate_help
3368 fi
3369 HELPDIRDEFINE='-H ${HELPDIR}'
3370 HELPINSTALL='install-help'
3371 HELPFILES_TARGET='helpdoc'
3372fi
3373HELPSTRINGS=
3374if test "$opt_single_longdoc_strings" != "yes"; then
3375 HELPSTRINGS='-S'
3376fi
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
a0c0a00f
CR
3395if test -z "$CFLAGS"; then
3396 AUTO_CFLAGS="-g ${GCC+-O2} ${GCC+-Wno-parentheses}"
3397 AUTO_LDFLAGS="-g ${GCC+-O2}"
3398else
3399 AUTO_CFLAGS= AUTO_LDFLAGS=
3400fi
ac50fbac
CR
3401
3402echo ""
3403echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
3404echo ""
3405
3406ac_ext=c
3407ac_cpp='$CPP $CPPFLAGS'
3408ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3409ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3410ac_compiler_gnu=$ac_cv_c_compiler_gnu
3411if test -n "$ac_tool_prefix"; then
3412 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3413set dummy ${ac_tool_prefix}gcc; ac_word=$2
3414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3415$as_echo_n "checking for $ac_word... " >&6; }
3416if ${ac_cv_prog_CC+:} false; then :
3417 $as_echo_n "(cached) " >&6
3418else
3419 if test -n "$CC"; then
3420 ac_cv_prog_CC="$CC" # Let the user override the test.
3421else
3422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3423for as_dir in $PATH
3424do
3425 IFS=$as_save_IFS
3426 test -z "$as_dir" && as_dir=.
3427 for ac_exec_ext in '' $ac_executable_extensions; do
3428 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3429 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3430 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3431 break 2
b80f6443
JA
3432 fi
3433done
ac50fbac 3434 done
3185942a 3435IFS=$as_save_IFS
ccc6cda3 3436
f73dda09
JA
3437fi
3438fi
3439CC=$ac_cv_prog_CC
3440if test -n "$CC"; then
ac50fbac 3441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3442$as_echo "$CC" >&6; }
f73dda09 3443else
ac50fbac 3444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3445$as_echo "no" >&6; }
f73dda09 3446fi
ccc6cda3 3447
3185942a 3448
f73dda09
JA
3449fi
3450if test -z "$ac_cv_prog_CC"; then
3451 ac_ct_CC=$CC
3452 # Extract the first word of "gcc", so it can be a program name with args.
3453set dummy gcc; ac_word=$2
ac50fbac 3454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3455$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3456if ${ac_cv_prog_ac_ct_CC+:} false; then :
3185942a 3457 $as_echo_n "(cached) " >&6
f73dda09
JA
3458else
3459 if test -n "$ac_ct_CC"; then
3460 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3461else
b80f6443
JA
3462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3463for as_dir in $PATH
3464do
3465 IFS=$as_save_IFS
3466 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3467 for ac_exec_ext in '' $ac_executable_extensions; do
3468 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3469 ac_cv_prog_ac_ct_CC="gcc"
ac50fbac 3470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3471 break 2
3472 fi
3473done
ac50fbac 3474 done
3185942a 3475IFS=$as_save_IFS
ccc6cda3 3476
f73dda09
JA
3477fi
3478fi
3479ac_ct_CC=$ac_cv_prog_ac_ct_CC
3480if test -n "$ac_ct_CC"; then
ac50fbac 3481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3185942a 3482$as_echo "$ac_ct_CC" >&6; }
f73dda09 3483else
ac50fbac 3484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3485$as_echo "no" >&6; }
f73dda09 3486fi
ccc6cda3 3487
3185942a
JA
3488 if test "x$ac_ct_CC" = x; then
3489 CC=""
3490 else
3491 case $cross_compiling:$ac_tool_warned in
3492yes:)
ac50fbac 3493{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3185942a
JA
3494$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3495ac_tool_warned=yes ;;
3496esac
3497 CC=$ac_ct_CC
3498 fi
f73dda09
JA
3499else
3500 CC="$ac_cv_prog_CC"
3501fi
bb70624e 3502
f73dda09 3503if test -z "$CC"; then
3185942a
JA
3504 if test -n "$ac_tool_prefix"; then
3505 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
f73dda09 3506set dummy ${ac_tool_prefix}cc; ac_word=$2
ac50fbac 3507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3508$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3509if ${ac_cv_prog_CC+:} false; then :
3185942a 3510 $as_echo_n "(cached) " >&6
ccc6cda3
JA
3511else
3512 if test -n "$CC"; then
3513 ac_cv_prog_CC="$CC" # Let the user override the test.
3514else
b80f6443
JA
3515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3516for as_dir in $PATH
3517do
3518 IFS=$as_save_IFS
3519 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3520 for ac_exec_ext in '' $ac_executable_extensions; do
3521 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3522 ac_cv_prog_CC="${ac_tool_prefix}cc"
ac50fbac 3523 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3524 break 2
3525 fi
3526done
ac50fbac 3527 done
3185942a 3528IFS=$as_save_IFS
f73dda09 3529
ccc6cda3
JA
3530fi
3531fi
f73dda09 3532CC=$ac_cv_prog_CC
ccc6cda3 3533if test -n "$CC"; then
ac50fbac 3534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3535$as_echo "$CC" >&6; }
f73dda09 3536else
ac50fbac 3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3538$as_echo "no" >&6; }
f73dda09
JA
3539fi
3540
ccc6cda3 3541
3185942a 3542 fi
f73dda09 3543fi
ccc6cda3
JA
3544if test -z "$CC"; then
3545 # Extract the first word of "cc", so it can be a program name with args.
3546set dummy cc; ac_word=$2
ac50fbac 3547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3548$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3549if ${ac_cv_prog_CC+:} false; then :
3185942a 3550 $as_echo_n "(cached) " >&6
ccc6cda3
JA
3551else
3552 if test -n "$CC"; then
3553 ac_cv_prog_CC="$CC" # Let the user override the test.
3554else
ccc6cda3 3555 ac_prog_rejected=no
b80f6443
JA
3556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3557for as_dir in $PATH
3558do
3559 IFS=$as_save_IFS
3560 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3561 for ac_exec_ext in '' $ac_executable_extensions; do
3562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443
JA
3563 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3564 ac_prog_rejected=yes
3565 continue
3566 fi
3567 ac_cv_prog_CC="cc"
ac50fbac 3568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3569 break 2
3570 fi
3571done
ac50fbac 3572 done
3185942a 3573IFS=$as_save_IFS
f73dda09 3574
ccc6cda3
JA
3575if test $ac_prog_rejected = yes; then
3576 # We found a bogon in the path, so make sure we never use it.
3577 set dummy $ac_cv_prog_CC
3578 shift
f73dda09 3579 if test $# != 0; then
ccc6cda3
JA
3580 # We chose a different compiler from the bogus one.
3581 # However, it has the same basename, so the bogon will be chosen
3582 # first if we set CC to just the basename; use the full file name.
3583 shift
0628567a 3584 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ccc6cda3
JA
3585 fi
3586fi
3587fi
3588fi
f73dda09 3589CC=$ac_cv_prog_CC
ccc6cda3 3590if test -n "$CC"; then
ac50fbac 3591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3592$as_echo "$CC" >&6; }
ccc6cda3 3593else
ac50fbac 3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3595$as_echo "no" >&6; }
ccc6cda3
JA
3596fi
3597
3185942a 3598
f73dda09
JA
3599fi
3600if test -z "$CC"; then
3601 if test -n "$ac_tool_prefix"; then
3185942a 3602 for ac_prog in cl.exe
f73dda09
JA
3603 do
3604 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3605set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ac50fbac 3606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3607$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3608if ${ac_cv_prog_CC+:} false; then :
3185942a 3609 $as_echo_n "(cached) " >&6
bb70624e
JA
3610else
3611 if test -n "$CC"; then
3612 ac_cv_prog_CC="$CC" # Let the user override the test.
3613else
b80f6443
JA
3614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3615for as_dir in $PATH
3616do
3617 IFS=$as_save_IFS
3618 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3619 for ac_exec_ext in '' $ac_executable_extensions; do
3620 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3621 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
ac50fbac 3622 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3623 break 2
3624 fi
3625done
ac50fbac 3626 done
3185942a 3627IFS=$as_save_IFS
f73dda09 3628
bb70624e
JA
3629fi
3630fi
f73dda09 3631CC=$ac_cv_prog_CC
bb70624e 3632if test -n "$CC"; then
ac50fbac 3633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3634$as_echo "$CC" >&6; }
bb70624e 3635else
ac50fbac 3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3637$as_echo "no" >&6; }
bb70624e 3638fi
ccc6cda3 3639
3185942a 3640
f73dda09
JA
3641 test -n "$CC" && break
3642 done
ccc6cda3 3643fi
f73dda09
JA
3644if test -z "$CC"; then
3645 ac_ct_CC=$CC
3185942a 3646 for ac_prog in cl.exe
f73dda09
JA
3647do
3648 # Extract the first word of "$ac_prog", so it can be a program name with args.
3649set dummy $ac_prog; ac_word=$2
ac50fbac 3650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3651$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3652if ${ac_cv_prog_ac_ct_CC+:} false; then :
3185942a 3653 $as_echo_n "(cached) " >&6
f73dda09
JA
3654else
3655 if test -n "$ac_ct_CC"; then
3656 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3657else
b80f6443
JA
3658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3659for as_dir in $PATH
3660do
3661 IFS=$as_save_IFS
3662 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3663 for ac_exec_ext in '' $ac_executable_extensions; do
3664 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3665 ac_cv_prog_ac_ct_CC="$ac_prog"
ac50fbac 3666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3667 break 2
3668 fi
3669done
ac50fbac 3670 done
3185942a 3671IFS=$as_save_IFS
ccc6cda3 3672
ccc6cda3 3673fi
ccc6cda3 3674fi
f73dda09
JA
3675ac_ct_CC=$ac_cv_prog_ac_ct_CC
3676if test -n "$ac_ct_CC"; then
ac50fbac 3677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3185942a 3678$as_echo "$ac_ct_CC" >&6; }
f73dda09 3679else
ac50fbac 3680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3681$as_echo "no" >&6; }
ccc6cda3
JA
3682fi
3683
3185942a 3684
f73dda09
JA
3685 test -n "$ac_ct_CC" && break
3686done
ccc6cda3 3687
3185942a
JA
3688 if test "x$ac_ct_CC" = x; then
3689 CC=""
3690 else
3691 case $cross_compiling:$ac_tool_warned in
3692yes:)
ac50fbac 3693{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3185942a
JA
3694$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3695ac_tool_warned=yes ;;
3696esac
3697 CC=$ac_ct_CC
3698 fi
bb70624e
JA
3699fi
3700
f73dda09
JA
3701fi
3702
b80f6443 3703
ac50fbac 3704test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3706as_fn_error $? "no acceptable C compiler found in \$PATH
3707See \`config.log' for more details" "$LINENO" 5; }
f73dda09
JA
3708
3709# Provide some information about the compiler.
ac50fbac 3710$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3185942a
JA
3711set X $ac_compile
3712ac_compiler=$2
ac50fbac
CR
3713for ac_option in --version -v -V -qversion; do
3714 { { ac_try="$ac_compiler $ac_option >&5"
3185942a
JA
3715case "(($ac_try" in
3716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3717 *) ac_try_echo=$ac_try;;
3718esac
ac50fbac
CR
3719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3720$as_echo "$ac_try_echo"; } >&5
3721 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
f73dda09 3722 ac_status=$?
ac50fbac
CR
3723 if test -s conftest.err; then
3724 sed '10a\
3725... rest of stderr output deleted ...
3726 10q' conftest.err >conftest.er1
3727 cat conftest.er1 >&5
3728 fi
3729 rm -f conftest.er1 conftest.err
3730 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3731 test $ac_status = 0; }
3732done
f73dda09 3733
ac50fbac 3734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 3735/* end confdefs.h. */
f73dda09
JA
3736
3737int
3738main ()
3739{
3740
3741 ;
3742 return 0;
3743}
3744_ACEOF
3745ac_clean_files_save=$ac_clean_files
3185942a 3746ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
f73dda09
JA
3747# Try to create an executable without -o first, disregard a.out.
3748# It will help us diagnose broken compilers, and finding out an intuition
3749# of exeext.
ac50fbac
CR
3750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3751$as_echo_n "checking whether the C compiler works... " >&6; }
3185942a
JA
3752ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3753
3754# The possible output files:
3755ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3756
3757ac_rmfiles=
3758for ac_file in $ac_files
3759do
3760 case $ac_file in
3761 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3762 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3763 esac
3764done
3765rm -f $ac_rmfiles
3766
ac50fbac 3767if { { ac_try="$ac_link_default"
3185942a
JA
3768case "(($ac_try" in
3769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3770 *) ac_try_echo=$ac_try;;
3771esac
ac50fbac
CR
3772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3773$as_echo "$ac_try_echo"; } >&5
3185942a 3774 (eval "$ac_link_default") 2>&5
f73dda09 3775 ac_status=$?
ac50fbac
CR
3776 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3777 test $ac_status = 0; }; then :
3185942a
JA
3778 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3779# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3780# in a Makefile. We should not override ac_cv_exeext if it was cached,
3781# so that the user can short-circuit this test for compilers unknown to
3782# Autoconf.
3783for ac_file in $ac_files ''
0628567a
JA
3784do
3785 test -f "$ac_file" || continue
f73dda09 3786 case $ac_file in
3185942a 3787 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
0628567a
JA
3788 ;;
3789 [ab].out )
3790 # We found the default executable, but exeext='' is most
3791 # certainly right.
3792 break;;
3793 *.* )
ac50fbac 3794 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3185942a
JA
3795 then :; else
3796 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3797 fi
3798 # We set ac_cv_exeext here because the later test for it is not
3799 # safe: cross compilers may not add the suffix if given an `-o'
3800 # argument, so we may need to know it at that point already.
3801 # Even if this section looks crufty: it has the advantage of
3802 # actually working.
0628567a
JA
3803 break;;
3804 * )
3805 break;;
f73dda09
JA
3806 esac
3807done
3185942a
JA
3808test "$ac_cv_exeext" = no && ac_cv_exeext=
3809
ccc6cda3 3810else
3185942a
JA
3811 ac_file=''
3812fi
ac50fbac
CR
3813if test -z "$ac_file"; then :
3814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3815$as_echo "no" >&6; }
3816$as_echo "$as_me: failed program was:" >&5
0628567a
JA
3817sed 's/^/| /' conftest.$ac_ext >&5
3818
ac50fbac 3819{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3821as_fn_error 77 "C compiler cannot create executables
3822See \`config.log' for more details" "$LINENO" 5; }
3823else
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3825$as_echo "yes" >&6; }
f73dda09 3826fi
ac50fbac
CR
3827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3828$as_echo_n "checking for C compiler default output file name... " >&6; }
3829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3830$as_echo "$ac_file" >&6; }
f73dda09 3831ac_exeext=$ac_cv_exeext
f73dda09 3832
ac50fbac
CR
3833rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3834ac_clean_files=$ac_clean_files_save
3835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3836$as_echo_n "checking for suffix of executables... " >&6; }
3837if { { ac_try="$ac_link"
3838case "(($ac_try" in
3185942a
JA
3839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3840 *) ac_try_echo=$ac_try;;
3841esac
ac50fbac
CR
3842eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3843$as_echo "$ac_try_echo"; } >&5
3844 (eval "$ac_link") 2>&5
f73dda09 3845 ac_status=$?
ac50fbac
CR
3846 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3847 test $ac_status = 0; }; then :
f73dda09
JA
3848 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3849# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3850# work properly (i.e., refer to `conftest.exe'), while it won't with
3851# `rm'.
0628567a
JA
3852for ac_file in conftest.exe conftest conftest.*; do
3853 test -f "$ac_file" || continue
f73dda09 3854 case $ac_file in
3185942a 3855 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
f73dda09 3856 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
0628567a 3857 break;;
f73dda09
JA
3858 * ) break;;
3859 esac
3860done
ccc6cda3 3861else
ac50fbac 3862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3864as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3865See \`config.log' for more details" "$LINENO" 5; }
f73dda09 3866fi
ac50fbac
CR
3867rm -f conftest conftest$ac_cv_exeext
3868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3185942a 3869$as_echo "$ac_cv_exeext" >&6; }
f73dda09
JA
3870
3871rm -f conftest.$ac_ext
3872EXEEXT=$ac_cv_exeext
3873ac_exeext=$EXEEXT
ac50fbac
CR
3874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3875/* end confdefs.h. */
3876#include <stdio.h>
3877int
3878main ()
3879{
3880FILE *f = fopen ("conftest.out", "w");
3881 return ferror (f) || fclose (f) != 0;
3882
3883 ;
3884 return 0;
3885}
3886_ACEOF
3887ac_clean_files="$ac_clean_files conftest.out"
3888# Check that the compiler produces executables we can run. If not, either
3889# the compiler is broken, or we cross compile.
3890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3891$as_echo_n "checking whether we are cross compiling... " >&6; }
3892if test "$cross_compiling" != yes; then
3893 { { ac_try="$ac_link"
3894case "(($ac_try" in
3895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3896 *) ac_try_echo=$ac_try;;
3897esac
3898eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3899$as_echo "$ac_try_echo"; } >&5
3900 (eval "$ac_link") 2>&5
3901 ac_status=$?
3902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3903 test $ac_status = 0; }
3904 if { ac_try='./conftest$ac_cv_exeext'
3905 { { case "(($ac_try" in
3906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3907 *) ac_try_echo=$ac_try;;
3908esac
3909eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3910$as_echo "$ac_try_echo"; } >&5
3911 (eval "$ac_try") 2>&5
3912 ac_status=$?
3913 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3914 test $ac_status = 0; }; }; then
3915 cross_compiling=no
3916 else
3917 if test "$cross_compiling" = maybe; then
3918 cross_compiling=yes
3919 else
3920 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3922as_fn_error $? "cannot run C compiled programs.
3923If you meant to cross compile, use \`--host'.
3924See \`config.log' for more details" "$LINENO" 5; }
3925 fi
3926 fi
3927fi
3928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3929$as_echo "$cross_compiling" >&6; }
3930
3931rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3932ac_clean_files=$ac_clean_files_save
3933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3185942a 3934$as_echo_n "checking for suffix of object files... " >&6; }
ac50fbac 3935if ${ac_cv_objext+:} false; then :
3185942a 3936 $as_echo_n "(cached) " >&6
f73dda09 3937else
ac50fbac 3938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 3939/* end confdefs.h. */
f73dda09
JA
3940
3941int
3942main ()
3943{
3944
3945 ;
3946 return 0;
3947}
3948_ACEOF
3949rm -f conftest.o conftest.obj
ac50fbac 3950if { { ac_try="$ac_compile"
3185942a
JA
3951case "(($ac_try" in
3952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3953 *) ac_try_echo=$ac_try;;
3954esac
ac50fbac
CR
3955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3956$as_echo "$ac_try_echo"; } >&5
3185942a 3957 (eval "$ac_compile") 2>&5
f73dda09 3958 ac_status=$?
ac50fbac
CR
3959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3960 test $ac_status = 0; }; then :
3185942a
JA
3961 for ac_file in conftest.o conftest.obj conftest.*; do
3962 test -f "$ac_file" || continue;
f73dda09 3963 case $ac_file in
3185942a 3964 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
f73dda09
JA
3965 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3966 break;;
3967 esac
3968done
3969else
3185942a 3970 $as_echo "$as_me: failed program was:" >&5
0628567a
JA
3971sed 's/^/| /' conftest.$ac_ext >&5
3972
ac50fbac 3973{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3974$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3975as_fn_error $? "cannot compute suffix of object files: cannot compile
3976See \`config.log' for more details" "$LINENO" 5; }
ccc6cda3 3977fi
f73dda09 3978rm -f conftest.$ac_cv_objext conftest.$ac_ext
ccc6cda3 3979fi
ac50fbac 3980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3185942a 3981$as_echo "$ac_cv_objext" >&6; }
f73dda09
JA
3982OBJEXT=$ac_cv_objext
3983ac_objext=$OBJEXT
ac50fbac 3984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3185942a 3985$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
ac50fbac 3986if ${ac_cv_c_compiler_gnu+:} false; then :
3185942a 3987 $as_echo_n "(cached) " >&6
f73dda09 3988else
ac50fbac 3989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 3990/* end confdefs.h. */
f73dda09
JA
3991
3992int
3993main ()
3994{
3995#ifndef __GNUC__
3996 choke me
3997#endif
3998
3999 ;
4000 return 0;
4001}
4002_ACEOF
ac50fbac 4003if ac_fn_c_try_compile "$LINENO"; then :
f73dda09
JA
4004 ac_compiler_gnu=yes
4005else
ac50fbac 4006 ac_compiler_gnu=no
f73dda09 4007fi
3185942a 4008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09
JA
4009ac_cv_c_compiler_gnu=$ac_compiler_gnu
4010
4011fi
ac50fbac 4012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3185942a
JA
4013$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4014if test $ac_compiler_gnu = yes; then
4015 GCC=yes
4016else
4017 GCC=
4018fi
f73dda09
JA
4019ac_test_CFLAGS=${CFLAGS+set}
4020ac_save_CFLAGS=$CFLAGS
ac50fbac 4021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3185942a 4022$as_echo_n "checking whether $CC accepts -g... " >&6; }
ac50fbac 4023if ${ac_cv_prog_cc_g+:} false; then :
3185942a 4024 $as_echo_n "(cached) " >&6
f73dda09 4025else
3185942a
JA
4026 ac_save_c_werror_flag=$ac_c_werror_flag
4027 ac_c_werror_flag=yes
4028 ac_cv_prog_cc_g=no
4029 CFLAGS="-g"
ac50fbac 4030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4031/* end confdefs.h. */
f73dda09
JA
4032
4033int
4034main ()
4035{
ccc6cda3 4036
f73dda09
JA
4037 ;
4038 return 0;
4039}
4040_ACEOF
ac50fbac 4041if ac_fn_c_try_compile "$LINENO"; then :
3185942a
JA
4042 ac_cv_prog_cc_g=yes
4043else
ac50fbac
CR
4044 CFLAGS=""
4045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4046/* end confdefs.h. */
4047
4048int
4049main ()
4050{
4051
4052 ;
4053 return 0;
4054}
4055_ACEOF
ac50fbac 4056if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4057
ac50fbac
CR
4058else
4059 ac_c_werror_flag=$ac_save_c_werror_flag
3185942a 4060 CFLAGS="-g"
ac50fbac 4061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4062/* end confdefs.h. */
4063
4064int
4065main ()
4066{
4067
4068 ;
4069 return 0;
4070}
4071_ACEOF
ac50fbac 4072if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4073 ac_cv_prog_cc_g=yes
3185942a 4074fi
3185942a
JA
4075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4076fi
3185942a 4077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 4078fi
3185942a
JA
4079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4080 ac_c_werror_flag=$ac_save_c_werror_flag
f73dda09 4081fi
ac50fbac 4082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3185942a 4083$as_echo "$ac_cv_prog_cc_g" >&6; }
bb70624e 4084if test "$ac_test_CFLAGS" = set; then
f73dda09 4085 CFLAGS=$ac_save_CFLAGS
bb70624e
JA
4086elif test $ac_cv_prog_cc_g = yes; then
4087 if test "$GCC" = yes; then
ccc6cda3
JA
4088 CFLAGS="-g -O2"
4089 else
bb70624e 4090 CFLAGS="-g"
ccc6cda3
JA
4091 fi
4092else
bb70624e
JA
4093 if test "$GCC" = yes; then
4094 CFLAGS="-O2"
4095 else
4096 CFLAGS=
4097 fi
ccc6cda3 4098fi
ac50fbac 4099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3185942a 4100$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
ac50fbac 4101if ${ac_cv_prog_cc_c89+:} false; then :
3185942a 4102 $as_echo_n "(cached) " >&6
0628567a 4103else
3185942a 4104 ac_cv_prog_cc_c89=no
0628567a 4105ac_save_CC=$CC
ac50fbac 4106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
4107/* end confdefs.h. */
4108#include <stdarg.h>
4109#include <stdio.h>
ac50fbac 4110struct stat;
0628567a
JA
4111/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4112struct buf { int x; };
4113FILE * (*rcsopen) (struct buf *, struct stat *, int);
4114static char *e (p, i)
4115 char **p;
4116 int i;
4117{
4118 return p[i];
4119}
4120static char *f (char * (*g) (char **, int), char **p, ...)
4121{
4122 char *s;
4123 va_list v;
4124 va_start (v,p);
4125 s = g (p, va_arg (v,int));
4126 va_end (v);
4127 return s;
4128}
4129
4130/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4131 function prototypes and stuff, but not '\xHH' hex character constants.
4132 These don't provoke an error unfortunately, instead are silently treated
3185942a 4133 as 'x'. The following induces an error, until -std is added to get
0628567a
JA
4134 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4135 array size at least. It's necessary to write '\x00'==0 to get something
3185942a 4136 that's true only with -std. */
0628567a
JA
4137int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4138
3185942a
JA
4139/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4140 inside strings and character constants. */
4141#define FOO(x) 'x'
4142int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4143
0628567a
JA
4144int test (int i, double x);
4145struct s1 {int (*f) (int a);};
4146struct s2 {int (*f) (double a);};
4147int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4148int argc;
4149char **argv;
4150int
4151main ()
4152{
4153return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4154 ;
4155 return 0;
4156}
4157_ACEOF
3185942a
JA
4158for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4159 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
0628567a
JA
4160do
4161 CC="$ac_save_CC $ac_arg"
ac50fbac 4162 if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4163 ac_cv_prog_cc_c89=$ac_arg
0628567a 4164fi
3185942a
JA
4165rm -f core conftest.err conftest.$ac_objext
4166 test "x$ac_cv_prog_cc_c89" != "xno" && break
0628567a 4167done
3185942a 4168rm -f conftest.$ac_ext
0628567a
JA
4169CC=$ac_save_CC
4170
4171fi
3185942a
JA
4172# AC_CACHE_VAL
4173case "x$ac_cv_prog_cc_c89" in
4174 x)
ac50fbac 4175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3185942a
JA
4176$as_echo "none needed" >&6; } ;;
4177 xno)
ac50fbac 4178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3185942a 4179$as_echo "unsupported" >&6; } ;;
0628567a 4180 *)
3185942a 4181 CC="$CC $ac_cv_prog_cc_c89"
ac50fbac 4182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3185942a 4183$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
0628567a 4184esac
ac50fbac 4185if test "x$ac_cv_prog_cc_c89" != xno; then :
0628567a 4186
ac50fbac 4187fi
0628567a 4188
f73dda09
JA
4189ac_ext=c
4190ac_cpp='$CPP $CPPFLAGS'
4191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4193ac_compiler_gnu=$ac_cv_c_compiler_gnu
bb70624e 4194
f73dda09 4195
ccc6cda3 4196
b80f6443 4197
ac50fbac 4198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5
3185942a 4199$as_echo_n "checking for strerror in -lcposix... " >&6; }
ac50fbac 4200if ${ac_cv_lib_cposix_strerror+:} false; then :
3185942a 4201 $as_echo_n "(cached) " >&6
ccc6cda3 4202else
b80f6443
JA
4203 ac_check_lib_save_LIBS=$LIBS
4204LIBS="-lcposix $LIBS"
ac50fbac 4205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4206/* end confdefs.h. */
b80f6443 4207
3185942a
JA
4208/* Override any GCC internal prototype to avoid an error.
4209 Use char because int might match the return type of a GCC
4210 builtin and then its argument prototype would still apply. */
b80f6443
JA
4211#ifdef __cplusplus
4212extern "C"
4213#endif
b80f6443
JA
4214char strerror ();
4215int
4216main ()
4217{
3185942a 4218return strerror ();
b80f6443
JA
4219 ;
4220 return 0;
4221}
4222_ACEOF
ac50fbac 4223if ac_fn_c_try_link "$LINENO"; then :
b80f6443
JA
4224 ac_cv_lib_cposix_strerror=yes
4225else
ac50fbac 4226 ac_cv_lib_cposix_strerror=no
b80f6443 4227fi
ac50fbac
CR
4228rm -f core conftest.err conftest.$ac_objext \
4229 conftest$ac_exeext conftest.$ac_ext
b80f6443
JA
4230LIBS=$ac_check_lib_save_LIBS
4231fi
ac50fbac 4232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5
3185942a 4233$as_echo "$ac_cv_lib_cposix_strerror" >&6; }
ac50fbac 4234if test "x$ac_cv_lib_cposix_strerror" = xyes; then :
b80f6443 4235 LIBS="$LIBS -lcposix"
ccc6cda3
JA
4236fi
4237
b80f6443
JA
4238
4239
f73dda09
JA
4240ac_ext=c
4241ac_cpp='$CPP $CPPFLAGS'
4242ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4243ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4244ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac50fbac 4245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3185942a 4246$as_echo_n "checking how to run the C preprocessor... " >&6; }
ccc6cda3
JA
4247# On Suns, sometimes $CPP names a directory.
4248if test -n "$CPP" && test -d "$CPP"; then
4249 CPP=
4250fi
4251if test -z "$CPP"; then
ac50fbac 4252 if ${ac_cv_prog_CPP+:} false; then :
3185942a 4253 $as_echo_n "(cached) " >&6
f73dda09
JA
4254else
4255 # Double quotes because CPP needs to be expanded
4256 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4257 do
4258 ac_preproc_ok=false
4259for ac_c_preproc_warn_flag in '' yes
4260do
4261 # Use a header file that comes with gcc, so configuring glibc
4262 # with a fresh cross-compiler works.
0628567a
JA
4263 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4264 # <limits.h> exists even on freestanding compilers.
ccc6cda3 4265 # On the NeXT, cc -E runs the code through the compiler's parser,
f73dda09 4266 # not just through cpp. "Syntax error" is here to catch this case.
ac50fbac 4267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
4268/* end confdefs.h. */
4269#ifdef __STDC__
4270# include <limits.h>
4271#else
4272# include <assert.h>
4273#endif
4274 Syntax error
f73dda09 4275_ACEOF
ac50fbac 4276if ac_fn_c_try_cpp "$LINENO"; then :
0628567a 4277
ac50fbac 4278else
f73dda09
JA
4279 # Broken: fails on valid input.
4280continue
4281fi
ac50fbac 4282rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09 4283
3185942a 4284 # OK, works on sane cases. Now check whether nonexistent headers
f73dda09 4285 # can be detected and how.
ac50fbac 4286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4287/* end confdefs.h. */
f73dda09
JA
4288#include <ac_nonexistent.h>
4289_ACEOF
ac50fbac 4290if ac_fn_c_try_cpp "$LINENO"; then :
f73dda09
JA
4291 # Broken: success on invalid input.
4292continue
bb70624e 4293else
f73dda09
JA
4294 # Passes both tests.
4295ac_preproc_ok=:
4296break
4297fi
ac50fbac 4298rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09
JA
4299
4300done
4301# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
ac50fbac
CR
4302rm -f conftest.i conftest.err conftest.$ac_ext
4303if $ac_preproc_ok; then :
f73dda09
JA
4304 break
4305fi
4306
4307 done
4308 ac_cv_prog_CPP=$CPP
4309
4310fi
4311 CPP=$ac_cv_prog_CPP
4312else
4313 ac_cv_prog_CPP=$CPP
4314fi
ac50fbac 4315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3185942a 4316$as_echo "$CPP" >&6; }
f73dda09
JA
4317ac_preproc_ok=false
4318for ac_c_preproc_warn_flag in '' yes
4319do
4320 # Use a header file that comes with gcc, so configuring glibc
4321 # with a fresh cross-compiler works.
0628567a
JA
4322 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4323 # <limits.h> exists even on freestanding compilers.
f73dda09
JA
4324 # On the NeXT, cc -E runs the code through the compiler's parser,
4325 # not just through cpp. "Syntax error" is here to catch this case.
ac50fbac 4326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
4327/* end confdefs.h. */
4328#ifdef __STDC__
4329# include <limits.h>
4330#else
4331# include <assert.h>
4332#endif
4333 Syntax error
f73dda09 4334_ACEOF
ac50fbac 4335if ac_fn_c_try_cpp "$LINENO"; then :
0628567a 4336
ac50fbac 4337else
f73dda09
JA
4338 # Broken: fails on valid input.
4339continue
4340fi
ac50fbac 4341rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09 4342
3185942a 4343 # OK, works on sane cases. Now check whether nonexistent headers
f73dda09 4344 # can be detected and how.
ac50fbac 4345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4346/* end confdefs.h. */
f73dda09
JA
4347#include <ac_nonexistent.h>
4348_ACEOF
ac50fbac 4349if ac_fn_c_try_cpp "$LINENO"; then :
f73dda09
JA
4350 # Broken: success on invalid input.
4351continue
4352else
f73dda09
JA
4353 # Passes both tests.
4354ac_preproc_ok=:
4355break
ccc6cda3 4356fi
ac50fbac 4357rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09
JA
4358
4359done
4360# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
ac50fbac
CR
4361rm -f conftest.i conftest.err conftest.$ac_ext
4362if $ac_preproc_ok; then :
4363
ccc6cda3 4364else
ac50fbac 4365 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 4366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
4367as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4368See \`config.log' for more details" "$LINENO" 5; }
ccc6cda3 4369fi
ccc6cda3 4370
f73dda09
JA
4371ac_ext=c
4372ac_cpp='$CPP $CPPFLAGS'
4373ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4374ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4375ac_compiler_gnu=$ac_cv_c_compiler_gnu
4376
b80f6443 4377
ac50fbac 4378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3185942a 4379$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
ac50fbac 4380if ${ac_cv_path_GREP+:} false; then :
3185942a
JA
4381 $as_echo_n "(cached) " >&6
4382else
4383 if test -z "$GREP"; then
4384 ac_path_GREP_found=false
4385 # Loop through the user's path and test for each of PROGNAME-LIST
4386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4387for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4388do
4389 IFS=$as_save_IFS
4390 test -z "$as_dir" && as_dir=.
ac50fbac 4391 for ac_prog in grep ggrep; do
3185942a
JA
4392 for ac_exec_ext in '' $ac_executable_extensions; do
4393 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
ac50fbac 4394 as_fn_executable_p "$ac_path_GREP" || continue
3185942a
JA
4395# Check for GNU ac_path_GREP and select it if it is found.
4396 # Check for GNU $ac_path_GREP
4397case `"$ac_path_GREP" --version 2>&1` in
4398*GNU*)
4399 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4400*)
4401 ac_count=0
4402 $as_echo_n 0123456789 >"conftest.in"
4403 while :
4404 do
4405 cat "conftest.in" "conftest.in" >"conftest.tmp"
4406 mv "conftest.tmp" "conftest.in"
4407 cp "conftest.in" "conftest.nl"
4408 $as_echo 'GREP' >> "conftest.nl"
4409 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4410 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac50fbac 4411 as_fn_arith $ac_count + 1 && ac_count=$as_val
3185942a
JA
4412 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4413 # Best one so far, save it but keep looking for a better one
4414 ac_cv_path_GREP="$ac_path_GREP"
4415 ac_path_GREP_max=$ac_count
4416 fi
4417 # 10*(2^10) chars as input seems more than enough
4418 test $ac_count -gt 10 && break
4419 done
4420 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4421esac
4422
4423 $ac_path_GREP_found && break 3
4424 done
4425 done
ac50fbac 4426 done
3185942a
JA
4427IFS=$as_save_IFS
4428 if test -z "$ac_cv_path_GREP"; then
ac50fbac 4429 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3185942a
JA
4430 fi
4431else
4432 ac_cv_path_GREP=$GREP
4433fi
4434
4435fi
ac50fbac 4436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3185942a
JA
4437$as_echo "$ac_cv_path_GREP" >&6; }
4438 GREP="$ac_cv_path_GREP"
4439
4440
ac50fbac 4441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3185942a 4442$as_echo_n "checking for egrep... " >&6; }
ac50fbac 4443if ${ac_cv_path_EGREP+:} false; then :
3185942a 4444 $as_echo_n "(cached) " >&6
0628567a 4445else
3185942a
JA
4446 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4447 then ac_cv_path_EGREP="$GREP -E"
4448 else
4449 if test -z "$EGREP"; then
4450 ac_path_EGREP_found=false
4451 # Loop through the user's path and test for each of PROGNAME-LIST
4452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4454do
4455 IFS=$as_save_IFS
4456 test -z "$as_dir" && as_dir=.
ac50fbac 4457 for ac_prog in egrep; do
3185942a
JA
4458 for ac_exec_ext in '' $ac_executable_extensions; do
4459 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
ac50fbac 4460 as_fn_executable_p "$ac_path_EGREP" || continue
3185942a
JA
4461# Check for GNU ac_path_EGREP and select it if it is found.
4462 # Check for GNU $ac_path_EGREP
4463case `"$ac_path_EGREP" --version 2>&1` in
4464*GNU*)
4465 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4466*)
4467 ac_count=0
4468 $as_echo_n 0123456789 >"conftest.in"
4469 while :
4470 do
4471 cat "conftest.in" "conftest.in" >"conftest.tmp"
4472 mv "conftest.tmp" "conftest.in"
4473 cp "conftest.in" "conftest.nl"
4474 $as_echo 'EGREP' >> "conftest.nl"
4475 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4476 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac50fbac 4477 as_fn_arith $ac_count + 1 && ac_count=$as_val
3185942a
JA
4478 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4479 # Best one so far, save it but keep looking for a better one
4480 ac_cv_path_EGREP="$ac_path_EGREP"
4481 ac_path_EGREP_max=$ac_count
0628567a 4482 fi
3185942a
JA
4483 # 10*(2^10) chars as input seems more than enough
4484 test $ac_count -gt 10 && break
4485 done
4486 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4487esac
4488
4489 $ac_path_EGREP_found && break 3
4490 done
4491 done
ac50fbac 4492 done
3185942a
JA
4493IFS=$as_save_IFS
4494 if test -z "$ac_cv_path_EGREP"; then
ac50fbac 4495 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3185942a
JA
4496 fi
4497else
4498 ac_cv_path_EGREP=$EGREP
0628567a 4499fi
0628567a 4500
3185942a
JA
4501 fi
4502fi
ac50fbac 4503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3185942a
JA
4504$as_echo "$ac_cv_path_EGREP" >&6; }
4505 EGREP="$ac_cv_path_EGREP"
0628567a 4506
3185942a 4507
ac50fbac 4508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3185942a 4509$as_echo_n "checking for ANSI C header files... " >&6; }
ac50fbac 4510if ${ac_cv_header_stdc+:} false; then :
3185942a 4511 $as_echo_n "(cached) " >&6
ccc6cda3 4512else
ac50fbac 4513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4514/* end confdefs.h. */
b80f6443
JA
4515#include <stdlib.h>
4516#include <stdarg.h>
4517#include <string.h>
4518#include <float.h>
4519
0628567a
JA
4520int
4521main ()
4522{
4523
4524 ;
4525 return 0;
4526}
b80f6443 4527_ACEOF
ac50fbac 4528if ac_fn_c_try_compile "$LINENO"; then :
b80f6443
JA
4529 ac_cv_header_stdc=yes
4530else
ac50fbac 4531 ac_cv_header_stdc=no
b80f6443 4532fi
3185942a 4533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b80f6443
JA
4534
4535if test $ac_cv_header_stdc = yes; then
4536 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ac50fbac 4537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4538/* end confdefs.h. */
b80f6443
JA
4539#include <string.h>
4540
4541_ACEOF
4542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac
CR
4543 $EGREP "memchr" >/dev/null 2>&1; then :
4544
b80f6443
JA
4545else
4546 ac_cv_header_stdc=no
4547fi
4548rm -f conftest*
4549
4550fi
4551
4552if test $ac_cv_header_stdc = yes; then
4553 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ac50fbac 4554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4555/* end confdefs.h. */
b80f6443
JA
4556#include <stdlib.h>
4557
4558_ACEOF
4559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac
CR
4560 $EGREP "free" >/dev/null 2>&1; then :
4561
b80f6443
JA
4562else
4563 ac_cv_header_stdc=no
4564fi
4565rm -f conftest*
4566
4567fi
4568
4569if test $ac_cv_header_stdc = yes; then
4570 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ac50fbac 4571 if test "$cross_compiling" = yes; then :
b80f6443
JA
4572 :
4573else
ac50fbac 4574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4575/* end confdefs.h. */
b80f6443 4576#include <ctype.h>
3185942a 4577#include <stdlib.h>
b80f6443
JA
4578#if ((' ' & 0x0FF) == 0x020)
4579# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4580# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4581#else
0628567a
JA
4582# define ISLOWER(c) \
4583 (('a' <= (c) && (c) <= 'i') \
4584 || ('j' <= (c) && (c) <= 'r') \
4585 || ('s' <= (c) && (c) <= 'z'))
b80f6443
JA
4586# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4587#endif
4588
4589#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4590int
4591main ()
4592{
4593 int i;
4594 for (i = 0; i < 256; i++)
4595 if (XOR (islower (i), ISLOWER (i))
0628567a 4596 || toupper (i) != TOUPPER (i))
3185942a
JA
4597 return 2;
4598 return 0;
b80f6443
JA
4599}
4600_ACEOF
ac50fbac 4601if ac_fn_c_try_run "$LINENO"; then :
0628567a 4602
ac50fbac
CR
4603else
4604 ac_cv_header_stdc=no
b80f6443 4605fi
ac50fbac
CR
4606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4607 conftest.$ac_objext conftest.beam conftest.$ac_ext
b80f6443 4608fi
3185942a 4609
b80f6443
JA
4610fi
4611fi
ac50fbac 4612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3185942a 4613$as_echo "$ac_cv_header_stdc" >&6; }
b80f6443
JA
4614if test $ac_cv_header_stdc = yes; then
4615
ac50fbac 4616$as_echo "#define STDC_HEADERS 1" >>confdefs.h
b80f6443
JA
4617
4618fi
4619
4620# On IRIX 5.3, sys/types and inttypes.h are conflicting.
ac50fbac
CR
4621for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4622 inttypes.h stdint.h unistd.h
4623do :
4624 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4625ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4626"
4627if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4628 cat >>confdefs.h <<_ACEOF
4629#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4630_ACEOF
b80f6443 4631
ac50fbac 4632fi
b80f6443 4633
ac50fbac 4634done
b80f6443
JA
4635
4636
4637
ac50fbac
CR
4638 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4639if test "x$ac_cv_header_minix_config_h" = xyes; then :
4640 MINIX=yes
4641else
4642 MINIX=
4643fi
b80f6443
JA
4644
4645
ac50fbac 4646 if test "$MINIX" = yes; then
b80f6443 4647
ac50fbac 4648$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
b80f6443 4649
b80f6443 4650
ac50fbac 4651$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
b80f6443 4652
ccc6cda3 4653
ac50fbac 4654$as_echo "#define _MINIX 1" >>confdefs.h
ccc6cda3 4655
3185942a 4656 fi
ccc6cda3 4657
b80f6443 4658
ac50fbac 4659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3185942a 4660$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
ac50fbac 4661if ${ac_cv_safe_to_define___extensions__+:} false; then :
3185942a
JA
4662 $as_echo_n "(cached) " >&6
4663else
ac50fbac 4664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4665/* end confdefs.h. */
4666
ac50fbac
CR
4667# define __EXTENSIONS__ 1
4668 $ac_includes_default
3185942a
JA
4669int
4670main ()
4671{
4672
4673 ;
4674 return 0;
4675}
4676_ACEOF
ac50fbac 4677if ac_fn_c_try_compile "$LINENO"; then :
3185942a
JA
4678 ac_cv_safe_to_define___extensions__=yes
4679else
ac50fbac 4680 ac_cv_safe_to_define___extensions__=no
3185942a 4681fi
3185942a
JA
4682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4683fi
ac50fbac 4684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3185942a
JA
4685$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4686 test $ac_cv_safe_to_define___extensions__ = yes &&
ac50fbac 4687 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
3185942a 4688
ac50fbac 4689 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
3185942a 4690
ac50fbac 4691 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
3185942a 4692
ac50fbac
CR
4693 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4694
4695 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
3185942a 4696
3185942a
JA
4697
4698
4699
4700# Check whether --enable-largefile was given.
ac50fbac 4701if test "${enable_largefile+set}" = set; then :
3185942a
JA
4702 enableval=$enable_largefile;
4703fi
f73dda09 4704
f73dda09 4705if test "$enable_largefile" != no; then
ccc6cda3 4706
ac50fbac 4707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
3185942a 4708$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
ac50fbac 4709if ${ac_cv_sys_largefile_CC+:} false; then :
3185942a 4710 $as_echo_n "(cached) " >&6
bb70624e 4711else
f73dda09
JA
4712 ac_cv_sys_largefile_CC=no
4713 if test "$GCC" != yes; then
4714 ac_save_CC=$CC
4715 while :; do
3185942a
JA
4716 # IRIX 6.2 and later do not support large files by default,
4717 # so use the C compiler's -n32 option if that helps.
ac50fbac 4718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4719/* end confdefs.h. */
f73dda09
JA
4720#include <sys/types.h>
4721 /* Check that off_t can represent 2**63 - 1 correctly.
4722 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4723 since some C++ compilers masquerading as C compilers
4724 incorrectly reject 9223372036854775807. */
4725#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4726 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4727 && LARGE_OFF_T % 2147483647 == 1)
4728 ? 1 : -1];
4729int
4730main ()
4731{
bb70624e 4732
f73dda09
JA
4733 ;
4734 return 0;
4735}
4736_ACEOF
ac50fbac 4737 if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4738 break
f73dda09 4739fi
3185942a
JA
4740rm -f core conftest.err conftest.$ac_objext
4741 CC="$CC -n32"
ac50fbac 4742 if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4743 ac_cv_sys_largefile_CC=' -n32'; break
f73dda09 4744fi
3185942a 4745rm -f core conftest.err conftest.$ac_objext
0628567a 4746 break
f73dda09
JA
4747 done
4748 CC=$ac_save_CC
4749 rm -f conftest.$ac_ext
4750 fi
bb70624e 4751fi
ac50fbac 4752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
3185942a 4753$as_echo "$ac_cv_sys_largefile_CC" >&6; }
f73dda09
JA
4754 if test "$ac_cv_sys_largefile_CC" != no; then
4755 CC=$CC$ac_cv_sys_largefile_CC
4756 fi
bb70624e 4757
ac50fbac 4758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
3185942a 4759$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
ac50fbac 4760if ${ac_cv_sys_file_offset_bits+:} false; then :
3185942a 4761 $as_echo_n "(cached) " >&6
bb70624e 4762else
f73dda09 4763 while :; do
ac50fbac 4764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4765/* end confdefs.h. */
f73dda09
JA
4766#include <sys/types.h>
4767 /* Check that off_t can represent 2**63 - 1 correctly.
4768 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4769 since some C++ compilers masquerading as C compilers
4770 incorrectly reject 9223372036854775807. */
4771#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4772 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4773 && LARGE_OFF_T % 2147483647 == 1)
4774 ? 1 : -1];
4775int
4776main ()
4777{
bb70624e 4778
f73dda09
JA
4779 ;
4780 return 0;
4781}
4782_ACEOF
ac50fbac 4783if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4784 ac_cv_sys_file_offset_bits=no; break
bb70624e 4785fi
3185942a 4786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac50fbac 4787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4788/* end confdefs.h. */
f73dda09
JA
4789#define _FILE_OFFSET_BITS 64
4790#include <sys/types.h>
4791 /* Check that off_t can represent 2**63 - 1 correctly.
4792 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4793 since some C++ compilers masquerading as C compilers
4794 incorrectly reject 9223372036854775807. */
4795#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4796 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4797 && LARGE_OFF_T % 2147483647 == 1)
4798 ? 1 : -1];
4799int
4800main ()
4801{
bb70624e 4802
f73dda09
JA
4803 ;
4804 return 0;
4805}
4806_ACEOF
ac50fbac 4807if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4808 ac_cv_sys_file_offset_bits=64; break
f73dda09 4809fi
3185942a
JA
4810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4811 ac_cv_sys_file_offset_bits=unknown
f73dda09
JA
4812 break
4813done
4814fi
ac50fbac 4815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
3185942a
JA
4816$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4817case $ac_cv_sys_file_offset_bits in #(
4818 no | unknown) ;;
4819 *)
b80f6443 4820cat >>confdefs.h <<_ACEOF
f73dda09 4821#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
b80f6443 4822_ACEOF
3185942a
JA
4823;;
4824esac
4825rm -rf conftest*
4826 if test $ac_cv_sys_file_offset_bits = unknown; then
ac50fbac 4827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
3185942a 4828$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
ac50fbac 4829if ${ac_cv_sys_large_files+:} false; then :
3185942a 4830 $as_echo_n "(cached) " >&6
bb70624e 4831else
f73dda09 4832 while :; do
ac50fbac 4833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4834/* end confdefs.h. */
f73dda09
JA
4835#include <sys/types.h>
4836 /* Check that off_t can represent 2**63 - 1 correctly.
4837 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4838 since some C++ compilers masquerading as C compilers
4839 incorrectly reject 9223372036854775807. */
4840#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4841 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4842 && LARGE_OFF_T % 2147483647 == 1)
4843 ? 1 : -1];
4844int
4845main ()
4846{
4847
4848 ;
4849 return 0;
4850}
4851_ACEOF
ac50fbac 4852if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4853 ac_cv_sys_large_files=no; break
bb70624e 4854fi
3185942a 4855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac50fbac 4856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4857/* end confdefs.h. */
f73dda09
JA
4858#define _LARGE_FILES 1
4859#include <sys/types.h>
4860 /* Check that off_t can represent 2**63 - 1 correctly.
4861 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4862 since some C++ compilers masquerading as C compilers
4863 incorrectly reject 9223372036854775807. */
4864#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4865 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4866 && LARGE_OFF_T % 2147483647 == 1)
4867 ? 1 : -1];
4868int
4869main ()
4870{
bb70624e 4871
f73dda09
JA
4872 ;
4873 return 0;
4874}
4875_ACEOF
ac50fbac 4876if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4877 ac_cv_sys_large_files=1; break
f73dda09 4878fi
3185942a
JA
4879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4880 ac_cv_sys_large_files=unknown
f73dda09
JA
4881 break
4882done
4883fi
ac50fbac 4884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
3185942a
JA
4885$as_echo "$ac_cv_sys_large_files" >&6; }
4886case $ac_cv_sys_large_files in #(
4887 no | unknown) ;;
4888 *)
b80f6443 4889cat >>confdefs.h <<_ACEOF
f73dda09 4890#define _LARGE_FILES $ac_cv_sys_large_files
b80f6443 4891_ACEOF
3185942a
JA
4892;;
4893esac
4894rm -rf conftest*
4895 fi
ac50fbac
CR
4896
4897
f73dda09 4898fi
cce855bc 4899
b80f6443
JA
4900
4901
0628567a 4902SIGNAMES_O=
b72432fd
JA
4903SIGNAMES_H=lsignames.h
4904
b80f6443
JA
4905
4906
0628567a 4907CROSS_COMPILE=
cce855bc
JA
4908if test "x$cross_compiling" = "xyes"; then
4909 case "${host}" in
28ef6c31 4910 *-cygwin*)
cce855bc 4911 cross_cache=${srcdir}/cross-build/cygwin32.cache
cce855bc 4912 ;;
95732b49
JA
4913 *-mingw*)
4914 cross_cache=${srcdir}/cross-build/cygwin32.cache
4915 ;;
b72432fd
JA
4916 i[3456]86-*-beos*)
4917 cross_cache=${srcdir}/cross-build/x86-beos.cache
b72432fd 4918 ;;
d233b485
CR
4919 *-qnx*)
4920 cross_cache=${srcdir}/cross-build/qnx.cache
4921 ;;
b72432fd 4922 *) echo "configure: cross-compiling for $host is not supported" >&2
cce855bc
JA
4923 ;;
4924 esac
b72432fd
JA
4925 if test -n "${cross_cache}" && test -r "${cross_cache}"; then
4926 echo "loading cross-build cache file ${cross_cache}"
4927 . ${cross_cache}
4928 fi
4929 unset cross_cache
0628567a 4930 SIGNAMES_O='signames.o'
95732b49
JA
4931 CROSS_COMPILE='-DCROSS_COMPILING'
4932
cce855bc
JA
4933fi
4934
b80f6443 4935
0628567a 4936
b80f6443 4937
ac50fbac
CR
4938CFLAGS=${CFLAGS-"$AUTO_CFLAGS"}
4939# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX
ccc6cda3 4940
cce855bc
JA
4941if test "$opt_profiling" = "yes"; then
4942 PROFILE_FLAGS=-pg
b72432fd 4943 case "$host_os" in
d233b485 4944 solaris2*|linux*) ;;
b72432fd
JA
4945 *) opt_static_link=yes ;;
4946 esac
7117c2d2 4947 DEBUG= MALLOC_DEBUG=
cce855bc
JA
4948fi
4949
ac50fbac
CR
4950prefer_shared=yes
4951prefer_static=no
4952
cce855bc 4953if test "$opt_static_link" = yes; then
ac50fbac
CR
4954 prefer_static=yes
4955 prefer_shared=no
f73dda09
JA
4956 # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
4957 if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
b72432fd 4958 STATIC_LD="-static"
f73dda09 4959 case "$host_os" in
d233b485 4960 solaris2*|linux*) ;;
f73dda09
JA
4961 *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental
4962 esac
cce855bc
JA
4963 fi
4964fi
4965
ac50fbac
CR
4966# set the appropriate make variables for building the "build tools"
4967# modify defaults based on whether or not we are cross compiling, since the
4968# options for the target host may not be appropriate for the build host
b80f6443 4969if test "X$cross_compiling" = "Xno"; then
ac50fbac
CR
4970 CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'}
4971 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)'
d233b485
CR
4972 if test X"$opt_profiling" = Xyes; then
4973 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(BASE_LDFLAGS)'}
4974 else
4975 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'}
4976 fi
ac50fbac
CR
4977 # CFLAGS set above to default value if not passed in environment
4978 CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'}
4979 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'}
b80f6443 4980else
ac50fbac 4981 CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"}
b80f6443
JA
4982 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
4983 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
ac50fbac
CR
4984 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"}
4985 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""}
b80f6443
JA
4986fi
4987
ac50fbac 4988
7117c2d2 4989
b80f6443
JA
4990
4991
4992
4993
4994
4995
4996
4997
4998
f73dda09 4999if test $ac_cv_c_compiler_gnu = yes; then
ac50fbac 5000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
3185942a 5001$as_echo_n "checking whether $CC needs -traditional... " >&6; }
ac50fbac 5002if ${ac_cv_prog_gcc_traditional+:} false; then :
3185942a 5003 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5004else
5005 ac_pattern="Autoconf.*'x'"
ac50fbac 5006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5007/* end confdefs.h. */
ccc6cda3
JA
5008#include <sgtty.h>
5009Autoconf TIOCGETP
f73dda09 5010_ACEOF
ccc6cda3 5011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 5012 $EGREP "$ac_pattern" >/dev/null 2>&1; then :
ccc6cda3
JA
5013 ac_cv_prog_gcc_traditional=yes
5014else
ccc6cda3
JA
5015 ac_cv_prog_gcc_traditional=no
5016fi
5017rm -f conftest*
5018
b80f6443 5019
ccc6cda3 5020 if test $ac_cv_prog_gcc_traditional = no; then
ac50fbac 5021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5022/* end confdefs.h. */
ccc6cda3
JA
5023#include <termio.h>
5024Autoconf TCGETA
f73dda09 5025_ACEOF
ccc6cda3 5026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 5027 $EGREP "$ac_pattern" >/dev/null 2>&1; then :
ccc6cda3
JA
5028 ac_cv_prog_gcc_traditional=yes
5029fi
5030rm -f conftest*
5031
5032 fi
5033fi
ac50fbac 5034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
3185942a 5035$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
ccc6cda3
JA
5036 if test $ac_cv_prog_gcc_traditional = yes; then
5037 CC="$CC -traditional"
5038 fi
5039fi
5040
b80f6443
JA
5041
5042
f73dda09 5043if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no"
b72432fd 5044then
f73dda09
JA
5045 # If the user specified --with-installed-readline=PREFIX and PREFIX
5046 # is not `yes', set ac_cv_rl_prefix to PREFIX
5047 test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline
b72432fd 5048
b80f6443 5049
bb70624e
JA
5050if test "X$bash_cv_termcap_lib" = "X"; then
5051_bash_needmsg=yes
5052else
ac50fbac 5053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 5054$as_echo_n "checking which library has the termcap functions... " >&6; }
bb70624e
JA
5055_bash_needmsg=
5056fi
ac50fbac 5057if ${bash_cv_termcap_lib+:} false; then :
3185942a 5058 $as_echo_n "(cached) " >&6
bb70624e 5059else
ac50fbac
CR
5060 ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
5061if test "x$ac_cv_func_tgetent" = xyes; then :
5062 bash_cv_termcap_lib=libc
5063else
5064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
5065$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
5066if ${ac_cv_lib_termcap_tgetent+:} false; then :
3185942a 5067 $as_echo_n "(cached) " >&6
b80f6443 5068else
ac50fbac
CR
5069 ac_check_lib_save_LIBS=$LIBS
5070LIBS="-ltermcap $LIBS"
5071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5072/* end confdefs.h. */
0628567a 5073
3185942a
JA
5074/* Override any GCC internal prototype to avoid an error.
5075 Use char because int might match the return type of a GCC
5076 builtin and then its argument prototype would still apply. */
b80f6443
JA
5077#ifdef __cplusplus
5078extern "C"
b80f6443 5079#endif
b80f6443 5080char tgetent ();
0628567a
JA
5081int
5082main ()
5083{
3185942a 5084return tgetent ();
b80f6443
JA
5085 ;
5086 return 0;
5087}
5088_ACEOF
ac50fbac
CR
5089if ac_fn_c_try_link "$LINENO"; then :
5090 ac_cv_lib_termcap_tgetent=yes
b80f6443 5091else
ac50fbac 5092 ac_cv_lib_termcap_tgetent=no
b80f6443 5093fi
ac50fbac
CR
5094rm -f core conftest.err conftest.$ac_objext \
5095 conftest$ac_exeext conftest.$ac_ext
5096LIBS=$ac_check_lib_save_LIBS
b80f6443 5097fi
ac50fbac 5098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
3185942a 5099$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
ac50fbac 5100if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
bb70624e
JA
5101 bash_cv_termcap_lib=libtermcap
5102else
ac50fbac 5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
3185942a 5104$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
ac50fbac 5105if ${ac_cv_lib_tinfo_tgetent+:} false; then :
3185942a 5106 $as_echo_n "(cached) " >&6
bb70624e 5107else
f73dda09
JA
5108 ac_check_lib_save_LIBS=$LIBS
5109LIBS="-ltinfo $LIBS"
ac50fbac 5110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5111/* end confdefs.h. */
f73dda09 5112
3185942a
JA
5113/* Override any GCC internal prototype to avoid an error.
5114 Use char because int might match the return type of a GCC
5115 builtin and then its argument prototype would still apply. */
f73dda09
JA
5116#ifdef __cplusplus
5117extern "C"
5118#endif
f73dda09
JA
5119char tgetent ();
5120int
5121main ()
5122{
3185942a 5123return tgetent ();
f73dda09
JA
5124 ;
5125 return 0;
5126}
5127_ACEOF
ac50fbac 5128if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5129 ac_cv_lib_tinfo_tgetent=yes
5130else
ac50fbac 5131 ac_cv_lib_tinfo_tgetent=no
f73dda09 5132fi
ac50fbac
CR
5133rm -f core conftest.err conftest.$ac_objext \
5134 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5135LIBS=$ac_check_lib_save_LIBS
5136fi
ac50fbac 5137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
3185942a 5138$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
ac50fbac 5139if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
7117c2d2 5140 bash_cv_termcap_lib=libtinfo
f73dda09 5141else
ac50fbac 5142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
3185942a 5143$as_echo_n "checking for tgetent in -lcurses... " >&6; }
ac50fbac 5144if ${ac_cv_lib_curses_tgetent+:} false; then :
3185942a 5145 $as_echo_n "(cached) " >&6
f73dda09
JA
5146else
5147 ac_check_lib_save_LIBS=$LIBS
5148LIBS="-lcurses $LIBS"
ac50fbac 5149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5150/* end confdefs.h. */
b72432fd 5151
3185942a
JA
5152/* Override any GCC internal prototype to avoid an error.
5153 Use char because int might match the return type of a GCC
5154 builtin and then its argument prototype would still apply. */
f73dda09
JA
5155#ifdef __cplusplus
5156extern "C"
5157#endif
f73dda09
JA
5158char tgetent ();
5159int
5160main ()
5161{
3185942a 5162return tgetent ();
f73dda09
JA
5163 ;
5164 return 0;
5165}
5166_ACEOF
ac50fbac 5167if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5168 ac_cv_lib_curses_tgetent=yes
5169else
ac50fbac 5170 ac_cv_lib_curses_tgetent=no
f73dda09 5171fi
ac50fbac
CR
5172rm -f core conftest.err conftest.$ac_objext \
5173 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5174LIBS=$ac_check_lib_save_LIBS
5175fi
ac50fbac 5176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
3185942a 5177$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
ac50fbac 5178if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
bb70624e
JA
5179 bash_cv_termcap_lib=libcurses
5180else
ac50fbac 5181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
3185942a 5182$as_echo_n "checking for tgetent in -lncurses... " >&6; }
ac50fbac 5183if ${ac_cv_lib_ncurses_tgetent+:} false; then :
3185942a 5184 $as_echo_n "(cached) " >&6
bb70624e 5185else
f73dda09 5186 ac_check_lib_save_LIBS=$LIBS
bb70624e 5187LIBS="-lncurses $LIBS"
ac50fbac 5188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5189/* end confdefs.h. */
f73dda09 5190
3185942a
JA
5191/* Override any GCC internal prototype to avoid an error.
5192 Use char because int might match the return type of a GCC
5193 builtin and then its argument prototype would still apply. */
f73dda09
JA
5194#ifdef __cplusplus
5195extern "C"
5196#endif
f73dda09
JA
5197char tgetent ();
5198int
5199main ()
5200{
3185942a 5201return tgetent ();
f73dda09
JA
5202 ;
5203 return 0;
5204}
5205_ACEOF
ac50fbac 5206if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5207 ac_cv_lib_ncurses_tgetent=yes
5208else
ac50fbac 5209 ac_cv_lib_ncurses_tgetent=no
f73dda09 5210fi
ac50fbac
CR
5211rm -f core conftest.err conftest.$ac_objext \
5212 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5213LIBS=$ac_check_lib_save_LIBS
5214fi
ac50fbac 5215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
3185942a 5216$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
ac50fbac 5217if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
f73dda09 5218 bash_cv_termcap_lib=libncurses
d233b485
CR
5219else
5220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
5221$as_echo_n "checking for tgetent in -lncursesw... " >&6; }
5222if ${ac_cv_lib_ncursesw_tgetent+:} false; then :
5223 $as_echo_n "(cached) " >&6
5224else
5225 ac_check_lib_save_LIBS=$LIBS
5226LIBS="-lncursesw $LIBS"
5227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5228/* end confdefs.h. */
5229
5230/* Override any GCC internal prototype to avoid an error.
5231 Use char because int might match the return type of a GCC
5232 builtin and then its argument prototype would still apply. */
5233#ifdef __cplusplus
5234extern "C"
5235#endif
5236char tgetent ();
5237int
5238main ()
5239{
5240return tgetent ();
5241 ;
5242 return 0;
5243}
5244_ACEOF
5245if ac_fn_c_try_link "$LINENO"; then :
5246 ac_cv_lib_ncursesw_tgetent=yes
5247else
5248 ac_cv_lib_ncursesw_tgetent=no
5249fi
5250rm -f core conftest.err conftest.$ac_objext \
5251 conftest$ac_exeext conftest.$ac_ext
5252LIBS=$ac_check_lib_save_LIBS
5253fi
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
5255$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; }
5256if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then :
5257 bash_cv_termcap_lib=libncursesw
bb70624e 5258else
f73dda09 5259 bash_cv_termcap_lib=gnutermcap
bb70624e 5260fi
bb70624e 5261
bb70624e
JA
5262fi
5263
5264fi
5265
5266fi
5267
5268fi
5269
b80f6443
JA
5270fi
5271
d233b485
CR
5272fi
5273
bb70624e 5274if test "X$_bash_needmsg" = "Xyes"; then
ac50fbac 5275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 5276$as_echo_n "checking which library has the termcap functions... " >&6; }
bb70624e 5277fi
ac50fbac 5278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5
3185942a 5279$as_echo "using $bash_cv_termcap_lib" >&6; }
bb70624e
JA
5280if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
5281LDFLAGS="$LDFLAGS -L./lib/termcap"
5282TERMCAP_LIB="./lib/termcap/libtermcap.a"
5283TERMCAP_DEP="./lib/termcap/libtermcap.a"
5284elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
5285TERMCAP_LIB=-ltermcap
5286TERMCAP_DEP=
f73dda09
JA
5287elif test $bash_cv_termcap_lib = libtinfo; then
5288TERMCAP_LIB=-ltinfo
5289TERMCAP_DEP=
bb70624e
JA
5290elif test $bash_cv_termcap_lib = libncurses; then
5291TERMCAP_LIB=-lncurses
5292TERMCAP_DEP=
b80f6443
JA
5293elif test $bash_cv_termcap_lib = libc; then
5294TERMCAP_LIB=
5295TERMCAP_DEP=
bb70624e
JA
5296else
5297TERMCAP_LIB=-lcurses
5298TERMCAP_DEP=
5299fi
5300
b80f6443
JA
5301
5302
5303
ac50fbac 5304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of installed readline library" >&5
3185942a 5305$as_echo_n "checking version of installed readline library... " >&6; }
f73dda09
JA
5306
5307# What a pain in the ass this is.
5308
5309# save cpp and ld options
5310_save_CFLAGS="$CFLAGS"
5311_save_LDFLAGS="$LDFLAGS"
5312_save_LIBS="$LIBS"
5313
5314# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
5315# allows the caller to do something like $_rl_prefix=$withval if the user
5316# specifies --with-installed-readline=PREFIX as an argument to configure
5317
5318if test -z "$ac_cv_rl_prefix"; then
5319test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
5320fi
5321
5322eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
5323eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
5324
5325LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
5326CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
5327LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
5328
ac50fbac 5329if ${ac_cv_rl_version+:} false; then :
3185942a 5330 $as_echo_n "(cached) " >&6
b80f6443 5331else
ac50fbac 5332 if test "$cross_compiling" = yes; then :
d233b485 5333 ac_cv_rl_version='8.0'
f73dda09 5334else
ac50fbac 5335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5336/* end confdefs.h. */
f73dda09
JA
5337
5338#include <stdio.h>
5339#include <readline/readline.h>
5340
95732b49
JA
5341extern int rl_gnu_readline_p;
5342
f73dda09
JA
5343main()
5344{
5345 FILE *fp;
5346 fp = fopen("conftest.rlv", "w");
95732b49
JA
5347 if (fp == 0)
5348 exit(1);
5349 if (rl_gnu_readline_p != 1)
5350 fprintf(fp, "0.0\n");
5351 else
5352 fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
f73dda09
JA
5353 fclose(fp);
5354 exit(0);
5355}
5356
5357_ACEOF
ac50fbac 5358if ac_fn_c_try_run "$LINENO"; then :
f73dda09
JA
5359 ac_cv_rl_version=`cat conftest.rlv`
5360else
ac50fbac 5361 ac_cv_rl_version='0.0'
f73dda09 5362fi
ac50fbac
CR
5363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5364 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 5365fi
3185942a 5366
b80f6443
JA
5367fi
5368
f73dda09
JA
5369
5370CFLAGS="$_save_CFLAGS"
5371LDFLAGS="$_save_LDFLAGS"
5372LIBS="$_save_LIBS"
5373
5374RL_MAJOR=0
5375RL_MINOR=0
5376
5377# (
5378case "$ac_cv_rl_version" in
53792*|3*|4*|5*|6*|7*|8*|9*)
5380 RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
7117c2d2 5381 RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'`
f73dda09
JA
5382 ;;
5383esac
5384
5385# (((
5386case $RL_MAJOR in
5387[0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;;
5388[0-9]) _RL_MAJOR=0$RL_MAJOR ;;
5389*) _RL_MAJOR=00 ;;
5390esac
5391
5392# (((
5393case $RL_MINOR in
5394[0-9][0-9]) _RL_MINOR=$RL_MINOR ;;
5395[0-9]) _RL_MINOR=0$RL_MINOR ;;
5396*) _RL_MINOR=00 ;;
5397esac
5398
5399RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
5400
5401# Readline versions greater than 4.2 have these defines in readline.h
5402
5403if test $ac_cv_rl_version = '0.0' ; then
ac50fbac 5404 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not test version of installed readline library." >&5
3185942a 5405$as_echo "$as_me: WARNING: Could not test version of installed readline library." >&2;}
f73dda09
JA
5406elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
5407 # set these for use by the caller
5408 RL_PREFIX=$ac_cv_rl_prefix
5409 RL_LIBDIR=$ac_cv_rl_libdir
5410 RL_INCLUDEDIR=$ac_cv_rl_includedir
ac50fbac 5411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5
3185942a 5412$as_echo "$ac_cv_rl_version" >&6; }
f73dda09
JA
5413else
5414
b80f6443
JA
5415
5416cat >>confdefs.h <<_ACEOF
f73dda09 5417#define RL_READLINE_VERSION $RL_VERSION
b80f6443 5418_ACEOF
f73dda09 5419
b80f6443
JA
5420
5421cat >>confdefs.h <<_ACEOF
f73dda09 5422#define RL_VERSION_MAJOR $RL_MAJOR
b80f6443 5423_ACEOF
f73dda09 5424
b80f6443
JA
5425
5426cat >>confdefs.h <<_ACEOF
f73dda09 5427#define RL_VERSION_MINOR $RL_MINOR
b80f6443
JA
5428_ACEOF
5429
5430
5431
5432
5433
f73dda09
JA
5434
5435# set these for use by the caller
5436RL_PREFIX=$ac_cv_rl_prefix
5437RL_LIBDIR=$ac_cv_rl_libdir
5438RL_INCLUDEDIR=$ac_cv_rl_includedir
bb70624e 5439
ac50fbac 5440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5
3185942a 5441$as_echo "$ac_cv_rl_version" >&6; }
bb70624e 5442
f73dda09 5443fi
bb70624e 5444
b80f6443 5445
f73dda09 5446 case "$ac_cv_rl_version" in
d233b485 5447 8*|9*) ;;
f73dda09 5448 *) opt_with_installed_readline=no
ac50fbac 5449 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5
3185942a 5450$as_echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;}
ac50fbac 5451 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using private bash version" >&5
3185942a 5452$as_echo "$as_me: WARNING: using private bash version" >&2;}
bb70624e
JA
5453 ;;
5454 esac
bb70624e
JA
5455fi
5456
95732b49 5457TILDE_LIB=-ltilde
bb70624e 5458if test $opt_readline = yes; then
ac50fbac 5459 $as_echo "#define READLINE 1" >>confdefs.h
bb70624e 5460
f73dda09 5461 if test "$opt_with_installed_readline" != "no" ; then
b80f6443
JA
5462 case "$opt_with_installed_readline" in
5463 yes) RL_INCLUDE= ;;
5464 *) case "$RL_INCLUDEDIR" in
5465 /usr/include) ;;
5466 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
5467 esac
5468 ;;
f73dda09 5469 esac
bb70624e 5470 READLINE_DEP=
95732b49
JA
5471 READLINE_LIB=-lreadline
5472 # section for OS versions that don't allow unresolved symbols
5473 # to be compiled into dynamic libraries.
5474 case "$host_os" in
5475 cygwin*) TILDE_LIB= ;;
5476 esac
bb70624e
JA
5477 else
5478 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5479 READLINE_DEP='$(READLINE_LIBRARY)'
95732b49
JA
5480 # section for OS versions that ship an older/broken version of
5481 # readline as a standard dynamic library and don't allow a
5482 # static version specified as -llibname to override the
5483 # dynamic version
5484 case "${host_os}" in
89a92869 5485 darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
95732b49
JA
5486 *) READLINE_LIB=-lreadline ;;
5487 esac
bb70624e
JA
5488 fi
5489else
5490 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5491 READLINE_LIB= READLINE_DEP=
5492fi
5493if test $opt_history = yes || test $opt_bang_history = yes; then
5494 if test $opt_history = yes; then
ac50fbac 5495 $as_echo "#define HISTORY 1" >>confdefs.h
bb70624e
JA
5496
5497 fi
5498 if test $opt_bang_history = yes; then
ac50fbac 5499 $as_echo "#define BANG_HISTORY 1" >>confdefs.h
b72432fd
JA
5500
5501 fi
f73dda09
JA
5502 if test "$opt_with_installed_readline" != "no"; then
5503 HIST_LIBDIR=$RL_LIBDIR
b72432fd 5504 HISTORY_DEP=
95732b49 5505 HISTORY_LIB=-lhistory
b80f6443
JA
5506 case "$opt_with_installed_readline" in
5507 yes) RL_INCLUDE= ;;
5508 *) case "$RL_INCLUDEDIR" in
5509 /usr/include) ;;
5510 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
5511 esac
5512 ;;
f73dda09 5513 esac
b72432fd
JA
5514 else
5515 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5516 HISTORY_DEP='$(HISTORY_LIBRARY)'
95732b49
JA
5517 # section for OS versions that ship an older version of
5518 # readline as a standard dynamic library and don't allow a
5519 # static version specified as -llibname to override the
5520 # dynamic version
5521 case "${host_os}" in
89a92869 5522 darwin[89]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;;
95732b49
JA
5523 *) HISTORY_LIB=-lhistory ;;
5524 esac
b72432fd
JA
5525 fi
5526else
5527 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5528 HISTORY_LIB= HISTORY_DEP=
5529fi
5530
b80f6443
JA
5531
5532
5533
5534
5535
5536
5537
5538
5539
95732b49 5540
ccc6cda3
JA
5541# Find a good install program. We prefer a C program (faster),
5542# so one script is as good as another. But avoid the broken or
5543# incompatible versions:
5544# SysV /etc/install, /usr/sbin/install
5545# SunOS /usr/etc/install
5546# IRIX /sbin/install
5547# AIX /bin/install
f73dda09 5548# AmigaOS /C/install, which installs bootblocks on floppy discs
bb70624e 5549# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ccc6cda3
JA
5550# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5551# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
0628567a 5552# OS/2's system install, which has a completely different semantic
ccc6cda3 5553# ./install, which can be erroneously created by make from ./install.sh.
3185942a 5554# Reject install programs that cannot install multiple files.
ac50fbac 5555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3185942a 5556$as_echo_n "checking for a BSD-compatible install... " >&6; }
ccc6cda3 5557if test -z "$INSTALL"; then
ac50fbac 5558if ${ac_cv_path_install+:} false; then :
3185942a 5559 $as_echo_n "(cached) " >&6
ccc6cda3 5560else
b80f6443
JA
5561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5562for as_dir in $PATH
5563do
5564 IFS=$as_save_IFS
5565 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5566 # Account for people who put trailing slashes in PATH elements.
5567case $as_dir/ in #((
5568 ./ | .// | /[cC]/* | \
b80f6443 5569 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
ac50fbac 5570 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
b80f6443
JA
5571 /usr/ucb/* ) ;;
5572 *)
5573 # OSF1 and SCO ODT 3.0 have their own names for install.
5574 # Don't use installbsd from OSF since it installs stuff as root
5575 # by default.
5576 for ac_prog in ginstall scoinst install; do
5577 for ac_exec_ext in '' $ac_executable_extensions; do
ac50fbac 5578 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
0628567a
JA
5579 if test $ac_prog = install &&
5580 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5581 # AIX install. It has an incompatible calling convention.
5582 :
5583 elif test $ac_prog = install &&
5584 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5585 # program-specific install script used by HP pwplus--don't use.
5586 :
5587 else
3185942a
JA
5588 rm -rf conftest.one conftest.two conftest.dir
5589 echo one > conftest.one
5590 echo two > conftest.two
5591 mkdir conftest.dir
5592 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5593 test -s conftest.one && test -s conftest.two &&
5594 test -s conftest.dir/conftest.one &&
5595 test -s conftest.dir/conftest.two
5596 then
5597 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5598 break 3
5599 fi
0628567a
JA
5600 fi
5601 fi
ccc6cda3 5602 done
b80f6443
JA
5603 done
5604 ;;
5605esac
3185942a 5606
ac50fbac 5607 done
3185942a 5608IFS=$as_save_IFS
b80f6443 5609
3185942a 5610rm -rf conftest.one conftest.two conftest.dir
ccc6cda3
JA
5611
5612fi
5613 if test "${ac_cv_path_install+set}" = set; then
f73dda09 5614 INSTALL=$ac_cv_path_install
ccc6cda3 5615 else
3185942a
JA
5616 # As a last resort, use the slow shell script. Don't cache a
5617 # value for INSTALL within a source directory, because that will
ccc6cda3 5618 # break other packages using the cache if that directory is
3185942a 5619 # removed, or if the value is a relative name.
f73dda09 5620 INSTALL=$ac_install_sh
ccc6cda3
JA
5621 fi
5622fi
ac50fbac 5623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3185942a 5624$as_echo "$INSTALL" >&6; }
ccc6cda3
JA
5625
5626# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5627# It thinks the first close brace ends the variable substitution.
5628test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5629
f73dda09 5630test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
bb70624e 5631
ccc6cda3
JA
5632test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5633
ac50fbac
CR
5634if test -n "$ac_tool_prefix"; then
5635 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5636set dummy ${ac_tool_prefix}ar; ac_word=$2
5637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5638$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5639if ${ac_cv_prog_AR+:} false; then :
3185942a 5640 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5641else
5642 if test -n "$AR"; then
5643 ac_cv_prog_AR="$AR" # Let the user override the test.
5644else
b80f6443
JA
5645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5646for as_dir in $PATH
5647do
5648 IFS=$as_save_IFS
5649 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5650 for ac_exec_ext in '' $ac_executable_extensions; do
5651 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5652 ac_cv_prog_AR="${ac_tool_prefix}ar"
5653 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5654 break 2
5655 fi
5656done
ac50fbac 5657 done
3185942a 5658IFS=$as_save_IFS
f73dda09 5659
ccc6cda3
JA
5660fi
5661fi
f73dda09 5662AR=$ac_cv_prog_AR
ccc6cda3 5663if test -n "$AR"; then
ac50fbac 5664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
3185942a 5665$as_echo "$AR" >&6; }
ccc6cda3 5666else
ac50fbac
CR
5667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668$as_echo "no" >&6; }
5669fi
5670
5671
5672fi
5673if test -z "$ac_cv_prog_AR"; then
5674 ac_ct_AR=$AR
5675 # Extract the first word of "ar", so it can be a program name with args.
5676set dummy ar; ac_word=$2
5677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5678$as_echo_n "checking for $ac_word... " >&6; }
5679if ${ac_cv_prog_ac_ct_AR+:} false; then :
5680 $as_echo_n "(cached) " >&6
5681else
5682 if test -n "$ac_ct_AR"; then
5683 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5684else
5685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5686for as_dir in $PATH
5687do
5688 IFS=$as_save_IFS
5689 test -z "$as_dir" && as_dir=.
5690 for ac_exec_ext in '' $ac_executable_extensions; do
5691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5692 ac_cv_prog_ac_ct_AR="ar"
5693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5694 break 2
5695 fi
5696done
5697 done
5698IFS=$as_save_IFS
5699
5700fi
5701fi
5702ac_ct_AR=$ac_cv_prog_ac_ct_AR
5703if test -n "$ac_ct_AR"; then
5704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5705$as_echo "$ac_ct_AR" >&6; }
5706else
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5708$as_echo "no" >&6; }
ccc6cda3
JA
5709fi
5710
ac50fbac
CR
5711 if test "x$ac_ct_AR" = x; then
5712 AR=""
5713 else
5714 case $cross_compiling:$ac_tool_warned in
5715yes:)
5716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5718ac_tool_warned=yes ;;
5719esac
5720 AR=$ac_ct_AR
5721 fi
5722else
5723 AR="$ac_cv_prog_AR"
5724fi
3185942a 5725
b72432fd 5726test -n "$ARFLAGS" || ARFLAGS="cr"
f73dda09
JA
5727if test -n "$ac_tool_prefix"; then
5728 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5729set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ac50fbac 5730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5731$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5732if ${ac_cv_prog_RANLIB+:} false; then :
3185942a 5733 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5734else
5735 if test -n "$RANLIB"; then
5736 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5737else
b80f6443
JA
5738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5739for as_dir in $PATH
5740do
5741 IFS=$as_save_IFS
5742 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5743 for ac_exec_ext in '' $ac_executable_extensions; do
5744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 5745 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
ac50fbac 5746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5747 break 2
5748 fi
5749done
ac50fbac 5750 done
3185942a 5751IFS=$as_save_IFS
f73dda09 5752
ccc6cda3
JA
5753fi
5754fi
f73dda09 5755RANLIB=$ac_cv_prog_RANLIB
ccc6cda3 5756if test -n "$RANLIB"; then
ac50fbac 5757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
3185942a 5758$as_echo "$RANLIB" >&6; }
f73dda09 5759else
ac50fbac 5760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5761$as_echo "no" >&6; }
f73dda09
JA
5762fi
5763
3185942a 5764
f73dda09
JA
5765fi
5766if test -z "$ac_cv_prog_RANLIB"; then
5767 ac_ct_RANLIB=$RANLIB
5768 # Extract the first word of "ranlib", so it can be a program name with args.
5769set dummy ranlib; ac_word=$2
ac50fbac 5770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5771$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5772if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
3185942a 5773 $as_echo_n "(cached) " >&6
f73dda09
JA
5774else
5775 if test -n "$ac_ct_RANLIB"; then
5776 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5777else
b80f6443
JA
5778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5779for as_dir in $PATH
5780do
5781 IFS=$as_save_IFS
5782 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5783 for ac_exec_ext in '' $ac_executable_extensions; do
5784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 5785 ac_cv_prog_ac_ct_RANLIB="ranlib"
ac50fbac 5786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5787 break 2
5788 fi
5789done
ac50fbac 5790 done
3185942a 5791IFS=$as_save_IFS
f73dda09 5792
f73dda09
JA
5793fi
5794fi
5795ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5796if test -n "$ac_ct_RANLIB"; then
ac50fbac 5797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
3185942a 5798$as_echo "$ac_ct_RANLIB" >&6; }
ccc6cda3 5799else
ac50fbac 5800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5801$as_echo "no" >&6; }
f73dda09
JA
5802fi
5803
3185942a
JA
5804 if test "x$ac_ct_RANLIB" = x; then
5805 RANLIB=":"
5806 else
5807 case $cross_compiling:$ac_tool_warned in
5808yes:)
ac50fbac 5809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3185942a
JA
5810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5811ac_tool_warned=yes ;;
5812esac
5813 RANLIB=$ac_ct_RANLIB
5814 fi
f73dda09
JA
5815else
5816 RANLIB="$ac_cv_prog_RANLIB"
ccc6cda3
JA
5817fi
5818
5819for ac_prog in 'bison -y' byacc
5820do
f73dda09 5821 # Extract the first word of "$ac_prog", so it can be a program name with args.
ccc6cda3 5822set dummy $ac_prog; ac_word=$2
ac50fbac 5823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5824$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5825if ${ac_cv_prog_YACC+:} false; then :
3185942a 5826 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5827else
5828 if test -n "$YACC"; then
5829 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5830else
b80f6443
JA
5831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5832for as_dir in $PATH
5833do
5834 IFS=$as_save_IFS
5835 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5836 for ac_exec_ext in '' $ac_executable_extensions; do
5837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 5838 ac_cv_prog_YACC="$ac_prog"
ac50fbac 5839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5840 break 2
5841 fi
5842done
ac50fbac 5843 done
3185942a 5844IFS=$as_save_IFS
f73dda09 5845
ccc6cda3
JA
5846fi
5847fi
f73dda09 5848YACC=$ac_cv_prog_YACC
ccc6cda3 5849if test -n "$YACC"; then
ac50fbac 5850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
3185942a 5851$as_echo "$YACC" >&6; }
ccc6cda3 5852else
ac50fbac 5853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5854$as_echo "no" >&6; }
ccc6cda3
JA
5855fi
5856
3185942a 5857
f73dda09 5858 test -n "$YACC" && break
ccc6cda3
JA
5859done
5860test -n "$YACC" || YACC="yacc"
5861
ac50fbac 5862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3185942a
JA
5863$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5864set x ${MAKE-make}
5865ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
ac50fbac 5866if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3185942a 5867 $as_echo_n "(cached) " >&6
ccc6cda3 5868else
b80f6443 5869 cat >conftest.make <<\_ACEOF
3185942a 5870SHELL = /bin/sh
ccc6cda3 5871all:
3185942a 5872 @echo '@@@%%%=$(MAKE)=@@@%%%'
b80f6443 5873_ACEOF
ac50fbac 5874# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3185942a
JA
5875case `${MAKE-make} -f conftest.make 2>/dev/null` in
5876 *@@@%%%=?*=@@@%%%*)
5877 eval ac_cv_prog_make_${ac_make}_set=yes;;
5878 *)
5879 eval ac_cv_prog_make_${ac_make}_set=no;;
5880esac
f73dda09 5881rm -f conftest.make
ccc6cda3 5882fi
3185942a 5883if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
ac50fbac 5884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3185942a 5885$as_echo "yes" >&6; }
ccc6cda3
JA
5886 SET_MAKE=
5887else
ac50fbac 5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5889$as_echo "no" >&6; }
ccc6cda3
JA
5890 SET_MAKE="MAKE=${MAKE-make}"
5891fi
5892
b80f6443 5893
ac50fbac
CR
5894case "$ac_cv_prog_YACC" in
5895*bison*) ;;
5896*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5
5897$as_echo "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;;
5898esac
5899
b72432fd 5900case "$host_os" in
bb70624e 5901opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
b72432fd
JA
5902*) MAKE_SHELL=/bin/sh ;;
5903esac
5904
5905
95732b49
JA
5906if test x$SIZE = x; then
5907 if test x$ac_tool_prefix = x; then
5908 SIZE=size
5909 else
5910 SIZE=${ac_tool_prefix}size
5911 save_IFS=$IFS ; IFS=:
5912 size_found=0
5913 for dir in $PATH; do
5914 if test -x $dir/$SIZE ; then
5915 size_found=1
5916 break
5917 fi
5918 done
5919 if test $size_found -eq 0; then
5920 SIZE=:
5921 fi
5922 IFS=$save_IFS
5923 fi
5924fi
5925
5926
ac50fbac
CR
5927# Checks for stat-related time functions.
5928
5929# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software
5930# Foundation, Inc.
5931
5932# This file is free software; the Free Software Foundation
5933# gives unlimited permission to copy and/or distribute it,
5934# with or without modifications, as long as this notice is preserved.
ccc6cda3 5935
f73dda09 5936
ac50fbac
CR
5937# st_atim.tv_nsec - Linux, Solaris, Cygwin
5938# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
5939# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
5940# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
5941
5942# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
5943# st_birthtim - Cygwin 1.7.0+
5944
5945
5946
5947# Configure checks for struct timespec
5948
5949# Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc.
5950
5951# This file is free software; the Free Software Foundation
5952# gives unlimited permission to copy and/or distribute it,
5953# with or without modifications, as long as this notice is preserved.
5954
5955# Original written by Paul Eggert and Jim Meyering.
5956# Modified by Chet Ramey for bash
5957
5958
5959
5960
5961
5962$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5963
5964
5965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
3185942a 5966$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
ac50fbac 5967if ${ac_cv_c_const+:} false; then :
3185942a 5968 $as_echo_n "(cached) " >&6
95732b49 5969else
ac50fbac 5970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
5971/* end confdefs.h. */
5972
5973int
5974main ()
f73dda09 5975{
ac50fbac 5976
f73dda09 5977#ifndef __cplusplus
ac50fbac 5978 /* Ultrix mips cc rejects this sort of thing. */
f73dda09 5979 typedef int charset[2];
ac50fbac 5980 const charset cs = { 0, 0 };
f73dda09 5981 /* SunOS 4.1.1 cc rejects this. */
3185942a
JA
5982 char const *const *pcpcc;
5983 char **ppc;
f73dda09
JA
5984 /* NEC SVR4.0.2 mips cc rejects this. */
5985 struct point {int x, y;};
5986 static struct point const zero = {0,0};
5987 /* AIX XL C 1.02.0.0 rejects this.
5988 It does not let you subtract one const X* pointer from another in
5989 an arm of an if-expression whose if-part is not a constant
5990 expression */
5991 const char *g = "string";
3185942a 5992 pcpcc = &g + (g ? g-g : 0);
f73dda09 5993 /* HPUX 7.0 cc rejects these. */
3185942a
JA
5994 ++pcpcc;
5995 ppc = (char**) pcpcc;
5996 pcpcc = (char const *const *) ppc;
ac50fbac
CR
5997 { /* SCO 3.2v4 cc rejects this sort of thing. */
5998 char tx;
5999 char *t = &tx;
f73dda09
JA
6000 char const *s = 0 ? (char *) 0 : (char const *) 0;
6001
6002 *t++ = 0;
3185942a 6003 if (s) return 0;
f73dda09
JA
6004 }
6005 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6006 int x[] = {25, 17};
6007 const int *foo = &x[0];
6008 ++foo;
6009 }
6010 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6011 typedef const int *iptr;
6012 iptr p = 0;
6013 ++p;
6014 }
ac50fbac 6015 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
f73dda09 6016 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
ac50fbac
CR
6017 struct s { int j; const int *ap[3]; } bx;
6018 struct s *b = &bx; b->j = 5;
f73dda09
JA
6019 }
6020 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6021 const int foo = 10;
3185942a 6022 if (!foo) return 0;
f73dda09 6023 }
3185942a 6024 return !cs[0] && !zero.x;
ccc6cda3
JA
6025#endif
6026
f73dda09
JA
6027 ;
6028 return 0;
6029}
6030_ACEOF
ac50fbac 6031if ac_fn_c_try_compile "$LINENO"; then :
f73dda09
JA
6032 ac_cv_c_const=yes
6033else
ac50fbac 6034 ac_cv_c_const=no
f73dda09 6035fi
3185942a 6036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 6037fi
ac50fbac 6038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
3185942a 6039$as_echo "$ac_cv_c_const" >&6; }
f73dda09
JA
6040if test $ac_cv_c_const = no; then
6041
ac50fbac 6042$as_echo "#define const /**/" >>confdefs.h
ccc6cda3
JA
6043
6044fi
6045
ac50fbac 6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
3185942a 6047$as_echo_n "checking for inline... " >&6; }
ac50fbac 6048if ${ac_cv_c_inline+:} false; then :
3185942a 6049 $as_echo_n "(cached) " >&6
ccc6cda3 6050else
f73dda09
JA
6051 ac_cv_c_inline=no
6052for ac_kw in inline __inline__ __inline; do
ac50fbac 6053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6054/* end confdefs.h. */
f73dda09 6055#ifndef __cplusplus
0628567a
JA
6056typedef int foo_t;
6057static $ac_kw foo_t static_foo () {return 0; }
6058$ac_kw foo_t foo () {return 0; }
ccc6cda3
JA
6059#endif
6060
f73dda09 6061_ACEOF
ac50fbac 6062if ac_fn_c_try_compile "$LINENO"; then :
3185942a 6063 ac_cv_c_inline=$ac_kw
f73dda09 6064fi
3185942a
JA
6065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6066 test "$ac_cv_c_inline" != no && break
f73dda09 6067done
ccc6cda3
JA
6068
6069fi
ac50fbac 6070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
3185942a 6071$as_echo "$ac_cv_c_inline" >&6; }
0628567a 6072
f73dda09
JA
6073case $ac_cv_c_inline in
6074 inline | yes) ;;
0628567a
JA
6075 *)
6076 case $ac_cv_c_inline in
6077 no) ac_val=;;
6078 *) ac_val=$ac_cv_c_inline;;
6079 esac
6080 cat >>confdefs.h <<_ACEOF
6081#ifndef __cplusplus
6082#define inline $ac_val
6083#endif
b80f6443 6084_ACEOF
0628567a 6085 ;;
f73dda09 6086esac
ccc6cda3 6087
ac50fbac 6088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
3185942a 6089$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
ac50fbac 6090if ${ac_cv_c_bigendian+:} false; then :
3185942a 6091 $as_echo_n "(cached) " >&6
ccc6cda3 6092else
3185942a
JA
6093 ac_cv_c_bigendian=unknown
6094 # See if we're dealing with a universal compiler.
ac50fbac 6095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
6096/* end confdefs.h. */
6097#ifndef __APPLE_CC__
6098 not a universal capable compiler
6099 #endif
6100 typedef int dummy;
6101
6102_ACEOF
ac50fbac 6103if ac_fn_c_try_compile "$LINENO"; then :
3185942a
JA
6104
6105 # Check for potential -arch flags. It is not universal unless
ac50fbac
CR
6106 # there are at least two -arch flags with different values.
6107 ac_arch=
6108 ac_prev=
6109 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
6110 if test -n "$ac_prev"; then
6111 case $ac_word in
6112 i?86 | x86_64 | ppc | ppc64)
6113 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
6114 ac_arch=$ac_word
6115 else
6116 ac_cv_c_bigendian=universal
6117 break
6118 fi
6119 ;;
6120 esac
6121 ac_prev=
6122 elif test "x$ac_word" = "x-arch"; then
6123 ac_prev=arch
6124 fi
6125 done
3185942a 6126fi
3185942a
JA
6127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6128 if test $ac_cv_c_bigendian = unknown; then
6129 # See if sys/param.h defines the BYTE_ORDER macro.
ac50fbac 6130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6131/* end confdefs.h. */
f73dda09 6132#include <sys/types.h>
3185942a 6133 #include <sys/param.h>
ccc6cda3 6134
f73dda09
JA
6135int
6136main ()
6137{
3185942a
JA
6138#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
6139 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
6140 && LITTLE_ENDIAN)
6141 bogus endian macros
6142 #endif
ccc6cda3 6143
f73dda09
JA
6144 ;
6145 return 0;
6146}
6147_ACEOF
ac50fbac 6148if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 6149 # It does; now see whether it defined to BIG_ENDIAN or not.
ac50fbac 6150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6151/* end confdefs.h. */
f73dda09 6152#include <sys/types.h>
3185942a 6153 #include <sys/param.h>
ccc6cda3 6154
f73dda09
JA
6155int
6156main ()
6157{
6158#if BYTE_ORDER != BIG_ENDIAN
3185942a
JA
6159 not big endian
6160 #endif
ccc6cda3 6161
f73dda09
JA
6162 ;
6163 return 0;
6164}
6165_ACEOF
ac50fbac 6166if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 6167 ac_cv_c_bigendian=yes
ccc6cda3 6168else
ac50fbac 6169 ac_cv_c_bigendian=no
ccc6cda3 6170fi
3185942a 6171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185942a 6172fi
3185942a
JA
6173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6174 fi
6175 if test $ac_cv_c_bigendian = unknown; then
6176 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
ac50fbac 6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6178/* end confdefs.h. */
3185942a
JA
6179#include <limits.h>
6180
b80f6443
JA
6181int
6182main ()
6183{
3185942a
JA
6184#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6185 bogus endian macros
6186 #endif
6187
b80f6443
JA
6188 ;
6189 return 0;
6190}
6191_ACEOF
ac50fbac 6192if ac_fn_c_try_compile "$LINENO"; then :
3185942a 6193 # It does; now see whether it defined to _BIG_ENDIAN or not.
ac50fbac 6194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6195/* end confdefs.h. */
3185942a
JA
6196#include <limits.h>
6197
f73dda09
JA
6198int
6199main ()
ccc6cda3 6200{
3185942a
JA
6201#ifndef _BIG_ENDIAN
6202 not big endian
6203 #endif
6204
6205 ;
6206 return 0;
ccc6cda3 6207}
f73dda09 6208_ACEOF
ac50fbac 6209if ac_fn_c_try_compile "$LINENO"; then :
3185942a 6210 ac_cv_c_bigendian=yes
ccc6cda3 6211else
ac50fbac 6212 ac_cv_c_bigendian=no
f73dda09 6213fi
3185942a 6214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 6215fi
3185942a
JA
6216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6217 fi
6218 if test $ac_cv_c_bigendian = unknown; then
6219 # Compile a test program.
ac50fbac 6220 if test "$cross_compiling" = yes; then :
3185942a 6221 # Try to guess by grepping values from an object file.
ac50fbac 6222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
6223/* end confdefs.h. */
6224short int ascii_mm[] =
6225 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6226 short int ascii_ii[] =
6227 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6228 int use_ascii (int i) {
6229 return ascii_mm[i] + ascii_ii[i];
6230 }
6231 short int ebcdic_ii[] =
6232 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6233 short int ebcdic_mm[] =
6234 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6235 int use_ebcdic (int i) {
6236 return ebcdic_mm[i] + ebcdic_ii[i];
6237 }
6238 extern int foo;
6239
6240int
6241main ()
6242{
6243return use_ascii (foo) == use_ebcdic (foo);
6244 ;
6245 return 0;
6246}
6247_ACEOF
ac50fbac 6248if ac_fn_c_try_compile "$LINENO"; then :
3185942a
JA
6249 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6250 ac_cv_c_bigendian=yes
6251 fi
6252 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6253 if test "$ac_cv_c_bigendian" = unknown; then
6254 ac_cv_c_bigendian=no
6255 else
6256 # finding both strings is unlikely to happen, but who knows?
6257 ac_cv_c_bigendian=unknown
6258 fi
6259 fi
3185942a 6260fi
3185942a
JA
6261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6262else
ac50fbac 6263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
6264/* end confdefs.h. */
6265$ac_includes_default
6266int
6267main ()
6268{
6269
6270 /* Are we little or big endian? From Harbison&Steele. */
6271 union
6272 {
6273 long int l;
6274 char c[sizeof (long int)];
6275 } u;
6276 u.l = 1;
6277 return u.c[sizeof (long int) - 1] == 1;
6278
6279 ;
6280 return 0;
6281}
6282_ACEOF
ac50fbac 6283if ac_fn_c_try_run "$LINENO"; then :
3185942a
JA
6284 ac_cv_c_bigendian=no
6285else
ac50fbac 6286 ac_cv_c_bigendian=yes
3185942a 6287fi
ac50fbac
CR
6288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6289 conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a
JA
6290fi
6291
3185942a
JA
6292 fi
6293fi
ac50fbac 6294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
3185942a
JA
6295$as_echo "$ac_cv_c_bigendian" >&6; }
6296 case $ac_cv_c_bigendian in #(
6297 yes)
ac50fbac 6298 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
3185942a
JA
6299;; #(
6300 no)
6301 ;; #(
6302 universal)
6303
ac50fbac 6304$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3185942a
JA
6305
6306 ;; #(
6307 *)
ac50fbac
CR
6308 as_fn_error $? "unknown endianness
6309 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
3185942a 6310 esac
b80f6443 6311
ac50fbac 6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5
3185942a 6313$as_echo_n "checking for preprocessor stringizing operator... " >&6; }
ac50fbac 6314if ${ac_cv_c_stringize+:} false; then :
3185942a 6315 $as_echo_n "(cached) " >&6
ccc6cda3 6316else
ac50fbac 6317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6318/* end confdefs.h. */
f73dda09 6319#define x(y) #y
ccc6cda3 6320
f73dda09
JA
6321char *s = x(teststring);
6322_ACEOF
6323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 6324 $EGREP "#teststring" >/dev/null 2>&1; then :
f73dda09 6325 ac_cv_c_stringize=no
ccc6cda3 6326else
f73dda09 6327 ac_cv_c_stringize=yes
ccc6cda3 6328fi
f73dda09 6329rm -f conftest*
ccc6cda3
JA
6330
6331fi
ac50fbac 6332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5
3185942a 6333$as_echo "$ac_cv_c_stringize" >&6; }
f73dda09 6334if test $ac_cv_c_stringize = yes; then
ccc6cda3 6335
ac50fbac 6336$as_echo "#define HAVE_STRINGIZE 1" >>confdefs.h
ccc6cda3
JA
6337
6338fi
6339
3185942a
JA
6340
6341
ac50fbac 6342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5
3185942a 6343$as_echo_n "checking for long double with more range or precision than double... " >&6; }
ac50fbac 6344if ${ac_cv_type_long_double_wider+:} false; then :
3185942a 6345 $as_echo_n "(cached) " >&6
ccc6cda3 6346else
ac50fbac 6347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6348/* end confdefs.h. */
b80f6443 6349#include <float.h>
3185942a
JA
6350 long double const a[] =
6351 {
6352 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON,
6353 LDBL_MIN, LDBL_MAX, LDBL_EPSILON
6354 };
6355 long double
6356 f (long double x)
6357 {
6358 return ((x + (unsigned long int) 10) * (-1 / x) + a[0]
6359 + (x ? f (x) : 'c'));
6360 }
6361
f73dda09
JA
6362int
6363main ()
6364{
3185942a
JA
6365static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
6366 + (DBL_MANT_DIG < LDBL_MANT_DIG)
6367 - (LDBL_MAX_EXP < DBL_MAX_EXP)
6368 - (LDBL_MANT_DIG < DBL_MANT_DIG)))
6369 && (int) LDBL_EPSILON == 0
6370 )];
ac50fbac
CR
6371test_array [0] = 0;
6372return test_array [0];
b80f6443
JA
6373
6374 ;
6375 return 0;
ccc6cda3 6376}
f73dda09 6377_ACEOF
ac50fbac 6378if ac_fn_c_try_compile "$LINENO"; then :
3185942a 6379 ac_cv_type_long_double_wider=yes
ccc6cda3 6380else
ac50fbac 6381 ac_cv_type_long_double_wider=no
f73dda09 6382fi
3185942a 6383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 6384fi
ac50fbac 6385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5
3185942a
JA
6386$as_echo "$ac_cv_type_long_double_wider" >&6; }
6387 if test $ac_cv_type_long_double_wider = yes; then
6388
ac50fbac 6389$as_echo "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h
3185942a
JA
6390
6391 fi
6392
6393 ac_cv_c_long_double=$ac_cv_type_long_double_wider
6394 if test $ac_cv_c_long_double = yes; then
ccc6cda3 6395
ac50fbac 6396$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
ccc6cda3 6397
3185942a 6398 fi
ccc6cda3 6399
ac50fbac 6400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
3185942a
JA
6401$as_echo_n "checking for function prototypes... " >&6; }
6402if test "$ac_cv_prog_cc_c89" != no; then
ac50fbac 6403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3185942a 6404$as_echo "yes" >&6; }
ccc6cda3 6405
ac50fbac 6406$as_echo "#define PROTOTYPES 1" >>confdefs.h
ccc6cda3 6407
f73dda09 6408
ac50fbac 6409$as_echo "#define __PROTOTYPES 1" >>confdefs.h
f73dda09 6410
f73dda09 6411else
ac50fbac 6412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 6413$as_echo "no" >&6; }
f73dda09 6414fi
ccc6cda3 6415
ac50fbac 6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
3185942a 6417$as_echo_n "checking whether char is unsigned... " >&6; }
ac50fbac 6418if ${ac_cv_c_char_unsigned+:} false; then :
3185942a 6419 $as_echo_n "(cached) " >&6
ccc6cda3 6420else
ac50fbac 6421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6422/* end confdefs.h. */
f73dda09
JA
6423$ac_includes_default
6424int
ccc6cda3
JA
6425main ()
6426{
b80f6443 6427static int test_array [1 - 2 * !(((char) -1) < 0)];
ac50fbac
CR
6428test_array [0] = 0;
6429return test_array [0];
b80f6443 6430
f73dda09
JA
6431 ;
6432 return 0;
ccc6cda3 6433}
f73dda09 6434_ACEOF
ac50fbac 6435if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 6436 ac_cv_c_char_unsigned=no
ccc6cda3 6437else
ac50fbac 6438 ac_cv_c_char_unsigned=yes
ccc6cda3 6439fi
3185942a 6440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 6441fi
ac50fbac 6442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
3185942a 6443$as_echo "$ac_cv_c_char_unsigned" >&6; }
f73dda09 6444if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
ac50fbac 6445 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
ccc6cda3 6446
ccc6cda3
JA
6447fi
6448
ac50fbac 6449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
17345e5a 6450$as_echo_n "checking for working volatile... " >&6; }
ac50fbac 6451if ${ac_cv_c_volatile+:} false; then :
17345e5a
JA
6452 $as_echo_n "(cached) " >&6
6453else
ac50fbac 6454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a
JA
6455/* end confdefs.h. */
6456
6457int
6458main ()
6459{
6460
6461volatile int x;
6462int * volatile y = (int *) 0;
6463return !x && !y;
6464 ;
6465 return 0;
6466}
6467_ACEOF
ac50fbac 6468if ac_fn_c_try_compile "$LINENO"; then :
17345e5a
JA
6469 ac_cv_c_volatile=yes
6470else
ac50fbac 6471 ac_cv_c_volatile=no
17345e5a 6472fi
17345e5a
JA
6473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6474fi
ac50fbac 6475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
17345e5a
JA
6476$as_echo "$ac_cv_c_volatile" >&6; }
6477if test $ac_cv_c_volatile = no; then
6478
ac50fbac 6479$as_echo "#define volatile /**/" >>confdefs.h
17345e5a
JA
6480
6481fi
6482
ac50fbac 6483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
17345e5a 6484$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
ac50fbac 6485if ${ac_cv_c_restrict+:} false; then :
17345e5a
JA
6486 $as_echo_n "(cached) " >&6
6487else
6488 ac_cv_c_restrict=no
6489 # The order here caters to the fact that C++ does not require restrict.
6490 for ac_kw in __restrict __restrict__ _Restrict restrict; do
ac50fbac 6491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a
JA
6492/* end confdefs.h. */
6493typedef int * int_ptr;
6494 int foo (int_ptr $ac_kw ip) {
6495 return ip[0];
6496 }
6497int
6498main ()
6499{
6500int s[1];
6501 int * $ac_kw t = s;
6502 t[0] = 0;
6503 return foo(t)
6504 ;
6505 return 0;
6506}
6507_ACEOF
ac50fbac 6508if ac_fn_c_try_compile "$LINENO"; then :
17345e5a 6509 ac_cv_c_restrict=$ac_kw
17345e5a 6510fi
17345e5a
JA
6511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6512 test "$ac_cv_c_restrict" != no && break
6513 done
6514
6515fi
ac50fbac 6516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
17345e5a
JA
6517$as_echo "$ac_cv_c_restrict" >&6; }
6518
17345e5a
JA
6519 case $ac_cv_c_restrict in
6520 restrict) ;;
ac50fbac 6521 no) $as_echo "#define restrict /**/" >>confdefs.h
17345e5a
JA
6522 ;;
6523 *) cat >>confdefs.h <<_ACEOF
6524#define restrict $ac_cv_c_restrict
6525_ACEOF
6526 ;;
6527 esac
6528
ccc6cda3 6529
b80f6443
JA
6530
6531 MKINSTALLDIRS=
6532 if test -n "$ac_aux_dir"; then
6533 case "$ac_aux_dir" in
6534 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
6535 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
6536 esac
6537 fi
6538 if test -z "$MKINSTALLDIRS"; then
6539 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6540 fi
6541
6542
6543
ac50fbac 6544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
3185942a
JA
6545$as_echo_n "checking whether NLS is requested... " >&6; }
6546 # Check whether --enable-nls was given.
ac50fbac 6547if test "${enable_nls+set}" = set; then :
3185942a 6548 enableval=$enable_nls; USE_NLS=$enableval
ccc6cda3 6549else
b80f6443 6550 USE_NLS=yes
3185942a
JA
6551fi
6552
ac50fbac 6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
3185942a 6554$as_echo "$USE_NLS" >&6; }
b80f6443
JA
6555
6556
6557
6558
6559
6560
6561# Prepare PATH_SEPARATOR.
6562# The user is always right.
6563if test "${PATH_SEPARATOR+set}" != set; then
6564 echo "#! /bin/sh" >conf$$.sh
6565 echo "exit 0" >>conf$$.sh
6566 chmod +x conf$$.sh
6567 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6568 PATH_SEPARATOR=';'
6569 else
6570 PATH_SEPARATOR=:
6571 fi
6572 rm -f conf$$.sh
ccc6cda3 6573fi
ccc6cda3 6574
b80f6443
JA
6575# Find out how to test for executable files. Don't use a zero-byte file,
6576# as systems may use methods other than mode bits to determine executability.
6577cat >conf$$.file <<_ASEOF
6578#! /bin/sh
6579exit 0
6580_ASEOF
6581chmod +x conf$$.file
6582if test -x conf$$.file >/dev/null 2>&1; then
6583 ac_executable_p="test -x"
6584else
6585 ac_executable_p="test -f"
f73dda09 6586fi
b80f6443 6587rm -f conf$$.file
ccc6cda3 6588
b80f6443
JA
6589# Extract the first word of "msgfmt", so it can be a program name with args.
6590set dummy msgfmt; ac_word=$2
ac50fbac 6591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 6592$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 6593if ${ac_cv_path_MSGFMT+:} false; then :
3185942a 6594 $as_echo_n "(cached) " >&6
ccc6cda3 6595else
b80f6443
JA
6596 case "$MSGFMT" in
6597 [\\/]* | ?:[\\/]*)
6598 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6599 ;;
6600 *)
6601 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6602 for ac_dir in $PATH; do
6603 IFS="$ac_save_IFS"
6604 test -z "$ac_dir" && ac_dir=.
6605 for ac_exec_ext in '' $ac_executable_extensions; do
6606 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6607 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
6608 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
6609 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
6610 break 2
6611 fi
6612 fi
6613 done
6614 done
6615 IFS="$ac_save_IFS"
6616 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6617 ;;
6618esac
6619fi
6620MSGFMT="$ac_cv_path_MSGFMT"
6621if test "$MSGFMT" != ":"; then
ac50fbac 6622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
3185942a 6623$as_echo "$MSGFMT" >&6; }
f73dda09 6624else
ac50fbac 6625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 6626$as_echo "no" >&6; }
f73dda09 6627fi
b80f6443
JA
6628
6629 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6630set dummy gmsgfmt; ac_word=$2
ac50fbac 6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 6632$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 6633if ${ac_cv_path_GMSGFMT+:} false; then :
3185942a 6634 $as_echo_n "(cached) " >&6
b80f6443
JA
6635else
6636 case $GMSGFMT in
6637 [\\/]* | ?:[\\/]*)
6638 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6639 ;;
6640 *)
6641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6642for as_dir in $PATH
6643do
6644 IFS=$as_save_IFS
6645 test -z "$as_dir" && as_dir=.
ac50fbac
CR
6646 for ac_exec_ext in '' $ac_executable_extensions; do
6647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 6648 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
ac50fbac 6649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
6650 break 2
6651 fi
6652done
ac50fbac 6653 done
3185942a 6654IFS=$as_save_IFS
b80f6443
JA
6655
6656 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6657 ;;
6658esac
6659fi
6660GMSGFMT=$ac_cv_path_GMSGFMT
b80f6443 6661if test -n "$GMSGFMT"; then
ac50fbac 6662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
3185942a 6663$as_echo "$GMSGFMT" >&6; }
b80f6443 6664else
ac50fbac 6665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 6666$as_echo "no" >&6; }
f73dda09 6667fi
b80f6443
JA
6668
6669
6670
3185942a 6671
b80f6443
JA
6672# Prepare PATH_SEPARATOR.
6673# The user is always right.
6674if test "${PATH_SEPARATOR+set}" != set; then
6675 echo "#! /bin/sh" >conf$$.sh
6676 echo "exit 0" >>conf$$.sh
6677 chmod +x conf$$.sh
6678 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6679 PATH_SEPARATOR=';'
6680 else
6681 PATH_SEPARATOR=:
6682 fi
6683 rm -f conf$$.sh
f73dda09 6684fi
ccc6cda3 6685
b80f6443
JA
6686# Find out how to test for executable files. Don't use a zero-byte file,
6687# as systems may use methods other than mode bits to determine executability.
6688cat >conf$$.file <<_ASEOF
6689#! /bin/sh
6690exit 0
6691_ASEOF
6692chmod +x conf$$.file
6693if test -x conf$$.file >/dev/null 2>&1; then
6694 ac_executable_p="test -x"
ccc6cda3 6695else
b80f6443
JA
6696 ac_executable_p="test -f"
6697fi
6698rm -f conf$$.file
6699
6700# Extract the first word of "xgettext", so it can be a program name with args.
6701set dummy xgettext; ac_word=$2
ac50fbac 6702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 6703$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 6704if ${ac_cv_path_XGETTEXT+:} false; then :
3185942a 6705 $as_echo_n "(cached) " >&6
ccc6cda3 6706else
b80f6443
JA
6707 case "$XGETTEXT" in
6708 [\\/]* | ?:[\\/]*)
6709 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6710 ;;
6711 *)
6712 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6713 for ac_dir in $PATH; do
6714 IFS="$ac_save_IFS"
6715 test -z "$ac_dir" && ac_dir=.
6716 for ac_exec_ext in '' $ac_executable_extensions; do
6717 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6718 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
6719 (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
6720 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
6721 break 2
6722 fi
6723 fi
6724 done
6725 done
6726 IFS="$ac_save_IFS"
6727 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6728 ;;
6729esac
6730fi
6731XGETTEXT="$ac_cv_path_XGETTEXT"
6732if test "$XGETTEXT" != ":"; then
ac50fbac 6733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
3185942a 6734$as_echo "$XGETTEXT" >&6; }
b80f6443 6735else
ac50fbac 6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 6737$as_echo "no" >&6; }
b80f6443 6738fi
f73dda09 6739
b80f6443
JA
6740 rm -f messages.po
6741
6742
6743# Prepare PATH_SEPARATOR.
6744# The user is always right.
6745if test "${PATH_SEPARATOR+set}" != set; then
6746 echo "#! /bin/sh" >conf$$.sh
6747 echo "exit 0" >>conf$$.sh
6748 chmod +x conf$$.sh
6749 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6750 PATH_SEPARATOR=';'
6751 else
6752 PATH_SEPARATOR=:
6753 fi
6754 rm -f conf$$.sh
6755fi
6756
6757# Find out how to test for executable files. Don't use a zero-byte file,
6758# as systems may use methods other than mode bits to determine executability.
6759cat >conf$$.file <<_ASEOF
6760#! /bin/sh
6761exit 0
6762_ASEOF
6763chmod +x conf$$.file
6764if test -x conf$$.file >/dev/null 2>&1; then
6765 ac_executable_p="test -x"
6766else
6767 ac_executable_p="test -f"
6768fi
6769rm -f conf$$.file
6770
6771# Extract the first word of "msgmerge", so it can be a program name with args.
6772set dummy msgmerge; ac_word=$2
ac50fbac 6773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 6774$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 6775if ${ac_cv_path_MSGMERGE+:} false; then :
3185942a 6776 $as_echo_n "(cached) " >&6
b80f6443
JA
6777else
6778 case "$MSGMERGE" in
6779 [\\/]* | ?:[\\/]*)
6780 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
6781 ;;
6782 *)
6783 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6784 for ac_dir in $PATH; do
6785 IFS="$ac_save_IFS"
6786 test -z "$ac_dir" && ac_dir=.
6787 for ac_exec_ext in '' $ac_executable_extensions; do
6788 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6789 if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
6790 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
6791 break 2
6792 fi
6793 fi
6794 done
6795 done
6796 IFS="$ac_save_IFS"
6797 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
6798 ;;
6799esac
6800fi
6801MSGMERGE="$ac_cv_path_MSGMERGE"
6802if test "$MSGMERGE" != ":"; then
ac50fbac 6803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
3185942a 6804$as_echo "$MSGMERGE" >&6; }
b80f6443 6805else
ac50fbac 6806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 6807$as_echo "no" >&6; }
b80f6443
JA
6808fi
6809
6810
6811 if test "$GMSGFMT" != ":"; then
6812 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
6813 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
6814 : ;
6815 else
6816 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
ac50fbac 6817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
3185942a 6818$as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
b80f6443
JA
6819 GMSGFMT=":"
6820 fi
6821 fi
6822
6823 if test "$XGETTEXT" != ":"; then
6824 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
6825 (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
6826 : ;
6827 else
ac50fbac 6828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
3185942a 6829$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
b80f6443
JA
6830 XGETTEXT=":"
6831 fi
6832 rm -f messages.po
6833 fi
6834
3185942a 6835 ac_config_commands="$ac_config_commands default-1"
b80f6443
JA
6836
6837
ac50fbac
CR
6838ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6839if test "x$ac_cv_type_off_t" = xyes; then :
3185942a 6840
b80f6443
JA
6841else
6842
6843cat >>confdefs.h <<_ACEOF
3185942a 6844#define off_t long int
b80f6443 6845_ACEOF
ccc6cda3 6846
f73dda09 6847fi
ccc6cda3 6848
ac50fbac
CR
6849ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6850if test "x$ac_cv_type_size_t" = xyes; then :
3185942a 6851
b80f6443 6852else
ccc6cda3 6853
b80f6443 6854cat >>confdefs.h <<_ACEOF
3185942a 6855#define size_t unsigned int
b80f6443 6856_ACEOF
ccc6cda3 6857
ccc6cda3
JA
6858fi
6859
b80f6443
JA
6860# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6861# for constant arguments. Useless!
ac50fbac 6862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
3185942a 6863$as_echo_n "checking for working alloca.h... " >&6; }
ac50fbac 6864if ${ac_cv_working_alloca_h+:} false; then :
3185942a 6865 $as_echo_n "(cached) " >&6
f73dda09 6866else
ac50fbac 6867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6868/* end confdefs.h. */
b80f6443
JA
6869#include <alloca.h>
6870int
6871main ()
6872{
6873char *p = (char *) alloca (2 * sizeof (int));
3185942a 6874 if (p) return 0;
b80f6443
JA
6875 ;
6876 return 0;
6877}
6878_ACEOF
ac50fbac 6879if ac_fn_c_try_link "$LINENO"; then :
b80f6443 6880 ac_cv_working_alloca_h=yes
ccc6cda3 6881else
ac50fbac 6882 ac_cv_working_alloca_h=no
ccc6cda3 6883fi
ac50fbac
CR
6884rm -f core conftest.err conftest.$ac_objext \
6885 conftest$ac_exeext conftest.$ac_ext
ccc6cda3 6886fi
ac50fbac 6887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
3185942a 6888$as_echo "$ac_cv_working_alloca_h" >&6; }
b80f6443
JA
6889if test $ac_cv_working_alloca_h = yes; then
6890
ac50fbac 6891$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
ccc6cda3
JA
6892
6893fi
6894
ac50fbac 6895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
3185942a 6896$as_echo_n "checking for alloca... " >&6; }
ac50fbac 6897if ${ac_cv_func_alloca_works+:} false; then :
3185942a 6898 $as_echo_n "(cached) " >&6
f73dda09 6899else
ac50fbac 6900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6901/* end confdefs.h. */
f73dda09
JA
6902#ifdef __GNUC__
6903# define alloca __builtin_alloca
ccc6cda3 6904#else
f73dda09
JA
6905# ifdef _MSC_VER
6906# include <malloc.h>
6907# define alloca _alloca
6908# else
3185942a 6909# ifdef HAVE_ALLOCA_H
f73dda09
JA
6910# include <alloca.h>
6911# else
6912# ifdef _AIX
6913 #pragma alloca
6914# else
6915# ifndef alloca /* predefined by HP cc +Olibcalls */
ac50fbac 6916void *alloca (size_t);
f73dda09
JA
6917# endif
6918# endif
6919# endif
6920# endif
ccc6cda3
JA
6921#endif
6922
f73dda09
JA
6923int
6924main ()
6925{
6926char *p = (char *) alloca (1);
3185942a 6927 if (p) return 0;
f73dda09
JA
6928 ;
6929 return 0;
6930}
6931_ACEOF
ac50fbac 6932if ac_fn_c_try_link "$LINENO"; then :
f73dda09 6933 ac_cv_func_alloca_works=yes
ccc6cda3 6934else
ac50fbac 6935 ac_cv_func_alloca_works=no
ccc6cda3 6936fi
ac50fbac
CR
6937rm -f core conftest.err conftest.$ac_objext \
6938 conftest$ac_exeext conftest.$ac_ext
ccc6cda3 6939fi
ac50fbac 6940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
3185942a 6941$as_echo "$ac_cv_func_alloca_works" >&6; }
f73dda09
JA
6942
6943if test $ac_cv_func_alloca_works = yes; then
ccc6cda3 6944
ac50fbac 6945$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
f73dda09 6946
ccc6cda3 6947else
f73dda09
JA
6948 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6949# that cause trouble. Some versions do not even contain alloca or
6950# contain a buggy version. If you still want to use their alloca,
6951# use ar to extract alloca.o from them instead of compiling alloca.c.
ccc6cda3 6952
3185942a 6953ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
ccc6cda3 6954
ac50fbac 6955$as_echo "#define C_ALLOCA 1" >>confdefs.h
f73dda09 6956
b80f6443 6957
ac50fbac 6958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
3185942a 6959$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
ac50fbac 6960if ${ac_cv_os_cray+:} false; then :
3185942a 6961 $as_echo_n "(cached) " >&6
ccc6cda3 6962else
ac50fbac 6963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6964/* end confdefs.h. */
3185942a 6965#if defined CRAY && ! defined CRAY2
f73dda09
JA
6966webecray
6967#else
6968wenotbecray
6969#endif
ccc6cda3 6970
f73dda09
JA
6971_ACEOF
6972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 6973 $EGREP "webecray" >/dev/null 2>&1; then :
f73dda09 6974 ac_cv_os_cray=yes
ccc6cda3 6975else
f73dda09 6976 ac_cv_os_cray=no
ccc6cda3
JA
6977fi
6978rm -f conftest*
ccc6cda3
JA
6979
6980fi
ac50fbac 6981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
3185942a 6982$as_echo "$ac_cv_os_cray" >&6; }
f73dda09
JA
6983if test $ac_cv_os_cray = yes; then
6984 for ac_func in _getb67 GETB67 getb67; do
3185942a 6985 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac50fbac
CR
6986ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6987if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
f73dda09 6988
b80f6443 6989cat >>confdefs.h <<_ACEOF
f73dda09 6990#define CRAY_STACKSEG_END $ac_func
b80f6443 6991_ACEOF
ccc6cda3 6992
f73dda09 6993 break
ccc6cda3 6994fi
ccc6cda3 6995
f73dda09 6996 done
ccc6cda3
JA
6997fi
6998
ac50fbac 6999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
3185942a 7000$as_echo_n "checking stack direction for C alloca... " >&6; }
ac50fbac 7001if ${ac_cv_c_stack_direction+:} false; then :
3185942a 7002 $as_echo_n "(cached) " >&6
ccc6cda3 7003else
ac50fbac 7004 if test "$cross_compiling" = yes; then :
f73dda09
JA
7005 ac_cv_c_stack_direction=0
7006else
ac50fbac 7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7008/* end confdefs.h. */
3185942a 7009$ac_includes_default
f73dda09 7010int
ac50fbac 7011find_stack_direction (int *addr, int depth)
f73dda09 7012{
ac50fbac
CR
7013 int dir, dummy = 0;
7014 if (! addr)
7015 addr = &dummy;
7016 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7017 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7018 return dir + dummy;
f73dda09 7019}
ccc6cda3 7020
f73dda09 7021int
ac50fbac 7022main (int argc, char **argv)
f73dda09 7023{
ac50fbac 7024 return find_stack_direction (0, argc + !argv + 20) < 0;
f73dda09
JA
7025}
7026_ACEOF
ac50fbac 7027if ac_fn_c_try_run "$LINENO"; then :
f73dda09 7028 ac_cv_c_stack_direction=1
ccc6cda3 7029else
ac50fbac 7030 ac_cv_c_stack_direction=-1
ccc6cda3 7031fi
ac50fbac
CR
7032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7033 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 7034fi
3185942a 7035
f73dda09 7036fi
ac50fbac 7037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
3185942a 7038$as_echo "$ac_cv_c_stack_direction" >&6; }
b80f6443 7039cat >>confdefs.h <<_ACEOF
f73dda09 7040#define STACK_DIRECTION $ac_cv_c_stack_direction
b80f6443
JA
7041_ACEOF
7042
ccc6cda3 7043
ccc6cda3
JA
7044fi
7045
b80f6443
JA
7046
7047
f73dda09 7048
ac50fbac
CR
7049 for ac_header in $ac_header_list
7050do :
7051 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7052ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7053"
7054if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
b80f6443 7055 cat >>confdefs.h <<_ACEOF
3185942a 7056#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
b80f6443 7057_ACEOF
ccc6cda3 7058
cce855bc 7059fi
ccc6cda3 7060
b80f6443
JA
7061done
7062
7063
0628567a 7064
0628567a 7065
0628567a 7066
f73dda09 7067
0628567a 7068
3185942a 7069
ac50fbac
CR
7070for ac_func in getpagesize
7071do :
7072 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7073if test "x$ac_cv_func_getpagesize" = xyes; then :
b80f6443 7074 cat >>confdefs.h <<_ACEOF
ac50fbac 7075#define HAVE_GETPAGESIZE 1
b80f6443 7076_ACEOF
f73dda09 7077
b80f6443
JA
7078fi
7079done
7080
ac50fbac 7081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
3185942a 7082$as_echo_n "checking for working mmap... " >&6; }
ac50fbac 7083if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
3185942a 7084 $as_echo_n "(cached) " >&6
b80f6443 7085else
ac50fbac 7086 if test "$cross_compiling" = yes; then :
b80f6443 7087 ac_cv_func_mmap_fixed_mapped=no
f73dda09 7088else
ac50fbac 7089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7090/* end confdefs.h. */
b80f6443
JA
7091$ac_includes_default
7092/* malloc might have been renamed as rpl_malloc. */
7093#undef malloc
7094
7095/* Thanks to Mike Haertel and Jim Avera for this test.
7096 Here is a matrix of mmap possibilities:
7097 mmap private not fixed
7098 mmap private fixed at somewhere currently unmapped
7099 mmap private fixed at somewhere already mapped
7100 mmap shared not fixed
7101 mmap shared fixed at somewhere currently unmapped
7102 mmap shared fixed at somewhere already mapped
7103 For private mappings, we should verify that changes cannot be read()
7104 back from the file, nor mmap's back from the file at a different
7105 address. (There have been systems where private was not correctly
7106 implemented like the infamous i386 svr4.0, and systems where the
7107 VM page cache was not coherent with the file system buffer cache
7108 like early versions of FreeBSD and possibly contemporary NetBSD.)
7109 For shared mappings, we should conversely verify that changes get
7110 propagated back to all the places they're supposed to be.
7111
7112 Grep wants private fixed already mapped.
7113 The main things grep needs to know about mmap are:
7114 * does it exist and is it safe to write into the mmap'd area
7115 * how to use it (BSD variants) */
7116
7117#include <fcntl.h>
7118#include <sys/mman.h>
7119
3185942a 7120#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
b80f6443 7121char *malloc ();
f73dda09 7122#endif
b80f6443
JA
7123
7124/* This mess was copied from the GNU getpagesize.h. */
3185942a 7125#ifndef HAVE_GETPAGESIZE
b80f6443
JA
7126# ifdef _SC_PAGESIZE
7127# define getpagesize() sysconf(_SC_PAGESIZE)
7128# else /* no _SC_PAGESIZE */
3185942a 7129# ifdef HAVE_SYS_PARAM_H
b80f6443
JA
7130# include <sys/param.h>
7131# ifdef EXEC_PAGESIZE
7132# define getpagesize() EXEC_PAGESIZE
7133# else /* no EXEC_PAGESIZE */
7134# ifdef NBPG
7135# define getpagesize() NBPG * CLSIZE
7136# ifndef CLSIZE
7137# define CLSIZE 1
7138# endif /* no CLSIZE */
7139# else /* no NBPG */
7140# ifdef NBPC
7141# define getpagesize() NBPC
7142# else /* no NBPC */
7143# ifdef PAGESIZE
7144# define getpagesize() PAGESIZE
7145# endif /* PAGESIZE */
7146# endif /* no NBPC */
7147# endif /* no NBPG */
7148# endif /* no EXEC_PAGESIZE */
7149# else /* no HAVE_SYS_PARAM_H */
7150# define getpagesize() 8192 /* punt totally */
7151# endif /* no HAVE_SYS_PARAM_H */
7152# endif /* no _SC_PAGESIZE */
7153
7154#endif /* no HAVE_GETPAGESIZE */
ccc6cda3 7155
f73dda09
JA
7156int
7157main ()
7158{
b80f6443 7159 char *data, *data2, *data3;
ac50fbac 7160 const char *cdata2;
b80f6443 7161 int i, pagesize;
ac50fbac 7162 int fd, fd2;
f73dda09 7163
b80f6443
JA
7164 pagesize = getpagesize ();
7165
7166 /* First, make a file with some known garbage in it. */
7167 data = (char *) malloc (pagesize);
7168 if (!data)
3185942a 7169 return 1;
b80f6443
JA
7170 for (i = 0; i < pagesize; ++i)
7171 *(data + i) = rand ();
7172 umask (0);
7173 fd = creat ("conftest.mmap", 0600);
7174 if (fd < 0)
ac50fbac 7175 return 2;
b80f6443 7176 if (write (fd, data, pagesize) != pagesize)
ac50fbac 7177 return 3;
b80f6443
JA
7178 close (fd);
7179
ac50fbac
CR
7180 /* Next, check that the tail of a page is zero-filled. File must have
7181 non-zero length, otherwise we risk SIGBUS for entire page. */
7182 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7183 if (fd2 < 0)
7184 return 4;
7185 cdata2 = "";
7186 if (write (fd2, cdata2, 1) != 1)
7187 return 5;
7188 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7189 if (data2 == MAP_FAILED)
7190 return 6;
7191 for (i = 0; i < pagesize; ++i)
7192 if (*(data2 + i))
7193 return 7;
7194 close (fd2);
7195 if (munmap (data2, pagesize))
7196 return 8;
7197
b80f6443
JA
7198 /* Next, try to mmap the file at a fixed address which already has
7199 something else allocated at it. If we can, also make sure that
7200 we see the same garbage. */
7201 fd = open ("conftest.mmap", O_RDWR);
7202 if (fd < 0)
ac50fbac 7203 return 9;
b80f6443 7204 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
0628567a 7205 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ac50fbac 7206 return 10;
b80f6443
JA
7207 for (i = 0; i < pagesize; ++i)
7208 if (*(data + i) != *(data2 + i))
ac50fbac 7209 return 11;
b80f6443
JA
7210
7211 /* Finally, make sure that changes to the mapped area do not
7212 percolate back to the file as seen by read(). (This is a bug on
7213 some variants of i386 svr4.0.) */
7214 for (i = 0; i < pagesize; ++i)
7215 *(data2 + i) = *(data2 + i) + 1;
7216 data3 = (char *) malloc (pagesize);
7217 if (!data3)
ac50fbac 7218 return 12;
b80f6443 7219 if (read (fd, data3, pagesize) != pagesize)
ac50fbac 7220 return 13;
b80f6443
JA
7221 for (i = 0; i < pagesize; ++i)
7222 if (*(data + i) != *(data3 + i))
ac50fbac 7223 return 14;
b80f6443 7224 close (fd);
3185942a 7225 return 0;
f73dda09
JA
7226}
7227_ACEOF
ac50fbac 7228if ac_fn_c_try_run "$LINENO"; then :
b80f6443 7229 ac_cv_func_mmap_fixed_mapped=yes
f73dda09 7230else
ac50fbac 7231 ac_cv_func_mmap_fixed_mapped=no
f73dda09 7232fi
ac50fbac
CR
7233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7234 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 7235fi
3185942a 7236
b80f6443 7237fi
ac50fbac 7238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
3185942a 7239$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
b80f6443 7240if test $ac_cv_func_mmap_fixed_mapped = yes; then
f73dda09 7241
ac50fbac 7242$as_echo "#define HAVE_MMAP 1" >>confdefs.h
b80f6443
JA
7243
7244fi
ac50fbac 7245rm -f conftest.mmap conftest.txt
b80f6443
JA
7246
7247
ac50fbac 7248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
3185942a 7249$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
ac50fbac 7250if ${ac_cv_gnu_library_2_1+:} false; then :
3185942a 7251 $as_echo_n "(cached) " >&6
b80f6443 7252else
ac50fbac 7253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7254/* end confdefs.h. */
b80f6443
JA
7255
7256#include <features.h>
7257#ifdef __GNU_LIBRARY__
7258 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
7259 Lucky GNU user
7260 #endif
7261#endif
ccc6cda3 7262
b80f6443
JA
7263_ACEOF
7264if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 7265 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
b80f6443
JA
7266 ac_cv_gnu_library_2_1=yes
7267else
7268 ac_cv_gnu_library_2_1=no
ccc6cda3 7269fi
b80f6443
JA
7270rm -f conftest*
7271
7272
f73dda09 7273
ccc6cda3 7274fi
ac50fbac 7275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
3185942a 7276$as_echo "$ac_cv_gnu_library_2_1" >&6; }
ccc6cda3 7277
b80f6443
JA
7278 GLIBC21="$ac_cv_gnu_library_2_1"
7279
7280
7281
7282
ac50fbac 7283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5
3185942a 7284$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
ac50fbac 7285if ${gt_cv_int_divbyzero_sigfpe+:} false; then :
3185942a 7286 $as_echo_n "(cached) " >&6
ccc6cda3 7287else
b80f6443 7288
ac50fbac 7289 if test "$cross_compiling" = yes; then :
b80f6443
JA
7290
7291 # Guess based on the CPU.
7292 case "$host_cpu" in
7293 alpha* | i3456786 | m68k | s390*)
7294 gt_cv_int_divbyzero_sigfpe="guessing yes";;
7295 *)
7296 gt_cv_int_divbyzero_sigfpe="guessing no";;
7297 esac
7298
ccc6cda3 7299else
ac50fbac 7300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7301/* end confdefs.h. */
b80f6443
JA
7302
7303#include <stdlib.h>
7304#include <signal.h>
7305
7306static void
7307#ifdef __cplusplus
7308sigfpe_handler (int sig)
7309#else
7310sigfpe_handler (sig) int sig;
7311#endif
f73dda09 7312{
b80f6443
JA
7313 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
7314 exit (sig != SIGFPE);
7315}
7316
7317int x = 1;
7318int y = 0;
7319int z;
7320int nan;
7321
7322int main ()
7323{
7324 signal (SIGFPE, sigfpe_handler);
7325/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
7326#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
7327 signal (SIGTRAP, sigfpe_handler);
7328#endif
7329/* Linux/SPARC yields signal SIGILL. */
7330#if defined (__sparc__) && defined (__linux__)
7331 signal (SIGILL, sigfpe_handler);
7332#endif
7333
7334 z = x / y;
7335 nan = y / y;
7336 exit (1);
f73dda09 7337}
b80f6443 7338
f73dda09 7339_ACEOF
ac50fbac 7340if ac_fn_c_try_run "$LINENO"; then :
b80f6443 7341 gt_cv_int_divbyzero_sigfpe=yes
ccc6cda3 7342else
ac50fbac 7343 gt_cv_int_divbyzero_sigfpe=no
ccc6cda3 7344fi
ac50fbac
CR
7345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7346 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
7347fi
7348
3185942a 7349
ccc6cda3 7350fi
ac50fbac 7351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5
3185942a 7352$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; }
b80f6443
JA
7353 case "$gt_cv_int_divbyzero_sigfpe" in
7354 *yes) value=1;;
7355 *) value=0;;
7356 esac
ccc6cda3 7357
b80f6443
JA
7358cat >>confdefs.h <<_ACEOF
7359#define INTDIV0_RAISES_SIGFPE $value
7360_ACEOF
ccc6cda3 7361
ccc6cda3
JA
7362
7363
ac50fbac 7364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
3185942a 7365$as_echo_n "checking for inttypes.h... " >&6; }
ac50fbac 7366if ${jm_ac_cv_header_inttypes_h+:} false; then :
3185942a 7367 $as_echo_n "(cached) " >&6
ccc6cda3 7368else
ac50fbac 7369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7370/* end confdefs.h. */
f73dda09 7371#include <sys/types.h>
b80f6443 7372#include <inttypes.h>
f73dda09
JA
7373int
7374main ()
7375{
b80f6443 7376uintmax_t i = (uintmax_t) -1;
f73dda09
JA
7377 ;
7378 return 0;
7379}
7380_ACEOF
ac50fbac 7381if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 7382 jm_ac_cv_header_inttypes_h=yes
ccc6cda3 7383else
ac50fbac 7384 jm_ac_cv_header_inttypes_h=no
ccc6cda3 7385fi
3185942a 7386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 7387fi
ac50fbac 7388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_inttypes_h" >&5
3185942a 7389$as_echo "$jm_ac_cv_header_inttypes_h" >&6; }
b80f6443 7390 if test $jm_ac_cv_header_inttypes_h = yes; then
f73dda09 7391
b80f6443
JA
7392cat >>confdefs.h <<_ACEOF
7393#define HAVE_INTTYPES_H_WITH_UINTMAX 1
7394_ACEOF
ccc6cda3 7395
b80f6443
JA
7396 fi
7397
7398
ac50fbac 7399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
3185942a 7400$as_echo_n "checking for stdint.h... " >&6; }
ac50fbac 7401if ${jm_ac_cv_header_stdint_h+:} false; then :
3185942a 7402 $as_echo_n "(cached) " >&6
ccc6cda3 7403else
ac50fbac 7404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7405/* end confdefs.h. */
b80f6443
JA
7406#include <sys/types.h>
7407#include <stdint.h>
f73dda09
JA
7408int
7409main ()
7410{
b80f6443 7411uintmax_t i = (uintmax_t) -1;
f73dda09
JA
7412 ;
7413 return 0;
7414}
7415_ACEOF
ac50fbac 7416if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 7417 jm_ac_cv_header_stdint_h=yes
f73dda09 7418else
ac50fbac 7419 jm_ac_cv_header_stdint_h=no
f73dda09 7420fi
3185942a 7421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 7422fi
ac50fbac 7423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_stdint_h" >&5
3185942a 7424$as_echo "$jm_ac_cv_header_stdint_h" >&6; }
b80f6443 7425 if test $jm_ac_cv_header_stdint_h = yes; then
f73dda09 7426
b80f6443
JA
7427cat >>confdefs.h <<_ACEOF
7428#define HAVE_STDINT_H_WITH_UINTMAX 1
7429_ACEOF
f73dda09 7430
b80f6443
JA
7431 fi
7432
7433
ac50fbac 7434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5
3185942a 7435$as_echo_n "checking for unsigned long long... " >&6; }
ac50fbac 7436if ${ac_cv_type_unsigned_long_long+:} false; then :
3185942a 7437 $as_echo_n "(cached) " >&6
f73dda09 7438else
ac50fbac 7439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7440/* end confdefs.h. */
b80f6443 7441unsigned long long ull = 1; int i = 63;
f73dda09
JA
7442int
7443main ()
7444{
b80f6443
JA
7445unsigned long long ullmax = (unsigned long long) -1;
7446 return ull << i | ull >> i | ullmax / ull | ullmax % ull;
f73dda09
JA
7447 ;
7448 return 0;
7449}
7450_ACEOF
ac50fbac 7451if ac_fn_c_try_link "$LINENO"; then :
b80f6443 7452 ac_cv_type_unsigned_long_long=yes
f73dda09 7453else
ac50fbac 7454 ac_cv_type_unsigned_long_long=no
f73dda09 7455fi
ac50fbac
CR
7456rm -f core conftest.err conftest.$ac_objext \
7457 conftest$ac_exeext conftest.$ac_ext
f73dda09 7458fi
ac50fbac 7459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long" >&5
3185942a 7460$as_echo "$ac_cv_type_unsigned_long_long" >&6; }
b80f6443 7461 if test $ac_cv_type_unsigned_long_long = yes; then
f73dda09 7462
ac50fbac 7463$as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h
f73dda09 7464
b80f6443 7465 fi
7117c2d2 7466
7117c2d2 7467
b80f6443
JA
7468
7469
7470 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
7471
7472 test $ac_cv_type_unsigned_long_long = yes \
7473 && ac_type='unsigned long long' \
7474 || ac_type='unsigned long'
7475
7476cat >>confdefs.h <<_ACEOF
7477#define uintmax_t $ac_type
7117c2d2 7478_ACEOF
7117c2d2 7479
b80f6443 7480 else
7117c2d2 7481
ac50fbac 7482$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
b80f6443
JA
7483
7484 fi
7485
7486
ac50fbac 7487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
3185942a 7488$as_echo_n "checking for inttypes.h... " >&6; }
ac50fbac 7489if ${gt_cv_header_inttypes_h+:} false; then :
3185942a 7490 $as_echo_n "(cached) " >&6
f73dda09 7491else
f73dda09 7492
ac50fbac 7493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7494/* end confdefs.h. */
b80f6443
JA
7495#include <sys/types.h>
7496#include <inttypes.h>
f73dda09
JA
7497int
7498main ()
7499{
f73dda09
JA
7500
7501 ;
7502 return 0;
7503}
7504_ACEOF
ac50fbac 7505if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 7506 gt_cv_header_inttypes_h=yes
f73dda09 7507else
ac50fbac 7508 gt_cv_header_inttypes_h=no
f73dda09 7509fi
3185942a 7510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b80f6443 7511
f73dda09 7512fi
ac50fbac 7513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_header_inttypes_h" >&5
3185942a 7514$as_echo "$gt_cv_header_inttypes_h" >&6; }
b80f6443 7515 if test $gt_cv_header_inttypes_h = yes; then
f73dda09 7516
b80f6443
JA
7517cat >>confdefs.h <<_ACEOF
7518#define HAVE_INTTYPES_H 1
7519_ACEOF
f73dda09 7520
b80f6443 7521 fi
f73dda09 7522
b80f6443
JA
7523
7524
7525 if test $gt_cv_header_inttypes_h = yes; then
ac50fbac 7526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
3185942a 7527$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
ac50fbac 7528if ${gt_cv_inttypes_pri_broken+:} false; then :
3185942a 7529 $as_echo_n "(cached) " >&6
f73dda09 7530else
b80f6443 7531
ac50fbac 7532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7533/* end confdefs.h. */
b80f6443
JA
7534#include <inttypes.h>
7535#ifdef PRId32
7536char *p = PRId32;
f73dda09 7537#endif
f73dda09
JA
7538
7539int
7540main ()
7541{
f73dda09
JA
7542
7543 ;
7544 return 0;
7545}
7546_ACEOF
ac50fbac 7547if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 7548 gt_cv_inttypes_pri_broken=no
f73dda09 7549else
ac50fbac 7550 gt_cv_inttypes_pri_broken=yes
f73dda09 7551fi
3185942a 7552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09
JA
7553
7554fi
ac50fbac 7555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
3185942a 7556$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
b80f6443
JA
7557 fi
7558 if test "$gt_cv_inttypes_pri_broken" = yes; then
f73dda09 7559
b80f6443
JA
7560cat >>confdefs.h <<_ACEOF
7561#define PRI_MACROS_BROKEN 1
7562_ACEOF
f73dda09 7563
b80f6443 7564 fi
f73dda09 7565
b80f6443
JA
7566
7567 if test "X$prefix" = "XNONE"; then
7568 acl_final_prefix="$ac_default_prefix"
7569 else
7570 acl_final_prefix="$prefix"
7571 fi
7572 if test "X$exec_prefix" = "XNONE"; then
7573 acl_final_exec_prefix='${prefix}'
7574 else
7575 acl_final_exec_prefix="$exec_prefix"
7576 fi
7577 acl_save_prefix="$prefix"
7578 prefix="$acl_final_prefix"
7579 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7580 prefix="$acl_save_prefix"
7581
7582
3185942a 7583# Check whether --with-gnu-ld was given.
ac50fbac 7584if test "${with_gnu_ld+set}" = set; then :
3185942a 7585 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
f73dda09 7586else
b80f6443 7587 with_gnu_ld=no
3185942a
JA
7588fi
7589
b80f6443
JA
7590# Prepare PATH_SEPARATOR.
7591# The user is always right.
7592if test "${PATH_SEPARATOR+set}" != set; then
7593 echo "#! /bin/sh" >conf$$.sh
7594 echo "exit 0" >>conf$$.sh
7595 chmod +x conf$$.sh
7596 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7597 PATH_SEPARATOR=';'
7598 else
7599 PATH_SEPARATOR=:
7600 fi
7601 rm -f conf$$.sh
7602fi
7603ac_prog=ld
7604if test "$GCC" = yes; then
7605 # Check if gcc -print-prog-name=ld gives a path.
ac50fbac 7606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
3185942a 7607$as_echo_n "checking for ld used by GCC... " >&6; }
b80f6443
JA
7608 case $host in
7609 *-*-mingw*)
7610 # gcc leaves a trailing carriage return which upsets mingw
7611 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7612 *)
7613 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7614 esac
7615 case $ac_prog in
7616 # Accept absolute paths.
7617 [\\/]* | [A-Za-z]:[\\/]*)
7618 re_direlt='/[^/][^/]*/\.\./'
7619 # Canonicalize the path of ld
7620 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7621 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7622 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7623 done
7624 test -z "$LD" && LD="$ac_prog"
7625 ;;
7626 "")
7627 # If it fails, then pretend we aren't using GCC.
7628 ac_prog=ld
7629 ;;
7630 *)
7631 # If it is relative, then search for the first ld in PATH.
7632 with_gnu_ld=unknown
7633 ;;
7634 esac
7635elif test "$with_gnu_ld" = yes; then
ac50fbac 7636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
3185942a 7637$as_echo_n "checking for GNU ld... " >&6; }
b80f6443 7638else
ac50fbac 7639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
3185942a 7640$as_echo_n "checking for non-GNU ld... " >&6; }
b80f6443 7641fi
ac50fbac 7642if ${acl_cv_path_LD+:} false; then :
3185942a 7643 $as_echo_n "(cached) " >&6
b80f6443
JA
7644else
7645 if test -z "$LD"; then
7646 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7647 for ac_dir in $PATH; do
7648 test -z "$ac_dir" && ac_dir=.
7649 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7650 acl_cv_path_LD="$ac_dir/$ac_prog"
7651 # Check to see if the program is GNU ld. I'd rather use --version,
7652 # but apparently some GNU ld's only accept -v.
7653 # Break only if it was the GNU/non-GNU ld that we prefer.
7654 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7655 test "$with_gnu_ld" != no && break
7656 else
7657 test "$with_gnu_ld" != yes && break
7658 fi
7659 fi
7660 done
7661 IFS="$ac_save_ifs"
7662else
7663 acl_cv_path_LD="$LD" # Let the user override the test with a path.
f73dda09 7664fi
f73dda09 7665fi
f73dda09 7666
b80f6443
JA
7667LD="$acl_cv_path_LD"
7668if test -n "$LD"; then
ac50fbac 7669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
3185942a 7670$as_echo "$LD" >&6; }
f73dda09 7671else
ac50fbac 7672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 7673$as_echo "no" >&6; }
f73dda09 7674fi
ac50fbac
CR
7675test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
3185942a 7677$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
ac50fbac 7678if ${acl_cv_prog_gnu_ld+:} false; then :
3185942a 7679 $as_echo_n "(cached) " >&6
b80f6443
JA
7680else
7681 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7682if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7683 acl_cv_prog_gnu_ld=yes
7684else
7685 acl_cv_prog_gnu_ld=no
7686fi
7687fi
ac50fbac 7688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
3185942a 7689$as_echo "$acl_cv_prog_gnu_ld" >&6; }
b80f6443
JA
7690with_gnu_ld=$acl_cv_prog_gnu_ld
7691
7692
7693
ac50fbac 7694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
3185942a 7695$as_echo_n "checking for shared library run path origin... " >&6; }
ac50fbac 7696if ${acl_cv_rpath+:} false; then :
3185942a 7697 $as_echo_n "(cached) " >&6
b80f6443
JA
7698else
7699
7700 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7701 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7702 . ./conftest.sh
7703 rm -f ./conftest.sh
7704 acl_cv_rpath=done
7705
7706fi
ac50fbac 7707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
3185942a 7708$as_echo "$acl_cv_rpath" >&6; }
b80f6443
JA
7709 wl="$acl_cv_wl"
7710 libext="$acl_cv_libext"
7711 shlibext="$acl_cv_shlibext"
7712 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7713 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7714 hardcode_direct="$acl_cv_hardcode_direct"
7715 hardcode_minus_L="$acl_cv_hardcode_minus_L"
3185942a 7716 # Check whether --enable-rpath was given.
ac50fbac 7717if test "${enable_rpath+set}" = set; then :
3185942a 7718 enableval=$enable_rpath; :
b80f6443
JA
7719else
7720 enable_rpath=yes
3185942a
JA
7721fi
7722
b80f6443
JA
7723
7724
7725
7726
7727
7728
7729
7730 use_additional=yes
7731
7732 acl_save_prefix="$prefix"
7733 prefix="$acl_final_prefix"
7734 acl_save_exec_prefix="$exec_prefix"
7735 exec_prefix="$acl_final_exec_prefix"
7736
7737 eval additional_includedir=\"$includedir\"
7738 eval additional_libdir=\"$libdir\"
7739
7740 exec_prefix="$acl_save_exec_prefix"
7741 prefix="$acl_save_prefix"
7742
7743
3185942a 7744# Check whether --with-libiconv-prefix was given.
ac50fbac 7745if test "${with_libiconv_prefix+set}" = set; then :
3185942a 7746 withval=$with_libiconv_prefix;
b80f6443
JA
7747 if test "X$withval" = "Xno"; then
7748 use_additional=no
7749 else
7750 if test "X$withval" = "X"; then
7751
7752 acl_save_prefix="$prefix"
7753 prefix="$acl_final_prefix"
7754 acl_save_exec_prefix="$exec_prefix"
7755 exec_prefix="$acl_final_exec_prefix"
7756
7757 eval additional_includedir=\"$includedir\"
7758 eval additional_libdir=\"$libdir\"
7759
7760 exec_prefix="$acl_save_exec_prefix"
7761 prefix="$acl_save_prefix"
7762
7763 else
7764 additional_includedir="$withval/include"
7765 additional_libdir="$withval/lib"
7766 fi
7767 fi
7768
3185942a
JA
7769fi
7770
b80f6443
JA
7771 LIBICONV=
7772 LTLIBICONV=
7773 INCICONV=
7774 rpathdirs=
7775 ltrpathdirs=
7776 names_already_handled=
7777 names_next_round='iconv '
7778 while test -n "$names_next_round"; do
7779 names_this_round="$names_next_round"
7780 names_next_round=
7781 for name in $names_this_round; do
7782 already_handled=
7783 for n in $names_already_handled; do
7784 if test "$n" = "$name"; then
7785 already_handled=yes
7786 break
7787 fi
7788 done
7789 if test -z "$already_handled"; then
7790 names_already_handled="$names_already_handled $name"
7791 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7792 eval value=\"\$HAVE_LIB$uppername\"
7793 if test -n "$value"; then
7794 if test "$value" = yes; then
7795 eval value=\"\$LIB$uppername\"
7796 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7797 eval value=\"\$LTLIB$uppername\"
7798 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7799 else
7800 :
7801 fi
7802 else
7803 found_dir=
7804 found_la=
7805 found_so=
7806 found_a=
7807 if test $use_additional = yes; then
ac50fbac 7808 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
b80f6443
JA
7809 found_dir="$additional_libdir"
7810 found_so="$additional_libdir/lib$name.$shlibext"
7811 if test -f "$additional_libdir/lib$name.la"; then
7812 found_la="$additional_libdir/lib$name.la"
7813 fi
7814 else
7815 if test -f "$additional_libdir/lib$name.$libext"; then
7816 found_dir="$additional_libdir"
7817 found_a="$additional_libdir/lib$name.$libext"
7818 if test -f "$additional_libdir/lib$name.la"; then
7819 found_la="$additional_libdir/lib$name.la"
7820 fi
7821 fi
7822 fi
7823 fi
7824 if test "X$found_dir" = "X"; then
7825 for x in $LDFLAGS $LTLIBICONV; do
7826
7827 acl_save_prefix="$prefix"
7828 prefix="$acl_final_prefix"
7829 acl_save_exec_prefix="$exec_prefix"
7830 exec_prefix="$acl_final_exec_prefix"
7831 eval x=\"$x\"
7832 exec_prefix="$acl_save_exec_prefix"
7833 prefix="$acl_save_prefix"
7834
7835 case "$x" in
7836 -L*)
7837 dir=`echo "X$x" | sed -e 's/^X-L//'`
ac50fbac 7838 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
b80f6443
JA
7839 found_dir="$dir"
7840 found_so="$dir/lib$name.$shlibext"
7841 if test -f "$dir/lib$name.la"; then
7842 found_la="$dir/lib$name.la"
7843 fi
7844 else
7845 if test -f "$dir/lib$name.$libext"; then
7846 found_dir="$dir"
7847 found_a="$dir/lib$name.$libext"
7848 if test -f "$dir/lib$name.la"; then
7849 found_la="$dir/lib$name.la"
7850 fi
7851 fi
7852 fi
7853 ;;
7854 esac
7855 if test "X$found_dir" != "X"; then
7856 break
7857 fi
7858 done
7859 fi
7860 if test "X$found_dir" != "X"; then
7861 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7862 if test "X$found_so" != "X"; then
7863 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7864 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7865 else
7866 haveit=
7867 for x in $ltrpathdirs; do
7868 if test "X$x" = "X$found_dir"; then
7869 haveit=yes
7870 break
7871 fi
7872 done
7873 if test -z "$haveit"; then
7874 ltrpathdirs="$ltrpathdirs $found_dir"
7875 fi
7876 if test "$hardcode_direct" = yes; then
7877 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7878 else
7879 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7880 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7881 haveit=
7882 for x in $rpathdirs; do
7883 if test "X$x" = "X$found_dir"; then
7884 haveit=yes
7885 break
7886 fi
7887 done
7888 if test -z "$haveit"; then
7889 rpathdirs="$rpathdirs $found_dir"
7890 fi
7891 else
7892 haveit=
7893 for x in $LDFLAGS $LIBICONV; do
7894
7895 acl_save_prefix="$prefix"
7896 prefix="$acl_final_prefix"
7897 acl_save_exec_prefix="$exec_prefix"
7898 exec_prefix="$acl_final_exec_prefix"
7899 eval x=\"$x\"
7900 exec_prefix="$acl_save_exec_prefix"
7901 prefix="$acl_save_prefix"
7902
7903 if test "X$x" = "X-L$found_dir"; then
7904 haveit=yes
7905 break
7906 fi
7907 done
7908 if test -z "$haveit"; then
7909 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7910 fi
7911 if test "$hardcode_minus_L" != no; then
7912 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7913 else
7914 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7915 fi
7916 fi
7917 fi
7918 fi
7919 else
7920 if test "X$found_a" != "X"; then
7921 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7922 else
7923 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7924 fi
7925 fi
7926 additional_includedir=
7927 case "$found_dir" in
7928 */lib | */lib/)
7929 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7930 additional_includedir="$basedir/include"
7931 ;;
7932 esac
7933 if test "X$additional_includedir" != "X"; then
7934 if test "X$additional_includedir" != "X/usr/include"; then
7935 haveit=
7936 if test "X$additional_includedir" = "X/usr/local/include"; then
7937 if test -n "$GCC"; then
7938 case $host_os in
7939 linux*) haveit=yes;;
7940 esac
7941 fi
7942 fi
7943 if test -z "$haveit"; then
7944 for x in $CPPFLAGS $INCICONV; do
7945
7946 acl_save_prefix="$prefix"
7947 prefix="$acl_final_prefix"
7948 acl_save_exec_prefix="$exec_prefix"
7949 exec_prefix="$acl_final_exec_prefix"
7950 eval x=\"$x\"
7951 exec_prefix="$acl_save_exec_prefix"
7952 prefix="$acl_save_prefix"
7953
7954 if test "X$x" = "X-I$additional_includedir"; then
7955 haveit=yes
7956 break
7957 fi
7958 done
7959 if test -z "$haveit"; then
7960 if test -d "$additional_includedir"; then
7961 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7962 fi
7963 fi
7964 fi
7965 fi
7966 fi
7967 if test -n "$found_la"; then
7968 save_libdir="$libdir"
7969 case "$found_la" in
7970 */* | *\\*) . "$found_la" ;;
7971 *) . "./$found_la" ;;
7972 esac
7973 libdir="$save_libdir"
7974 for dep in $dependency_libs; do
7975 case "$dep" in
7976 -L*)
7977 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7978 if test "X$additional_libdir" != "X/usr/lib"; then
7979 haveit=
7980 if test "X$additional_libdir" = "X/usr/local/lib"; then
7981 if test -n "$GCC"; then
7982 case $host_os in
7983 linux*) haveit=yes;;
7984 esac
7985 fi
7986 fi
7987 if test -z "$haveit"; then
7988 haveit=
7989 for x in $LDFLAGS $LIBICONV; do
7990
7991 acl_save_prefix="$prefix"
7992 prefix="$acl_final_prefix"
7993 acl_save_exec_prefix="$exec_prefix"
7994 exec_prefix="$acl_final_exec_prefix"
7995 eval x=\"$x\"
7996 exec_prefix="$acl_save_exec_prefix"
7997 prefix="$acl_save_prefix"
7998
7999 if test "X$x" = "X-L$additional_libdir"; then
8000 haveit=yes
8001 break
8002 fi
8003 done
8004 if test -z "$haveit"; then
8005 if test -d "$additional_libdir"; then
8006 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8007 fi
8008 fi
8009 haveit=
8010 for x in $LDFLAGS $LTLIBICONV; do
8011
8012 acl_save_prefix="$prefix"
8013 prefix="$acl_final_prefix"
8014 acl_save_exec_prefix="$exec_prefix"
8015 exec_prefix="$acl_final_exec_prefix"
8016 eval x=\"$x\"
8017 exec_prefix="$acl_save_exec_prefix"
8018 prefix="$acl_save_prefix"
8019
8020 if test "X$x" = "X-L$additional_libdir"; then
8021 haveit=yes
8022 break
8023 fi
8024 done
8025 if test -z "$haveit"; then
8026 if test -d "$additional_libdir"; then
8027 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8028 fi
8029 fi
8030 fi
8031 fi
8032 ;;
8033 -R*)
8034 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8035 if test "$enable_rpath" != no; then
8036 haveit=
8037 for x in $rpathdirs; do
8038 if test "X$x" = "X$dir"; then
8039 haveit=yes
8040 break
8041 fi
8042 done
8043 if test -z "$haveit"; then
8044 rpathdirs="$rpathdirs $dir"
8045 fi
8046 haveit=
8047 for x in $ltrpathdirs; do
8048 if test "X$x" = "X$dir"; then
8049 haveit=yes
8050 break
8051 fi
8052 done
8053 if test -z "$haveit"; then
8054 ltrpathdirs="$ltrpathdirs $dir"
8055 fi
8056 fi
8057 ;;
8058 -l*)
8059 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8060 ;;
8061 *.la)
8062 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8063 ;;
8064 *)
8065 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8066 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8067 ;;
8068 esac
8069 done
8070 fi
8071 else
8072 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8073 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8074 fi
8075 fi
8076 fi
8077 done
8078 done
8079 if test "X$rpathdirs" != "X"; then
8080 if test -n "$hardcode_libdir_separator"; then
8081 alldirs=
8082 for found_dir in $rpathdirs; do
8083 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8084 done
8085 acl_save_libdir="$libdir"
8086 libdir="$alldirs"
8087 eval flag=\"$hardcode_libdir_flag_spec\"
8088 libdir="$acl_save_libdir"
8089 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8090 else
8091 for found_dir in $rpathdirs; do
8092 acl_save_libdir="$libdir"
8093 libdir="$found_dir"
8094 eval flag=\"$hardcode_libdir_flag_spec\"
8095 libdir="$acl_save_libdir"
8096 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8097 done
8098 fi
8099 fi
8100 if test "X$ltrpathdirs" != "X"; then
8101 for found_dir in $ltrpathdirs; do
8102 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8103 done
8104 fi
8105
8106
8107
8108
ac50fbac 8109 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
b80f6443 8110stdlib.h string.h unistd.h sys/param.h
ac50fbac
CR
8111do :
8112 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8113ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8114if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
b80f6443 8115 cat >>confdefs.h <<_ACEOF
3185942a 8116#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
b80f6443
JA
8117_ACEOF
8118
8119fi
8120
f73dda09
JA
8121done
8122
ac50fbac 8123 for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
3185942a 8124geteuid getgid getuid mempcpy munmap putenv setenv setlocale localeconv stpcpy \
b80f6443
JA
8125strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
8126__fsetlocking
ac50fbac
CR
8127do :
8128 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8129ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8130if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
b80f6443 8131 cat >>confdefs.h <<_ACEOF
3185942a 8132#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
b80f6443 8133_ACEOF
f73dda09
JA
8134
8135fi
8136done
8137
b80f6443
JA
8138
8139
8140
8141
8142
8143
8144 am_save_CPPFLAGS="$CPPFLAGS"
8145
8146 for element in $INCICONV; do
8147 haveit=
8148 for x in $CPPFLAGS; do
8149
8150 acl_save_prefix="$prefix"
8151 prefix="$acl_final_prefix"
8152 acl_save_exec_prefix="$exec_prefix"
8153 exec_prefix="$acl_final_exec_prefix"
8154 eval x=\"$x\"
8155 exec_prefix="$acl_save_exec_prefix"
8156 prefix="$acl_save_prefix"
8157
8158 if test "X$x" = "X$element"; then
8159 haveit=yes
8160 break
8161 fi
8162 done
8163 if test -z "$haveit"; then
8164 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8165 fi
8166 done
8167
8168
ac50fbac 8169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
3185942a 8170$as_echo_n "checking for iconv... " >&6; }
ac50fbac 8171if ${am_cv_func_iconv+:} false; then :
3185942a 8172 $as_echo_n "(cached) " >&6
f73dda09 8173else
f73dda09 8174
b80f6443
JA
8175 am_cv_func_iconv="no, consider installing GNU libiconv"
8176 am_cv_lib_iconv=no
ac50fbac 8177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8178/* end confdefs.h. */
b80f6443
JA
8179#include <stdlib.h>
8180#include <iconv.h>
f73dda09
JA
8181int
8182main ()
8183{
b80f6443
JA
8184iconv_t cd = iconv_open("","");
8185 iconv(cd,NULL,NULL,NULL,NULL);
8186 iconv_close(cd);
f73dda09
JA
8187 ;
8188 return 0;
8189}
8190_ACEOF
ac50fbac 8191if ac_fn_c_try_link "$LINENO"; then :
b80f6443 8192 am_cv_func_iconv=yes
f73dda09 8193fi
ac50fbac
CR
8194rm -f core conftest.err conftest.$ac_objext \
8195 conftest$ac_exeext conftest.$ac_ext
b80f6443
JA
8196 if test "$am_cv_func_iconv" != yes; then
8197 am_save_LIBS="$LIBS"
8198 LIBS="$LIBS $LIBICONV"
ac50fbac 8199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8200/* end confdefs.h. */
b80f6443
JA
8201#include <stdlib.h>
8202#include <iconv.h>
f73dda09
JA
8203int
8204main ()
8205{
b80f6443
JA
8206iconv_t cd = iconv_open("","");
8207 iconv(cd,NULL,NULL,NULL,NULL);
8208 iconv_close(cd);
f73dda09
JA
8209 ;
8210 return 0;
8211}
8212_ACEOF
ac50fbac 8213if ac_fn_c_try_link "$LINENO"; then :
b80f6443
JA
8214 am_cv_lib_iconv=yes
8215 am_cv_func_iconv=yes
f73dda09 8216fi
ac50fbac
CR
8217rm -f core conftest.err conftest.$ac_objext \
8218 conftest$ac_exeext conftest.$ac_ext
b80f6443
JA
8219 LIBS="$am_save_LIBS"
8220 fi
8221
f73dda09 8222fi
ac50fbac 8223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
3185942a 8224$as_echo "$am_cv_func_iconv" >&6; }
b80f6443 8225 if test "$am_cv_func_iconv" = yes; then
f73dda09 8226
ac50fbac 8227$as_echo "#define HAVE_ICONV 1" >>confdefs.h
f73dda09 8228
b80f6443
JA
8229 fi
8230 if test "$am_cv_lib_iconv" = yes; then
ac50fbac 8231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
3185942a 8232$as_echo_n "checking how to link with libiconv... " >&6; }
ac50fbac 8233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
3185942a 8234$as_echo "$LIBICONV" >&6; }
b80f6443
JA
8235 else
8236 CPPFLAGS="$am_save_CPPFLAGS"
8237 LIBICONV=
8238 LTLIBICONV=
8239 fi
8240
8241
8242
8243 if test "$am_cv_func_iconv" = yes; then
ac50fbac 8244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
3185942a 8245$as_echo_n "checking for iconv declaration... " >&6; }
ac50fbac 8246 if ${am_cv_proto_iconv+:} false; then :
3185942a 8247 $as_echo_n "(cached) " >&6
f73dda09 8248else
b80f6443 8249
ac50fbac 8250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8251/* end confdefs.h. */
b80f6443
JA
8252
8253#include <stdlib.h>
8254#include <iconv.h>
8255extern
f73dda09 8256#ifdef __cplusplus
b80f6443
JA
8257"C"
8258#endif
8259#if defined(__STDC__) || defined(__cplusplus)
8260size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8261#else
8262size_t iconv();
f73dda09 8263#endif
f73dda09
JA
8264
8265int
8266main ()
8267{
f73dda09
JA
8268
8269 ;
8270 return 0;
8271}
8272_ACEOF
ac50fbac 8273if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 8274 am_cv_proto_iconv_arg1=""
f73dda09 8275else
ac50fbac 8276 am_cv_proto_iconv_arg1="const"
f73dda09 8277fi
3185942a 8278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b80f6443 8279 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);"
f73dda09 8280fi
f73dda09 8281
b80f6443 8282 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ac50fbac 8283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
b80f6443 8284 }$am_cv_proto_iconv" >&5
3185942a
JA
8285$as_echo "${ac_t:-
8286 }$am_cv_proto_iconv" >&6; }
f73dda09 8287
b80f6443
JA
8288cat >>confdefs.h <<_ACEOF
8289#define ICONV_CONST $am_cv_proto_iconv_arg1
8290_ACEOF
8291
8292 fi
8293
8294
ac50fbac 8295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
3185942a 8296$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
ac50fbac 8297if ${am_cv_langinfo_codeset+:} false; then :
3185942a 8298 $as_echo_n "(cached) " >&6
f73dda09 8299else
ac50fbac 8300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8301/* end confdefs.h. */
b80f6443 8302#include <langinfo.h>
f73dda09
JA
8303int
8304main ()
8305{
b80f6443 8306char* cs = nl_langinfo(CODESET);
f73dda09
JA
8307 ;
8308 return 0;
8309}
8310_ACEOF
ac50fbac 8311if ac_fn_c_try_link "$LINENO"; then :
b80f6443 8312 am_cv_langinfo_codeset=yes
f73dda09 8313else
ac50fbac 8314 am_cv_langinfo_codeset=no
f73dda09 8315fi
ac50fbac
CR
8316rm -f core conftest.err conftest.$ac_objext \
8317 conftest$ac_exeext conftest.$ac_ext
b80f6443 8318
f73dda09 8319fi
ac50fbac 8320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
3185942a 8321$as_echo "$am_cv_langinfo_codeset" >&6; }
b80f6443 8322 if test $am_cv_langinfo_codeset = yes; then
f73dda09 8323
ac50fbac 8324$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f73dda09 8325
b80f6443 8326 fi
f73dda09 8327
b80f6443 8328 if test $ac_cv_header_locale_h = yes; then
f73dda09 8329
ac50fbac 8330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
3185942a 8331$as_echo_n "checking for LC_MESSAGES... " >&6; }
ac50fbac 8332if ${am_cv_val_LC_MESSAGES+:} false; then :
3185942a 8333 $as_echo_n "(cached) " >&6
f73dda09 8334else
ac50fbac 8335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8336/* end confdefs.h. */
b80f6443 8337#include <locale.h>
f73dda09
JA
8338int
8339main ()
8340{
b80f6443 8341return LC_MESSAGES
f73dda09
JA
8342 ;
8343 return 0;
8344}
8345_ACEOF
ac50fbac 8346if ac_fn_c_try_link "$LINENO"; then :
b80f6443 8347 am_cv_val_LC_MESSAGES=yes
f73dda09 8348else
ac50fbac 8349 am_cv_val_LC_MESSAGES=no
f73dda09 8350fi
ac50fbac
CR
8351rm -f core conftest.err conftest.$ac_objext \
8352 conftest$ac_exeext conftest.$ac_ext
f73dda09 8353fi
ac50fbac 8354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
3185942a 8355$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
b80f6443 8356 if test $am_cv_val_LC_MESSAGES = yes; then
f73dda09 8357
ac50fbac 8358$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
b80f6443
JA
8359
8360 fi
8361
8362 fi
f73dda09 8363
b80f6443
JA
8364 for ac_prog in bison
8365do
8366 # Extract the first word of "$ac_prog", so it can be a program name with args.
8367set dummy $ac_prog; ac_word=$2
ac50fbac 8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 8369$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 8370if ${ac_cv_prog_INTLBISON+:} false; then :
3185942a 8371 $as_echo_n "(cached) " >&6
f73dda09 8372else
b80f6443
JA
8373 if test -n "$INTLBISON"; then
8374 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
8375else
8376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8377for as_dir in $PATH
8378do
8379 IFS=$as_save_IFS
8380 test -z "$as_dir" && as_dir=.
ac50fbac
CR
8381 for ac_exec_ext in '' $ac_executable_extensions; do
8382 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 8383 ac_cv_prog_INTLBISON="$ac_prog"
ac50fbac 8384 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
8385 break 2
8386 fi
8387done
ac50fbac 8388 done
3185942a 8389IFS=$as_save_IFS
f73dda09 8390
b80f6443
JA
8391fi
8392fi
8393INTLBISON=$ac_cv_prog_INTLBISON
8394if test -n "$INTLBISON"; then
ac50fbac 8395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5
3185942a 8396$as_echo "$INTLBISON" >&6; }
b80f6443 8397else
ac50fbac 8398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 8399$as_echo "no" >&6; }
f73dda09
JA
8400fi
8401
3185942a 8402
b80f6443
JA
8403 test -n "$INTLBISON" && break
8404done
8405
8406 if test -z "$INTLBISON"; then
8407 ac_verc_fail=yes
8408 else
ac50fbac 8409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5
3185942a 8410$as_echo_n "checking version of bison... " >&6; }
b80f6443
JA
8411 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
8412 case $ac_prog_version in
8413 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
8414 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
8415 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
8416 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
8417 esac
ac50fbac 8418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
3185942a 8419$as_echo "$ac_prog_version" >&6; }
b80f6443
JA
8420 fi
8421 if test $ac_verc_fail = yes; then
8422 INTLBISON=:
8423 fi
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
ac50fbac 8440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
3185942a
JA
8441$as_echo_n "checking whether NLS is requested... " >&6; }
8442 # Check whether --enable-nls was given.
ac50fbac 8443if test "${enable_nls+set}" = set; then :
3185942a 8444 enableval=$enable_nls; USE_NLS=$enableval
b80f6443
JA
8445else
8446 USE_NLS=yes
3185942a
JA
8447fi
8448
ac50fbac 8449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
3185942a 8450$as_echo "$USE_NLS" >&6; }
b80f6443
JA
8451
8452
8453
8454
8455 BUILD_INCLUDED_LIBINTL=no
8456 USE_INCLUDED_LIBINTL=no
8457
8458 LIBINTL=
8459 LTLIBINTL=
8460 POSUB=
8461
8462 if test "$USE_NLS" = "yes"; then
8463 gt_use_preinstalled_gnugettext=no
8464
ac50fbac 8465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5
3185942a 8466$as_echo_n "checking whether included gettext is requested... " >&6; }
b80f6443 8467
3185942a 8468# Check whether --with-included-gettext was given.
ac50fbac 8469if test "${with_included_gettext+set}" = set; then :
3185942a 8470 withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
b80f6443
JA
8471else
8472 nls_cv_force_use_gnu_gettext=no
3185942a
JA
8473fi
8474
ac50fbac 8475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5
3185942a 8476$as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
b80f6443
JA
8477
8478 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8479 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8480
8481
8482
8483
8484
8485
ac50fbac 8486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
3185942a 8487$as_echo_n "checking for GNU gettext in libc... " >&6; }
ac50fbac 8488if ${gt_cv_func_gnugettext2_libc+:} false; then :
3185942a 8489 $as_echo_n "(cached) " >&6
f73dda09 8490else
ac50fbac 8491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8492/* end confdefs.h. */
b80f6443
JA
8493#include <libintl.h>
8494extern int _nl_msg_cat_cntr;
8495extern int *_nl_domain_bindings;
f73dda09
JA
8496int
8497main ()
8498{
b80f6443
JA
8499bindtextdomain ("", "");
8500return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_domain_bindings
f73dda09
JA
8501 ;
8502 return 0;
8503}
8504_ACEOF
ac50fbac 8505if ac_fn_c_try_link "$LINENO"; then :
b80f6443 8506 gt_cv_func_gnugettext2_libc=yes
f73dda09 8507else
ac50fbac 8508 gt_cv_func_gnugettext2_libc=no
f73dda09 8509fi
ac50fbac
CR
8510rm -f core conftest.err conftest.$ac_objext \
8511 conftest$ac_exeext conftest.$ac_ext
f73dda09 8512fi
ac50fbac 8513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext2_libc" >&5
3185942a 8514$as_echo "$gt_cv_func_gnugettext2_libc" >&6; }
f73dda09 8515
b80f6443 8516 if test "$gt_cv_func_gnugettext2_libc" != "yes"; then
f73dda09 8517
f73dda09 8518
f73dda09 8519
b80f6443
JA
8520 use_additional=yes
8521
8522 acl_save_prefix="$prefix"
8523 prefix="$acl_final_prefix"
8524 acl_save_exec_prefix="$exec_prefix"
8525 exec_prefix="$acl_final_exec_prefix"
8526
8527 eval additional_includedir=\"$includedir\"
8528 eval additional_libdir=\"$libdir\"
8529
8530 exec_prefix="$acl_save_exec_prefix"
8531 prefix="$acl_save_prefix"
8532
8533
3185942a 8534# Check whether --with-libintl-prefix was given.
ac50fbac 8535if test "${with_libintl_prefix+set}" = set; then :
3185942a 8536 withval=$with_libintl_prefix;
b80f6443
JA
8537 if test "X$withval" = "Xno"; then
8538 use_additional=no
8539 else
8540 if test "X$withval" = "X"; then
8541
8542 acl_save_prefix="$prefix"
8543 prefix="$acl_final_prefix"
8544 acl_save_exec_prefix="$exec_prefix"
8545 exec_prefix="$acl_final_exec_prefix"
8546
8547 eval additional_includedir=\"$includedir\"
8548 eval additional_libdir=\"$libdir\"
8549
8550 exec_prefix="$acl_save_exec_prefix"
8551 prefix="$acl_save_prefix"
8552
8553 else
8554 additional_includedir="$withval/include"
8555 additional_libdir="$withval/lib"
8556 fi
8557 fi
8558
3185942a
JA
8559fi
8560
b80f6443
JA
8561 LIBINTL=
8562 LTLIBINTL=
8563 INCINTL=
8564 rpathdirs=
8565 ltrpathdirs=
8566 names_already_handled=
8567 names_next_round='intl '
8568 while test -n "$names_next_round"; do
8569 names_this_round="$names_next_round"
8570 names_next_round=
8571 for name in $names_this_round; do
8572 already_handled=
8573 for n in $names_already_handled; do
8574 if test "$n" = "$name"; then
8575 already_handled=yes
8576 break
8577 fi
8578 done
8579 if test -z "$already_handled"; then
8580 names_already_handled="$names_already_handled $name"
8581 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8582 eval value=\"\$HAVE_LIB$uppername\"
8583 if test -n "$value"; then
8584 if test "$value" = yes; then
8585 eval value=\"\$LIB$uppername\"
8586 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
8587 eval value=\"\$LTLIB$uppername\"
8588 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
8589 else
8590 :
8591 fi
8592 else
8593 found_dir=
8594 found_la=
8595 found_so=
8596 found_a=
8597 if test $use_additional = yes; then
ac50fbac 8598 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
b80f6443
JA
8599 found_dir="$additional_libdir"
8600 found_so="$additional_libdir/lib$name.$shlibext"
8601 if test -f "$additional_libdir/lib$name.la"; then
8602 found_la="$additional_libdir/lib$name.la"
8603 fi
8604 else
8605 if test -f "$additional_libdir/lib$name.$libext"; then
8606 found_dir="$additional_libdir"
8607 found_a="$additional_libdir/lib$name.$libext"
8608 if test -f "$additional_libdir/lib$name.la"; then
8609 found_la="$additional_libdir/lib$name.la"
8610 fi
8611 fi
8612 fi
8613 fi
8614 if test "X$found_dir" = "X"; then
8615 for x in $LDFLAGS $LTLIBINTL; do
8616
8617 acl_save_prefix="$prefix"
8618 prefix="$acl_final_prefix"
8619 acl_save_exec_prefix="$exec_prefix"
8620 exec_prefix="$acl_final_exec_prefix"
8621 eval x=\"$x\"
8622 exec_prefix="$acl_save_exec_prefix"
8623 prefix="$acl_save_prefix"
8624
8625 case "$x" in
8626 -L*)
8627 dir=`echo "X$x" | sed -e 's/^X-L//'`
ac50fbac 8628 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
b80f6443
JA
8629 found_dir="$dir"
8630 found_so="$dir/lib$name.$shlibext"
8631 if test -f "$dir/lib$name.la"; then
8632 found_la="$dir/lib$name.la"
8633 fi
8634 else
8635 if test -f "$dir/lib$name.$libext"; then
8636 found_dir="$dir"
8637 found_a="$dir/lib$name.$libext"
8638 if test -f "$dir/lib$name.la"; then
8639 found_la="$dir/lib$name.la"
8640 fi
8641 fi
8642 fi
8643 ;;
8644 esac
8645 if test "X$found_dir" != "X"; then
8646 break
8647 fi
8648 done
8649 fi
8650 if test "X$found_dir" != "X"; then
8651 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
8652 if test "X$found_so" != "X"; then
8653 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8654 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8655 else
8656 haveit=
8657 for x in $ltrpathdirs; do
8658 if test "X$x" = "X$found_dir"; then
8659 haveit=yes
8660 break
8661 fi
8662 done
8663 if test -z "$haveit"; then
8664 ltrpathdirs="$ltrpathdirs $found_dir"
8665 fi
8666 if test "$hardcode_direct" = yes; then
8667 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8668 else
8669 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8670 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8671 haveit=
8672 for x in $rpathdirs; do
8673 if test "X$x" = "X$found_dir"; then
8674 haveit=yes
8675 break
8676 fi
8677 done
8678 if test -z "$haveit"; then
8679 rpathdirs="$rpathdirs $found_dir"
8680 fi
8681 else
8682 haveit=
8683 for x in $LDFLAGS $LIBINTL; do
8684
8685 acl_save_prefix="$prefix"
8686 prefix="$acl_final_prefix"
8687 acl_save_exec_prefix="$exec_prefix"
8688 exec_prefix="$acl_final_exec_prefix"
8689 eval x=\"$x\"
8690 exec_prefix="$acl_save_exec_prefix"
8691 prefix="$acl_save_prefix"
8692
8693 if test "X$x" = "X-L$found_dir"; then
8694 haveit=yes
8695 break
8696 fi
8697 done
8698 if test -z "$haveit"; then
8699 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
8700 fi
8701 if test "$hardcode_minus_L" != no; then
8702 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8703 else
8704 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
8705 fi
8706 fi
8707 fi
8708 fi
8709 else
8710 if test "X$found_a" != "X"; then
8711 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
8712 else
8713 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
8714 fi
8715 fi
8716 additional_includedir=
8717 case "$found_dir" in
8718 */lib | */lib/)
8719 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8720 additional_includedir="$basedir/include"
8721 ;;
8722 esac
8723 if test "X$additional_includedir" != "X"; then
8724 if test "X$additional_includedir" != "X/usr/include"; then
8725 haveit=
8726 if test "X$additional_includedir" = "X/usr/local/include"; then
8727 if test -n "$GCC"; then
8728 case $host_os in
8729 linux*) haveit=yes;;
8730 esac
8731 fi
8732 fi
8733 if test -z "$haveit"; then
8734 for x in $CPPFLAGS $INCINTL; do
8735
8736 acl_save_prefix="$prefix"
8737 prefix="$acl_final_prefix"
8738 acl_save_exec_prefix="$exec_prefix"
8739 exec_prefix="$acl_final_exec_prefix"
8740 eval x=\"$x\"
8741 exec_prefix="$acl_save_exec_prefix"
8742 prefix="$acl_save_prefix"
8743
8744 if test "X$x" = "X-I$additional_includedir"; then
8745 haveit=yes
8746 break
8747 fi
8748 done
8749 if test -z "$haveit"; then
8750 if test -d "$additional_includedir"; then
8751 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
8752 fi
8753 fi
8754 fi
8755 fi
8756 fi
8757 if test -n "$found_la"; then
8758 save_libdir="$libdir"
8759 case "$found_la" in
8760 */* | *\\*) . "$found_la" ;;
8761 *) . "./$found_la" ;;
8762 esac
8763 libdir="$save_libdir"
8764 for dep in $dependency_libs; do
8765 case "$dep" in
8766 -L*)
8767 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8768 if test "X$additional_libdir" != "X/usr/lib"; then
8769 haveit=
8770 if test "X$additional_libdir" = "X/usr/local/lib"; then
8771 if test -n "$GCC"; then
8772 case $host_os in
8773 linux*) haveit=yes;;
8774 esac
8775 fi
8776 fi
8777 if test -z "$haveit"; then
8778 haveit=
8779 for x in $LDFLAGS $LIBINTL; do
8780
8781 acl_save_prefix="$prefix"
8782 prefix="$acl_final_prefix"
8783 acl_save_exec_prefix="$exec_prefix"
8784 exec_prefix="$acl_final_exec_prefix"
8785 eval x=\"$x\"
8786 exec_prefix="$acl_save_exec_prefix"
8787 prefix="$acl_save_prefix"
8788
8789 if test "X$x" = "X-L$additional_libdir"; then
8790 haveit=yes
8791 break
8792 fi
8793 done
8794 if test -z "$haveit"; then
8795 if test -d "$additional_libdir"; then
8796 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
8797 fi
8798 fi
8799 haveit=
8800 for x in $LDFLAGS $LTLIBINTL; do
8801
8802 acl_save_prefix="$prefix"
8803 prefix="$acl_final_prefix"
8804 acl_save_exec_prefix="$exec_prefix"
8805 exec_prefix="$acl_final_exec_prefix"
8806 eval x=\"$x\"
8807 exec_prefix="$acl_save_exec_prefix"
8808 prefix="$acl_save_prefix"
8809
8810 if test "X$x" = "X-L$additional_libdir"; then
8811 haveit=yes
8812 break
8813 fi
8814 done
8815 if test -z "$haveit"; then
8816 if test -d "$additional_libdir"; then
8817 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
8818 fi
8819 fi
8820 fi
8821 fi
8822 ;;
8823 -R*)
8824 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8825 if test "$enable_rpath" != no; then
8826 haveit=
8827 for x in $rpathdirs; do
8828 if test "X$x" = "X$dir"; then
8829 haveit=yes
8830 break
8831 fi
8832 done
8833 if test -z "$haveit"; then
8834 rpathdirs="$rpathdirs $dir"
8835 fi
8836 haveit=
8837 for x in $ltrpathdirs; do
8838 if test "X$x" = "X$dir"; then
8839 haveit=yes
8840 break
8841 fi
8842 done
8843 if test -z "$haveit"; then
8844 ltrpathdirs="$ltrpathdirs $dir"
8845 fi
8846 fi
8847 ;;
8848 -l*)
8849 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8850 ;;
8851 *.la)
8852 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8853 ;;
8854 *)
8855 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
8856 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
8857 ;;
8858 esac
8859 done
8860 fi
8861 else
8862 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
8863 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
8864 fi
8865 fi
8866 fi
8867 done
8868 done
8869 if test "X$rpathdirs" != "X"; then
8870 if test -n "$hardcode_libdir_separator"; then
8871 alldirs=
8872 for found_dir in $rpathdirs; do
8873 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8874 done
8875 acl_save_libdir="$libdir"
8876 libdir="$alldirs"
8877 eval flag=\"$hardcode_libdir_flag_spec\"
8878 libdir="$acl_save_libdir"
8879 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
8880 else
8881 for found_dir in $rpathdirs; do
8882 acl_save_libdir="$libdir"
8883 libdir="$found_dir"
8884 eval flag=\"$hardcode_libdir_flag_spec\"
8885 libdir="$acl_save_libdir"
8886 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
8887 done
8888 fi
8889 fi
ac50fbac
CR
8890 if test "X$ltrpathdirs" != "X"; then
8891 for found_dir in $ltrpathdirs; do
8892 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
8893 done
8894 fi
3185942a 8895
ac50fbac
CR
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
8897$as_echo_n "checking for GNU gettext in libintl... " >&6; }
8898if ${gt_cv_func_gnugettext2_libintl+:} false; then :
3185942a
JA
8899 $as_echo_n "(cached) " >&6
8900else
ac50fbac
CR
8901 gt_save_CPPFLAGS="$CPPFLAGS"
8902 CPPFLAGS="$CPPFLAGS $INCINTL"
8903 gt_save_LIBS="$LIBS"
8904 LIBS="$LIBS $LIBINTL"
8905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 8906/* end confdefs.h. */
ac50fbac
CR
8907#include <libintl.h>
8908extern int _nl_msg_cat_cntr;
8909extern
8910#ifdef __cplusplus
8911"C"
8912#endif
8913const char *_nl_expand_alias ();
3185942a
JA
8914int
8915main ()
8916{
ac50fbac
CR
8917bindtextdomain ("", "");
8918return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0)
f73dda09
JA
8919 ;
8920 return 0;
8921}
8922_ACEOF
ac50fbac
CR
8923if ac_fn_c_try_link "$LINENO"; then :
8924 gt_cv_func_gnugettext2_libintl=yes
8925else
8926 gt_cv_func_gnugettext2_libintl=no
8927fi
8928rm -f core conftest.err conftest.$ac_objext \
8929 conftest$ac_exeext conftest.$ac_ext
8930 if test "$gt_cv_func_gnugettext2_libintl" != yes && test -n "$LIBICONV"; then
8931 LIBS="$LIBS $LIBICONV"
8932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 8933/* end confdefs.h. */
ac50fbac
CR
8934#include <libintl.h>
8935extern int _nl_msg_cat_cntr;
8936extern
8937#ifdef __cplusplus
8938"C"
8939#endif
8940const char *_nl_expand_alias ();
3185942a
JA
8941int
8942main ()
8943{
ac50fbac
CR
8944bindtextdomain ("", "");
8945return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0)
3185942a
JA
8946 ;
8947 return 0;
8948}
8949_ACEOF
ac50fbac
CR
8950if ac_fn_c_try_link "$LINENO"; then :
8951 LIBINTL="$LIBINTL $LIBICONV"
8952 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
8953 gt_cv_func_gnugettext2_libintl=yes
3185942a 8954
3185942a 8955fi
ac50fbac
CR
8956rm -f core conftest.err conftest.$ac_objext \
8957 conftest$ac_exeext conftest.$ac_ext
8958 fi
8959 CPPFLAGS="$gt_save_CPPFLAGS"
8960 LIBS="$gt_save_LIBS"
8961fi
8962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext2_libintl" >&5
8963$as_echo "$gt_cv_func_gnugettext2_libintl" >&6; }
8964 fi
3185942a 8965
ac50fbac
CR
8966 if test "$gt_cv_func_gnugettext2_libc" = "yes" \
8967 || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \
8968 && test "$PACKAGE" != gettext-runtime \
8969 && test "$PACKAGE" != gettext-tools; }; then
8970 gt_use_preinstalled_gnugettext=yes
8971 else
8972 LIBINTL=
8973 LTLIBINTL=
8974 INCINTL=
8975 fi
0628567a 8976
3185942a 8977
ac50fbac
CR
8978 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
8979 nls_cv_use_gnu_gettext=yes
8980 fi
8981 fi
3185942a 8982
ac50fbac
CR
8983 if test "$nls_cv_use_gnu_gettext" = "yes"; then
8984 BUILD_INCLUDED_LIBINTL=yes
8985 USE_INCLUDED_LIBINTL=yes
8986 LIBINTL="lib/intl/libintl.a $LIBICONV"
8987 LTLIBINTL="lib/intl/libintl.a $LTLIBICONV"
8988 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
8989 fi
f73dda09 8990
ac50fbac
CR
8991 if test "$gt_use_preinstalled_gnugettext" = "yes" \
8992 || test "$nls_cv_use_gnu_gettext" = "yes"; then
8993 CATOBJEXT=.gmo
8994 fi
ccc6cda3 8995
ccc6cda3 8996
ac50fbac
CR
8997 if test "$gt_use_preinstalled_gnugettext" = "yes" \
8998 || test "$nls_cv_use_gnu_gettext" = "yes"; then
b80f6443 8999
ac50fbac 9000$as_echo "#define ENABLE_NLS 1" >>confdefs.h
b80f6443 9001
ac50fbac
CR
9002 else
9003 USE_NLS=no
9004 fi
9005 fi
ccc6cda3 9006
ac50fbac
CR
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
9008$as_echo_n "checking whether to use NLS... " >&6; }
9009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
9010$as_echo "$USE_NLS" >&6; }
9011 if test "$USE_NLS" = "yes"; then
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
9013$as_echo_n "checking where the gettext function comes from... " >&6; }
9014 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
9015 if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
9016 gt_source="external libintl"
9017 else
9018 gt_source="libc"
9019 fi
9020 else
9021 gt_source="included intl directory"
9022 fi
9023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
9024$as_echo "$gt_source" >&6; }
9025 fi
f73dda09 9026
ac50fbac 9027 if test "$USE_NLS" = "yes"; then
f73dda09 9028
ac50fbac
CR
9029 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
9030 if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
9032$as_echo_n "checking how to link with libintl... " >&6; }
9033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
9034$as_echo "$LIBINTL" >&6; }
0628567a 9035
ac50fbac
CR
9036 for element in $INCINTL; do
9037 haveit=
9038 for x in $CPPFLAGS; do
3185942a 9039
ac50fbac
CR
9040 acl_save_prefix="$prefix"
9041 prefix="$acl_final_prefix"
9042 acl_save_exec_prefix="$exec_prefix"
9043 exec_prefix="$acl_final_exec_prefix"
9044 eval x=\"$x\"
9045 exec_prefix="$acl_save_exec_prefix"
9046 prefix="$acl_save_prefix"
ccc6cda3 9047
ac50fbac
CR
9048 if test "X$x" = "X$element"; then
9049 haveit=yes
9050 break
9051 fi
9052 done
9053 if test -z "$haveit"; then
9054 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9055 fi
9056 done
ccc6cda3 9057
ac50fbac 9058 fi
b80f6443 9059
f73dda09 9060
ac50fbac 9061$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
f73dda09 9062
f73dda09 9063
ac50fbac 9064$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
0628567a 9065
ac50fbac 9066 fi
3185942a 9067
ac50fbac
CR
9068 POSUB=po
9069 fi
ccc6cda3 9070
ac50fbac
CR
9071
9072 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
9073 BUILD_INCLUDED_LIBINTL=yes
9074 fi
ccc6cda3 9075
b80f6443 9076
ac50fbac
CR
9077
9078
9079
9080 nls_cv_header_intl=
9081 nls_cv_header_libgt=
9082
9083 DATADIRNAME=share
9084
9085
9086 INSTOBJEXT=.mo
9087
9088
9089 GENCAT=gencat
9090
9091
9092 if test "$USE_INCLUDED_LIBINTL" = yes; then
9093 INTLOBJS="\$(GETTOBJS)"
9094 fi
9095
9096
9097 INTL_LIBTOOL_SUFFIX_PREFIX=
9098
9099
9100
9101 INTLLIBS="$LIBINTL"
9102
9103
9104
9105
9106
9107
9108
9109ac_header_dirent=no
9110for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9111 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
9113$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
9114if eval \${$as_ac_Header+:} false; then :
3185942a 9115 $as_echo_n "(cached) " >&6
ccc6cda3 9116else
ac50fbac 9117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9118/* end confdefs.h. */
ccc6cda3 9119#include <sys/types.h>
ac50fbac 9120#include <$ac_hdr>
f73dda09
JA
9121
9122int
9123main ()
9124{
ac50fbac
CR
9125if ((DIR *) 0)
9126return 0;
f73dda09
JA
9127 ;
9128 return 0;
9129}
9130_ACEOF
ac50fbac
CR
9131if ac_fn_c_try_compile "$LINENO"; then :
9132 eval "$as_ac_Header=yes"
ccc6cda3 9133else
ac50fbac 9134 eval "$as_ac_Header=no"
ccc6cda3 9135fi
3185942a 9136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 9137fi
ac50fbac
CR
9138eval ac_res=\$$as_ac_Header
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9140$as_echo "$ac_res" >&6; }
9141if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9142 cat >>confdefs.h <<_ACEOF
9143#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
b80f6443
JA
9144_ACEOF
9145
ac50fbac
CR
9146ac_header_dirent=$ac_hdr; break
9147fi
ccc6cda3 9148
ac50fbac
CR
9149done
9150# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9151if test $ac_header_dirent = dirent.h; then
9152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9153$as_echo_n "checking for library containing opendir... " >&6; }
9154if ${ac_cv_search_opendir+:} false; then :
17345e5a
JA
9155 $as_echo_n "(cached) " >&6
9156else
ac50fbac
CR
9157 ac_func_search_save_LIBS=$LIBS
9158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a
JA
9159/* end confdefs.h. */
9160
ac50fbac
CR
9161/* Override any GCC internal prototype to avoid an error.
9162 Use char because int might match the return type of a GCC
9163 builtin and then its argument prototype would still apply. */
9164#ifdef __cplusplus
9165extern "C"
9166#endif
9167char opendir ();
17345e5a
JA
9168int
9169main ()
9170{
ac50fbac 9171return opendir ();
17345e5a
JA
9172 ;
9173 return 0;
9174}
9175_ACEOF
ac50fbac
CR
9176for ac_lib in '' dir; do
9177 if test -z "$ac_lib"; then
9178 ac_res="none required"
9179 else
9180 ac_res=-l$ac_lib
9181 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9182 fi
9183 if ac_fn_c_try_link "$LINENO"; then :
9184 ac_cv_search_opendir=$ac_res
9185fi
9186rm -f core conftest.err conftest.$ac_objext \
9187 conftest$ac_exeext
9188 if ${ac_cv_search_opendir+:} false; then :
9189 break
9190fi
9191done
9192if ${ac_cv_search_opendir+:} false; then :
17345e5a 9193
ac50fbac
CR
9194else
9195 ac_cv_search_opendir=no
9196fi
9197rm conftest.$ac_ext
9198LIBS=$ac_func_search_save_LIBS
17345e5a 9199fi
ac50fbac
CR
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9201$as_echo "$ac_cv_search_opendir" >&6; }
9202ac_res=$ac_cv_search_opendir
9203if test "$ac_res" != no; then :
9204 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17345e5a 9205
17345e5a 9206fi
ac50fbac
CR
9207
9208else
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9210$as_echo_n "checking for library containing opendir... " >&6; }
9211if ${ac_cv_search_opendir+:} false; then :
17345e5a
JA
9212 $as_echo_n "(cached) " >&6
9213else
ac50fbac
CR
9214 ac_func_search_save_LIBS=$LIBS
9215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a 9216/* end confdefs.h. */
ac50fbac
CR
9217
9218/* Override any GCC internal prototype to avoid an error.
9219 Use char because int might match the return type of a GCC
9220 builtin and then its argument prototype would still apply. */
9221#ifdef __cplusplus
9222extern "C"
9223#endif
9224char opendir ();
17345e5a
JA
9225int
9226main ()
9227{
ac50fbac 9228return opendir ();
17345e5a
JA
9229 ;
9230 return 0;
9231}
9232_ACEOF
ac50fbac
CR
9233for ac_lib in '' x; do
9234 if test -z "$ac_lib"; then
9235 ac_res="none required"
9236 else
9237 ac_res=-l$ac_lib
9238 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9239 fi
9240 if ac_fn_c_try_link "$LINENO"; then :
9241 ac_cv_search_opendir=$ac_res
9242fi
9243rm -f core conftest.err conftest.$ac_objext \
9244 conftest$ac_exeext
9245 if ${ac_cv_search_opendir+:} false; then :
9246 break
17345e5a 9247fi
ac50fbac
CR
9248done
9249if ${ac_cv_search_opendir+:} false; then :
17345e5a 9250
17345e5a 9251else
ac50fbac 9252 ac_cv_search_opendir=no
17345e5a 9253fi
ac50fbac
CR
9254rm conftest.$ac_ext
9255LIBS=$ac_func_search_save_LIBS
17345e5a 9256fi
ac50fbac
CR
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9258$as_echo "$ac_cv_search_opendir" >&6; }
9259ac_res=$ac_cv_search_opendir
9260if test "$ac_res" != no; then :
9261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17345e5a
JA
9262
9263fi
9264
9265fi
9266
ac50fbac
CR
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9268$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9269if ${ac_cv_header_time+:} false; then :
3185942a 9270 $as_echo_n "(cached) " >&6
f73dda09 9271else
ac50fbac 9272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9273/* end confdefs.h. */
ac50fbac
CR
9274#include <sys/types.h>
9275#include <sys/time.h>
9276#include <time.h>
b80f6443 9277
f73dda09
JA
9278int
9279main ()
9280{
ac50fbac
CR
9281if ((struct tm *) 0)
9282return 0;
f73dda09
JA
9283 ;
9284 return 0;
9285}
9286_ACEOF
ac50fbac
CR
9287if ac_fn_c_try_compile "$LINENO"; then :
9288 ac_cv_header_time=yes
f73dda09 9289else
ac50fbac
CR
9290 ac_cv_header_time=no
9291fi
9292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9293fi
9294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9295$as_echo "$ac_cv_header_time" >&6; }
9296if test $ac_cv_header_time = yes; then
9297
9298$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
0628567a 9299
f73dda09 9300fi
3185942a 9301
0628567a 9302
b80f6443 9303
ac50fbac
CR
9304 for ac_header in inttypes.h
9305do :
9306 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
9307if test "x$ac_cv_header_inttypes_h" = xyes; then :
9308 cat >>confdefs.h <<_ACEOF
9309#define HAVE_INTTYPES_H 1
9310_ACEOF
9311
9312fi
9313
9314done
9315
9316
9317
9318for ac_header in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
9319 memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
9320 stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \
9321 regex.h syslog.h ulimit.h
9322do :
9323 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9324ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9325if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9326 cat >>confdefs.h <<_ACEOF
9327#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
0628567a 9328_ACEOF
b80f6443 9329
ac50fbac
CR
9330fi
9331
9332done
9333
a0c0a00f 9334for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \
d233b485 9335 sys/mman.h sys/param.h sys/socket.h sys/stat.h \
ac50fbac
CR
9336 sys/time.h sys/times.h sys/types.h sys/wait.h
9337do :
9338 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9339ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9340if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9341 cat >>confdefs.h <<_ACEOF
9342#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
f73dda09 9343_ACEOF
0628567a 9344
f73dda09 9345fi
3185942a 9346
ac50fbac
CR
9347done
9348
9349for ac_header in netinet/in.h arpa/inet.h
9350do :
9351 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9352ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9353if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9354 cat >>confdefs.h <<_ACEOF
9355#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9356_ACEOF
0628567a 9357
b80f6443 9358fi
3185942a 9359
ac50fbac
CR
9360done
9361
9362
9363ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "
9364#if HAVE_SYS_STREAM_H
9365# include <sys/stream.h>
9366#endif
9367
9368"
9369if test "x$ac_cv_header_sys_ptem_h" = xyes; then :
9370
ccc6cda3 9371fi
3185942a 9372
ac50fbac
CR
9373
9374
a0c0a00f
CR
9375ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
9376#if HAVE_SYS_TIME_H
9377# include <sys/time.h>
9378#endif
9379
9380"
9381if test "x$ac_cv_header_sys_resource_h" = xyes; then :
9382 $as_echo "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
9383
9384fi
9385
9386
9387
ac50fbac
CR
9388# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9389# for constant arguments. Useless!
9390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9391$as_echo_n "checking for working alloca.h... " >&6; }
9392if ${ac_cv_working_alloca_h+:} false; then :
9393 $as_echo_n "(cached) " >&6
9394else
9395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9396/* end confdefs.h. */
ac50fbac 9397#include <alloca.h>
f73dda09
JA
9398int
9399main ()
9400{
ac50fbac
CR
9401char *p = (char *) alloca (2 * sizeof (int));
9402 if (p) return 0;
f73dda09
JA
9403 ;
9404 return 0;
9405}
9406_ACEOF
ac50fbac
CR
9407if ac_fn_c_try_link "$LINENO"; then :
9408 ac_cv_working_alloca_h=yes
f73dda09 9409else
ac50fbac
CR
9410 ac_cv_working_alloca_h=no
9411fi
9412rm -f core conftest.err conftest.$ac_objext \
9413 conftest$ac_exeext conftest.$ac_ext
9414fi
9415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9416$as_echo "$ac_cv_working_alloca_h" >&6; }
9417if test $ac_cv_working_alloca_h = yes; then
9418
9419$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
0628567a 9420
f73dda09 9421fi
3185942a 9422
ac50fbac
CR
9423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9424$as_echo_n "checking for alloca... " >&6; }
9425if ${ac_cv_func_alloca_works+:} false; then :
9426 $as_echo_n "(cached) " >&6
f73dda09 9427else
ac50fbac 9428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9429/* end confdefs.h. */
ac50fbac
CR
9430#ifdef __GNUC__
9431# define alloca __builtin_alloca
9432#else
9433# ifdef _MSC_VER
9434# include <malloc.h>
9435# define alloca _alloca
9436# else
9437# ifdef HAVE_ALLOCA_H
9438# include <alloca.h>
9439# else
9440# ifdef _AIX
9441 #pragma alloca
9442# else
9443# ifndef alloca /* predefined by HP cc +Olibcalls */
9444void *alloca (size_t);
9445# endif
9446# endif
9447# endif
9448# endif
9449#endif
9450
f73dda09
JA
9451int
9452main ()
9453{
ac50fbac
CR
9454char *p = (char *) alloca (1);
9455 if (p) return 0;
f73dda09
JA
9456 ;
9457 return 0;
9458}
9459_ACEOF
ac50fbac
CR
9460if ac_fn_c_try_link "$LINENO"; then :
9461 ac_cv_func_alloca_works=yes
ccc6cda3 9462else
ac50fbac 9463 ac_cv_func_alloca_works=no
f73dda09 9464fi
ac50fbac
CR
9465rm -f core conftest.err conftest.$ac_objext \
9466 conftest$ac_exeext conftest.$ac_ext
f73dda09 9467fi
ac50fbac
CR
9468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9469$as_echo "$ac_cv_func_alloca_works" >&6; }
3185942a 9470
ac50fbac 9471if test $ac_cv_func_alloca_works = yes; then
3185942a 9472
ac50fbac 9473$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
3185942a 9474
ac50fbac
CR
9475else
9476 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9477# that cause trouble. Some versions do not even contain alloca or
9478# contain a buggy version. If you still want to use their alloca,
9479# use ar to extract alloca.o from them instead of compiling alloca.c.
ccc6cda3 9480
ac50fbac 9481ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
b80f6443 9482
ac50fbac
CR
9483$as_echo "#define C_ALLOCA 1" >>confdefs.h
9484
9485
9486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9487$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9488if ${ac_cv_os_cray+:} false; then :
3185942a 9489 $as_echo_n "(cached) " >&6
f73dda09 9490else
ac50fbac 9491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9492/* end confdefs.h. */
ac50fbac
CR
9493#if defined CRAY && ! defined CRAY2
9494webecray
9495#else
9496wenotbecray
9497#endif
3185942a 9498
f73dda09 9499_ACEOF
ac50fbac
CR
9500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9501 $EGREP "webecray" >/dev/null 2>&1; then :
9502 ac_cv_os_cray=yes
9503else
9504 ac_cv_os_cray=no
9505fi
9506rm -f conftest*
9507
9508fi
9509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9510$as_echo "$ac_cv_os_cray" >&6; }
9511if test $ac_cv_os_cray = yes; then
9512 for ac_func in _getb67 GETB67 getb67; do
9513 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9514ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9515if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9516
9517cat >>confdefs.h <<_ACEOF
9518#define CRAY_STACKSEG_END $ac_func
0628567a 9519_ACEOF
ac50fbac
CR
9520
9521 break
9522fi
9523
9524 done
9525fi
9526
9527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9528$as_echo_n "checking stack direction for C alloca... " >&6; }
9529if ${ac_cv_c_stack_direction+:} false; then :
9530 $as_echo_n "(cached) " >&6
9531else
9532 if test "$cross_compiling" = yes; then :
9533 ac_cv_c_stack_direction=0
9534else
9535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9536/* end confdefs.h. */
f73dda09
JA
9537$ac_includes_default
9538int
ac50fbac 9539find_stack_direction (int *addr, int depth)
f73dda09 9540{
ac50fbac
CR
9541 int dir, dummy = 0;
9542 if (! addr)
9543 addr = &dummy;
9544 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
9545 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
9546 return dir + dummy;
9547}
b80f6443 9548
ac50fbac
CR
9549int
9550main (int argc, char **argv)
9551{
9552 return find_stack_direction (0, argc + !argv + 20) < 0;
f73dda09
JA
9553}
9554_ACEOF
ac50fbac
CR
9555if ac_fn_c_try_run "$LINENO"; then :
9556 ac_cv_c_stack_direction=1
f73dda09 9557else
ac50fbac
CR
9558 ac_cv_c_stack_direction=-1
9559fi
9560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9561 conftest.$ac_objext conftest.beam conftest.$ac_ext
9562fi
9563
9564fi
9565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9566$as_echo "$ac_cv_c_stack_direction" >&6; }
9567cat >>confdefs.h <<_ACEOF
9568#define STACK_DIRECTION $ac_cv_c_stack_direction
9569_ACEOF
9570
0628567a 9571
a0c0a00f
CR
9572fi
9573
9574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9575$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9576if ${ac_cv_type_uid_t+:} false; then :
9577 $as_echo_n "(cached) " >&6
9578else
9579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9580/* end confdefs.h. */
9581#include <sys/types.h>
9582
9583_ACEOF
9584if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9585 $EGREP "uid_t" >/dev/null 2>&1; then :
9586 ac_cv_type_uid_t=yes
9587else
9588 ac_cv_type_uid_t=no
9589fi
9590rm -f conftest*
9591
9592fi
9593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9594$as_echo "$ac_cv_type_uid_t" >&6; }
9595if test $ac_cv_type_uid_t = no; then
9596
9597$as_echo "#define uid_t int" >>confdefs.h
9598
9599
9600$as_echo "#define gid_t int" >>confdefs.h
9601
9602fi
9603
9604for ac_header in unistd.h
9605do :
9606 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
9607if test "x$ac_cv_header_unistd_h" = xyes; then :
9608 cat >>confdefs.h <<_ACEOF
9609#define HAVE_UNISTD_H 1
9610_ACEOF
9611
9612fi
9613
9614done
9615
9616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9617$as_echo_n "checking for working chown... " >&6; }
9618if ${ac_cv_func_chown_works+:} false; then :
9619 $as_echo_n "(cached) " >&6
9620else
9621 if test "$cross_compiling" = yes; then :
9622 ac_cv_func_chown_works=no
9623else
9624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9625/* end confdefs.h. */
9626$ac_includes_default
9627#include <fcntl.h>
9628
9629int
9630main ()
9631{
9632 char *f = "conftest.chown";
9633 struct stat before, after;
9634
9635 if (creat (f, 0600) < 0)
9636 return 1;
9637 if (stat (f, &before) < 0)
9638 return 1;
9639 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9640 return 1;
9641 if (stat (f, &after) < 0)
9642 return 1;
9643 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9644
9645 ;
9646 return 0;
9647}
9648_ACEOF
9649if ac_fn_c_try_run "$LINENO"; then :
9650 ac_cv_func_chown_works=yes
9651else
9652 ac_cv_func_chown_works=no
9653fi
9654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9655 conftest.$ac_objext conftest.beam conftest.$ac_ext
9656fi
9657
9658rm -f conftest.chown
9659
9660fi
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9662$as_echo "$ac_cv_func_chown_works" >&6; }
9663if test $ac_cv_func_chown_works = yes; then
9664
9665$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9666
f73dda09 9667fi
3185942a 9668
ac50fbac
CR
9669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
9670$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
9671if ${ac_cv_func_getpgrp_void+:} false; then :
9672 $as_echo_n "(cached) " >&6
f73dda09 9673else
ac50fbac
CR
9674 # Use it with a single arg.
9675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9676/* end confdefs.h. */
b80f6443
JA
9677$ac_includes_default
9678int
9679main ()
9680{
ac50fbac 9681getpgrp (0);
b80f6443
JA
9682 ;
9683 return 0;
9684}
9685_ACEOF
ac50fbac
CR
9686if ac_fn_c_try_compile "$LINENO"; then :
9687 ac_cv_func_getpgrp_void=no
9688else
9689 ac_cv_func_getpgrp_void=yes
9690fi
9691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9692
9693fi
9694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
9695$as_echo "$ac_cv_func_getpgrp_void" >&6; }
9696if test $ac_cv_func_getpgrp_void = yes; then
9697
9698$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
9699
9700fi
9701
9702if ${ac_cv_func_setvbuf_reversed+:} false; then :
9703 $as_echo_n "(cached) " >&6
9704else
9705 ac_cv_func_setvbuf_reversed=no
9706fi
9707
9708
9709for ac_func in vprintf
9710do :
9711 ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
9712if test "x$ac_cv_func_vprintf" = xyes; then :
9713 cat >>confdefs.h <<_ACEOF
9714#define HAVE_VPRINTF 1
0628567a 9715_ACEOF
ac50fbac
CR
9716
9717ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
9718if test "x$ac_cv_func__doprnt" = xyes; then :
9719
9720$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
9721
9722fi
9723
9724fi
9725done
9726
9727
9728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5
9729$as_echo_n "checking for working strcoll... " >&6; }
9730if ${ac_cv_func_strcoll_works+:} false; then :
9731 $as_echo_n "(cached) " >&6
9732else
9733 if test "$cross_compiling" = yes; then :
9734 ac_cv_func_strcoll_works=no
9735else
9736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9737/* end confdefs.h. */
f73dda09
JA
9738$ac_includes_default
9739int
9740main ()
9741{
ac50fbac
CR
9742return (strcoll ("abc", "def") >= 0 ||
9743 strcoll ("ABC", "DEF") >= 0 ||
9744 strcoll ("123", "456") >= 0)
f73dda09
JA
9745 ;
9746 return 0;
9747}
9748_ACEOF
ac50fbac
CR
9749if ac_fn_c_try_run "$LINENO"; then :
9750 ac_cv_func_strcoll_works=yes
f73dda09 9751else
ac50fbac
CR
9752 ac_cv_func_strcoll_works=no
9753fi
9754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9755 conftest.$ac_objext conftest.beam conftest.$ac_ext
9756fi
0628567a 9757
f73dda09 9758fi
ac50fbac
CR
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5
9760$as_echo "$ac_cv_func_strcoll_works" >&6; }
9761if test $ac_cv_func_strcoll_works = yes; then
3185942a 9762
ac50fbac 9763$as_echo "#define HAVE_STRCOLL 1" >>confdefs.h
0628567a 9764
b80f6443 9765fi
3185942a 9766
ac50fbac
CR
9767
9768
9769if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then
9770 MALLOC_TARGET=alloca
9771 MALLOC_SRC=alloca.c
9772
9773 MALLOC_LIB='-lmalloc'
9774 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
9775 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
9776 MALLOC_DEP='$(MALLOC_LIBRARY)'
ccc6cda3 9777fi
3185942a 9778
ac50fbac
CR
9779if test "$ac_cv_func_vprintf" = no; then
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of vprintf in stdio.h" >&5
9781$as_echo_n "checking for declaration of vprintf in stdio.h... " >&6; }
9782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9783/* end confdefs.h. */
9784#include <stdio.h>
9785
0628567a 9786_ACEOF
ac50fbac
CR
9787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9788 $EGREP "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then :
9789 ac_cv_func_vprintf=yes
9790fi
9791rm -f conftest*
9792
9793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vprintf" >&5
9794$as_echo "$ac_cv_func_vprintf" >&6; }
9795 if test $ac_cv_func_vprintf = yes; then
9796 $as_echo "#define HAVE_VPRINTF 1" >>confdefs.h
9797
9798 fi
9799fi
9800
9801if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then
9802 case " $LIBOBJS " in
9803 *" vprint.$ac_objext "* ) ;;
9804 *) LIBOBJS="$LIBOBJS vprint.$ac_objext"
9805 ;;
9806esac
9807
9808fi
9809
9810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9811$as_echo_n "checking return type of signal handlers... " >&6; }
9812if ${ac_cv_type_signal+:} false; then :
9813 $as_echo_n "(cached) " >&6
9814else
9815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9816/* end confdefs.h. */
ac50fbac
CR
9817#include <sys/types.h>
9818#include <signal.h>
9819
f73dda09
JA
9820int
9821main ()
9822{
ac50fbac 9823return *(signal (0, 0)) (0) == 1;
f73dda09
JA
9824 ;
9825 return 0;
9826}
9827_ACEOF
ac50fbac
CR
9828if ac_fn_c_try_compile "$LINENO"; then :
9829 ac_cv_type_signal=int
f73dda09 9830else
ac50fbac
CR
9831 ac_cv_type_signal=void
9832fi
9833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9834fi
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9836$as_echo "$ac_cv_type_signal" >&6; }
9837
9838cat >>confdefs.h <<_ACEOF
9839#define RETSIGTYPE $ac_cv_type_signal
9840_ACEOF
9841
9842
9843
9844ac_fn_c_check_func "$LINENO" "__setostype" "ac_cv_func___setostype"
9845if test "x$ac_cv_func___setostype" = xyes; then :
9846 $as_echo "#define HAVE_SETOSTYPE 1" >>confdefs.h
0628567a 9847
f73dda09 9848fi
3185942a 9849
ac50fbac
CR
9850ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
9851if test "x$ac_cv_func_wait3" = xyes; then :
9852 $as_echo "#define HAVE_WAIT3 1" >>confdefs.h
9853
9854fi
9855
9856
9857ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
9858if test "x$ac_cv_func_mkfifo" = xyes; then :
9859 $as_echo "#define HAVE_MKFIFO 1" >>confdefs.h
9860
9861else
9862 $as_echo "#define MKFIFO_MISSING 1" >>confdefs.h
9863
9864fi
9865
9866
9867for ac_func in dup2 eaccess fcntl getdtablesize getgroups gethostname \
9868 getpagesize getpeername getrlimit getrusage gettimeofday \
d233b485 9869 kill killpg lstat pselect readlink select setdtablesize \
ac50fbac
CR
9870 setitimer tcgetpgrp uname ulimit waitpid
9871do :
9872 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9873ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9874if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9875 cat >>confdefs.h <<_ACEOF
9876#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9877_ACEOF
9878
9879fi
f73dda09 9880done
ac50fbac
CR
9881
9882ac_fn_c_check_func "$LINENO" "rename" "ac_cv_func_rename"
9883if test "x$ac_cv_func_rename" = xyes; then :
9884 $as_echo "#define HAVE_RENAME 1" >>confdefs.h
9885
ccc6cda3 9886else
ac50fbac
CR
9887 case " $LIBOBJS " in
9888 *" rename.$ac_objext "* ) ;;
9889 *) LIBOBJS="$LIBOBJS rename.$ac_objext"
9890 ;;
9891esac
9892
9893fi
9894
9895
9896
9897for ac_func in bcopy bzero confstr faccessat fnmatch \
9898 getaddrinfo gethostbyname getservbyname getservent inet_aton \
a0c0a00f 9899 imaxdiv memmove pathconf putenv raise random regcomp regexec \
ac50fbac
CR
9900 setenv setlinebuf setlocale setvbuf siginterrupt strchr \
9901 sysconf syslog tcgetattr times ttyname tzset unsetenv
9902do :
9903 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9904ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9905if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9906 cat >>confdefs.h <<_ACEOF
9907#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
0628567a 9908_ACEOF
b80f6443 9909
ac50fbac
CR
9910fi
9911done
b80f6443 9912
ac50fbac
CR
9913
9914for ac_func in vasprintf asprintf
9915do :
9916 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9917ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9918if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9919 cat >>confdefs.h <<_ACEOF
9920#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f73dda09 9921_ACEOF
0628567a 9922
ccc6cda3 9923fi
ac50fbac
CR
9924done
9925
9926for ac_func in isascii isblank isgraph isprint isspace isxdigit
9927do :
9928 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9929ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9930if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9931 cat >>confdefs.h <<_ACEOF
9932#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9933_ACEOF
9934
ccc6cda3 9935fi
ac50fbac
CR
9936done
9937
9938for ac_func in getpwent getpwnam getpwuid
9939do :
9940 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9941ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9942if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9943 cat >>confdefs.h <<_ACEOF
9944#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9945_ACEOF
9946
ccc6cda3 9947fi
ac50fbac 9948done
ccc6cda3 9949
a0c0a00f
CR
9950for ac_func in mkstemp
9951do :
9952 ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
9953if test "x$ac_cv_func_mkstemp" = xyes; then :
9954 cat >>confdefs.h <<_ACEOF
9955#define HAVE_MKSTEMP 1
9956_ACEOF
9957
9958fi
9959done
9960
ac50fbac
CR
9961ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
9962if test "x$ac_cv_func_getcwd" = xyes; then :
9963 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
b80f6443 9964
ac50fbac
CR
9965else
9966 case " $LIBOBJS " in
9967 *" getcwd.$ac_objext "* ) ;;
9968 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
9969 ;;
9970esac
3185942a 9971
ac50fbac 9972fi
0628567a 9973
ac50fbac
CR
9974ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
9975if test "x$ac_cv_func_memset" = xyes; then :
9976 $as_echo "#define HAVE_MEMSET 1" >>confdefs.h
f73dda09 9977
f73dda09 9978else
ac50fbac
CR
9979 case " $LIBOBJS " in
9980 *" memset.$ac_objext "* ) ;;
9981 *) LIBOBJS="$LIBOBJS memset.$ac_objext"
9982 ;;
3185942a 9983esac
b80f6443 9984
ac50fbac
CR
9985fi
9986
9987
9988ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
9989if test "x$ac_cv_func_strcasecmp" = xyes; then :
9990 $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h
9991
f73dda09 9992else
ac50fbac
CR
9993 case " $LIBOBJS " in
9994 *" strcasecmp.$ac_objext "* ) ;;
9995 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
9996 ;;
9997esac
0628567a 9998
f73dda09 9999fi
3185942a 10000
ac50fbac
CR
10001ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
10002if test "x$ac_cv_func_strcasestr" = xyes; then :
10003 $as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h
10004
f73dda09 10005else
ac50fbac
CR
10006 case " $LIBOBJS " in
10007 *" strcasestr.$ac_objext "* ) ;;
10008 *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext"
10009 ;;
10010esac
0628567a 10011
ac50fbac 10012fi
b80f6443 10013
ac50fbac
CR
10014ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
10015if test "x$ac_cv_func_strerror" = xyes; then :
10016 $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
b80f6443 10017
f73dda09 10018else
ac50fbac
CR
10019 case " $LIBOBJS " in
10020 *" strerror.$ac_objext "* ) ;;
10021 *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
10022 ;;
10023esac
0628567a 10024
f73dda09 10025fi
3185942a 10026
ac50fbac
CR
10027ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
10028if test "x$ac_cv_func_strftime" = xyes; then :
10029 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
10030
b80f6443 10031else
ac50fbac
CR
10032 case " $LIBOBJS " in
10033 *" strftime.$ac_objext "* ) ;;
10034 *) LIBOBJS="$LIBOBJS strftime.$ac_objext"
10035 ;;
10036esac
0628567a 10037
b80f6443 10038fi
3185942a 10039
ac50fbac
CR
10040ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
10041if test "x$ac_cv_func_strnlen" = xyes; then :
10042 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
10043
10044else
10045 case " $LIBOBJS " in
10046 *" strnlen.$ac_objext "* ) ;;
10047 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
10048 ;;
10049esac
10050
ccc6cda3 10051fi
3185942a 10052
ac50fbac
CR
10053ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
10054if test "x$ac_cv_func_strpbrk" = xyes; then :
10055 $as_echo "#define HAVE_STRPBRK 1" >>confdefs.h
b80f6443 10056
f73dda09 10057else
ac50fbac
CR
10058 case " $LIBOBJS " in
10059 *" strpbrk.$ac_objext "* ) ;;
10060 *) LIBOBJS="$LIBOBJS strpbrk.$ac_objext"
10061 ;;
10062esac
0628567a 10063
f73dda09 10064fi
3185942a 10065
ac50fbac
CR
10066ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
10067if test "x$ac_cv_func_strstr" = xyes; then :
10068 $as_echo "#define HAVE_STRSTR 1" >>confdefs.h
10069
ccc6cda3 10070else
ac50fbac
CR
10071 case " $LIBOBJS " in
10072 *" strstr.$ac_objext "* ) ;;
10073 *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
10074 ;;
10075esac
b80f6443 10076
ac50fbac 10077fi
b80f6443 10078
ac50fbac
CR
10079
10080ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod"
10081if test "x$ac_cv_func_strtod" = xyes; then :
10082 $as_echo "#define HAVE_STRTOD 1" >>confdefs.h
10083
10084else
10085 case " $LIBOBJS " in
10086 *" strtod.$ac_objext "* ) ;;
10087 *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
10088 ;;
3185942a 10089esac
ac50fbac
CR
10090
10091fi
10092
10093ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
10094if test "x$ac_cv_func_strtol" = xyes; then :
10095 $as_echo "#define HAVE_STRTOL 1" >>confdefs.h
10096
10097else
10098 case " $LIBOBJS " in
10099 *" strtol.$ac_objext "* ) ;;
10100 *) LIBOBJS="$LIBOBJS strtol.$ac_objext"
10101 ;;
3185942a 10102esac
ac50fbac
CR
10103
10104fi
10105
10106ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
10107if test "x$ac_cv_func_strtoul" = xyes; then :
10108 $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h
10109
ccc6cda3 10110else
ac50fbac
CR
10111 case " $LIBOBJS " in
10112 *" strtoul.$ac_objext "* ) ;;
10113 *) LIBOBJS="$LIBOBJS strtoul.$ac_objext"
10114 ;;
10115esac
0628567a 10116
ccc6cda3 10117fi
ac50fbac
CR
10118
10119ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
10120if test "x$ac_cv_func_strtoll" = xyes; then :
10121 $as_echo "#define HAVE_STRTOLL 1" >>confdefs.h
10122
10123else
10124 case " $LIBOBJS " in
10125 *" strtoll.$ac_objext "* ) ;;
10126 *) LIBOBJS="$LIBOBJS strtoll.$ac_objext"
10127 ;;
10128esac
10129
ccc6cda3 10130fi
ac50fbac
CR
10131
10132ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
10133if test "x$ac_cv_func_strtoull" = xyes; then :
10134 $as_echo "#define HAVE_STRTOULL 1" >>confdefs.h
10135
10136else
10137 case " $LIBOBJS " in
10138 *" strtoull.$ac_objext "* ) ;;
10139 *) LIBOBJS="$LIBOBJS strtoull.$ac_objext"
10140 ;;
10141esac
10142
ccc6cda3 10143fi
ccc6cda3 10144
ac50fbac
CR
10145ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
10146if test "x$ac_cv_func_strtoimax" = xyes; then :
10147 $as_echo "#define HAVE_STRTOIMAX 1" >>confdefs.h
b80f6443 10148
ac50fbac
CR
10149else
10150 case " $LIBOBJS " in
10151 *" strtoimax.$ac_objext "* ) ;;
10152 *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext"
10153 ;;
10154esac
3185942a 10155
ac50fbac 10156fi
0628567a 10157
ac50fbac
CR
10158ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax"
10159if test "x$ac_cv_func_strtoumax" = xyes; then :
10160 $as_echo "#define HAVE_STRTOUMAX 1" >>confdefs.h
f73dda09 10161
f73dda09 10162else
ac50fbac
CR
10163 case " $LIBOBJS " in
10164 *" strtoumax.$ac_objext "* ) ;;
10165 *) LIBOBJS="$LIBOBJS strtoumax.$ac_objext"
10166 ;;
10167esac
b80f6443 10168
ac50fbac
CR
10169fi
10170
10171
10172ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf"
10173if test "x$ac_cv_func_dprintf" = xyes; then :
10174 $as_echo "#define HAVE_DPRINTF 1" >>confdefs.h
10175
10176else
10177 case " $LIBOBJS " in
10178 *" dprintf.$ac_objext "* ) ;;
10179 *) LIBOBJS="$LIBOBJS dprintf.$ac_objext"
10180 ;;
3185942a 10181esac
b80f6443 10182
ac50fbac
CR
10183fi
10184
10185
10186ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
10187if test "x$ac_cv_func_strchrnul" = xyes; then :
10188 $as_echo "#define HAVE_STRCHRNUL 1" >>confdefs.h
10189
10190else
10191 case " $LIBOBJS " in
10192 *" strchrnul.$ac_objext "* ) ;;
10193 *) LIBOBJS="$LIBOBJS strchrnul.$ac_objext"
10194 ;;
3185942a 10195esac
ac50fbac
CR
10196
10197fi
10198
10199
10200ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10201if test "x$ac_cv_func_strdup" = xyes; then :
10202 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10203
f73dda09 10204else
ac50fbac
CR
10205 case " $LIBOBJS " in
10206 *" strdup.$ac_objext "* ) ;;
10207 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10208 ;;
10209esac
0628567a 10210
f73dda09 10211fi
3185942a 10212
ac50fbac
CR
10213
10214
a0c0a00f
CR
10215for ac_header in libaudit.h
10216do :
10217 ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
10218if test "x$ac_cv_header_libaudit_h" = xyes; then :
10219 cat >>confdefs.h <<_ACEOF
10220#define HAVE_LIBAUDIT_H 1
10221_ACEOF
10222
10223fi
10224
10225done
10226
ac50fbac
CR
10227ac_fn_c_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include <linux/audit.h>
10228"
10229if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes; then :
10230 ac_have_decl=1
ccc6cda3 10231else
ac50fbac
CR
10232 ac_have_decl=0
10233fi
0628567a 10234
ac50fbac
CR
10235cat >>confdefs.h <<_ACEOF
10236#define HAVE_DECL_AUDIT_USER_TTY $ac_have_decl
0628567a 10237_ACEOF
b80f6443 10238
b80f6443 10239
ac50fbac
CR
10240ac_fn_c_check_decl "$LINENO" "confstr" "ac_cv_have_decl_confstr" "$ac_includes_default"
10241if test "x$ac_cv_have_decl_confstr" = xyes; then :
10242 ac_have_decl=1
f73dda09 10243else
ac50fbac 10244 ac_have_decl=0
f73dda09 10245fi
3185942a 10246
ac50fbac
CR
10247cat >>confdefs.h <<_ACEOF
10248#define HAVE_DECL_CONFSTR $ac_have_decl
10249_ACEOF
0628567a 10250
ac50fbac
CR
10251ac_fn_c_check_decl "$LINENO" "printf" "ac_cv_have_decl_printf" "$ac_includes_default"
10252if test "x$ac_cv_have_decl_printf" = xyes; then :
10253 ac_have_decl=1
10254else
10255 ac_have_decl=0
b80f6443 10256fi
3185942a 10257
ac50fbac
CR
10258cat >>confdefs.h <<_ACEOF
10259#define HAVE_DECL_PRINTF $ac_have_decl
10260_ACEOF
10261
10262ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default"
10263if test "x$ac_cv_have_decl_sbrk" = xyes; then :
10264 ac_have_decl=1
10265else
10266 ac_have_decl=0
ccc6cda3 10267fi
3185942a 10268
ac50fbac
CR
10269cat >>confdefs.h <<_ACEOF
10270#define HAVE_DECL_SBRK $ac_have_decl
0628567a 10271_ACEOF
b80f6443 10272
ac50fbac
CR
10273ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default"
10274if test "x$ac_cv_have_decl_setregid" = xyes; then :
10275 ac_have_decl=1
10276else
10277 ac_have_decl=0
10278fi
10279
10280cat >>confdefs.h <<_ACEOF
10281#define HAVE_DECL_SETREGID $ac_have_decl
f73dda09 10282_ACEOF
ac50fbac
CR
10283
10284ac_fn_c_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" "$ac_includes_default"
10285if test "x$ac_cv_have_decl_strcpy" = xyes; then :
10286 ac_have_decl=1
f73dda09 10287else
ac50fbac
CR
10288 ac_have_decl=0
10289fi
0628567a 10290
ac50fbac
CR
10291cat >>confdefs.h <<_ACEOF
10292#define HAVE_DECL_STRCPY $ac_have_decl
10293_ACEOF
10294
10295ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
10296if test "x$ac_cv_have_decl_strsignal" = xyes; then :
10297 ac_have_decl=1
10298else
10299 ac_have_decl=0
f73dda09 10300fi
3185942a 10301
ac50fbac
CR
10302cat >>confdefs.h <<_ACEOF
10303#define HAVE_DECL_STRSIGNAL $ac_have_decl
10304_ACEOF
10305
10306
10307ac_fn_c_check_decl "$LINENO" "strtold" "ac_cv_have_decl_strtold" "$ac_includes_default"
10308if test "x$ac_cv_have_decl_strtold" = xyes; then :
10309 ac_have_decl=1
bb70624e 10310else
ac50fbac
CR
10311 ac_have_decl=0
10312fi
10313
10314cat >>confdefs.h <<_ACEOF
10315#define HAVE_DECL_STRTOLD $ac_have_decl
0628567a 10316_ACEOF
ac50fbac
CR
10317if test $ac_have_decl = 1; then :
10318
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken strtold" >&5
10320$as_echo_n "checking for broken strtold... " >&6; }
10321 if ${bash_cv_strtold_broken+:} false; then :
10322 $as_echo_n "(cached) " >&6
10323else
10324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10325/* end confdefs.h. */
b80f6443 10326#include <stdlib.h>
f73dda09
JA
10327int
10328main ()
bb70624e 10329{
d233b485 10330long double r; char *foo, bar; r = strtold(foo, &bar);
f73dda09
JA
10331 ;
10332 return 0;
bb70624e 10333}
f73dda09 10334_ACEOF
ac50fbac
CR
10335if ac_fn_c_try_compile "$LINENO"; then :
10336 bash_cv_strtold_broken=no
bb70624e 10337else
ac50fbac 10338 bash_cv_strtold_broken=yes
bb70624e 10339fi
ac50fbac
CR
10340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10341
10342
bb70624e 10343fi
ac50fbac
CR
10344
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_strtold_broken" >&5
10346$as_echo "$bash_cv_strtold_broken" >&6; }
10347 if test "$bash_cv_strtold_broken" = "yes" ; then
10348 $as_echo "#define STRTOLD_BROKEN 1" >>confdefs.h
10349
10350 fi
10351
f73dda09 10352fi
bb70624e 10353
b80f6443 10354
3185942a 10355
0628567a 10356
f73dda09 10357
ac50fbac
CR
10358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoimax" >&5
10359$as_echo_n "checking for declaration of strtoimax... " >&6; }
10360if ${bash_cv_decl_strtoimax+:} false; then :
3185942a 10361 $as_echo_n "(cached) " >&6
f73dda09 10362else
ac50fbac 10363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10364/* end confdefs.h. */
ac50fbac
CR
10365
10366#if STDC_HEADERS
10367# include <stdlib.h>
10368#endif
10369#if HAVE_INTTYPES_H
10370# include <inttypes.h>
10371#endif
10372
f73dda09
JA
10373int
10374main ()
10375{
ac50fbac 10376return !strtoimax;
f73dda09
JA
10377 ;
10378 return 0;
10379}
10380_ACEOF
ac50fbac
CR
10381if ac_fn_c_try_link "$LINENO"; then :
10382 bash_cv_decl_strtoimax=yes
10383else
10384 bash_cv_decl_strtoimax=no
10385fi
10386rm -f core conftest.err conftest.$ac_objext \
10387 conftest$ac_exeext conftest.$ac_ext
10388fi
10389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoimax" >&5
10390$as_echo "$bash_cv_decl_strtoimax" >&6; }
10391bash_tr_func=HAVE_DECL_`echo strtoimax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10392if test $bash_cv_decl_strtoimax = yes; then
10393 cat >>confdefs.h <<_ACEOF
10394#define $bash_tr_func 1
0628567a 10395_ACEOF
b80f6443 10396
f73dda09 10397else
ac50fbac
CR
10398 cat >>confdefs.h <<_ACEOF
10399#define $bash_tr_func 0
10400_ACEOF
0628567a 10401
f73dda09 10402fi
3185942a 10403
0628567a 10404
b80f6443 10405
ac50fbac
CR
10406
10407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtol" >&5
10408$as_echo_n "checking for declaration of strtol... " >&6; }
10409if ${bash_cv_decl_strtol+:} false; then :
10410 $as_echo_n "(cached) " >&6
10411else
10412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10413/* end confdefs.h. */
ac50fbac
CR
10414
10415#if STDC_HEADERS
10416# include <stdlib.h>
10417#endif
10418#if HAVE_INTTYPES_H
10419# include <inttypes.h>
10420#endif
10421
f73dda09
JA
10422int
10423main ()
10424{
ac50fbac 10425return !strtol;
f73dda09
JA
10426 ;
10427 return 0;
10428}
10429_ACEOF
ac50fbac
CR
10430if ac_fn_c_try_link "$LINENO"; then :
10431 bash_cv_decl_strtol=yes
f73dda09 10432else
ac50fbac 10433 bash_cv_decl_strtol=no
f73dda09 10434fi
ac50fbac
CR
10435rm -f core conftest.err conftest.$ac_objext \
10436 conftest$ac_exeext conftest.$ac_ext
10437fi
10438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtol" >&5
10439$as_echo "$bash_cv_decl_strtol" >&6; }
10440bash_tr_func=HAVE_DECL_`echo strtol | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10441if test $bash_cv_decl_strtol = yes; then
10442 cat >>confdefs.h <<_ACEOF
10443#define $bash_tr_func 1
10444_ACEOF
3185942a 10445
b80f6443 10446else
ac50fbac
CR
10447 cat >>confdefs.h <<_ACEOF
10448#define $bash_tr_func 0
10449_ACEOF
0628567a 10450
b80f6443 10451fi
3185942a 10452
3185942a 10453
ac50fbac
CR
10454
10455
10456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoll" >&5
10457$as_echo_n "checking for declaration of strtoll... " >&6; }
10458if ${bash_cv_decl_strtoll+:} false; then :
10459 $as_echo_n "(cached) " >&6
10460else
10461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10462/* end confdefs.h. */
ac50fbac
CR
10463
10464#if STDC_HEADERS
10465# include <stdlib.h>
10466#endif
10467#if HAVE_INTTYPES_H
10468# include <inttypes.h>
10469#endif
10470
f73dda09
JA
10471int
10472main ()
10473{
ac50fbac 10474return !strtoll;
f73dda09
JA
10475 ;
10476 return 0;
10477}
10478_ACEOF
ac50fbac
CR
10479if ac_fn_c_try_link "$LINENO"; then :
10480 bash_cv_decl_strtoll=yes
f73dda09 10481else
ac50fbac 10482 bash_cv_decl_strtoll=no
f73dda09 10483fi
ac50fbac
CR
10484rm -f core conftest.err conftest.$ac_objext \
10485 conftest$ac_exeext conftest.$ac_ext
10486fi
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoll" >&5
10488$as_echo "$bash_cv_decl_strtoll" >&6; }
10489bash_tr_func=HAVE_DECL_`echo strtoll | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10490if test $bash_cv_decl_strtoll = yes; then
10491 cat >>confdefs.h <<_ACEOF
10492#define $bash_tr_func 1
10493_ACEOF
3185942a 10494
bb70624e 10495else
ac50fbac
CR
10496 cat >>confdefs.h <<_ACEOF
10497#define $bash_tr_func 0
0628567a 10498_ACEOF
ac50fbac
CR
10499
10500fi
10501
10502
10503
10504
10505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoul" >&5
10506$as_echo_n "checking for declaration of strtoul... " >&6; }
10507if ${bash_cv_decl_strtoul+:} false; then :
10508 $as_echo_n "(cached) " >&6
10509else
10510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10511/* end confdefs.h. */
ac50fbac
CR
10512
10513#if STDC_HEADERS
10514# include <stdlib.h>
10515#endif
10516#if HAVE_INTTYPES_H
10517# include <inttypes.h>
10518#endif
10519
f73dda09
JA
10520int
10521main ()
bb70624e 10522{
ac50fbac 10523return !strtoul;
f73dda09
JA
10524 ;
10525 return 0;
bb70624e 10526}
f73dda09 10527_ACEOF
ac50fbac
CR
10528if ac_fn_c_try_link "$LINENO"; then :
10529 bash_cv_decl_strtoul=yes
bb70624e 10530else
ac50fbac 10531 bash_cv_decl_strtoul=no
bb70624e 10532fi
ac50fbac
CR
10533rm -f core conftest.err conftest.$ac_objext \
10534 conftest$ac_exeext conftest.$ac_ext
f73dda09 10535fi
ac50fbac
CR
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoul" >&5
10537$as_echo "$bash_cv_decl_strtoul" >&6; }
10538bash_tr_func=HAVE_DECL_`echo strtoul | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10539if test $bash_cv_decl_strtoul = yes; then
10540 cat >>confdefs.h <<_ACEOF
10541#define $bash_tr_func 1
10542_ACEOF
bb70624e 10543
ac50fbac
CR
10544else
10545 cat >>confdefs.h <<_ACEOF
10546#define $bash_tr_func 0
10547_ACEOF
b80f6443 10548
ac50fbac 10549fi
3185942a 10550
0628567a 10551
f73dda09 10552
ac50fbac
CR
10553
10554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoull" >&5
10555$as_echo_n "checking for declaration of strtoull... " >&6; }
10556if ${bash_cv_decl_strtoull+:} false; then :
3185942a 10557 $as_echo_n "(cached) " >&6
f73dda09 10558else
ac50fbac 10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10560/* end confdefs.h. */
ac50fbac
CR
10561
10562#if STDC_HEADERS
10563# include <stdlib.h>
10564#endif
10565#if HAVE_INTTYPES_H
10566# include <inttypes.h>
10567#endif
10568
f73dda09
JA
10569int
10570main ()
cce855bc 10571{
ac50fbac 10572return !strtoull;
f73dda09
JA
10573 ;
10574 return 0;
cce855bc 10575}
f73dda09 10576_ACEOF
ac50fbac
CR
10577if ac_fn_c_try_link "$LINENO"; then :
10578 bash_cv_decl_strtoull=yes
10579else
10580 bash_cv_decl_strtoull=no
10581fi
10582rm -f core conftest.err conftest.$ac_objext \
10583 conftest$ac_exeext conftest.$ac_ext
10584fi
10585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoull" >&5
10586$as_echo "$bash_cv_decl_strtoull" >&6; }
10587bash_tr_func=HAVE_DECL_`echo strtoull | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10588if test $bash_cv_decl_strtoull = yes; then
10589 cat >>confdefs.h <<_ACEOF
10590#define $bash_tr_func 1
10591_ACEOF
10592
10593else
10594 cat >>confdefs.h <<_ACEOF
10595#define $bash_tr_func 0
0628567a 10596_ACEOF
ac50fbac
CR
10597
10598fi
10599
10600
10601
10602
10603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoumax" >&5
10604$as_echo_n "checking for declaration of strtoumax... " >&6; }
10605if ${bash_cv_decl_strtoumax+:} false; then :
10606 $as_echo_n "(cached) " >&6
10607else
10608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10609/* end confdefs.h. */
ac50fbac
CR
10610
10611#if STDC_HEADERS
10612# include <stdlib.h>
10613#endif
10614#if HAVE_INTTYPES_H
10615# include <inttypes.h>
10616#endif
10617
f73dda09
JA
10618int
10619main ()
10620{
ac50fbac 10621return !strtoumax;
f73dda09
JA
10622 ;
10623 return 0;
10624}
10625_ACEOF
ac50fbac
CR
10626if ac_fn_c_try_link "$LINENO"; then :
10627 bash_cv_decl_strtoumax=yes
f73dda09 10628else
ac50fbac
CR
10629 bash_cv_decl_strtoumax=no
10630fi
10631rm -f core conftest.err conftest.$ac_objext \
10632 conftest$ac_exeext conftest.$ac_ext
f73dda09 10633fi
ac50fbac
CR
10634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoumax" >&5
10635$as_echo "$bash_cv_decl_strtoumax" >&6; }
10636bash_tr_func=HAVE_DECL_`echo strtoumax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10637if test $bash_cv_decl_strtoumax = yes; then
10638 cat >>confdefs.h <<_ACEOF
10639#define $bash_tr_func 1
10640_ACEOF
3185942a 10641
cce855bc 10642else
ac50fbac
CR
10643 cat >>confdefs.h <<_ACEOF
10644#define $bash_tr_func 0
10645_ACEOF
10646
10647fi
10648
0628567a 10649
ac50fbac
CR
10650
10651
10652
10653
10654
10655 for ac_func in $ac_func_list
10656do :
10657 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10658ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10659if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10660 cat >>confdefs.h <<_ACEOF
10661#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
0628567a 10662_ACEOF
ac50fbac
CR
10663
10664fi
10665done
10666
10667
10668
10669
10670
10671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
10672$as_echo_n "checking for working mktime... " >&6; }
10673if ${ac_cv_func_working_mktime+:} false; then :
10674 $as_echo_n "(cached) " >&6
10675else
10676 if test "$cross_compiling" = yes; then :
10677 ac_cv_func_working_mktime=no
10678else
10679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10680/* end confdefs.h. */
ac50fbac
CR
10681/* Test program from Paul Eggert and Tony Leneis. */
10682#ifdef TIME_WITH_SYS_TIME
10683# include <sys/time.h>
10684# include <time.h>
10685#else
10686# ifdef HAVE_SYS_TIME_H
10687# include <sys/time.h>
10688# else
10689# include <time.h>
10690# endif
10691#endif
10692
10693#include <limits.h>
10694#include <stdlib.h>
10695
10696#ifdef HAVE_UNISTD_H
10697# include <unistd.h>
10698#endif
10699
10700#ifndef HAVE_ALARM
10701# define alarm(X) /* empty */
10702#endif
10703
10704/* Work around redefinition to rpl_putenv by other config tests. */
10705#undef putenv
10706
10707static time_t time_t_max;
10708static time_t time_t_min;
10709
10710/* Values we'll use to set the TZ environment variable. */
10711static const char *tz_strings[] = {
10712 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
10713 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
10714};
10715#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
10716
10717/* Return 0 if mktime fails to convert a date in the spring-forward gap.
10718 Based on a problem report from Andreas Jaeger. */
10719static int
10720spring_forward_gap ()
10721{
10722 /* glibc (up to about 1998-10-07) failed this test. */
10723 struct tm tm;
10724
10725 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
10726 instead of "TZ=America/Vancouver" in order to detect the bug even
10727 on systems that don't support the Olson extension, or don't have the
10728 full zoneinfo tables installed. */
10729 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
10730
10731 tm.tm_year = 98;
10732 tm.tm_mon = 3;
10733 tm.tm_mday = 5;
10734 tm.tm_hour = 2;
10735 tm.tm_min = 0;
10736 tm.tm_sec = 0;
10737 tm.tm_isdst = -1;
10738 return mktime (&tm) != (time_t) -1;
10739}
10740
10741static int
10742mktime_test1 (time_t now)
10743{
10744 struct tm *lt;
10745 return ! (lt = localtime (&now)) || mktime (lt) == now;
10746}
10747
10748static int
10749mktime_test (time_t now)
10750{
10751 return (mktime_test1 (now)
10752 && mktime_test1 ((time_t) (time_t_max - now))
10753 && mktime_test1 ((time_t) (time_t_min + now)));
10754}
10755
10756static int
10757irix_6_4_bug ()
10758{
10759 /* Based on code from Ariel Faigon. */
10760 struct tm tm;
10761 tm.tm_year = 96;
10762 tm.tm_mon = 3;
10763 tm.tm_mday = 0;
10764 tm.tm_hour = 0;
10765 tm.tm_min = 0;
10766 tm.tm_sec = 0;
10767 tm.tm_isdst = -1;
10768 mktime (&tm);
10769 return tm.tm_mon == 2 && tm.tm_mday == 31;
10770}
10771
10772static int
10773bigtime_test (int j)
10774{
10775 struct tm tm;
10776 time_t now;
10777 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
10778 now = mktime (&tm);
10779 if (now != (time_t) -1)
10780 {
10781 struct tm *lt = localtime (&now);
10782 if (! (lt
10783 && lt->tm_year == tm.tm_year
10784 && lt->tm_mon == tm.tm_mon
10785 && lt->tm_mday == tm.tm_mday
10786 && lt->tm_hour == tm.tm_hour
10787 && lt->tm_min == tm.tm_min
10788 && lt->tm_sec == tm.tm_sec
10789 && lt->tm_yday == tm.tm_yday
10790 && lt->tm_wday == tm.tm_wday
10791 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
10792 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
10793 return 0;
10794 }
10795 return 1;
10796}
10797
10798static int
10799year_2050_test ()
b80f6443 10800{
ac50fbac
CR
10801 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
10802 ignoring leap seconds. */
10803 unsigned long int answer = 2527315200UL;
10804
10805 struct tm tm;
10806 time_t t;
10807 tm.tm_year = 2050 - 1900;
10808 tm.tm_mon = 2 - 1;
10809 tm.tm_mday = 1;
10810 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
10811 tm.tm_isdst = -1;
10812
10813 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
10814 instead of "TZ=America/Vancouver" in order to detect the bug even
10815 on systems that don't support the Olson extension, or don't have the
10816 full zoneinfo tables installed. */
10817 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
b80f6443 10818
ac50fbac
CR
10819 t = mktime (&tm);
10820
10821 /* Check that the result is either a failure, or close enough
10822 to the correct answer that we can assume the discrepancy is
10823 due to leap seconds. */
10824 return (t == (time_t) -1
10825 || (0 < t && answer - 120 <= t && t <= answer + 120));
b80f6443 10826}
ac50fbac 10827
f73dda09
JA
10828int
10829main ()
10830{
ac50fbac
CR
10831 time_t t, delta;
10832 int i, j;
b80f6443 10833
ac50fbac
CR
10834 /* This test makes some buggy mktime implementations loop.
10835 Give up after 60 seconds; a mktime slower than that
10836 isn't worth using anyway. */
10837 alarm (60);
10838
10839 for (;;)
10840 {
10841 t = (time_t_max << 1) + 1;
10842 if (t <= time_t_max)
10843 break;
10844 time_t_max = t;
10845 }
10846 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
10847
10848 delta = time_t_max / 997; /* a suitable prime number */
10849 for (i = 0; i < N_STRINGS; i++)
10850 {
10851 if (tz_strings[i])
10852 putenv ((char*) tz_strings[i]);
10853
10854 for (t = 0; t <= time_t_max - delta; t += delta)
10855 if (! mktime_test (t))
10856 return 1;
10857 if (! (mktime_test ((time_t) 1)
10858 && mktime_test ((time_t) (60 * 60))
10859 && mktime_test ((time_t) (60 * 60 * 24))))
10860 return 1;
10861
10862 for (j = 1; ; j <<= 1)
10863 if (! bigtime_test (j))
10864 return 1;
10865 else if (INT_MAX / 2 < j)
10866 break;
10867 if (! bigtime_test (INT_MAX))
10868 return 1;
10869 }
10870 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
f73dda09
JA
10871}
10872_ACEOF
ac50fbac
CR
10873if ac_fn_c_try_run "$LINENO"; then :
10874 ac_cv_func_working_mktime=yes
f73dda09 10875else
ac50fbac
CR
10876 ac_cv_func_working_mktime=no
10877fi
10878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10879 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 10880fi
3185942a 10881
b80f6443 10882fi
ac50fbac
CR
10883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
10884$as_echo "$ac_cv_func_working_mktime" >&6; }
10885if test $ac_cv_func_working_mktime = no; then
10886 case " $LIBOBJS " in
10887 *" mktime.$ac_objext "* ) ;;
10888 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
10889 ;;
10890esac
3185942a 10891
cce855bc 10892fi
3185942a 10893
b80f6443 10894
ac50fbac
CR
10895
10896for ac_header in argz.h errno.h fcntl.h malloc.h stdio_ext.h
10897do :
10898 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10899ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10900if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10901 cat >>confdefs.h <<_ACEOF
10902#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
f73dda09 10903_ACEOF
0628567a 10904
f73dda09 10905fi
3185942a 10906
f73dda09 10907done
ac50fbac
CR
10908
10909
10910
10911for ac_func in getpagesize
10912do :
10913 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10914if test "x$ac_cv_func_getpagesize" = xyes; then :
10915 cat >>confdefs.h <<_ACEOF
10916#define HAVE_GETPAGESIZE 1
0628567a 10917_ACEOF
ac50fbac
CR
10918
10919fi
10920done
10921
10922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10923$as_echo_n "checking for working mmap... " >&6; }
10924if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
10925 $as_echo_n "(cached) " >&6
10926else
10927 if test "$cross_compiling" = yes; then :
10928 ac_cv_func_mmap_fixed_mapped=no
10929else
10930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10931/* end confdefs.h. */
f73dda09 10932$ac_includes_default
ac50fbac
CR
10933/* malloc might have been renamed as rpl_malloc. */
10934#undef malloc
10935
10936/* Thanks to Mike Haertel and Jim Avera for this test.
10937 Here is a matrix of mmap possibilities:
10938 mmap private not fixed
10939 mmap private fixed at somewhere currently unmapped
10940 mmap private fixed at somewhere already mapped
10941 mmap shared not fixed
10942 mmap shared fixed at somewhere currently unmapped
10943 mmap shared fixed at somewhere already mapped
10944 For private mappings, we should verify that changes cannot be read()
10945 back from the file, nor mmap's back from the file at a different
10946 address. (There have been systems where private was not correctly
10947 implemented like the infamous i386 svr4.0, and systems where the
10948 VM page cache was not coherent with the file system buffer cache
10949 like early versions of FreeBSD and possibly contemporary NetBSD.)
10950 For shared mappings, we should conversely verify that changes get
10951 propagated back to all the places they're supposed to be.
10952
10953 Grep wants private fixed already mapped.
10954 The main things grep needs to know about mmap are:
10955 * does it exist and is it safe to write into the mmap'd area
10956 * how to use it (BSD variants) */
10957
10958#include <fcntl.h>
10959#include <sys/mman.h>
10960
10961#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10962char *malloc ();
10963#endif
10964
10965/* This mess was copied from the GNU getpagesize.h. */
10966#ifndef HAVE_GETPAGESIZE
10967# ifdef _SC_PAGESIZE
10968# define getpagesize() sysconf(_SC_PAGESIZE)
10969# else /* no _SC_PAGESIZE */
10970# ifdef HAVE_SYS_PARAM_H
10971# include <sys/param.h>
10972# ifdef EXEC_PAGESIZE
10973# define getpagesize() EXEC_PAGESIZE
10974# else /* no EXEC_PAGESIZE */
10975# ifdef NBPG
10976# define getpagesize() NBPG * CLSIZE
10977# ifndef CLSIZE
10978# define CLSIZE 1
10979# endif /* no CLSIZE */
10980# else /* no NBPG */
10981# ifdef NBPC
10982# define getpagesize() NBPC
10983# else /* no NBPC */
10984# ifdef PAGESIZE
10985# define getpagesize() PAGESIZE
10986# endif /* PAGESIZE */
10987# endif /* no NBPC */
10988# endif /* no NBPG */
10989# endif /* no EXEC_PAGESIZE */
10990# else /* no HAVE_SYS_PARAM_H */
10991# define getpagesize() 8192 /* punt totally */
10992# endif /* no HAVE_SYS_PARAM_H */
10993# endif /* no _SC_PAGESIZE */
10994
10995#endif /* no HAVE_GETPAGESIZE */
10996
f73dda09
JA
10997int
10998main ()
cce855bc 10999{
ac50fbac
CR
11000 char *data, *data2, *data3;
11001 const char *cdata2;
11002 int i, pagesize;
11003 int fd, fd2;
b80f6443 11004
ac50fbac
CR
11005 pagesize = getpagesize ();
11006
11007 /* First, make a file with some known garbage in it. */
11008 data = (char *) malloc (pagesize);
11009 if (!data)
3185942a 11010 return 1;
ac50fbac
CR
11011 for (i = 0; i < pagesize; ++i)
11012 *(data + i) = rand ();
11013 umask (0);
11014 fd = creat ("conftest.mmap", 0600);
11015 if (fd < 0)
11016 return 2;
11017 if (write (fd, data, pagesize) != pagesize)
11018 return 3;
11019 close (fd);
b80f6443 11020
ac50fbac
CR
11021 /* Next, check that the tail of a page is zero-filled. File must have
11022 non-zero length, otherwise we risk SIGBUS for entire page. */
11023 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
11024 if (fd2 < 0)
11025 return 4;
11026 cdata2 = "";
11027 if (write (fd2, cdata2, 1) != 1)
11028 return 5;
11029 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
11030 if (data2 == MAP_FAILED)
11031 return 6;
11032 for (i = 0; i < pagesize; ++i)
11033 if (*(data2 + i))
11034 return 7;
11035 close (fd2);
11036 if (munmap (data2, pagesize))
11037 return 8;
11038
11039 /* Next, try to mmap the file at a fixed address which already has
11040 something else allocated at it. If we can, also make sure that
11041 we see the same garbage. */
11042 fd = open ("conftest.mmap", O_RDWR);
11043 if (fd < 0)
11044 return 9;
11045 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
11046 MAP_PRIVATE | MAP_FIXED, fd, 0L))
11047 return 10;
11048 for (i = 0; i < pagesize; ++i)
11049 if (*(data + i) != *(data2 + i))
11050 return 11;
11051
11052 /* Finally, make sure that changes to the mapped area do not
11053 percolate back to the file as seen by read(). (This is a bug on
11054 some variants of i386 svr4.0.) */
11055 for (i = 0; i < pagesize; ++i)
11056 *(data2 + i) = *(data2 + i) + 1;
11057 data3 = (char *) malloc (pagesize);
11058 if (!data3)
11059 return 12;
11060 if (read (fd, data3, pagesize) != pagesize)
11061 return 13;
11062 for (i = 0; i < pagesize; ++i)
11063 if (*(data + i) != *(data3 + i))
11064 return 14;
11065 close (fd);
f73dda09 11066 return 0;
cce855bc 11067}
f73dda09 11068_ACEOF
ac50fbac
CR
11069if ac_fn_c_try_run "$LINENO"; then :
11070 ac_cv_func_mmap_fixed_mapped=yes
cce855bc 11071else
ac50fbac 11072 ac_cv_func_mmap_fixed_mapped=no
cce855bc 11073fi
ac50fbac
CR
11074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11075 conftest.$ac_objext conftest.beam conftest.$ac_ext
cce855bc 11076fi
ac50fbac 11077
f73dda09 11078fi
ac50fbac
CR
11079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11080$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
11081if test $ac_cv_func_mmap_fixed_mapped = yes; then
cce855bc 11082
ac50fbac 11083$as_echo "#define HAVE_MMAP 1" >>confdefs.h
b80f6443 11084
ac50fbac
CR
11085fi
11086rm -f conftest.mmap conftest.txt
3185942a 11087
ac50fbac 11088for ac_func in __argz_count __argz_next __argz_stringify dcgettext mempcpy \
d233b485 11089 munmap mremap stpcpy strcspn
ac50fbac
CR
11090do :
11091 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11092ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11093if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11094 cat >>confdefs.h <<_ACEOF
11095#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f73dda09 11096_ACEOF
0628567a 11097
ac50fbac
CR
11098fi
11099done
f73dda09 11100
b80f6443 11101
ac50fbac
CR
11102INTL_DEP= INTL_INC= LIBINTL_H=
11103if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then
11104 INTL_DEP='${INTL_LIBDIR}/libintl.a'
11105 INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}'
11106 LIBINTL_H='${INTL_BUILDDIR}/libintl.h'
11107fi
b80f6443 11108
ac50fbac
CR
11109
11110
11111
11112
11113
11114for ac_header in wctype.h
11115do :
11116 ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
11117if test "x$ac_cv_header_wctype_h" = xyes; then :
11118 cat >>confdefs.h <<_ACEOF
11119#define HAVE_WCTYPE_H 1
f73dda09 11120_ACEOF
0628567a 11121
f73dda09 11122fi
3185942a 11123
ac50fbac 11124done
0628567a 11125
ac50fbac
CR
11126for ac_header in wchar.h
11127do :
11128 ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11129if test "x$ac_cv_header_wchar_h" = xyes; then :
11130 cat >>confdefs.h <<_ACEOF
11131#define HAVE_WCHAR_H 1
0628567a 11132_ACEOF
b80f6443 11133
ac50fbac 11134fi
b80f6443 11135
ac50fbac
CR
11136done
11137
11138for ac_header in langinfo.h
11139do :
11140 ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
11141if test "x$ac_cv_header_langinfo_h" = xyes; then :
11142 cat >>confdefs.h <<_ACEOF
11143#define HAVE_LANGINFO_H 1
f73dda09 11144_ACEOF
0628567a 11145
f73dda09 11146fi
3185942a 11147
ac50fbac
CR
11148done
11149
11150
a0c0a00f
CR
11151for ac_header in mbstr.h
11152do :
11153 ac_fn_c_check_header_mongrel "$LINENO" "mbstr.h" "ac_cv_header_mbstr_h" "$ac_includes_default"
11154if test "x$ac_cv_header_mbstr_h" = xyes; then :
11155 cat >>confdefs.h <<_ACEOF
11156#define HAVE_MBSTR_H 1
11157_ACEOF
11158
11159fi
11160
11161done
11162
11163
ac50fbac
CR
11164ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen"
11165if test "x$ac_cv_func_mbrlen" = xyes; then :
11166 $as_echo "#define HAVE_MBRLEN 1" >>confdefs.h
0628567a 11167
b80f6443 11168fi
3185942a 11169
ac50fbac
CR
11170ac_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp"
11171if test "x$ac_cv_func_mbscasecmp" = xyes; then :
11172 $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h
11173
cce855bc 11174fi
3185942a 11175
ac50fbac
CR
11176ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp"
11177if test "x$ac_cv_func_mbscmp" = xyes; then :
11178 $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h
b80f6443 11179
ac50fbac
CR
11180fi
11181
11182ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs"
11183if test "x$ac_cv_func_mbsnrtowcs" = xyes; then :
11184 $as_echo "#define HAVE_MBSNRTOWCS 1" >>confdefs.h
0628567a 11185
f73dda09 11186fi
3185942a 11187
ac50fbac
CR
11188ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs"
11189if test "x$ac_cv_func_mbsrtowcs" = xyes; then :
11190 $as_echo "#define HAVE_MBSRTOWCS 1" >>confdefs.h
b80f6443 11191
ac50fbac
CR
11192fi
11193
11194
11195ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr"
11196if test "x$ac_cv_func_mbschr" = xyes; then :
11197 $as_echo "#define HAVE_MBSCHR 1" >>confdefs.h
b80f6443 11198
bb70624e 11199else
ac50fbac
CR
11200 case " $LIBOBJS " in
11201 *" mbschr.$ac_objext "* ) ;;
11202 *) LIBOBJS="$LIBOBJS mbschr.$ac_objext"
11203 ;;
11204esac
11205
11206fi
11207
11208
11209
11210ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
11211if test "x$ac_cv_func_wcrtomb" = xyes; then :
11212 $as_echo "#define HAVE_WCRTOMB 1" >>confdefs.h
0628567a 11213
bb70624e 11214fi
ac50fbac
CR
11215
11216ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll"
11217if test "x$ac_cv_func_wcscoll" = xyes; then :
11218 $as_echo "#define HAVE_WCSCOLL 1" >>confdefs.h
11219
bb70624e 11220fi
ac50fbac
CR
11221
11222ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup"
11223if test "x$ac_cv_func_wcsdup" = xyes; then :
11224 $as_echo "#define HAVE_WCSDUP 1" >>confdefs.h
11225
f73dda09 11226fi
3185942a 11227
ac50fbac
CR
11228ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth"
11229if test "x$ac_cv_func_wcwidth" = xyes; then :
11230 $as_echo "#define HAVE_WCWIDTH 1" >>confdefs.h
11231
11232fi
3185942a 11233
ac50fbac
CR
11234ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
11235if test "x$ac_cv_func_wctype" = xyes; then :
11236 $as_echo "#define HAVE_WCTYPE 1" >>confdefs.h
3185942a 11237
ac50fbac 11238fi
bb70624e 11239
b80f6443 11240
ac50fbac
CR
11241ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth"
11242if test "x$ac_cv_func_wcswidth" = xyes; then :
11243 $as_echo "#define HAVE_WCSWIDTH 1" >>confdefs.h
b80f6443 11244
bb70624e 11245else
ac50fbac
CR
11246 case " $LIBOBJS " in
11247 *" wcswidth.$ac_objext "* ) ;;
11248 *) LIBOBJS="$LIBOBJS wcswidth.$ac_objext"
11249 ;;
3185942a 11250esac
ac50fbac
CR
11251
11252fi
11253
11254
11255
11256
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
11258$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
11259if ${ac_cv_func_mbrtowc+:} false; then :
11260 $as_echo_n "(cached) " >&6
11261else
11262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11263/* end confdefs.h. */
ac50fbac 11264#include <wchar.h>
f73dda09
JA
11265int
11266main ()
11267{
ac50fbac
CR
11268wchar_t wc;
11269 char const s[] = "";
11270 size_t n = 1;
11271 mbstate_t state;
11272 return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
f73dda09
JA
11273 ;
11274 return 0;
11275}
11276_ACEOF
ac50fbac
CR
11277if ac_fn_c_try_link "$LINENO"; then :
11278 ac_cv_func_mbrtowc=yes
3185942a 11279else
ac50fbac
CR
11280 ac_cv_func_mbrtowc=no
11281fi
11282rm -f core conftest.err conftest.$ac_objext \
11283 conftest$ac_exeext conftest.$ac_ext
3185942a 11284fi
ac50fbac
CR
11285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
11286$as_echo "$ac_cv_func_mbrtowc" >&6; }
11287 if test $ac_cv_func_mbrtowc = yes; then
3185942a 11288
ac50fbac 11289$as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h
0628567a 11290
ac50fbac 11291 fi
3185942a 11292
ac50fbac
CR
11293if test $ac_cv_func_mbrtowc = yes; then
11294 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
3185942a 11295
bb70624e 11296fi
f73dda09 11297
ac50fbac
CR
11298for ac_func in iswlower iswupper towlower towupper iswctype
11299do :
11300 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11301ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11302if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11303 cat >>confdefs.h <<_ACEOF
11304#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
b80f6443 11305_ACEOF
bb70624e
JA
11306
11307fi
ac50fbac 11308done
bb70624e 11309
ac50fbac
CR
11310
11311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11312$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11313if ${bash_cv_langinfo_codeset+:} false; then :
3185942a 11314 $as_echo_n "(cached) " >&6
bb70624e 11315else
ac50fbac 11316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11317/* end confdefs.h. */
ac50fbac 11318#include <langinfo.h>
f73dda09
JA
11319int
11320main ()
11321{
ac50fbac 11322char* cs = nl_langinfo(CODESET);
f73dda09
JA
11323 ;
11324 return 0;
11325}
11326_ACEOF
ac50fbac
CR
11327if ac_fn_c_try_link "$LINENO"; then :
11328 bash_cv_langinfo_codeset=yes
11329else
11330 bash_cv_langinfo_codeset=no
11331fi
11332rm -f core conftest.err conftest.$ac_objext \
11333 conftest$ac_exeext conftest.$ac_ext
11334fi
11335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_langinfo_codeset" >&5
11336$as_echo "$bash_cv_langinfo_codeset" >&6; }
11337if test $bash_cv_langinfo_codeset = yes; then
11338 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11339
11340fi
11341
11342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5
11343$as_echo_n "checking for wchar_t in wchar.h... " >&6; }
11344if ${bash_cv_type_wchar_t+:} false; then :
11345 $as_echo_n "(cached) " >&6
11346else
11347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11348/* end confdefs.h. */
ac50fbac
CR
11349#include <wchar.h>
11350
f73dda09
JA
11351int
11352main ()
11353{
ac50fbac
CR
11354
11355 wchar_t foo;
11356 foo = 0;
11357
f73dda09
JA
11358 ;
11359 return 0;
11360}
11361_ACEOF
ac50fbac
CR
11362if ac_fn_c_try_compile "$LINENO"; then :
11363 bash_cv_type_wchar_t=yes
bb70624e 11364else
ac50fbac 11365 bash_cv_type_wchar_t=no
bb70624e 11366fi
3185942a 11367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bb70624e 11368fi
ac50fbac
CR
11369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5
11370$as_echo "$bash_cv_type_wchar_t" >&6; }
11371if test $bash_cv_type_wchar_t = yes; then
f73dda09 11372
ac50fbac 11373$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
bb70624e
JA
11374
11375fi
11376
ac50fbac
CR
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5
11378$as_echo_n "checking for wctype_t in wctype.h... " >&6; }
11379if ${bash_cv_type_wctype_t+:} false; then :
3185942a 11380 $as_echo_n "(cached) " >&6
b72432fd 11381else
ac50fbac 11382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11383/* end confdefs.h. */
ac50fbac 11384#include <wctype.h>
f73dda09
JA
11385int
11386main ()
11387{
ac50fbac
CR
11388
11389 wctype_t foo;
11390 foo = 0;
11391
f73dda09
JA
11392 ;
11393 return 0;
11394}
11395_ACEOF
ac50fbac
CR
11396if ac_fn_c_try_compile "$LINENO"; then :
11397 bash_cv_type_wctype_t=yes
cce855bc 11398else
ac50fbac 11399 bash_cv_type_wctype_t=no
cce855bc 11400fi
3185942a 11401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cce855bc 11402fi
ac50fbac
CR
11403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5
11404$as_echo "$bash_cv_type_wctype_t" >&6; }
11405if test $bash_cv_type_wctype_t = yes; then
f73dda09 11406
ac50fbac 11407$as_echo "#define HAVE_WCTYPE_T 1" >>confdefs.h
cce855bc
JA
11408
11409fi
11410
ac50fbac
CR
11411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5
11412$as_echo_n "checking for wint_t in wctype.h... " >&6; }
11413if ${bash_cv_type_wint_t+:} false; then :
3185942a 11414 $as_echo_n "(cached) " >&6
cce855bc 11415else
ac50fbac 11416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11417/* end confdefs.h. */
ac50fbac 11418#include <wctype.h>
f73dda09
JA
11419int
11420main ()
11421{
ac50fbac
CR
11422
11423 wint_t foo;
11424 foo = 0;
11425
f73dda09
JA
11426 ;
11427 return 0;
11428}
11429_ACEOF
ac50fbac
CR
11430if ac_fn_c_try_compile "$LINENO"; then :
11431 bash_cv_type_wint_t=yes
3185942a 11432else
ac50fbac
CR
11433 bash_cv_type_wint_t=no
11434fi
11435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11436fi
11437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5
11438$as_echo "$bash_cv_type_wint_t" >&6; }
11439if test $bash_cv_type_wint_t = yes; then
11440
11441$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
11442
11443fi
11444
11445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcwidth broken with unicode combining characters" >&5
11446$as_echo_n "checking for wcwidth broken with unicode combining characters... " >&6; }
11447if ${bash_cv_wcwidth_broken+:} false; then :
11448 $as_echo_n "(cached) " >&6
11449else
11450 if test "$cross_compiling" = yes; then :
11451 bash_cv_wcwidth_broken=no
11452else
11453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11454/* end confdefs.h. */
11455
11456#include <unistd.h>
11457#include <stdlib.h>
11458#include <stdio.h>
11459
11460#include <locale.h>
11461#include <wchar.h>
3185942a 11462
ac50fbac
CR
11463main(c, v)
11464int c;
11465char **v;
11466{
11467 int w;
3185942a 11468
ac50fbac
CR
11469 setlocale(LC_ALL, "en_US.UTF-8");
11470 w = wcwidth (0x0301);
11471 exit (w == 0); /* exit 0 if wcwidth broken */
11472}
0628567a 11473
ac50fbac
CR
11474_ACEOF
11475if ac_fn_c_try_run "$LINENO"; then :
11476 bash_cv_wcwidth_broken=yes
11477else
a0c0a00f 11478 bash_cv_wcwidth_broken=no
ac50fbac
CR
11479fi
11480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11481 conftest.$ac_objext conftest.beam conftest.$ac_ext
11482fi
3185942a 11483
cce855bc 11484fi
ac50fbac
CR
11485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5
11486$as_echo "$bash_cv_wcwidth_broken" >&6; }
11487if test "$bash_cv_wcwidth_broken" = yes; then
11488
11489$as_echo "#define WCWIDTH_BROKEN 1" >>confdefs.h
3185942a 11490
b72432fd 11491fi
f73dda09 11492
ac50fbac
CR
11493if test "$am_cv_func_iconv" = yes; then
11494 OLDLIBS="$LIBS"
a0c0a00f 11495 LIBS="$LIBS $LIBINTL $LIBICONV"
ac50fbac
CR
11496 for ac_func in locale_charset
11497do :
11498 ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset"
11499if test "x$ac_cv_func_locale_charset" = xyes; then :
11500 cat >>confdefs.h <<_ACEOF
11501#define HAVE_LOCALE_CHARSET 1
b80f6443 11502_ACEOF
cce855bc 11503
b72432fd 11504fi
ac50fbac 11505done
b72432fd 11506
ac50fbac
CR
11507 LIBS="$OLDLIBS"
11508fi
11509
d233b485
CR
11510# The cast to long int works around a bug in the HP C Compiler
11511# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11512# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11513# This bug is HP SR number 8606223364.
11514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
11515$as_echo_n "checking size of wchar_t... " >&6; }
11516if ${ac_cv_sizeof_wchar_t+:} false; then :
11517 $as_echo_n "(cached) " >&6
11518else
11519 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then :
11520
11521else
11522 if test "$ac_cv_type_wchar_t" = yes; then
11523 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11524$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11525as_fn_error 77 "cannot compute sizeof (wchar_t)
11526See \`config.log' for more details" "$LINENO" 5; }
11527 else
11528 ac_cv_sizeof_wchar_t=0
11529 fi
11530fi
11531
11532fi
11533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
11534$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
11535
11536
11537
11538cat >>confdefs.h <<_ACEOF
11539#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
11540_ACEOF
11541
11542
11543
ac50fbac
CR
11544
11545
11546if test "$opt_static_link" != yes; then
11547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11548$as_echo_n "checking for dlopen in -ldl... " >&6; }
11549if ${ac_cv_lib_dl_dlopen+:} false; then :
3185942a
JA
11550 $as_echo_n "(cached) " >&6
11551else
ac50fbac
CR
11552 ac_check_lib_save_LIBS=$LIBS
11553LIBS="-ldl $LIBS"
11554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11555/* end confdefs.h. */
ac50fbac
CR
11556
11557/* Override any GCC internal prototype to avoid an error.
11558 Use char because int might match the return type of a GCC
11559 builtin and then its argument prototype would still apply. */
11560#ifdef __cplusplus
11561extern "C"
11562#endif
11563char dlopen ();
f73dda09
JA
11564int
11565main ()
11566{
ac50fbac 11567return dlopen ();
f73dda09
JA
11568 ;
11569 return 0;
11570}
11571_ACEOF
ac50fbac
CR
11572if ac_fn_c_try_link "$LINENO"; then :
11573 ac_cv_lib_dl_dlopen=yes
3185942a 11574else
ac50fbac 11575 ac_cv_lib_dl_dlopen=no
3185942a 11576fi
ac50fbac
CR
11577rm -f core conftest.err conftest.$ac_objext \
11578 conftest$ac_exeext conftest.$ac_ext
11579LIBS=$ac_check_lib_save_LIBS
11580fi
11581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11582$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11583if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11584 cat >>confdefs.h <<_ACEOF
11585#define HAVE_LIBDL 1
11586_ACEOF
3185942a 11587
ac50fbac
CR
11588 LIBS="-ldl $LIBS"
11589
11590fi
0628567a 11591
ac50fbac
CR
11592for ac_func in dlopen dlclose dlsym
11593do :
11594 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11595ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11596if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11597 cat >>confdefs.h <<_ACEOF
11598#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11599_ACEOF
3185942a 11600
cce855bc 11601fi
ac50fbac 11602done
3185942a 11603
cce855bc 11604fi
ac50fbac
CR
11605
11606ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
11607/* NetBSD declares sys_siglist in unistd.h. */
11608#ifdef HAVE_UNISTD_H
11609# include <unistd.h>
11610#endif
11611
11612"
11613if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
11614 ac_have_decl=1
f73dda09 11615else
ac50fbac
CR
11616 ac_have_decl=0
11617fi
f73dda09 11618
b80f6443 11619cat >>confdefs.h <<_ACEOF
ac50fbac 11620#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
b80f6443 11621_ACEOF
cce855bc 11622
cce855bc 11623
3185942a 11624
ac50fbac 11625if test "$ac_cv_func_inet_aton" != 'yes'; then
3185942a 11626
ac50fbac
CR
11627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11628$as_echo_n "checking for inet_aton... " >&6; }
11629if ${bash_cv_func_inet_aton+:} false; then :
3185942a 11630 $as_echo_n "(cached) " >&6
cce855bc 11631else
ac50fbac 11632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11633/* end confdefs.h. */
ac50fbac
CR
11634
11635#include <sys/types.h>
11636#include <netinet/in.h>
11637#include <arpa/inet.h>
11638struct in_addr ap;
f73dda09
JA
11639int
11640main ()
11641{
ac50fbac 11642 inet_aton("127.0.0.1", &ap);
f73dda09
JA
11643 ;
11644 return 0;
11645}
11646_ACEOF
ac50fbac
CR
11647if ac_fn_c_try_link "$LINENO"; then :
11648 bash_cv_func_inet_aton=yes
11649else
11650 bash_cv_func_inet_aton=no
11651fi
11652rm -f core conftest.err conftest.$ac_objext \
11653 conftest$ac_exeext conftest.$ac_ext
11654fi
11655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_inet_aton" >&5
11656$as_echo "$bash_cv_func_inet_aton" >&6; }
11657if test $bash_cv_func_inet_aton = yes; then
11658 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11659
11660else
11661 case " $LIBOBJS " in
11662 *" inet_aton.$ac_objext "* ) ;;
11663 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11664 ;;
3185942a 11665esac
ac50fbac
CR
11666
11667fi
11668
11669fi
11670
11671case "$host_os" in
11672irix4*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent in -lsun" >&5
11673$as_echo_n "checking for getpwent in -lsun... " >&6; }
11674if ${ac_cv_lib_sun_getpwent+:} false; then :
11675 $as_echo_n "(cached) " >&6
11676else
11677 ac_check_lib_save_LIBS=$LIBS
11678LIBS="-lsun $LIBS"
11679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11680/* end confdefs.h. */
ac50fbac
CR
11681
11682/* Override any GCC internal prototype to avoid an error.
11683 Use char because int might match the return type of a GCC
11684 builtin and then its argument prototype would still apply. */
11685#ifdef __cplusplus
11686extern "C"
11687#endif
11688char getpwent ();
f73dda09
JA
11689int
11690main ()
11691{
ac50fbac 11692return getpwent ();
f73dda09
JA
11693 ;
11694 return 0;
11695}
11696_ACEOF
ac50fbac
CR
11697if ac_fn_c_try_link "$LINENO"; then :
11698 ac_cv_lib_sun_getpwent=yes
3185942a 11699else
ac50fbac 11700 ac_cv_lib_sun_getpwent=no
3185942a 11701fi
ac50fbac
CR
11702rm -f core conftest.err conftest.$ac_objext \
11703 conftest$ac_exeext conftest.$ac_ext
11704LIBS=$ac_check_lib_save_LIBS
b72432fd 11705fi
ac50fbac
CR
11706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwent" >&5
11707$as_echo "$ac_cv_lib_sun_getpwent" >&6; }
11708if test "x$ac_cv_lib_sun_getpwent" = xyes; then :
11709 cat >>confdefs.h <<_ACEOF
11710#define HAVE_LIBSUN 1
11711_ACEOF
11712
11713 LIBS="-lsun $LIBS"
3185942a 11714
cce855bc 11715fi
ac50fbac
CR
11716 ;;
11717esac
f73dda09 11718
ac50fbac 11719if test "$ac_cv_func_getpeername" = no; then
cce855bc 11720
ac50fbac
CR
11721if test "X$bash_cv_have_socklib" = "X"; then
11722_bash_needmsg=
11723else
11724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket library" >&5
11725$as_echo_n "checking for socket library... " >&6; }
11726_bash_needmsg=yes
cce855bc 11727fi
ac50fbac 11728if ${bash_cv_have_socklib+:} false; then :
3185942a 11729 $as_echo_n "(cached) " >&6
cce855bc 11730else
ac50fbac
CR
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpeername in -lsocket" >&5
11732$as_echo_n "checking for getpeername in -lsocket... " >&6; }
11733if ${ac_cv_lib_socket_getpeername+:} false; then :
11734 $as_echo_n "(cached) " >&6
11735else
11736 ac_check_lib_save_LIBS=$LIBS
11737LIBS="-lsocket -lnsl $LIBS"
11738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11739/* end confdefs.h. */
ac50fbac
CR
11740
11741/* Override any GCC internal prototype to avoid an error.
11742 Use char because int might match the return type of a GCC
11743 builtin and then its argument prototype would still apply. */
11744#ifdef __cplusplus
11745extern "C"
11746#endif
11747char getpeername ();
f73dda09
JA
11748int
11749main ()
11750{
ac50fbac 11751return getpeername ();
f73dda09
JA
11752 ;
11753 return 0;
11754}
11755_ACEOF
ac50fbac
CR
11756if ac_fn_c_try_link "$LINENO"; then :
11757 ac_cv_lib_socket_getpeername=yes
11758else
11759 ac_cv_lib_socket_getpeername=no
11760fi
11761rm -f core conftest.err conftest.$ac_objext \
11762 conftest$ac_exeext conftest.$ac_ext
11763LIBS=$ac_check_lib_save_LIBS
11764fi
11765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getpeername" >&5
11766$as_echo "$ac_cv_lib_socket_getpeername" >&6; }
11767if test "x$ac_cv_lib_socket_getpeername" = xyes; then :
11768 bash_cv_have_socklib=yes
11769else
11770 bash_cv_have_socklib=no
11771fi
11772
11773fi
11774
11775if test "X$_bash_needmsg" = Xyes; then
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_socklib" >&5
11777$as_echo "$bash_cv_have_socklib" >&6; }
11778 _bash_needmsg=
11779fi
11780if test $bash_cv_have_socklib = yes; then
11781 # check for libnsl, add it to LIBS if present
11782 if test "X$bash_cv_have_libnsl" = "X"; then
11783 _bash_needmsg=
11784 else
11785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5
11786$as_echo_n "checking for libnsl... " >&6; }
11787 _bash_needmsg=yes
11788 fi
11789 if ${bash_cv_have_libnsl+:} false; then :
11790 $as_echo_n "(cached) " >&6
11791else
11792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
11793$as_echo_n "checking for t_open in -lnsl... " >&6; }
11794if ${ac_cv_lib_nsl_t_open+:} false; then :
11795 $as_echo_n "(cached) " >&6
11796else
11797 ac_check_lib_save_LIBS=$LIBS
11798LIBS="-lnsl $LIBS"
11799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 11800/* end confdefs.h. */
ac50fbac
CR
11801
11802/* Override any GCC internal prototype to avoid an error.
11803 Use char because int might match the return type of a GCC
11804 builtin and then its argument prototype would still apply. */
11805#ifdef __cplusplus
11806extern "C"
11807#endif
11808char t_open ();
3185942a
JA
11809int
11810main ()
11811{
ac50fbac 11812return t_open ();
3185942a
JA
11813 ;
11814 return 0;
11815}
11816_ACEOF
ac50fbac
CR
11817if ac_fn_c_try_link "$LINENO"; then :
11818 ac_cv_lib_nsl_t_open=yes
3185942a 11819else
ac50fbac 11820 ac_cv_lib_nsl_t_open=no
3185942a 11821fi
ac50fbac
CR
11822rm -f core conftest.err conftest.$ac_objext \
11823 conftest$ac_exeext conftest.$ac_ext
11824LIBS=$ac_check_lib_save_LIBS
11825fi
11826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
11827$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
11828if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
11829 bash_cv_have_libnsl=yes
3185942a 11830else
ac50fbac 11831 bash_cv_have_libnsl=no
3185942a
JA
11832fi
11833
3185942a 11834fi
3185942a 11835
ac50fbac
CR
11836 if test "X$_bash_needmsg" = Xyes; then
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_libnsl" >&5
11838$as_echo "$bash_cv_have_libnsl" >&6; }
11839 _bash_needmsg=
11840 fi
11841 if test $bash_cv_have_libnsl = yes; then
11842 LIBS="-lsocket -lnsl $LIBS"
11843 else
11844 LIBS="-lsocket $LIBS"
11845 fi
11846 $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
11847
11848 $as_echo "#define HAVE_GETPEERNAME 1" >>confdefs.h
3185942a
JA
11849
11850fi
11851
ac50fbac
CR
11852fi
11853if test "$ac_cv_func_gethostbyname" = no; then
11854 if test "X$bash_cv_have_gethostbyname" = "X"; then
11855_bash_needmsg=yes
3185942a 11856else
ac50fbac
CR
11857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5
11858$as_echo_n "checking for gethostbyname in socket library... " >&6; }
11859_bash_needmsg=
11860fi
11861if ${bash_cv_have_gethostbyname+:} false; then :
3185942a
JA
11862 $as_echo_n "(cached) " >&6
11863else
ac50fbac 11864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 11865/* end confdefs.h. */
ac50fbac 11866#include <netdb.h>
3185942a
JA
11867int
11868main ()
11869{
ac50fbac
CR
11870 struct hostent *hp;
11871 hp = gethostbyname("localhost");
11872
3185942a
JA
11873 ;
11874 return 0;
11875}
11876_ACEOF
ac50fbac
CR
11877if ac_fn_c_try_link "$LINENO"; then :
11878 bash_cv_have_gethostbyname=yes
3185942a 11879else
ac50fbac 11880 bash_cv_have_gethostbyname=no
3185942a 11881fi
ac50fbac
CR
11882rm -f core conftest.err conftest.$ac_objext \
11883 conftest$ac_exeext conftest.$ac_ext
3185942a 11884
ac50fbac 11885fi
3185942a 11886
ac50fbac
CR
11887if test "X$_bash_needmsg" = Xyes; then
11888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5
11889$as_echo_n "checking for gethostbyname in socket library... " >&6; }
11890fi
11891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_gethostbyname" >&5
11892$as_echo "$bash_cv_have_gethostbyname" >&6; }
11893if test "$bash_cv_have_gethostbyname" = yes; then
11894$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
3185942a
JA
11895
11896fi
11897
3185942a 11898fi
ac50fbac 11899
ac50fbac
CR
11900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
11901$as_echo_n "checking type of array argument to getgroups... " >&6; }
11902if ${ac_cv_type_getgroups+:} false; then :
3185942a
JA
11903 $as_echo_n "(cached) " >&6
11904else
ac50fbac
CR
11905 if test "$cross_compiling" = yes; then :
11906 ac_cv_type_getgroups=cross
11907else
11908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 11909/* end confdefs.h. */
ac50fbac 11910/* Thanks to Mike Rendell for this test. */
3185942a 11911$ac_includes_default
ac50fbac
CR
11912#define NGID 256
11913#undef MAX
11914#define MAX(x, y) ((x) > (y) ? (x) : (y))
11915
3185942a
JA
11916int
11917main ()
11918{
ac50fbac
CR
11919 gid_t gidset[NGID];
11920 int i, n;
11921 union { gid_t gval; long int lval; } val;
11922
11923 val.lval = -1;
11924 for (i = 0; i < NGID; i++)
11925 gidset[i] = val.gval;
11926 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
11927 gidset);
11928 /* Exit non-zero if getgroups seems to require an array of ints. This
11929 happens when gid_t is short int but getgroups modifies an array
11930 of ints. */
11931 return n > 0 && gidset[n] != val.gval;
3185942a
JA
11932}
11933_ACEOF
ac50fbac
CR
11934if ac_fn_c_try_run "$LINENO"; then :
11935 ac_cv_type_getgroups=gid_t
11936else
11937 ac_cv_type_getgroups=int
11938fi
11939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11940 conftest.$ac_objext conftest.beam conftest.$ac_ext
11941fi
11942
11943if test $ac_cv_type_getgroups = cross; then
11944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 11945/* end confdefs.h. */
ac50fbac
CR
11946#include <unistd.h>
11947
3185942a 11948_ACEOF
ac50fbac
CR
11949if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11950 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
11951 ac_cv_type_getgroups=gid_t
3185942a 11952else
ac50fbac
CR
11953 ac_cv_type_getgroups=int
11954fi
11955rm -f conftest*
3185942a 11956
3185942a 11957fi
ac50fbac
CR
11958fi
11959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
11960$as_echo "$ac_cv_type_getgroups" >&6; }
11961
11962cat >>confdefs.h <<_ACEOF
11963#define GETGROUPS_T $ac_cv_type_getgroups
11964_ACEOF
11965
11966
11967ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
11968if test "x$ac_cv_type_off_t" = xyes; then :
3185942a 11969
3185942a 11970else
3185942a 11971
ac50fbac
CR
11972cat >>confdefs.h <<_ACEOF
11973#define off_t long int
11974_ACEOF
3185942a
JA
11975
11976fi
11977
ac50fbac
CR
11978ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11979if test "x$ac_cv_type_mode_t" = xyes; then :
11980
3185942a
JA
11981else
11982
11983cat >>confdefs.h <<_ACEOF
ac50fbac 11984#define mode_t int
3185942a
JA
11985_ACEOF
11986
11987fi
11988
ac50fbac
CR
11989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
11990$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
11991if ${ac_cv_type_uid_t+:} false; then :
3185942a
JA
11992 $as_echo_n "(cached) " >&6
11993else
ac50fbac 11994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 11995/* end confdefs.h. */
ac50fbac
CR
11996#include <sys/types.h>
11997
3185942a 11998_ACEOF
ac50fbac
CR
11999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12000 $EGREP "uid_t" >/dev/null 2>&1; then :
12001 ac_cv_type_uid_t=yes
3185942a 12002else
ac50fbac 12003 ac_cv_type_uid_t=no
3185942a 12004fi
ac50fbac 12005rm -f conftest*
3185942a 12006
ac50fbac
CR
12007fi
12008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12009$as_echo "$ac_cv_type_uid_t" >&6; }
12010if test $ac_cv_type_uid_t = no; then
3185942a 12011
ac50fbac 12012$as_echo "#define uid_t int" >>confdefs.h
3185942a 12013
3185942a 12014
ac50fbac
CR
12015$as_echo "#define gid_t int" >>confdefs.h
12016
3185942a 12017fi
ac50fbac
CR
12018
12019ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12020if test "x$ac_cv_type_pid_t" = xyes; then :
12021
3185942a
JA
12022else
12023
12024cat >>confdefs.h <<_ACEOF
ac50fbac 12025#define pid_t int
3185942a
JA
12026_ACEOF
12027
12028fi
12029
ac50fbac
CR
12030ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12031if test "x$ac_cv_type_size_t" = xyes; then :
12032
3185942a 12033else
ac50fbac
CR
12034
12035cat >>confdefs.h <<_ACEOF
12036#define size_t unsigned int
3185942a 12037_ACEOF
3185942a 12038
3185942a
JA
12039fi
12040
a0c0a00f
CR
12041
12042 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
12043if test "x$ac_cv_type_uintptr_t" = xyes; then :
12044
12045$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
12046
12047else
12048 for ac_type in 'unsigned int' 'unsigned long int' \
12049 'unsigned long long int'; do
12050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12051/* end confdefs.h. */
12052$ac_includes_default
12053int
12054main ()
12055{
12056static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12057test_array [0] = 0;
12058return test_array [0];
12059
12060 ;
12061 return 0;
12062}
12063_ACEOF
12064if ac_fn_c_try_compile "$LINENO"; then :
12065
12066cat >>confdefs.h <<_ACEOF
12067#define uintptr_t $ac_type
12068_ACEOF
12069
12070 ac_type=
12071fi
12072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12073 test -z "$ac_type" && break
12074 done
12075fi
12076
12077
12078
ac50fbac
CR
12079ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
12080if test "x$ac_cv_type_ssize_t" = xyes; then :
12081
3185942a 12082else
3185942a 12083
ac50fbac
CR
12084cat >>confdefs.h <<_ACEOF
12085#define ssize_t int
12086_ACEOF
3185942a
JA
12087
12088fi
12089
ac50fbac
CR
12090ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default"
12091if test "x$ac_cv_type_time_t" = xyes; then :
12092
3185942a
JA
12093else
12094
12095cat >>confdefs.h <<_ACEOF
ac50fbac 12096#define time_t long
3185942a
JA
12097_ACEOF
12098
12099fi
12100
3185942a
JA
12101
12102
ac50fbac
CR
12103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5
12104$as_echo_n "checking for long long... " >&6; }
12105if ${bash_cv_type_long_long+:} false; then :
3185942a
JA
12106 $as_echo_n "(cached) " >&6
12107else
ac50fbac 12108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 12109/* end confdefs.h. */
ac50fbac
CR
12110
12111long long ll = 1; int i = 63;
3185942a
JA
12112int
12113main ()
12114{
ac50fbac
CR
12115
12116long long llm = (long long) -1;
12117return ll << i | ll >> i | llm / ll | llm % ll;
12118
3185942a
JA
12119 ;
12120 return 0;
12121}
12122_ACEOF
ac50fbac
CR
12123if ac_fn_c_try_link "$LINENO"; then :
12124 bash_cv_type_long_long='long long'
12125else
12126 bash_cv_type_long_long='long'
12127fi
12128rm -f core conftest.err conftest.$ac_objext \
12129 conftest$ac_exeext conftest.$ac_ext
12130fi
12131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_long_long" >&5
12132$as_echo "$bash_cv_type_long_long" >&6; }
12133if test "$bash_cv_type_long_long" = 'long long'; then
12134 $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
12135
12136fi
12137
12138
12139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5
12140$as_echo_n "checking for unsigned long long... " >&6; }
12141if ${bash_cv_type_unsigned_long_long+:} false; then :
12142 $as_echo_n "(cached) " >&6
12143else
12144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 12145/* end confdefs.h. */
ac50fbac
CR
12146
12147unsigned long long ull = 1; int i = 63;
3185942a
JA
12148int
12149main ()
12150{
ac50fbac
CR
12151
12152unsigned long long ullmax = (unsigned long long) -1;
12153return ull << i | ull >> i | ullmax / ull | ullmax % ull;
12154
3185942a
JA
12155 ;
12156 return 0;
12157}
12158_ACEOF
ac50fbac
CR
12159if ac_fn_c_try_link "$LINENO"; then :
12160 bash_cv_type_unsigned_long_long='unsigned long long'
3185942a 12161else
ac50fbac 12162 bash_cv_type_unsigned_long_long='unsigned long'
3185942a 12163fi
ac50fbac
CR
12164rm -f core conftest.err conftest.$ac_objext \
12165 conftest$ac_exeext conftest.$ac_ext
3185942a 12166fi
ac50fbac
CR
12167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_unsigned_long_long" >&5
12168$as_echo "$bash_cv_type_unsigned_long_long" >&6; }
12169if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
12170 $as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h
3185942a 12171
3185942a 12172fi
3185942a 12173
cce855bc 12174
ac50fbac
CR
12175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
12176$as_echo_n "checking return type of signal handlers... " >&6; }
12177if ${ac_cv_type_signal+:} false; then :
3185942a 12178 $as_echo_n "(cached) " >&6
cce855bc 12179else
ac50fbac 12180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12181/* end confdefs.h. */
ac50fbac
CR
12182#include <sys/types.h>
12183#include <signal.h>
12184
f73dda09
JA
12185int
12186main ()
12187{
ac50fbac 12188return *(signal (0, 0)) (0) == 1;
3185942a 12189 ;
f73dda09 12190 return 0;
3185942a
JA
12191}
12192_ACEOF
ac50fbac
CR
12193if ac_fn_c_try_compile "$LINENO"; then :
12194 ac_cv_type_signal=int
12195else
12196 ac_cv_type_signal=void
12197fi
12198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12199fi
12200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
12201$as_echo "$ac_cv_type_signal" >&6; }
12202
12203cat >>confdefs.h <<_ACEOF
12204#define RETSIGTYPE $ac_cv_type_signal
3185942a 12205_ACEOF
ac50fbac
CR
12206
12207
12208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5
12209$as_echo_n "checking for sig_atomic_t in signal.h... " >&6; }
12210if ${ac_cv_have_sig_atomic_t+:} false; then :
12211 $as_echo_n "(cached) " >&6
12212else
12213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 12214/* end confdefs.h. */
ac50fbac
CR
12215
12216#include <signal.h>
12217
3185942a
JA
12218int
12219main ()
12220{
ac50fbac 12221 sig_atomic_t x;
f73dda09
JA
12222 ;
12223 return 0;
12224}
12225_ACEOF
ac50fbac
CR
12226if ac_fn_c_try_link "$LINENO"; then :
12227 ac_cv_have_sig_atomic_t=yes
3185942a 12228else
ac50fbac
CR
12229 ac_cv_have_sig_atomic_t=no
12230fi
12231rm -f core conftest.err conftest.$ac_objext \
12232 conftest$ac_exeext conftest.$ac_ext
3185942a 12233fi
ac50fbac
CR
12234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5
12235$as_echo "$ac_cv_have_sig_atomic_t" >&6; }
12236if test "$ac_cv_have_sig_atomic_t" = "no"
12237then
12238 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default"
12239if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
3185942a 12240
3185942a 12241else
3185942a 12242
ac50fbac
CR
12243cat >>confdefs.h <<_ACEOF
12244#define sig_atomic_t int
12245_ACEOF
3185942a
JA
12246
12247fi
12248
3185942a 12249fi
ac50fbac
CR
12250
12251
12252# The cast to long int works around a bug in the HP C Compiler
12253# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12254# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12255# This bug is HP SR number 8606223364.
12256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
12257$as_echo_n "checking size of char... " >&6; }
12258if ${ac_cv_sizeof_char+:} false; then :
12259 $as_echo_n "(cached) " >&6
3185942a 12260else
ac50fbac 12261 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then :
3185942a 12262
ac50fbac
CR
12263else
12264 if test "$ac_cv_type_char" = yes; then
12265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12267as_fn_error 77 "cannot compute sizeof (char)
12268See \`config.log' for more details" "$LINENO" 5; }
12269 else
12270 ac_cv_sizeof_char=0
12271 fi
12272fi
3185942a
JA
12273
12274fi
ac50fbac
CR
12275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
12276$as_echo "$ac_cv_sizeof_char" >&6; }
3185942a 12277
ac50fbac
CR
12278
12279
12280cat >>confdefs.h <<_ACEOF
12281#define SIZEOF_CHAR $ac_cv_sizeof_char
3185942a 12282_ACEOF
ac50fbac
CR
12283
12284
12285# The cast to long int works around a bug in the HP C Compiler
12286# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12287# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12288# This bug is HP SR number 8606223364.
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
12290$as_echo_n "checking size of short... " >&6; }
12291if ${ac_cv_sizeof_short+:} false; then :
12292 $as_echo_n "(cached) " >&6
3185942a 12293else
ac50fbac
CR
12294 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
12295
12296else
12297 if test "$ac_cv_type_short" = yes; then
12298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12299$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12300as_fn_error 77 "cannot compute sizeof (short)
12301See \`config.log' for more details" "$LINENO" 5; }
12302 else
12303 ac_cv_sizeof_short=0
12304 fi
12305fi
3185942a 12306
3185942a 12307fi
ac50fbac
CR
12308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
12309$as_echo "$ac_cv_sizeof_short" >&6; }
3185942a 12310
0628567a 12311
3185942a 12312
ac50fbac
CR
12313cat >>confdefs.h <<_ACEOF
12314#define SIZEOF_SHORT $ac_cv_sizeof_short
12315_ACEOF
12316
12317
12318# The cast to long int works around a bug in the HP C Compiler
12319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12321# This bug is HP SR number 8606223364.
12322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
12323$as_echo_n "checking size of int... " >&6; }
12324if ${ac_cv_sizeof_int+:} false; then :
12325 $as_echo_n "(cached) " >&6
12326else
12327 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
12328
12329else
12330 if test "$ac_cv_type_int" = yes; then
12331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12333as_fn_error 77 "cannot compute sizeof (int)
12334See \`config.log' for more details" "$LINENO" 5; }
12335 else
12336 ac_cv_sizeof_int=0
12337 fi
b72432fd 12338fi
3185942a 12339
b72432fd 12340fi
ac50fbac
CR
12341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
12342$as_echo "$ac_cv_sizeof_int" >&6; }
12343
12344
f73dda09 12345
b80f6443 12346cat >>confdefs.h <<_ACEOF
ac50fbac 12347#define SIZEOF_INT $ac_cv_sizeof_int
b80f6443 12348_ACEOF
b72432fd 12349
ac50fbac
CR
12350
12351# The cast to long int works around a bug in the HP C Compiler
12352# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12353# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12354# This bug is HP SR number 8606223364.
12355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
12356$as_echo_n "checking size of long... " >&6; }
12357if ${ac_cv_sizeof_long+:} false; then :
12358 $as_echo_n "(cached) " >&6
12359else
12360 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
12361
12362else
12363 if test "$ac_cv_type_long" = yes; then
12364 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12365$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12366as_fn_error 77 "cannot compute sizeof (long)
12367See \`config.log' for more details" "$LINENO" 5; }
12368 else
12369 ac_cv_sizeof_long=0
12370 fi
b72432fd 12371fi
cce855bc 12372
b72432fd 12373fi
ac50fbac
CR
12374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
12375$as_echo "$ac_cv_sizeof_long" >&6; }
b72432fd 12376
b80f6443 12377
ac50fbac
CR
12378
12379cat >>confdefs.h <<_ACEOF
12380#define SIZEOF_LONG $ac_cv_sizeof_long
12381_ACEOF
12382
12383
12384# The cast to long int works around a bug in the HP C Compiler
12385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12387# This bug is HP SR number 8606223364.
12388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
12389$as_echo_n "checking size of char *... " >&6; }
12390if ${ac_cv_sizeof_char_p+:} false; then :
3185942a
JA
12391 $as_echo_n "(cached) " >&6
12392else
ac50fbac
CR
12393 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then :
12394
3185942a 12395else
ac50fbac
CR
12396 if test "$ac_cv_type_char_p" = yes; then
12397 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12398$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12399as_fn_error 77 "cannot compute sizeof (char *)
12400See \`config.log' for more details" "$LINENO" 5; }
12401 else
12402 ac_cv_sizeof_char_p=0
12403 fi
12404fi
3185942a 12405
3185942a 12406fi
ac50fbac
CR
12407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
12408$as_echo "$ac_cv_sizeof_char_p" >&6; }
3185942a 12409
3185942a
JA
12410
12411
ac50fbac
CR
12412cat >>confdefs.h <<_ACEOF
12413#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
12414_ACEOF
12415
12416
12417# The cast to long int works around a bug in the HP C Compiler
12418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12420# This bug is HP SR number 8606223364.
12421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
12422$as_echo_n "checking size of double... " >&6; }
12423if ${ac_cv_sizeof_double+:} false; then :
12424 $as_echo_n "(cached) " >&6
12425else
12426 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
12427
12428else
12429 if test "$ac_cv_type_double" = yes; then
12430 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12432as_fn_error 77 "cannot compute sizeof (double)
12433See \`config.log' for more details" "$LINENO" 5; }
12434 else
12435 ac_cv_sizeof_double=0
12436 fi
3185942a
JA
12437fi
12438
3185942a 12439fi
ac50fbac
CR
12440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
12441$as_echo "$ac_cv_sizeof_double" >&6; }
12442
12443
3185942a
JA
12444
12445cat >>confdefs.h <<_ACEOF
ac50fbac 12446#define SIZEOF_DOUBLE $ac_cv_sizeof_double
3185942a
JA
12447_ACEOF
12448
3185942a 12449
ac50fbac
CR
12450# The cast to long int works around a bug in the HP C Compiler
12451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12453# This bug is HP SR number 8606223364.
12454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12455$as_echo_n "checking size of long long... " >&6; }
12456if ${ac_cv_sizeof_long_long+:} false; then :
3185942a
JA
12457 $as_echo_n "(cached) " >&6
12458else
ac50fbac
CR
12459 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12460
3185942a 12461else
ac50fbac
CR
12462 if test "$ac_cv_type_long_long" = yes; then
12463 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12465as_fn_error 77 "cannot compute sizeof (long long)
12466See \`config.log' for more details" "$LINENO" 5; }
12467 else
12468 ac_cv_sizeof_long_long=0
12469 fi
12470fi
3185942a 12471
3185942a 12472fi
ac50fbac
CR
12473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12474$as_echo "$ac_cv_sizeof_long_long" >&6; }
3185942a 12475
3185942a
JA
12476
12477
ac50fbac
CR
12478cat >>confdefs.h <<_ACEOF
12479#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12480_ACEOF
12481
12482
12483
12484ac_fn_c_check_type "$LINENO" "u_int" "ac_cv_type_u_int" "$ac_includes_default"
12485if test "x$ac_cv_type_u_int" = xyes; then :
3185942a 12486
3185942a
JA
12487else
12488
12489cat >>confdefs.h <<_ACEOF
ac50fbac 12490#define u_int unsigned int
3185942a
JA
12491_ACEOF
12492
12493fi
12494
ac50fbac
CR
12495ac_fn_c_check_type "$LINENO" "u_long" "ac_cv_type_u_long" "$ac_includes_default"
12496if test "x$ac_cv_type_u_long" = xyes; then :
12497
cce855bc 12498else
ac50fbac
CR
12499
12500cat >>confdefs.h <<_ACEOF
12501#define u_long unsigned long
f73dda09 12502_ACEOF
3185942a 12503
ac50fbac
CR
12504fi
12505
12506
12507
12508if test "$ac_cv_sizeof_short" = 2; then
12509 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
12510if test "x$ac_cv_type_bits16_t" = xyes; then :
3185942a 12511
b72432fd 12512else
0628567a 12513
ac50fbac
CR
12514cat >>confdefs.h <<_ACEOF
12515#define bits16_t short
12516_ACEOF
3185942a 12517
b72432fd 12518fi
3185942a 12519
ac50fbac
CR
12520elif test "$ac_cv_sizeof_char" = 2; then
12521 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
12522if test "x$ac_cv_type_bits16_t" = xyes; then :
12523
f73dda09
JA
12524else
12525
b80f6443 12526cat >>confdefs.h <<_ACEOF
ac50fbac 12527#define bits16_t char
b80f6443 12528_ACEOF
b72432fd
JA
12529
12530fi
12531
b72432fd 12532else
ac50fbac
CR
12533 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
12534if test "x$ac_cv_type_bits16_t" = xyes; then :
12535
3185942a 12536else
3185942a 12537
ac50fbac
CR
12538cat >>confdefs.h <<_ACEOF
12539#define bits16_t short
12540_ACEOF
12541
3185942a
JA
12542fi
12543
ac50fbac
CR
12544fi
12545
12546
12547if test "$ac_cv_sizeof_short" = 2; then
12548 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
12549if test "x$ac_cv_type_u_bits16_t" = xyes; then :
12550
b72432fd 12551else
0628567a 12552
ac50fbac
CR
12553cat >>confdefs.h <<_ACEOF
12554#define u_bits16_t unsigned short
12555_ACEOF
3185942a 12556
f73dda09 12557fi
3185942a 12558
ac50fbac
CR
12559elif test "$ac_cv_sizeof_char" = 2; then
12560 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
12561if test "x$ac_cv_type_u_bits16_t" = xyes; then :
12562
f73dda09
JA
12563else
12564
b80f6443 12565cat >>confdefs.h <<_ACEOF
ac50fbac 12566#define u_bits16_t unsigned char
b80f6443 12567_ACEOF
f73dda09 12568
cce855bc 12569fi
b72432fd 12570
3185942a 12571else
ac50fbac
CR
12572 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
12573if test "x$ac_cv_type_u_bits16_t" = xyes; then :
12574
f73dda09 12575else
ac50fbac
CR
12576
12577cat >>confdefs.h <<_ACEOF
12578#define u_bits16_t unsigned short
f73dda09 12579_ACEOF
3185942a 12580
3185942a
JA
12581fi
12582
ac50fbac
CR
12583fi
12584
12585
12586if test "$ac_cv_sizeof_int" = 4; then
12587 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
12588if test "x$ac_cv_type_bits32_t" = xyes; then :
12589
b72432fd 12590else
0628567a 12591
ac50fbac
CR
12592cat >>confdefs.h <<_ACEOF
12593#define bits32_t int
12594_ACEOF
3185942a 12595
b72432fd 12596fi
3185942a 12597
ac50fbac
CR
12598elif test "$ac_cv_sizeof_long" = 4; then
12599 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
12600if test "x$ac_cv_type_bits32_t" = xyes; then :
12601
12602else
12603
12604cat >>confdefs.h <<_ACEOF
12605#define bits32_t long
12606_ACEOF
12607
b72432fd 12608fi
ac50fbac
CR
12609
12610else
12611 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
12612if test "x$ac_cv_type_bits32_t" = xyes; then :
12613
f73dda09
JA
12614else
12615
b80f6443 12616cat >>confdefs.h <<_ACEOF
ac50fbac 12617#define bits32_t int
b80f6443 12618_ACEOF
cce855bc
JA
12619
12620fi
12621
12622fi
12623
b80f6443 12624
ac50fbac
CR
12625if test "$ac_cv_sizeof_int" = 4; then
12626 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
12627if test "x$ac_cv_type_u_bits32_t" = xyes; then :
b80f6443 12628
bb70624e 12629else
ac50fbac
CR
12630
12631cat >>confdefs.h <<_ACEOF
12632#define u_bits32_t unsigned int
3185942a 12633_ACEOF
3185942a 12634
3185942a
JA
12635fi
12636
ac50fbac
CR
12637elif test "$ac_cv_sizeof_long" = 4; then
12638 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
12639if test "x$ac_cv_type_u_bits32_t" = xyes; then :
12640
bb70624e 12641else
0628567a 12642
ac50fbac
CR
12643cat >>confdefs.h <<_ACEOF
12644#define u_bits32_t unsigned long
12645_ACEOF
3185942a 12646
bb70624e 12647fi
3185942a 12648
ac50fbac
CR
12649else
12650 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
12651if test "x$ac_cv_type_u_bits32_t" = xyes; then :
12652
f73dda09
JA
12653else
12654
b80f6443 12655cat >>confdefs.h <<_ACEOF
ac50fbac 12656#define u_bits32_t unsigned int
b80f6443 12657_ACEOF
bb70624e
JA
12658
12659fi
12660
ac50fbac
CR
12661fi
12662
12663
12664if test "$ac_cv_sizeof_char_p" = 8; then
12665 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12666if test "x$ac_cv_type_bits64_t" = xyes; then :
12667
bb70624e 12668else
ac50fbac
CR
12669
12670cat >>confdefs.h <<_ACEOF
12671#define bits64_t char *
3185942a 12672_ACEOF
3185942a 12673
3185942a
JA
12674fi
12675
ac50fbac
CR
12676elif test "$ac_cv_sizeof_double" = 8; then
12677 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12678if test "x$ac_cv_type_bits64_t" = xyes; then :
12679
bb70624e 12680else
0628567a 12681
ac50fbac
CR
12682cat >>confdefs.h <<_ACEOF
12683#define bits64_t double
12684_ACEOF
3185942a 12685
bb70624e 12686fi
3185942a 12687
ac50fbac
CR
12688elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
12689 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12690if test "x$ac_cv_type_bits64_t" = xyes; then :
12691
f73dda09
JA
12692else
12693
b80f6443 12694cat >>confdefs.h <<_ACEOF
ac50fbac 12695#define bits64_t long long
b80f6443 12696_ACEOF
bb70624e
JA
12697
12698fi
12699
ac50fbac
CR
12700elif test "$ac_cv_sizeof_long" = 8; then
12701 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12702if test "x$ac_cv_type_bits64_t" = xyes; then :
12703
bb70624e 12704else
ac50fbac
CR
12705
12706cat >>confdefs.h <<_ACEOF
12707#define bits64_t long
3185942a 12708_ACEOF
3185942a 12709
3185942a
JA
12710fi
12711
bb70624e 12712else
ac50fbac
CR
12713 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12714if test "x$ac_cv_type_bits64_t" = xyes; then :
12715
12716else
0628567a 12717
ac50fbac
CR
12718cat >>confdefs.h <<_ACEOF
12719#define bits64_t double
12720_ACEOF
3185942a 12721
f73dda09 12722fi
3185942a 12723
f73dda09 12724fi
ac50fbac
CR
12725
12726
12727
12728if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
12729 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12730if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12731
f73dda09
JA
12732else
12733
b80f6443 12734cat >>confdefs.h <<_ACEOF
ac50fbac 12735#define ptrdiff_t int
b80f6443 12736_ACEOF
f73dda09 12737
bb70624e 12738fi
bb70624e 12739
ac50fbac
CR
12740elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
12741 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12742if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12743
f73dda09 12744else
ac50fbac
CR
12745
12746cat >>confdefs.h <<_ACEOF
12747#define ptrdiff_t long
3185942a 12748_ACEOF
3185942a 12749
3185942a
JA
12750fi
12751
ac50fbac
CR
12752elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
12753 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12754if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12755
f73dda09 12756else
0628567a 12757
ac50fbac
CR
12758cat >>confdefs.h <<_ACEOF
12759#define ptrdiff_t long long
12760_ACEOF
3185942a 12761
bb70624e 12762fi
3185942a 12763
ac50fbac
CR
12764else
12765 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12766if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12767
f73dda09
JA
12768else
12769
b80f6443 12770cat >>confdefs.h <<_ACEOF
bb70624e 12771#define ptrdiff_t int
b80f6443 12772_ACEOF
bb70624e
JA
12773
12774fi
12775
12776fi
12777
b80f6443 12778
ac50fbac 12779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
3185942a 12780$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
ac50fbac 12781if ${ac_cv_header_stat_broken+:} false; then :
3185942a 12782 $as_echo_n "(cached) " >&6
ccc6cda3 12783else
ac50fbac 12784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12785/* end confdefs.h. */
ccc6cda3
JA
12786#include <sys/types.h>
12787#include <sys/stat.h>
12788
3185942a
JA
12789#if defined S_ISBLK && defined S_IFDIR
12790extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
ccc6cda3
JA
12791#endif
12792
3185942a
JA
12793#if defined S_ISBLK && defined S_IFCHR
12794extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
ccc6cda3
JA
12795#endif
12796
3185942a
JA
12797#if defined S_ISLNK && defined S_IFREG
12798extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
ccc6cda3
JA
12799#endif
12800
3185942a
JA
12801#if defined S_ISSOCK && defined S_IFREG
12802extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
f73dda09
JA
12803#endif
12804
12805_ACEOF
ac50fbac 12806if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 12807 ac_cv_header_stat_broken=no
3185942a 12808else
ac50fbac 12809 ac_cv_header_stat_broken=yes
ccc6cda3 12810fi
3185942a 12811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 12812fi
ac50fbac 12813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
3185942a 12814$as_echo "$ac_cv_header_stat_broken" >&6; }
f73dda09 12815if test $ac_cv_header_stat_broken = yes; then
ccc6cda3 12816
ac50fbac 12817$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
ccc6cda3
JA
12818
12819fi
12820
b80f6443 12821
ac50fbac 12822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5
3185942a 12823$as_echo_n "checking whether #! works in shell scripts... " >&6; }
ac50fbac 12824if ${ac_cv_sys_interpreter+:} false; then :
3185942a 12825 $as_echo_n "(cached) " >&6
ccc6cda3
JA
12826else
12827 echo '#! /bin/cat
12828exit 69
f73dda09 12829' >conftest
ccc6cda3 12830chmod u+x conftest
3185942a 12831(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
ccc6cda3
JA
12832if test $? -ne 69; then
12833 ac_cv_sys_interpreter=yes
12834else
12835 ac_cv_sys_interpreter=no
12836fi
12837rm -f conftest
12838fi
ac50fbac 12839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5
3185942a 12840$as_echo "$ac_cv_sys_interpreter" >&6; }
f73dda09 12841interpval=$ac_cv_sys_interpreter
ccc6cda3
JA
12842
12843if test $ac_cv_sys_interpreter = yes; then
ac50fbac 12844$as_echo "#define HAVE_HASH_BANG_EXEC 1" >>confdefs.h
ccc6cda3 12845
ccc6cda3
JA
12846fi
12847
ccc6cda3 12848if test "$ac_cv_func_lstat" = "no"; then
ac50fbac 12849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5
3185942a 12850$as_echo_n "checking for lstat... " >&6; }
ac50fbac 12851if ${bash_cv_func_lstat+:} false; then :
3185942a 12852 $as_echo_n "(cached) " >&6
ccc6cda3 12853else
ac50fbac 12854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12855/* end confdefs.h. */
ccc6cda3
JA
12856
12857#include <sys/types.h>
12858#include <sys/stat.h>
12859
f73dda09
JA
12860int
12861main ()
12862{
12863 lstat(".",(struct stat *)0);
12864 ;
12865 return 0;
12866}
12867_ACEOF
ac50fbac 12868if ac_fn_c_try_link "$LINENO"; then :
ccc6cda3
JA
12869 bash_cv_func_lstat=yes
12870else
ac50fbac 12871 bash_cv_func_lstat=no
ccc6cda3 12872fi
ac50fbac
CR
12873rm -f core conftest.err conftest.$ac_objext \
12874 conftest$ac_exeext conftest.$ac_ext
ccc6cda3 12875fi
ac50fbac 12876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5
3185942a 12877$as_echo "$bash_cv_func_lstat" >&6; }
ccc6cda3 12878if test $bash_cv_func_lstat = yes; then
ac50fbac 12879 $as_echo "#define HAVE_LSTAT 1" >>confdefs.h
b80f6443
JA
12880
12881fi
12882
12883fi
12884
12885
ac50fbac 12886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the ctype macros accept non-ascii characters" >&5
3185942a 12887$as_echo_n "checking whether the ctype macros accept non-ascii characters... " >&6; }
ac50fbac 12888if ${bash_cv_func_ctype_nonascii+:} false; then :
3185942a 12889 $as_echo_n "(cached) " >&6
b80f6443 12890else
ac50fbac
CR
12891 if test "$cross_compiling" = yes; then :
12892 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5
3185942a 12893$as_echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;}
b80f6443
JA
12894 bash_cv_func_ctype_nonascii=no
12895
12896else
ac50fbac 12897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12898/* end confdefs.h. */
b80f6443
JA
12899
12900#ifdef HAVE_LOCALE_H
12901#include <locale.h>
12902#endif
12903#include <stdio.h>
12904#include <ctype.h>
12905
12906main(c, v)
12907int c;
12908char *v[];
12909{
12910 char *deflocale;
12911 unsigned char x;
12912 int r1, r2;
12913
12914#ifdef HAVE_SETLOCALE
12915 /* We take a shot here. If that locale is not known, try the
12916 system default. We try this one because '\342' (226) is
12917 known to be a printable character in that locale. */
12918 deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
12919 if (deflocale == 0)
12920 deflocale = setlocale(LC_ALL, "");
12921#endif
12922
12923 x = '\342';
12924 r1 = isprint(x);
12925 x -= 128;
12926 r2 = isprint(x);
12927 exit (r1 == 0 || r2 == 0);
12928}
12929
12930_ACEOF
ac50fbac 12931if ac_fn_c_try_run "$LINENO"; then :
b80f6443
JA
12932 bash_cv_func_ctype_nonascii=yes
12933else
ac50fbac 12934 bash_cv_func_ctype_nonascii=no
b80f6443 12935fi
ac50fbac
CR
12936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12937 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 12938fi
3185942a 12939
b80f6443
JA
12940fi
12941
ac50fbac 12942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_ctype_nonascii" >&5
3185942a 12943$as_echo "$bash_cv_func_ctype_nonascii" >&6; }
b80f6443 12944if test $bash_cv_func_ctype_nonascii = yes; then
ac50fbac 12945$as_echo "#define CTYPE_NON_ASCII 1" >>confdefs.h
ccc6cda3
JA
12946
12947fi
12948
ac50fbac 12949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5
3185942a 12950$as_echo_n "checking if dup2 fails to clear the close-on-exec flag... " >&6; }
ac50fbac 12951if ${bash_cv_dup2_broken+:} false; then :
3185942a 12952 $as_echo_n "(cached) " >&6
ccc6cda3 12953else
ac50fbac
CR
12954 if test "$cross_compiling" = yes; then :
12955 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5
3185942a 12956$as_echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;}
cce855bc 12957 bash_cv_dup2_broken=no
ccc6cda3 12958else
ac50fbac 12959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12960/* end confdefs.h. */
ccc6cda3
JA
12961
12962#include <sys/types.h>
12963#include <fcntl.h>
12964main()
12965{
12966 int fd1, fd2, fl;
12967 fd1 = open("/dev/null", 2);
12968 if (fcntl(fd1, 2, 1) < 0)
12969 exit(1);
12970 fd2 = dup2(fd1, 1);
12971 if (fd2 < 0)
12972 exit(2);
12973 fl = fcntl(fd2, 1, 0);
12974 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
12975 exit(fl != 1);
12976}
12977
f73dda09 12978_ACEOF
ac50fbac 12979if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
12980 bash_cv_dup2_broken=yes
12981else
ac50fbac 12982 bash_cv_dup2_broken=no
ccc6cda3 12983fi
ac50fbac
CR
12984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12985 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
12986fi
12987
3185942a 12988
ccc6cda3
JA
12989fi
12990
ac50fbac 12991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dup2_broken" >&5
3185942a 12992$as_echo "$bash_cv_dup2_broken" >&6; }
ccc6cda3 12993if test $bash_cv_dup2_broken = yes; then
ac50fbac 12994$as_echo "#define DUP2_BROKEN 1" >>confdefs.h
ccc6cda3
JA
12995
12996fi
12997
b80f6443 12998
ac50fbac 12999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pgrps need synchronization" >&5
3185942a 13000$as_echo_n "checking whether pgrps need synchronization... " >&6; }
ac50fbac 13001if ${bash_cv_pgrp_pipe+:} false; then :
3185942a 13002 $as_echo_n "(cached) " >&6
ccc6cda3 13003else
ac50fbac
CR
13004 if test "$cross_compiling" = yes; then :
13005 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5
3185942a 13006$as_echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;}
cce855bc 13007 bash_cv_pgrp_pipe=no
ccc6cda3 13008else
ac50fbac 13009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13010/* end confdefs.h. */
ccc6cda3
JA
13011
13012#ifdef HAVE_UNISTD_H
13013# include <unistd.h>
13014#endif
13015main()
13016{
13017# ifdef GETPGRP_VOID
13018# define getpgID() getpgrp()
13019# else
13020# define getpgID() getpgrp(0)
13021# define setpgid(x,y) setpgrp(x,y)
13022# endif
13023 int pid1, pid2, fds[2];
13024 int status;
13025 char ok;
13026
13027 switch (pid1 = fork()) {
13028 case -1:
13029 exit(1);
13030 case 0:
13031 setpgid(0, getpid());
13032 exit(0);
13033 }
13034 setpgid(pid1, pid1);
13035
13036 sleep(2); /* let first child die */
13037
13038 if (pipe(fds) < 0)
13039 exit(2);
13040
13041 switch (pid2 = fork()) {
13042 case -1:
13043 exit(3);
13044 case 0:
13045 setpgid(0, pid1);
13046 ok = getpgID() == pid1;
13047 write(fds[1], &ok, 1);
13048 exit(0);
13049 }
13050 setpgid(pid2, pid1);
13051
13052 close(fds[1]);
13053 if (read(fds[0], &ok, 1) != 1)
13054 exit(4);
13055 wait(&status);
13056 wait(&status);
13057 exit(ok ? 0 : 5);
13058}
13059
f73dda09 13060_ACEOF
ac50fbac 13061if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
13062 bash_cv_pgrp_pipe=no
13063else
ac50fbac 13064 bash_cv_pgrp_pipe=yes
ccc6cda3 13065fi
ac50fbac
CR
13066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13067 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
13068fi
13069
3185942a 13070
ccc6cda3
JA
13071fi
13072
ac50fbac 13073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_pgrp_pipe" >&5
3185942a 13074$as_echo "$bash_cv_pgrp_pipe" >&6; }
ccc6cda3 13075if test $bash_cv_pgrp_pipe = yes; then
ac50fbac 13076$as_echo "#define PGRP_PIPE 1" >>confdefs.h
ccc6cda3
JA
13077
13078fi
13079
b80f6443 13080
ac50fbac 13081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5
3185942a 13082$as_echo_n "checking for type of signal functions... " >&6; }
ac50fbac 13083if ${bash_cv_signal_vintage+:} false; then :
3185942a 13084 $as_echo_n "(cached) " >&6
ccc6cda3 13085else
f73dda09 13086
ac50fbac 13087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13088/* end confdefs.h. */
d166f048 13089#include <signal.h>
f73dda09
JA
13090int
13091main ()
13092{
d166f048
JA
13093
13094 sigset_t ss;
13095 struct sigaction sa;
13096 sigemptyset(&ss); sigsuspend(&ss);
13097 sigaction(SIGINT, &sa, (struct sigaction *) 0);
13098 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
f73dda09
JA
13099
13100 ;
13101 return 0;
13102}
13103_ACEOF
ac50fbac 13104if ac_fn_c_try_link "$LINENO"; then :
d166f048 13105 bash_cv_signal_vintage=posix
ccc6cda3 13106else
0628567a 13107
ac50fbac 13108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13109/* end confdefs.h. */
d166f048 13110#include <signal.h>
f73dda09
JA
13111int
13112main ()
13113{
d166f048
JA
13114
13115 int mask = sigmask(SIGINT);
13116 sigsetmask(mask); sigblock(mask); sigpause(mask);
f73dda09
JA
13117
13118 ;
13119 return 0;
13120}
13121_ACEOF
ac50fbac 13122if ac_fn_c_try_link "$LINENO"; then :
d166f048
JA
13123 bash_cv_signal_vintage=4.2bsd
13124else
f73dda09 13125
ac50fbac 13126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13127/* end confdefs.h. */
d166f048
JA
13128
13129 #include <signal.h>
13130 RETSIGTYPE foo() { }
f73dda09
JA
13131int
13132main ()
13133{
d166f048
JA
13134
13135 int mask = sigmask(SIGINT);
13136 sigset(SIGINT, foo); sigrelse(SIGINT);
ac50fbac
CR
13137 sighold(SIGINT); sigpause(SIGINT);
13138
13139 ;
13140 return 0;
13141}
13142_ACEOF
13143if ac_fn_c_try_link "$LINENO"; then :
d166f048
JA
13144 bash_cv_signal_vintage=svr3
13145else
ac50fbac 13146 bash_cv_signal_vintage=v7
f73dda09 13147
d166f048 13148fi
ac50fbac
CR
13149rm -f core conftest.err conftest.$ac_objext \
13150 conftest$ac_exeext conftest.$ac_ext
f73dda09 13151
d166f048 13152fi
ac50fbac
CR
13153rm -f core conftest.err conftest.$ac_objext \
13154 conftest$ac_exeext conftest.$ac_ext
d166f048
JA
13155
13156fi
ac50fbac
CR
13157rm -f core conftest.err conftest.$ac_objext \
13158 conftest$ac_exeext conftest.$ac_ext
d166f048
JA
13159
13160fi
13161
ac50fbac 13162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5
3185942a 13163$as_echo "$bash_cv_signal_vintage" >&6; }
d166f048 13164if test "$bash_cv_signal_vintage" = posix; then
ac50fbac 13165$as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
d166f048
JA
13166
13167elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
ac50fbac 13168$as_echo "#define HAVE_BSD_SIGNALS 1" >>confdefs.h
d166f048
JA
13169
13170elif test "$bash_cv_signal_vintage" = svr3; then
ac50fbac 13171$as_echo "#define HAVE_USG_SIGHOLD 1" >>confdefs.h
d166f048
JA
13172
13173fi
13174
b80f6443 13175
ac50fbac 13176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_errlist and sys_nerr" >&5
3185942a 13177$as_echo_n "checking for sys_errlist and sys_nerr... " >&6; }
ac50fbac 13178if ${bash_cv_sys_errlist+:} false; then :
3185942a 13179 $as_echo_n "(cached) " >&6
cce855bc 13180else
ac50fbac 13181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13182/* end confdefs.h. */
f73dda09
JA
13183#include <errno.h>
13184int
cce855bc
JA
13185main ()
13186{
d166f048
JA
13187extern char *sys_errlist[];
13188 extern int sys_nerr;
13189 char *msg = sys_errlist[sys_nerr - 1];
f73dda09
JA
13190 ;
13191 return 0;
13192}
13193_ACEOF
ac50fbac 13194if ac_fn_c_try_link "$LINENO"; then :
d166f048
JA
13195 bash_cv_sys_errlist=yes
13196else
ac50fbac 13197 bash_cv_sys_errlist=no
d166f048 13198fi
ac50fbac
CR
13199rm -f core conftest.err conftest.$ac_objext \
13200 conftest$ac_exeext conftest.$ac_ext
d166f048 13201fi
ac50fbac 13202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_errlist" >&5
3185942a 13203$as_echo "$bash_cv_sys_errlist" >&6; }
d166f048 13204if test $bash_cv_sys_errlist = yes; then
ac50fbac 13205$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
d166f048
JA
13206
13207fi
13208
b80f6443 13209
ac50fbac 13210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_siglist in system C library" >&5
3185942a 13211$as_echo_n "checking for sys_siglist in system C library... " >&6; }
ac50fbac 13212if ${bash_cv_sys_siglist+:} false; then :
3185942a 13213 $as_echo_n "(cached) " >&6
ccc6cda3 13214else
ac50fbac
CR
13215 if test "$cross_compiling" = yes; then :
13216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5
3185942a 13217$as_echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;}
cce855bc 13218 bash_cv_sys_siglist=no
ccc6cda3 13219else
ac50fbac 13220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13221/* end confdefs.h. */
ccc6cda3
JA
13222
13223#include <sys/types.h>
13224#include <signal.h>
13225#ifdef HAVE_UNISTD_H
13226#include <unistd.h>
13227#endif
3185942a 13228#if !HAVE_DECL_SYS_SIGLIST
ccc6cda3
JA
13229extern char *sys_siglist[];
13230#endif
13231main()
13232{
13233char *msg = sys_siglist[2];
13234exit(msg == 0);
13235}
f73dda09 13236_ACEOF
ac50fbac 13237if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
13238 bash_cv_sys_siglist=yes
13239else
ac50fbac 13240 bash_cv_sys_siglist=no
ccc6cda3 13241fi
ac50fbac
CR
13242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13243 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 13244fi
3185942a 13245
ccc6cda3 13246fi
cce855bc 13247
ac50fbac 13248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_siglist" >&5
3185942a 13249$as_echo "$bash_cv_sys_siglist" >&6; }
ccc6cda3 13250if test $bash_cv_sys_siglist = yes; then
ac50fbac 13251$as_echo "#define HAVE_SYS_SIGLIST 1" >>confdefs.h
ccc6cda3
JA
13252
13253fi
13254
ac50fbac 13255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in signal.h or unistd.h" >&5
3185942a 13256$as_echo_n "checking for _sys_siglist in signal.h or unistd.h... " >&6; }
ac50fbac 13257if ${bash_cv_decl_under_sys_siglist+:} false; then :
3185942a 13258 $as_echo_n "(cached) " >&6
e8ce775d 13259else
ac50fbac 13260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13261/* end confdefs.h. */
e8ce775d
JA
13262
13263#include <sys/types.h>
13264#include <signal.h>
13265#ifdef HAVE_UNISTD_H
13266#include <unistd.h>
13267#endif
f73dda09
JA
13268int
13269main ()
13270{
13271 char *msg = _sys_siglist[2];
13272 ;
13273 return 0;
13274}
13275_ACEOF
ac50fbac 13276if ac_fn_c_try_compile "$LINENO"; then :
e8ce775d
JA
13277 bash_cv_decl_under_sys_siglist=yes
13278else
ac50fbac 13279 bash_cv_decl_under_sys_siglist=no
e8ce775d 13280fi
3185942a 13281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e8ce775d 13282fi
ac50fbac 13283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_under_sys_siglist" >&5
3185942a 13284$as_echo "$bash_cv_decl_under_sys_siglist" >&6; }
e8ce775d 13285if test $bash_cv_decl_under_sys_siglist = yes; then
ac50fbac 13286$as_echo "#define UNDER_SYS_SIGLIST_DECLARED 1" >>confdefs.h
e8ce775d
JA
13287
13288fi
13289
b80f6443 13290
ac50fbac 13291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in system C library" >&5
3185942a 13292$as_echo_n "checking for _sys_siglist in system C library... " >&6; }
ac50fbac 13293if ${bash_cv_under_sys_siglist+:} false; then :
3185942a 13294 $as_echo_n "(cached) " >&6
ccc6cda3 13295else
ac50fbac
CR
13296 if test "$cross_compiling" = yes; then :
13297 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5
3185942a 13298$as_echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;}
cce855bc 13299 bash_cv_under_sys_siglist=no
ccc6cda3 13300else
ac50fbac 13301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13302/* end confdefs.h. */
ccc6cda3
JA
13303
13304#include <sys/types.h>
13305#include <signal.h>
13306#ifdef HAVE_UNISTD_H
13307#include <unistd.h>
13308#endif
e8ce775d 13309#ifndef UNDER_SYS_SIGLIST_DECLARED
ccc6cda3
JA
13310extern char *_sys_siglist[];
13311#endif
13312main()
13313{
e8ce775d 13314char *msg = (char *)_sys_siglist[2];
ccc6cda3
JA
13315exit(msg == 0);
13316}
f73dda09 13317_ACEOF
ac50fbac 13318if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
13319 bash_cv_under_sys_siglist=yes
13320else
ac50fbac 13321 bash_cv_under_sys_siglist=no
ccc6cda3 13322fi
ac50fbac
CR
13323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13324 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 13325fi
3185942a 13326
ccc6cda3 13327fi
cce855bc 13328
ac50fbac 13329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_under_sys_siglist" >&5
3185942a 13330$as_echo "$bash_cv_under_sys_siglist" >&6; }
ccc6cda3 13331if test $bash_cv_under_sys_siglist = yes; then
ac50fbac 13332$as_echo "#define HAVE_UNDER_SYS_SIGLIST 1" >>confdefs.h
ccc6cda3
JA
13333
13334fi
13335
b80f6443 13336
ac50fbac 13337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signal handlers are of type void" >&5
3185942a 13338$as_echo_n "checking whether signal handlers are of type void... " >&6; }
ac50fbac 13339if ${bash_cv_void_sighandler+:} false; then :
3185942a 13340 $as_echo_n "(cached) " >&6
ccc6cda3 13341else
ac50fbac 13342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13343/* end confdefs.h. */
ccc6cda3
JA
13344#include <sys/types.h>
13345#include <signal.h>
13346#ifdef signal
13347#undef signal
13348#endif
13349#ifdef __cplusplus
13350extern "C"
13351#endif
13352void (*signal ()) ();
f73dda09
JA
13353int
13354main ()
13355{
ccc6cda3 13356int i;
f73dda09
JA
13357 ;
13358 return 0;
13359}
13360_ACEOF
ac50fbac 13361if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
13362 bash_cv_void_sighandler=yes
13363else
ac50fbac 13364 bash_cv_void_sighandler=no
ccc6cda3 13365fi
3185942a 13366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 13367fi
ac50fbac 13368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_void_sighandler" >&5
3185942a 13369$as_echo "$bash_cv_void_sighandler" >&6; }
ccc6cda3 13370if test $bash_cv_void_sighandler = yes; then
ac50fbac 13371$as_echo "#define VOID_SIGHANDLER 1" >>confdefs.h
ccc6cda3
JA
13372
13373fi
13374
b80f6443
JA
13375
13376
ac50fbac 13377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
3185942a 13378$as_echo_n "checking for clock_t... " >&6; }
ac50fbac 13379if ${bash_cv_type_clock_t+:} false; then :
3185942a 13380 $as_echo_n "(cached) " >&6
ccc6cda3 13381else
ac50fbac 13382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13383/* end confdefs.h. */
ccc6cda3
JA
13384#include <sys/types.h>
13385#if STDC_HEADERS
13386#include <stdlib.h>
f73dda09
JA
13387#include <stddef.h>
13388#endif
13389#if HAVE_INTTYPES_H
13390#include <inttypes.h>
ccc6cda3 13391#endif
0001803f
CR
13392#if HAVE_STDINT_H
13393#include <stdint.h>
13394#endif
ccc6cda3
JA
13395#include <sys/times.h>
13396
f73dda09 13397_ACEOF
ccc6cda3 13398if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 13399 $EGREP "clock_t" >/dev/null 2>&1; then :
ccc6cda3
JA
13400 bash_cv_type_clock_t=yes
13401else
ccc6cda3
JA
13402 bash_cv_type_clock_t=no
13403fi
13404rm -f conftest*
13405
13406fi
13407
ac50fbac 13408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_clock_t" >&5
3185942a 13409$as_echo "$bash_cv_type_clock_t" >&6; }
ccc6cda3
JA
13410
13411if test $bash_cv_type_clock_t = no; then
b80f6443 13412 cat >>confdefs.h <<_ACEOF
ccc6cda3 13413#define clock_t long
b80f6443 13414_ACEOF
ccc6cda3
JA
13415
13416fi
13417
b80f6443
JA
13418
13419
ac50fbac 13420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset_t" >&5
3185942a 13421$as_echo_n "checking for sigset_t... " >&6; }
ac50fbac 13422if ${bash_cv_type_sigset_t+:} false; then :
3185942a 13423 $as_echo_n "(cached) " >&6
f73dda09 13424else
ac50fbac 13425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13426/* end confdefs.h. */
f73dda09
JA
13427#include <sys/types.h>
13428#if STDC_HEADERS
13429#include <stdlib.h>
13430#include <stddef.h>
13431#endif
13432#if HAVE_INTTYPES_H
13433#include <inttypes.h>
13434#endif
0001803f
CR
13435#if HAVE_STDINT_H
13436#include <stdint.h>
13437#endif
ac50fbac 13438#include <signal.h>
f73dda09
JA
13439
13440_ACEOF
13441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac
CR
13442 $EGREP "sigset_t" >/dev/null 2>&1; then :
13443 bash_cv_type_sigset_t=yes
f73dda09 13444else
ac50fbac 13445 bash_cv_type_sigset_t=no
f73dda09
JA
13446fi
13447rm -f conftest*
13448
13449fi
13450
ac50fbac
CR
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sigset_t" >&5
13452$as_echo "$bash_cv_type_sigset_t" >&6; }
f73dda09 13453
ac50fbac 13454if test $bash_cv_type_sigset_t = no; then
b80f6443 13455 cat >>confdefs.h <<_ACEOF
ac50fbac 13456#define sigset_t int
b80f6443 13457_ACEOF
f73dda09
JA
13458
13459fi
13460
0628567a 13461
f73dda09 13462
ac50fbac
CR
13463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5
13464$as_echo_n "checking for sig_atomic_t... " >&6; }
13465if ${bash_cv_type_sig_atomic_t+:} false; then :
13466 $as_echo_n "(cached) " >&6
ccc6cda3 13467else
ac50fbac 13468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13469/* end confdefs.h. */
ccc6cda3 13470#include <sys/types.h>
ac50fbac
CR
13471#if STDC_HEADERS
13472#include <stdlib.h>
13473#include <stddef.h>
ccc6cda3 13474#endif
ac50fbac
CR
13475#if HAVE_INTTYPES_H
13476#include <inttypes.h>
13477#endif
13478#if HAVE_STDINT_H
13479#include <stdint.h>
13480#endif
13481#include <signal.h>
13482
f73dda09 13483_ACEOF
ac50fbac
CR
13484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13485 $EGREP "sig_atomic_t" >/dev/null 2>&1; then :
13486 bash_cv_type_sig_atomic_t=yes
ccc6cda3 13487else
ac50fbac 13488 bash_cv_type_sig_atomic_t=no
ccc6cda3 13489fi
ac50fbac 13490rm -f conftest*
ccc6cda3
JA
13491
13492fi
13493
ac50fbac
CR
13494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5
13495$as_echo "$bash_cv_type_sig_atomic_t" >&6; }
ccc6cda3 13496
ac50fbac
CR
13497if test $bash_cv_type_sig_atomic_t = no; then
13498 cat >>confdefs.h <<_ACEOF
13499#define sig_atomic_t int
b80f6443 13500_ACEOF
ccc6cda3
JA
13501
13502fi
13503
b80f6443 13504
3185942a 13505
ac50fbac
CR
13506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for quad_t" >&5
13507$as_echo_n "checking for quad_t... " >&6; }
13508if ${bash_cv_type_quad_t+:} false; then :
13509 $as_echo_n "(cached) " >&6
ccc6cda3 13510else
ac50fbac 13511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13512/* end confdefs.h. */
ac50fbac
CR
13513#include <sys/types.h>
13514#if STDC_HEADERS
13515#include <stdlib.h>
13516#include <stddef.h>
13517#endif
13518#if HAVE_INTTYPES_H
13519#include <inttypes.h>
13520#endif
13521#if HAVE_STDINT_H
13522#include <stdint.h>
13523#endif
495aee44 13524
495aee44 13525
0628567a 13526_ACEOF
ac50fbac
CR
13527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13528 $EGREP "quad_t" >/dev/null 2>&1; then :
13529 bash_cv_type_quad_t=yes
495aee44 13530else
ac50fbac 13531 bash_cv_type_quad_t=no
f73dda09 13532fi
ac50fbac 13533rm -f conftest*
ccc6cda3
JA
13534
13535fi
13536
ac50fbac
CR
13537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_quad_t" >&5
13538$as_echo "$bash_cv_type_quad_t" >&6; }
13539if test $bash_cv_type_quad_t = yes; then
13540 $as_echo "#define HAVE_QUAD_T 1" >>confdefs.h
495aee44 13541
ac50fbac
CR
13542 fi
13543if test $bash_cv_type_quad_t = no; then
13544 cat >>confdefs.h <<_ACEOF
13545#define quad_t long
495aee44 13546_ACEOF
495aee44 13547
495aee44
CR
13548fi
13549
ac50fbac
CR
13550
13551
13552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
13553$as_echo_n "checking for intmax_t... " >&6; }
13554if ${bash_cv_type_intmax_t+:} false; then :
13555 $as_echo_n "(cached) " >&6
495aee44 13556else
ac50fbac 13557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 13558/* end confdefs.h. */
ac50fbac
CR
13559#include <sys/types.h>
13560#if STDC_HEADERS
495aee44 13561#include <stdlib.h>
ac50fbac
CR
13562#include <stddef.h>
13563#endif
13564#if HAVE_INTTYPES_H
13565#include <inttypes.h>
13566#endif
13567#if HAVE_STDINT_H
13568#include <stdint.h>
13569#endif
495aee44 13570
495aee44 13571
495aee44 13572_ACEOF
ac50fbac
CR
13573if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13574 $EGREP "intmax_t" >/dev/null 2>&1; then :
13575 bash_cv_type_intmax_t=yes
495aee44 13576else
ac50fbac 13577 bash_cv_type_intmax_t=no
495aee44 13578fi
ac50fbac 13579rm -f conftest*
495aee44 13580
ac50fbac 13581fi
495aee44 13582
ac50fbac
CR
13583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_intmax_t" >&5
13584$as_echo "$bash_cv_type_intmax_t" >&6; }
495aee44 13585
ac50fbac
CR
13586if test $bash_cv_type_intmax_t = no; then
13587 cat >>confdefs.h <<_ACEOF
13588#define intmax_t $bash_cv_type_long_long
495aee44
CR
13589_ACEOF
13590
ac50fbac 13591fi
495aee44
CR
13592
13593
13594
ac50fbac
CR
13595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintmax_t" >&5
13596$as_echo_n "checking for uintmax_t... " >&6; }
13597if ${bash_cv_type_uintmax_t+:} false; then :
495aee44
CR
13598 $as_echo_n "(cached) " >&6
13599else
ac50fbac 13600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 13601/* end confdefs.h. */
495aee44 13602#include <sys/types.h>
ac50fbac
CR
13603#if STDC_HEADERS
13604#include <stdlib.h>
13605#include <stddef.h>
13606#endif
13607#if HAVE_INTTYPES_H
13608#include <inttypes.h>
13609#endif
13610#if HAVE_STDINT_H
13611#include <stdint.h>
13612#endif
495aee44
CR
13613
13614
495aee44 13615_ACEOF
ac50fbac
CR
13616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13617 $EGREP "uintmax_t" >/dev/null 2>&1; then :
13618 bash_cv_type_uintmax_t=yes
495aee44 13619else
ac50fbac
CR
13620 bash_cv_type_uintmax_t=no
13621fi
13622rm -f conftest*
13623
13624fi
13625
13626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_uintmax_t" >&5
13627$as_echo "$bash_cv_type_uintmax_t" >&6; }
495aee44 13628
ac50fbac
CR
13629if test $bash_cv_type_uintmax_t = no; then
13630 cat >>confdefs.h <<_ACEOF
13631#define uintmax_t $bash_cv_type_unsigned_long_long
495aee44 13632_ACEOF
495aee44 13633
ac50fbac
CR
13634fi
13635
13636if test "$ac_cv_header_sys_socket_h" = "yes"; then
495aee44
CR
13637
13638
ac50fbac
CR
13639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
13640$as_echo_n "checking for socklen_t... " >&6; }
13641if ${bash_cv_type_socklen_t+:} false; then :
13642 $as_echo_n "(cached) " >&6
495aee44 13643else
ac50fbac
CR
13644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13645/* end confdefs.h. */
13646#include <sys/types.h>
13647#if STDC_HEADERS
13648#include <stdlib.h>
13649#include <stddef.h>
13650#endif
13651#if HAVE_INTTYPES_H
13652#include <inttypes.h>
13653#endif
13654#if HAVE_STDINT_H
13655#include <stdint.h>
13656#endif
13657#include <sys/socket.h>
495aee44 13658
ac50fbac
CR
13659_ACEOF
13660if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13661 $EGREP "socklen_t" >/dev/null 2>&1; then :
13662 bash_cv_type_socklen_t=yes
13663else
13664 bash_cv_type_socklen_t=no
495aee44 13665fi
ac50fbac 13666rm -f conftest*
495aee44 13667
495aee44
CR
13668fi
13669
ac50fbac
CR
13670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_socklen_t" >&5
13671$as_echo "$bash_cv_type_socklen_t" >&6; }
13672if test $bash_cv_type_socklen_t = yes; then
13673 $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
13674
13675 fi
13676if test $bash_cv_type_socklen_t = no; then
13677 cat >>confdefs.h <<_ACEOF
13678#define socklen_t unsigned int
495aee44
CR
13679_ACEOF
13680
13681fi
13682
ac50fbac
CR
13683fi
13684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size and type of struct rlimit fields" >&5
13685$as_echo_n "checking for size and type of struct rlimit fields... " >&6; }
13686if ${bash_cv_type_rlimit+:} false; then :
495aee44
CR
13687 $as_echo_n "(cached) " >&6
13688else
ac50fbac 13689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 13690/* end confdefs.h. */
495aee44 13691#include <sys/types.h>
ac50fbac 13692#include <sys/resource.h>
495aee44
CR
13693int
13694main ()
13695{
ac50fbac 13696rlim_t xxx;
495aee44
CR
13697 ;
13698 return 0;
13699}
13700_ACEOF
ac50fbac
CR
13701if ac_fn_c_try_compile "$LINENO"; then :
13702 bash_cv_type_rlimit=rlim_t
495aee44 13703else
495aee44 13704
ac50fbac
CR
13705if test "$cross_compiling" = yes; then :
13706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5
13707$as_echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&2;}
13708 bash_cv_type_rlimit=long
13709else
13710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44
CR
13711/* end confdefs.h. */
13712
13713#include <sys/types.h>
ac50fbac
CR
13714#include <sys/time.h>
13715#include <sys/resource.h>
13716main()
495aee44 13717{
ac50fbac
CR
13718#ifdef HAVE_QUAD_T
13719 struct rlimit rl;
13720 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
13721 exit(0);
13722#endif
13723 exit(1);
495aee44
CR
13724}
13725_ACEOF
ac50fbac
CR
13726if ac_fn_c_try_run "$LINENO"; then :
13727 bash_cv_type_rlimit=quad_t
495aee44 13728else
ac50fbac
CR
13729 bash_cv_type_rlimit=long
13730fi
13731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13732 conftest.$ac_objext conftest.beam conftest.$ac_ext
13733fi
13734
13735fi
13736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13737
13738fi
13739
13740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_rlimit" >&5
13741$as_echo "$bash_cv_type_rlimit" >&6; }
13742if test $bash_cv_type_rlimit = quad_t; then
13743$as_echo "#define RLIMTYPE quad_t" >>confdefs.h
13744
13745elif test $bash_cv_type_rlimit = rlim_t; then
13746$as_echo "#define RLIMTYPE rlim_t" >>confdefs.h
13747
13748fi
13749
13750
13751# The cast to long int works around a bug in the HP C Compiler
13752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13754# This bug is HP SR number 8606223364.
13755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5
13756$as_echo_n "checking size of intmax_t... " >&6; }
13757if ${ac_cv_sizeof_intmax_t+:} false; then :
13758 $as_echo_n "(cached) " >&6
13759else
13760 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default"; then :
495aee44 13761
ac50fbac
CR
13762else
13763 if test "$ac_cv_type_intmax_t" = yes; then
13764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13766as_fn_error 77 "cannot compute sizeof (intmax_t)
13767See \`config.log' for more details" "$LINENO" 5; }
13768 else
13769 ac_cv_sizeof_intmax_t=0
13770 fi
495aee44
CR
13771fi
13772
495aee44 13773fi
ac50fbac
CR
13774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5
13775$as_echo "$ac_cv_sizeof_intmax_t" >&6; }
495aee44 13776
ac50fbac
CR
13777
13778
13779cat >>confdefs.h <<_ACEOF
13780#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t
495aee44
CR
13781_ACEOF
13782
ac50fbac
CR
13783
13784
13785
13786ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" "
13787#include <sys/types.h>
13788#include <termios.h>
13789
13790"
13791if test "x$ac_cv_member_struct_termios_c_line" = xyes; then :
13792 $as_echo "#define TERMIOS_LDISC 1" >>confdefs.h
13793
13794fi
13795
13796
13797
13798ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" "
13799#include <sys/types.h>
13800#include <termio.h>
13801
13802"
13803if test "x$ac_cv_member_struct_termio_c_line" = xyes; then :
13804 $as_echo "#define TERMIO_LDISC 1" >>confdefs.h
13805
495aee44
CR
13806fi
13807
13808
13809
ac50fbac 13810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5
495aee44 13811$as_echo_n "checking for struct dirent.d_ino... " >&6; }
ac50fbac 13812if ${bash_cv_dirent_has_dino+:} false; then :
495aee44 13813 $as_echo_n "(cached) " >&6
ccc6cda3 13814else
ac50fbac 13815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13816/* end confdefs.h. */
ccc6cda3
JA
13817
13818#include <stdio.h>
13819#include <sys/types.h>
13820#ifdef HAVE_UNISTD_H
13821# include <unistd.h>
13822#endif /* HAVE_UNISTD_H */
13823#if defined(HAVE_DIRENT_H)
13824# include <dirent.h>
13825#else
13826# define dirent direct
13827# ifdef HAVE_SYS_NDIR_H
13828# include <sys/ndir.h>
13829# endif /* SYSNDIR */
13830# ifdef HAVE_SYS_DIR_H
13831# include <sys/dir.h>
13832# endif /* SYSDIR */
13833# ifdef HAVE_NDIR_H
13834# include <ndir.h>
13835# endif
13836#endif /* HAVE_DIRENT_H */
13837
f73dda09
JA
13838int
13839main ()
13840{
ccc6cda3
JA
13841
13842struct dirent d; int z; z = d.d_ino;
13843
f73dda09
JA
13844 ;
13845 return 0;
13846}
13847_ACEOF
ac50fbac 13848if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
13849 bash_cv_dirent_has_dino=yes
13850else
ac50fbac 13851 bash_cv_dirent_has_dino=no
ccc6cda3 13852fi
3185942a 13853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
13854fi
13855
ac50fbac 13856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_dino" >&5
3185942a 13857$as_echo "$bash_cv_dirent_has_dino" >&6; }
ccc6cda3 13858if test $bash_cv_dirent_has_dino = yes; then
ac50fbac 13859$as_echo "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h
ccc6cda3
JA
13860
13861fi
13862
b80f6443 13863
ac50fbac 13864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5
3185942a 13865$as_echo_n "checking for struct dirent.d_fileno... " >&6; }
ac50fbac 13866if ${bash_cv_dirent_has_d_fileno+:} false; then :
3185942a 13867 $as_echo_n "(cached) " >&6
d166f048 13868else
ac50fbac 13869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13870/* end confdefs.h. */
d166f048
JA
13871
13872#include <stdio.h>
13873#include <sys/types.h>
13874#ifdef HAVE_UNISTD_H
13875# include <unistd.h>
13876#endif /* HAVE_UNISTD_H */
13877#if defined(HAVE_DIRENT_H)
13878# include <dirent.h>
13879#else
13880# define dirent direct
13881# ifdef HAVE_SYS_NDIR_H
13882# include <sys/ndir.h>
13883# endif /* SYSNDIR */
13884# ifdef HAVE_SYS_DIR_H
13885# include <sys/dir.h>
13886# endif /* SYSDIR */
13887# ifdef HAVE_NDIR_H
13888# include <ndir.h>
13889# endif
13890#endif /* HAVE_DIRENT_H */
13891
f73dda09
JA
13892int
13893main ()
13894{
d166f048
JA
13895
13896struct dirent d; int z; z = d.d_fileno;
13897
f73dda09
JA
13898 ;
13899 return 0;
13900}
13901_ACEOF
ac50fbac 13902if ac_fn_c_try_compile "$LINENO"; then :
d166f048
JA
13903 bash_cv_dirent_has_d_fileno=yes
13904else
ac50fbac 13905 bash_cv_dirent_has_d_fileno=no
d166f048 13906fi
3185942a 13907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
13908fi
13909
ac50fbac 13910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5
3185942a 13911$as_echo "$bash_cv_dirent_has_d_fileno" >&6; }
d166f048 13912if test $bash_cv_dirent_has_d_fileno = yes; then
ac50fbac 13913$as_echo "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h
b80f6443
JA
13914
13915fi
13916
13917
ac50fbac 13918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_namlen" >&5
3185942a 13919$as_echo_n "checking for struct dirent.d_namlen... " >&6; }
ac50fbac 13920if ${bash_cv_dirent_has_d_namlen+:} false; then :
3185942a 13921 $as_echo_n "(cached) " >&6
b80f6443 13922else
ac50fbac 13923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13924/* end confdefs.h. */
b80f6443
JA
13925
13926#include <stdio.h>
13927#include <sys/types.h>
13928#ifdef HAVE_UNISTD_H
13929# include <unistd.h>
13930#endif /* HAVE_UNISTD_H */
13931#if defined(HAVE_DIRENT_H)
13932# include <dirent.h>
13933#else
13934# define dirent direct
13935# ifdef HAVE_SYS_NDIR_H
13936# include <sys/ndir.h>
13937# endif /* SYSNDIR */
13938# ifdef HAVE_SYS_DIR_H
13939# include <sys/dir.h>
13940# endif /* SYSDIR */
13941# ifdef HAVE_NDIR_H
13942# include <ndir.h>
13943# endif
13944#endif /* HAVE_DIRENT_H */
13945
13946int
13947main ()
13948{
13949
13950struct dirent d; int z; z = d.d_namlen;
13951
13952 ;
13953 return 0;
13954}
13955_ACEOF
ac50fbac 13956if ac_fn_c_try_compile "$LINENO"; then :
b80f6443
JA
13957 bash_cv_dirent_has_d_namlen=yes
13958else
ac50fbac 13959 bash_cv_dirent_has_d_namlen=no
d166f048 13960fi
3185942a 13961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b80f6443
JA
13962fi
13963
ac50fbac 13964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_namlen" >&5
3185942a 13965$as_echo "$bash_cv_dirent_has_d_namlen" >&6; }
b80f6443 13966if test $bash_cv_dirent_has_d_namlen = yes; then
ac50fbac 13967$as_echo "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h
d166f048 13968
b80f6443
JA
13969fi
13970
ac50fbac 13971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5
3185942a 13972$as_echo_n "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; }
ac50fbac 13973if ${bash_cv_struct_winsize_header+:} false; then :
3185942a 13974 $as_echo_n "(cached) " >&6
d166f048 13975else
ac50fbac 13976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13977/* end confdefs.h. */
d166f048
JA
13978#include <sys/types.h>
13979#include <sys/ioctl.h>
f73dda09
JA
13980int
13981main ()
13982{
d166f048 13983struct winsize x;
f73dda09
JA
13984 ;
13985 return 0;
13986}
13987_ACEOF
ac50fbac 13988if ac_fn_c_try_compile "$LINENO"; then :
cce855bc
JA
13989 bash_cv_struct_winsize_header=ioctl_h
13990else
ac50fbac 13991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13992/* end confdefs.h. */
cce855bc
JA
13993#include <sys/types.h>
13994#include <termios.h>
f73dda09
JA
13995int
13996main ()
13997{
cce855bc 13998struct winsize x;
f73dda09
JA
13999 ;
14000 return 0;
14001}
14002_ACEOF
ac50fbac 14003if ac_fn_c_try_compile "$LINENO"; then :
cce855bc 14004 bash_cv_struct_winsize_header=termios_h
d166f048 14005else
ac50fbac 14006 bash_cv_struct_winsize_header=other
cce855bc 14007fi
3185942a 14008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cce855bc 14009
d166f048 14010fi
3185942a 14011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
14012fi
14013
cce855bc 14014if test $bash_cv_struct_winsize_header = ioctl_h; then
ac50fbac 14015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5
3185942a 14016$as_echo "sys/ioctl.h" >&6; }
ac50fbac 14017 $as_echo "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h
d166f048 14018
cce855bc 14019elif test $bash_cv_struct_winsize_header = termios_h; then
ac50fbac 14020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5
3185942a 14021$as_echo "termios.h" >&6; }
ac50fbac 14022 $as_echo "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h
d166f048 14023
0628567a 14024else
ac50fbac
CR
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14026$as_echo "not found" >&6; }
14027fi
0628567a 14028
ac50fbac
CR
14029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5
14030$as_echo_n "checking for struct timeval in sys/time.h and time.h... " >&6; }
14031if ${bash_cv_struct_timeval+:} false; then :
14032 $as_echo_n "(cached) " >&6
14033else
14034
14035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14036/* end confdefs.h. */
ac50fbac 14037#include <sys/time.h>
0628567a 14038
ac50fbac
CR
14039_ACEOF
14040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14041 $EGREP "struct timeval" >/dev/null 2>&1; then :
14042 bash_cv_struct_timeval=yes
14043else
14044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14045/* end confdefs.h. */
14046#include <time.h>
0628567a 14047
0628567a 14048_ACEOF
ac50fbac
CR
14049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14050 $EGREP "struct timeval" >/dev/null 2>&1; then :
14051 bash_cv_struct_timeval=yes
b80f6443 14052else
ac50fbac
CR
14053 bash_cv_struct_timeval=no
14054fi
14055rm -f conftest*
0628567a 14056
7117c2d2 14057fi
ac50fbac
CR
14058rm -f conftest*
14059
3185942a 14060
0628567a 14061fi
3185942a 14062
ac50fbac
CR
14063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timeval" >&5
14064$as_echo "$bash_cv_struct_timeval" >&6; }
14065if test $bash_cv_struct_timeval = yes; then
14066 $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
14067
7117c2d2 14068fi
ac50fbac
CR
14069
14070ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
14071if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
7117c2d2 14072
b80f6443 14073cat >>confdefs.h <<_ACEOF
ac50fbac 14074#define HAVE_STRUCT_STAT_ST_BLOCKS 1
b80f6443
JA
14075_ACEOF
14076
7117c2d2
JA
14077
14078fi
14079
ac50fbac
CR
14080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14081$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14082if ${ac_cv_struct_tm+:} false; then :
3185942a
JA
14083 $as_echo_n "(cached) " >&6
14084else
ac50fbac 14085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 14086/* end confdefs.h. */
ac50fbac 14087#include <sys/types.h>
3185942a
JA
14088#include <time.h>
14089
14090int
14091main ()
14092{
ac50fbac
CR
14093struct tm tm;
14094 int *p = &tm.tm_sec;
14095 return !p;
3185942a
JA
14096 ;
14097 return 0;
14098}
14099_ACEOF
ac50fbac
CR
14100if ac_fn_c_try_compile "$LINENO"; then :
14101 ac_cv_struct_tm=time.h
3185942a 14102else
ac50fbac 14103 ac_cv_struct_tm=sys/time.h
3185942a 14104fi
3185942a
JA
14105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14106fi
ac50fbac
CR
14107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14108$as_echo "$ac_cv_struct_tm" >&6; }
14109if test $ac_cv_struct_tm = sys/time.h; then
14110
14111$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14112
14113fi
14114
14115ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14116#include <$ac_cv_struct_tm>
14117
14118"
14119if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
3185942a
JA
14120
14121cat >>confdefs.h <<_ACEOF
ac50fbac 14122#define HAVE_STRUCT_TM_TM_ZONE 1
3185942a
JA
14123_ACEOF
14124
14125
ac50fbac 14126fi
3185942a 14127
ac50fbac
CR
14128if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14129
14130$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
3185942a 14131
ac50fbac
CR
14132else
14133 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14134"
14135if test "x$ac_cv_have_decl_tzname" = xyes; then :
14136 ac_have_decl=1
14137else
14138 ac_have_decl=0
3185942a
JA
14139fi
14140
ac50fbac
CR
14141cat >>confdefs.h <<_ACEOF
14142#define HAVE_DECL_TZNAME $ac_have_decl
14143_ACEOF
3185942a 14144
ac50fbac 14145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
3185942a 14146$as_echo_n "checking for tzname... " >&6; }
ac50fbac 14147if ${ac_cv_var_tzname+:} false; then :
3185942a 14148 $as_echo_n "(cached) " >&6
7117c2d2 14149else
ac50fbac 14150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14151/* end confdefs.h. */
7117c2d2 14152#include <time.h>
3185942a
JA
14153#if !HAVE_DECL_TZNAME
14154extern char *tzname[];
7117c2d2
JA
14155#endif
14156
14157int
14158main ()
14159{
3185942a 14160return tzname[0][0];
7117c2d2
JA
14161 ;
14162 return 0;
14163}
14164_ACEOF
ac50fbac 14165if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
14166 ac_cv_var_tzname=yes
14167else
ac50fbac 14168 ac_cv_var_tzname=no
7117c2d2 14169fi
ac50fbac
CR
14170rm -f core conftest.err conftest.$ac_objext \
14171 conftest$ac_exeext conftest.$ac_ext
7117c2d2 14172fi
ac50fbac 14173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
3185942a 14174$as_echo "$ac_cv_var_tzname" >&6; }
7117c2d2
JA
14175 if test $ac_cv_var_tzname = yes; then
14176
ac50fbac 14177$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
7117c2d2
JA
14178
14179 fi
14180fi
14181
ac50fbac 14182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timezone in sys/time.h and time.h" >&5
3185942a 14183$as_echo_n "checking for struct timezone in sys/time.h and time.h... " >&6; }
ac50fbac 14184if ${bash_cv_struct_timezone+:} false; then :
3185942a 14185 $as_echo_n "(cached) " >&6
b80f6443
JA
14186else
14187
ac50fbac 14188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14189/* end confdefs.h. */
b80f6443
JA
14190#include <sys/time.h>
14191
14192_ACEOF
14193if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 14194 $EGREP "struct timezone" >/dev/null 2>&1; then :
b80f6443
JA
14195 bash_cv_struct_timezone=yes
14196else
ac50fbac 14197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14198/* end confdefs.h. */
b80f6443
JA
14199#include <time.h>
14200
14201_ACEOF
14202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 14203 $EGREP "struct timezone" >/dev/null 2>&1; then :
b80f6443
JA
14204 bash_cv_struct_timezone=yes
14205else
14206 bash_cv_struct_timezone=no
14207fi
14208rm -f conftest*
14209
14210fi
14211rm -f conftest*
14212
14213
14214fi
14215
ac50fbac 14216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timezone" >&5
3185942a 14217$as_echo "$bash_cv_struct_timezone" >&6; }
b80f6443 14218if test $bash_cv_struct_timezone = yes; then
ac50fbac 14219 $as_echo "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h
b80f6443
JA
14220
14221fi
14222
14223
ac50fbac 14224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for offset of exit status in return status from wait" >&5
495aee44 14225$as_echo_n "checking for offset of exit status in return status from wait... " >&6; }
ac50fbac 14226if ${bash_cv_wexitstatus_offset+:} false; then :
495aee44
CR
14227 $as_echo_n "(cached) " >&6
14228else
ac50fbac
CR
14229 if test "$cross_compiling" = yes; then :
14230 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&5
495aee44
CR
14231$as_echo "$as_me: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&2;}
14232 bash_cv_wexitstatus_offset=0
14233
14234else
ac50fbac
CR
14235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14236/* end confdefs.h. */
495aee44
CR
14237
14238#include <stdlib.h>
14239#include <unistd.h>
14240
14241#include <sys/wait.h>
14242
14243main(c, v)
14244 int c;
14245 char **v;
14246{
14247 pid_t pid, p;
14248 int s, i, n;
14249
14250 s = 0;
14251 pid = fork();
14252 if (pid == 0)
14253 exit (42);
14254
14255 /* wait for the process */
14256 p = wait(&s);
14257 if (p != pid)
14258 exit (255);
14259
14260 /* crack s */
14261 for (i = 0; i < (sizeof(s) - 8); i++)
14262 {
14263 n = (s >> i) & 0xff;
14264 if (n == 42)
14265 exit (i);
14266 }
14267
14268 exit (254);
14269}
14270
14271_ACEOF
ac50fbac 14272if ac_fn_c_try_run "$LINENO"; then :
495aee44
CR
14273 bash_cv_wexitstatus_offset=0
14274else
ac50fbac
CR
14275 bash_cv_wexitstatus_offset=$?
14276fi
14277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14278 conftest.$ac_objext conftest.beam conftest.$ac_ext
14279fi
14280
14281fi
14282
14283if test "$bash_cv_wexitstatus_offset" -gt 32 ; then
14284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad exit status from test program -- defaulting to 0" >&5
14285$as_echo "$as_me: WARNING: bad exit status from test program -- defaulting to 0" >&2;}
14286 bash_cv_wexitstatus_offset=0
14287fi
14288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wexitstatus_offset" >&5
14289$as_echo "$bash_cv_wexitstatus_offset" >&6; }
14290
14291cat >>confdefs.h <<_ACEOF
14292#define WEXITSTATUS_OFFSET $bash_cv_wexitstatus_offset
14293_ACEOF
14294
14295
14296
14297
14298
14299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
14300$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
14301if ${bash_cv_sys_struct_timespec_in_time_h+:} false; then :
14302 $as_echo_n "(cached) " >&6
14303else
14304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14305/* end confdefs.h. */
14306#include <time.h>
14307
14308int
14309main ()
14310{
14311static struct timespec x; x.tv_sec = x.tv_nsec;
14312 ;
14313 return 0;
14314}
14315_ACEOF
14316if ac_fn_c_try_compile "$LINENO"; then :
14317 bash_cv_sys_struct_timespec_in_time_h=yes
14318else
14319 bash_cv_sys_struct_timespec_in_time_h=no
14320fi
14321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14322fi
14323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_time_h" >&5
14324$as_echo "$bash_cv_sys_struct_timespec_in_time_h" >&6; }
14325
14326 HAVE_STRUCT_TIMESPEC=0
14327 TIME_H_DEFINES_STRUCT_TIMESPEC=0
14328 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
14329 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
14330 if test $bash_cv_sys_struct_timespec_in_time_h = yes; then
14331 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
14332
14333 $as_echo "#define TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
14334
14335 TIME_H_DEFINES_STRUCT_TIMESPEC=1
14336 else
14337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
14338$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
14339if ${bash_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
14340 $as_echo_n "(cached) " >&6
14341else
14342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14343/* end confdefs.h. */
14344#include <sys/time.h>
14345
14346int
14347main ()
14348{
14349static struct timespec x; x.tv_sec = x.tv_nsec;
14350 ;
14351 return 0;
14352}
14353_ACEOF
14354if ac_fn_c_try_compile "$LINENO"; then :
14355 bash_cv_sys_struct_timespec_in_sys_time_h=yes
14356else
14357 bash_cv_sys_struct_timespec_in_sys_time_h=no
14358fi
14359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14360fi
14361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_sys_time_h" >&5
14362$as_echo "$bash_cv_sys_struct_timespec_in_sys_time_h" >&6; }
14363 if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then
14364 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
14365 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
14366
14367 $as_echo "#define SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
14368
14369 else
14370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
14371$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
14372if ${bash_cv_sys_struct_timespec_in_pthread_h+:} false; then :
14373 $as_echo_n "(cached) " >&6
14374else
14375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14376/* end confdefs.h. */
14377#include <pthread.h>
14378
14379int
14380main ()
14381{
14382static struct timespec x; x.tv_sec = x.tv_nsec;
14383 ;
14384 return 0;
14385}
14386_ACEOF
14387if ac_fn_c_try_compile "$LINENO"; then :
14388 bash_cv_sys_struct_timespec_in_pthread_h=yes
14389else
14390 bash_cv_sys_struct_timespec_in_pthread_h=no
14391fi
14392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14393fi
14394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_pthread_h" >&5
14395$as_echo "$bash_cv_sys_struct_timespec_in_pthread_h" >&6; }
14396 if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then
14397 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
14398 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
14399
14400 $as_echo "#define PTHREAD_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
14401
14402 fi
14403 fi
14404 fi
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414 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>
14415 #include <sys/stat.h>
14416"
14417if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
14418
14419cat >>confdefs.h <<_ACEOF
14420#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
14421_ACEOF
14422
14423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
14424$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
14425if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
14426 $as_echo_n "(cached) " >&6
14427else
14428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14429/* end confdefs.h. */
14430
14431 #include <sys/types.h>
14432 #include <sys/stat.h>
14433 #if HAVE_SYS_TIME_H
14434 # include <sys/time.h>
14435 #endif
14436 #include <time.h>
14437 struct timespec ts;
14438 struct stat st;
14439
14440int
14441main ()
14442{
14443
14444 st.st_atim = ts;
14445
14446 ;
14447 return 0;
14448}
14449_ACEOF
14450if ac_fn_c_try_compile "$LINENO"; then :
14451 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
14452else
14453 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
14454fi
14455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14456fi
14457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
14458$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
14459 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
14460
14461$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
14462
14463 fi
14464else
14465 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>
14466 #include <sys/stat.h>
14467"
14468if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
14469
14470cat >>confdefs.h <<_ACEOF
14471#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
14472_ACEOF
14473
14474
14475else
14476 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
14477 #include <sys/stat.h>
14478"
14479if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
14480
14481cat >>confdefs.h <<_ACEOF
14482#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
14483_ACEOF
14484
14485
14486else
14487 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>
14488 #include <sys/stat.h>
14489"
14490if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
495aee44 14491
ac50fbac
CR
14492cat >>confdefs.h <<_ACEOF
14493#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
14494_ACEOF
495aee44
CR
14495
14496
14497fi
14498
495aee44 14499fi
495aee44 14500
ac50fbac
CR
14501fi
14502
14503fi
495aee44
CR
14504
14505
14506
d233b485
CR
14507
14508
14509
14510
14511 if test X$ac_cv_func_sbrk = Xyes; then
14512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sbrk" >&5
14513$as_echo_n "checking for working sbrk... " >&6; }
14514if ${bash_cv_func_sbrk+:} false; then :
14515 $as_echo_n "(cached) " >&6
14516else
14517 if test "$cross_compiling" = yes; then :
14518 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check working sbrk if cross-compiling" >&5
14519$as_echo "$as_me: WARNING: cannot check working sbrk if cross-compiling" >&2;}
14520 bash_cv_func_sbrk=yes
14521
14522else
14523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14524/* end confdefs.h. */
14525
14526#include <stdlib.h>
14527#include <unistd.h>
14528
14529int
14530main(int c, char **v)
14531{
14532 void *x;
14533
14534 x = sbrk (4096);
14535 exit ((x == (void *)-1) ? 1 : 0);
14536}
14537
14538_ACEOF
14539if ac_fn_c_try_run "$LINENO"; then :
14540 bash_cv_func_sbrk=yes
14541else
14542 bash_cv_func_snprintf=sbrk
14543fi
14544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14545 conftest.$ac_objext conftest.beam conftest.$ac_ext
14546fi
14547
14548fi
14549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sbrk" >&5
14550$as_echo "$bash_cv_func_sbrk" >&6; }
14551 if test $bash_cv_func_sbrk = no; then
14552 ac_cv_func_sbrk=no
14553 fi
14554 fi
14555 if test $ac_cv_func_sbrk = no; then
14556
14557$as_echo "#define HAVE_SBRK 0" >>confdefs.h
14558
14559 fi
14560
14561
ac50fbac 14562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5
3185942a 14563$as_echo_n "checking for the existence of strsignal... " >&6; }
ac50fbac 14564if ${bash_cv_have_strsignal+:} false; then :
3185942a 14565 $as_echo_n "(cached) " >&6
ccc6cda3 14566else
ac50fbac 14567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14568/* end confdefs.h. */
ccc6cda3
JA
14569#include <sys/types.h>
14570#include <signal.h>
f73dda09
JA
14571int
14572main ()
14573{
ccc6cda3 14574char *s = (char *)strsignal(2);
f73dda09
JA
14575 ;
14576 return 0;
14577}
14578_ACEOF
ac50fbac 14579if ac_fn_c_try_link "$LINENO"; then :
ccc6cda3
JA
14580 bash_cv_have_strsignal=yes
14581else
ac50fbac 14582 bash_cv_have_strsignal=no
ccc6cda3 14583fi
ac50fbac
CR
14584rm -f core conftest.err conftest.$ac_objext \
14585 conftest$ac_exeext conftest.$ac_ext
ccc6cda3
JA
14586fi
14587
ac50fbac 14588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_strsignal" >&5
3185942a 14589$as_echo "$bash_cv_have_strsignal" >&6; }
ccc6cda3 14590if test $bash_cv_have_strsignal = yes; then
ac50fbac 14591$as_echo "#define HAVE_STRSIGNAL 1" >>confdefs.h
ccc6cda3
JA
14592
14593fi
14594
ac50fbac 14595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if opendir() opens non-directories" >&5
3185942a 14596$as_echo_n "checking if opendir() opens non-directories... " >&6; }
ac50fbac 14597if ${bash_cv_opendir_not_robust+:} false; then :
3185942a 14598 $as_echo_n "(cached) " >&6
ccc6cda3 14599else
ac50fbac
CR
14600 if test "$cross_compiling" = yes; then :
14601 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5
3185942a 14602$as_echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14603 bash_cv_opendir_not_robust=no
14604
ccc6cda3 14605else
ac50fbac 14606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14607/* end confdefs.h. */
ccc6cda3
JA
14608
14609#include <stdio.h>
14610#include <sys/types.h>
14611#include <fcntl.h>
14612#ifdef HAVE_UNISTD_H
14613# include <unistd.h>
14614#endif /* HAVE_UNISTD_H */
14615#if defined(HAVE_DIRENT_H)
14616# include <dirent.h>
14617#else
14618# define dirent direct
14619# ifdef HAVE_SYS_NDIR_H
14620# include <sys/ndir.h>
14621# endif /* SYSNDIR */
14622# ifdef HAVE_SYS_DIR_H
14623# include <sys/dir.h>
14624# endif /* SYSDIR */
14625# ifdef HAVE_NDIR_H
14626# include <ndir.h>
14627# endif
14628#endif /* HAVE_DIRENT_H */
14629main()
14630{
14631DIR *dir;
bb70624e 14632int fd, err;
3185942a 14633err = mkdir("bash-aclocal", 0700);
bb70624e
JA
14634if (err < 0) {
14635 perror("mkdir");
14636 exit(1);
14637}
3185942a
JA
14638unlink("bash-aclocal/not_a_directory");
14639fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
ccc6cda3
JA
14640write(fd, "\n", 1);
14641close(fd);
3185942a
JA
14642dir = opendir("bash-aclocal/not_a_directory");
14643unlink("bash-aclocal/not_a_directory");
14644rmdir("bash-aclocal");
ccc6cda3
JA
14645exit (dir == 0);
14646}
f73dda09 14647_ACEOF
ac50fbac 14648if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14649 bash_cv_opendir_not_robust=yes
14650else
ac50fbac 14651 bash_cv_opendir_not_robust=no
ccc6cda3 14652fi
ac50fbac
CR
14653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14654 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14655fi
3185942a 14656
ccc6cda3
JA
14657fi
14658
ac50fbac 14659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_opendir_not_robust" >&5
3185942a 14660$as_echo "$bash_cv_opendir_not_robust" >&6; }
ccc6cda3 14661if test $bash_cv_opendir_not_robust = yes; then
ac50fbac 14662$as_echo "#define OPENDIR_NOT_ROBUST 1" >>confdefs.h
ccc6cda3
JA
14663
14664fi
14665
ac50fbac 14666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ulimit can substitute for getdtablesize" >&5
3185942a 14667$as_echo_n "checking whether ulimit can substitute for getdtablesize... " >&6; }
ac50fbac 14668if ${bash_cv_ulimit_maxfds+:} false; then :
3185942a 14669 $as_echo_n "(cached) " >&6
ccc6cda3 14670else
ac50fbac
CR
14671 if test "$cross_compiling" = yes; then :
14672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5
3185942a 14673$as_echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14674 bash_cv_ulimit_maxfds=no
14675
ccc6cda3 14676else
ac50fbac 14677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14678/* end confdefs.h. */
ccc6cda3
JA
14679
14680main()
14681{
14682long maxfds = ulimit(4, 0L);
14683exit (maxfds == -1L);
14684}
14685
f73dda09 14686_ACEOF
ac50fbac 14687if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14688 bash_cv_ulimit_maxfds=yes
14689else
ac50fbac 14690 bash_cv_ulimit_maxfds=no
3185942a 14691fi
ac50fbac
CR
14692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14693 conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a
JA
14694fi
14695
3185942a
JA
14696fi
14697
ac50fbac 14698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_ulimit_maxfds" >&5
3185942a
JA
14699$as_echo "$bash_cv_ulimit_maxfds" >&6; }
14700if test $bash_cv_ulimit_maxfds = yes; then
ac50fbac 14701$as_echo "#define ULIMIT_MAXFDS 1" >>confdefs.h
3185942a
JA
14702
14703fi
14704
14705
14706
14707
14708
14709
14710
14711
ac50fbac
CR
14712 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
14713"
14714if test "x$ac_cv_have_decl_fpurge" = xyes; then :
14715 ac_have_decl=1
3185942a 14716else
ac50fbac 14717 ac_have_decl=0
ccc6cda3
JA
14718fi
14719
3185942a 14720cat >>confdefs.h <<_ACEOF
ac50fbac 14721#define HAVE_DECL_FPURGE $ac_have_decl
b80f6443 14722_ACEOF
ccc6cda3 14723
3185942a 14724
ac50fbac 14725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if getenv can be redefined" >&5
3185942a 14726$as_echo_n "checking to see if getenv can be redefined... " >&6; }
ac50fbac 14727if ${bash_cv_getenv_redef+:} false; then :
3185942a 14728 $as_echo_n "(cached) " >&6
ccc6cda3 14729else
ac50fbac
CR
14730 if test "$cross_compiling" = yes; then :
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5
3185942a 14732$as_echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;}
cce855bc
JA
14733 bash_cv_getenv_redef=yes
14734
ccc6cda3 14735else
ac50fbac 14736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14737/* end confdefs.h. */
ccc6cda3
JA
14738
14739#ifdef HAVE_UNISTD_H
14740# include <unistd.h>
14741#endif
14742#ifndef __STDC__
14743# ifndef const
14744# define const
14745# endif
14746#endif
14747char *
14748getenv (name)
14749#if defined (__linux__) || defined (__bsdi__) || defined (convex)
14750 const char *name;
14751#else
14752 char const *name;
14753#endif /* !__linux__ && !__bsdi__ && !convex */
14754{
14755return "42";
14756}
14757main()
14758{
14759char *s;
14760/* The next allows this program to run, but does not allow bash to link
14761 when it redefines getenv. I'm not really interested in figuring out
14762 why not. */
14763#if defined (NeXT)
14764exit(1);
14765#endif
14766s = getenv("ABCDE");
14767exit(s == 0); /* force optimizer to leave getenv in */
14768}
14769
f73dda09 14770_ACEOF
ac50fbac 14771if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14772 bash_cv_getenv_redef=yes
14773else
ac50fbac 14774 bash_cv_getenv_redef=no
ccc6cda3 14775fi
ac50fbac
CR
14776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14777 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14778fi
3185942a 14779
ccc6cda3
JA
14780fi
14781
ac50fbac 14782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getenv_redef" >&5
3185942a 14783$as_echo "$bash_cv_getenv_redef" >&6; }
ccc6cda3 14784if test $bash_cv_getenv_redef = yes; then
ac50fbac 14785$as_echo "#define CAN_REDEFINE_GETENV 1" >>confdefs.h
ccc6cda3
JA
14786
14787fi
14788
7117c2d2 14789if test "$ac_cv_func_getcwd" = "yes"; then
ac50fbac 14790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getcwd() will dynamically allocate memory with 0 size" >&5
3185942a 14791$as_echo_n "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; }
ac50fbac 14792if ${bash_cv_getcwd_malloc+:} false; then :
3185942a 14793 $as_echo_n "(cached) " >&6
ccc6cda3 14794else
ac50fbac
CR
14795 if test "$cross_compiling" = yes; then :
14796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5
3185942a 14797$as_echo "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;}
b80f6443 14798 bash_cv_getcwd_malloc=no
cce855bc 14799
ccc6cda3 14800else
ac50fbac 14801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14802/* end confdefs.h. */
ccc6cda3
JA
14803
14804#include <stdio.h>
14805#ifdef HAVE_UNISTD_H
14806#include <unistd.h>
14807#endif
14808
ccc6cda3
JA
14809main()
14810{
b80f6443
JA
14811 char *xpwd;
14812 xpwd = getcwd(0, 0);
14813 exit (xpwd == 0);
ccc6cda3
JA
14814}
14815
f73dda09 14816_ACEOF
ac50fbac 14817if ac_fn_c_try_run "$LINENO"; then :
b80f6443 14818 bash_cv_getcwd_malloc=yes
ccc6cda3 14819else
ac50fbac 14820 bash_cv_getcwd_malloc=no
ccc6cda3 14821fi
ac50fbac
CR
14822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14823 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14824fi
3185942a 14825
ccc6cda3
JA
14826fi
14827
ac50fbac 14828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getcwd_malloc" >&5
3185942a 14829$as_echo "$bash_cv_getcwd_malloc" >&6; }
b80f6443 14830if test $bash_cv_getcwd_malloc = no; then
ac50fbac 14831$as_echo "#define GETCWD_BROKEN 1" >>confdefs.h
ccc6cda3 14832
3185942a 14833case " $LIBOBJS " in
0628567a 14834 *" getcwd.$ac_objext "* ) ;;
3185942a
JA
14835 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
14836 ;;
0628567a
JA
14837esac
14838
ccc6cda3
JA
14839fi
14840
ccc6cda3
JA
14841fi
14842
ac50fbac 14843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
3185942a 14844$as_echo_n "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; }
ac50fbac 14845if ${bash_cv_func_sigsetjmp+:} false; then :
3185942a 14846 $as_echo_n "(cached) " >&6
ccc6cda3 14847else
ac50fbac
CR
14848 if test "$cross_compiling" = yes; then :
14849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5
3185942a 14850$as_echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
14851 bash_cv_func_sigsetjmp=missing
14852
ccc6cda3 14853else
ac50fbac 14854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14855/* end confdefs.h. */
ccc6cda3
JA
14856
14857#ifdef HAVE_UNISTD_H
14858#include <unistd.h>
14859#endif
14860#include <sys/types.h>
14861#include <signal.h>
14862#include <setjmp.h>
14863
14864main()
14865{
14866#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
14867exit (1);
14868#else
14869
14870int code;
14871sigset_t set, oset;
14872sigjmp_buf xx;
14873
14874/* get the mask */
14875sigemptyset(&set);
14876sigemptyset(&oset);
14877sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
14878sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
14879
14880/* save it */
14881code = sigsetjmp(xx, 1);
14882if (code)
14883 exit(0); /* could get sigmask and compare to oset here. */
14884
14885/* change it */
14886sigaddset(&set, SIGINT);
14887sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
14888
14889/* and siglongjmp */
14890siglongjmp(xx, 10);
14891exit(1);
14892#endif
14893}
f73dda09 14894_ACEOF
ac50fbac 14895if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14896 bash_cv_func_sigsetjmp=present
14897else
ac50fbac 14898 bash_cv_func_sigsetjmp=missing
ccc6cda3 14899fi
ac50fbac
CR
14900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14901 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14902fi
3185942a 14903
ccc6cda3
JA
14904fi
14905
ac50fbac 14906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5
3185942a 14907$as_echo "$bash_cv_func_sigsetjmp" >&6; }
ccc6cda3 14908if test $bash_cv_func_sigsetjmp = present; then
ac50fbac 14909$as_echo "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h
ccc6cda3
JA
14910
14911fi
14912
b80f6443 14913
ac50fbac 14914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5
3185942a 14915$as_echo_n "checking whether or not strcoll and strcmp differ... " >&6; }
ac50fbac 14916if ${bash_cv_func_strcoll_broken+:} false; then :
3185942a 14917 $as_echo_n "(cached) " >&6
d166f048 14918else
ac50fbac
CR
14919 if test "$cross_compiling" = yes; then :
14920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5
3185942a 14921$as_echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14922 bash_cv_func_strcoll_broken=no
14923
d166f048 14924else
ac50fbac 14925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14926/* end confdefs.h. */
d166f048
JA
14927
14928#include <stdio.h>
14929#if defined (HAVE_LOCALE_H)
14930#include <locale.h>
14931#endif
14932
14933main(c, v)
14934int c;
14935char *v[];
14936{
14937 int r1, r2;
14938 char *deflocale, *defcoll;
14939
14940#ifdef HAVE_SETLOCALE
14941 deflocale = setlocale(LC_ALL, "");
14942 defcoll = setlocale(LC_COLLATE, "");
14943#endif
14944
14945#ifdef HAVE_STRCOLL
14946 /* These two values are taken from tests/glob-test. */
14947 r1 = strcoll("abd", "aXd");
14948#else
14949 r1 = 0;
14950#endif
14951 r2 = strcmp("abd", "aXd");
14952
14953 /* These two should both be greater than 0. It is permissible for
14954 a system to return different values, as long as the sign is the
14955 same. */
14956
14957 /* Exit with 1 (failure) if these two values are both > 0, since
14958 this tests whether strcoll(3) is broken with respect to strcmp(3)
14959 in the default locale. */
14960 exit (r1 > 0 && r2 > 0);
14961}
14962
f73dda09 14963_ACEOF
ac50fbac 14964if ac_fn_c_try_run "$LINENO"; then :
d166f048
JA
14965 bash_cv_func_strcoll_broken=yes
14966else
ac50fbac 14967 bash_cv_func_strcoll_broken=no
d166f048 14968fi
ac50fbac
CR
14969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14970 conftest.$ac_objext conftest.beam conftest.$ac_ext
d166f048 14971fi
3185942a 14972
d166f048
JA
14973fi
14974
ac50fbac 14975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5
3185942a 14976$as_echo "$bash_cv_func_strcoll_broken" >&6; }
d166f048 14977if test $bash_cv_func_strcoll_broken = yes; then
ac50fbac 14978$as_echo "#define STRCOLL_BROKEN 1" >>confdefs.h
d166f048
JA
14979
14980fi
14981
b80f6443
JA
14982
14983
0001803f
CR
14984
14985
0001803f 14986 if test X$ac_cv_func_snprintf = Xyes; then
ac50fbac 14987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant snprintf" >&5
0001803f 14988$as_echo_n "checking for standard-conformant snprintf... " >&6; }
ac50fbac 14989if ${bash_cv_func_snprintf+:} false; then :
0001803f
CR
14990 $as_echo_n "(cached) " >&6
14991else
ac50fbac
CR
14992 if test "$cross_compiling" = yes; then :
14993 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard snprintf if cross-compiling" >&5
0001803f
CR
14994$as_echo "$as_me: WARNING: cannot check standard snprintf if cross-compiling" >&2;}
14995 bash_cv_func_snprintf=yes
14996
14997else
ac50fbac 14998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0001803f
CR
14999/* end confdefs.h. */
15000
15001#include <stdio.h>
15002
15003main()
15004{
15005 int n;
15006 n = snprintf (0, 0, "%s", "0123456");
15007 exit(n != 7);
15008}
15009
15010_ACEOF
ac50fbac 15011if ac_fn_c_try_run "$LINENO"; then :
0001803f
CR
15012 bash_cv_func_snprintf=yes
15013else
ac50fbac 15014 bash_cv_func_snprintf=no
0001803f 15015fi
ac50fbac
CR
15016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15017 conftest.$ac_objext conftest.beam conftest.$ac_ext
0001803f
CR
15018fi
15019
0001803f 15020fi
ac50fbac 15021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_snprintf" >&5
0001803f
CR
15022$as_echo "$bash_cv_func_snprintf" >&6; }
15023 if test $bash_cv_func_snprintf = no; then
15024 ac_cv_func_snprintf=no
15025 fi
15026 fi
15027 if test $ac_cv_func_snprintf = no; then
15028
ac50fbac 15029$as_echo "#define HAVE_SNPRINTF 0" >>confdefs.h
0001803f
CR
15030
15031 fi
15032
15033
15034
15035
15036
0001803f 15037 if test X$ac_cv_func_vsnprintf = Xyes; then
ac50fbac 15038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant vsnprintf" >&5
0001803f 15039$as_echo_n "checking for standard-conformant vsnprintf... " >&6; }
ac50fbac 15040if ${bash_cv_func_vsnprintf+:} false; then :
0001803f
CR
15041 $as_echo_n "(cached) " >&6
15042else
ac50fbac
CR
15043 if test "$cross_compiling" = yes; then :
15044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard vsnprintf if cross-compiling" >&5
0001803f
CR
15045$as_echo "$as_me: WARNING: cannot check standard vsnprintf if cross-compiling" >&2;}
15046 bash_cv_func_vsnprintf=yes
15047
15048else
ac50fbac 15049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0001803f
CR
15050/* end confdefs.h. */
15051
15052#if HAVE_STDARG_H
15053#include <stdarg.h>
15054#else
15055#include <varargs.h>
15056#endif
15057#include <stdio.h>
15058#include <stdlib.h>
15059
15060static int
15061#if HAVE_STDARG_H
15062foo(const char *fmt, ...)
15063#else
15064foo(format, va_alist)
15065 const char *format;
15066 va_dcl
15067#endif
15068{
15069 va_list args;
15070 int n;
15071
15072#if HAVE_STDARG_H
15073 va_start(args, fmt);
15074#else
15075 va_start(args);
15076#endif
15077 n = vsnprintf(0, 0, fmt, args);
15078 va_end (args);
15079 return n;
15080}
15081
15082main()
15083{
15084 int n;
15085 n = foo("%s", "0123456");
15086 exit(n != 7);
15087}
15088
15089_ACEOF
ac50fbac 15090if ac_fn_c_try_run "$LINENO"; then :
0001803f
CR
15091 bash_cv_func_vsnprintf=yes
15092else
ac50fbac 15093 bash_cv_func_vsnprintf=no
0001803f 15094fi
ac50fbac
CR
15095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15096 conftest.$ac_objext conftest.beam conftest.$ac_ext
0001803f
CR
15097fi
15098
0001803f 15099fi
ac50fbac 15100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_vsnprintf" >&5
0001803f
CR
15101$as_echo "$bash_cv_func_vsnprintf" >&6; }
15102 if test $bash_cv_func_vsnprintf = no; then
15103 ac_cv_func_vsnprintf=no
15104 fi
15105 fi
15106 if test $ac_cv_func_vsnprintf = no; then
15107
ac50fbac 15108$as_echo "#define HAVE_VSNPRINTF 0" >>confdefs.h
0001803f
CR
15109
15110 fi
15111
15112
15113
7117c2d2
JA
15114if test "$ac_cv_func_putenv" = "yes"; then
15115
b80f6443
JA
15116
15117
ac50fbac 15118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant putenv declaration" >&5
3185942a 15119$as_echo_n "checking for standard-conformant putenv declaration... " >&6; }
ac50fbac 15120if ${bash_cv_std_putenv+:} false; then :
3185942a 15121 $as_echo_n "(cached) " >&6
7117c2d2 15122else
ac50fbac 15123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15124/* end confdefs.h. */
7117c2d2
JA
15125
15126#if STDC_HEADERS
15127#include <stdlib.h>
15128#include <stddef.h>
15129#endif
15130#ifndef __STDC__
15131# ifndef const
15132# define const
15133# endif
15134#endif
15135#ifdef PROTOTYPES
15136extern int putenv (char *);
15137#else
15138extern int putenv ();
15139#endif
15140
15141int
15142main ()
15143{
15144return (putenv == 0);
15145 ;
15146 return 0;
15147}
15148_ACEOF
ac50fbac 15149if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
15150 bash_cv_std_putenv=yes
15151else
ac50fbac 15152 bash_cv_std_putenv=no
7117c2d2
JA
15153
15154fi
ac50fbac
CR
15155rm -f core conftest.err conftest.$ac_objext \
15156 conftest$ac_exeext conftest.$ac_ext
7117c2d2 15157fi
ac50fbac 15158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_putenv" >&5
3185942a 15159$as_echo "$bash_cv_std_putenv" >&6; }
7117c2d2 15160if test $bash_cv_std_putenv = yes; then
ac50fbac 15161$as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h
7117c2d2
JA
15162
15163fi
15164
15165else
ac50fbac 15166$as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h
7117c2d2
JA
15167
15168fi
15169if test "$ac_cv_func_unsetenv" = "yes"; then
15170
b80f6443
JA
15171
15172
ac50fbac 15173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant unsetenv declaration" >&5
3185942a 15174$as_echo_n "checking for standard-conformant unsetenv declaration... " >&6; }
ac50fbac 15175if ${bash_cv_std_unsetenv+:} false; then :
3185942a 15176 $as_echo_n "(cached) " >&6
7117c2d2 15177else
ac50fbac 15178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15179/* end confdefs.h. */
7117c2d2
JA
15180
15181#if STDC_HEADERS
15182#include <stdlib.h>
15183#include <stddef.h>
15184#endif
15185#ifndef __STDC__
15186# ifndef const
15187# define const
15188# endif
15189#endif
15190#ifdef PROTOTYPES
15191extern int unsetenv (const char *);
15192#else
15193extern int unsetenv ();
15194#endif
15195
15196int
15197main ()
15198{
15199return (unsetenv == 0);
15200 ;
15201 return 0;
15202}
15203_ACEOF
ac50fbac 15204if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
15205 bash_cv_std_unsetenv=yes
15206else
ac50fbac 15207 bash_cv_std_unsetenv=no
7117c2d2
JA
15208
15209fi
ac50fbac
CR
15210rm -f core conftest.err conftest.$ac_objext \
15211 conftest$ac_exeext conftest.$ac_ext
7117c2d2 15212fi
ac50fbac 15213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_unsetenv" >&5
3185942a 15214$as_echo "$bash_cv_std_unsetenv" >&6; }
7117c2d2 15215if test $bash_cv_std_unsetenv = yes; then
ac50fbac 15216$as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h
7117c2d2
JA
15217
15218fi
15219
15220else
ac50fbac 15221$as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h
7117c2d2
JA
15222
15223fi
15224
ac50fbac 15225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf floating point output in hex notation" >&5
3185942a 15226$as_echo_n "checking for printf floating point output in hex notation... " >&6; }
ac50fbac 15227if ${bash_cv_printf_a_format+:} false; then :
3185942a 15228 $as_echo_n "(cached) " >&6
f73dda09 15229else
ac50fbac
CR
15230 if test "$cross_compiling" = yes; then :
15231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5
3185942a 15232$as_echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;}
f73dda09
JA
15233 bash_cv_printf_a_format=no
15234
15235else
ac50fbac 15236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15237/* end confdefs.h. */
f73dda09
JA
15238
15239#include <stdio.h>
15240#include <string.h>
15241
15242int
15243main()
15244{
15245 double y = 0.0;
15246 char abuf[1024];
15247
15248 sprintf(abuf, "%A", y);
15249 exit(strchr(abuf, 'P') == (char *)0);
15250}
15251
15252_ACEOF
ac50fbac 15253if ac_fn_c_try_run "$LINENO"; then :
f73dda09
JA
15254 bash_cv_printf_a_format=yes
15255else
ac50fbac 15256 bash_cv_printf_a_format=no
f73dda09 15257fi
ac50fbac
CR
15258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15259 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 15260fi
3185942a 15261
f73dda09 15262fi
d166f048 15263
ac50fbac 15264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_printf_a_format" >&5
3185942a 15265$as_echo "$bash_cv_printf_a_format" >&6; }
f73dda09 15266if test $bash_cv_printf_a_format = yes; then
ac50fbac 15267$as_echo "#define HAVE_PRINTF_A_FORMAT 1" >>confdefs.h
d166f048 15268
f73dda09 15269fi
ccc6cda3 15270
b80f6443 15271
d233b485
CR
15272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fnmatch can be used to check bracket equivalence classes" >&5
15273$as_echo_n "checking whether fnmatch can be used to check bracket equivalence classes... " >&6; }
15274if ${bash_cv_fnmatch_equiv_fallback+:} false; then :
15275 $as_echo_n "(cached) " >&6
15276else
15277 if test "$cross_compiling" = yes; then :
15278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&5
15279$as_echo "$as_me: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&2;}
15280 bash_cv_fnmatch_equiv_fallback=no
15281
15282else
15283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15284/* end confdefs.h. */
15285
15286#include <stdlib.h>
15287#include <unistd.h>
15288#include <stdio.h>
15289#include <fnmatch.h>
15290#include <locale.h>
15291
15292char *pattern = "[[=a=]]";
15293
15294/* char *string = "ä"; */
15295unsigned char string[4] = { '\xc3', '\xa4', '\0' };
15296
15297int
15298main (int c, char **v)
15299{
15300 setlocale (LC_ALL, "de_DE.UTF-8");
15301 if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH)
15302 exit (0);
15303 exit (1);
15304}
15305
15306
15307_ACEOF
15308if ac_fn_c_try_run "$LINENO"; then :
15309 bash_cv_fnmatch_equiv_fallback=yes
15310else
15311 bash_cv_fnmatch_equiv_fallback=no
15312fi
15313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15314 conftest.$ac_objext conftest.beam conftest.$ac_ext
15315fi
15316
15317fi
15318
15319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fnmatch_equiv_fallback" >&5
15320$as_echo "$bash_cv_fnmatch_equiv_fallback" >&6; }
15321if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then
15322 bash_cv_fnmatch_equiv_value=1
15323else
15324 bash_cv_fnmatch_equiv_value=0
15325fi
15326
15327cat >>confdefs.h <<_ACEOF
15328#define FNMATCH_EQUIV_FALLBACK $bash_cv_fnmatch_equiv_value
15329_ACEOF
15330
15331
15332
b80f6443
JA
15333
15334
ac50fbac 15335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5
3185942a 15336$as_echo_n "checking if signal handlers must be reinstalled when invoked... " >&6; }
ac50fbac 15337if ${bash_cv_must_reinstall_sighandlers+:} false; then :
3185942a 15338 $as_echo_n "(cached) " >&6
ccc6cda3 15339else
ac50fbac
CR
15340 if test "$cross_compiling" = yes; then :
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5
3185942a 15342$as_echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
15343 bash_cv_must_reinstall_sighandlers=no
15344
ccc6cda3 15345else
ac50fbac 15346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15347/* end confdefs.h. */
ccc6cda3
JA
15348
15349#include <signal.h>
15350#ifdef HAVE_UNISTD_H
15351#include <unistd.h>
15352#endif
15353
15354typedef RETSIGTYPE sigfunc();
15355
d233b485 15356volatile int nsigint;
ccc6cda3
JA
15357
15358#ifdef HAVE_POSIX_SIGNALS
15359sigfunc *
15360set_signal_handler(sig, handler)
15361 int sig;
15362 sigfunc *handler;
15363{
15364 struct sigaction act, oact;
15365 act.sa_handler = handler;
15366 act.sa_flags = 0;
15367 sigemptyset (&act.sa_mask);
15368 sigemptyset (&oact.sa_mask);
15369 sigaction (sig, &act, &oact);
15370 return (oact.sa_handler);
15371}
15372#else
15373#define set_signal_handler(s, h) signal(s, h)
15374#endif
15375
15376RETSIGTYPE
15377sigint(s)
15378int s;
15379{
15380 nsigint++;
15381}
15382
15383main()
15384{
15385 nsigint = 0;
15386 set_signal_handler(SIGINT, sigint);
15387 kill((int)getpid(), SIGINT);
15388 kill((int)getpid(), SIGINT);
15389 exit(nsigint != 2);
15390}
15391
f73dda09 15392_ACEOF
ac50fbac 15393if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
15394 bash_cv_must_reinstall_sighandlers=no
15395else
ac50fbac 15396 bash_cv_must_reinstall_sighandlers=yes
ccc6cda3 15397fi
ac50fbac
CR
15398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15399 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 15400fi
3185942a 15401
ccc6cda3
JA
15402fi
15403
ac50fbac 15404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5
3185942a 15405$as_echo "$bash_cv_must_reinstall_sighandlers" >&6; }
ccc6cda3 15406if test $bash_cv_must_reinstall_sighandlers = yes; then
ac50fbac 15407$as_echo "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h
ccc6cda3
JA
15408
15409fi
15410
b80f6443 15411
ac50fbac 15412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of necessary job control definitions" >&5
3185942a 15413$as_echo_n "checking for presence of necessary job control definitions... " >&6; }
ac50fbac 15414if ${bash_cv_job_control_missing+:} false; then :
3185942a 15415 $as_echo_n "(cached) " >&6
ccc6cda3 15416else
ac50fbac 15417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15418/* end confdefs.h. */
ccc6cda3
JA
15419
15420#include <sys/types.h>
15421#ifdef HAVE_SYS_WAIT_H
15422#include <sys/wait.h>
15423#endif
15424#ifdef HAVE_UNISTD_H
15425#include <unistd.h>
15426#endif
15427#include <signal.h>
15428
d233b485
CR
15429/* add more tests in here as appropriate */
15430
ccc6cda3
JA
15431/* signal type */
15432#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
d233b485 15433#error
ccc6cda3
JA
15434#endif
15435
15436/* signals and tty control. */
15437#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
d233b485 15438#error
ccc6cda3
JA
15439#endif
15440
15441/* process control */
f73dda09 15442#if !defined (WNOHANG) || !defined (WUNTRACED)
d233b485 15443#error
ccc6cda3
JA
15444#endif
15445
15446/* Posix systems have tcgetpgrp and waitpid. */
15447#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
d233b485 15448#error
ccc6cda3
JA
15449#endif
15450
15451#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
d233b485 15452#error
ccc6cda3
JA
15453#endif
15454
15455/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
15456#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
d233b485 15457#error
ccc6cda3
JA
15458#endif
15459
d233b485
CR
15460
15461int
15462main ()
15463{
15464
15465 ;
15466 return 0;
ccc6cda3 15467}
f73dda09 15468_ACEOF
d233b485 15469if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15470 bash_cv_job_control_missing=present
15471else
ac50fbac 15472 bash_cv_job_control_missing=missing
3185942a 15473
ccc6cda3 15474fi
d233b485
CR
15475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15476fi
ccc6cda3 15477
ac50fbac 15478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_job_control_missing" >&5
3185942a 15479$as_echo "$bash_cv_job_control_missing" >&6; }
ccc6cda3 15480if test $bash_cv_job_control_missing = missing; then
ac50fbac 15481$as_echo "#define JOB_CONTROL_MISSING 1" >>confdefs.h
ccc6cda3
JA
15482
15483fi
15484
ac50fbac 15485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of named pipes" >&5
3185942a 15486$as_echo_n "checking for presence of named pipes... " >&6; }
ac50fbac 15487if ${bash_cv_sys_named_pipes+:} false; then :
3185942a 15488 $as_echo_n "(cached) " >&6
ccc6cda3 15489else
ac50fbac
CR
15490 if test "$cross_compiling" = yes; then :
15491 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5
3185942a 15492$as_echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
15493 bash_cv_sys_named_pipes=missing
15494
ccc6cda3 15495else
ac50fbac 15496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15497/* end confdefs.h. */
ccc6cda3
JA
15498
15499#include <sys/types.h>
15500#include <sys/stat.h>
15501#ifdef HAVE_UNISTD_H
15502#include <unistd.h>
15503#endif
15504
15505/* Add more tests in here as appropriate. */
15506main()
15507{
bb70624e 15508int fd, err;
ccc6cda3
JA
15509
15510#if defined (HAVE_MKFIFO)
15511exit (0);
15512#endif
15513
15514#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
15515exit (1);
15516#endif
15517
15518#if defined (NeXT)
15519exit (1);
15520#endif
3185942a 15521err = mkdir("bash-aclocal", 0700);
bb70624e
JA
15522if (err < 0) {
15523 perror ("mkdir");
15524 exit(1);
15525}
3185942a 15526fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
bb70624e 15527if (fd == -1) {
3185942a 15528 rmdir ("bash-aclocal");
ccc6cda3 15529 exit (1);
bb70624e 15530}
ccc6cda3 15531close(fd);
3185942a
JA
15532unlink ("bash-aclocal/sh-np-autoconf");
15533rmdir ("bash-aclocal");
ccc6cda3
JA
15534exit(0);
15535}
f73dda09 15536_ACEOF
ac50fbac 15537if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
15538 bash_cv_sys_named_pipes=present
15539else
ac50fbac 15540 bash_cv_sys_named_pipes=missing
0628567a 15541fi
ac50fbac
CR
15542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15543 conftest.$ac_objext conftest.beam conftest.$ac_ext
95732b49 15544fi
3185942a 15545
95732b49 15546fi
95732b49 15547
ac50fbac 15548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_named_pipes" >&5
3185942a 15549$as_echo "$bash_cv_sys_named_pipes" >&6; }
0628567a 15550if test $bash_cv_sys_named_pipes = missing; then
ac50fbac 15551$as_echo "#define NAMED_PIPES_MISSING 1" >>confdefs.h
0628567a
JA
15552
15553fi
15554
15555
ac50fbac 15556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
3185942a 15557$as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
ac50fbac 15558if ${ac_cv_sys_tiocgwinsz_in_termios_h+:} false; then :
3185942a 15559 $as_echo_n "(cached) " >&6
f73dda09 15560else
ac50fbac 15561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15562/* end confdefs.h. */
f73dda09
JA
15563#include <sys/types.h>
15564#include <termios.h>
15565#ifdef TIOCGWINSZ
15566 yes
15567#endif
15568
15569_ACEOF
15570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 15571 $EGREP "yes" >/dev/null 2>&1; then :
f73dda09
JA
15572 ac_cv_sys_tiocgwinsz_in_termios_h=yes
15573else
15574 ac_cv_sys_tiocgwinsz_in_termios_h=no
15575fi
15576rm -f conftest*
15577
15578fi
ac50fbac 15579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
3185942a 15580$as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
d166f048 15581
f73dda09 15582if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
ac50fbac 15583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
3185942a 15584$as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
ac50fbac 15585if ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+:} false; then :
3185942a 15586 $as_echo_n "(cached) " >&6
ccc6cda3 15587else
ac50fbac 15588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15589/* end confdefs.h. */
ccc6cda3
JA
15590#include <sys/types.h>
15591#include <sys/ioctl.h>
f73dda09
JA
15592#ifdef TIOCGWINSZ
15593 yes
15594#endif
15595
15596_ACEOF
15597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 15598 $EGREP "yes" >/dev/null 2>&1; then :
f73dda09 15599 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
ccc6cda3 15600else
f73dda09 15601 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
ccc6cda3
JA
15602fi
15603rm -f conftest*
f73dda09 15604
ccc6cda3 15605fi
ac50fbac 15606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
3185942a 15607$as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
f73dda09
JA
15608
15609 if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
ccc6cda3 15610
ac50fbac 15611$as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3 15612
f73dda09 15613 fi
ccc6cda3
JA
15614fi
15615
ac50fbac 15616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5
3185942a 15617$as_echo_n "checking for TIOCSTAT in sys/ioctl.h... " >&6; }
ac50fbac 15618if ${bash_cv_tiocstat_in_ioctl+:} false; then :
3185942a 15619 $as_echo_n "(cached) " >&6
ccc6cda3 15620else
ac50fbac 15621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15622/* end confdefs.h. */
ccc6cda3
JA
15623#include <sys/types.h>
15624#include <sys/ioctl.h>
f73dda09
JA
15625int
15626main ()
15627{
ccc6cda3 15628int x = TIOCSTAT;
f73dda09
JA
15629 ;
15630 return 0;
15631}
15632_ACEOF
ac50fbac 15633if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15634 bash_cv_tiocstat_in_ioctl=yes
15635else
ac50fbac 15636 bash_cv_tiocstat_in_ioctl=no
ccc6cda3 15637fi
3185942a 15638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15639fi
15640
ac50fbac 15641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5
3185942a 15642$as_echo "$bash_cv_tiocstat_in_ioctl" >&6; }
f73dda09 15643if test $bash_cv_tiocstat_in_ioctl = yes; then
ac50fbac 15644$as_echo "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3
JA
15645
15646fi
15647
ac50fbac 15648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5
3185942a 15649$as_echo_n "checking for FIONREAD in sys/ioctl.h... " >&6; }
ac50fbac 15650if ${bash_cv_fionread_in_ioctl+:} false; then :
3185942a 15651 $as_echo_n "(cached) " >&6
ccc6cda3 15652else
ac50fbac 15653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15654/* end confdefs.h. */
ccc6cda3
JA
15655#include <sys/types.h>
15656#include <sys/ioctl.h>
f73dda09
JA
15657int
15658main ()
15659{
ccc6cda3 15660int x = FIONREAD;
f73dda09
JA
15661 ;
15662 return 0;
15663}
15664_ACEOF
ac50fbac 15665if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15666 bash_cv_fionread_in_ioctl=yes
15667else
ac50fbac 15668 bash_cv_fionread_in_ioctl=no
ccc6cda3 15669fi
3185942a 15670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15671fi
15672
ac50fbac 15673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5
3185942a 15674$as_echo "$bash_cv_fionread_in_ioctl" >&6; }
f73dda09 15675if test $bash_cv_fionread_in_ioctl = yes; then
ac50fbac 15676$as_echo "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3
JA
15677
15678fi
15679
b80f6443 15680
95732b49 15681
ac50fbac 15682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5
3185942a 15683$as_echo_n "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; }
ac50fbac 15684if ${bash_cv_wcontinued_broken+:} false; then :
3185942a 15685 $as_echo_n "(cached) " >&6
95732b49 15686else
ac50fbac
CR
15687 if test "$cross_compiling" = yes; then :
15688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5
3185942a 15689$as_echo "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&2;}
95732b49
JA
15690 bash_cv_wcontinued_broken=no
15691
15692else
ac50fbac 15693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15694/* end confdefs.h. */
95732b49
JA
15695
15696#include <sys/types.h>
15697#include <sys/wait.h>
15698#include <unistd.h>
15699#include <errno.h>
15700
15701#ifndef errno
15702extern int errno;
15703#endif
15704main()
15705{
15706 int x;
15707
15708 x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED);
15709 if (x == -1 && errno == EINVAL)
15710 exit (1);
15711 else
15712 exit (0);
15713}
15714
15715_ACEOF
ac50fbac 15716if ac_fn_c_try_run "$LINENO"; then :
95732b49
JA
15717 bash_cv_wcontinued_broken=no
15718else
ac50fbac 15719 bash_cv_wcontinued_broken=yes
95732b49 15720fi
ac50fbac
CR
15721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15722 conftest.$ac_objext conftest.beam conftest.$ac_ext
95732b49 15723fi
3185942a 15724
95732b49
JA
15725fi
15726
ac50fbac 15727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcontinued_broken" >&5
3185942a 15728$as_echo "$bash_cv_wcontinued_broken" >&6; }
95732b49 15729if test $bash_cv_wcontinued_broken = yes; then
ac50fbac 15730$as_echo "#define WCONTINUED_BROKEN 1" >>confdefs.h
95732b49
JA
15731
15732fi
15733
15734
ac50fbac 15735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5
3185942a 15736$as_echo_n "checking for speed_t in sys/types.h... " >&6; }
ac50fbac 15737if ${bash_cv_speed_t_in_sys_types+:} false; then :
3185942a 15738 $as_echo_n "(cached) " >&6
d166f048 15739else
ac50fbac 15740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15741/* end confdefs.h. */
d166f048 15742#include <sys/types.h>
f73dda09
JA
15743int
15744main ()
15745{
d166f048 15746speed_t x;
f73dda09
JA
15747 ;
15748 return 0;
15749}
15750_ACEOF
ac50fbac 15751if ac_fn_c_try_compile "$LINENO"; then :
d166f048
JA
15752 bash_cv_speed_t_in_sys_types=yes
15753else
ac50fbac 15754 bash_cv_speed_t_in_sys_types=no
d166f048 15755fi
3185942a 15756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
15757fi
15758
ac50fbac 15759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5
3185942a 15760$as_echo "$bash_cv_speed_t_in_sys_types" >&6; }
f73dda09 15761if test $bash_cv_speed_t_in_sys_types = yes; then
ac50fbac 15762$as_echo "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h
d166f048
JA
15763
15764fi
15765
ac50fbac 15766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5
3185942a 15767$as_echo_n "checking whether getpw functions are declared in pwd.h... " >&6; }
ac50fbac 15768if ${bash_cv_getpw_declared+:} false; then :
3185942a 15769 $as_echo_n "(cached) " >&6
ccc6cda3 15770else
ac50fbac 15771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15772/* end confdefs.h. */
28ef6c31 15773
ccc6cda3 15774#include <sys/types.h>
28ef6c31
JA
15775#ifdef HAVE_UNISTD_H
15776# include <unistd.h>
15777#endif
ccc6cda3 15778#include <pwd.h>
28ef6c31 15779
f73dda09 15780_ACEOF
28ef6c31 15781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 15782 $EGREP "getpwuid" >/dev/null 2>&1; then :
28ef6c31 15783 bash_cv_getpw_declared=yes
ccc6cda3 15784else
28ef6c31 15785 bash_cv_getpw_declared=no
ccc6cda3
JA
15786fi
15787rm -f conftest*
28ef6c31 15788
ccc6cda3
JA
15789fi
15790
ac50fbac 15791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5
3185942a 15792$as_echo "$bash_cv_getpw_declared" >&6; }
28ef6c31 15793if test $bash_cv_getpw_declared = yes; then
ac50fbac 15794$as_echo "#define HAVE_GETPW_DECLS 1" >>confdefs.h
ccc6cda3
JA
15795
15796fi
15797
ac50fbac 15798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unusable real-time signals due to large values" >&5
3185942a 15799$as_echo_n "checking for unusable real-time signals due to large values... " >&6; }
ac50fbac 15800if ${bash_cv_unusable_rtsigs+:} false; then :
3185942a 15801 $as_echo_n "(cached) " >&6
28ef6c31 15802else
ac50fbac
CR
15803 if test "$cross_compiling" = yes; then :
15804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5
3185942a 15805$as_echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;}
28ef6c31
JA
15806 bash_cv_unusable_rtsigs=yes
15807
15808else
ac50fbac 15809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15810/* end confdefs.h. */
28ef6c31
JA
15811
15812#include <sys/types.h>
15813#include <signal.h>
15814
15815#ifndef NSIG
15816# define NSIG 64
15817#endif
15818
15819main ()
15820{
15821 int n_sigs = 2 * NSIG;
15822#ifdef SIGRTMIN
15823 int rtmin = SIGRTMIN;
15824#else
15825 int rtmin = 0;
15826#endif
15827
15828 exit(rtmin < n_sigs);
15829}
f73dda09 15830_ACEOF
ac50fbac 15831if ac_fn_c_try_run "$LINENO"; then :
28ef6c31
JA
15832 bash_cv_unusable_rtsigs=yes
15833else
ac50fbac 15834 bash_cv_unusable_rtsigs=no
28ef6c31 15835fi
ac50fbac
CR
15836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15837 conftest.$ac_objext conftest.beam conftest.$ac_ext
28ef6c31 15838fi
3185942a 15839
28ef6c31
JA
15840fi
15841
ac50fbac 15842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_unusable_rtsigs" >&5
3185942a 15843$as_echo "$bash_cv_unusable_rtsigs" >&6; }
28ef6c31 15844if test $bash_cv_unusable_rtsigs = yes; then
ac50fbac 15845$as_echo "#define UNUSABLE_RT_SIGNALS 1" >>confdefs.h
28ef6c31
JA
15846
15847fi
15848
b80f6443
JA
15849
15850
15851
15852
f73dda09
JA
15853if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
15854 SIGLIST_O=siglist.o
15855else
15856 SIGLIST_O=
15857fi
ccc6cda3 15858
b80f6443
JA
15859
15860
ccc6cda3 15861case "$host_os" in
ac50fbac 15862hpux*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
3185942a 15863$as_echo_n "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; }
ac50fbac 15864if ${bash_cv_kernel_rlimit+:} false; then :
3185942a 15865 $as_echo_n "(cached) " >&6
ccc6cda3 15866else
ac50fbac 15867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15868/* end confdefs.h. */
ccc6cda3
JA
15869
15870#include <sys/types.h>
15871#include <sys/resource.h>
15872
f73dda09
JA
15873int
15874main ()
15875{
ccc6cda3
JA
15876
15877 int f;
15878 f = RLIMIT_DATA;
15879
f73dda09
JA
15880 ;
15881 return 0;
15882}
15883_ACEOF
ac50fbac 15884if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15885 bash_cv_kernel_rlimit=no
15886else
ac50fbac 15887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15888/* end confdefs.h. */
ccc6cda3 15889
cce855bc
JA
15890#include <sys/types.h>
15891#define _KERNEL
15892#include <sys/resource.h>
15893#undef _KERNEL
15894
f73dda09
JA
15895int
15896main ()
15897{
ccc6cda3
JA
15898
15899 int f;
15900 f = RLIMIT_DATA;
cce855bc 15901
f73dda09
JA
15902 ;
15903 return 0;
15904}
15905_ACEOF
ac50fbac 15906if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15907 bash_cv_kernel_rlimit=yes
15908else
ac50fbac 15909 bash_cv_kernel_rlimit=no
ccc6cda3 15910fi
3185942a 15911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15912
15913fi
3185942a 15914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15915fi
15916
ac50fbac 15917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_kernel_rlimit" >&5
3185942a 15918$as_echo "$bash_cv_kernel_rlimit" >&6; }
ccc6cda3 15919if test $bash_cv_kernel_rlimit = yes; then
ac50fbac 15920$as_echo "#define RLIMIT_NEEDS_KERNEL 1" >>confdefs.h
ccc6cda3
JA
15921
15922fi
15923 ;;
15924esac
15925
15926if test "$opt_readline" = yes; then
d166f048
JA
15927case "$host_os" in
15928aix*) prefer_curses=yes ;;
15929esac
ccc6cda3
JA
15930
15931if test "X$bash_cv_termcap_lib" = "X"; then
15932_bash_needmsg=yes
15933else
ac50fbac 15934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 15935$as_echo_n "checking which library has the termcap functions... " >&6; }
ccc6cda3
JA
15936_bash_needmsg=
15937fi
ac50fbac 15938if ${bash_cv_termcap_lib+:} false; then :
3185942a 15939 $as_echo_n "(cached) " >&6
b80f6443 15940else
ac50fbac
CR
15941 ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
15942if test "x$ac_cv_func_tgetent" = xyes; then :
b80f6443
JA
15943 bash_cv_termcap_lib=libc
15944else
ac50fbac 15945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
3185942a 15946$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
ac50fbac 15947if ${ac_cv_lib_termcap_tgetent+:} false; then :
3185942a 15948 $as_echo_n "(cached) " >&6
ccc6cda3 15949else
f73dda09 15950 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 15951LIBS="-ltermcap $LIBS"
ac50fbac 15952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15953/* end confdefs.h. */
f73dda09 15954
3185942a
JA
15955/* Override any GCC internal prototype to avoid an error.
15956 Use char because int might match the return type of a GCC
15957 builtin and then its argument prototype would still apply. */
f73dda09
JA
15958#ifdef __cplusplus
15959extern "C"
15960#endif
f73dda09
JA
15961char tgetent ();
15962int
15963main ()
15964{
3185942a 15965return tgetent ();
f73dda09
JA
15966 ;
15967 return 0;
15968}
15969_ACEOF
ac50fbac 15970if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
15971 ac_cv_lib_termcap_tgetent=yes
15972else
ac50fbac 15973 ac_cv_lib_termcap_tgetent=no
f73dda09 15974fi
ac50fbac
CR
15975rm -f core conftest.err conftest.$ac_objext \
15976 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
15977LIBS=$ac_check_lib_save_LIBS
15978fi
ac50fbac 15979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
3185942a 15980$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
ac50fbac 15981if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
ccc6cda3
JA
15982 bash_cv_termcap_lib=libtermcap
15983else
ac50fbac 15984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
3185942a 15985$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
ac50fbac 15986if ${ac_cv_lib_tinfo_tgetent+:} false; then :
3185942a 15987 $as_echo_n "(cached) " >&6
ccc6cda3 15988else
f73dda09
JA
15989 ac_check_lib_save_LIBS=$LIBS
15990LIBS="-ltinfo $LIBS"
ac50fbac 15991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15992/* end confdefs.h. */
f73dda09 15993
3185942a
JA
15994/* Override any GCC internal prototype to avoid an error.
15995 Use char because int might match the return type of a GCC
15996 builtin and then its argument prototype would still apply. */
f73dda09
JA
15997#ifdef __cplusplus
15998extern "C"
15999#endif
f73dda09
JA
16000char tgetent ();
16001int
16002main ()
16003{
3185942a 16004return tgetent ();
f73dda09
JA
16005 ;
16006 return 0;
16007}
16008_ACEOF
ac50fbac 16009if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
16010 ac_cv_lib_tinfo_tgetent=yes
16011else
ac50fbac 16012 ac_cv_lib_tinfo_tgetent=no
f73dda09 16013fi
ac50fbac
CR
16014rm -f core conftest.err conftest.$ac_objext \
16015 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
16016LIBS=$ac_check_lib_save_LIBS
16017fi
ac50fbac 16018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
3185942a 16019$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
ac50fbac 16020if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
7117c2d2 16021 bash_cv_termcap_lib=libtinfo
f73dda09 16022else
ac50fbac 16023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
3185942a 16024$as_echo_n "checking for tgetent in -lcurses... " >&6; }
ac50fbac 16025if ${ac_cv_lib_curses_tgetent+:} false; then :
3185942a 16026 $as_echo_n "(cached) " >&6
f73dda09
JA
16027else
16028 ac_check_lib_save_LIBS=$LIBS
16029LIBS="-lcurses $LIBS"
ac50fbac 16030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16031/* end confdefs.h. */
ccc6cda3 16032
3185942a
JA
16033/* Override any GCC internal prototype to avoid an error.
16034 Use char because int might match the return type of a GCC
16035 builtin and then its argument prototype would still apply. */
f73dda09
JA
16036#ifdef __cplusplus
16037extern "C"
16038#endif
f73dda09
JA
16039char tgetent ();
16040int
16041main ()
16042{
3185942a 16043return tgetent ();
f73dda09
JA
16044 ;
16045 return 0;
16046}
16047_ACEOF
ac50fbac 16048if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
16049 ac_cv_lib_curses_tgetent=yes
16050else
ac50fbac 16051 ac_cv_lib_curses_tgetent=no
f73dda09 16052fi
ac50fbac
CR
16053rm -f core conftest.err conftest.$ac_objext \
16054 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
16055LIBS=$ac_check_lib_save_LIBS
16056fi
ac50fbac 16057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
3185942a 16058$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
ac50fbac 16059if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
ccc6cda3
JA
16060 bash_cv_termcap_lib=libcurses
16061else
ac50fbac 16062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
3185942a 16063$as_echo_n "checking for tgetent in -lncurses... " >&6; }
ac50fbac 16064if ${ac_cv_lib_ncurses_tgetent+:} false; then :
3185942a 16065 $as_echo_n "(cached) " >&6
ccc6cda3 16066else
f73dda09 16067 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 16068LIBS="-lncurses $LIBS"
ac50fbac 16069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16070/* end confdefs.h. */
f73dda09 16071
3185942a
JA
16072/* Override any GCC internal prototype to avoid an error.
16073 Use char because int might match the return type of a GCC
16074 builtin and then its argument prototype would still apply. */
f73dda09
JA
16075#ifdef __cplusplus
16076extern "C"
16077#endif
f73dda09
JA
16078char tgetent ();
16079int
16080main ()
16081{
3185942a 16082return tgetent ();
f73dda09
JA
16083 ;
16084 return 0;
16085}
16086_ACEOF
ac50fbac 16087if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
16088 ac_cv_lib_ncurses_tgetent=yes
16089else
ac50fbac 16090 ac_cv_lib_ncurses_tgetent=no
f73dda09 16091fi
ac50fbac
CR
16092rm -f core conftest.err conftest.$ac_objext \
16093 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
16094LIBS=$ac_check_lib_save_LIBS
16095fi
ac50fbac 16096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
3185942a 16097$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
ac50fbac 16098if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
f73dda09 16099 bash_cv_termcap_lib=libncurses
d233b485
CR
16100else
16101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
16102$as_echo_n "checking for tgetent in -lncursesw... " >&6; }
16103if ${ac_cv_lib_ncursesw_tgetent+:} false; then :
16104 $as_echo_n "(cached) " >&6
16105else
16106 ac_check_lib_save_LIBS=$LIBS
16107LIBS="-lncursesw $LIBS"
16108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16109/* end confdefs.h. */
16110
16111/* Override any GCC internal prototype to avoid an error.
16112 Use char because int might match the return type of a GCC
16113 builtin and then its argument prototype would still apply. */
16114#ifdef __cplusplus
16115extern "C"
16116#endif
16117char tgetent ();
16118int
16119main ()
16120{
16121return tgetent ();
16122 ;
16123 return 0;
16124}
16125_ACEOF
16126if ac_fn_c_try_link "$LINENO"; then :
16127 ac_cv_lib_ncursesw_tgetent=yes
16128else
16129 ac_cv_lib_ncursesw_tgetent=no
16130fi
16131rm -f core conftest.err conftest.$ac_objext \
16132 conftest$ac_exeext conftest.$ac_ext
16133LIBS=$ac_check_lib_save_LIBS
16134fi
16135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
16136$as_echo "$ac_cv_lib_ncursesw_tgetent" >&6; }
16137if test "x$ac_cv_lib_ncursesw_tgetent" = xyes; then :
16138 bash_cv_termcap_lib=libncursesw
ccc6cda3 16139else
f73dda09 16140 bash_cv_termcap_lib=gnutermcap
ccc6cda3 16141fi
ccc6cda3 16142
ccc6cda3
JA
16143fi
16144
16145fi
16146
16147fi
16148
16149fi
16150
b80f6443
JA
16151fi
16152
d233b485
CR
16153fi
16154
ccc6cda3 16155if test "X$_bash_needmsg" = "Xyes"; then
ac50fbac 16156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 16157$as_echo_n "checking which library has the termcap functions... " >&6; }
ccc6cda3 16158fi
ac50fbac 16159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5
3185942a 16160$as_echo "using $bash_cv_termcap_lib" >&6; }
cce855bc 16161if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
16162LDFLAGS="$LDFLAGS -L./lib/termcap"
16163TERMCAP_LIB="./lib/termcap/libtermcap.a"
16164TERMCAP_DEP="./lib/termcap/libtermcap.a"
d166f048 16165elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
16166TERMCAP_LIB=-ltermcap
16167TERMCAP_DEP=
f73dda09
JA
16168elif test $bash_cv_termcap_lib = libtinfo; then
16169TERMCAP_LIB=-ltinfo
16170TERMCAP_DEP=
ccc6cda3
JA
16171elif test $bash_cv_termcap_lib = libncurses; then
16172TERMCAP_LIB=-lncurses
16173TERMCAP_DEP=
b80f6443
JA
16174elif test $bash_cv_termcap_lib = libc; then
16175TERMCAP_LIB=
16176TERMCAP_DEP=
ccc6cda3
JA
16177else
16178TERMCAP_LIB=-lcurses
16179TERMCAP_DEP=
16180fi
16181
16182fi
16183
b80f6443
JA
16184
16185
ac50fbac 16186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/fd is available" >&5
3185942a 16187$as_echo_n "checking whether /dev/fd is available... " >&6; }
ac50fbac 16188if ${bash_cv_dev_fd+:} false; then :
3185942a 16189 $as_echo_n "(cached) " >&6
d166f048 16190else
0628567a 16191 bash_cv_dev_fd=""
3185942a 16192if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then
95732b49 16193# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
3185942a 16194 if (exec test -r /dev/fd/3 3</dev/null) ; then
95732b49
JA
16195 bash_cv_dev_fd=standard
16196 else
16197 bash_cv_dev_fd=absent
16198 fi
0628567a
JA
16199fi
16200if test -z "$bash_cv_dev_fd" ; then
3185942a 16201 if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
0628567a
JA
16202 bash_cv_dev_fd=whacky
16203 else
16204 bash_cv_dev_fd=absent
16205 fi
16206fi
d166f048
JA
16207
16208fi
16209
ac50fbac 16210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_fd" >&5
3185942a 16211$as_echo "$bash_cv_dev_fd" >&6; }
d166f048 16212if test $bash_cv_dev_fd = "standard"; then
ac50fbac 16213 $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h
d166f048 16214
ac50fbac 16215 $as_echo "#define DEV_FD_PREFIX \"/dev/fd/\"" >>confdefs.h
d166f048
JA
16216
16217elif test $bash_cv_dev_fd = "whacky"; then
ac50fbac 16218 $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h
d166f048 16219
ac50fbac 16220 $as_echo "#define DEV_FD_PREFIX \"/proc/self/fd/\"" >>confdefs.h
d166f048
JA
16221
16222fi
16223
ac50fbac 16224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/stdin stdout stderr are available" >&5
3185942a 16225$as_echo_n "checking whether /dev/stdin stdout stderr are available... " >&6; }
ac50fbac 16226if ${bash_cv_dev_stdin+:} false; then :
3185942a 16227 $as_echo_n "(cached) " >&6
bb70624e 16228else
d233b485 16229 if (exec test -r /dev/stdin < /dev/null) ; then
bb70624e
JA
16230 bash_cv_dev_stdin=present
16231 else
16232 bash_cv_dev_stdin=absent
16233 fi
16234
16235fi
16236
ac50fbac 16237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_stdin" >&5
3185942a 16238$as_echo "$bash_cv_dev_stdin" >&6; }
bb70624e 16239if test $bash_cv_dev_stdin = "present"; then
ac50fbac 16240 $as_echo "#define HAVE_DEV_STDIN 1" >>confdefs.h
bb70624e
JA
16241
16242fi
16243
ac50fbac 16244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5
3185942a 16245$as_echo_n "checking for default mail directory... " >&6; }
ac50fbac 16246if ${bash_cv_mail_dir+:} false; then :
3185942a 16247 $as_echo_n "(cached) " >&6
ccc6cda3
JA
16248else
16249 if test -d /var/mail; then
16250 bash_cv_mail_dir=/var/mail
ccc6cda3
JA
16251 elif test -d /var/spool/mail; then
16252 bash_cv_mail_dir=/var/spool/mail
7117c2d2
JA
16253 elif test -d /usr/mail; then
16254 bash_cv_mail_dir=/usr/mail
e8ce775d
JA
16255 elif test -d /usr/spool/mail; then
16256 bash_cv_mail_dir=/usr/spool/mail
ccc6cda3
JA
16257 else
16258 bash_cv_mail_dir=unknown
16259 fi
16260
16261fi
16262
ac50fbac 16263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_mail_dir" >&5
3185942a 16264$as_echo "$bash_cv_mail_dir" >&6; }
b80f6443
JA
16265cat >>confdefs.h <<_ACEOF
16266#define DEFAULT_MAIL_DIRECTORY "$bash_cv_mail_dir"
16267_ACEOF
16268
16269
ccc6cda3 16270
ccc6cda3
JA
16271if test "$bash_cv_job_control_missing" = missing; then
16272 opt_job_control=no
16273fi
16274
16275if test "$opt_job_control" = yes; then
ac50fbac 16276$as_echo "#define JOB_CONTROL 1" >>confdefs.h
ccc6cda3
JA
16277
16278JOBS_O=jobs.o
16279else
16280JOBS_O=nojobs.o
16281fi
16282
b80f6443
JA
16283
16284
16285
d166f048
JA
16286LOCAL_DEFS=-DSHELL
16287
b80f6443 16288
b72432fd 16289case "${host_os}" in
ac50fbac 16290sysv4.2*) $as_echo "#define SVR4_2 1" >>confdefs.h
ccc6cda3 16291
ac50fbac 16292 $as_echo "#define SVR4 1" >>confdefs.h
ccc6cda3 16293 ;;
ac50fbac 16294sysv4*) $as_echo "#define SVR4 1" >>confdefs.h
ccc6cda3 16295 ;;
ac50fbac 16296sysv5*) $as_echo "#define SVR5 1" >>confdefs.h
b72432fd
JA
16297 ;;
16298hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;;
ccc6cda3
JA
16299hpux*) LOCAL_CFLAGS=-DHPUX ;;
16300dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
bb70624e
JA
16301isc*) LOCAL_CFLAGS=-Disc386 ;;
16302rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;;
f73dda09 16303darwin*) LOCAL_CFLAGS=-DMACOSX ;;
7117c2d2
JA
16304sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;;
16305sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;;
ccc6cda3 16306sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
d166f048 16307sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
f1be666c 16308solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
17345e5a
JA
16309solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;;
16310solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;;
16311solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;;
f1be666c 16312solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
b72432fd 16313lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
95732b49
JA
16314linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
16315 case "`uname -r`" in
d233b485
CR
16316 1.*|2.[0123]*) : ;;
16317 *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h
95732b49
JA
16318 ;;
16319 esac ;;
d233b485
CR
16320netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;;
16321*qnx[67]*) LOCAL_LIBS="-lncurses" ;;
7117c2d2 16322*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
b72432fd 16323powerux*) LOCAL_LIBS="-lgen" ;;
b80f6443 16324cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
ac50fbac
CR
16325opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;;
16326*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;;
b72432fd
JA
16327esac
16328
16329case "${host_os}-${CC}" in
16330aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;;
16331aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;
16332bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
a0c0a00f
CR
16333bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
16334hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading
ccc6cda3
JA
16335esac
16336
bb70624e 16337case "${host_os}" in
28ef6c31
JA
16338freebsd[3-9]*)
16339 if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then
bb70624e
JA
16340 LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
16341 fi ;;
28ef6c31 16342freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
95732b49 16343dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
bb70624e
JA
16344esac
16345
ccc6cda3
JA
16346case "$host_cpu" in
16347*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
16348esac
16349
16350case "$host_cpu-$host_os" in
16351ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
16352esac
16353
16354case "$host_cpu-$host_vendor-$host_os" in
16355m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
16356mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
16357esac
16358
d233b485
CR
16359# turn off paren warnings in gcc
16360if test "$GCC" = yes # && test -n "$DEBUG"
16361then
16362 CFLAGS="$CFLAGS -Wno-parentheses -Wno-format-security"
16363# if test -n "$DEBUG"
16364# then
16365# CFLAGS="$CFLAGS -Werror"
16366# fi
16367fi
16368
b72432fd
JA
16369#
16370# Shared object configuration section. These values are generated by
16371# ${srcdir}/support/shobj-conf
16372#
16373if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf
16374then
ac50fbac 16375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5
3185942a 16376$as_echo_n "checking shared object configuration for loadable builtins... " >&6; }
28ef6c31 16377 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
f73dda09 16378
b80f6443
JA
16379
16380
16381
16382
16383
16384
ac50fbac 16385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5
3185942a 16386$as_echo "$SHOBJ_STATUS" >&6; }
d233b485
CR
16387else
16388 SHOBJ_STATUS=unsupported
16389
b72432fd
JA
16390fi
16391
ccc6cda3
JA
16392# try to create a directory tree if the source is elsewhere
16393# this should be packaged into a script accessible via ${srcdir}/support
16394case "$srcdir" in
16395.) ;;
cce855bc 16396*) for d in doc tests support lib examples; do # dirs
ccc6cda3
JA
16397 test -d $d || mkdir $d
16398 done
cce855bc 16399 for ld in readline glob tilde malloc sh termcap; do # libdirs
ccc6cda3
JA
16400 test -d lib/$ld || mkdir lib/$ld
16401 done
cce855bc 16402 test -d examples/loadables || mkdir examples/loadables # loadable builtins
bb70624e 16403 test -d examples/loadables/perl || mkdir examples/loadables/perl
ccc6cda3
JA
16404 ;;
16405esac
16406
16407BUILD_DIR=`pwd`
95732b49
JA
16408case "$BUILD_DIR" in
16409*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
16410*) ;;
16411esac
ccc6cda3 16412
3185942a
JA
16413if test -z "$localedir"; then
16414 localedir='${datarootdir}/locale'
16415fi
16416if test -z "$datarootdir"; then
16417 datarootdir='${prefix}/share'
16418fi
16419
16420
16421
16422
b80f6443
JA
16423
16424
3185942a 16425# Some versions of autoconf don't substitute these automatically
b80f6443
JA
16426
16427
16428
a0c0a00f
CR
16429# directory where we install dynamically loadable builtins
16430if test -z "$loadablesdir"; then
16431 loadablesdir='${libdir}/bash'
16432fi
16433
16434if test -z "$headersdir"; then
16435 headersdir='$(includedir)/$(PACKAGE_NAME)'
16436fi
16437
16438
b80f6443
JA
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
d166f048
JA
16457#AC_SUBST(ALLOCA_SOURCE)
16458#AC_SUBST(ALLOCA_OBJECT)
16459
d233b485 16460ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/Makefile.inc examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh"
3185942a
JA
16461
16462ac_config_commands="$ac_config_commands default"
16463
f73dda09 16464cat >confcache <<\_ACEOF
ccc6cda3
JA
16465# This file is a shell script that caches the results of configure
16466# tests run on this system so they can be shared between configure
f73dda09
JA
16467# scripts and configure runs, see configure's option --config-cache.
16468# It is not useful on other systems. If it contains results you don't
16469# want to keep, you may remove or edit it.
726f6388 16470#
f73dda09
JA
16471# config.status only pays attention to the cache file if you give it
16472# the --recheck option to rerun configure.
ccc6cda3 16473#
0628567a 16474# `ac_cv_env_foo' variables (set or unset) will be overridden when
f73dda09
JA
16475# loading this file, other *unset* `ac_cv_foo' will be assigned the
16476# following values.
16477
16478_ACEOF
16479
ccc6cda3
JA
16480# The following way of writing the cache mishandles newlines in values,
16481# but we know of no workaround that is simple, portable, and efficient.
3185942a 16482# So, we kill variables containing newlines.
ccc6cda3
JA
16483# Ultrix sh set writes to stderr and can't be redirected directly,
16484# and sets the high bit in the cache file unless we assign to the vars.
3185942a
JA
16485(
16486 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16487 eval ac_val=\$$ac_var
16488 case $ac_val in #(
16489 *${as_nl}*)
16490 case $ac_var in #(
ac50fbac 16491 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3185942a
JA
16492$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16493 esac
16494 case $ac_var in #(
16495 _ | IFS | as_nl) ;; #(
16496 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
ac50fbac 16497 *) { eval $ac_var=; unset $ac_var;} ;;
3185942a
JA
16498 esac ;;
16499 esac
16500 done
16501
f73dda09 16502 (set) 2>&1 |
3185942a
JA
16503 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16504 *${as_nl}ac_space=\ *)
ac50fbac
CR
16505 # `set' does not quote correctly, so add quotes: double-quote
16506 # substitution turns \\\\ into \\, and sed turns \\ into \.
f73dda09 16507 sed -n \
0628567a
JA
16508 "s/'/'\\\\''/g;
16509 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
3185942a 16510 ;; #(
f73dda09
JA
16511 *)
16512 # `set' quotes correctly as required by POSIX, so do not add quotes.
3185942a 16513 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
f73dda09 16514 ;;
3185942a
JA
16515 esac |
16516 sort
16517) |
f73dda09 16518 sed '
3185942a 16519 /^ac_cv_env_/b end
f73dda09 16520 t clear
3185942a 16521 :clear
f73dda09
JA
16522 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16523 t end
3185942a
JA
16524 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16525 :end' >>confcache
16526if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16527 if test -w "$cache_file"; then
ac50fbac
CR
16528 if test "x$cache_file" != "x/dev/null"; then
16529 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
3185942a 16530$as_echo "$as_me: updating cache $cache_file" >&6;}
ac50fbac
CR
16531 if test ! -f "$cache_file" || test -h "$cache_file"; then
16532 cat confcache >"$cache_file"
16533 else
16534 case $cache_file in #(
16535 */* | ?:*)
16536 mv -f confcache "$cache_file"$$ &&
16537 mv -f "$cache_file"$$ "$cache_file" ;; #(
16538 *)
16539 mv -f confcache "$cache_file" ;;
16540 esac
16541 fi
16542 fi
ccc6cda3 16543 else
ac50fbac 16544 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
3185942a 16545$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ccc6cda3
JA
16546 fi
16547fi
16548rm -f confcache
16549
ccc6cda3
JA
16550test "x$prefix" = xNONE && prefix=$ac_default_prefix
16551# Let make expand exec_prefix.
16552test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16553
ccc6cda3
JA
16554DEFS=-DHAVE_CONFIG_H
16555
0628567a
JA
16556ac_libobjs=
16557ac_ltlibobjs=
ac50fbac 16558U=
0628567a
JA
16559for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16560 # 1. Remove the extension, and $U if already installed.
3185942a
JA
16561 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16562 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16563 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16564 # will be set to the directory where LIBOBJS objects are built.
ac50fbac
CR
16565 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16566 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
0628567a
JA
16567done
16568LIBOBJS=$ac_libobjs
16569
16570LTLIBOBJS=$ac_ltlibobjs
16571
16572
b80f6443 16573
3185942a 16574
ac50fbac 16575: "${CONFIG_STATUS=./config.status}"
3185942a 16576ac_write_fail=0
f73dda09
JA
16577ac_clean_files_save=$ac_clean_files
16578ac_clean_files="$ac_clean_files $CONFIG_STATUS"
ac50fbac 16579{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
3185942a 16580$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
ac50fbac
CR
16581as_write_fail=0
16582cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
f73dda09 16583#! $SHELL
b80f6443 16584# Generated by $as_me.
ccc6cda3 16585# Run this file to recreate the current configuration.
ccc6cda3 16586# Compiler output produced by configure, useful for debugging
f73dda09 16587# configure, is in config.log if it exists.
ccc6cda3 16588
f73dda09 16589debug=false
0628567a
JA
16590ac_cs_recheck=false
16591ac_cs_silent=false
f73dda09 16592
ac50fbac
CR
16593SHELL=\${CONFIG_SHELL-$SHELL}
16594export SHELL
16595_ASEOF
16596cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16597## -------------------- ##
16598## M4sh Initialization. ##
16599## -------------------- ##
b80f6443 16600
3185942a
JA
16601# Be more Bourne compatible
16602DUALCASE=1; export DUALCASE # for MKS sh
ac50fbac 16603if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
f73dda09
JA
16604 emulate sh
16605 NULLCMD=:
3185942a 16606 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
0628567a
JA
16607 # is contrary to our usage. Disable this feature.
16608 alias -g '${1+"$@"}'='"$@"'
3185942a
JA
16609 setopt NO_GLOB_SUBST
16610else
ac50fbac
CR
16611 case `(set -o) 2>/dev/null` in #(
16612 *posix*) :
16613 set -o posix ;; #(
16614 *) :
16615 ;;
3185942a 16616esac
3185942a
JA
16617fi
16618
16619
3185942a
JA
16620as_nl='
16621'
16622export as_nl
16623# Printing a long string crashes Solaris 7 /usr/bin/printf.
16624as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16625as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16626as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
ac50fbac
CR
16627# Prefer a ksh shell builtin over an external printf program on Solaris,
16628# but without wasting forks for bash or zsh.
16629if test -z "$BASH_VERSION$ZSH_VERSION" \
16630 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16631 as_echo='print -r --'
16632 as_echo_n='print -rn --'
16633elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
3185942a
JA
16634 as_echo='printf %s\n'
16635 as_echo_n='printf %s'
16636else
16637 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16638 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16639 as_echo_n='/usr/ucb/echo -n'
16640 else
16641 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16642 as_echo_n_body='eval
16643 arg=$1;
ac50fbac 16644 case $arg in #(
3185942a
JA
16645 *"$as_nl"*)
16646 expr "X$arg" : "X\\(.*\\)$as_nl";
16647 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16648 esac;
16649 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16650 '
16651 export as_echo_n_body
16652 as_echo_n='sh -c $as_echo_n_body as_echo'
16653 fi
16654 export as_echo_body
16655 as_echo='sh -c $as_echo_body as_echo'
16656fi
16657
16658# The user is always right.
16659if test "${PATH_SEPARATOR+set}" != set; then
16660 PATH_SEPARATOR=:
16661 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16662 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16663 PATH_SEPARATOR=';'
16664 }
f73dda09
JA
16665fi
16666
0628567a 16667
3185942a
JA
16668# IFS
16669# We need space, tab and new line, in precisely that order. Quoting is
16670# there to prevent editors from complaining about space-tab.
16671# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16672# splitting by setting IFS to empty value.)
16673IFS=" "" $as_nl"
16674
16675# Find who we are. Look in the path if we contain no directory separator.
ac50fbac
CR
16676as_myself=
16677case $0 in #((
3185942a
JA
16678 *[\\/]* ) as_myself=$0 ;;
16679 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16680for as_dir in $PATH
16681do
16682 IFS=$as_save_IFS
16683 test -z "$as_dir" && as_dir=.
ac50fbac
CR
16684 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16685 done
3185942a
JA
16686IFS=$as_save_IFS
16687
16688 ;;
16689esac
16690# We did not find ourselves, most probably we were run as `sh COMMAND'
16691# in which case we are not to be found in the path.
16692if test "x$as_myself" = x; then
16693 as_myself=$0
16694fi
16695if test ! -f "$as_myself"; then
16696 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ac50fbac 16697 exit 1
3185942a
JA
16698fi
16699
ac50fbac
CR
16700# Unset variables that we do not need and which cause bugs (e.g. in
16701# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16702# suppresses any "Segmentation fault" message there. '((' could
16703# trigger a bug in pdksh 5.2.14.
16704for as_var in BASH_ENV ENV MAIL MAILPATH
16705do eval test x\${$as_var+set} = xset \
16706 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
3185942a 16707done
0628567a
JA
16708PS1='$ '
16709PS2='> '
16710PS4='+ '
16711
16712# NLS nuisances.
3185942a
JA
16713LC_ALL=C
16714export LC_ALL
16715LANGUAGE=C
16716export LANGUAGE
0628567a 16717
ac50fbac
CR
16718# CDPATH.
16719(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16720
16721
16722# as_fn_error STATUS ERROR [LINENO LOG_FD]
16723# ----------------------------------------
16724# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16725# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16726# script with STATUS, using 1 if that was 0.
16727as_fn_error ()
16728{
16729 as_status=$1; test $as_status -eq 0 && as_status=1
16730 if test "$4"; then
16731 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16732 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16733 fi
16734 $as_echo "$as_me: error: $2" >&2
16735 as_fn_exit $as_status
16736} # as_fn_error
16737
16738
16739# as_fn_set_status STATUS
16740# -----------------------
16741# Set $? to STATUS, without forking.
16742as_fn_set_status ()
16743{
16744 return $1
16745} # as_fn_set_status
16746
16747# as_fn_exit STATUS
16748# -----------------
16749# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16750as_fn_exit ()
16751{
16752 set +e
16753 as_fn_set_status $1
16754 exit $1
16755} # as_fn_exit
16756
16757# as_fn_unset VAR
16758# ---------------
16759# Portably unset VAR.
16760as_fn_unset ()
16761{
16762 { eval $1=; unset $1;}
16763}
16764as_unset=as_fn_unset
16765# as_fn_append VAR VALUE
16766# ----------------------
16767# Append the text in VALUE to the end of the definition contained in VAR. Take
16768# advantage of any shell optimizations that allow amortized linear growth over
16769# repeated appends, instead of the typical quadratic growth present in naive
16770# implementations.
16771if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16772 eval 'as_fn_append ()
16773 {
16774 eval $1+=\$2
16775 }'
16776else
16777 as_fn_append ()
16778 {
16779 eval $1=\$$1\$2
16780 }
16781fi # as_fn_append
16782
16783# as_fn_arith ARG...
16784# ------------------
16785# Perform arithmetic evaluation on the ARGs, and store the result in the
16786# global $as_val. Take advantage of shells that can avoid forks. The arguments
16787# must be portable across $(()) and expr.
16788if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16789 eval 'as_fn_arith ()
16790 {
16791 as_val=$(( $* ))
16792 }'
16793else
16794 as_fn_arith ()
16795 {
16796 as_val=`expr "$@" || test $? -eq 1`
16797 }
16798fi # as_fn_arith
16799
16800
3185942a
JA
16801if expr a : '\(a\)' >/dev/null 2>&1 &&
16802 test "X`expr 00001 : '.*\(...\)'`" = X001; then
0628567a
JA
16803 as_expr=expr
16804else
16805 as_expr=false
16806fi
16807
3185942a 16808if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
0628567a
JA
16809 as_basename=basename
16810else
16811 as_basename=false
16812fi
b80f6443 16813
ac50fbac
CR
16814if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16815 as_dirname=dirname
16816else
16817 as_dirname=false
16818fi
b80f6443 16819
3185942a 16820as_me=`$as_basename -- "$0" ||
b80f6443
JA
16821$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16822 X"$0" : 'X\(//\)$' \| \
3185942a
JA
16823 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16824$as_echo X/"$0" |
16825 sed '/^.*\/\([^/][^/]*\)\/*$/{
16826 s//\1/
16827 q
16828 }
16829 /^X\/\(\/\/\)$/{
16830 s//\1/
16831 q
16832 }
16833 /^X\/\(\/\).*/{
16834 s//\1/
16835 q
16836 }
16837 s/.*/./; q'`
b80f6443 16838
ac50fbac
CR
16839# Avoid depending upon Character Ranges.
16840as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16841as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16842as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16843as_cr_digits='0123456789'
16844as_cr_alnum=$as_cr_Letters$as_cr_digits
f73dda09 16845
3185942a 16846ECHO_C= ECHO_N= ECHO_T=
ac50fbac 16847case `echo -n x` in #(((((
3185942a 16848-n*)
ac50fbac 16849 case `echo 'xy\c'` in
3185942a 16850 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
ac50fbac
CR
16851 xy) ECHO_C='\c';;
16852 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16853 ECHO_T=' ';;
3185942a
JA
16854 esac;;
16855*)
16856 ECHO_N='-n';;
16857esac
f73dda09
JA
16858
16859rm -f conf$$ conf$$.exe conf$$.file
3185942a
JA
16860if test -d conf$$.dir; then
16861 rm -f conf$$.dir/conf$$.file
16862else
16863 rm -f conf$$.dir
16864 mkdir conf$$.dir 2>/dev/null
16865fi
16866if (echo >conf$$.file) 2>/dev/null; then
16867 if ln -s conf$$.file conf$$ 2>/dev/null; then
f73dda09 16868 as_ln_s='ln -s'
3185942a
JA
16869 # ... but there are two gotchas:
16870 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16871 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
ac50fbac 16872 # In both cases, we have to default to `cp -pR'.
3185942a 16873 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
ac50fbac 16874 as_ln_s='cp -pR'
3185942a
JA
16875 elif ln conf$$.file conf$$ 2>/dev/null; then
16876 as_ln_s=ln
16877 else
ac50fbac 16878 as_ln_s='cp -pR'
f73dda09 16879 fi
f73dda09 16880else
ac50fbac 16881 as_ln_s='cp -pR'
f73dda09 16882fi
3185942a
JA
16883rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16884rmdir conf$$.dir 2>/dev/null
f73dda09 16885
ac50fbac
CR
16886
16887# as_fn_mkdir_p
16888# -------------
16889# Create "$as_dir" as a directory, including parents if necessary.
16890as_fn_mkdir_p ()
16891{
16892
16893 case $as_dir in #(
16894 -*) as_dir=./$as_dir;;
16895 esac
16896 test -d "$as_dir" || eval $as_mkdir_p || {
16897 as_dirs=
16898 while :; do
16899 case $as_dir in #(
16900 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16901 *) as_qdir=$as_dir;;
16902 esac
16903 as_dirs="'$as_qdir' $as_dirs"
16904 as_dir=`$as_dirname -- "$as_dir" ||
16905$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16906 X"$as_dir" : 'X\(//\)[^/]' \| \
16907 X"$as_dir" : 'X\(//\)$' \| \
16908 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16909$as_echo X"$as_dir" |
16910 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16911 s//\1/
16912 q
16913 }
16914 /^X\(\/\/\)[^/].*/{
16915 s//\1/
16916 q
16917 }
16918 /^X\(\/\/\)$/{
16919 s//\1/
16920 q
16921 }
16922 /^X\(\/\).*/{
16923 s//\1/
16924 q
16925 }
16926 s/.*/./; q'`
16927 test -d "$as_dir" && break
16928 done
16929 test -z "$as_dirs" || eval "mkdir $as_dirs"
16930 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16931
16932
16933} # as_fn_mkdir_p
0628567a 16934if mkdir -p . 2>/dev/null; then
ac50fbac 16935 as_mkdir_p='mkdir -p "$as_dir"'
0628567a
JA
16936else
16937 test -d ./-p && rmdir ./-p
16938 as_mkdir_p=false
16939fi
16940
ac50fbac
CR
16941
16942# as_fn_executable_p FILE
16943# -----------------------
16944# Test if FILE is an executable regular file.
16945as_fn_executable_p ()
16946{
16947 test -f "$1" && test -x "$1"
16948} # as_fn_executable_p
16949as_test_x='test -x'
16950as_executable_p=as_fn_executable_p
b80f6443
JA
16951
16952# Sed expression to map a string onto a valid CPP name.
0628567a 16953as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
b80f6443
JA
16954
16955# Sed expression to map a string onto a valid variable name.
0628567a 16956as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
b80f6443 16957
f73dda09 16958
f73dda09 16959exec 6>&1
ac50fbac
CR
16960## ----------------------------------- ##
16961## Main body of $CONFIG_STATUS script. ##
16962## ----------------------------------- ##
16963_ASEOF
16964test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
f73dda09 16965
ac50fbac
CR
16966cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16967# Save the log message, to keep $0 and so on meaningful, and to
b80f6443 16968# report actual input values of CONFIG_FILES etc. instead of their
3185942a
JA
16969# values after options handling.
16970ac_log="
d233b485 16971This file was extended by bash $as_me 5.0-release, which was
ac50fbac 16972generated by GNU Autoconf 2.69. Invocation command line was
b80f6443
JA
16973
16974 CONFIG_FILES = $CONFIG_FILES
16975 CONFIG_HEADERS = $CONFIG_HEADERS
16976 CONFIG_LINKS = $CONFIG_LINKS
16977 CONFIG_COMMANDS = $CONFIG_COMMANDS
16978 $ $0 $@
16979
3185942a
JA
16980on `(hostname || uname -n) 2>/dev/null | sed 1q`
16981"
16982
f73dda09
JA
16983_ACEOF
16984
3185942a
JA
16985case $ac_config_files in *"
16986"*) set x $ac_config_files; shift; ac_config_files=$*;;
16987esac
f73dda09 16988
3185942a
JA
16989case $ac_config_headers in *"
16990"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16991esac
f73dda09 16992
f73dda09 16993
3185942a
JA
16994cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16995# Files that config.status was made for.
16996config_files="$ac_config_files"
16997config_headers="$ac_config_headers"
16998config_commands="$ac_config_commands"
f73dda09 16999
3185942a 17000_ACEOF
f73dda09 17001
3185942a 17002cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09 17003ac_cs_usage="\
ac50fbac
CR
17004\`$as_me' instantiates files and other configuration actions
17005from templates according to the current configuration. Unless the files
17006and actions are specified as TAGs, all are instantiated by default.
f73dda09 17007
ac50fbac 17008Usage: $0 [OPTION]... [TAG]...
f73dda09
JA
17009
17010 -h, --help print this help, then exit
3185942a 17011 -V, --version print version number and configuration settings, then exit
ac50fbac 17012 --config print configuration, then exit
3185942a
JA
17013 -q, --quiet, --silent
17014 do not print progress messages
f73dda09
JA
17015 -d, --debug don't remove temporary files
17016 --recheck update $as_me by reconfiguring in the same conditions
3185942a
JA
17017 --file=FILE[:TEMPLATE]
17018 instantiate the configuration file FILE
17019 --header=FILE[:TEMPLATE]
17020 instantiate the configuration header FILE
f73dda09
JA
17021
17022Configuration files:
17023$config_files
17024
17025Configuration headers:
17026$config_headers
17027
17028Configuration commands:
17029$config_commands
17030
ac50fbac 17031Report bugs to <bug-bash@gnu.org>."
f73dda09 17032
3185942a
JA
17033_ACEOF
17034cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac50fbac 17035ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
f73dda09 17036ac_cs_version="\\
d233b485 17037bash config.status 5.0-release
ac50fbac
CR
17038configured by $0, generated by GNU Autoconf 2.69,
17039 with options \\"\$ac_cs_config\\"
f73dda09 17040
ac50fbac 17041Copyright (C) 2012 Free Software Foundation, Inc.
f73dda09
JA
17042This config.status script is free software; the Free Software Foundation
17043gives unlimited permission to copy, distribute and modify it."
3185942a
JA
17044
17045ac_pwd='$ac_pwd'
17046srcdir='$srcdir'
17047INSTALL='$INSTALL'
17048test -n "\$AWK" || AWK=awk
b80f6443 17049_ACEOF
f73dda09 17050
3185942a
JA
17051cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17052# The default lists apply if the user does not specify any file.
f73dda09
JA
17053ac_need_defaults=:
17054while test $# != 0
ccc6cda3 17055do
f73dda09 17056 case $1 in
ac50fbac 17057 --*=?*)
3185942a
JA
17058 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17059 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
0628567a
JA
17060 ac_shift=:
17061 ;;
ac50fbac
CR
17062 --*=)
17063 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17064 ac_optarg=
17065 ac_shift=:
17066 ;;
3185942a 17067 *)
0628567a
JA
17068 ac_option=$1
17069 ac_optarg=$2
17070 ac_shift=shift
f73dda09 17071 ;;
f73dda09
JA
17072 esac
17073
0628567a 17074 case $ac_option in
f73dda09 17075 # Handling of the options.
0628567a
JA
17076 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17077 ac_cs_recheck=: ;;
3185942a
JA
17078 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17079 $as_echo "$ac_cs_version"; exit ;;
ac50fbac
CR
17080 --config | --confi | --conf | --con | --co | --c )
17081 $as_echo "$ac_cs_config"; exit ;;
3185942a 17082 --debug | --debu | --deb | --de | --d | -d )
f73dda09
JA
17083 debug=: ;;
17084 --file | --fil | --fi | --f )
0628567a 17085 $ac_shift
3185942a
JA
17086 case $ac_optarg in
17087 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
ac50fbac 17088 '') as_fn_error $? "missing file argument" ;;
3185942a 17089 esac
ac50fbac 17090 as_fn_append CONFIG_FILES " '$ac_optarg'"
f73dda09
JA
17091 ac_need_defaults=false;;
17092 --header | --heade | --head | --hea )
0628567a 17093 $ac_shift
3185942a
JA
17094 case $ac_optarg in
17095 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17096 esac
ac50fbac 17097 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
f73dda09 17098 ac_need_defaults=false;;
3185942a
JA
17099 --he | --h)
17100 # Conflict between --help and --header
ac50fbac
CR
17101 as_fn_error $? "ambiguous option: \`$1'
17102Try \`$0 --help' for more information.";;
3185942a
JA
17103 --help | --hel | -h )
17104 $as_echo "$ac_cs_usage"; exit ;;
0628567a
JA
17105 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17106 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17107 ac_cs_silent=: ;;
f73dda09
JA
17108
17109 # This is an error.
ac50fbac
CR
17110 -*) as_fn_error $? "unrecognized option: \`$1'
17111Try \`$0 --help' for more information." ;;
f73dda09 17112
ac50fbac 17113 *) as_fn_append ac_config_targets " $1"
3185942a 17114 ac_need_defaults=false ;;
f73dda09 17115
ccc6cda3 17116 esac
f73dda09 17117 shift
ccc6cda3
JA
17118done
17119
0628567a
JA
17120ac_configure_extra_args=
17121
17122if $ac_cs_silent; then
17123 exec 6>/dev/null
17124 ac_configure_extra_args="$ac_configure_extra_args --silent"
17125fi
17126
17127_ACEOF
3185942a 17128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
0628567a 17129if \$ac_cs_recheck; then
ac50fbac 17130 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
3185942a
JA
17131 shift
17132 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17133 CONFIG_SHELL='$SHELL'
17134 export CONFIG_SHELL
17135 exec "\$@"
0628567a
JA
17136fi
17137
b80f6443 17138_ACEOF
3185942a
JA
17139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17140exec 5>>config.log
17141{
17142 echo
17143 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17144## Running $as_me. ##
17145_ASBOX
17146 $as_echo "$ac_log"
17147} >&5
b80f6443 17148
3185942a
JA
17149_ACEOF
17150cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
b80f6443 17151#
3185942a 17152# INIT-COMMANDS
b80f6443 17153#
b80f6443
JA
17154# Capture the value of obsolete ALL_LINGUAS because we need it to compute
17155 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
17156 # from automake.
17157 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
17158 # Capture the value of LINGUAS because we need it to compute CATALOGS.
17159 LINGUAS="${LINGUAS-%UNSET%}"
f73dda09 17160
f73dda09
JA
17161
17162_ACEOF
ccc6cda3 17163
3185942a 17164cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b80f6443 17165
3185942a 17166# Handling of arguments.
f73dda09
JA
17167for ac_config_target in $ac_config_targets
17168do
3185942a
JA
17169 case $ac_config_target in
17170 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
17171 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
17172 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17173 "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;;
17174 "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;;
17175 "lib/glob/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;;
17176 "lib/intl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;;
17177 "lib/malloc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;;
17178 "lib/sh/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;;
17179 "lib/termcap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;;
17180 "lib/tilde/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;;
17181 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
17182 "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;;
17183 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
17184 "examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;;
a0c0a00f 17185 "examples/loadables/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;;
3185942a 17186 "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;;
a0c0a00f 17187 "support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;;
d233b485 17188 "support/bashbug.sh") CONFIG_FILES="$CONFIG_FILES support/bashbug.sh" ;;
3185942a
JA
17189 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17190
ac50fbac 17191 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
f73dda09
JA
17192 esac
17193done
17194
3185942a 17195
f73dda09
JA
17196# If the user did not use the arguments to specify the items to instantiate,
17197# then the envvar interface is used. Set only those that are not.
17198# We use the long form for the default assignment because of an extremely
17199# bizarre bug on SunOS 4.1.3.
17200if $ac_need_defaults; then
17201 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17202 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17203 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17204fi
17205
0628567a 17206# Have a temporary directory for convenience. Make it in the build tree
3185942a 17207# simply because there is no reason against having it here, and in addition,
0628567a 17208# creating and moving files from /tmp can sometimes cause problems.
3185942a
JA
17209# Hook for its removal unless debugging.
17210# Note that there is a small window in which the directory will not be cleaned:
17211# after its creation but before its name has been assigned to `$tmp'.
f73dda09
JA
17212$debug ||
17213{
ac50fbac 17214 tmp= ac_tmp=
3185942a 17215 trap 'exit_status=$?
ac50fbac
CR
17216 : "${ac_tmp:=$tmp}"
17217 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
3185942a 17218' 0
ac50fbac 17219 trap 'as_fn_exit 1' 1 2 13 15
f73dda09 17220}
f73dda09 17221# Create a (secure) tmp directory for tmp files.
0628567a 17222
f73dda09 17223{
3185942a 17224 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
ac50fbac 17225 test -d "$tmp"
f73dda09
JA
17226} ||
17227{
3185942a
JA
17228 tmp=./conf$$-$RANDOM
17229 (umask 077 && mkdir "$tmp")
ac50fbac
CR
17230} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17231ac_tmp=$tmp
ccc6cda3 17232
3185942a
JA
17233# Set up the scripts for CONFIG_FILES section.
17234# No need to generate them if there are no CONFIG_FILES.
17235# This happens for instance with `./config.status config.h'.
17236if test -n "$CONFIG_FILES"; then
17237
17238
ac50fbac
CR
17239ac_cr=`echo X | tr X '\015'`
17240# On cygwin, bash can eat \r inside `` if the user requested igncr.
17241# But we know of no other shell where ac_cr would be empty at this
17242# point, so we can use a bashism as a fallback.
17243if test "x$ac_cr" = x; then
17244 eval ac_cr=\$\'\\r\'
17245fi
3185942a
JA
17246ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17247if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17248 ac_cs_awk_cr='\\r'
17249else
17250 ac_cs_awk_cr=$ac_cr
17251fi
17252
ac50fbac 17253echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
b80f6443 17254_ACEOF
ccc6cda3 17255
ccc6cda3 17256
3185942a
JA
17257{
17258 echo "cat >conf$$subs.awk <<_ACEOF" &&
17259 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17260 echo "_ACEOF"
17261} >conf$$subs.sh ||
ac50fbac
CR
17262 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17263ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
3185942a
JA
17264ac_delim='%!_!# '
17265for ac_last_try in false false false false false :; do
17266 . ./conf$$subs.sh ||
ac50fbac 17267 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
f73dda09 17268
3185942a
JA
17269 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17270 if test $ac_delim_n = $ac_delim_num; then
17271 break
17272 elif $ac_last_try; then
ac50fbac 17273 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
3185942a
JA
17274 else
17275 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
ccc6cda3 17276 fi
3185942a
JA
17277done
17278rm -f conf$$subs.sh
17279
17280cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac50fbac 17281cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
3185942a
JA
17282_ACEOF
17283sed -n '
17284h
17285s/^/S["/; s/!.*/"]=/
17286p
17287g
17288s/^[^!]*!//
17289:repl
17290t repl
17291s/'"$ac_delim"'$//
17292t delim
17293:nl
17294h
ac50fbac 17295s/\(.\{148\}\)..*/\1/
3185942a
JA
17296t more1
17297s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17298p
17299n
17300b repl
17301:more1
17302s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17303p
17304g
17305s/.\{148\}//
17306t nl
17307:delim
17308h
ac50fbac 17309s/\(.\{148\}\)..*/\1/
3185942a
JA
17310t more2
17311s/["\\]/\\&/g; s/^/"/; s/$/"/
17312p
17313b
17314:more2
17315s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17316p
17317g
17318s/.\{148\}//
17319t delim
17320' <conf$$subs.awk | sed '
17321/^[^""]/{
17322 N
17323 s/\n//
17324}
17325' >>$CONFIG_STATUS || ac_write_fail=1
17326rm -f conf$$subs.awk
17327cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17328_ACAWK
ac50fbac 17329cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
3185942a
JA
17330 for (key in S) S_is_set[key] = 1
17331 FS = "\a"
17332
17333}
17334{
17335 line = $ 0
17336 nfields = split(line, field, "@")
17337 substed = 0
17338 len = length(field[1])
17339 for (i = 2; i < nfields; i++) {
17340 key = field[i]
17341 keylen = length(key)
17342 if (S_is_set[key]) {
17343 value = S[key]
17344 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17345 len += length(value) + length(field[++i])
17346 substed = 1
17347 } else
17348 len += 1 + keylen
17349 }
17350
17351 print line
17352}
17353
17354_ACAWK
17355_ACEOF
17356cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17357if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17358 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17359else
17360 cat
ac50fbac
CR
17361fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17362 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
3185942a
JA
17363_ACEOF
17364
ac50fbac
CR
17365# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17366# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
3185942a
JA
17367# trailing colons and then remove the whole line if VPATH becomes empty
17368# (actually we leave an empty line to preserve line numbers).
17369if test "x$srcdir" = x.; then
ac50fbac
CR
17370 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17371h
17372s///
17373s/^/:/
17374s/[ ]*$/:/
17375s/:\$(srcdir):/:/g
17376s/:\${srcdir}:/:/g
17377s/:@srcdir@:/:/g
17378s/^:*//
3185942a 17379s/:*$//
ac50fbac
CR
17380x
17381s/\(=[ ]*\).*/\1/
17382G
17383s/\n//
3185942a
JA
17384s/^[^=]*=[ ]*$//
17385}'
17386fi
17387
17388cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09 17389fi # test -n "$CONFIG_FILES"
ccc6cda3 17390
3185942a
JA
17391# Set up the scripts for CONFIG_HEADERS section.
17392# No need to generate them if there are no CONFIG_HEADERS.
17393# This happens for instance with `./config.status Makefile'.
17394if test -n "$CONFIG_HEADERS"; then
ac50fbac 17395cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
3185942a 17396BEGIN {
b80f6443 17397_ACEOF
3185942a
JA
17398
17399# Transform confdefs.h into an awk script `defines.awk', embedded as
17400# here-document in config.status, that substitutes the proper values into
17401# config.h.in to produce config.h.
17402
17403# Create a delimiter string that does not exist in confdefs.h, to ease
17404# handling of long lines.
17405ac_delim='%!_!# '
17406for ac_last_try in false false :; do
ac50fbac
CR
17407 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17408 if test -z "$ac_tt"; then
3185942a
JA
17409 break
17410 elif $ac_last_try; then
ac50fbac 17411 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
3185942a
JA
17412 else
17413 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17414 fi
17415done
17416
17417# For the awk script, D is an array of macro values keyed by name,
17418# likewise P contains macro parameters if any. Preserve backslash
17419# newline sequences.
17420
17421ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17422sed -n '
17423s/.\{148\}/&'"$ac_delim"'/g
17424t rset
17425:rset
17426s/^[ ]*#[ ]*define[ ][ ]*/ /
17427t def
17428d
17429:def
17430s/\\$//
17431t bsnl
17432s/["\\]/\\&/g
17433s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17434D["\1"]=" \3"/p
17435s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17436d
17437:bsnl
17438s/["\\]/\\&/g
17439s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17440D["\1"]=" \3\\\\\\n"\\/p
17441t cont
17442s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17443t cont
17444d
17445:cont
17446n
17447s/.\{148\}/&'"$ac_delim"'/g
17448t clear
17449:clear
17450s/\\$//
17451t bsnlc
17452s/["\\]/\\&/g; s/^/"/; s/$/"/p
17453d
17454:bsnlc
17455s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17456b cont
17457' <confdefs.h | sed '
17458s/'"$ac_delim"'/"\\\
17459"/g' >>$CONFIG_STATUS || ac_write_fail=1
17460
17461cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17462 for (key in D) D_is_set[key] = 1
17463 FS = "\a"
17464}
17465/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17466 line = \$ 0
17467 split(line, arg, " ")
17468 if (arg[1] == "#") {
17469 defundef = arg[2]
17470 mac1 = arg[3]
17471 } else {
17472 defundef = substr(arg[1], 2)
17473 mac1 = arg[2]
17474 }
17475 split(mac1, mac2, "(") #)
17476 macro = mac2[1]
17477 prefix = substr(line, 1, index(line, defundef) - 1)
17478 if (D_is_set[macro]) {
17479 # Preserve the white space surrounding the "#".
17480 print prefix "define", macro P[macro] D[macro]
17481 next
17482 } else {
17483 # Replace #undef with comments. This is necessary, for example,
17484 # in the case of _POSIX_SOURCE, which is predefined and required
17485 # on some systems where configure will not decide to define it.
17486 if (defundef == "undef") {
17487 print "/*", prefix defundef, macro, "*/"
17488 next
17489 }
17490 }
17491}
17492{ print }
17493_ACAWK
17494_ACEOF
17495cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac50fbac 17496 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
3185942a
JA
17497fi # test -n "$CONFIG_HEADERS"
17498
17499
17500eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
17501shift
17502for ac_tag
17503do
17504 case $ac_tag in
17505 :[FHLC]) ac_mode=$ac_tag; continue;;
17506 esac
17507 case $ac_mode$ac_tag in
17508 :[FHL]*:*);;
ac50fbac 17509 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
3185942a
JA
17510 :[FH]-) ac_tag=-:-;;
17511 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17512 esac
17513 ac_save_IFS=$IFS
17514 IFS=:
17515 set x $ac_tag
17516 IFS=$ac_save_IFS
17517 shift
17518 ac_file=$1
17519 shift
17520
17521 case $ac_mode in
17522 :L) ac_source=$1;;
17523 :[FH])
17524 ac_file_inputs=
17525 for ac_f
17526 do
17527 case $ac_f in
ac50fbac 17528 -) ac_f="$ac_tmp/stdin";;
3185942a
JA
17529 *) # Look for the file first in the build tree, then in the source tree
17530 # (if the path is not absolute). The absolute path cannot be DOS-style,
17531 # because $ac_f cannot contain `:'.
17532 test -f "$ac_f" ||
17533 case $ac_f in
17534 [\\/$]*) false;;
17535 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17536 esac ||
ac50fbac 17537 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
3185942a
JA
17538 esac
17539 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
ac50fbac 17540 as_fn_append ac_file_inputs " '$ac_f'"
3185942a
JA
17541 done
17542
17543 # Let's still pretend it is `configure' which instantiates (i.e., don't
17544 # use $as_me), people would be surprised to read:
17545 # /* config.h. Generated by config.status. */
17546 configure_input='Generated from '`
17547 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17548 `' by configure.'
17549 if test x"$ac_file" != x-; then
17550 configure_input="$ac_file. $configure_input"
ac50fbac 17551 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
3185942a
JA
17552$as_echo "$as_me: creating $ac_file" >&6;}
17553 fi
17554 # Neutralize special characters interpreted by sed in replacement strings.
17555 case $configure_input in #(
17556 *\&* | *\|* | *\\* )
17557 ac_sed_conf_input=`$as_echo "$configure_input" |
17558 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17559 *) ac_sed_conf_input=$configure_input;;
17560 esac
17561
17562 case $ac_tag in
ac50fbac
CR
17563 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17564 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
3185942a
JA
17565 esac
17566 ;;
ccc6cda3
JA
17567 esac
17568
3185942a 17569 ac_dir=`$as_dirname -- "$ac_file" ||
b80f6443 17570$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
0628567a
JA
17571 X"$ac_file" : 'X\(//\)[^/]' \| \
17572 X"$ac_file" : 'X\(//\)$' \| \
3185942a
JA
17573 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17574$as_echo X"$ac_file" |
17575 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17576 s//\1/
17577 q
17578 }
17579 /^X\(\/\/\)[^/].*/{
17580 s//\1/
17581 q
17582 }
17583 /^X\(\/\/\)$/{
17584 s//\1/
17585 q
17586 }
17587 /^X\(\/\).*/{
17588 s//\1/
17589 q
17590 }
17591 s/.*/./; q'`
ac50fbac 17592 as_dir="$ac_dir"; as_fn_mkdir_p
b80f6443
JA
17593 ac_builddir=.
17594
3185942a
JA
17595case "$ac_dir" in
17596.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17597*)
17598 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17599 # A ".." for each directory in $ac_dir_suffix.
17600 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17601 case $ac_top_builddir_sub in
17602 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17603 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17604 esac ;;
17605esac
17606ac_abs_top_builddir=$ac_pwd
17607ac_abs_builddir=$ac_pwd$ac_dir_suffix
17608# for backward compatibility:
17609ac_top_builddir=$ac_top_build_prefix
b80f6443
JA
17610
17611case $srcdir in
3185942a 17612 .) # We are building in place.
b80f6443 17613 ac_srcdir=.
3185942a
JA
17614 ac_top_srcdir=$ac_top_builddir_sub
17615 ac_abs_top_srcdir=$ac_pwd ;;
17616 [\\/]* | ?:[\\/]* ) # Absolute name.
b80f6443 17617 ac_srcdir=$srcdir$ac_dir_suffix;
3185942a
JA
17618 ac_top_srcdir=$srcdir
17619 ac_abs_top_srcdir=$srcdir ;;
17620 *) # Relative name.
17621 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17622 ac_top_srcdir=$ac_top_build_prefix$srcdir
17623 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
b80f6443 17624esac
3185942a 17625ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
0628567a 17626
b80f6443 17627
3185942a
JA
17628 case $ac_mode in
17629 :F)
17630 #
17631 # CONFIG_FILE
17632 #
ccc6cda3 17633
f73dda09
JA
17634 case $INSTALL in
17635 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
3185942a 17636 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ccc6cda3 17637 esac
3185942a 17638_ACEOF
ccc6cda3 17639
3185942a
JA
17640cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17641# If the template does not know about datarootdir, expand it.
17642# FIXME: This hack should be removed a few years after 2.60.
17643ac_datarootdir_hack=; ac_datarootdir_seen=
3185942a
JA
17644ac_sed_dataroot='
17645/datarootdir/ {
17646 p
17647 q
17648}
17649/@datadir@/p
17650/@docdir@/p
17651/@infodir@/p
17652/@localedir@/p
ac50fbac 17653/@mandir@/p'
3185942a
JA
17654case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17655*datarootdir*) ac_datarootdir_seen=yes;;
17656*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
ac50fbac 17657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
3185942a
JA
17658$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17659_ACEOF
17660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17661 ac_datarootdir_hack='
17662 s&@datadir@&$datadir&g
17663 s&@docdir@&$docdir&g
17664 s&@infodir@&$infodir&g
17665 s&@localedir@&$localedir&g
17666 s&@mandir@&$mandir&g
ac50fbac 17667 s&\\\${datarootdir}&$datarootdir&g' ;;
3185942a 17668esac
b80f6443 17669_ACEOF
3185942a
JA
17670
17671# Neutralize VPATH when `$srcdir' = `.'.
17672# Shell code in configure.ac might set extrasub.
17673# FIXME: do we really want to maintain this feature?
17674cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17675ac_sed_extra="$ac_vpsub
f73dda09 17676$extrasub
b80f6443 17677_ACEOF
3185942a 17678cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09
JA
17679:t
17680/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
3185942a
JA
17681s|@configure_input@|$ac_sed_conf_input|;t t
17682s&@top_builddir@&$ac_top_builddir_sub&;t t
17683s&@top_build_prefix@&$ac_top_build_prefix&;t t
17684s&@srcdir@&$ac_srcdir&;t t
17685s&@abs_srcdir@&$ac_abs_srcdir&;t t
17686s&@top_srcdir@&$ac_top_srcdir&;t t
17687s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17688s&@builddir@&$ac_builddir&;t t
17689s&@abs_builddir@&$ac_abs_builddir&;t t
17690s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17691s&@INSTALL@&$ac_INSTALL&;t t
17692$ac_datarootdir_hack
17693"
ac50fbac
CR
17694eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17695 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ccc6cda3 17696
3185942a 17697test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
ac50fbac
CR
17698 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17699 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17700 "$ac_tmp/out"`; test -z "$ac_out"; } &&
17701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17702which seems to be undefined. Please make sure it is defined" >&5
3185942a 17703$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ac50fbac 17704which seems to be undefined. Please make sure it is defined" >&2;}
ccc6cda3 17705
ac50fbac 17706 rm -f "$ac_tmp/stdin"
f73dda09 17707 case $ac_file in
ac50fbac
CR
17708 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17709 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
3185942a 17710 esac \
ac50fbac 17711 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
3185942a
JA
17712 ;;
17713 :H)
17714 #
17715 # CONFIG_HEADER
17716 #
f73dda09 17717 if test x"$ac_file" != x-; then
3185942a
JA
17718 {
17719 $as_echo "/* $configure_input */" \
ac50fbac
CR
17720 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17721 } >"$ac_tmp/config.h" \
17722 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17723 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17724 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
3185942a 17725$as_echo "$as_me: $ac_file is unchanged" >&6;}
f73dda09 17726 else
3185942a 17727 rm -f "$ac_file"
ac50fbac
CR
17728 mv "$ac_tmp/config.h" "$ac_file" \
17729 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ccc6cda3 17730 fi
f73dda09 17731 else
3185942a 17732 $as_echo "/* $configure_input */" \
ac50fbac
CR
17733 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17734 || as_fn_error $? "could not create -" "$LINENO" 5
ccc6cda3 17735 fi
3185942a 17736 ;;
0628567a 17737
ac50fbac 17738 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
3185942a
JA
17739$as_echo "$as_me: executing $ac_file commands" >&6;}
17740 ;;
17741 esac
b80f6443 17742
ccc6cda3 17743
3185942a
JA
17744 case $ac_file$ac_mode in
17745 "default-1":C)
b80f6443
JA
17746 for ac_file in $CONFIG_FILES; do
17747 # Support "outfile[:infile[:infile...]]"
17748 case "$ac_file" in
17749 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17750 esac
17751 # PO directories have a Makefile.in generated from Makefile.in.in.
17752 case "$ac_file" in */Makefile.in)
17753 # Adjust a relative srcdir.
17754 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
17755 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
17756 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
17757 # In autoconf-2.13 it is called $ac_given_srcdir.
17758 # In autoconf-2.50 it is called $srcdir.
17759 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
17760 case "$ac_given_srcdir" in
17761 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
17762 /*) top_srcdir="$ac_given_srcdir" ;;
17763 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
17764 esac
17765 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
17766 rm -f "$ac_dir/POTFILES"
17767 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
17768 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
17769 POMAKEFILEDEPS="POTFILES.in"
17770 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
17771 # on $ac_dir but don't depend on user-specified configuration
17772 # parameters.
17773 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
17774 # The LINGUAS file contains the set of available languages.
17775 if test -n "$OBSOLETE_ALL_LINGUAS"; then
17776 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
17777 fi
17778 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
17779 # Hide the ALL_LINGUAS assigment from automake.
17780 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
17781 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
17782 else
17783 # The set of available languages was given in configure.in.
17784 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
17785 fi
17786 case "$ac_given_srcdir" in
17787 .) srcdirpre= ;;
17788 *) srcdirpre='$(srcdir)/' ;;
17789 esac
17790 POFILES=
17791 GMOFILES=
17792 UPDATEPOFILES=
17793 DUMMYPOFILES=
17794 for lang in $ALL_LINGUAS; do
17795 POFILES="$POFILES $srcdirpre$lang.po"
17796 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
17797 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
17798 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
17799 done
17800 # CATALOGS depends on both $ac_dir and the user's LINGUAS
17801 # environment variable.
17802 INST_LINGUAS=
17803 if test -n "$ALL_LINGUAS"; then
17804 for presentlang in $ALL_LINGUAS; do
17805 useit=no
17806 if test "%UNSET%" != "$LINGUAS"; then
17807 desiredlanguages="$LINGUAS"
17808 else
17809 desiredlanguages="$ALL_LINGUAS"
17810 fi
17811 for desiredlang in $desiredlanguages; do
17812 # Use the presentlang catalog if desiredlang is
17813 # a. equal to presentlang, or
17814 # b. a variant of presentlang (because in this case,
17815 # presentlang can be used as a fallback for messages
17816 # which are not translated in the desiredlang catalog).
17817 case "$desiredlang" in
17818 "$presentlang"*) useit=yes;;
17819 esac
17820 done
17821 if test $useit = yes; then
17822 INST_LINGUAS="$INST_LINGUAS $presentlang"
17823 fi
17824 done
17825 fi
17826 CATALOGS=
17827 if test -n "$INST_LINGUAS"; then
17828 for lang in $INST_LINGUAS; do
17829 CATALOGS="$CATALOGS $lang.gmo"
17830 done
17831 fi
17832 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
17833 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"
17834 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
17835 if test -f "$f"; then
17836 case "$f" in
17837 *.orig | *.bak | *~) ;;
17838 *) cat "$f" >> "$ac_dir/Makefile" ;;
17839 esac
17840 fi
17841 done
17842 fi
17843 ;;
17844 esac
17845 done ;;
3185942a 17846 "default":C)
ccc6cda3
JA
17847# Makefile uses this timestamp file to record whether config.h is up to date.
17848echo timestamp > stamp-h
f73dda09 17849 ;;
3185942a 17850
f73dda09 17851 esac
3185942a 17852done # for ac_tag
ccc6cda3 17853
f73dda09 17854
ac50fbac 17855as_fn_exit 0
b80f6443 17856_ACEOF
f73dda09
JA
17857ac_clean_files=$ac_clean_files_save
17858
3185942a 17859test $ac_write_fail = 0 ||
ac50fbac 17860 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
3185942a 17861
b80f6443 17862
f73dda09
JA
17863# configure is writing to config.log, and then calls config.status.
17864# config.status does its own redirection, appending to config.log.
17865# Unfortunately, on DOS this fails, as config.log is still kept open
17866# by configure, so config.status won't be able to write to it; its
17867# output is simply discarded. So we exec the FD to /dev/null,
17868# effectively closing config.log, so it can be properly (re)opened and
17869# appended to by config.status. When coming back to configure, we
17870# need to make the FD available again.
17871if test "$no_create" != yes; then
17872 ac_cs_success=:
0628567a
JA
17873 ac_config_status_args=
17874 test "$silent" = yes &&
17875 ac_config_status_args="$ac_config_status_args --quiet"
f73dda09 17876 exec 5>/dev/null
0628567a 17877 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
f73dda09
JA
17878 exec 5>>config.log
17879 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17880 # would make configure fail if this is the last instruction.
ac50fbac 17881 $ac_cs_success || as_fn_exit 1
f73dda09 17882fi
3185942a 17883if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
ac50fbac 17884 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
3185942a
JA
17885$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17886fi
ccc6cda3 17887