]> git.ipfire.org Git - thirdparty/bash.git/blame - configure
Bash-4.4 patch 19
[thirdparty/bash.git] / configure
CommitLineData
ccc6cda3 1#! /bin/sh
a0c0a00f 2# From configure.ac for Bash 4.4, version 4.082.
f73dda09 3# Guess values for system-dependent variables and create Makefiles.
a0c0a00f 4# Generated by GNU Autoconf 2.69 for bash 4.4-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'
a0c0a00f
CR
584PACKAGE_VERSION='4.4-release'
585PACKAGE_STRING='bash 4.4-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
ac50fbac 805enable_direxpand_default
3185942a
JA
806enable_directory_stack
807enable_disabled_builtins
808enable_dparen_arithmetic
809enable_extended_glob
0001803f 810enable_extended_glob_default
a0c0a00f 811enable_function_import
ac50fbac 812enable_glob_asciiranges_default
3185942a
JA
813enable_help_builtin
814enable_history
815enable_job_control
816enable_multibyte
817enable_net_redirections
818enable_process_substitution
819enable_progcomp
820enable_prompt_string_decoding
821enable_readline
822enable_restricted
823enable_select
824enable_separate_helpfiles
825enable_single_help_strings
826enable_strict_posix_default
827enable_usg_echo_default
828enable_xpg_echo_default
829enable_mem_scramble
830enable_profiling
831enable_static_link
832enable_largefile
833enable_nls
834with_gnu_ld
835enable_rpath
836with_libiconv_prefix
837with_included_gettext
838with_libintl_prefix
839'
840 ac_precious_vars='build_alias
841host_alias
842target_alias
843DEBUGGER_START_FILE
ac50fbac
CR
844CC_FOR_BUILD
845CFLAGS_FOR_BUILD
846LDFLAGS_FOR_BUILD
847CPPFLAGS_FOR_BUILD
3185942a
JA
848CC
849CFLAGS
850LDFLAGS
851LIBS
852CPPFLAGS
853CPP
854YACC
855YFLAGS'
856
b80f6443 857
ccc6cda3 858# Initialize some variables set by options.
f73dda09
JA
859ac_init_help=
860ac_init_version=false
3185942a
JA
861ac_unrecognized_opts=
862ac_unrecognized_sep=
ccc6cda3
JA
863# The variables have the same names as the options, with
864# dashes changed to underlines.
f73dda09 865cache_file=/dev/null
ccc6cda3 866exec_prefix=NONE
ccc6cda3 867no_create=
ccc6cda3
JA
868no_recursion=
869prefix=NONE
870program_prefix=NONE
871program_suffix=NONE
872program_transform_name=s,x,x,
873silent=
874site=
875srcdir=
ccc6cda3
JA
876verbose=
877x_includes=NONE
878x_libraries=NONE
f73dda09
JA
879
880# Installation directory options.
881# These are left unexpanded so users can "make install exec_prefix=/foo"
882# and all the variables that are supposed to be based on exec_prefix
883# by default will actually change.
884# Use braces instead of parens because sh, perl, etc. also accept them.
3185942a 885# (The list follows the same order as the GNU Coding Standards.)
ccc6cda3
JA
886bindir='${exec_prefix}/bin'
887sbindir='${exec_prefix}/sbin'
888libexecdir='${exec_prefix}/libexec'
3185942a
JA
889datarootdir='${prefix}/share'
890datadir='${datarootdir}'
ccc6cda3
JA
891sysconfdir='${prefix}/etc'
892sharedstatedir='${prefix}/com'
893localstatedir='${prefix}/var'
ccc6cda3
JA
894includedir='${prefix}/include'
895oldincludedir='/usr/include'
3185942a
JA
896docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
897infodir='${datarootdir}/info'
898htmldir='${docdir}'
899dvidir='${docdir}'
900pdfdir='${docdir}'
901psdir='${docdir}'
902libdir='${exec_prefix}/lib'
903localedir='${datarootdir}/locale'
904mandir='${datarootdir}/man'
ccc6cda3 905
ccc6cda3 906ac_prev=
3185942a 907ac_dashdash=
ccc6cda3
JA
908for ac_option
909do
ccc6cda3
JA
910 # If the previous option needs an argument, assign it.
911 if test -n "$ac_prev"; then
3185942a 912 eval $ac_prev=\$ac_option
ccc6cda3
JA
913 ac_prev=
914 continue
915 fi
916
3185942a 917 case $ac_option in
ac50fbac
CR
918 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
919 *=) ac_optarg= ;;
920 *) ac_optarg=yes ;;
3185942a 921 esac
ccc6cda3
JA
922
923 # Accept the important Cygnus configure options, so we can diagnose typos.
924
3185942a
JA
925 case $ac_dashdash$ac_option in
926 --)
927 ac_dashdash=yes ;;
ccc6cda3
JA
928
929 -bindir | --bindir | --bindi | --bind | --bin | --bi)
930 ac_prev=bindir ;;
931 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
f73dda09 932 bindir=$ac_optarg ;;
ccc6cda3
JA
933
934 -build | --build | --buil | --bui | --bu)
f73dda09 935 ac_prev=build_alias ;;
ccc6cda3 936 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
f73dda09 937 build_alias=$ac_optarg ;;
ccc6cda3
JA
938
939 -cache-file | --cache-file | --cache-fil | --cache-fi \
940 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
941 ac_prev=cache_file ;;
942 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
943 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
f73dda09
JA
944 cache_file=$ac_optarg ;;
945
946 --config-cache | -C)
947 cache_file=config.cache ;;
ccc6cda3 948
3185942a 949 -datadir | --datadir | --datadi | --datad)
ccc6cda3 950 ac_prev=datadir ;;
3185942a 951 -datadir=* | --datadir=* | --datadi=* | --datad=*)
f73dda09 952 datadir=$ac_optarg ;;
ccc6cda3 953
3185942a
JA
954 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
955 | --dataroo | --dataro | --datar)
956 ac_prev=datarootdir ;;
957 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
958 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
959 datarootdir=$ac_optarg ;;
960
ccc6cda3 961 -disable-* | --disable-*)
3185942a 962 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ccc6cda3 963 # Reject names that are not valid shell variable names.
3185942a 964 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 965 as_fn_error $? "invalid feature name: $ac_useropt"
3185942a
JA
966 ac_useropt_orig=$ac_useropt
967 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
968 case $ac_user_opts in
969 *"
970"enable_$ac_useropt"
971"*) ;;
972 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
973 ac_unrecognized_sep=', ';;
974 esac
975 eval enable_$ac_useropt=no ;;
976
977 -docdir | --docdir | --docdi | --doc | --do)
978 ac_prev=docdir ;;
979 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
980 docdir=$ac_optarg ;;
981
982 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
983 ac_prev=dvidir ;;
984 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
985 dvidir=$ac_optarg ;;
ccc6cda3
JA
986
987 -enable-* | --enable-*)
3185942a 988 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ccc6cda3 989 # Reject names that are not valid shell variable names.
3185942a 990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 991 as_fn_error $? "invalid feature name: $ac_useropt"
3185942a
JA
992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
995 *"
996"enable_$ac_useropt"
997"*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
ccc6cda3 1000 esac
3185942a 1001 eval enable_$ac_useropt=\$ac_optarg ;;
ccc6cda3
JA
1002
1003 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1004 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1005 | --exec | --exe | --ex)
1006 ac_prev=exec_prefix ;;
1007 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1008 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1009 | --exec=* | --exe=* | --ex=*)
f73dda09 1010 exec_prefix=$ac_optarg ;;
ccc6cda3
JA
1011
1012 -gas | --gas | --ga | --g)
1013 # Obsolete; use --with-gas.
1014 with_gas=yes ;;
1015
f73dda09
JA
1016 -help | --help | --hel | --he | -h)
1017 ac_init_help=long ;;
1018 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1019 ac_init_help=recursive ;;
1020 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1021 ac_init_help=short ;;
ccc6cda3
JA
1022
1023 -host | --host | --hos | --ho)
f73dda09 1024 ac_prev=host_alias ;;
ccc6cda3 1025 -host=* | --host=* | --hos=* | --ho=*)
f73dda09 1026 host_alias=$ac_optarg ;;
ccc6cda3 1027
3185942a
JA
1028 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1029 ac_prev=htmldir ;;
1030 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1031 | --ht=*)
1032 htmldir=$ac_optarg ;;
1033
ccc6cda3
JA
1034 -includedir | --includedir | --includedi | --included | --include \
1035 | --includ | --inclu | --incl | --inc)
1036 ac_prev=includedir ;;
1037 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1038 | --includ=* | --inclu=* | --incl=* | --inc=*)
f73dda09 1039 includedir=$ac_optarg ;;
ccc6cda3
JA
1040
1041 -infodir | --infodir | --infodi | --infod | --info | --inf)
1042 ac_prev=infodir ;;
1043 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
f73dda09 1044 infodir=$ac_optarg ;;
ccc6cda3
JA
1045
1046 -libdir | --libdir | --libdi | --libd)
1047 ac_prev=libdir ;;
1048 -libdir=* | --libdir=* | --libdi=* | --libd=*)
f73dda09 1049 libdir=$ac_optarg ;;
ccc6cda3
JA
1050
1051 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1052 | --libexe | --libex | --libe)
1053 ac_prev=libexecdir ;;
1054 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1055 | --libexe=* | --libex=* | --libe=*)
f73dda09 1056 libexecdir=$ac_optarg ;;
ccc6cda3 1057
3185942a
JA
1058 -localedir | --localedir | --localedi | --localed | --locale)
1059 ac_prev=localedir ;;
1060 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1061 localedir=$ac_optarg ;;
1062
ccc6cda3 1063 -localstatedir | --localstatedir | --localstatedi | --localstated \
3185942a 1064 | --localstate | --localstat | --localsta | --localst | --locals)
ccc6cda3
JA
1065 ac_prev=localstatedir ;;
1066 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
3185942a 1067 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
f73dda09 1068 localstatedir=$ac_optarg ;;
ccc6cda3
JA
1069
1070 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1071 ac_prev=mandir ;;
1072 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
f73dda09 1073 mandir=$ac_optarg ;;
ccc6cda3
JA
1074
1075 -nfp | --nfp | --nf)
1076 # Obsolete; use --without-fp.
1077 with_fp=no ;;
1078
1079 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
b80f6443 1080 | --no-cr | --no-c | -n)
ccc6cda3
JA
1081 no_create=yes ;;
1082
1083 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1084 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1085 no_recursion=yes ;;
1086
1087 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1088 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1089 | --oldin | --oldi | --old | --ol | --o)
1090 ac_prev=oldincludedir ;;
1091 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1092 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1093 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
f73dda09 1094 oldincludedir=$ac_optarg ;;
ccc6cda3
JA
1095
1096 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1097 ac_prev=prefix ;;
1098 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
f73dda09 1099 prefix=$ac_optarg ;;
ccc6cda3
JA
1100
1101 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1102 | --program-pre | --program-pr | --program-p)
1103 ac_prev=program_prefix ;;
1104 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1105 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
f73dda09 1106 program_prefix=$ac_optarg ;;
ccc6cda3
JA
1107
1108 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1109 | --program-suf | --program-su | --program-s)
1110 ac_prev=program_suffix ;;
1111 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1112 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
f73dda09 1113 program_suffix=$ac_optarg ;;
ccc6cda3
JA
1114
1115 -program-transform-name | --program-transform-name \
1116 | --program-transform-nam | --program-transform-na \
1117 | --program-transform-n | --program-transform- \
1118 | --program-transform | --program-transfor \
1119 | --program-transfo | --program-transf \
1120 | --program-trans | --program-tran \
1121 | --progr-tra | --program-tr | --program-t)
1122 ac_prev=program_transform_name ;;
1123 -program-transform-name=* | --program-transform-name=* \
1124 | --program-transform-nam=* | --program-transform-na=* \
1125 | --program-transform-n=* | --program-transform-=* \
1126 | --program-transform=* | --program-transfor=* \
1127 | --program-transfo=* | --program-transf=* \
1128 | --program-trans=* | --program-tran=* \
1129 | --progr-tra=* | --program-tr=* | --program-t=*)
f73dda09 1130 program_transform_name=$ac_optarg ;;
ccc6cda3 1131
3185942a
JA
1132 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1133 ac_prev=pdfdir ;;
1134 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1135 pdfdir=$ac_optarg ;;
1136
1137 -psdir | --psdir | --psdi | --psd | --ps)
1138 ac_prev=psdir ;;
1139 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1140 psdir=$ac_optarg ;;
1141
ccc6cda3
JA
1142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1143 | -silent | --silent | --silen | --sile | --sil)
1144 silent=yes ;;
1145
1146 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1147 ac_prev=sbindir ;;
1148 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1149 | --sbi=* | --sb=*)
f73dda09 1150 sbindir=$ac_optarg ;;
ccc6cda3
JA
1151
1152 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1153 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1154 | --sharedst | --shareds | --shared | --share | --shar \
1155 | --sha | --sh)
1156 ac_prev=sharedstatedir ;;
1157 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1158 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1159 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1160 | --sha=* | --sh=*)
f73dda09 1161 sharedstatedir=$ac_optarg ;;
ccc6cda3
JA
1162
1163 -site | --site | --sit)
1164 ac_prev=site ;;
1165 -site=* | --site=* | --sit=*)
f73dda09 1166 site=$ac_optarg ;;
ccc6cda3
JA
1167
1168 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1169 ac_prev=srcdir ;;
1170 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
f73dda09 1171 srcdir=$ac_optarg ;;
ccc6cda3
JA
1172
1173 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1174 | --syscon | --sysco | --sysc | --sys | --sy)
1175 ac_prev=sysconfdir ;;
1176 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1177 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
f73dda09 1178 sysconfdir=$ac_optarg ;;
ccc6cda3
JA
1179
1180 -target | --target | --targe | --targ | --tar | --ta | --t)
f73dda09 1181 ac_prev=target_alias ;;
ccc6cda3 1182 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
f73dda09 1183 target_alias=$ac_optarg ;;
ccc6cda3
JA
1184
1185 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1186 verbose=yes ;;
1187
f73dda09
JA
1188 -version | --version | --versio | --versi | --vers | -V)
1189 ac_init_version=: ;;
ccc6cda3
JA
1190
1191 -with-* | --with-*)
3185942a 1192 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ccc6cda3 1193 # Reject names that are not valid shell variable names.
3185942a 1194 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 1195 as_fn_error $? "invalid package name: $ac_useropt"
3185942a
JA
1196 ac_useropt_orig=$ac_useropt
1197 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1198 case $ac_user_opts in
1199 *"
1200"with_$ac_useropt"
1201"*) ;;
1202 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1203 ac_unrecognized_sep=', ';;
ccc6cda3 1204 esac
3185942a 1205 eval with_$ac_useropt=\$ac_optarg ;;
ccc6cda3
JA
1206
1207 -without-* | --without-*)
3185942a 1208 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ccc6cda3 1209 # Reject names that are not valid shell variable names.
3185942a 1210 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ac50fbac 1211 as_fn_error $? "invalid package name: $ac_useropt"
3185942a
JA
1212 ac_useropt_orig=$ac_useropt
1213 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214 case $ac_user_opts in
1215 *"
1216"with_$ac_useropt"
1217"*) ;;
1218 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1219 ac_unrecognized_sep=', ';;
1220 esac
1221 eval with_$ac_useropt=no ;;
ccc6cda3
JA
1222
1223 --x)
1224 # Obsolete; use --with-x.
1225 with_x=yes ;;
1226
1227 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1228 | --x-incl | --x-inc | --x-in | --x-i)
1229 ac_prev=x_includes ;;
1230 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1231 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
f73dda09 1232 x_includes=$ac_optarg ;;
ccc6cda3
JA
1233
1234 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1235 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1236 ac_prev=x_libraries ;;
1237 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1238 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
f73dda09 1239 x_libraries=$ac_optarg ;;
ccc6cda3 1240
ac50fbac
CR
1241 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1242Try \`$0 --help' for more information"
ccc6cda3
JA
1243 ;;
1244
f73dda09
JA
1245 *=*)
1246 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1247 # Reject names that are not valid shell variable names.
ac50fbac
CR
1248 case $ac_envvar in #(
1249 '' | [0-9]* | *[!_$as_cr_alnum]* )
1250 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1251 esac
3185942a 1252 eval $ac_envvar=\$ac_optarg
f73dda09
JA
1253 export $ac_envvar ;;
1254
ccc6cda3 1255 *)
f73dda09 1256 # FIXME: should be removed in autoconf 3.0.
3185942a 1257 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
f73dda09 1258 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
3185942a 1259 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
ac50fbac 1260 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
ccc6cda3
JA
1261 ;;
1262
1263 esac
1264done
1265
1266if test -n "$ac_prev"; then
f73dda09 1267 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
ac50fbac 1268 as_fn_error $? "missing argument to $ac_option"
ccc6cda3 1269fi
ccc6cda3 1270
3185942a
JA
1271if test -n "$ac_unrecognized_opts"; then
1272 case $enable_option_checking in
1273 no) ;;
ac50fbac 1274 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
3185942a 1275 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
f73dda09 1276 esac
3185942a 1277fi
ccc6cda3 1278
3185942a
JA
1279# Check all directory arguments for consistency.
1280for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1281 datadir sysconfdir sharedstatedir localstatedir includedir \
1282 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1283 libdir localedir mandir
ccc6cda3 1284do
3185942a
JA
1285 eval ac_val=\$$ac_var
1286 # Remove trailing slashes.
f73dda09 1287 case $ac_val in
3185942a
JA
1288 */ )
1289 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1290 eval $ac_var=\$ac_val;;
ccc6cda3 1291 esac
3185942a
JA
1292 # Be sure to have absolute directory names.
1293 case $ac_val in
1294 [\\/$]* | ?:[\\/]* ) continue;;
1295 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1296 esac
ac50fbac 1297 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
ccc6cda3
JA
1298done
1299
f73dda09
JA
1300# There might be people who depend on the old broken behavior: `$host'
1301# used to hold the argument of --host etc.
b80f6443 1302# FIXME: To remove some day.
f73dda09
JA
1303build=$build_alias
1304host=$host_alias
1305target=$target_alias
1306
b80f6443 1307# FIXME: To remove some day.
f73dda09
JA
1308if test "x$host_alias" != x; then
1309 if test "x$build_alias" = x; then
1310 cross_compiling=maybe
f73dda09
JA
1311 elif test "x$build_alias" != "x$host_alias"; then
1312 cross_compiling=yes
1313 fi
1314fi
ccc6cda3 1315
f73dda09
JA
1316ac_tool_prefix=
1317test -n "$host_alias" && ac_tool_prefix=$host_alias-
ccc6cda3 1318
f73dda09 1319test "$silent" = yes && exec 6>/dev/null
ccc6cda3 1320
b80f6443 1321
3185942a
JA
1322ac_pwd=`pwd` && test -n "$ac_pwd" &&
1323ac_ls_di=`ls -di .` &&
1324ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
ac50fbac 1325 as_fn_error $? "working directory cannot be determined"
3185942a 1326test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
ac50fbac 1327 as_fn_error $? "pwd does not report name of working directory"
3185942a
JA
1328
1329
ccc6cda3
JA
1330# Find the source files, if location was not specified.
1331if test -z "$srcdir"; then
1332 ac_srcdir_defaulted=yes
3185942a
JA
1333 # Try the directory containing this script, then the parent directory.
1334 ac_confdir=`$as_dirname -- "$as_myself" ||
1335$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1336 X"$as_myself" : 'X\(//\)[^/]' \| \
1337 X"$as_myself" : 'X\(//\)$' \| \
1338 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1339$as_echo X"$as_myself" |
1340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1341 s//\1/
1342 q
1343 }
1344 /^X\(\/\/\)[^/].*/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\).*/{
1353 s//\1/
1354 q
1355 }
1356 s/.*/./; q'`
ccc6cda3 1357 srcdir=$ac_confdir
3185942a 1358 if test ! -r "$srcdir/$ac_unique_file"; then
ccc6cda3
JA
1359 srcdir=..
1360 fi
1361else
1362 ac_srcdir_defaulted=no
1363fi
3185942a
JA
1364if test ! -r "$srcdir/$ac_unique_file"; then
1365 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
ac50fbac 1366 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
ccc6cda3 1367fi
3185942a
JA
1368ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1369ac_abs_confdir=`(
ac50fbac 1370 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
3185942a
JA
1371 pwd)`
1372# When building in place, set srcdir=.
1373if test "$ac_abs_confdir" = "$ac_pwd"; then
1374 srcdir=.
1375fi
1376# Remove unnecessary trailing slashes from srcdir.
1377# Double slashes in file names in object file debugging info
1378# mess up M-x gdb in Emacs.
1379case $srcdir in
1380*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1381esac
1382for ac_var in $ac_precious_vars; do
1383 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1384 eval ac_env_${ac_var}_value=\$${ac_var}
1385 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1386 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1387done
ccc6cda3 1388
f73dda09
JA
1389#
1390# Report the --help message.
1391#
1392if test "$ac_init_help" = "long"; then
1393 # Omit some internal or obsolete options to make the list less imposing.
1394 # This message is too long to be a string in the A/UX 3.1 sh.
b80f6443 1395 cat <<_ACEOF
a0c0a00f 1396\`configure' configures bash 4.4-release to adapt to many kinds of systems.
ccc6cda3 1397
f73dda09 1398Usage: $0 [OPTION]... [VAR=VALUE]...
ccc6cda3 1399
f73dda09
JA
1400To assign environment variables (e.g., CC, CFLAGS...), specify them as
1401VAR=VALUE. See below for descriptions of some of the useful variables.
1402
1403Defaults for the options are specified in brackets.
ccc6cda3 1404
f73dda09
JA
1405Configuration:
1406 -h, --help display this help and exit
1407 --help=short display options specific to this package
1408 --help=recursive display the short help of all the included packages
1409 -V, --version display version information and exit
ac50fbac 1410 -q, --quiet, --silent do not print \`checking ...' messages
f73dda09
JA
1411 --cache-file=FILE cache test results in FILE [disabled]
1412 -C, --config-cache alias for \`--cache-file=config.cache'
1413 -n, --no-create do not create output files
1414 --srcdir=DIR find the sources in DIR [configure dir or \`..']
ccc6cda3 1415
f73dda09
JA
1416Installation directories:
1417 --prefix=PREFIX install architecture-independent files in PREFIX
3185942a 1418 [$ac_default_prefix]
f73dda09 1419 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
3185942a 1420 [PREFIX]
ccc6cda3 1421
f73dda09
JA
1422By default, \`make install' will install all the files in
1423\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1424an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1425for instance \`--prefix=\$HOME'.
ccc6cda3 1426
f73dda09 1427For better control, use the options below.
ccc6cda3 1428
f73dda09 1429Fine tuning of the installation directories:
3185942a
JA
1430 --bindir=DIR user executables [EPREFIX/bin]
1431 --sbindir=DIR system admin executables [EPREFIX/sbin]
1432 --libexecdir=DIR program executables [EPREFIX/libexec]
1433 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1434 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1435 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1436 --libdir=DIR object code libraries [EPREFIX/lib]
1437 --includedir=DIR C header files [PREFIX/include]
1438 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1439 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1440 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1441 --infodir=DIR info documentation [DATAROOTDIR/info]
1442 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1443 --mandir=DIR man documentation [DATAROOTDIR/man]
1444 --docdir=DIR documentation root [DATAROOTDIR/doc/bash]
1445 --htmldir=DIR html documentation [DOCDIR]
1446 --dvidir=DIR dvi documentation [DOCDIR]
1447 --pdfdir=DIR pdf documentation [DOCDIR]
1448 --psdir=DIR ps documentation [DOCDIR]
b80f6443 1449_ACEOF
f73dda09 1450
b80f6443 1451 cat <<\_ACEOF
f73dda09
JA
1452
1453System types:
1454 --build=BUILD configure for building on BUILD [guessed]
b80f6443
JA
1455 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1456_ACEOF
ccc6cda3 1457fi
ccc6cda3 1458
f73dda09
JA
1459if test -n "$ac_init_help"; then
1460 case $ac_init_help in
a0c0a00f 1461 short | recursive ) echo "Configuration of bash 4.4-release:";;
f73dda09 1462 esac
b80f6443 1463 cat <<\_ACEOF
ccc6cda3 1464
f73dda09 1465Optional Features:
3185942a 1466 --disable-option-checking ignore unrecognized --enable/--with options
f73dda09
JA
1467 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1468 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
7117c2d2
JA
1469 --enable-minimal-config a minimal sh-like configuration
1470 --enable-alias enable shell aliases
1471 --enable-arith-for-command
1472 enable arithmetic for command
1473 --enable-array-variables
1474 include shell array variables
1475 --enable-bang-history turn on csh-style history substitution
1476 --enable-brace-expansion
1477 include brace expansion
3185942a
JA
1478 --enable-casemod-attributes
1479 include case-modifying variable attributes
1480 --enable-casemod-expansions
1481 include case-modifying word expansions
7117c2d2
JA
1482 --enable-command-timing enable the time reserved word and command timing
1483 --enable-cond-command enable the conditional command
3185942a 1484 --enable-cond-regexp enable extended regular expression matching in
b80f6443 1485 conditional commands
3185942a
JA
1486 --enable-coprocesses enable coprocess support and the coproc reserved
1487 word
b80f6443 1488 --enable-debugger enable support for bash debugger
ac50fbac
CR
1489 --enable-direxpand-default
1490 enable the direxpand shell option by default
7117c2d2
JA
1491 --enable-directory-stack
1492 enable builtins pushd/popd/dirs
1493 --enable-disabled-builtins
1494 allow disabled builtins to still be invoked
1495 --enable-dparen-arithmetic
1496 include ((...)) command
1497 --enable-extended-glob include ksh-style extended pattern matching
0001803f
CR
1498 --enable-extended-glob-default
1499 force extended pattern matching to be enabled by
1500 default
a0c0a00f
CR
1501 --enable-function-import
1502 allow bash to import exported function definitions
1503 by default
ac50fbac
CR
1504 --enable-glob-asciiranges-default
1505 force bracket range expressions in pattern matching
1506 to use the C locale by default
7117c2d2
JA
1507 --enable-help-builtin include the help builtin
1508 --enable-history turn on command history
1509 --enable-job-control enable job control features
b80f6443 1510 --enable-multibyte enable multibyte characters if OS supports them
7117c2d2
JA
1511 --enable-net-redirections
1512 enable /dev/tcp/host/port redirection
1513 --enable-process-substitution
1514 enable process substitution
1515 --enable-progcomp enable programmable completion and the complete
1516 builtin
1517 --enable-prompt-string-decoding
1518 turn on escape character decoding in prompts
1519 --enable-readline turn on command line editing
1520 --enable-restricted enable a restricted shell
1521 --enable-select include select command
1522 --enable-separate-helpfiles
1523 use external files for help builtin documentation
95732b49
JA
1524 --enable-single-help-strings
1525 store help documentation as a single string to ease
1526 translation
1527 --enable-strict-posix-default
1528 configure bash to be posix-conformant by default
7117c2d2
JA
1529 --enable-usg-echo-default
1530 a synonym for --enable-xpg-echo-default
1531 --enable-xpg-echo-default
1532 make the echo builtin expand escape sequences by
1533 default
1534 --enable-mem-scramble scramble memory on calls to malloc and free
1535 --enable-profiling allow profiling with gprof
1536 --enable-static-link link bash statically, for use as a root shell
f73dda09 1537 --disable-largefile omit support for large files
b80f6443
JA
1538 --disable-nls do not use Native Language Support
1539 --disable-rpath do not hardcode runtime library paths
f73dda09
JA
1540
1541Optional Packages:
1542 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1543 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
7117c2d2
JA
1544 --with-afs if you are running AFS
1545 --with-bash-malloc use the Bash version of malloc
1546 --with-curses use the curses library instead of the termcap
1547 library
1548 --with-gnu-malloc synonym for --with-bash-malloc
1549 --with-installed-readline
1550 use a version of the readline library that is
1551 already installed
b80f6443
JA
1552 --with-gnu-ld assume the C compiler uses GNU ld default=no
1553 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1554 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1555 --with-included-gettext use the GNU gettext library included here
1556 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1557 --without-libintl-prefix don't search for libintl in includedir and libdir
f73dda09
JA
1558
1559Some influential environment variables:
b80f6443
JA
1560 DEBUGGER_START_FILE
1561 location of bash debugger initialization file
ac50fbac
CR
1562 CC_FOR_BUILD
1563 C compiler used when compiling binaries used only at build time
1564 CFLAGS_FOR_BUILD
1565 Compliation options (CFLAGS) used when compiling binaries used
1566 only at build time
1567 LDFLAGS_FOR_BUILD
1568 Linker options (LDFLAGS) used when compiling binaries used only
1569 at build time
1570 CPPFLAGS_FOR_BUILD
1571 C preprocessor options (CPPFLAGS) used when compiling binaries
1572 used only at build time
f73dda09
JA
1573 CC C compiler command
1574 CFLAGS C compiler flags
1575 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1576 nonstandard directory <lib dir>
3185942a 1577 LIBS libraries to pass to the linker, e.g. -l<library>
ac50fbac 1578 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
3185942a 1579 you have headers in a nonstandard directory <include dir>
f73dda09 1580 CPP C preprocessor
ac50fbac
CR
1581 YACC The `Yet Another Compiler Compiler' implementation to use.
1582 Defaults to the first program found out of: `bison -y', `byacc',
1583 `yacc'.
3185942a
JA
1584 YFLAGS The list of arguments that will be passed by default to $YACC.
1585 This script will default YFLAGS to the empty string to avoid a
1586 default value of `-d' given by some make applications.
f73dda09
JA
1587
1588Use these variables to override the choices made by `configure' or to help
1589it to find libraries and programs with nonstandard names/locations.
1590
1591Report bugs to <bug-bash@gnu.org>.
b80f6443 1592_ACEOF
3185942a 1593ac_status=$?
f73dda09
JA
1594fi
1595
1596if test "$ac_init_help" = "recursive"; then
1597 # If there are subdirs, report their specific --help.
b80f6443 1598 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
3185942a
JA
1599 test -d "$ac_dir" ||
1600 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1601 continue
b80f6443
JA
1602 ac_builddir=.
1603
3185942a
JA
1604case "$ac_dir" in
1605.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1606*)
1607 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1608 # A ".." for each directory in $ac_dir_suffix.
1609 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1610 case $ac_top_builddir_sub in
1611 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1612 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1613 esac ;;
1614esac
1615ac_abs_top_builddir=$ac_pwd
1616ac_abs_builddir=$ac_pwd$ac_dir_suffix
1617# for backward compatibility:
1618ac_top_builddir=$ac_top_build_prefix
ccc6cda3 1619
b80f6443 1620case $srcdir in
3185942a 1621 .) # We are building in place.
b80f6443 1622 ac_srcdir=.
3185942a
JA
1623 ac_top_srcdir=$ac_top_builddir_sub
1624 ac_abs_top_srcdir=$ac_pwd ;;
1625 [\\/]* | ?:[\\/]* ) # Absolute name.
b80f6443 1626 ac_srcdir=$srcdir$ac_dir_suffix;
3185942a
JA
1627 ac_top_srcdir=$srcdir
1628 ac_abs_top_srcdir=$srcdir ;;
1629 *) # Relative name.
1630 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1631 ac_top_srcdir=$ac_top_build_prefix$srcdir
1632 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
0628567a 1633esac
3185942a
JA
1634ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1635
1636 cd "$ac_dir" || { ac_status=$?; continue; }
1637 # Check for guested configure.
1638 if test -f "$ac_srcdir/configure.gnu"; then
1639 echo &&
1640 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1641 elif test -f "$ac_srcdir/configure"; then
1642 echo &&
1643 $SHELL "$ac_srcdir/configure" --help=recursive
f73dda09 1644 else
3185942a
JA
1645 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1646 fi || ac_status=$?
1647 cd "$ac_pwd" || { ac_status=$?; break; }
f73dda09
JA
1648 done
1649fi
ccc6cda3 1650
3185942a 1651test -n "$ac_init_help" && exit $ac_status
f73dda09 1652if $ac_init_version; then
b80f6443 1653 cat <<\_ACEOF
a0c0a00f 1654bash configure 4.4-release
ac50fbac 1655generated by GNU Autoconf 2.69
ccc6cda3 1656
ac50fbac 1657Copyright (C) 2012 Free Software Foundation, Inc.
f73dda09
JA
1658This configure script is free software; the Free Software Foundation
1659gives unlimited permission to copy, distribute and modify it.
b80f6443 1660_ACEOF
3185942a 1661 exit
f73dda09 1662fi
ccc6cda3 1663
ac50fbac
CR
1664## ------------------------ ##
1665## Autoconf initialization. ##
1666## ------------------------ ##
bb70624e 1667
ac50fbac
CR
1668# ac_fn_c_try_compile LINENO
1669# --------------------------
1670# Try to compile conftest.$ac_ext, and return whether this succeeded.
1671ac_fn_c_try_compile ()
f73dda09 1672{
ac50fbac
CR
1673 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1674 rm -f conftest.$ac_objext
1675 if { { ac_try="$ac_compile"
1676case "(($ac_try" in
1677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1678 *) ac_try_echo=$ac_try;;
1679esac
1680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1681$as_echo "$ac_try_echo"; } >&5
1682 (eval "$ac_compile") 2>conftest.err
1683 ac_status=$?
1684 if test -s conftest.err; then
1685 grep -v '^ *+' conftest.err >conftest.er1
1686 cat conftest.er1 >&5
1687 mv -f conftest.er1 conftest.err
1688 fi
1689 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1690 test $ac_status = 0; } && {
1691 test -z "$ac_c_werror_flag" ||
1692 test ! -s conftest.err
1693 } && test -s conftest.$ac_objext; then :
1694 ac_retval=0
1695else
1696 $as_echo "$as_me: failed program was:" >&5
1697sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1698
ac50fbac
CR
1699 ac_retval=1
1700fi
1701 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1702 as_fn_set_status $ac_retval
f73dda09 1703
ac50fbac 1704} # ac_fn_c_try_compile
f73dda09 1705
ac50fbac
CR
1706# ac_fn_c_try_link LINENO
1707# -----------------------
1708# Try to link conftest.$ac_ext, and return whether this succeeded.
1709ac_fn_c_try_link ()
1710{
1711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712 rm -f conftest.$ac_objext conftest$ac_exeext
1713 if { { ac_try="$ac_link"
1714case "(($ac_try" in
1715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1716 *) ac_try_echo=$ac_try;;
1717esac
1718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1719$as_echo "$ac_try_echo"; } >&5
1720 (eval "$ac_link") 2>conftest.err
1721 ac_status=$?
1722 if test -s conftest.err; then
1723 grep -v '^ *+' conftest.err >conftest.er1
1724 cat conftest.er1 >&5
1725 mv -f conftest.er1 conftest.err
1726 fi
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; } && {
1729 test -z "$ac_c_werror_flag" ||
1730 test ! -s conftest.err
1731 } && test -s conftest$ac_exeext && {
1732 test "$cross_compiling" = yes ||
1733 test -x conftest$ac_exeext
1734 }; then :
1735 ac_retval=0
1736else
1737 $as_echo "$as_me: failed program was:" >&5
1738sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1739
ac50fbac
CR
1740 ac_retval=1
1741fi
1742 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1743 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1744 # interfere with the next link command; also delete a directory that is
1745 # left behind by Apple's compiler. We do this before executing the actions.
1746 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1747 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1748 as_fn_set_status $ac_retval
b80f6443 1749
ac50fbac 1750} # ac_fn_c_try_link
b80f6443 1751
ac50fbac
CR
1752# ac_fn_c_try_cpp LINENO
1753# ----------------------
1754# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1755ac_fn_c_try_cpp ()
1756{
1757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758 if { { ac_try="$ac_cpp conftest.$ac_ext"
1759case "(($ac_try" in
1760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1761 *) ac_try_echo=$ac_try;;
1762esac
1763eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1764$as_echo "$ac_try_echo"; } >&5
1765 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1766 ac_status=$?
1767 if test -s conftest.err; then
1768 grep -v '^ *+' conftest.err >conftest.er1
1769 cat conftest.er1 >&5
1770 mv -f conftest.er1 conftest.err
1771 fi
1772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773 test $ac_status = 0; } > conftest.i && {
1774 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1775 test ! -s conftest.err
1776 }; then :
1777 ac_retval=0
1778else
1779 $as_echo "$as_me: failed program was:" >&5
1780sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1781
ac50fbac
CR
1782 ac_retval=1
1783fi
1784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1785 as_fn_set_status $ac_retval
b80f6443 1786
ac50fbac 1787} # ac_fn_c_try_cpp
b80f6443 1788
ac50fbac
CR
1789# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1790# -------------------------------------------------------
1791# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1792# the include files in INCLUDES and setting the cache variable VAR
1793# accordingly.
1794ac_fn_c_check_header_mongrel ()
1795{
1796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797 if eval \${$3+:} false; then :
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1799$as_echo_n "checking for $2... " >&6; }
1800if eval \${$3+:} false; then :
1801 $as_echo_n "(cached) " >&6
1802fi
1803eval ac_res=\$$3
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1805$as_echo "$ac_res" >&6; }
1806else
1807 # Is the header compilable?
1808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1809$as_echo_n "checking $2 usability... " >&6; }
1810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1811/* end confdefs.h. */
1812$4
1813#include <$2>
1814_ACEOF
1815if ac_fn_c_try_compile "$LINENO"; then :
1816 ac_header_compiler=yes
1817else
1818 ac_header_compiler=no
1819fi
1820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1822$as_echo "$ac_header_compiler" >&6; }
b80f6443 1823
ac50fbac
CR
1824# Is the header present?
1825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1826$as_echo_n "checking $2 presence... " >&6; }
1827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1828/* end confdefs.h. */
1829#include <$2>
b80f6443 1830_ACEOF
ac50fbac
CR
1831if ac_fn_c_try_cpp "$LINENO"; then :
1832 ac_header_preproc=yes
1833else
1834 ac_header_preproc=no
1835fi
1836rm -f conftest.err conftest.i conftest.$ac_ext
1837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1838$as_echo "$ac_header_preproc" >&6; }
f73dda09 1839
ac50fbac
CR
1840# So? What about this header?
1841case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1842 yes:no: )
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1844$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1846$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1847 ;;
1848 no:yes:* )
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1850$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1852$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1854$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1856$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1858$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1859( $as_echo "## ------------------------------- ##
1860## Report this to bug-bash@gnu.org ##
1861## ------------------------------- ##"
1862 ) | sed "s/^/$as_me: WARNING: /" >&2
1863 ;;
1864esac
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1866$as_echo_n "checking for $2... " >&6; }
1867if eval \${$3+:} false; then :
1868 $as_echo_n "(cached) " >&6
1869else
1870 eval "$3=\$ac_header_compiler"
1871fi
1872eval ac_res=\$$3
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1874$as_echo "$ac_res" >&6; }
1875fi
1876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
f73dda09 1877
ac50fbac 1878} # ac_fn_c_check_header_mongrel
f73dda09 1879
ac50fbac
CR
1880# ac_fn_c_try_run LINENO
1881# ----------------------
1882# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1883# that executables *can* be run.
1884ac_fn_c_try_run ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887 if { { ac_try="$ac_link"
1888case "(($ac_try" in
1889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1890 *) ac_try_echo=$ac_try;;
1891esac
1892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1893$as_echo "$ac_try_echo"; } >&5
1894 (eval "$ac_link") 2>&5
1895 ac_status=$?
1896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1898 { { case "(($ac_try" in
1899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1900 *) ac_try_echo=$ac_try;;
1901esac
1902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1903$as_echo "$ac_try_echo"; } >&5
1904 (eval "$ac_try") 2>&5
1905 ac_status=$?
1906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1907 test $ac_status = 0; }; }; then :
1908 ac_retval=0
1909else
1910 $as_echo "$as_me: program exited with status $ac_status" >&5
1911 $as_echo "$as_me: failed program was:" >&5
1912sed 's/^/| /' conftest.$ac_ext >&5
0628567a 1913
ac50fbac
CR
1914 ac_retval=$ac_status
1915fi
1916 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1917 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1918 as_fn_set_status $ac_retval
0628567a 1919
ac50fbac 1920} # ac_fn_c_try_run
0628567a 1921
ac50fbac
CR
1922# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1923# -------------------------------------------------------
1924# Tests whether HEADER exists and can be compiled using the include files in
1925# INCLUDES, setting the cache variable VAR accordingly.
1926ac_fn_c_check_header_compile ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
1931if eval \${$3+:} false; then :
1932 $as_echo_n "(cached) " >&6
1933else
1934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h. */
1936$4
1937#include <$2>
1938_ACEOF
1939if ac_fn_c_try_compile "$LINENO"; then :
1940 eval "$3=yes"
1941else
1942 eval "$3=no"
1943fi
1944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1945fi
1946eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948$as_echo "$ac_res" >&6; }
1949 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
0628567a 1950
ac50fbac 1951} # ac_fn_c_check_header_compile
f73dda09 1952
ac50fbac
CR
1953# ac_fn_c_check_func LINENO FUNC VAR
1954# ----------------------------------
1955# Tests whether FUNC exists, setting the cache variable VAR accordingly
1956ac_fn_c_check_func ()
1957{
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1960$as_echo_n "checking for $2... " >&6; }
1961if eval \${$3+:} false; then :
1962 $as_echo_n "(cached) " >&6
1963else
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1967 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1968#define $2 innocuous_$2
f73dda09 1969
ac50fbac
CR
1970/* System header to define __stub macros and hopefully few prototypes,
1971 which can conflict with char $2 (); below.
1972 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1973 <limits.h> exists even on freestanding compilers. */
b80f6443 1974
ac50fbac
CR
1975#ifdef __STDC__
1976# include <limits.h>
1977#else
1978# include <assert.h>
1979#endif
b80f6443 1980
ac50fbac 1981#undef $2
b80f6443 1982
ac50fbac
CR
1983/* Override any GCC internal prototype to avoid an error.
1984 Use char because int might match the return type of a GCC
1985 builtin and then its argument prototype would still apply. */
1986#ifdef __cplusplus
1987extern "C"
1988#endif
1989char $2 ();
1990/* The GNU C library defines this for functions which it implements
1991 to always fail with ENOSYS. Some functions are actually named
1992 something starting with __ and the normal name is an alias. */
1993#if defined __stub_$2 || defined __stub___$2
1994choke me
1995#endif
1996
1997int
1998main ()
1999{
2000return $2 ();
2001 ;
2002 return 0;
2003}
b80f6443 2004_ACEOF
ac50fbac
CR
2005if ac_fn_c_try_link "$LINENO"; then :
2006 eval "$3=yes"
2007else
2008 eval "$3=no"
2009fi
2010rm -f core conftest.err conftest.$ac_objext \
2011 conftest$ac_exeext conftest.$ac_ext
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
2016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
b80f6443 2017
ac50fbac 2018} # ac_fn_c_check_func
b80f6443 2019
ac50fbac
CR
2020# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2021# -------------------------------------------
2022# Tests whether TYPE exists after having included INCLUDES, setting cache
2023# variable VAR accordingly.
2024ac_fn_c_check_type ()
2025{
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2028$as_echo_n "checking for $2... " >&6; }
2029if eval \${$3+:} false; then :
2030 $as_echo_n "(cached) " >&6
2031else
2032 eval "$3=no"
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$4
2036int
2037main ()
2038{
2039if (sizeof ($2))
2040 return 0;
2041 ;
2042 return 0;
2043}
b80f6443 2044_ACEOF
ac50fbac
CR
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052if (sizeof (($2)))
2053 return 0;
2054 ;
2055 return 0;
2056}
b80f6443 2057_ACEOF
ac50fbac 2058if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 2059
3185942a 2060else
ac50fbac 2061 eval "$3=yes"
3185942a 2062fi
ac50fbac 2063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 2064fi
ac50fbac 2065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 2066fi
ac50fbac
CR
2067eval ac_res=\$$3
2068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2069$as_echo "$ac_res" >&6; }
2070 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
f73dda09 2071
ac50fbac 2072} # ac_fn_c_check_type
b80f6443 2073
ac50fbac
CR
2074# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2075# ---------------------------------------------
2076# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2077# accordingly.
2078ac_fn_c_check_decl ()
2079{
2080 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2081 as_decl_name=`echo $2|sed 's/ *(.*//'`
2082 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2084$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2085if eval \${$3+:} false; then :
2086 $as_echo_n "(cached) " >&6
2087else
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094#ifndef $as_decl_name
2095#ifdef __cplusplus
2096 (void) $as_decl_use;
2097#else
2098 (void) $as_decl_name;
2099#endif
2100#endif
b80f6443 2101
ac50fbac
CR
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 eval "$3=yes"
2108else
2109 eval "$3=no"
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112fi
2113eval ac_res=\$$3
2114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2115$as_echo "$ac_res" >&6; }
2116 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
b80f6443 2117
ac50fbac 2118} # ac_fn_c_check_decl
b80f6443 2119
ac50fbac
CR
2120# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2121# --------------------------------------------
2122# Tries to find the compile-time value of EXPR in a program that includes
2123# INCLUDES, setting VAR accordingly. Returns whether the value could be
2124# computed
2125ac_fn_c_compute_int ()
2126{
2127 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128 if test "$cross_compiling" = yes; then
2129 # Depending upon the size, compute the lo and hi bounds.
2130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133int
2134main ()
2135{
2136static int test_array [1 - 2 * !(($2) >= 0)];
2137test_array [0] = 0;
2138return test_array [0];
b80f6443 2139
ac50fbac
CR
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_compile "$LINENO"; then :
2145 ac_lo=0 ac_mid=0
2146 while :; do
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h. */
2149$4
2150int
2151main ()
2152{
2153static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2154test_array [0] = 0;
2155return test_array [0];
b80f6443 2156
ac50fbac
CR
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_c_try_compile "$LINENO"; then :
2162 ac_hi=$ac_mid; break
2163else
2164 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2165 if test $ac_lo -le $ac_mid; then
2166 ac_lo= ac_hi=
2167 break
2168 fi
2169 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2170fi
2171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172 done
2173else
2174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2175/* end confdefs.h. */
2176$4
2177int
2178main ()
2179{
2180static int test_array [1 - 2 * !(($2) < 0)];
2181test_array [0] = 0;
2182return test_array [0];
b80f6443 2183
ac50fbac
CR
2184 ;
2185 return 0;
2186}
2187_ACEOF
2188if ac_fn_c_try_compile "$LINENO"; then :
2189 ac_hi=-1 ac_mid=-1
2190 while :; do
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193$4
2194int
2195main ()
2196{
2197static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2198test_array [0] = 0;
2199return test_array [0];
b80f6443 2200
ac50fbac
CR
2201 ;
2202 return 0;
2203}
2204_ACEOF
2205if ac_fn_c_try_compile "$LINENO"; then :
2206 ac_lo=$ac_mid; break
2207else
2208 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2209 if test $ac_mid -le $ac_hi; then
2210 ac_lo= ac_hi=
2211 break
2212 fi
2213 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2214fi
2215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2216 done
2217else
2218 ac_lo= ac_hi=
2219fi
2220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221fi
2222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2223# Binary search between lo and hi bounds.
2224while test "x$ac_lo" != "x$ac_hi"; do
2225 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2233test_array [0] = 0;
2234return test_array [0];
b80f6443 2235
ac50fbac
CR
2236 ;
2237 return 0;
2238}
2239_ACEOF
2240if ac_fn_c_try_compile "$LINENO"; then :
2241 ac_hi=$ac_mid
2242else
2243 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2244fi
2245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2246done
2247case $ac_lo in #((
2248?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2249'') ac_retval=1 ;;
2250esac
2251 else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$4
2255static long int longval () { return $2; }
2256static unsigned long int ulongval () { return $2; }
2257#include <stdio.h>
2258#include <stdlib.h>
2259int
2260main ()
2261{
b80f6443 2262
ac50fbac
CR
2263 FILE *f = fopen ("conftest.val", "w");
2264 if (! f)
2265 return 1;
2266 if (($2) < 0)
2267 {
2268 long int i = longval ();
2269 if (i != ($2))
2270 return 1;
2271 fprintf (f, "%ld", i);
2272 }
2273 else
2274 {
2275 unsigned long int i = ulongval ();
2276 if (i != ($2))
2277 return 1;
2278 fprintf (f, "%lu", i);
2279 }
2280 /* Do not output a trailing newline, as this causes \r\n confusion
2281 on some platforms. */
2282 return ferror (f) || fclose (f) != 0;
b80f6443 2283
ac50fbac
CR
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_run "$LINENO"; then :
2289 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2290else
2291 ac_retval=1
2292fi
2293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2294 conftest.$ac_objext conftest.beam conftest.$ac_ext
2295rm -f conftest.val
b80f6443 2296
ac50fbac
CR
2297 fi
2298 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299 as_fn_set_status $ac_retval
b80f6443 2300
ac50fbac 2301} # ac_fn_c_compute_int
b80f6443 2302
ac50fbac
CR
2303# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2304# ----------------------------------------------------
2305# Tries to find if the field MEMBER exists in type AGGR, after including
2306# INCLUDES, setting cache variable VAR accordingly.
2307ac_fn_c_check_member ()
2308{
2309 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2311$as_echo_n "checking for $2.$3... " >&6; }
2312if eval \${$4+:} false; then :
3185942a
JA
2313 $as_echo_n "(cached) " >&6
2314else
ac50fbac
CR
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$5
2318int
2319main ()
2320{
2321static $2 ac_aggr;
2322if (ac_aggr.$3)
2323return 0;
2324 ;
2325 return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"; then :
2329 eval "$4=yes"
3185942a 2330else
ac50fbac
CR
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332/* end confdefs.h. */
2333$5
2334int
2335main ()
2336{
2337static $2 ac_aggr;
2338if (sizeof ac_aggr.$3)
2339return 0;
2340 ;
2341 return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_compile "$LINENO"; then :
2345 eval "$4=yes"
3185942a 2346else
ac50fbac 2347 eval "$4=no"
3185942a 2348fi
ac50fbac 2349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185942a 2350fi
ac50fbac 2351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185942a 2352fi
ac50fbac
CR
2353eval ac_res=\$$4
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2355$as_echo "$ac_res" >&6; }
2356 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
d166f048 2357
ac50fbac
CR
2358} # ac_fn_c_check_member
2359cat >config.log <<_ACEOF
2360This file contains any messages produced by compilers while
2361running configure, to aid debugging if configure makes a mistake.
3185942a 2362
a0c0a00f 2363It was created by bash $as_me 4.4-release, which was
ac50fbac 2364generated by GNU Autoconf 2.69. Invocation command line was
3185942a 2365
ac50fbac 2366 $ $0 $@
d166f048 2367
ac50fbac
CR
2368_ACEOF
2369exec 5>>config.log
2370{
2371cat <<_ASUNAME
2372## --------- ##
2373## Platform. ##
2374## --------- ##
3185942a 2375
ac50fbac
CR
2376hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2377uname -m = `(uname -m) 2>/dev/null || echo unknown`
2378uname -r = `(uname -r) 2>/dev/null || echo unknown`
2379uname -s = `(uname -s) 2>/dev/null || echo unknown`
2380uname -v = `(uname -v) 2>/dev/null || echo unknown`
3185942a 2381
ac50fbac
CR
2382/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2383/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
ccc6cda3 2384
ac50fbac
CR
2385/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2386/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2387/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2388/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2389/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2390/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2391/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
f73dda09 2392
ac50fbac 2393_ASUNAME
f73dda09 2394
ac50fbac
CR
2395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2396for as_dir in $PATH
2397do
2398 IFS=$as_save_IFS
2399 test -z "$as_dir" && as_dir=.
2400 $as_echo "PATH: $as_dir"
2401 done
2402IFS=$as_save_IFS
bb70624e 2403
ac50fbac 2404} >&5
ccc6cda3 2405
ac50fbac 2406cat >&5 <<_ACEOF
7117c2d2 2407
ccc6cda3 2408
ac50fbac
CR
2409## ----------- ##
2410## Core tests. ##
2411## ----------- ##
d166f048 2412
b80f6443 2413_ACEOF
ccc6cda3 2414
d166f048 2415
ac50fbac
CR
2416# Keep a trace of the command line.
2417# Strip out --no-create and --no-recursion so they do not pile up.
2418# Strip out --silent because we don't want to record it for future runs.
2419# Also quote any args containing shell meta-characters.
2420# Make two passes to allow for proper duplicate-argument suppression.
2421ac_configure_args=
2422ac_configure_args0=
2423ac_configure_args1=
2424ac_must_keep_next=false
2425for ac_pass in 1 2
2426do
2427 for ac_arg
2428 do
2429 case $ac_arg in
2430 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2431 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2432 | -silent | --silent | --silen | --sile | --sil)
2433 continue ;;
2434 *\'*)
2435 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2436 esac
2437 case $ac_pass in
2438 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2439 2)
2440 as_fn_append ac_configure_args1 " '$ac_arg'"
2441 if test $ac_must_keep_next = true; then
2442 ac_must_keep_next=false # Got value, back to normal.
2443 else
2444 case $ac_arg in
2445 *=* | --config-cache | -C | -disable-* | --disable-* \
2446 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2447 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2448 | -with-* | --with-* | -without-* | --without-* | --x)
2449 case "$ac_configure_args0 " in
2450 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2451 esac
2452 ;;
2453 -* ) ac_must_keep_next=true ;;
2454 esac
2455 fi
2456 as_fn_append ac_configure_args " '$ac_arg'"
2457 ;;
2458 esac
2459 done
2460done
2461{ ac_configure_args0=; unset ac_configure_args0;}
2462{ ac_configure_args1=; unset ac_configure_args1;}
b80f6443 2463
ac50fbac
CR
2464# When interrupted or exit'd, cleanup temporary files, and complete
2465# config.log. We remove comments because anyway the quotes in there
2466# would cause problems or look ugly.
2467# WARNING: Use '\'' to represent an apostrophe within the trap.
2468# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2469trap 'exit_status=$?
2470 # Save into config.log some information that might help in debugging.
2471 {
2472 echo
ccc6cda3 2473
ac50fbac
CR
2474 $as_echo "## ---------------- ##
2475## Cache variables. ##
2476## ---------------- ##"
2477 echo
2478 # The following way of writing the cache mishandles newlines in values,
2479(
2480 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2481 eval ac_val=\$$ac_var
2482 case $ac_val in #(
2483 *${as_nl}*)
2484 case $ac_var in #(
2485 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2486$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2487 esac
2488 case $ac_var in #(
2489 _ | IFS | as_nl) ;; #(
2490 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2491 *) { eval $ac_var=; unset $ac_var;} ;;
2492 esac ;;
2493 esac
2494 done
2495 (set) 2>&1 |
2496 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2497 *${as_nl}ac_space=\ *)
2498 sed -n \
2499 "s/'\''/'\''\\\\'\'''\''/g;
2500 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2501 ;; #(
2502 *)
2503 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2504 ;;
2505 esac |
2506 sort
2507)
2508 echo
cce855bc 2509
ac50fbac
CR
2510 $as_echo "## ----------------- ##
2511## Output variables. ##
2512## ----------------- ##"
2513 echo
2514 for ac_var in $ac_subst_vars
2515 do
2516 eval ac_val=\$$ac_var
2517 case $ac_val in
2518 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2519 esac
2520 $as_echo "$ac_var='\''$ac_val'\''"
2521 done | sort
2522 echo
ccc6cda3 2523
ac50fbac
CR
2524 if test -n "$ac_subst_files"; then
2525 $as_echo "## ------------------- ##
2526## File substitutions. ##
2527## ------------------- ##"
2528 echo
2529 for ac_var in $ac_subst_files
2530 do
2531 eval ac_val=\$$ac_var
2532 case $ac_val in
2533 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2534 esac
2535 $as_echo "$ac_var='\''$ac_val'\''"
2536 done | sort
2537 echo
2538 fi
3185942a 2539
ac50fbac
CR
2540 if test -s confdefs.h; then
2541 $as_echo "## ----------- ##
2542## confdefs.h. ##
2543## ----------- ##"
2544 echo
2545 cat confdefs.h
2546 echo
2547 fi
2548 test "$ac_signal" != 0 &&
2549 $as_echo "$as_me: caught signal $ac_signal"
2550 $as_echo "$as_me: exit $exit_status"
2551 } >&5
2552 rm -f core *.core core.conftest.* &&
2553 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2554 exit $exit_status
2555' 0
2556for ac_signal in 1 2 13 15; do
2557 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2558done
2559ac_signal=0
ccc6cda3 2560
ac50fbac
CR
2561# confdefs.h avoids OS command line length limits that DEFS can exceed.
2562rm -f -r conftest* confdefs.h
ccc6cda3 2563
ac50fbac 2564$as_echo "/* confdefs.h */" > confdefs.h
3185942a 2565
ac50fbac 2566# Predefined preprocessor variables.
3185942a 2567
ac50fbac
CR
2568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_NAME "$PACKAGE_NAME"
2570_ACEOF
3185942a 2571
ac50fbac
CR
2572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2574_ACEOF
3185942a 2575
ac50fbac
CR
2576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_VERSION "$PACKAGE_VERSION"
2578_ACEOF
3185942a 2579
ac50fbac
CR
2580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_STRING "$PACKAGE_STRING"
2582_ACEOF
3185942a 2583
ac50fbac
CR
2584cat >>confdefs.h <<_ACEOF
2585#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2586_ACEOF
3185942a 2587
ac50fbac
CR
2588cat >>confdefs.h <<_ACEOF
2589#define PACKAGE_URL "$PACKAGE_URL"
2590_ACEOF
3185942a 2591
3185942a 2592
ac50fbac
CR
2593# Let the site file select an alternate cache file if it wants to.
2594# Prefer an explicitly selected file to automatically selected ones.
2595ac_site_file1=NONE
2596ac_site_file2=NONE
2597if test -n "$CONFIG_SITE"; then
2598 # We do not want a PATH search for config.site.
2599 case $CONFIG_SITE in #((
2600 -*) ac_site_file1=./$CONFIG_SITE;;
2601 */*) ac_site_file1=$CONFIG_SITE;;
2602 *) ac_site_file1=./$CONFIG_SITE;;
2603 esac
2604elif test "x$prefix" != xNONE; then
2605 ac_site_file1=$prefix/share/config.site
2606 ac_site_file2=$prefix/etc/config.site
2607else
2608 ac_site_file1=$ac_default_prefix/share/config.site
2609 ac_site_file2=$ac_default_prefix/etc/config.site
3185942a 2610fi
ac50fbac
CR
2611for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2612do
2613 test "x$ac_site_file" = xNONE && continue
2614 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2616$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2617 sed 's/^/| /' "$ac_site_file" >&5
2618 . "$ac_site_file" \
2619 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2620$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2621as_fn_error $? "failed to load site script $ac_site_file
2622See \`config.log' for more details" "$LINENO" 5; }
2623 fi
2624done
3185942a 2625
ac50fbac
CR
2626if test -r "$cache_file"; then
2627 # Some versions of bash will fail to source /dev/null (special files
2628 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2629 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2630 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2631$as_echo "$as_me: loading cache $cache_file" >&6;}
2632 case $cache_file in
2633 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2634 *) . "./$cache_file";;
2635 esac
2636 fi
2637else
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2639$as_echo "$as_me: creating cache $cache_file" >&6;}
2640 >$cache_file
3185942a
JA
2641fi
2642
ac50fbac
CR
2643as_fn_append ac_header_list " stdlib.h"
2644as_fn_append ac_header_list " unistd.h"
2645as_fn_append ac_header_list " sys/param.h"
2646as_fn_append ac_header_list " sys/time.h"
2647as_fn_append ac_func_list " alarm"
2648as_fn_append ac_func_list " fpurge"
2649as_fn_append ac_func_list " __fpurge"
2650as_fn_append ac_func_list " snprintf"
2651as_fn_append ac_func_list " vsnprintf"
2652# Check that the precious variables saved in the cache have kept the same
2653# value.
2654ac_cache_corrupted=false
2655for ac_var in $ac_precious_vars; do
2656 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2657 eval ac_new_set=\$ac_env_${ac_var}_set
2658 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2659 eval ac_new_val=\$ac_env_${ac_var}_value
2660 case $ac_old_set,$ac_new_set in
2661 set,)
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2663$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2664 ac_cache_corrupted=: ;;
2665 ,set)
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2667$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2668 ac_cache_corrupted=: ;;
2669 ,);;
2670 *)
2671 if test "x$ac_old_val" != "x$ac_new_val"; then
2672 # differences in whitespace do not lead to failure.
2673 ac_old_val_w=`echo x $ac_old_val`
2674 ac_new_val_w=`echo x $ac_new_val`
2675 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2677$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2678 ac_cache_corrupted=:
2679 else
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2681$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2682 eval $ac_var=\$ac_old_val
2683 fi
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2685$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2687$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2688 fi;;
2689 esac
2690 # Pass precious variables to config.status.
2691 if test "$ac_new_set" = set; then
2692 case $ac_new_val in
2693 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2694 *) ac_arg=$ac_var=$ac_new_val ;;
2695 esac
2696 case " $ac_configure_args " in
2697 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2698 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2699 esac
2700 fi
2701done
2702if $ac_cache_corrupted; then
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2706$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2707 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3185942a 2708fi
ac50fbac
CR
2709## -------------------- ##
2710## Main body of script. ##
2711## -------------------- ##
3185942a 2712
ac50fbac
CR
2713ac_ext=c
2714ac_cpp='$CPP $CPPFLAGS'
2715ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2716ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2717ac_compiler_gnu=$ac_cv_c_compiler_gnu
3185942a 2718
3185942a 2719
3185942a 2720
0001803f 2721
3185942a 2722
3185942a 2723
ac50fbac
CR
2724ac_aux_dir=
2725for ac_dir in ./support "$srcdir"/./support; do
2726 if test -f "$ac_dir/install-sh"; then
2727 ac_aux_dir=$ac_dir
2728 ac_install_sh="$ac_aux_dir/install-sh -c"
2729 break
2730 elif test -f "$ac_dir/install.sh"; then
2731 ac_aux_dir=$ac_dir
2732 ac_install_sh="$ac_aux_dir/install.sh -c"
2733 break
2734 elif test -f "$ac_dir/shtool"; then
2735 ac_aux_dir=$ac_dir
2736 ac_install_sh="$ac_aux_dir/shtool install -c"
2737 break
2738 fi
2739done
2740if test -z "$ac_aux_dir"; then
2741 as_fn_error $? "cannot find install-sh, install.sh, or shtool in ./support \"$srcdir\"/./support" "$LINENO" 5
3185942a
JA
2742fi
2743
ac50fbac
CR
2744# These three variables are undocumented and unsupported,
2745# and are intended to be withdrawn in a future Autoconf release.
2746# They can cause serious problems if a builder's source tree is in a directory
2747# whose full name contains unusual characters.
2748ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2749ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2750ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3185942a 2751
3185942a 2752
ac50fbac 2753ac_config_headers="$ac_config_headers config.h"
3185942a 2754
3185942a 2755
a0c0a00f 2756BASHVERS=4.4
ac50fbac 2757RELSTATUS=release
3185942a 2758
ac50fbac 2759case "$RELSTATUS" in
a0c0a00f 2760alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
ac50fbac
CR
2761*) DEBUG= MALLOC_DEBUG= ;;
2762esac
3185942a 2763
ac50fbac
CR
2764# Make sure we can run config.sub.
2765$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2766 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3185942a 2767
ac50fbac
CR
2768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2769$as_echo_n "checking build system type... " >&6; }
2770if ${ac_cv_build+:} false; then :
2771 $as_echo_n "(cached) " >&6
2772else
2773 ac_build_alias=$build_alias
2774test "x$ac_build_alias" = x &&
2775 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2776test "x$ac_build_alias" = x &&
2777 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2778ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2779 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3185942a 2780
3185942a 2781fi
ac50fbac
CR
2782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2783$as_echo "$ac_cv_build" >&6; }
2784case $ac_cv_build in
2785*-*-*) ;;
2786*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2787esac
2788build=$ac_cv_build
2789ac_save_IFS=$IFS; IFS='-'
2790set x $ac_cv_build
2791shift
2792build_cpu=$1
2793build_vendor=$2
2794shift; shift
2795# Remember, the first character of IFS is used to create $*,
2796# except with old shells:
2797build_os=$*
2798IFS=$ac_save_IFS
2799case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3185942a 2800
3185942a 2801
ac50fbac
CR
2802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2803$as_echo_n "checking host system type... " >&6; }
2804if ${ac_cv_host+:} false; then :
2805 $as_echo_n "(cached) " >&6
2806else
2807 if test "x$host_alias" = x; then
2808 ac_cv_host=$ac_cv_build
2809else
2810 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2811 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3185942a
JA
2812fi
2813
3185942a 2814fi
ac50fbac
CR
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2816$as_echo "$ac_cv_host" >&6; }
2817case $ac_cv_host in
2818*-*-*) ;;
2819*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2820esac
2821host=$ac_cv_host
2822ac_save_IFS=$IFS; IFS='-'
2823set x $ac_cv_host
2824shift
2825host_cpu=$1
2826host_vendor=$2
2827shift; shift
2828# Remember, the first character of IFS is used to create $*,
2829# except with old shells:
2830host_os=$*
2831IFS=$ac_save_IFS
2832case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3185942a 2833
ccc6cda3 2834
3185942a 2835
3185942a 2836
ac50fbac 2837opt_bash_malloc=yes
ac50fbac
CR
2838opt_afs=no
2839opt_curses=no
2840opt_with_installed_readline=no
3185942a 2841
ac50fbac 2842#htmldir=
3185942a 2843
ac50fbac
CR
2844case "${host_cpu}-${host_os}" in
2845alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux
2846*[Cc]ray*-*) opt_bash_malloc=no ;; # Crays
2847*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines
2848sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2
2849sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
2850mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
2851m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
2852sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
2853#*-freebsd*-gnu) opt_bash_malloc=no ;; # there's some undetermined problem here
2854#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree
2855*-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
2856*-mirbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
2857*-aix*) opt_bash_malloc=no ;; # AIX machines
2858*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
2859*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep
2860*-macos*) opt_bash_malloc=no ;; # Apple MacOS X
2861*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X)
2862*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X)
2863*-dgux*) opt_bash_malloc=no ;; # DG/UX machines
2864*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX 6.x
2865*-machten4) opt_bash_malloc=no ;; # MachTen 4.x
2866*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
2867*-beos*) opt_bash_malloc=no ;; # they say it's suitable
2868*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
2869*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
2870*-nsk*) opt_bash_malloc=no ;; # HP NonStop
2871*-haiku*) opt_bash_malloc=no ;; # Haiku OS
2872esac
b72432fd 2873
ac50fbac
CR
2874# memory scrambling on free()
2875case "${host_os}" in
2876sco3.2v5*|sco3.2v4*) opt_memscramble=no ;;
2877*) opt_memscramble=yes ;;
2878esac
b80f6443
JA
2879
2880
ccc6cda3 2881
ccc6cda3 2882
ac50fbac
CR
2883# Check whether --with-afs was given.
2884if test "${with_afs+set}" = set; then :
2885 withval=$with_afs; opt_afs=$withval
ccc6cda3 2886fi
ccc6cda3 2887
ccc6cda3 2888
ac50fbac
CR
2889# Check whether --with-bash-malloc was given.
2890if test "${with_bash_malloc+set}" = set; then :
2891 withval=$with_bash_malloc; opt_bash_malloc=$withval
ccc6cda3 2892fi
ccc6cda3 2893
ccc6cda3 2894
ac50fbac
CR
2895# Check whether --with-curses was given.
2896if test "${with_curses+set}" = set; then :
2897 withval=$with_curses; opt_curses=$withval
ccc6cda3 2898fi
ccc6cda3 2899
ac50fbac
CR
2900
2901# Check whether --with-gnu-malloc was given.
2902if test "${with_gnu_malloc+set}" = set; then :
2903 withval=$with_gnu_malloc; opt_bash_malloc=$withval
ccc6cda3 2904fi
ccc6cda3 2905
ac50fbac
CR
2906
2907# Check whether --with-installed-readline was given.
2908if test "${with_installed_readline+set}" = set; then :
2909 withval=$with_installed_readline; opt_with_installed_readline=$withval
ccc6cda3 2910fi
ccc6cda3 2911
ac50fbac 2912
ac50fbac
CR
2913if test "$opt_bash_malloc" = yes; then
2914 MALLOC_TARGET=malloc
2915 MALLOC_SRC=malloc.c
2916
2917 MALLOC_LIB='-lmalloc'
2918 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
2919 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
2920 MALLOC_DEP='$(MALLOC_LIBRARY)'
2921
2922 $as_echo "#define USING_BASH_MALLOC 1" >>confdefs.h
2923
2924else
2925 MALLOC_LIB=
2926 MALLOC_LIBRARY=
2927 MALLOC_LDFLAGS=
2928 MALLOC_DEP=
ccc6cda3 2929fi
ccc6cda3 2930
ac50fbac
CR
2931if test "$opt_afs" = yes; then
2932 $as_echo "#define AFS 1" >>confdefs.h
95732b49 2933
cce855bc 2934fi
cce855bc 2935
ac50fbac
CR
2936if test "$opt_curses" = yes; then
2937 prefer_curses=yes
0001803f 2938fi
0001803f 2939
ac50fbac
CR
2940if test -z "${DEBUGGER_START_FILE}"; then
2941 DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc'
2942fi
0001803f 2943
ac50fbac
CR
2944opt_minimal_config=no
2945
2946opt_job_control=yes
2947opt_alias=yes
2948opt_readline=yes
2949opt_history=yes
2950opt_bang_history=yes
2951opt_dirstack=yes
2952opt_restricted=yes
2953opt_process_subst=yes
2954opt_prompt_decoding=yes
2955opt_select=yes
2956opt_help=yes
2957opt_array_variables=yes
2958opt_dparen_arith=yes
2959opt_extended_glob=yes
2960opt_brace_expansion=yes
2961opt_disabled_builtins=no
2962opt_command_timing=yes
2963opt_xpg_echo=no
2964opt_strict_posix=no
2965opt_cond_command=yes
2966opt_cond_regexp=yes
2967opt_coproc=yes
2968opt_arith_for_command=yes
2969opt_net_redirs=yes
2970opt_progcomp=yes
2971opt_separate_help=no
2972opt_multibyte=yes
2973opt_debugger=yes
2974opt_single_longdoc_strings=yes
2975opt_casemod_attrs=yes
2976opt_casemod_expansions=yes
2977opt_extglob_default=no
2978opt_dircomplete_expand_default=no
2979opt_globascii_default=no
a0c0a00f 2980opt_function_import=yes
ac50fbac
CR
2981
2982opt_static_link=no
2983opt_profiling=no
2984
2985# Check whether --enable-minimal-config was given.
2986if test "${enable_minimal_config+set}" = set; then :
2987 enableval=$enable_minimal_config; opt_minimal_config=$enableval
cce855bc 2988fi
b80f6443 2989
ac50fbac
CR
2990
2991if test $opt_minimal_config = yes; then
2992 opt_job_control=no opt_alias=no opt_readline=no
2993 opt_history=no opt_bang_history=no opt_dirstack=no
2994 opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
2995 opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
2996 opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
2997 opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no
2998 opt_net_redirs=no opt_progcomp=no opt_separate_help=no
2999 opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
3000 opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
3001 opt_globascii_default=no
b80f6443 3002fi
cce855bc 3003
ac50fbac
CR
3004# Check whether --enable-alias was given.
3005if test "${enable_alias+set}" = set; then :
3006 enableval=$enable_alias; opt_alias=$enableval
3185942a 3007fi
3185942a 3008
ac50fbac
CR
3009# Check whether --enable-arith-for-command was given.
3010if test "${enable_arith_for_command+set}" = set; then :
3011 enableval=$enable_arith_for_command; opt_arith_for_command=$enableval
bb70624e 3012fi
bb70624e 3013
ac50fbac
CR
3014# Check whether --enable-array-variables was given.
3015if test "${enable_array_variables+set}" = set; then :
3016 enableval=$enable_array_variables; opt_array_variables=$enableval
bb70624e 3017fi
bb70624e 3018
ac50fbac
CR
3019# Check whether --enable-bang-history was given.
3020if test "${enable_bang_history+set}" = set; then :
3021 enableval=$enable_bang_history; opt_bang_history=$enableval
bb70624e 3022fi
b80f6443 3023
ac50fbac
CR
3024# Check whether --enable-brace-expansion was given.
3025if test "${enable_brace_expansion+set}" = set; then :
3026 enableval=$enable_brace_expansion; opt_brace_expansion=$enableval
b80f6443 3027fi
b80f6443 3028
ac50fbac
CR
3029# Check whether --enable-casemod-attributes was given.
3030if test "${enable_casemod_attributes+set}" = set; then :
3031 enableval=$enable_casemod_attributes; opt_casemod_attrs=$enableval
b80f6443 3032fi
bb70624e 3033
ac50fbac
CR
3034# Check whether --enable-casemod-expansions was given.
3035if test "${enable_casemod_expansions+set}" = set; then :
3036 enableval=$enable_casemod_expansions; opt_casemod_expansions=$enableval
3185942a 3037fi
3185942a 3038
ac50fbac
CR
3039# Check whether --enable-command-timing was given.
3040if test "${enable_command_timing+set}" = set; then :
3041 enableval=$enable_command_timing; opt_command_timing=$enableval
3185942a 3042fi
3185942a 3043
ac50fbac
CR
3044# Check whether --enable-cond-command was given.
3045if test "${enable_cond_command+set}" = set; then :
3046 enableval=$enable_cond_command; opt_cond_command=$enableval
ccc6cda3
JA
3047fi
3048
ac50fbac
CR
3049# Check whether --enable-cond-regexp was given.
3050if test "${enable_cond_regexp+set}" = set; then :
3051 enableval=$enable_cond_regexp; opt_cond_regexp=$enableval
3052fi
7117c2d2 3053
ac50fbac
CR
3054# Check whether --enable-coprocesses was given.
3055if test "${enable_coprocesses+set}" = set; then :
3056 enableval=$enable_coprocesses; opt_coproc=$enableval
7117c2d2
JA
3057fi
3058
ac50fbac
CR
3059# Check whether --enable-debugger was given.
3060if test "${enable_debugger+set}" = set; then :
3061 enableval=$enable_debugger; opt_debugger=$enableval
d166f048
JA
3062fi
3063
ac50fbac
CR
3064# Check whether --enable-direxpand-default was given.
3065if test "${enable_direxpand_default+set}" = set; then :
3066 enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval
7117c2d2 3067fi
ac50fbac
CR
3068
3069# Check whether --enable-directory-stack was given.
3070if test "${enable_directory_stack+set}" = set; then :
3071 enableval=$enable_directory_stack; opt_dirstack=$enableval
95732b49
JA
3072fi
3073
ac50fbac
CR
3074# Check whether --enable-disabled-builtins was given.
3075if test "${enable_disabled_builtins+set}" = set; then :
3076 enableval=$enable_disabled_builtins; opt_disabled_builtins=$enableval
3077fi
7117c2d2 3078
ac50fbac
CR
3079# Check whether --enable-dparen-arithmetic was given.
3080if test "${enable_dparen_arithmetic+set}" = set; then :
3081 enableval=$enable_dparen_arithmetic; opt_dparen_arith=$enableval
3082fi
b80f6443 3083
ac50fbac
CR
3084# Check whether --enable-extended-glob was given.
3085if test "${enable_extended_glob+set}" = set; then :
3086 enableval=$enable_extended_glob; opt_extended_glob=$enableval
3087fi
b80f6443 3088
ac50fbac
CR
3089# Check whether --enable-extended-glob-default was given.
3090if test "${enable_extended_glob_default+set}" = set; then :
3091 enableval=$enable_extended_glob_default; opt_extglob_default=$enableval
3092fi
b80f6443 3093
a0c0a00f
CR
3094# Check whether --enable-function-import was given.
3095if test "${enable_function_import+set}" = set; then :
3096 enableval=$enable_function_import; opt_function_import=$enableval
3097fi
3098
ac50fbac
CR
3099# Check whether --enable-glob-asciiranges-default was given.
3100if test "${enable_glob_asciiranges_default+set}" = set; then :
3101 enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval
3102fi
b80f6443 3103
ac50fbac
CR
3104# Check whether --enable-help-builtin was given.
3105if test "${enable_help_builtin+set}" = set; then :
3106 enableval=$enable_help_builtin; opt_help=$enableval
3107fi
b80f6443 3108
ac50fbac
CR
3109# Check whether --enable-history was given.
3110if test "${enable_history+set}" = set; then :
3111 enableval=$enable_history; opt_history=$enableval
3112fi
b80f6443 3113
ac50fbac
CR
3114# Check whether --enable-job-control was given.
3115if test "${enable_job_control+set}" = set; then :
3116 enableval=$enable_job_control; opt_job_control=$enableval
3117fi
b80f6443 3118
ac50fbac
CR
3119# Check whether --enable-multibyte was given.
3120if test "${enable_multibyte+set}" = set; then :
3121 enableval=$enable_multibyte; opt_multibyte=$enableval
3122fi
b80f6443 3123
ac50fbac
CR
3124# Check whether --enable-net-redirections was given.
3125if test "${enable_net_redirections+set}" = set; then :
3126 enableval=$enable_net_redirections; opt_net_redirs=$enableval
3127fi
b80f6443 3128
ac50fbac
CR
3129# Check whether --enable-process-substitution was given.
3130if test "${enable_process_substitution+set}" = set; then :
3131 enableval=$enable_process_substitution; opt_process_subst=$enableval
3132fi
b80f6443 3133
ac50fbac
CR
3134# Check whether --enable-progcomp was given.
3135if test "${enable_progcomp+set}" = set; then :
3136 enableval=$enable_progcomp; opt_progcomp=$enableval
3137fi
b80f6443 3138
ac50fbac
CR
3139# Check whether --enable-prompt-string-decoding was given.
3140if test "${enable_prompt_string_decoding+set}" = set; then :
3141 enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval
3142fi
b80f6443 3143
ac50fbac
CR
3144# Check whether --enable-readline was given.
3145if test "${enable_readline+set}" = set; then :
3146 enableval=$enable_readline; opt_readline=$enableval
3147fi
b80f6443 3148
ac50fbac
CR
3149# Check whether --enable-restricted was given.
3150if test "${enable_restricted+set}" = set; then :
3151 enableval=$enable_restricted; opt_restricted=$enableval
3152fi
b80f6443 3153
ac50fbac
CR
3154# Check whether --enable-select was given.
3155if test "${enable_select+set}" = set; then :
3156 enableval=$enable_select; opt_select=$enableval
3157fi
b80f6443 3158
ac50fbac
CR
3159# Check whether --enable-separate-helpfiles was given.
3160if test "${enable_separate_helpfiles+set}" = set; then :
3161 enableval=$enable_separate_helpfiles; opt_separate_help=$enableval
3162fi
b80f6443 3163
ac50fbac
CR
3164# Check whether --enable-single-help-strings was given.
3165if test "${enable_single_help_strings+set}" = set; then :
3166 enableval=$enable_single_help_strings; opt_single_longdoc_strings=$enableval
3167fi
d166f048 3168
ac50fbac
CR
3169# Check whether --enable-strict-posix-default was given.
3170if test "${enable_strict_posix_default+set}" = set; then :
3171 enableval=$enable_strict_posix_default; opt_strict_posix=$enableval
3172fi
3173
3174# Check whether --enable-usg-echo-default was given.
3175if test "${enable_usg_echo_default+set}" = set; then :
3176 enableval=$enable_usg_echo_default; opt_xpg_echo=$enableval
3177fi
3178
3179# Check whether --enable-xpg-echo-default was given.
3180if test "${enable_xpg_echo_default+set}" = set; then :
3181 enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval
3182fi
3183
3184
3185# Check whether --enable-mem-scramble was given.
3186if test "${enable_mem_scramble+set}" = set; then :
3187 enableval=$enable_mem_scramble; opt_memscramble=$enableval
3188fi
3189
3190# Check whether --enable-profiling was given.
3191if test "${enable_profiling+set}" = set; then :
3192 enableval=$enable_profiling; opt_profiling=$enableval
3193fi
3194
3195# Check whether --enable-static-link was given.
3196if test "${enable_static_link+set}" = set; then :
3197 enableval=$enable_static_link; opt_static_link=$enableval
3198fi
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208if test $opt_alias = yes; then
3209$as_echo "#define ALIAS 1" >>confdefs.h
3210
3211fi
3212if test $opt_dirstack = yes; then
3213$as_echo "#define PUSHD_AND_POPD 1" >>confdefs.h
3214
3215fi
3216if test $opt_restricted = yes; then
3217$as_echo "#define RESTRICTED_SHELL 1" >>confdefs.h
3218
3219fi
3220if test $opt_process_subst = yes; then
3221$as_echo "#define PROCESS_SUBSTITUTION 1" >>confdefs.h
3222
3223fi
3224if test $opt_prompt_decoding = yes; then
3225$as_echo "#define PROMPT_STRING_DECODE 1" >>confdefs.h
3226
3227fi
3228if test $opt_select = yes; then
3229$as_echo "#define SELECT_COMMAND 1" >>confdefs.h
3230
3231fi
3232if test $opt_help = yes; then
3233$as_echo "#define HELP_BUILTIN 1" >>confdefs.h
3234
3235fi
3236if test $opt_array_variables = yes; then
3237$as_echo "#define ARRAY_VARS 1" >>confdefs.h
3238
3239fi
3240if test $opt_dparen_arith = yes; then
3241$as_echo "#define DPAREN_ARITHMETIC 1" >>confdefs.h
3242
3243fi
3244if test $opt_brace_expansion = yes; then
3245$as_echo "#define BRACE_EXPANSION 1" >>confdefs.h
3246
3247fi
3248if test $opt_disabled_builtins = yes; then
3249$as_echo "#define DISABLED_BUILTINS 1" >>confdefs.h
3250
3251fi
3252if test $opt_command_timing = yes; then
3253$as_echo "#define COMMAND_TIMING 1" >>confdefs.h
3254
3255fi
3256if test $opt_xpg_echo = yes ; then
3257$as_echo "#define DEFAULT_ECHO_TO_XPG 1" >>confdefs.h
3258
3259fi
3260if test $opt_strict_posix = yes; then
3261$as_echo "#define STRICT_POSIX 1" >>confdefs.h
3262
3263fi
3264if test $opt_extended_glob = yes ; then
3265$as_echo "#define EXTENDED_GLOB 1" >>confdefs.h
3266
3267fi
3268if test $opt_extglob_default = yes; then
3269$as_echo "#define EXTGLOB_DEFAULT 1" >>confdefs.h
3270
3271else
3272$as_echo "#define EXTGLOB_DEFAULT 0" >>confdefs.h
3273
3274fi
3275if test $opt_cond_command = yes ; then
3276$as_echo "#define COND_COMMAND 1" >>confdefs.h
3277
3278fi
3279if test $opt_cond_regexp = yes ; then
3280$as_echo "#define COND_REGEXP 1" >>confdefs.h
3281
3282fi
3283if test $opt_coproc = yes; then
3284$as_echo "#define COPROCESS_SUPPORT 1" >>confdefs.h
3285
3286fi
3287if test $opt_arith_for_command = yes; then
3288$as_echo "#define ARITH_FOR_COMMAND 1" >>confdefs.h
3289
3290fi
3291if test $opt_net_redirs = yes; then
3292$as_echo "#define NETWORK_REDIRECTIONS 1" >>confdefs.h
3293
3294fi
3295if test $opt_progcomp = yes; then
3296$as_echo "#define PROGRAMMABLE_COMPLETION 1" >>confdefs.h
3297
3298fi
3299if test $opt_multibyte = no; then
3300$as_echo "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h
3301
3302fi
3303if test $opt_debugger = yes; then
3304$as_echo "#define DEBUGGER 1" >>confdefs.h
3305
3306fi
3307if test $opt_casemod_attrs = yes; then
3308$as_echo "#define CASEMOD_ATTRS 1" >>confdefs.h
3309
3310fi
3311if test $opt_casemod_expansions = yes; then
3312$as_echo "#define CASEMOD_EXPANSIONS 1" >>confdefs.h
3313
3314fi
3315if test $opt_dircomplete_expand_default = yes; then
3316$as_echo "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h
3317
3318fi
3319if test $opt_globascii_default = yes; then
3320$as_echo "#define GLOBASCII_DEFAULT 1" >>confdefs.h
3321
3322else
3323$as_echo "#define GLOBASCII_DEFAULT 0" >>confdefs.h
3324
a0c0a00f
CR
3325fi
3326if test $opt_function_import = yes; then
3327$as_echo "#define FUNCTION_IMPORT 1" >>confdefs.h
3328
ac50fbac
CR
3329fi
3330
3331if test $opt_memscramble = yes; then
3332$as_echo "#define MEMSCRAMBLE 1" >>confdefs.h
3333
3334fi
3335
3336if test "$opt_minimal_config" = yes; then
3337 TESTSCRIPT=run-minimal
3338else
3339 TESTSCRIPT=run-all
3340fi
3341
3342HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET=
3343if test "$opt_separate_help" != no; then
3344 if test "$opt_separate_help" = "yes" ; then
3345 HELPDIR='${datadir}/bash'
3346 else
3347 HELPDIR=$opt_separate_help
3348 fi
3349 HELPDIRDEFINE='-H ${HELPDIR}'
3350 HELPINSTALL='install-help'
3351 HELPFILES_TARGET='helpdoc'
3352fi
3353HELPSTRINGS=
3354if test "$opt_single_longdoc_strings" != "yes"; then
3355 HELPSTRINGS='-S'
3356fi
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
a0c0a00f
CR
3375if test -z "$CFLAGS"; then
3376 AUTO_CFLAGS="-g ${GCC+-O2} ${GCC+-Wno-parentheses}"
3377 AUTO_LDFLAGS="-g ${GCC+-O2}"
3378else
3379 AUTO_CFLAGS= AUTO_LDFLAGS=
3380fi
ac50fbac
CR
3381
3382echo ""
3383echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
3384echo ""
3385
3386ac_ext=c
3387ac_cpp='$CPP $CPPFLAGS'
3388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3390ac_compiler_gnu=$ac_cv_c_compiler_gnu
3391if test -n "$ac_tool_prefix"; then
3392 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3393set dummy ${ac_tool_prefix}gcc; ac_word=$2
3394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3395$as_echo_n "checking for $ac_word... " >&6; }
3396if ${ac_cv_prog_CC+:} false; then :
3397 $as_echo_n "(cached) " >&6
3398else
3399 if test -n "$CC"; then
3400 ac_cv_prog_CC="$CC" # Let the user override the test.
3401else
3402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3403for as_dir in $PATH
3404do
3405 IFS=$as_save_IFS
3406 test -z "$as_dir" && as_dir=.
3407 for ac_exec_ext in '' $ac_executable_extensions; do
3408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3409 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3411 break 2
b80f6443
JA
3412 fi
3413done
ac50fbac 3414 done
3185942a 3415IFS=$as_save_IFS
ccc6cda3 3416
f73dda09
JA
3417fi
3418fi
3419CC=$ac_cv_prog_CC
3420if test -n "$CC"; then
ac50fbac 3421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3422$as_echo "$CC" >&6; }
f73dda09 3423else
ac50fbac 3424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3425$as_echo "no" >&6; }
f73dda09 3426fi
ccc6cda3 3427
3185942a 3428
f73dda09
JA
3429fi
3430if test -z "$ac_cv_prog_CC"; then
3431 ac_ct_CC=$CC
3432 # Extract the first word of "gcc", so it can be a program name with args.
3433set dummy gcc; ac_word=$2
ac50fbac 3434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3435$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3436if ${ac_cv_prog_ac_ct_CC+:} false; then :
3185942a 3437 $as_echo_n "(cached) " >&6
f73dda09
JA
3438else
3439 if test -n "$ac_ct_CC"; then
3440 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3441else
b80f6443
JA
3442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3443for as_dir in $PATH
3444do
3445 IFS=$as_save_IFS
3446 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3447 for ac_exec_ext in '' $ac_executable_extensions; do
3448 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3449 ac_cv_prog_ac_ct_CC="gcc"
ac50fbac 3450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3451 break 2
3452 fi
3453done
ac50fbac 3454 done
3185942a 3455IFS=$as_save_IFS
ccc6cda3 3456
f73dda09
JA
3457fi
3458fi
3459ac_ct_CC=$ac_cv_prog_ac_ct_CC
3460if test -n "$ac_ct_CC"; then
ac50fbac 3461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3185942a 3462$as_echo "$ac_ct_CC" >&6; }
f73dda09 3463else
ac50fbac 3464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3465$as_echo "no" >&6; }
f73dda09 3466fi
ccc6cda3 3467
3185942a
JA
3468 if test "x$ac_ct_CC" = x; then
3469 CC=""
3470 else
3471 case $cross_compiling:$ac_tool_warned in
3472yes:)
ac50fbac 3473{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3185942a
JA
3474$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3475ac_tool_warned=yes ;;
3476esac
3477 CC=$ac_ct_CC
3478 fi
f73dda09
JA
3479else
3480 CC="$ac_cv_prog_CC"
3481fi
bb70624e 3482
f73dda09 3483if test -z "$CC"; then
3185942a
JA
3484 if test -n "$ac_tool_prefix"; then
3485 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
f73dda09 3486set dummy ${ac_tool_prefix}cc; ac_word=$2
ac50fbac 3487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3488$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3489if ${ac_cv_prog_CC+:} false; then :
3185942a 3490 $as_echo_n "(cached) " >&6
ccc6cda3
JA
3491else
3492 if test -n "$CC"; then
3493 ac_cv_prog_CC="$CC" # Let the user override the test.
3494else
b80f6443
JA
3495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3496for as_dir in $PATH
3497do
3498 IFS=$as_save_IFS
3499 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3500 for ac_exec_ext in '' $ac_executable_extensions; do
3501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3502 ac_cv_prog_CC="${ac_tool_prefix}cc"
ac50fbac 3503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3504 break 2
3505 fi
3506done
ac50fbac 3507 done
3185942a 3508IFS=$as_save_IFS
f73dda09 3509
ccc6cda3
JA
3510fi
3511fi
f73dda09 3512CC=$ac_cv_prog_CC
ccc6cda3 3513if test -n "$CC"; then
ac50fbac 3514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3515$as_echo "$CC" >&6; }
f73dda09 3516else
ac50fbac 3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3518$as_echo "no" >&6; }
f73dda09
JA
3519fi
3520
ccc6cda3 3521
3185942a 3522 fi
f73dda09 3523fi
ccc6cda3
JA
3524if test -z "$CC"; then
3525 # Extract the first word of "cc", so it can be a program name with args.
3526set dummy cc; ac_word=$2
ac50fbac 3527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3528$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3529if ${ac_cv_prog_CC+:} false; then :
3185942a 3530 $as_echo_n "(cached) " >&6
ccc6cda3
JA
3531else
3532 if test -n "$CC"; then
3533 ac_cv_prog_CC="$CC" # Let the user override the test.
3534else
ccc6cda3 3535 ac_prog_rejected=no
b80f6443
JA
3536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3537for as_dir in $PATH
3538do
3539 IFS=$as_save_IFS
3540 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3541 for ac_exec_ext in '' $ac_executable_extensions; do
3542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443
JA
3543 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3544 ac_prog_rejected=yes
3545 continue
3546 fi
3547 ac_cv_prog_CC="cc"
ac50fbac 3548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3549 break 2
3550 fi
3551done
ac50fbac 3552 done
3185942a 3553IFS=$as_save_IFS
f73dda09 3554
ccc6cda3
JA
3555if test $ac_prog_rejected = yes; then
3556 # We found a bogon in the path, so make sure we never use it.
3557 set dummy $ac_cv_prog_CC
3558 shift
f73dda09 3559 if test $# != 0; then
ccc6cda3
JA
3560 # We chose a different compiler from the bogus one.
3561 # However, it has the same basename, so the bogon will be chosen
3562 # first if we set CC to just the basename; use the full file name.
3563 shift
0628567a 3564 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ccc6cda3
JA
3565 fi
3566fi
3567fi
3568fi
f73dda09 3569CC=$ac_cv_prog_CC
ccc6cda3 3570if test -n "$CC"; then
ac50fbac 3571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3572$as_echo "$CC" >&6; }
ccc6cda3 3573else
ac50fbac 3574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3575$as_echo "no" >&6; }
ccc6cda3
JA
3576fi
3577
3185942a 3578
f73dda09
JA
3579fi
3580if test -z "$CC"; then
3581 if test -n "$ac_tool_prefix"; then
3185942a 3582 for ac_prog in cl.exe
f73dda09
JA
3583 do
3584 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3585set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ac50fbac 3586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3587$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3588if ${ac_cv_prog_CC+:} false; then :
3185942a 3589 $as_echo_n "(cached) " >&6
bb70624e
JA
3590else
3591 if test -n "$CC"; then
3592 ac_cv_prog_CC="$CC" # Let the user override the test.
3593else
b80f6443
JA
3594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3595for as_dir in $PATH
3596do
3597 IFS=$as_save_IFS
3598 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3599 for ac_exec_ext in '' $ac_executable_extensions; do
3600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3601 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
ac50fbac 3602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3603 break 2
3604 fi
3605done
ac50fbac 3606 done
3185942a 3607IFS=$as_save_IFS
f73dda09 3608
bb70624e
JA
3609fi
3610fi
f73dda09 3611CC=$ac_cv_prog_CC
bb70624e 3612if test -n "$CC"; then
ac50fbac 3613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3185942a 3614$as_echo "$CC" >&6; }
bb70624e 3615else
ac50fbac 3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3617$as_echo "no" >&6; }
bb70624e 3618fi
ccc6cda3 3619
3185942a 3620
f73dda09
JA
3621 test -n "$CC" && break
3622 done
ccc6cda3 3623fi
f73dda09
JA
3624if test -z "$CC"; then
3625 ac_ct_CC=$CC
3185942a 3626 for ac_prog in cl.exe
f73dda09
JA
3627do
3628 # Extract the first word of "$ac_prog", so it can be a program name with args.
3629set dummy $ac_prog; ac_word=$2
ac50fbac 3630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 3631$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 3632if ${ac_cv_prog_ac_ct_CC+:} false; then :
3185942a 3633 $as_echo_n "(cached) " >&6
f73dda09
JA
3634else
3635 if test -n "$ac_ct_CC"; then
3636 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3637else
b80f6443
JA
3638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3639for as_dir in $PATH
3640do
3641 IFS=$as_save_IFS
3642 test -z "$as_dir" && as_dir=.
ac50fbac
CR
3643 for ac_exec_ext in '' $ac_executable_extensions; do
3644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 3645 ac_cv_prog_ac_ct_CC="$ac_prog"
ac50fbac 3646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
3647 break 2
3648 fi
3649done
ac50fbac 3650 done
3185942a 3651IFS=$as_save_IFS
ccc6cda3 3652
ccc6cda3 3653fi
ccc6cda3 3654fi
f73dda09
JA
3655ac_ct_CC=$ac_cv_prog_ac_ct_CC
3656if test -n "$ac_ct_CC"; then
ac50fbac 3657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3185942a 3658$as_echo "$ac_ct_CC" >&6; }
f73dda09 3659else
ac50fbac 3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 3661$as_echo "no" >&6; }
ccc6cda3
JA
3662fi
3663
3185942a 3664
f73dda09
JA
3665 test -n "$ac_ct_CC" && break
3666done
ccc6cda3 3667
3185942a
JA
3668 if test "x$ac_ct_CC" = x; then
3669 CC=""
3670 else
3671 case $cross_compiling:$ac_tool_warned in
3672yes:)
ac50fbac 3673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3185942a
JA
3674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3675ac_tool_warned=yes ;;
3676esac
3677 CC=$ac_ct_CC
3678 fi
bb70624e
JA
3679fi
3680
f73dda09
JA
3681fi
3682
b80f6443 3683
ac50fbac 3684test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3686as_fn_error $? "no acceptable C compiler found in \$PATH
3687See \`config.log' for more details" "$LINENO" 5; }
f73dda09
JA
3688
3689# Provide some information about the compiler.
ac50fbac 3690$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3185942a
JA
3691set X $ac_compile
3692ac_compiler=$2
ac50fbac
CR
3693for ac_option in --version -v -V -qversion; do
3694 { { ac_try="$ac_compiler $ac_option >&5"
3185942a
JA
3695case "(($ac_try" in
3696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3697 *) ac_try_echo=$ac_try;;
3698esac
ac50fbac
CR
3699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3700$as_echo "$ac_try_echo"; } >&5
3701 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
f73dda09 3702 ac_status=$?
ac50fbac
CR
3703 if test -s conftest.err; then
3704 sed '10a\
3705... rest of stderr output deleted ...
3706 10q' conftest.err >conftest.er1
3707 cat conftest.er1 >&5
3708 fi
3709 rm -f conftest.er1 conftest.err
3710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3711 test $ac_status = 0; }
3712done
f73dda09 3713
ac50fbac 3714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 3715/* end confdefs.h. */
f73dda09
JA
3716
3717int
3718main ()
3719{
3720
3721 ;
3722 return 0;
3723}
3724_ACEOF
3725ac_clean_files_save=$ac_clean_files
3185942a 3726ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
f73dda09
JA
3727# Try to create an executable without -o first, disregard a.out.
3728# It will help us diagnose broken compilers, and finding out an intuition
3729# of exeext.
ac50fbac
CR
3730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3731$as_echo_n "checking whether the C compiler works... " >&6; }
3185942a
JA
3732ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3733
3734# The possible output files:
3735ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3736
3737ac_rmfiles=
3738for ac_file in $ac_files
3739do
3740 case $ac_file in
3741 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3742 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3743 esac
3744done
3745rm -f $ac_rmfiles
3746
ac50fbac 3747if { { ac_try="$ac_link_default"
3185942a
JA
3748case "(($ac_try" in
3749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3750 *) ac_try_echo=$ac_try;;
3751esac
ac50fbac
CR
3752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3753$as_echo "$ac_try_echo"; } >&5
3185942a 3754 (eval "$ac_link_default") 2>&5
f73dda09 3755 ac_status=$?
ac50fbac
CR
3756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3757 test $ac_status = 0; }; then :
3185942a
JA
3758 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3759# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3760# in a Makefile. We should not override ac_cv_exeext if it was cached,
3761# so that the user can short-circuit this test for compilers unknown to
3762# Autoconf.
3763for ac_file in $ac_files ''
0628567a
JA
3764do
3765 test -f "$ac_file" || continue
f73dda09 3766 case $ac_file in
3185942a 3767 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
0628567a
JA
3768 ;;
3769 [ab].out )
3770 # We found the default executable, but exeext='' is most
3771 # certainly right.
3772 break;;
3773 *.* )
ac50fbac 3774 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3185942a
JA
3775 then :; else
3776 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3777 fi
3778 # We set ac_cv_exeext here because the later test for it is not
3779 # safe: cross compilers may not add the suffix if given an `-o'
3780 # argument, so we may need to know it at that point already.
3781 # Even if this section looks crufty: it has the advantage of
3782 # actually working.
0628567a
JA
3783 break;;
3784 * )
3785 break;;
f73dda09
JA
3786 esac
3787done
3185942a
JA
3788test "$ac_cv_exeext" = no && ac_cv_exeext=
3789
ccc6cda3 3790else
3185942a
JA
3791 ac_file=''
3792fi
ac50fbac
CR
3793if test -z "$ac_file"; then :
3794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3795$as_echo "no" >&6; }
3796$as_echo "$as_me: failed program was:" >&5
0628567a
JA
3797sed 's/^/| /' conftest.$ac_ext >&5
3798
ac50fbac 3799{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3801as_fn_error 77 "C compiler cannot create executables
3802See \`config.log' for more details" "$LINENO" 5; }
3803else
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3805$as_echo "yes" >&6; }
f73dda09 3806fi
ac50fbac
CR
3807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3808$as_echo_n "checking for C compiler default output file name... " >&6; }
3809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3810$as_echo "$ac_file" >&6; }
f73dda09 3811ac_exeext=$ac_cv_exeext
f73dda09 3812
ac50fbac
CR
3813rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3814ac_clean_files=$ac_clean_files_save
3815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3816$as_echo_n "checking for suffix of executables... " >&6; }
3817if { { ac_try="$ac_link"
3818case "(($ac_try" in
3185942a
JA
3819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3820 *) ac_try_echo=$ac_try;;
3821esac
ac50fbac
CR
3822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3823$as_echo "$ac_try_echo"; } >&5
3824 (eval "$ac_link") 2>&5
f73dda09 3825 ac_status=$?
ac50fbac
CR
3826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3827 test $ac_status = 0; }; then :
f73dda09
JA
3828 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3829# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3830# work properly (i.e., refer to `conftest.exe'), while it won't with
3831# `rm'.
0628567a
JA
3832for ac_file in conftest.exe conftest conftest.*; do
3833 test -f "$ac_file" || continue
f73dda09 3834 case $ac_file in
3185942a 3835 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
f73dda09 3836 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
0628567a 3837 break;;
f73dda09
JA
3838 * ) break;;
3839 esac
3840done
ccc6cda3 3841else
ac50fbac 3842 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3843$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3844as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3845See \`config.log' for more details" "$LINENO" 5; }
f73dda09 3846fi
ac50fbac
CR
3847rm -f conftest conftest$ac_cv_exeext
3848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3185942a 3849$as_echo "$ac_cv_exeext" >&6; }
f73dda09
JA
3850
3851rm -f conftest.$ac_ext
3852EXEEXT=$ac_cv_exeext
3853ac_exeext=$EXEEXT
ac50fbac
CR
3854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3855/* end confdefs.h. */
3856#include <stdio.h>
3857int
3858main ()
3859{
3860FILE *f = fopen ("conftest.out", "w");
3861 return ferror (f) || fclose (f) != 0;
3862
3863 ;
3864 return 0;
3865}
3866_ACEOF
3867ac_clean_files="$ac_clean_files conftest.out"
3868# Check that the compiler produces executables we can run. If not, either
3869# the compiler is broken, or we cross compile.
3870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3871$as_echo_n "checking whether we are cross compiling... " >&6; }
3872if test "$cross_compiling" != yes; then
3873 { { ac_try="$ac_link"
3874case "(($ac_try" in
3875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3876 *) ac_try_echo=$ac_try;;
3877esac
3878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3879$as_echo "$ac_try_echo"; } >&5
3880 (eval "$ac_link") 2>&5
3881 ac_status=$?
3882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3883 test $ac_status = 0; }
3884 if { ac_try='./conftest$ac_cv_exeext'
3885 { { case "(($ac_try" in
3886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3887 *) ac_try_echo=$ac_try;;
3888esac
3889eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3890$as_echo "$ac_try_echo"; } >&5
3891 (eval "$ac_try") 2>&5
3892 ac_status=$?
3893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3894 test $ac_status = 0; }; }; then
3895 cross_compiling=no
3896 else
3897 if test "$cross_compiling" = maybe; then
3898 cross_compiling=yes
3899 else
3900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3902as_fn_error $? "cannot run C compiled programs.
3903If you meant to cross compile, use \`--host'.
3904See \`config.log' for more details" "$LINENO" 5; }
3905 fi
3906 fi
3907fi
3908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3909$as_echo "$cross_compiling" >&6; }
3910
3911rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3912ac_clean_files=$ac_clean_files_save
3913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3185942a 3914$as_echo_n "checking for suffix of object files... " >&6; }
ac50fbac 3915if ${ac_cv_objext+:} false; then :
3185942a 3916 $as_echo_n "(cached) " >&6
f73dda09 3917else
ac50fbac 3918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 3919/* end confdefs.h. */
f73dda09
JA
3920
3921int
3922main ()
3923{
3924
3925 ;
3926 return 0;
3927}
3928_ACEOF
3929rm -f conftest.o conftest.obj
ac50fbac 3930if { { ac_try="$ac_compile"
3185942a
JA
3931case "(($ac_try" in
3932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3933 *) ac_try_echo=$ac_try;;
3934esac
ac50fbac
CR
3935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3936$as_echo "$ac_try_echo"; } >&5
3185942a 3937 (eval "$ac_compile") 2>&5
f73dda09 3938 ac_status=$?
ac50fbac
CR
3939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3940 test $ac_status = 0; }; then :
3185942a
JA
3941 for ac_file in conftest.o conftest.obj conftest.*; do
3942 test -f "$ac_file" || continue;
f73dda09 3943 case $ac_file in
3185942a 3944 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
f73dda09
JA
3945 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3946 break;;
3947 esac
3948done
3949else
3185942a 3950 $as_echo "$as_me: failed program was:" >&5
0628567a
JA
3951sed 's/^/| /' conftest.$ac_ext >&5
3952
ac50fbac 3953{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 3954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
3955as_fn_error $? "cannot compute suffix of object files: cannot compile
3956See \`config.log' for more details" "$LINENO" 5; }
ccc6cda3 3957fi
f73dda09 3958rm -f conftest.$ac_cv_objext conftest.$ac_ext
ccc6cda3 3959fi
ac50fbac 3960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3185942a 3961$as_echo "$ac_cv_objext" >&6; }
f73dda09
JA
3962OBJEXT=$ac_cv_objext
3963ac_objext=$OBJEXT
ac50fbac 3964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3185942a 3965$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
ac50fbac 3966if ${ac_cv_c_compiler_gnu+:} false; then :
3185942a 3967 $as_echo_n "(cached) " >&6
f73dda09 3968else
ac50fbac 3969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 3970/* end confdefs.h. */
f73dda09
JA
3971
3972int
3973main ()
3974{
3975#ifndef __GNUC__
3976 choke me
3977#endif
3978
3979 ;
3980 return 0;
3981}
3982_ACEOF
ac50fbac 3983if ac_fn_c_try_compile "$LINENO"; then :
f73dda09
JA
3984 ac_compiler_gnu=yes
3985else
ac50fbac 3986 ac_compiler_gnu=no
f73dda09 3987fi
3185942a 3988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09
JA
3989ac_cv_c_compiler_gnu=$ac_compiler_gnu
3990
3991fi
ac50fbac 3992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3185942a
JA
3993$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3994if test $ac_compiler_gnu = yes; then
3995 GCC=yes
3996else
3997 GCC=
3998fi
f73dda09
JA
3999ac_test_CFLAGS=${CFLAGS+set}
4000ac_save_CFLAGS=$CFLAGS
ac50fbac 4001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3185942a 4002$as_echo_n "checking whether $CC accepts -g... " >&6; }
ac50fbac 4003if ${ac_cv_prog_cc_g+:} false; then :
3185942a 4004 $as_echo_n "(cached) " >&6
f73dda09 4005else
3185942a
JA
4006 ac_save_c_werror_flag=$ac_c_werror_flag
4007 ac_c_werror_flag=yes
4008 ac_cv_prog_cc_g=no
4009 CFLAGS="-g"
ac50fbac 4010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4011/* end confdefs.h. */
f73dda09
JA
4012
4013int
4014main ()
4015{
ccc6cda3 4016
f73dda09
JA
4017 ;
4018 return 0;
4019}
4020_ACEOF
ac50fbac 4021if ac_fn_c_try_compile "$LINENO"; then :
3185942a
JA
4022 ac_cv_prog_cc_g=yes
4023else
ac50fbac
CR
4024 CFLAGS=""
4025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4026/* end confdefs.h. */
4027
4028int
4029main ()
4030{
4031
4032 ;
4033 return 0;
4034}
4035_ACEOF
ac50fbac 4036if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4037
ac50fbac
CR
4038else
4039 ac_c_werror_flag=$ac_save_c_werror_flag
3185942a 4040 CFLAGS="-g"
ac50fbac 4041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4042/* end confdefs.h. */
4043
4044int
4045main ()
4046{
4047
4048 ;
4049 return 0;
4050}
4051_ACEOF
ac50fbac 4052if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4053 ac_cv_prog_cc_g=yes
3185942a 4054fi
3185942a
JA
4055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4056fi
3185942a 4057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 4058fi
3185942a
JA
4059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4060 ac_c_werror_flag=$ac_save_c_werror_flag
f73dda09 4061fi
ac50fbac 4062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3185942a 4063$as_echo "$ac_cv_prog_cc_g" >&6; }
bb70624e 4064if test "$ac_test_CFLAGS" = set; then
f73dda09 4065 CFLAGS=$ac_save_CFLAGS
bb70624e
JA
4066elif test $ac_cv_prog_cc_g = yes; then
4067 if test "$GCC" = yes; then
ccc6cda3
JA
4068 CFLAGS="-g -O2"
4069 else
bb70624e 4070 CFLAGS="-g"
ccc6cda3
JA
4071 fi
4072else
bb70624e
JA
4073 if test "$GCC" = yes; then
4074 CFLAGS="-O2"
4075 else
4076 CFLAGS=
4077 fi
ccc6cda3 4078fi
ac50fbac 4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3185942a 4080$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
ac50fbac 4081if ${ac_cv_prog_cc_c89+:} false; then :
3185942a 4082 $as_echo_n "(cached) " >&6
0628567a 4083else
3185942a 4084 ac_cv_prog_cc_c89=no
0628567a 4085ac_save_CC=$CC
ac50fbac 4086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
4087/* end confdefs.h. */
4088#include <stdarg.h>
4089#include <stdio.h>
ac50fbac 4090struct stat;
0628567a
JA
4091/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4092struct buf { int x; };
4093FILE * (*rcsopen) (struct buf *, struct stat *, int);
4094static char *e (p, i)
4095 char **p;
4096 int i;
4097{
4098 return p[i];
4099}
4100static char *f (char * (*g) (char **, int), char **p, ...)
4101{
4102 char *s;
4103 va_list v;
4104 va_start (v,p);
4105 s = g (p, va_arg (v,int));
4106 va_end (v);
4107 return s;
4108}
4109
4110/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4111 function prototypes and stuff, but not '\xHH' hex character constants.
4112 These don't provoke an error unfortunately, instead are silently treated
3185942a 4113 as 'x'. The following induces an error, until -std is added to get
0628567a
JA
4114 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4115 array size at least. It's necessary to write '\x00'==0 to get something
3185942a 4116 that's true only with -std. */
0628567a
JA
4117int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4118
3185942a
JA
4119/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4120 inside strings and character constants. */
4121#define FOO(x) 'x'
4122int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4123
0628567a
JA
4124int test (int i, double x);
4125struct s1 {int (*f) (int a);};
4126struct s2 {int (*f) (double a);};
4127int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4128int argc;
4129char **argv;
4130int
4131main ()
4132{
4133return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4134 ;
4135 return 0;
4136}
4137_ACEOF
3185942a
JA
4138for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4139 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
0628567a
JA
4140do
4141 CC="$ac_save_CC $ac_arg"
ac50fbac 4142 if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4143 ac_cv_prog_cc_c89=$ac_arg
0628567a 4144fi
3185942a
JA
4145rm -f core conftest.err conftest.$ac_objext
4146 test "x$ac_cv_prog_cc_c89" != "xno" && break
0628567a 4147done
3185942a 4148rm -f conftest.$ac_ext
0628567a
JA
4149CC=$ac_save_CC
4150
4151fi
3185942a
JA
4152# AC_CACHE_VAL
4153case "x$ac_cv_prog_cc_c89" in
4154 x)
ac50fbac 4155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3185942a
JA
4156$as_echo "none needed" >&6; } ;;
4157 xno)
ac50fbac 4158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3185942a 4159$as_echo "unsupported" >&6; } ;;
0628567a 4160 *)
3185942a 4161 CC="$CC $ac_cv_prog_cc_c89"
ac50fbac 4162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3185942a 4163$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
0628567a 4164esac
ac50fbac 4165if test "x$ac_cv_prog_cc_c89" != xno; then :
0628567a 4166
ac50fbac 4167fi
0628567a 4168
f73dda09
JA
4169ac_ext=c
4170ac_cpp='$CPP $CPPFLAGS'
4171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4173ac_compiler_gnu=$ac_cv_c_compiler_gnu
bb70624e 4174
f73dda09 4175
ccc6cda3 4176
b80f6443 4177
ac50fbac 4178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5
3185942a 4179$as_echo_n "checking for strerror in -lcposix... " >&6; }
ac50fbac 4180if ${ac_cv_lib_cposix_strerror+:} false; then :
3185942a 4181 $as_echo_n "(cached) " >&6
ccc6cda3 4182else
b80f6443
JA
4183 ac_check_lib_save_LIBS=$LIBS
4184LIBS="-lcposix $LIBS"
ac50fbac 4185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4186/* end confdefs.h. */
b80f6443 4187
3185942a
JA
4188/* Override any GCC internal prototype to avoid an error.
4189 Use char because int might match the return type of a GCC
4190 builtin and then its argument prototype would still apply. */
b80f6443
JA
4191#ifdef __cplusplus
4192extern "C"
4193#endif
b80f6443
JA
4194char strerror ();
4195int
4196main ()
4197{
3185942a 4198return strerror ();
b80f6443
JA
4199 ;
4200 return 0;
4201}
4202_ACEOF
ac50fbac 4203if ac_fn_c_try_link "$LINENO"; then :
b80f6443
JA
4204 ac_cv_lib_cposix_strerror=yes
4205else
ac50fbac 4206 ac_cv_lib_cposix_strerror=no
b80f6443 4207fi
ac50fbac
CR
4208rm -f core conftest.err conftest.$ac_objext \
4209 conftest$ac_exeext conftest.$ac_ext
b80f6443
JA
4210LIBS=$ac_check_lib_save_LIBS
4211fi
ac50fbac 4212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5
3185942a 4213$as_echo "$ac_cv_lib_cposix_strerror" >&6; }
ac50fbac 4214if test "x$ac_cv_lib_cposix_strerror" = xyes; then :
b80f6443 4215 LIBS="$LIBS -lcposix"
ccc6cda3
JA
4216fi
4217
b80f6443
JA
4218
4219
f73dda09
JA
4220ac_ext=c
4221ac_cpp='$CPP $CPPFLAGS'
4222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4224ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac50fbac 4225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3185942a 4226$as_echo_n "checking how to run the C preprocessor... " >&6; }
ccc6cda3
JA
4227# On Suns, sometimes $CPP names a directory.
4228if test -n "$CPP" && test -d "$CPP"; then
4229 CPP=
4230fi
4231if test -z "$CPP"; then
ac50fbac 4232 if ${ac_cv_prog_CPP+:} false; then :
3185942a 4233 $as_echo_n "(cached) " >&6
f73dda09
JA
4234else
4235 # Double quotes because CPP needs to be expanded
4236 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4237 do
4238 ac_preproc_ok=false
4239for ac_c_preproc_warn_flag in '' yes
4240do
4241 # Use a header file that comes with gcc, so configuring glibc
4242 # with a fresh cross-compiler works.
0628567a
JA
4243 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4244 # <limits.h> exists even on freestanding compilers.
ccc6cda3 4245 # On the NeXT, cc -E runs the code through the compiler's parser,
f73dda09 4246 # not just through cpp. "Syntax error" is here to catch this case.
ac50fbac 4247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
4248/* end confdefs.h. */
4249#ifdef __STDC__
4250# include <limits.h>
4251#else
4252# include <assert.h>
4253#endif
4254 Syntax error
f73dda09 4255_ACEOF
ac50fbac 4256if ac_fn_c_try_cpp "$LINENO"; then :
0628567a 4257
ac50fbac 4258else
f73dda09
JA
4259 # Broken: fails on valid input.
4260continue
4261fi
ac50fbac 4262rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09 4263
3185942a 4264 # OK, works on sane cases. Now check whether nonexistent headers
f73dda09 4265 # can be detected and how.
ac50fbac 4266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4267/* end confdefs.h. */
f73dda09
JA
4268#include <ac_nonexistent.h>
4269_ACEOF
ac50fbac 4270if ac_fn_c_try_cpp "$LINENO"; then :
f73dda09
JA
4271 # Broken: success on invalid input.
4272continue
bb70624e 4273else
f73dda09
JA
4274 # Passes both tests.
4275ac_preproc_ok=:
4276break
4277fi
ac50fbac 4278rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09
JA
4279
4280done
4281# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
ac50fbac
CR
4282rm -f conftest.i conftest.err conftest.$ac_ext
4283if $ac_preproc_ok; then :
f73dda09
JA
4284 break
4285fi
4286
4287 done
4288 ac_cv_prog_CPP=$CPP
4289
4290fi
4291 CPP=$ac_cv_prog_CPP
4292else
4293 ac_cv_prog_CPP=$CPP
4294fi
ac50fbac 4295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3185942a 4296$as_echo "$CPP" >&6; }
f73dda09
JA
4297ac_preproc_ok=false
4298for ac_c_preproc_warn_flag in '' yes
4299do
4300 # Use a header file that comes with gcc, so configuring glibc
4301 # with a fresh cross-compiler works.
0628567a
JA
4302 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4303 # <limits.h> exists even on freestanding compilers.
f73dda09
JA
4304 # On the NeXT, cc -E runs the code through the compiler's parser,
4305 # not just through cpp. "Syntax error" is here to catch this case.
ac50fbac 4306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
4307/* end confdefs.h. */
4308#ifdef __STDC__
4309# include <limits.h>
4310#else
4311# include <assert.h>
4312#endif
4313 Syntax error
f73dda09 4314_ACEOF
ac50fbac 4315if ac_fn_c_try_cpp "$LINENO"; then :
0628567a 4316
ac50fbac 4317else
f73dda09
JA
4318 # Broken: fails on valid input.
4319continue
4320fi
ac50fbac 4321rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09 4322
3185942a 4323 # OK, works on sane cases. Now check whether nonexistent headers
f73dda09 4324 # can be detected and how.
ac50fbac 4325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4326/* end confdefs.h. */
f73dda09
JA
4327#include <ac_nonexistent.h>
4328_ACEOF
ac50fbac 4329if ac_fn_c_try_cpp "$LINENO"; then :
f73dda09
JA
4330 # Broken: success on invalid input.
4331continue
4332else
f73dda09
JA
4333 # Passes both tests.
4334ac_preproc_ok=:
4335break
ccc6cda3 4336fi
ac50fbac 4337rm -f conftest.err conftest.i conftest.$ac_ext
f73dda09
JA
4338
4339done
4340# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
ac50fbac
CR
4341rm -f conftest.i conftest.err conftest.$ac_ext
4342if $ac_preproc_ok; then :
4343
ccc6cda3 4344else
ac50fbac 4345 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3185942a 4346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
4347as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4348See \`config.log' for more details" "$LINENO" 5; }
ccc6cda3 4349fi
ccc6cda3 4350
f73dda09
JA
4351ac_ext=c
4352ac_cpp='$CPP $CPPFLAGS'
4353ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4354ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4355ac_compiler_gnu=$ac_cv_c_compiler_gnu
4356
b80f6443 4357
ac50fbac 4358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3185942a 4359$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
ac50fbac 4360if ${ac_cv_path_GREP+:} false; then :
3185942a
JA
4361 $as_echo_n "(cached) " >&6
4362else
4363 if test -z "$GREP"; then
4364 ac_path_GREP_found=false
4365 # Loop through the user's path and test for each of PROGNAME-LIST
4366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4367for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4368do
4369 IFS=$as_save_IFS
4370 test -z "$as_dir" && as_dir=.
ac50fbac 4371 for ac_prog in grep ggrep; do
3185942a
JA
4372 for ac_exec_ext in '' $ac_executable_extensions; do
4373 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
ac50fbac 4374 as_fn_executable_p "$ac_path_GREP" || continue
3185942a
JA
4375# Check for GNU ac_path_GREP and select it if it is found.
4376 # Check for GNU $ac_path_GREP
4377case `"$ac_path_GREP" --version 2>&1` in
4378*GNU*)
4379 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4380*)
4381 ac_count=0
4382 $as_echo_n 0123456789 >"conftest.in"
4383 while :
4384 do
4385 cat "conftest.in" "conftest.in" >"conftest.tmp"
4386 mv "conftest.tmp" "conftest.in"
4387 cp "conftest.in" "conftest.nl"
4388 $as_echo 'GREP' >> "conftest.nl"
4389 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4390 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac50fbac 4391 as_fn_arith $ac_count + 1 && ac_count=$as_val
3185942a
JA
4392 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4393 # Best one so far, save it but keep looking for a better one
4394 ac_cv_path_GREP="$ac_path_GREP"
4395 ac_path_GREP_max=$ac_count
4396 fi
4397 # 10*(2^10) chars as input seems more than enough
4398 test $ac_count -gt 10 && break
4399 done
4400 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4401esac
4402
4403 $ac_path_GREP_found && break 3
4404 done
4405 done
ac50fbac 4406 done
3185942a
JA
4407IFS=$as_save_IFS
4408 if test -z "$ac_cv_path_GREP"; then
ac50fbac 4409 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3185942a
JA
4410 fi
4411else
4412 ac_cv_path_GREP=$GREP
4413fi
4414
4415fi
ac50fbac 4416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3185942a
JA
4417$as_echo "$ac_cv_path_GREP" >&6; }
4418 GREP="$ac_cv_path_GREP"
4419
4420
ac50fbac 4421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3185942a 4422$as_echo_n "checking for egrep... " >&6; }
ac50fbac 4423if ${ac_cv_path_EGREP+:} false; then :
3185942a 4424 $as_echo_n "(cached) " >&6
0628567a 4425else
3185942a
JA
4426 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4427 then ac_cv_path_EGREP="$GREP -E"
4428 else
4429 if test -z "$EGREP"; then
4430 ac_path_EGREP_found=false
4431 # Loop through the user's path and test for each of PROGNAME-LIST
4432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4433for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4434do
4435 IFS=$as_save_IFS
4436 test -z "$as_dir" && as_dir=.
ac50fbac 4437 for ac_prog in egrep; do
3185942a
JA
4438 for ac_exec_ext in '' $ac_executable_extensions; do
4439 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
ac50fbac 4440 as_fn_executable_p "$ac_path_EGREP" || continue
3185942a
JA
4441# Check for GNU ac_path_EGREP and select it if it is found.
4442 # Check for GNU $ac_path_EGREP
4443case `"$ac_path_EGREP" --version 2>&1` in
4444*GNU*)
4445 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4446*)
4447 ac_count=0
4448 $as_echo_n 0123456789 >"conftest.in"
4449 while :
4450 do
4451 cat "conftest.in" "conftest.in" >"conftest.tmp"
4452 mv "conftest.tmp" "conftest.in"
4453 cp "conftest.in" "conftest.nl"
4454 $as_echo 'EGREP' >> "conftest.nl"
4455 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4456 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ac50fbac 4457 as_fn_arith $ac_count + 1 && ac_count=$as_val
3185942a
JA
4458 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4459 # Best one so far, save it but keep looking for a better one
4460 ac_cv_path_EGREP="$ac_path_EGREP"
4461 ac_path_EGREP_max=$ac_count
0628567a 4462 fi
3185942a
JA
4463 # 10*(2^10) chars as input seems more than enough
4464 test $ac_count -gt 10 && break
4465 done
4466 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4467esac
4468
4469 $ac_path_EGREP_found && break 3
4470 done
4471 done
ac50fbac 4472 done
3185942a
JA
4473IFS=$as_save_IFS
4474 if test -z "$ac_cv_path_EGREP"; then
ac50fbac 4475 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3185942a
JA
4476 fi
4477else
4478 ac_cv_path_EGREP=$EGREP
0628567a 4479fi
0628567a 4480
3185942a
JA
4481 fi
4482fi
ac50fbac 4483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3185942a
JA
4484$as_echo "$ac_cv_path_EGREP" >&6; }
4485 EGREP="$ac_cv_path_EGREP"
0628567a 4486
3185942a 4487
ac50fbac 4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3185942a 4489$as_echo_n "checking for ANSI C header files... " >&6; }
ac50fbac 4490if ${ac_cv_header_stdc+:} false; then :
3185942a 4491 $as_echo_n "(cached) " >&6
ccc6cda3 4492else
ac50fbac 4493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4494/* end confdefs.h. */
b80f6443
JA
4495#include <stdlib.h>
4496#include <stdarg.h>
4497#include <string.h>
4498#include <float.h>
4499
0628567a
JA
4500int
4501main ()
4502{
4503
4504 ;
4505 return 0;
4506}
b80f6443 4507_ACEOF
ac50fbac 4508if ac_fn_c_try_compile "$LINENO"; then :
b80f6443
JA
4509 ac_cv_header_stdc=yes
4510else
ac50fbac 4511 ac_cv_header_stdc=no
b80f6443 4512fi
3185942a 4513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b80f6443
JA
4514
4515if test $ac_cv_header_stdc = yes; then
4516 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ac50fbac 4517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4518/* end confdefs.h. */
b80f6443
JA
4519#include <string.h>
4520
4521_ACEOF
4522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac
CR
4523 $EGREP "memchr" >/dev/null 2>&1; then :
4524
b80f6443
JA
4525else
4526 ac_cv_header_stdc=no
4527fi
4528rm -f conftest*
4529
4530fi
4531
4532if test $ac_cv_header_stdc = yes; then
4533 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ac50fbac 4534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4535/* end confdefs.h. */
b80f6443
JA
4536#include <stdlib.h>
4537
4538_ACEOF
4539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac
CR
4540 $EGREP "free" >/dev/null 2>&1; then :
4541
b80f6443
JA
4542else
4543 ac_cv_header_stdc=no
4544fi
4545rm -f conftest*
4546
4547fi
4548
4549if test $ac_cv_header_stdc = yes; then
4550 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ac50fbac 4551 if test "$cross_compiling" = yes; then :
b80f6443
JA
4552 :
4553else
ac50fbac 4554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4555/* end confdefs.h. */
b80f6443 4556#include <ctype.h>
3185942a 4557#include <stdlib.h>
b80f6443
JA
4558#if ((' ' & 0x0FF) == 0x020)
4559# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4560# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4561#else
0628567a
JA
4562# define ISLOWER(c) \
4563 (('a' <= (c) && (c) <= 'i') \
4564 || ('j' <= (c) && (c) <= 'r') \
4565 || ('s' <= (c) && (c) <= 'z'))
b80f6443
JA
4566# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4567#endif
4568
4569#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4570int
4571main ()
4572{
4573 int i;
4574 for (i = 0; i < 256; i++)
4575 if (XOR (islower (i), ISLOWER (i))
0628567a 4576 || toupper (i) != TOUPPER (i))
3185942a
JA
4577 return 2;
4578 return 0;
b80f6443
JA
4579}
4580_ACEOF
ac50fbac 4581if ac_fn_c_try_run "$LINENO"; then :
0628567a 4582
ac50fbac
CR
4583else
4584 ac_cv_header_stdc=no
b80f6443 4585fi
ac50fbac
CR
4586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4587 conftest.$ac_objext conftest.beam conftest.$ac_ext
b80f6443 4588fi
3185942a 4589
b80f6443
JA
4590fi
4591fi
ac50fbac 4592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3185942a 4593$as_echo "$ac_cv_header_stdc" >&6; }
b80f6443
JA
4594if test $ac_cv_header_stdc = yes; then
4595
ac50fbac 4596$as_echo "#define STDC_HEADERS 1" >>confdefs.h
b80f6443
JA
4597
4598fi
4599
4600# On IRIX 5.3, sys/types and inttypes.h are conflicting.
ac50fbac
CR
4601for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4602 inttypes.h stdint.h unistd.h
4603do :
4604 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4605ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4606"
4607if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4608 cat >>confdefs.h <<_ACEOF
4609#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4610_ACEOF
b80f6443 4611
ac50fbac 4612fi
b80f6443 4613
ac50fbac 4614done
b80f6443
JA
4615
4616
4617
ac50fbac
CR
4618 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4619if test "x$ac_cv_header_minix_config_h" = xyes; then :
4620 MINIX=yes
4621else
4622 MINIX=
4623fi
b80f6443
JA
4624
4625
ac50fbac 4626 if test "$MINIX" = yes; then
b80f6443 4627
ac50fbac 4628$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
b80f6443 4629
b80f6443 4630
ac50fbac 4631$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
b80f6443 4632
ccc6cda3 4633
ac50fbac 4634$as_echo "#define _MINIX 1" >>confdefs.h
ccc6cda3 4635
3185942a 4636 fi
ccc6cda3 4637
b80f6443 4638
ac50fbac 4639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
3185942a 4640$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
ac50fbac 4641if ${ac_cv_safe_to_define___extensions__+:} false; then :
3185942a
JA
4642 $as_echo_n "(cached) " >&6
4643else
ac50fbac 4644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4645/* end confdefs.h. */
4646
ac50fbac
CR
4647# define __EXTENSIONS__ 1
4648 $ac_includes_default
3185942a
JA
4649int
4650main ()
4651{
4652
4653 ;
4654 return 0;
4655}
4656_ACEOF
ac50fbac 4657if ac_fn_c_try_compile "$LINENO"; then :
3185942a
JA
4658 ac_cv_safe_to_define___extensions__=yes
4659else
ac50fbac 4660 ac_cv_safe_to_define___extensions__=no
3185942a 4661fi
3185942a
JA
4662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4663fi
ac50fbac 4664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
3185942a
JA
4665$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4666 test $ac_cv_safe_to_define___extensions__ = yes &&
ac50fbac 4667 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
3185942a 4668
ac50fbac 4669 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
3185942a 4670
ac50fbac 4671 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
3185942a 4672
ac50fbac
CR
4673 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4674
4675 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
3185942a 4676
3185942a
JA
4677
4678
4679
4680# Check whether --enable-largefile was given.
ac50fbac 4681if test "${enable_largefile+set}" = set; then :
3185942a
JA
4682 enableval=$enable_largefile;
4683fi
f73dda09 4684
f73dda09 4685if test "$enable_largefile" != no; then
ccc6cda3 4686
ac50fbac 4687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
3185942a 4688$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
ac50fbac 4689if ${ac_cv_sys_largefile_CC+:} false; then :
3185942a 4690 $as_echo_n "(cached) " >&6
bb70624e 4691else
f73dda09
JA
4692 ac_cv_sys_largefile_CC=no
4693 if test "$GCC" != yes; then
4694 ac_save_CC=$CC
4695 while :; do
3185942a
JA
4696 # IRIX 6.2 and later do not support large files by default,
4697 # so use the C compiler's -n32 option if that helps.
ac50fbac 4698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4699/* end confdefs.h. */
f73dda09
JA
4700#include <sys/types.h>
4701 /* Check that off_t can represent 2**63 - 1 correctly.
4702 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4703 since some C++ compilers masquerading as C compilers
4704 incorrectly reject 9223372036854775807. */
4705#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4706 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4707 && LARGE_OFF_T % 2147483647 == 1)
4708 ? 1 : -1];
4709int
4710main ()
4711{
bb70624e 4712
f73dda09
JA
4713 ;
4714 return 0;
4715}
4716_ACEOF
ac50fbac 4717 if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4718 break
f73dda09 4719fi
3185942a
JA
4720rm -f core conftest.err conftest.$ac_objext
4721 CC="$CC -n32"
ac50fbac 4722 if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4723 ac_cv_sys_largefile_CC=' -n32'; break
f73dda09 4724fi
3185942a 4725rm -f core conftest.err conftest.$ac_objext
0628567a 4726 break
f73dda09
JA
4727 done
4728 CC=$ac_save_CC
4729 rm -f conftest.$ac_ext
4730 fi
bb70624e 4731fi
ac50fbac 4732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
3185942a 4733$as_echo "$ac_cv_sys_largefile_CC" >&6; }
f73dda09
JA
4734 if test "$ac_cv_sys_largefile_CC" != no; then
4735 CC=$CC$ac_cv_sys_largefile_CC
4736 fi
bb70624e 4737
ac50fbac 4738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
3185942a 4739$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
ac50fbac 4740if ${ac_cv_sys_file_offset_bits+:} false; then :
3185942a 4741 $as_echo_n "(cached) " >&6
bb70624e 4742else
f73dda09 4743 while :; do
ac50fbac 4744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4745/* end confdefs.h. */
f73dda09
JA
4746#include <sys/types.h>
4747 /* Check that off_t can represent 2**63 - 1 correctly.
4748 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4749 since some C++ compilers masquerading as C compilers
4750 incorrectly reject 9223372036854775807. */
4751#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4752 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4753 && LARGE_OFF_T % 2147483647 == 1)
4754 ? 1 : -1];
4755int
4756main ()
4757{
bb70624e 4758
f73dda09
JA
4759 ;
4760 return 0;
4761}
4762_ACEOF
ac50fbac 4763if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4764 ac_cv_sys_file_offset_bits=no; break
bb70624e 4765fi
3185942a 4766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac50fbac 4767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4768/* end confdefs.h. */
f73dda09
JA
4769#define _FILE_OFFSET_BITS 64
4770#include <sys/types.h>
4771 /* Check that off_t can represent 2**63 - 1 correctly.
4772 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4773 since some C++ compilers masquerading as C compilers
4774 incorrectly reject 9223372036854775807. */
4775#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4776 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4777 && LARGE_OFF_T % 2147483647 == 1)
4778 ? 1 : -1];
4779int
4780main ()
4781{
bb70624e 4782
f73dda09
JA
4783 ;
4784 return 0;
4785}
4786_ACEOF
ac50fbac 4787if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4788 ac_cv_sys_file_offset_bits=64; break
f73dda09 4789fi
3185942a
JA
4790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4791 ac_cv_sys_file_offset_bits=unknown
f73dda09
JA
4792 break
4793done
4794fi
ac50fbac 4795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
3185942a
JA
4796$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4797case $ac_cv_sys_file_offset_bits in #(
4798 no | unknown) ;;
4799 *)
b80f6443 4800cat >>confdefs.h <<_ACEOF
f73dda09 4801#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
b80f6443 4802_ACEOF
3185942a
JA
4803;;
4804esac
4805rm -rf conftest*
4806 if test $ac_cv_sys_file_offset_bits = unknown; then
ac50fbac 4807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
3185942a 4808$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
ac50fbac 4809if ${ac_cv_sys_large_files+:} false; then :
3185942a 4810 $as_echo_n "(cached) " >&6
bb70624e 4811else
f73dda09 4812 while :; do
ac50fbac 4813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4814/* end confdefs.h. */
f73dda09
JA
4815#include <sys/types.h>
4816 /* Check that off_t can represent 2**63 - 1 correctly.
4817 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4818 since some C++ compilers masquerading as C compilers
4819 incorrectly reject 9223372036854775807. */
4820#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4821 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4822 && LARGE_OFF_T % 2147483647 == 1)
4823 ? 1 : -1];
4824int
4825main ()
4826{
4827
4828 ;
4829 return 0;
4830}
4831_ACEOF
ac50fbac 4832if ac_fn_c_try_compile "$LINENO"; then :
3185942a 4833 ac_cv_sys_large_files=no; break
bb70624e 4834fi
3185942a 4835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac50fbac 4836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4837/* end confdefs.h. */
f73dda09
JA
4838#define _LARGE_FILES 1
4839#include <sys/types.h>
4840 /* Check that off_t can represent 2**63 - 1 correctly.
4841 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4842 since some C++ compilers masquerading as C compilers
4843 incorrectly reject 9223372036854775807. */
4844#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4845 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4846 && LARGE_OFF_T % 2147483647 == 1)
4847 ? 1 : -1];
4848int
4849main ()
4850{
bb70624e 4851
f73dda09
JA
4852 ;
4853 return 0;
4854}
4855_ACEOF
ac50fbac 4856if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 4857 ac_cv_sys_large_files=1; break
f73dda09 4858fi
3185942a
JA
4859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4860 ac_cv_sys_large_files=unknown
f73dda09
JA
4861 break
4862done
4863fi
ac50fbac 4864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
3185942a
JA
4865$as_echo "$ac_cv_sys_large_files" >&6; }
4866case $ac_cv_sys_large_files in #(
4867 no | unknown) ;;
4868 *)
b80f6443 4869cat >>confdefs.h <<_ACEOF
f73dda09 4870#define _LARGE_FILES $ac_cv_sys_large_files
b80f6443 4871_ACEOF
3185942a
JA
4872;;
4873esac
4874rm -rf conftest*
4875 fi
ac50fbac
CR
4876
4877
f73dda09 4878fi
cce855bc 4879
b80f6443
JA
4880
4881
0628567a 4882SIGNAMES_O=
b72432fd
JA
4883SIGNAMES_H=lsignames.h
4884
b80f6443
JA
4885
4886
0628567a 4887CROSS_COMPILE=
cce855bc
JA
4888if test "x$cross_compiling" = "xyes"; then
4889 case "${host}" in
28ef6c31 4890 *-cygwin*)
cce855bc 4891 cross_cache=${srcdir}/cross-build/cygwin32.cache
cce855bc 4892 ;;
95732b49
JA
4893 *-mingw*)
4894 cross_cache=${srcdir}/cross-build/cygwin32.cache
4895 ;;
b72432fd
JA
4896 i[3456]86-*-beos*)
4897 cross_cache=${srcdir}/cross-build/x86-beos.cache
b72432fd
JA
4898 ;;
4899 *) echo "configure: cross-compiling for $host is not supported" >&2
cce855bc
JA
4900 ;;
4901 esac
b72432fd
JA
4902 if test -n "${cross_cache}" && test -r "${cross_cache}"; then
4903 echo "loading cross-build cache file ${cross_cache}"
4904 . ${cross_cache}
4905 fi
4906 unset cross_cache
0628567a 4907 SIGNAMES_O='signames.o'
95732b49
JA
4908 CROSS_COMPILE='-DCROSS_COMPILING'
4909
cce855bc
JA
4910fi
4911
b80f6443 4912
0628567a 4913
b80f6443 4914
ac50fbac
CR
4915CFLAGS=${CFLAGS-"$AUTO_CFLAGS"}
4916# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX
ccc6cda3 4917
a0c0a00f
CR
4918# turn off paren warnings in gcc
4919if test "$GCC" = yes # && test -n "$DEBUG"
4920then
4921 CFLAGS="$CFLAGS -Wno-parentheses -Wno-format-security"
4922fi
4923
cce855bc
JA
4924if test "$opt_profiling" = "yes"; then
4925 PROFILE_FLAGS=-pg
b72432fd
JA
4926 case "$host_os" in
4927 solaris2*) ;;
4928 *) opt_static_link=yes ;;
4929 esac
7117c2d2 4930 DEBUG= MALLOC_DEBUG=
cce855bc
JA
4931fi
4932
ac50fbac
CR
4933prefer_shared=yes
4934prefer_static=no
4935
cce855bc 4936if test "$opt_static_link" = yes; then
ac50fbac
CR
4937 prefer_static=yes
4938 prefer_shared=no
f73dda09
JA
4939 # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
4940 if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
b72432fd 4941 STATIC_LD="-static"
f73dda09
JA
4942 case "$host_os" in
4943 solaris2*) ;;
4944 *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental
4945 esac
cce855bc
JA
4946 fi
4947fi
4948
ac50fbac
CR
4949# set the appropriate make variables for building the "build tools"
4950# modify defaults based on whether or not we are cross compiling, since the
4951# options for the target host may not be appropriate for the build host
b80f6443 4952if test "X$cross_compiling" = "Xno"; then
ac50fbac
CR
4953 CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'}
4954 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)'
b80f6443 4955 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'}
ac50fbac
CR
4956 # CFLAGS set above to default value if not passed in environment
4957 CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'}
4958 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'}
b80f6443 4959else
ac50fbac 4960 CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"}
b80f6443
JA
4961 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
4962 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
ac50fbac
CR
4963 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"}
4964 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""}
b80f6443
JA
4965fi
4966
ac50fbac 4967
7117c2d2 4968
b80f6443
JA
4969
4970
4971
4972
4973
4974
4975
4976
4977
f73dda09 4978if test $ac_cv_c_compiler_gnu = yes; then
ac50fbac 4979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
3185942a 4980$as_echo_n "checking whether $CC needs -traditional... " >&6; }
ac50fbac 4981if ${ac_cv_prog_gcc_traditional+:} false; then :
3185942a 4982 $as_echo_n "(cached) " >&6
ccc6cda3
JA
4983else
4984 ac_pattern="Autoconf.*'x'"
ac50fbac 4985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4986/* end confdefs.h. */
ccc6cda3
JA
4987#include <sgtty.h>
4988Autoconf TIOCGETP
f73dda09 4989_ACEOF
ccc6cda3 4990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 4991 $EGREP "$ac_pattern" >/dev/null 2>&1; then :
ccc6cda3
JA
4992 ac_cv_prog_gcc_traditional=yes
4993else
ccc6cda3
JA
4994 ac_cv_prog_gcc_traditional=no
4995fi
4996rm -f conftest*
4997
b80f6443 4998
ccc6cda3 4999 if test $ac_cv_prog_gcc_traditional = no; then
ac50fbac 5000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5001/* end confdefs.h. */
ccc6cda3
JA
5002#include <termio.h>
5003Autoconf TCGETA
f73dda09 5004_ACEOF
ccc6cda3 5005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 5006 $EGREP "$ac_pattern" >/dev/null 2>&1; then :
ccc6cda3
JA
5007 ac_cv_prog_gcc_traditional=yes
5008fi
5009rm -f conftest*
5010
5011 fi
5012fi
ac50fbac 5013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
3185942a 5014$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
ccc6cda3
JA
5015 if test $ac_cv_prog_gcc_traditional = yes; then
5016 CC="$CC -traditional"
5017 fi
5018fi
5019
b80f6443
JA
5020
5021
f73dda09 5022if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no"
b72432fd 5023then
f73dda09
JA
5024 # If the user specified --with-installed-readline=PREFIX and PREFIX
5025 # is not `yes', set ac_cv_rl_prefix to PREFIX
5026 test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline
b72432fd 5027
b80f6443 5028
bb70624e
JA
5029if test "X$bash_cv_termcap_lib" = "X"; then
5030_bash_needmsg=yes
5031else
ac50fbac 5032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 5033$as_echo_n "checking which library has the termcap functions... " >&6; }
bb70624e
JA
5034_bash_needmsg=
5035fi
ac50fbac 5036if ${bash_cv_termcap_lib+:} false; then :
3185942a 5037 $as_echo_n "(cached) " >&6
bb70624e 5038else
ac50fbac
CR
5039 ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
5040if test "x$ac_cv_func_tgetent" = xyes; then :
5041 bash_cv_termcap_lib=libc
5042else
5043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
5044$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
5045if ${ac_cv_lib_termcap_tgetent+:} false; then :
3185942a 5046 $as_echo_n "(cached) " >&6
b80f6443 5047else
ac50fbac
CR
5048 ac_check_lib_save_LIBS=$LIBS
5049LIBS="-ltermcap $LIBS"
5050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5051/* end confdefs.h. */
0628567a 5052
3185942a
JA
5053/* Override any GCC internal prototype to avoid an error.
5054 Use char because int might match the return type of a GCC
5055 builtin and then its argument prototype would still apply. */
b80f6443
JA
5056#ifdef __cplusplus
5057extern "C"
b80f6443 5058#endif
b80f6443 5059char tgetent ();
0628567a
JA
5060int
5061main ()
5062{
3185942a 5063return tgetent ();
b80f6443
JA
5064 ;
5065 return 0;
5066}
5067_ACEOF
ac50fbac
CR
5068if ac_fn_c_try_link "$LINENO"; then :
5069 ac_cv_lib_termcap_tgetent=yes
b80f6443 5070else
ac50fbac 5071 ac_cv_lib_termcap_tgetent=no
b80f6443 5072fi
ac50fbac
CR
5073rm -f core conftest.err conftest.$ac_objext \
5074 conftest$ac_exeext conftest.$ac_ext
5075LIBS=$ac_check_lib_save_LIBS
b80f6443 5076fi
ac50fbac 5077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
3185942a 5078$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
ac50fbac 5079if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
bb70624e
JA
5080 bash_cv_termcap_lib=libtermcap
5081else
ac50fbac 5082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
3185942a 5083$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
ac50fbac 5084if ${ac_cv_lib_tinfo_tgetent+:} false; then :
3185942a 5085 $as_echo_n "(cached) " >&6
bb70624e 5086else
f73dda09
JA
5087 ac_check_lib_save_LIBS=$LIBS
5088LIBS="-ltinfo $LIBS"
ac50fbac 5089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5090/* end confdefs.h. */
f73dda09 5091
3185942a
JA
5092/* Override any GCC internal prototype to avoid an error.
5093 Use char because int might match the return type of a GCC
5094 builtin and then its argument prototype would still apply. */
f73dda09
JA
5095#ifdef __cplusplus
5096extern "C"
5097#endif
f73dda09
JA
5098char tgetent ();
5099int
5100main ()
5101{
3185942a 5102return tgetent ();
f73dda09
JA
5103 ;
5104 return 0;
5105}
5106_ACEOF
ac50fbac 5107if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5108 ac_cv_lib_tinfo_tgetent=yes
5109else
ac50fbac 5110 ac_cv_lib_tinfo_tgetent=no
f73dda09 5111fi
ac50fbac
CR
5112rm -f core conftest.err conftest.$ac_objext \
5113 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5114LIBS=$ac_check_lib_save_LIBS
5115fi
ac50fbac 5116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
3185942a 5117$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
ac50fbac 5118if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
7117c2d2 5119 bash_cv_termcap_lib=libtinfo
f73dda09 5120else
ac50fbac 5121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
3185942a 5122$as_echo_n "checking for tgetent in -lcurses... " >&6; }
ac50fbac 5123if ${ac_cv_lib_curses_tgetent+:} false; then :
3185942a 5124 $as_echo_n "(cached) " >&6
f73dda09
JA
5125else
5126 ac_check_lib_save_LIBS=$LIBS
5127LIBS="-lcurses $LIBS"
ac50fbac 5128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5129/* end confdefs.h. */
b72432fd 5130
3185942a
JA
5131/* Override any GCC internal prototype to avoid an error.
5132 Use char because int might match the return type of a GCC
5133 builtin and then its argument prototype would still apply. */
f73dda09
JA
5134#ifdef __cplusplus
5135extern "C"
5136#endif
f73dda09
JA
5137char tgetent ();
5138int
5139main ()
5140{
3185942a 5141return tgetent ();
f73dda09
JA
5142 ;
5143 return 0;
5144}
5145_ACEOF
ac50fbac 5146if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5147 ac_cv_lib_curses_tgetent=yes
5148else
ac50fbac 5149 ac_cv_lib_curses_tgetent=no
f73dda09 5150fi
ac50fbac
CR
5151rm -f core conftest.err conftest.$ac_objext \
5152 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5153LIBS=$ac_check_lib_save_LIBS
5154fi
ac50fbac 5155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
3185942a 5156$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
ac50fbac 5157if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
bb70624e
JA
5158 bash_cv_termcap_lib=libcurses
5159else
ac50fbac 5160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
3185942a 5161$as_echo_n "checking for tgetent in -lncurses... " >&6; }
ac50fbac 5162if ${ac_cv_lib_ncurses_tgetent+:} false; then :
3185942a 5163 $as_echo_n "(cached) " >&6
bb70624e 5164else
f73dda09 5165 ac_check_lib_save_LIBS=$LIBS
bb70624e 5166LIBS="-lncurses $LIBS"
ac50fbac 5167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5168/* end confdefs.h. */
f73dda09 5169
3185942a
JA
5170/* Override any GCC internal prototype to avoid an error.
5171 Use char because int might match the return type of a GCC
5172 builtin and then its argument prototype would still apply. */
f73dda09
JA
5173#ifdef __cplusplus
5174extern "C"
5175#endif
f73dda09
JA
5176char tgetent ();
5177int
5178main ()
5179{
3185942a 5180return tgetent ();
f73dda09
JA
5181 ;
5182 return 0;
5183}
5184_ACEOF
ac50fbac 5185if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
5186 ac_cv_lib_ncurses_tgetent=yes
5187else
ac50fbac 5188 ac_cv_lib_ncurses_tgetent=no
f73dda09 5189fi
ac50fbac
CR
5190rm -f core conftest.err conftest.$ac_objext \
5191 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5192LIBS=$ac_check_lib_save_LIBS
5193fi
ac50fbac 5194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
3185942a 5195$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
ac50fbac 5196if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
f73dda09 5197 bash_cv_termcap_lib=libncurses
bb70624e 5198else
f73dda09 5199 bash_cv_termcap_lib=gnutermcap
bb70624e 5200fi
bb70624e 5201
bb70624e
JA
5202fi
5203
5204fi
5205
5206fi
5207
5208fi
5209
b80f6443
JA
5210fi
5211
bb70624e 5212if test "X$_bash_needmsg" = "Xyes"; then
ac50fbac 5213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 5214$as_echo_n "checking which library has the termcap functions... " >&6; }
bb70624e 5215fi
ac50fbac 5216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5
3185942a 5217$as_echo "using $bash_cv_termcap_lib" >&6; }
bb70624e
JA
5218if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
5219LDFLAGS="$LDFLAGS -L./lib/termcap"
5220TERMCAP_LIB="./lib/termcap/libtermcap.a"
5221TERMCAP_DEP="./lib/termcap/libtermcap.a"
5222elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
5223TERMCAP_LIB=-ltermcap
5224TERMCAP_DEP=
f73dda09
JA
5225elif test $bash_cv_termcap_lib = libtinfo; then
5226TERMCAP_LIB=-ltinfo
5227TERMCAP_DEP=
bb70624e
JA
5228elif test $bash_cv_termcap_lib = libncurses; then
5229TERMCAP_LIB=-lncurses
5230TERMCAP_DEP=
b80f6443
JA
5231elif test $bash_cv_termcap_lib = libc; then
5232TERMCAP_LIB=
5233TERMCAP_DEP=
bb70624e
JA
5234else
5235TERMCAP_LIB=-lcurses
5236TERMCAP_DEP=
5237fi
5238
b80f6443
JA
5239
5240
5241
ac50fbac 5242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of installed readline library" >&5
3185942a 5243$as_echo_n "checking version of installed readline library... " >&6; }
f73dda09
JA
5244
5245# What a pain in the ass this is.
5246
5247# save cpp and ld options
5248_save_CFLAGS="$CFLAGS"
5249_save_LDFLAGS="$LDFLAGS"
5250_save_LIBS="$LIBS"
5251
5252# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
5253# allows the caller to do something like $_rl_prefix=$withval if the user
5254# specifies --with-installed-readline=PREFIX as an argument to configure
5255
5256if test -z "$ac_cv_rl_prefix"; then
5257test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
5258fi
5259
5260eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
5261eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
5262
5263LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
5264CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
5265LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
5266
ac50fbac 5267if ${ac_cv_rl_version+:} false; then :
3185942a 5268 $as_echo_n "(cached) " >&6
b80f6443 5269else
ac50fbac 5270 if test "$cross_compiling" = yes; then :
a0c0a00f 5271 ac_cv_rl_version='6.3'
f73dda09 5272else
ac50fbac 5273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5274/* end confdefs.h. */
f73dda09
JA
5275
5276#include <stdio.h>
5277#include <readline/readline.h>
5278
95732b49
JA
5279extern int rl_gnu_readline_p;
5280
f73dda09
JA
5281main()
5282{
5283 FILE *fp;
5284 fp = fopen("conftest.rlv", "w");
95732b49
JA
5285 if (fp == 0)
5286 exit(1);
5287 if (rl_gnu_readline_p != 1)
5288 fprintf(fp, "0.0\n");
5289 else
5290 fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
f73dda09
JA
5291 fclose(fp);
5292 exit(0);
5293}
5294
5295_ACEOF
ac50fbac 5296if ac_fn_c_try_run "$LINENO"; then :
f73dda09
JA
5297 ac_cv_rl_version=`cat conftest.rlv`
5298else
ac50fbac 5299 ac_cv_rl_version='0.0'
f73dda09 5300fi
ac50fbac
CR
5301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5302 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 5303fi
3185942a 5304
b80f6443
JA
5305fi
5306
f73dda09
JA
5307
5308CFLAGS="$_save_CFLAGS"
5309LDFLAGS="$_save_LDFLAGS"
5310LIBS="$_save_LIBS"
5311
5312RL_MAJOR=0
5313RL_MINOR=0
5314
5315# (
5316case "$ac_cv_rl_version" in
53172*|3*|4*|5*|6*|7*|8*|9*)
5318 RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
7117c2d2 5319 RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'`
f73dda09
JA
5320 ;;
5321esac
5322
5323# (((
5324case $RL_MAJOR in
5325[0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;;
5326[0-9]) _RL_MAJOR=0$RL_MAJOR ;;
5327*) _RL_MAJOR=00 ;;
5328esac
5329
5330# (((
5331case $RL_MINOR in
5332[0-9][0-9]) _RL_MINOR=$RL_MINOR ;;
5333[0-9]) _RL_MINOR=0$RL_MINOR ;;
5334*) _RL_MINOR=00 ;;
5335esac
5336
5337RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
5338
5339# Readline versions greater than 4.2 have these defines in readline.h
5340
5341if test $ac_cv_rl_version = '0.0' ; then
ac50fbac 5342 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not test version of installed readline library." >&5
3185942a 5343$as_echo "$as_me: WARNING: Could not test version of installed readline library." >&2;}
f73dda09
JA
5344elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
5345 # set these for use by the caller
5346 RL_PREFIX=$ac_cv_rl_prefix
5347 RL_LIBDIR=$ac_cv_rl_libdir
5348 RL_INCLUDEDIR=$ac_cv_rl_includedir
ac50fbac 5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5
3185942a 5350$as_echo "$ac_cv_rl_version" >&6; }
f73dda09
JA
5351else
5352
b80f6443
JA
5353
5354cat >>confdefs.h <<_ACEOF
f73dda09 5355#define RL_READLINE_VERSION $RL_VERSION
b80f6443 5356_ACEOF
f73dda09 5357
b80f6443
JA
5358
5359cat >>confdefs.h <<_ACEOF
f73dda09 5360#define RL_VERSION_MAJOR $RL_MAJOR
b80f6443 5361_ACEOF
f73dda09 5362
b80f6443
JA
5363
5364cat >>confdefs.h <<_ACEOF
f73dda09 5365#define RL_VERSION_MINOR $RL_MINOR
b80f6443
JA
5366_ACEOF
5367
5368
5369
5370
5371
f73dda09
JA
5372
5373# set these for use by the caller
5374RL_PREFIX=$ac_cv_rl_prefix
5375RL_LIBDIR=$ac_cv_rl_libdir
5376RL_INCLUDEDIR=$ac_cv_rl_includedir
bb70624e 5377
ac50fbac 5378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5
3185942a 5379$as_echo "$ac_cv_rl_version" >&6; }
bb70624e 5380
f73dda09 5381fi
bb70624e 5382
b80f6443 5383
f73dda09 5384 case "$ac_cv_rl_version" in
b80f6443 5385 5*|6*|7*|8*|9*) ;;
f73dda09 5386 *) opt_with_installed_readline=no
ac50fbac 5387 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5
3185942a 5388$as_echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;}
ac50fbac 5389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using private bash version" >&5
3185942a 5390$as_echo "$as_me: WARNING: using private bash version" >&2;}
bb70624e
JA
5391 ;;
5392 esac
bb70624e
JA
5393fi
5394
95732b49 5395TILDE_LIB=-ltilde
bb70624e 5396if test $opt_readline = yes; then
ac50fbac 5397 $as_echo "#define READLINE 1" >>confdefs.h
bb70624e 5398
f73dda09 5399 if test "$opt_with_installed_readline" != "no" ; then
b80f6443
JA
5400 case "$opt_with_installed_readline" in
5401 yes) RL_INCLUDE= ;;
5402 *) case "$RL_INCLUDEDIR" in
5403 /usr/include) ;;
5404 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
5405 esac
5406 ;;
f73dda09 5407 esac
bb70624e 5408 READLINE_DEP=
95732b49
JA
5409 READLINE_LIB=-lreadline
5410 # section for OS versions that don't allow unresolved symbols
5411 # to be compiled into dynamic libraries.
5412 case "$host_os" in
5413 cygwin*) TILDE_LIB= ;;
5414 esac
bb70624e
JA
5415 else
5416 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5417 READLINE_DEP='$(READLINE_LIBRARY)'
95732b49
JA
5418 # section for OS versions that ship an older/broken version of
5419 # readline as a standard dynamic library and don't allow a
5420 # static version specified as -llibname to override the
5421 # dynamic version
5422 case "${host_os}" in
89a92869 5423 darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
95732b49
JA
5424 *) READLINE_LIB=-lreadline ;;
5425 esac
bb70624e
JA
5426 fi
5427else
5428 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5429 READLINE_LIB= READLINE_DEP=
5430fi
5431if test $opt_history = yes || test $opt_bang_history = yes; then
5432 if test $opt_history = yes; then
ac50fbac 5433 $as_echo "#define HISTORY 1" >>confdefs.h
bb70624e
JA
5434
5435 fi
5436 if test $opt_bang_history = yes; then
ac50fbac 5437 $as_echo "#define BANG_HISTORY 1" >>confdefs.h
b72432fd
JA
5438
5439 fi
f73dda09
JA
5440 if test "$opt_with_installed_readline" != "no"; then
5441 HIST_LIBDIR=$RL_LIBDIR
b72432fd 5442 HISTORY_DEP=
95732b49 5443 HISTORY_LIB=-lhistory
b80f6443
JA
5444 case "$opt_with_installed_readline" in
5445 yes) RL_INCLUDE= ;;
5446 *) case "$RL_INCLUDEDIR" in
5447 /usr/include) ;;
5448 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
5449 esac
5450 ;;
f73dda09 5451 esac
b72432fd
JA
5452 else
5453 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5454 HISTORY_DEP='$(HISTORY_LIBRARY)'
95732b49
JA
5455 # section for OS versions that ship an older version of
5456 # readline as a standard dynamic library and don't allow a
5457 # static version specified as -llibname to override the
5458 # dynamic version
5459 case "${host_os}" in
89a92869 5460 darwin[89]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;;
95732b49
JA
5461 *) HISTORY_LIB=-lhistory ;;
5462 esac
b72432fd
JA
5463 fi
5464else
5465 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
5466 HISTORY_LIB= HISTORY_DEP=
5467fi
5468
b80f6443
JA
5469
5470
5471
5472
5473
5474
5475
5476
5477
95732b49 5478
ccc6cda3
JA
5479# Find a good install program. We prefer a C program (faster),
5480# so one script is as good as another. But avoid the broken or
5481# incompatible versions:
5482# SysV /etc/install, /usr/sbin/install
5483# SunOS /usr/etc/install
5484# IRIX /sbin/install
5485# AIX /bin/install
f73dda09 5486# AmigaOS /C/install, which installs bootblocks on floppy discs
bb70624e 5487# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ccc6cda3
JA
5488# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5489# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
0628567a 5490# OS/2's system install, which has a completely different semantic
ccc6cda3 5491# ./install, which can be erroneously created by make from ./install.sh.
3185942a 5492# Reject install programs that cannot install multiple files.
ac50fbac 5493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3185942a 5494$as_echo_n "checking for a BSD-compatible install... " >&6; }
ccc6cda3 5495if test -z "$INSTALL"; then
ac50fbac 5496if ${ac_cv_path_install+:} false; then :
3185942a 5497 $as_echo_n "(cached) " >&6
ccc6cda3 5498else
b80f6443
JA
5499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5500for as_dir in $PATH
5501do
5502 IFS=$as_save_IFS
5503 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5504 # Account for people who put trailing slashes in PATH elements.
5505case $as_dir/ in #((
5506 ./ | .// | /[cC]/* | \
b80f6443 5507 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
ac50fbac 5508 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
b80f6443
JA
5509 /usr/ucb/* ) ;;
5510 *)
5511 # OSF1 and SCO ODT 3.0 have their own names for install.
5512 # Don't use installbsd from OSF since it installs stuff as root
5513 # by default.
5514 for ac_prog in ginstall scoinst install; do
5515 for ac_exec_ext in '' $ac_executable_extensions; do
ac50fbac 5516 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
0628567a
JA
5517 if test $ac_prog = install &&
5518 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5519 # AIX install. It has an incompatible calling convention.
5520 :
5521 elif test $ac_prog = install &&
5522 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5523 # program-specific install script used by HP pwplus--don't use.
5524 :
5525 else
3185942a
JA
5526 rm -rf conftest.one conftest.two conftest.dir
5527 echo one > conftest.one
5528 echo two > conftest.two
5529 mkdir conftest.dir
5530 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5531 test -s conftest.one && test -s conftest.two &&
5532 test -s conftest.dir/conftest.one &&
5533 test -s conftest.dir/conftest.two
5534 then
5535 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5536 break 3
5537 fi
0628567a
JA
5538 fi
5539 fi
ccc6cda3 5540 done
b80f6443
JA
5541 done
5542 ;;
5543esac
3185942a 5544
ac50fbac 5545 done
3185942a 5546IFS=$as_save_IFS
b80f6443 5547
3185942a 5548rm -rf conftest.one conftest.two conftest.dir
ccc6cda3
JA
5549
5550fi
5551 if test "${ac_cv_path_install+set}" = set; then
f73dda09 5552 INSTALL=$ac_cv_path_install
ccc6cda3 5553 else
3185942a
JA
5554 # As a last resort, use the slow shell script. Don't cache a
5555 # value for INSTALL within a source directory, because that will
ccc6cda3 5556 # break other packages using the cache if that directory is
3185942a 5557 # removed, or if the value is a relative name.
f73dda09 5558 INSTALL=$ac_install_sh
ccc6cda3
JA
5559 fi
5560fi
ac50fbac 5561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3185942a 5562$as_echo "$INSTALL" >&6; }
ccc6cda3
JA
5563
5564# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5565# It thinks the first close brace ends the variable substitution.
5566test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5567
f73dda09 5568test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
bb70624e 5569
ccc6cda3
JA
5570test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5571
ac50fbac
CR
5572if test -n "$ac_tool_prefix"; then
5573 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5574set dummy ${ac_tool_prefix}ar; ac_word=$2
5575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5576$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5577if ${ac_cv_prog_AR+:} false; then :
3185942a 5578 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5579else
5580 if test -n "$AR"; then
5581 ac_cv_prog_AR="$AR" # Let the user override the test.
5582else
b80f6443
JA
5583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5584for as_dir in $PATH
5585do
5586 IFS=$as_save_IFS
5587 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5588 for ac_exec_ext in '' $ac_executable_extensions; do
5589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5590 ac_cv_prog_AR="${ac_tool_prefix}ar"
5591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5592 break 2
5593 fi
5594done
ac50fbac 5595 done
3185942a 5596IFS=$as_save_IFS
f73dda09 5597
ccc6cda3
JA
5598fi
5599fi
f73dda09 5600AR=$ac_cv_prog_AR
ccc6cda3 5601if test -n "$AR"; then
ac50fbac 5602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
3185942a 5603$as_echo "$AR" >&6; }
ccc6cda3 5604else
ac50fbac
CR
5605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5606$as_echo "no" >&6; }
5607fi
5608
5609
5610fi
5611if test -z "$ac_cv_prog_AR"; then
5612 ac_ct_AR=$AR
5613 # Extract the first word of "ar", so it can be a program name with args.
5614set dummy ar; ac_word=$2
5615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5616$as_echo_n "checking for $ac_word... " >&6; }
5617if ${ac_cv_prog_ac_ct_AR+:} false; then :
5618 $as_echo_n "(cached) " >&6
5619else
5620 if test -n "$ac_ct_AR"; then
5621 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5622else
5623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5624for as_dir in $PATH
5625do
5626 IFS=$as_save_IFS
5627 test -z "$as_dir" && as_dir=.
5628 for ac_exec_ext in '' $ac_executable_extensions; do
5629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5630 ac_cv_prog_ac_ct_AR="ar"
5631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5632 break 2
5633 fi
5634done
5635 done
5636IFS=$as_save_IFS
5637
5638fi
5639fi
5640ac_ct_AR=$ac_cv_prog_ac_ct_AR
5641if test -n "$ac_ct_AR"; then
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5643$as_echo "$ac_ct_AR" >&6; }
5644else
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5646$as_echo "no" >&6; }
ccc6cda3
JA
5647fi
5648
ac50fbac
CR
5649 if test "x$ac_ct_AR" = x; then
5650 AR=""
5651 else
5652 case $cross_compiling:$ac_tool_warned in
5653yes:)
5654{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5655$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5656ac_tool_warned=yes ;;
5657esac
5658 AR=$ac_ct_AR
5659 fi
5660else
5661 AR="$ac_cv_prog_AR"
5662fi
3185942a 5663
b72432fd 5664test -n "$ARFLAGS" || ARFLAGS="cr"
f73dda09
JA
5665if test -n "$ac_tool_prefix"; then
5666 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5667set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ac50fbac 5668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5669$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5670if ${ac_cv_prog_RANLIB+:} false; then :
3185942a 5671 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5672else
5673 if test -n "$RANLIB"; then
5674 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5675else
b80f6443
JA
5676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5677for as_dir in $PATH
5678do
5679 IFS=$as_save_IFS
5680 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5681 for ac_exec_ext in '' $ac_executable_extensions; do
5682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 5683 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
ac50fbac 5684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5685 break 2
5686 fi
5687done
ac50fbac 5688 done
3185942a 5689IFS=$as_save_IFS
f73dda09 5690
ccc6cda3
JA
5691fi
5692fi
f73dda09 5693RANLIB=$ac_cv_prog_RANLIB
ccc6cda3 5694if test -n "$RANLIB"; then
ac50fbac 5695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
3185942a 5696$as_echo "$RANLIB" >&6; }
f73dda09 5697else
ac50fbac 5698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5699$as_echo "no" >&6; }
f73dda09
JA
5700fi
5701
3185942a 5702
f73dda09
JA
5703fi
5704if test -z "$ac_cv_prog_RANLIB"; then
5705 ac_ct_RANLIB=$RANLIB
5706 # Extract the first word of "ranlib", so it can be a program name with args.
5707set dummy ranlib; ac_word=$2
ac50fbac 5708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5709$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5710if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
3185942a 5711 $as_echo_n "(cached) " >&6
f73dda09
JA
5712else
5713 if test -n "$ac_ct_RANLIB"; then
5714 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5715else
b80f6443
JA
5716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5717for as_dir in $PATH
5718do
5719 IFS=$as_save_IFS
5720 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5721 for ac_exec_ext in '' $ac_executable_extensions; do
5722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 5723 ac_cv_prog_ac_ct_RANLIB="ranlib"
ac50fbac 5724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5725 break 2
5726 fi
5727done
ac50fbac 5728 done
3185942a 5729IFS=$as_save_IFS
f73dda09 5730
f73dda09
JA
5731fi
5732fi
5733ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5734if test -n "$ac_ct_RANLIB"; then
ac50fbac 5735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
3185942a 5736$as_echo "$ac_ct_RANLIB" >&6; }
ccc6cda3 5737else
ac50fbac 5738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5739$as_echo "no" >&6; }
f73dda09
JA
5740fi
5741
3185942a
JA
5742 if test "x$ac_ct_RANLIB" = x; then
5743 RANLIB=":"
5744 else
5745 case $cross_compiling:$ac_tool_warned in
5746yes:)
ac50fbac 5747{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3185942a
JA
5748$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5749ac_tool_warned=yes ;;
5750esac
5751 RANLIB=$ac_ct_RANLIB
5752 fi
f73dda09
JA
5753else
5754 RANLIB="$ac_cv_prog_RANLIB"
ccc6cda3
JA
5755fi
5756
5757for ac_prog in 'bison -y' byacc
5758do
f73dda09 5759 # Extract the first word of "$ac_prog", so it can be a program name with args.
ccc6cda3 5760set dummy $ac_prog; ac_word=$2
ac50fbac 5761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 5762$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 5763if ${ac_cv_prog_YACC+:} false; then :
3185942a 5764 $as_echo_n "(cached) " >&6
ccc6cda3
JA
5765else
5766 if test -n "$YACC"; then
5767 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5768else
b80f6443
JA
5769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5770for as_dir in $PATH
5771do
5772 IFS=$as_save_IFS
5773 test -z "$as_dir" && as_dir=.
ac50fbac
CR
5774 for ac_exec_ext in '' $ac_executable_extensions; do
5775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 5776 ac_cv_prog_YACC="$ac_prog"
ac50fbac 5777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
5778 break 2
5779 fi
5780done
ac50fbac 5781 done
3185942a 5782IFS=$as_save_IFS
f73dda09 5783
ccc6cda3
JA
5784fi
5785fi
f73dda09 5786YACC=$ac_cv_prog_YACC
ccc6cda3 5787if test -n "$YACC"; then
ac50fbac 5788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
3185942a 5789$as_echo "$YACC" >&6; }
ccc6cda3 5790else
ac50fbac 5791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5792$as_echo "no" >&6; }
ccc6cda3
JA
5793fi
5794
3185942a 5795
f73dda09 5796 test -n "$YACC" && break
ccc6cda3
JA
5797done
5798test -n "$YACC" || YACC="yacc"
5799
ac50fbac 5800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3185942a
JA
5801$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5802set x ${MAKE-make}
5803ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
ac50fbac 5804if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3185942a 5805 $as_echo_n "(cached) " >&6
ccc6cda3 5806else
b80f6443 5807 cat >conftest.make <<\_ACEOF
3185942a 5808SHELL = /bin/sh
ccc6cda3 5809all:
3185942a 5810 @echo '@@@%%%=$(MAKE)=@@@%%%'
b80f6443 5811_ACEOF
ac50fbac 5812# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3185942a
JA
5813case `${MAKE-make} -f conftest.make 2>/dev/null` in
5814 *@@@%%%=?*=@@@%%%*)
5815 eval ac_cv_prog_make_${ac_make}_set=yes;;
5816 *)
5817 eval ac_cv_prog_make_${ac_make}_set=no;;
5818esac
f73dda09 5819rm -f conftest.make
ccc6cda3 5820fi
3185942a 5821if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
ac50fbac 5822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3185942a 5823$as_echo "yes" >&6; }
ccc6cda3
JA
5824 SET_MAKE=
5825else
ac50fbac 5826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 5827$as_echo "no" >&6; }
ccc6cda3
JA
5828 SET_MAKE="MAKE=${MAKE-make}"
5829fi
5830
b80f6443 5831
ac50fbac
CR
5832case "$ac_cv_prog_YACC" in
5833*bison*) ;;
5834*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5
5835$as_echo "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;;
5836esac
5837
b72432fd 5838case "$host_os" in
bb70624e 5839opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
b72432fd
JA
5840*) MAKE_SHELL=/bin/sh ;;
5841esac
5842
5843
95732b49
JA
5844if test x$SIZE = x; then
5845 if test x$ac_tool_prefix = x; then
5846 SIZE=size
5847 else
5848 SIZE=${ac_tool_prefix}size
5849 save_IFS=$IFS ; IFS=:
5850 size_found=0
5851 for dir in $PATH; do
5852 if test -x $dir/$SIZE ; then
5853 size_found=1
5854 break
5855 fi
5856 done
5857 if test $size_found -eq 0; then
5858 SIZE=:
5859 fi
5860 IFS=$save_IFS
5861 fi
5862fi
5863
5864
ac50fbac
CR
5865# Checks for stat-related time functions.
5866
5867# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software
5868# Foundation, Inc.
5869
5870# This file is free software; the Free Software Foundation
5871# gives unlimited permission to copy and/or distribute it,
5872# with or without modifications, as long as this notice is preserved.
ccc6cda3 5873
f73dda09 5874
ac50fbac
CR
5875# st_atim.tv_nsec - Linux, Solaris, Cygwin
5876# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
5877# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
5878# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
5879
5880# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
5881# st_birthtim - Cygwin 1.7.0+
5882
5883
5884
5885# Configure checks for struct timespec
5886
5887# Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc.
5888
5889# This file is free software; the Free Software Foundation
5890# gives unlimited permission to copy and/or distribute it,
5891# with or without modifications, as long as this notice is preserved.
5892
5893# Original written by Paul Eggert and Jim Meyering.
5894# Modified by Chet Ramey for bash
5895
5896
5897
5898
5899
5900$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5901
5902
5903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
3185942a 5904$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
ac50fbac 5905if ${ac_cv_c_const+:} false; then :
3185942a 5906 $as_echo_n "(cached) " >&6
95732b49 5907else
ac50fbac 5908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a
JA
5909/* end confdefs.h. */
5910
5911int
5912main ()
f73dda09 5913{
ac50fbac 5914
f73dda09 5915#ifndef __cplusplus
ac50fbac 5916 /* Ultrix mips cc rejects this sort of thing. */
f73dda09 5917 typedef int charset[2];
ac50fbac 5918 const charset cs = { 0, 0 };
f73dda09 5919 /* SunOS 4.1.1 cc rejects this. */
3185942a
JA
5920 char const *const *pcpcc;
5921 char **ppc;
f73dda09
JA
5922 /* NEC SVR4.0.2 mips cc rejects this. */
5923 struct point {int x, y;};
5924 static struct point const zero = {0,0};
5925 /* AIX XL C 1.02.0.0 rejects this.
5926 It does not let you subtract one const X* pointer from another in
5927 an arm of an if-expression whose if-part is not a constant
5928 expression */
5929 const char *g = "string";
3185942a 5930 pcpcc = &g + (g ? g-g : 0);
f73dda09 5931 /* HPUX 7.0 cc rejects these. */
3185942a
JA
5932 ++pcpcc;
5933 ppc = (char**) pcpcc;
5934 pcpcc = (char const *const *) ppc;
ac50fbac
CR
5935 { /* SCO 3.2v4 cc rejects this sort of thing. */
5936 char tx;
5937 char *t = &tx;
f73dda09
JA
5938 char const *s = 0 ? (char *) 0 : (char const *) 0;
5939
5940 *t++ = 0;
3185942a 5941 if (s) return 0;
f73dda09
JA
5942 }
5943 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5944 int x[] = {25, 17};
5945 const int *foo = &x[0];
5946 ++foo;
5947 }
5948 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5949 typedef const int *iptr;
5950 iptr p = 0;
5951 ++p;
5952 }
ac50fbac 5953 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
f73dda09 5954 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
ac50fbac
CR
5955 struct s { int j; const int *ap[3]; } bx;
5956 struct s *b = &bx; b->j = 5;
f73dda09
JA
5957 }
5958 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5959 const int foo = 10;
3185942a 5960 if (!foo) return 0;
f73dda09 5961 }
3185942a 5962 return !cs[0] && !zero.x;
ccc6cda3
JA
5963#endif
5964
f73dda09
JA
5965 ;
5966 return 0;
5967}
5968_ACEOF
ac50fbac 5969if ac_fn_c_try_compile "$LINENO"; then :
f73dda09
JA
5970 ac_cv_c_const=yes
5971else
ac50fbac 5972 ac_cv_c_const=no
f73dda09 5973fi
3185942a 5974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 5975fi
ac50fbac 5976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
3185942a 5977$as_echo "$ac_cv_c_const" >&6; }
f73dda09
JA
5978if test $ac_cv_c_const = no; then
5979
ac50fbac 5980$as_echo "#define const /**/" >>confdefs.h
ccc6cda3
JA
5981
5982fi
5983
ac50fbac 5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
3185942a 5985$as_echo_n "checking for inline... " >&6; }
ac50fbac 5986if ${ac_cv_c_inline+:} false; then :
3185942a 5987 $as_echo_n "(cached) " >&6
ccc6cda3 5988else
f73dda09
JA
5989 ac_cv_c_inline=no
5990for ac_kw in inline __inline__ __inline; do
ac50fbac 5991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5992/* end confdefs.h. */
f73dda09 5993#ifndef __cplusplus
0628567a
JA
5994typedef int foo_t;
5995static $ac_kw foo_t static_foo () {return 0; }
5996$ac_kw foo_t foo () {return 0; }
ccc6cda3
JA
5997#endif
5998
f73dda09 5999_ACEOF
ac50fbac 6000if ac_fn_c_try_compile "$LINENO"; then :
3185942a 6001 ac_cv_c_inline=$ac_kw
f73dda09 6002fi
3185942a
JA
6003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6004 test "$ac_cv_c_inline" != no && break
f73dda09 6005done
ccc6cda3
JA
6006
6007fi
ac50fbac 6008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
3185942a 6009$as_echo "$ac_cv_c_inline" >&6; }
0628567a 6010
f73dda09
JA
6011case $ac_cv_c_inline in
6012 inline | yes) ;;
0628567a
JA
6013 *)
6014 case $ac_cv_c_inline in
6015 no) ac_val=;;
6016 *) ac_val=$ac_cv_c_inline;;
6017 esac
6018 cat >>confdefs.h <<_ACEOF
6019#ifndef __cplusplus
6020#define inline $ac_val
6021#endif
b80f6443 6022_ACEOF
0628567a 6023 ;;
f73dda09 6024esac
ccc6cda3 6025
ac50fbac 6026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
3185942a 6027$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
ac50fbac 6028if ${ac_cv_c_bigendian+:} false; then :
3185942a 6029 $as_echo_n "(cached) " >&6
ccc6cda3 6030else
3185942a
JA
6031 ac_cv_c_bigendian=unknown
6032 # See if we're dealing with a universal compiler.
ac50fbac 6033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
6034/* end confdefs.h. */
6035#ifndef __APPLE_CC__
6036 not a universal capable compiler
6037 #endif
6038 typedef int dummy;
6039
6040_ACEOF
ac50fbac 6041if ac_fn_c_try_compile "$LINENO"; then :
3185942a
JA
6042
6043 # Check for potential -arch flags. It is not universal unless
ac50fbac
CR
6044 # there are at least two -arch flags with different values.
6045 ac_arch=
6046 ac_prev=
6047 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
6048 if test -n "$ac_prev"; then
6049 case $ac_word in
6050 i?86 | x86_64 | ppc | ppc64)
6051 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
6052 ac_arch=$ac_word
6053 else
6054 ac_cv_c_bigendian=universal
6055 break
6056 fi
6057 ;;
6058 esac
6059 ac_prev=
6060 elif test "x$ac_word" = "x-arch"; then
6061 ac_prev=arch
6062 fi
6063 done
3185942a 6064fi
3185942a
JA
6065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6066 if test $ac_cv_c_bigendian = unknown; then
6067 # See if sys/param.h defines the BYTE_ORDER macro.
ac50fbac 6068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6069/* end confdefs.h. */
f73dda09 6070#include <sys/types.h>
3185942a 6071 #include <sys/param.h>
ccc6cda3 6072
f73dda09
JA
6073int
6074main ()
6075{
3185942a
JA
6076#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
6077 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
6078 && LITTLE_ENDIAN)
6079 bogus endian macros
6080 #endif
ccc6cda3 6081
f73dda09
JA
6082 ;
6083 return 0;
6084}
6085_ACEOF
ac50fbac 6086if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 6087 # It does; now see whether it defined to BIG_ENDIAN or not.
ac50fbac 6088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6089/* end confdefs.h. */
f73dda09 6090#include <sys/types.h>
3185942a 6091 #include <sys/param.h>
ccc6cda3 6092
f73dda09
JA
6093int
6094main ()
6095{
6096#if BYTE_ORDER != BIG_ENDIAN
3185942a
JA
6097 not big endian
6098 #endif
ccc6cda3 6099
f73dda09
JA
6100 ;
6101 return 0;
6102}
6103_ACEOF
ac50fbac 6104if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 6105 ac_cv_c_bigendian=yes
ccc6cda3 6106else
ac50fbac 6107 ac_cv_c_bigendian=no
ccc6cda3 6108fi
3185942a 6109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3185942a 6110fi
3185942a
JA
6111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6112 fi
6113 if test $ac_cv_c_bigendian = unknown; then
6114 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
ac50fbac 6115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6116/* end confdefs.h. */
3185942a
JA
6117#include <limits.h>
6118
b80f6443
JA
6119int
6120main ()
6121{
3185942a
JA
6122#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6123 bogus endian macros
6124 #endif
6125
b80f6443
JA
6126 ;
6127 return 0;
6128}
6129_ACEOF
ac50fbac 6130if ac_fn_c_try_compile "$LINENO"; then :
3185942a 6131 # It does; now see whether it defined to _BIG_ENDIAN or not.
ac50fbac 6132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6133/* end confdefs.h. */
3185942a
JA
6134#include <limits.h>
6135
f73dda09
JA
6136int
6137main ()
ccc6cda3 6138{
3185942a
JA
6139#ifndef _BIG_ENDIAN
6140 not big endian
6141 #endif
6142
6143 ;
6144 return 0;
ccc6cda3 6145}
f73dda09 6146_ACEOF
ac50fbac 6147if ac_fn_c_try_compile "$LINENO"; then :
3185942a 6148 ac_cv_c_bigendian=yes
ccc6cda3 6149else
ac50fbac 6150 ac_cv_c_bigendian=no
f73dda09 6151fi
3185942a 6152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 6153fi
3185942a
JA
6154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6155 fi
6156 if test $ac_cv_c_bigendian = unknown; then
6157 # Compile a test program.
ac50fbac 6158 if test "$cross_compiling" = yes; then :
3185942a 6159 # Try to guess by grepping values from an object file.
ac50fbac 6160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
6161/* end confdefs.h. */
6162short int ascii_mm[] =
6163 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6164 short int ascii_ii[] =
6165 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6166 int use_ascii (int i) {
6167 return ascii_mm[i] + ascii_ii[i];
6168 }
6169 short int ebcdic_ii[] =
6170 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6171 short int ebcdic_mm[] =
6172 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6173 int use_ebcdic (int i) {
6174 return ebcdic_mm[i] + ebcdic_ii[i];
6175 }
6176 extern int foo;
6177
6178int
6179main ()
6180{
6181return use_ascii (foo) == use_ebcdic (foo);
6182 ;
6183 return 0;
6184}
6185_ACEOF
ac50fbac 6186if ac_fn_c_try_compile "$LINENO"; then :
3185942a
JA
6187 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6188 ac_cv_c_bigendian=yes
6189 fi
6190 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6191 if test "$ac_cv_c_bigendian" = unknown; then
6192 ac_cv_c_bigendian=no
6193 else
6194 # finding both strings is unlikely to happen, but who knows?
6195 ac_cv_c_bigendian=unknown
6196 fi
6197 fi
3185942a 6198fi
3185942a
JA
6199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6200else
ac50fbac 6201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
6202/* end confdefs.h. */
6203$ac_includes_default
6204int
6205main ()
6206{
6207
6208 /* Are we little or big endian? From Harbison&Steele. */
6209 union
6210 {
6211 long int l;
6212 char c[sizeof (long int)];
6213 } u;
6214 u.l = 1;
6215 return u.c[sizeof (long int) - 1] == 1;
6216
6217 ;
6218 return 0;
6219}
6220_ACEOF
ac50fbac 6221if ac_fn_c_try_run "$LINENO"; then :
3185942a
JA
6222 ac_cv_c_bigendian=no
6223else
ac50fbac 6224 ac_cv_c_bigendian=yes
3185942a 6225fi
ac50fbac
CR
6226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6227 conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a
JA
6228fi
6229
3185942a
JA
6230 fi
6231fi
ac50fbac 6232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
3185942a
JA
6233$as_echo "$ac_cv_c_bigendian" >&6; }
6234 case $ac_cv_c_bigendian in #(
6235 yes)
ac50fbac 6236 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
3185942a
JA
6237;; #(
6238 no)
6239 ;; #(
6240 universal)
6241
ac50fbac 6242$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3185942a
JA
6243
6244 ;; #(
6245 *)
ac50fbac
CR
6246 as_fn_error $? "unknown endianness
6247 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
3185942a 6248 esac
b80f6443 6249
ac50fbac 6250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5
3185942a 6251$as_echo_n "checking for preprocessor stringizing operator... " >&6; }
ac50fbac 6252if ${ac_cv_c_stringize+:} false; then :
3185942a 6253 $as_echo_n "(cached) " >&6
ccc6cda3 6254else
ac50fbac 6255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6256/* end confdefs.h. */
f73dda09 6257#define x(y) #y
ccc6cda3 6258
f73dda09
JA
6259char *s = x(teststring);
6260_ACEOF
6261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 6262 $EGREP "#teststring" >/dev/null 2>&1; then :
f73dda09 6263 ac_cv_c_stringize=no
ccc6cda3 6264else
f73dda09 6265 ac_cv_c_stringize=yes
ccc6cda3 6266fi
f73dda09 6267rm -f conftest*
ccc6cda3
JA
6268
6269fi
ac50fbac 6270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5
3185942a 6271$as_echo "$ac_cv_c_stringize" >&6; }
f73dda09 6272if test $ac_cv_c_stringize = yes; then
ccc6cda3 6273
ac50fbac 6274$as_echo "#define HAVE_STRINGIZE 1" >>confdefs.h
ccc6cda3
JA
6275
6276fi
6277
3185942a
JA
6278
6279
ac50fbac 6280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5
3185942a 6281$as_echo_n "checking for long double with more range or precision than double... " >&6; }
ac50fbac 6282if ${ac_cv_type_long_double_wider+:} false; then :
3185942a 6283 $as_echo_n "(cached) " >&6
ccc6cda3 6284else
ac50fbac 6285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6286/* end confdefs.h. */
b80f6443 6287#include <float.h>
3185942a
JA
6288 long double const a[] =
6289 {
6290 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON,
6291 LDBL_MIN, LDBL_MAX, LDBL_EPSILON
6292 };
6293 long double
6294 f (long double x)
6295 {
6296 return ((x + (unsigned long int) 10) * (-1 / x) + a[0]
6297 + (x ? f (x) : 'c'));
6298 }
6299
f73dda09
JA
6300int
6301main ()
6302{
3185942a
JA
6303static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
6304 + (DBL_MANT_DIG < LDBL_MANT_DIG)
6305 - (LDBL_MAX_EXP < DBL_MAX_EXP)
6306 - (LDBL_MANT_DIG < DBL_MANT_DIG)))
6307 && (int) LDBL_EPSILON == 0
6308 )];
ac50fbac
CR
6309test_array [0] = 0;
6310return test_array [0];
b80f6443
JA
6311
6312 ;
6313 return 0;
ccc6cda3 6314}
f73dda09 6315_ACEOF
ac50fbac 6316if ac_fn_c_try_compile "$LINENO"; then :
3185942a 6317 ac_cv_type_long_double_wider=yes
ccc6cda3 6318else
ac50fbac 6319 ac_cv_type_long_double_wider=no
f73dda09 6320fi
3185942a 6321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 6322fi
ac50fbac 6323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5
3185942a
JA
6324$as_echo "$ac_cv_type_long_double_wider" >&6; }
6325 if test $ac_cv_type_long_double_wider = yes; then
6326
ac50fbac 6327$as_echo "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h
3185942a
JA
6328
6329 fi
6330
6331 ac_cv_c_long_double=$ac_cv_type_long_double_wider
6332 if test $ac_cv_c_long_double = yes; then
ccc6cda3 6333
ac50fbac 6334$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
ccc6cda3 6335
3185942a 6336 fi
ccc6cda3 6337
ac50fbac 6338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
3185942a
JA
6339$as_echo_n "checking for function prototypes... " >&6; }
6340if test "$ac_cv_prog_cc_c89" != no; then
ac50fbac 6341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3185942a 6342$as_echo "yes" >&6; }
ccc6cda3 6343
ac50fbac 6344$as_echo "#define PROTOTYPES 1" >>confdefs.h
ccc6cda3 6345
f73dda09 6346
ac50fbac 6347$as_echo "#define __PROTOTYPES 1" >>confdefs.h
f73dda09 6348
f73dda09 6349else
ac50fbac 6350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 6351$as_echo "no" >&6; }
f73dda09 6352fi
ccc6cda3 6353
ac50fbac 6354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
3185942a 6355$as_echo_n "checking whether char is unsigned... " >&6; }
ac50fbac 6356if ${ac_cv_c_char_unsigned+:} false; then :
3185942a 6357 $as_echo_n "(cached) " >&6
ccc6cda3 6358else
ac50fbac 6359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6360/* end confdefs.h. */
f73dda09
JA
6361$ac_includes_default
6362int
ccc6cda3
JA
6363main ()
6364{
b80f6443 6365static int test_array [1 - 2 * !(((char) -1) < 0)];
ac50fbac
CR
6366test_array [0] = 0;
6367return test_array [0];
b80f6443 6368
f73dda09
JA
6369 ;
6370 return 0;
ccc6cda3 6371}
f73dda09 6372_ACEOF
ac50fbac 6373if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 6374 ac_cv_c_char_unsigned=no
ccc6cda3 6375else
ac50fbac 6376 ac_cv_c_char_unsigned=yes
ccc6cda3 6377fi
3185942a 6378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 6379fi
ac50fbac 6380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
3185942a 6381$as_echo "$ac_cv_c_char_unsigned" >&6; }
f73dda09 6382if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
ac50fbac 6383 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
ccc6cda3 6384
ccc6cda3
JA
6385fi
6386
ac50fbac 6387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
17345e5a 6388$as_echo_n "checking for working volatile... " >&6; }
ac50fbac 6389if ${ac_cv_c_volatile+:} false; then :
17345e5a
JA
6390 $as_echo_n "(cached) " >&6
6391else
ac50fbac 6392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a
JA
6393/* end confdefs.h. */
6394
6395int
6396main ()
6397{
6398
6399volatile int x;
6400int * volatile y = (int *) 0;
6401return !x && !y;
6402 ;
6403 return 0;
6404}
6405_ACEOF
ac50fbac 6406if ac_fn_c_try_compile "$LINENO"; then :
17345e5a
JA
6407 ac_cv_c_volatile=yes
6408else
ac50fbac 6409 ac_cv_c_volatile=no
17345e5a 6410fi
17345e5a
JA
6411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6412fi
ac50fbac 6413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
17345e5a
JA
6414$as_echo "$ac_cv_c_volatile" >&6; }
6415if test $ac_cv_c_volatile = no; then
6416
ac50fbac 6417$as_echo "#define volatile /**/" >>confdefs.h
17345e5a
JA
6418
6419fi
6420
ac50fbac 6421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
17345e5a 6422$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
ac50fbac 6423if ${ac_cv_c_restrict+:} false; then :
17345e5a
JA
6424 $as_echo_n "(cached) " >&6
6425else
6426 ac_cv_c_restrict=no
6427 # The order here caters to the fact that C++ does not require restrict.
6428 for ac_kw in __restrict __restrict__ _Restrict restrict; do
ac50fbac 6429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a
JA
6430/* end confdefs.h. */
6431typedef int * int_ptr;
6432 int foo (int_ptr $ac_kw ip) {
6433 return ip[0];
6434 }
6435int
6436main ()
6437{
6438int s[1];
6439 int * $ac_kw t = s;
6440 t[0] = 0;
6441 return foo(t)
6442 ;
6443 return 0;
6444}
6445_ACEOF
ac50fbac 6446if ac_fn_c_try_compile "$LINENO"; then :
17345e5a 6447 ac_cv_c_restrict=$ac_kw
17345e5a 6448fi
17345e5a
JA
6449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6450 test "$ac_cv_c_restrict" != no && break
6451 done
6452
6453fi
ac50fbac 6454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
17345e5a
JA
6455$as_echo "$ac_cv_c_restrict" >&6; }
6456
17345e5a
JA
6457 case $ac_cv_c_restrict in
6458 restrict) ;;
ac50fbac 6459 no) $as_echo "#define restrict /**/" >>confdefs.h
17345e5a
JA
6460 ;;
6461 *) cat >>confdefs.h <<_ACEOF
6462#define restrict $ac_cv_c_restrict
6463_ACEOF
6464 ;;
6465 esac
6466
ccc6cda3 6467
b80f6443
JA
6468
6469 MKINSTALLDIRS=
6470 if test -n "$ac_aux_dir"; then
6471 case "$ac_aux_dir" in
6472 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
6473 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
6474 esac
6475 fi
6476 if test -z "$MKINSTALLDIRS"; then
6477 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6478 fi
6479
6480
6481
ac50fbac 6482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
3185942a
JA
6483$as_echo_n "checking whether NLS is requested... " >&6; }
6484 # Check whether --enable-nls was given.
ac50fbac 6485if test "${enable_nls+set}" = set; then :
3185942a 6486 enableval=$enable_nls; USE_NLS=$enableval
ccc6cda3 6487else
b80f6443 6488 USE_NLS=yes
3185942a
JA
6489fi
6490
ac50fbac 6491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
3185942a 6492$as_echo "$USE_NLS" >&6; }
b80f6443
JA
6493
6494
6495
6496
6497
6498
6499# Prepare PATH_SEPARATOR.
6500# The user is always right.
6501if test "${PATH_SEPARATOR+set}" != set; then
6502 echo "#! /bin/sh" >conf$$.sh
6503 echo "exit 0" >>conf$$.sh
6504 chmod +x conf$$.sh
6505 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6506 PATH_SEPARATOR=';'
6507 else
6508 PATH_SEPARATOR=:
6509 fi
6510 rm -f conf$$.sh
ccc6cda3 6511fi
ccc6cda3 6512
b80f6443
JA
6513# Find out how to test for executable files. Don't use a zero-byte file,
6514# as systems may use methods other than mode bits to determine executability.
6515cat >conf$$.file <<_ASEOF
6516#! /bin/sh
6517exit 0
6518_ASEOF
6519chmod +x conf$$.file
6520if test -x conf$$.file >/dev/null 2>&1; then
6521 ac_executable_p="test -x"
6522else
6523 ac_executable_p="test -f"
f73dda09 6524fi
b80f6443 6525rm -f conf$$.file
ccc6cda3 6526
b80f6443
JA
6527# Extract the first word of "msgfmt", so it can be a program name with args.
6528set dummy msgfmt; ac_word=$2
ac50fbac 6529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 6530$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 6531if ${ac_cv_path_MSGFMT+:} false; then :
3185942a 6532 $as_echo_n "(cached) " >&6
ccc6cda3 6533else
b80f6443
JA
6534 case "$MSGFMT" in
6535 [\\/]* | ?:[\\/]*)
6536 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6537 ;;
6538 *)
6539 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6540 for ac_dir in $PATH; do
6541 IFS="$ac_save_IFS"
6542 test -z "$ac_dir" && ac_dir=.
6543 for ac_exec_ext in '' $ac_executable_extensions; do
6544 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6545 if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
6546 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
6547 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
6548 break 2
6549 fi
6550 fi
6551 done
6552 done
6553 IFS="$ac_save_IFS"
6554 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6555 ;;
6556esac
6557fi
6558MSGFMT="$ac_cv_path_MSGFMT"
6559if test "$MSGFMT" != ":"; then
ac50fbac 6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
3185942a 6561$as_echo "$MSGFMT" >&6; }
f73dda09 6562else
ac50fbac 6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 6564$as_echo "no" >&6; }
f73dda09 6565fi
b80f6443
JA
6566
6567 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6568set dummy gmsgfmt; ac_word=$2
ac50fbac 6569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 6570$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 6571if ${ac_cv_path_GMSGFMT+:} false; then :
3185942a 6572 $as_echo_n "(cached) " >&6
b80f6443
JA
6573else
6574 case $GMSGFMT in
6575 [\\/]* | ?:[\\/]*)
6576 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6577 ;;
6578 *)
6579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6580for as_dir in $PATH
6581do
6582 IFS=$as_save_IFS
6583 test -z "$as_dir" && as_dir=.
ac50fbac
CR
6584 for ac_exec_ext in '' $ac_executable_extensions; do
6585 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 6586 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
ac50fbac 6587 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
6588 break 2
6589 fi
6590done
ac50fbac 6591 done
3185942a 6592IFS=$as_save_IFS
b80f6443
JA
6593
6594 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6595 ;;
6596esac
6597fi
6598GMSGFMT=$ac_cv_path_GMSGFMT
b80f6443 6599if test -n "$GMSGFMT"; then
ac50fbac 6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
3185942a 6601$as_echo "$GMSGFMT" >&6; }
b80f6443 6602else
ac50fbac 6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 6604$as_echo "no" >&6; }
f73dda09 6605fi
b80f6443
JA
6606
6607
6608
3185942a 6609
b80f6443
JA
6610# Prepare PATH_SEPARATOR.
6611# The user is always right.
6612if test "${PATH_SEPARATOR+set}" != set; then
6613 echo "#! /bin/sh" >conf$$.sh
6614 echo "exit 0" >>conf$$.sh
6615 chmod +x conf$$.sh
6616 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6617 PATH_SEPARATOR=';'
6618 else
6619 PATH_SEPARATOR=:
6620 fi
6621 rm -f conf$$.sh
f73dda09 6622fi
ccc6cda3 6623
b80f6443
JA
6624# Find out how to test for executable files. Don't use a zero-byte file,
6625# as systems may use methods other than mode bits to determine executability.
6626cat >conf$$.file <<_ASEOF
6627#! /bin/sh
6628exit 0
6629_ASEOF
6630chmod +x conf$$.file
6631if test -x conf$$.file >/dev/null 2>&1; then
6632 ac_executable_p="test -x"
ccc6cda3 6633else
b80f6443
JA
6634 ac_executable_p="test -f"
6635fi
6636rm -f conf$$.file
6637
6638# Extract the first word of "xgettext", so it can be a program name with args.
6639set dummy xgettext; ac_word=$2
ac50fbac 6640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 6641$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 6642if ${ac_cv_path_XGETTEXT+:} false; then :
3185942a 6643 $as_echo_n "(cached) " >&6
ccc6cda3 6644else
b80f6443
JA
6645 case "$XGETTEXT" in
6646 [\\/]* | ?:[\\/]*)
6647 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6648 ;;
6649 *)
6650 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6651 for ac_dir in $PATH; do
6652 IFS="$ac_save_IFS"
6653 test -z "$ac_dir" && ac_dir=.
6654 for ac_exec_ext in '' $ac_executable_extensions; do
6655 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6656 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
6657 (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
6658 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
6659 break 2
6660 fi
6661 fi
6662 done
6663 done
6664 IFS="$ac_save_IFS"
6665 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6666 ;;
6667esac
6668fi
6669XGETTEXT="$ac_cv_path_XGETTEXT"
6670if test "$XGETTEXT" != ":"; then
ac50fbac 6671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
3185942a 6672$as_echo "$XGETTEXT" >&6; }
b80f6443 6673else
ac50fbac 6674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 6675$as_echo "no" >&6; }
b80f6443 6676fi
f73dda09 6677
b80f6443
JA
6678 rm -f messages.po
6679
6680
6681# Prepare PATH_SEPARATOR.
6682# The user is always right.
6683if test "${PATH_SEPARATOR+set}" != set; then
6684 echo "#! /bin/sh" >conf$$.sh
6685 echo "exit 0" >>conf$$.sh
6686 chmod +x conf$$.sh
6687 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6688 PATH_SEPARATOR=';'
6689 else
6690 PATH_SEPARATOR=:
6691 fi
6692 rm -f conf$$.sh
6693fi
6694
6695# Find out how to test for executable files. Don't use a zero-byte file,
6696# as systems may use methods other than mode bits to determine executability.
6697cat >conf$$.file <<_ASEOF
6698#! /bin/sh
6699exit 0
6700_ASEOF
6701chmod +x conf$$.file
6702if test -x conf$$.file >/dev/null 2>&1; then
6703 ac_executable_p="test -x"
6704else
6705 ac_executable_p="test -f"
6706fi
6707rm -f conf$$.file
6708
6709# Extract the first word of "msgmerge", so it can be a program name with args.
6710set dummy msgmerge; ac_word=$2
ac50fbac 6711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 6712$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 6713if ${ac_cv_path_MSGMERGE+:} false; then :
3185942a 6714 $as_echo_n "(cached) " >&6
b80f6443
JA
6715else
6716 case "$MSGMERGE" in
6717 [\\/]* | ?:[\\/]*)
6718 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
6719 ;;
6720 *)
6721 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
6722 for ac_dir in $PATH; do
6723 IFS="$ac_save_IFS"
6724 test -z "$ac_dir" && ac_dir=.
6725 for ac_exec_ext in '' $ac_executable_extensions; do
6726 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
6727 if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
6728 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
6729 break 2
6730 fi
6731 fi
6732 done
6733 done
6734 IFS="$ac_save_IFS"
6735 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
6736 ;;
6737esac
6738fi
6739MSGMERGE="$ac_cv_path_MSGMERGE"
6740if test "$MSGMERGE" != ":"; then
ac50fbac 6741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
3185942a 6742$as_echo "$MSGMERGE" >&6; }
b80f6443 6743else
ac50fbac 6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 6745$as_echo "no" >&6; }
b80f6443
JA
6746fi
6747
6748
6749 if test "$GMSGFMT" != ":"; then
6750 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
6751 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
6752 : ;
6753 else
6754 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
ac50fbac 6755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
3185942a 6756$as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
b80f6443
JA
6757 GMSGFMT=":"
6758 fi
6759 fi
6760
6761 if test "$XGETTEXT" != ":"; then
6762 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
6763 (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
6764 : ;
6765 else
ac50fbac 6766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
3185942a 6767$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
b80f6443
JA
6768 XGETTEXT=":"
6769 fi
6770 rm -f messages.po
6771 fi
6772
3185942a 6773 ac_config_commands="$ac_config_commands default-1"
b80f6443
JA
6774
6775
ac50fbac
CR
6776ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6777if test "x$ac_cv_type_off_t" = xyes; then :
3185942a 6778
b80f6443
JA
6779else
6780
6781cat >>confdefs.h <<_ACEOF
3185942a 6782#define off_t long int
b80f6443 6783_ACEOF
ccc6cda3 6784
f73dda09 6785fi
ccc6cda3 6786
ac50fbac
CR
6787ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6788if test "x$ac_cv_type_size_t" = xyes; then :
3185942a 6789
b80f6443 6790else
ccc6cda3 6791
b80f6443 6792cat >>confdefs.h <<_ACEOF
3185942a 6793#define size_t unsigned int
b80f6443 6794_ACEOF
ccc6cda3 6795
ccc6cda3
JA
6796fi
6797
b80f6443
JA
6798# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6799# for constant arguments. Useless!
ac50fbac 6800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
3185942a 6801$as_echo_n "checking for working alloca.h... " >&6; }
ac50fbac 6802if ${ac_cv_working_alloca_h+:} false; then :
3185942a 6803 $as_echo_n "(cached) " >&6
f73dda09 6804else
ac50fbac 6805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6806/* end confdefs.h. */
b80f6443
JA
6807#include <alloca.h>
6808int
6809main ()
6810{
6811char *p = (char *) alloca (2 * sizeof (int));
3185942a 6812 if (p) return 0;
b80f6443
JA
6813 ;
6814 return 0;
6815}
6816_ACEOF
ac50fbac 6817if ac_fn_c_try_link "$LINENO"; then :
b80f6443 6818 ac_cv_working_alloca_h=yes
ccc6cda3 6819else
ac50fbac 6820 ac_cv_working_alloca_h=no
ccc6cda3 6821fi
ac50fbac
CR
6822rm -f core conftest.err conftest.$ac_objext \
6823 conftest$ac_exeext conftest.$ac_ext
ccc6cda3 6824fi
ac50fbac 6825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
3185942a 6826$as_echo "$ac_cv_working_alloca_h" >&6; }
b80f6443
JA
6827if test $ac_cv_working_alloca_h = yes; then
6828
ac50fbac 6829$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
ccc6cda3
JA
6830
6831fi
6832
ac50fbac 6833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
3185942a 6834$as_echo_n "checking for alloca... " >&6; }
ac50fbac 6835if ${ac_cv_func_alloca_works+:} false; then :
3185942a 6836 $as_echo_n "(cached) " >&6
f73dda09 6837else
ac50fbac 6838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6839/* end confdefs.h. */
f73dda09
JA
6840#ifdef __GNUC__
6841# define alloca __builtin_alloca
ccc6cda3 6842#else
f73dda09
JA
6843# ifdef _MSC_VER
6844# include <malloc.h>
6845# define alloca _alloca
6846# else
3185942a 6847# ifdef HAVE_ALLOCA_H
f73dda09
JA
6848# include <alloca.h>
6849# else
6850# ifdef _AIX
6851 #pragma alloca
6852# else
6853# ifndef alloca /* predefined by HP cc +Olibcalls */
ac50fbac 6854void *alloca (size_t);
f73dda09
JA
6855# endif
6856# endif
6857# endif
6858# endif
ccc6cda3
JA
6859#endif
6860
f73dda09
JA
6861int
6862main ()
6863{
6864char *p = (char *) alloca (1);
3185942a 6865 if (p) return 0;
f73dda09
JA
6866 ;
6867 return 0;
6868}
6869_ACEOF
ac50fbac 6870if ac_fn_c_try_link "$LINENO"; then :
f73dda09 6871 ac_cv_func_alloca_works=yes
ccc6cda3 6872else
ac50fbac 6873 ac_cv_func_alloca_works=no
ccc6cda3 6874fi
ac50fbac
CR
6875rm -f core conftest.err conftest.$ac_objext \
6876 conftest$ac_exeext conftest.$ac_ext
ccc6cda3 6877fi
ac50fbac 6878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
3185942a 6879$as_echo "$ac_cv_func_alloca_works" >&6; }
f73dda09
JA
6880
6881if test $ac_cv_func_alloca_works = yes; then
ccc6cda3 6882
ac50fbac 6883$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
f73dda09 6884
ccc6cda3 6885else
f73dda09
JA
6886 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6887# that cause trouble. Some versions do not even contain alloca or
6888# contain a buggy version. If you still want to use their alloca,
6889# use ar to extract alloca.o from them instead of compiling alloca.c.
ccc6cda3 6890
3185942a 6891ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
ccc6cda3 6892
ac50fbac 6893$as_echo "#define C_ALLOCA 1" >>confdefs.h
f73dda09 6894
b80f6443 6895
ac50fbac 6896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
3185942a 6897$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
ac50fbac 6898if ${ac_cv_os_cray+:} false; then :
3185942a 6899 $as_echo_n "(cached) " >&6
ccc6cda3 6900else
ac50fbac 6901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6902/* end confdefs.h. */
3185942a 6903#if defined CRAY && ! defined CRAY2
f73dda09
JA
6904webecray
6905#else
6906wenotbecray
6907#endif
ccc6cda3 6908
f73dda09
JA
6909_ACEOF
6910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 6911 $EGREP "webecray" >/dev/null 2>&1; then :
f73dda09 6912 ac_cv_os_cray=yes
ccc6cda3 6913else
f73dda09 6914 ac_cv_os_cray=no
ccc6cda3
JA
6915fi
6916rm -f conftest*
ccc6cda3
JA
6917
6918fi
ac50fbac 6919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
3185942a 6920$as_echo "$ac_cv_os_cray" >&6; }
f73dda09
JA
6921if test $ac_cv_os_cray = yes; then
6922 for ac_func in _getb67 GETB67 getb67; do
3185942a 6923 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac50fbac
CR
6924ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6925if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
f73dda09 6926
b80f6443 6927cat >>confdefs.h <<_ACEOF
f73dda09 6928#define CRAY_STACKSEG_END $ac_func
b80f6443 6929_ACEOF
ccc6cda3 6930
f73dda09 6931 break
ccc6cda3 6932fi
ccc6cda3 6933
f73dda09 6934 done
ccc6cda3
JA
6935fi
6936
ac50fbac 6937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
3185942a 6938$as_echo_n "checking stack direction for C alloca... " >&6; }
ac50fbac 6939if ${ac_cv_c_stack_direction+:} false; then :
3185942a 6940 $as_echo_n "(cached) " >&6
ccc6cda3 6941else
ac50fbac 6942 if test "$cross_compiling" = yes; then :
f73dda09
JA
6943 ac_cv_c_stack_direction=0
6944else
ac50fbac 6945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6946/* end confdefs.h. */
3185942a 6947$ac_includes_default
f73dda09 6948int
ac50fbac 6949find_stack_direction (int *addr, int depth)
f73dda09 6950{
ac50fbac
CR
6951 int dir, dummy = 0;
6952 if (! addr)
6953 addr = &dummy;
6954 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6955 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6956 return dir + dummy;
f73dda09 6957}
ccc6cda3 6958
f73dda09 6959int
ac50fbac 6960main (int argc, char **argv)
f73dda09 6961{
ac50fbac 6962 return find_stack_direction (0, argc + !argv + 20) < 0;
f73dda09
JA
6963}
6964_ACEOF
ac50fbac 6965if ac_fn_c_try_run "$LINENO"; then :
f73dda09 6966 ac_cv_c_stack_direction=1
ccc6cda3 6967else
ac50fbac 6968 ac_cv_c_stack_direction=-1
ccc6cda3 6969fi
ac50fbac
CR
6970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6971 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 6972fi
3185942a 6973
f73dda09 6974fi
ac50fbac 6975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
3185942a 6976$as_echo "$ac_cv_c_stack_direction" >&6; }
b80f6443 6977cat >>confdefs.h <<_ACEOF
f73dda09 6978#define STACK_DIRECTION $ac_cv_c_stack_direction
b80f6443
JA
6979_ACEOF
6980
ccc6cda3 6981
ccc6cda3
JA
6982fi
6983
b80f6443
JA
6984
6985
f73dda09 6986
ac50fbac
CR
6987 for ac_header in $ac_header_list
6988do :
6989 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6990ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6991"
6992if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
b80f6443 6993 cat >>confdefs.h <<_ACEOF
3185942a 6994#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
b80f6443 6995_ACEOF
ccc6cda3 6996
cce855bc 6997fi
ccc6cda3 6998
b80f6443
JA
6999done
7000
7001
0628567a 7002
0628567a 7003
0628567a 7004
f73dda09 7005
0628567a 7006
3185942a 7007
ac50fbac
CR
7008for ac_func in getpagesize
7009do :
7010 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7011if test "x$ac_cv_func_getpagesize" = xyes; then :
b80f6443 7012 cat >>confdefs.h <<_ACEOF
ac50fbac 7013#define HAVE_GETPAGESIZE 1
b80f6443 7014_ACEOF
f73dda09 7015
b80f6443
JA
7016fi
7017done
7018
ac50fbac 7019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
3185942a 7020$as_echo_n "checking for working mmap... " >&6; }
ac50fbac 7021if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
3185942a 7022 $as_echo_n "(cached) " >&6
b80f6443 7023else
ac50fbac 7024 if test "$cross_compiling" = yes; then :
b80f6443 7025 ac_cv_func_mmap_fixed_mapped=no
f73dda09 7026else
ac50fbac 7027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7028/* end confdefs.h. */
b80f6443
JA
7029$ac_includes_default
7030/* malloc might have been renamed as rpl_malloc. */
7031#undef malloc
7032
7033/* Thanks to Mike Haertel and Jim Avera for this test.
7034 Here is a matrix of mmap possibilities:
7035 mmap private not fixed
7036 mmap private fixed at somewhere currently unmapped
7037 mmap private fixed at somewhere already mapped
7038 mmap shared not fixed
7039 mmap shared fixed at somewhere currently unmapped
7040 mmap shared fixed at somewhere already mapped
7041 For private mappings, we should verify that changes cannot be read()
7042 back from the file, nor mmap's back from the file at a different
7043 address. (There have been systems where private was not correctly
7044 implemented like the infamous i386 svr4.0, and systems where the
7045 VM page cache was not coherent with the file system buffer cache
7046 like early versions of FreeBSD and possibly contemporary NetBSD.)
7047 For shared mappings, we should conversely verify that changes get
7048 propagated back to all the places they're supposed to be.
7049
7050 Grep wants private fixed already mapped.
7051 The main things grep needs to know about mmap are:
7052 * does it exist and is it safe to write into the mmap'd area
7053 * how to use it (BSD variants) */
7054
7055#include <fcntl.h>
7056#include <sys/mman.h>
7057
3185942a 7058#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
b80f6443 7059char *malloc ();
f73dda09 7060#endif
b80f6443
JA
7061
7062/* This mess was copied from the GNU getpagesize.h. */
3185942a 7063#ifndef HAVE_GETPAGESIZE
b80f6443
JA
7064# ifdef _SC_PAGESIZE
7065# define getpagesize() sysconf(_SC_PAGESIZE)
7066# else /* no _SC_PAGESIZE */
3185942a 7067# ifdef HAVE_SYS_PARAM_H
b80f6443
JA
7068# include <sys/param.h>
7069# ifdef EXEC_PAGESIZE
7070# define getpagesize() EXEC_PAGESIZE
7071# else /* no EXEC_PAGESIZE */
7072# ifdef NBPG
7073# define getpagesize() NBPG * CLSIZE
7074# ifndef CLSIZE
7075# define CLSIZE 1
7076# endif /* no CLSIZE */
7077# else /* no NBPG */
7078# ifdef NBPC
7079# define getpagesize() NBPC
7080# else /* no NBPC */
7081# ifdef PAGESIZE
7082# define getpagesize() PAGESIZE
7083# endif /* PAGESIZE */
7084# endif /* no NBPC */
7085# endif /* no NBPG */
7086# endif /* no EXEC_PAGESIZE */
7087# else /* no HAVE_SYS_PARAM_H */
7088# define getpagesize() 8192 /* punt totally */
7089# endif /* no HAVE_SYS_PARAM_H */
7090# endif /* no _SC_PAGESIZE */
7091
7092#endif /* no HAVE_GETPAGESIZE */
ccc6cda3 7093
f73dda09
JA
7094int
7095main ()
7096{
b80f6443 7097 char *data, *data2, *data3;
ac50fbac 7098 const char *cdata2;
b80f6443 7099 int i, pagesize;
ac50fbac 7100 int fd, fd2;
f73dda09 7101
b80f6443
JA
7102 pagesize = getpagesize ();
7103
7104 /* First, make a file with some known garbage in it. */
7105 data = (char *) malloc (pagesize);
7106 if (!data)
3185942a 7107 return 1;
b80f6443
JA
7108 for (i = 0; i < pagesize; ++i)
7109 *(data + i) = rand ();
7110 umask (0);
7111 fd = creat ("conftest.mmap", 0600);
7112 if (fd < 0)
ac50fbac 7113 return 2;
b80f6443 7114 if (write (fd, data, pagesize) != pagesize)
ac50fbac 7115 return 3;
b80f6443
JA
7116 close (fd);
7117
ac50fbac
CR
7118 /* Next, check that the tail of a page is zero-filled. File must have
7119 non-zero length, otherwise we risk SIGBUS for entire page. */
7120 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7121 if (fd2 < 0)
7122 return 4;
7123 cdata2 = "";
7124 if (write (fd2, cdata2, 1) != 1)
7125 return 5;
7126 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7127 if (data2 == MAP_FAILED)
7128 return 6;
7129 for (i = 0; i < pagesize; ++i)
7130 if (*(data2 + i))
7131 return 7;
7132 close (fd2);
7133 if (munmap (data2, pagesize))
7134 return 8;
7135
b80f6443
JA
7136 /* Next, try to mmap the file at a fixed address which already has
7137 something else allocated at it. If we can, also make sure that
7138 we see the same garbage. */
7139 fd = open ("conftest.mmap", O_RDWR);
7140 if (fd < 0)
ac50fbac 7141 return 9;
b80f6443 7142 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
0628567a 7143 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ac50fbac 7144 return 10;
b80f6443
JA
7145 for (i = 0; i < pagesize; ++i)
7146 if (*(data + i) != *(data2 + i))
ac50fbac 7147 return 11;
b80f6443
JA
7148
7149 /* Finally, make sure that changes to the mapped area do not
7150 percolate back to the file as seen by read(). (This is a bug on
7151 some variants of i386 svr4.0.) */
7152 for (i = 0; i < pagesize; ++i)
7153 *(data2 + i) = *(data2 + i) + 1;
7154 data3 = (char *) malloc (pagesize);
7155 if (!data3)
ac50fbac 7156 return 12;
b80f6443 7157 if (read (fd, data3, pagesize) != pagesize)
ac50fbac 7158 return 13;
b80f6443
JA
7159 for (i = 0; i < pagesize; ++i)
7160 if (*(data + i) != *(data3 + i))
ac50fbac 7161 return 14;
b80f6443 7162 close (fd);
3185942a 7163 return 0;
f73dda09
JA
7164}
7165_ACEOF
ac50fbac 7166if ac_fn_c_try_run "$LINENO"; then :
b80f6443 7167 ac_cv_func_mmap_fixed_mapped=yes
f73dda09 7168else
ac50fbac 7169 ac_cv_func_mmap_fixed_mapped=no
f73dda09 7170fi
ac50fbac
CR
7171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7172 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 7173fi
3185942a 7174
b80f6443 7175fi
ac50fbac 7176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
3185942a 7177$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
b80f6443 7178if test $ac_cv_func_mmap_fixed_mapped = yes; then
f73dda09 7179
ac50fbac 7180$as_echo "#define HAVE_MMAP 1" >>confdefs.h
b80f6443
JA
7181
7182fi
ac50fbac 7183rm -f conftest.mmap conftest.txt
b80f6443
JA
7184
7185
ac50fbac 7186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
3185942a 7187$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
ac50fbac 7188if ${ac_cv_gnu_library_2_1+:} false; then :
3185942a 7189 $as_echo_n "(cached) " >&6
b80f6443 7190else
ac50fbac 7191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7192/* end confdefs.h. */
b80f6443
JA
7193
7194#include <features.h>
7195#ifdef __GNU_LIBRARY__
7196 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
7197 Lucky GNU user
7198 #endif
7199#endif
ccc6cda3 7200
b80f6443
JA
7201_ACEOF
7202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 7203 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
b80f6443
JA
7204 ac_cv_gnu_library_2_1=yes
7205else
7206 ac_cv_gnu_library_2_1=no
ccc6cda3 7207fi
b80f6443
JA
7208rm -f conftest*
7209
7210
f73dda09 7211
ccc6cda3 7212fi
ac50fbac 7213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
3185942a 7214$as_echo "$ac_cv_gnu_library_2_1" >&6; }
ccc6cda3 7215
b80f6443
JA
7216 GLIBC21="$ac_cv_gnu_library_2_1"
7217
7218
7219
7220
ac50fbac 7221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5
3185942a 7222$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
ac50fbac 7223if ${gt_cv_int_divbyzero_sigfpe+:} false; then :
3185942a 7224 $as_echo_n "(cached) " >&6
ccc6cda3 7225else
b80f6443 7226
ac50fbac 7227 if test "$cross_compiling" = yes; then :
b80f6443
JA
7228
7229 # Guess based on the CPU.
7230 case "$host_cpu" in
7231 alpha* | i3456786 | m68k | s390*)
7232 gt_cv_int_divbyzero_sigfpe="guessing yes";;
7233 *)
7234 gt_cv_int_divbyzero_sigfpe="guessing no";;
7235 esac
7236
ccc6cda3 7237else
ac50fbac 7238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7239/* end confdefs.h. */
b80f6443
JA
7240
7241#include <stdlib.h>
7242#include <signal.h>
7243
7244static void
7245#ifdef __cplusplus
7246sigfpe_handler (int sig)
7247#else
7248sigfpe_handler (sig) int sig;
7249#endif
f73dda09 7250{
b80f6443
JA
7251 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
7252 exit (sig != SIGFPE);
7253}
7254
7255int x = 1;
7256int y = 0;
7257int z;
7258int nan;
7259
7260int main ()
7261{
7262 signal (SIGFPE, sigfpe_handler);
7263/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
7264#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
7265 signal (SIGTRAP, sigfpe_handler);
7266#endif
7267/* Linux/SPARC yields signal SIGILL. */
7268#if defined (__sparc__) && defined (__linux__)
7269 signal (SIGILL, sigfpe_handler);
7270#endif
7271
7272 z = x / y;
7273 nan = y / y;
7274 exit (1);
f73dda09 7275}
b80f6443 7276
f73dda09 7277_ACEOF
ac50fbac 7278if ac_fn_c_try_run "$LINENO"; then :
b80f6443 7279 gt_cv_int_divbyzero_sigfpe=yes
ccc6cda3 7280else
ac50fbac 7281 gt_cv_int_divbyzero_sigfpe=no
ccc6cda3 7282fi
ac50fbac
CR
7283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7284 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
7285fi
7286
3185942a 7287
ccc6cda3 7288fi
ac50fbac 7289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5
3185942a 7290$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; }
b80f6443
JA
7291 case "$gt_cv_int_divbyzero_sigfpe" in
7292 *yes) value=1;;
7293 *) value=0;;
7294 esac
ccc6cda3 7295
b80f6443
JA
7296cat >>confdefs.h <<_ACEOF
7297#define INTDIV0_RAISES_SIGFPE $value
7298_ACEOF
ccc6cda3 7299
ccc6cda3
JA
7300
7301
ac50fbac 7302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
3185942a 7303$as_echo_n "checking for inttypes.h... " >&6; }
ac50fbac 7304if ${jm_ac_cv_header_inttypes_h+:} false; then :
3185942a 7305 $as_echo_n "(cached) " >&6
ccc6cda3 7306else
ac50fbac 7307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7308/* end confdefs.h. */
f73dda09 7309#include <sys/types.h>
b80f6443 7310#include <inttypes.h>
f73dda09
JA
7311int
7312main ()
7313{
b80f6443 7314uintmax_t i = (uintmax_t) -1;
f73dda09
JA
7315 ;
7316 return 0;
7317}
7318_ACEOF
ac50fbac 7319if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 7320 jm_ac_cv_header_inttypes_h=yes
ccc6cda3 7321else
ac50fbac 7322 jm_ac_cv_header_inttypes_h=no
ccc6cda3 7323fi
3185942a 7324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 7325fi
ac50fbac 7326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_inttypes_h" >&5
3185942a 7327$as_echo "$jm_ac_cv_header_inttypes_h" >&6; }
b80f6443 7328 if test $jm_ac_cv_header_inttypes_h = yes; then
f73dda09 7329
b80f6443
JA
7330cat >>confdefs.h <<_ACEOF
7331#define HAVE_INTTYPES_H_WITH_UINTMAX 1
7332_ACEOF
ccc6cda3 7333
b80f6443
JA
7334 fi
7335
7336
ac50fbac 7337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
3185942a 7338$as_echo_n "checking for stdint.h... " >&6; }
ac50fbac 7339if ${jm_ac_cv_header_stdint_h+:} false; then :
3185942a 7340 $as_echo_n "(cached) " >&6
ccc6cda3 7341else
ac50fbac 7342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7343/* end confdefs.h. */
b80f6443
JA
7344#include <sys/types.h>
7345#include <stdint.h>
f73dda09
JA
7346int
7347main ()
7348{
b80f6443 7349uintmax_t i = (uintmax_t) -1;
f73dda09
JA
7350 ;
7351 return 0;
7352}
7353_ACEOF
ac50fbac 7354if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 7355 jm_ac_cv_header_stdint_h=yes
f73dda09 7356else
ac50fbac 7357 jm_ac_cv_header_stdint_h=no
f73dda09 7358fi
3185942a 7359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09 7360fi
ac50fbac 7361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_stdint_h" >&5
3185942a 7362$as_echo "$jm_ac_cv_header_stdint_h" >&6; }
b80f6443 7363 if test $jm_ac_cv_header_stdint_h = yes; then
f73dda09 7364
b80f6443
JA
7365cat >>confdefs.h <<_ACEOF
7366#define HAVE_STDINT_H_WITH_UINTMAX 1
7367_ACEOF
f73dda09 7368
b80f6443
JA
7369 fi
7370
7371
ac50fbac 7372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5
3185942a 7373$as_echo_n "checking for unsigned long long... " >&6; }
ac50fbac 7374if ${ac_cv_type_unsigned_long_long+:} false; then :
3185942a 7375 $as_echo_n "(cached) " >&6
f73dda09 7376else
ac50fbac 7377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7378/* end confdefs.h. */
b80f6443 7379unsigned long long ull = 1; int i = 63;
f73dda09
JA
7380int
7381main ()
7382{
b80f6443
JA
7383unsigned long long ullmax = (unsigned long long) -1;
7384 return ull << i | ull >> i | ullmax / ull | ullmax % ull;
f73dda09
JA
7385 ;
7386 return 0;
7387}
7388_ACEOF
ac50fbac 7389if ac_fn_c_try_link "$LINENO"; then :
b80f6443 7390 ac_cv_type_unsigned_long_long=yes
f73dda09 7391else
ac50fbac 7392 ac_cv_type_unsigned_long_long=no
f73dda09 7393fi
ac50fbac
CR
7394rm -f core conftest.err conftest.$ac_objext \
7395 conftest$ac_exeext conftest.$ac_ext
f73dda09 7396fi
ac50fbac 7397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long" >&5
3185942a 7398$as_echo "$ac_cv_type_unsigned_long_long" >&6; }
b80f6443 7399 if test $ac_cv_type_unsigned_long_long = yes; then
f73dda09 7400
ac50fbac 7401$as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h
f73dda09 7402
b80f6443 7403 fi
7117c2d2 7404
7117c2d2 7405
b80f6443
JA
7406
7407
7408 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
7409
7410 test $ac_cv_type_unsigned_long_long = yes \
7411 && ac_type='unsigned long long' \
7412 || ac_type='unsigned long'
7413
7414cat >>confdefs.h <<_ACEOF
7415#define uintmax_t $ac_type
7117c2d2 7416_ACEOF
7117c2d2 7417
b80f6443 7418 else
7117c2d2 7419
ac50fbac 7420$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
b80f6443
JA
7421
7422 fi
7423
7424
ac50fbac 7425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
3185942a 7426$as_echo_n "checking for inttypes.h... " >&6; }
ac50fbac 7427if ${gt_cv_header_inttypes_h+:} false; then :
3185942a 7428 $as_echo_n "(cached) " >&6
f73dda09 7429else
f73dda09 7430
ac50fbac 7431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7432/* end confdefs.h. */
b80f6443
JA
7433#include <sys/types.h>
7434#include <inttypes.h>
f73dda09
JA
7435int
7436main ()
7437{
f73dda09
JA
7438
7439 ;
7440 return 0;
7441}
7442_ACEOF
ac50fbac 7443if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 7444 gt_cv_header_inttypes_h=yes
f73dda09 7445else
ac50fbac 7446 gt_cv_header_inttypes_h=no
f73dda09 7447fi
3185942a 7448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b80f6443 7449
f73dda09 7450fi
ac50fbac 7451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_header_inttypes_h" >&5
3185942a 7452$as_echo "$gt_cv_header_inttypes_h" >&6; }
b80f6443 7453 if test $gt_cv_header_inttypes_h = yes; then
f73dda09 7454
b80f6443
JA
7455cat >>confdefs.h <<_ACEOF
7456#define HAVE_INTTYPES_H 1
7457_ACEOF
f73dda09 7458
b80f6443 7459 fi
f73dda09 7460
b80f6443
JA
7461
7462
7463 if test $gt_cv_header_inttypes_h = yes; then
ac50fbac 7464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
3185942a 7465$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
ac50fbac 7466if ${gt_cv_inttypes_pri_broken+:} false; then :
3185942a 7467 $as_echo_n "(cached) " >&6
f73dda09 7468else
b80f6443 7469
ac50fbac 7470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 7471/* end confdefs.h. */
b80f6443
JA
7472#include <inttypes.h>
7473#ifdef PRId32
7474char *p = PRId32;
f73dda09 7475#endif
f73dda09
JA
7476
7477int
7478main ()
7479{
f73dda09
JA
7480
7481 ;
7482 return 0;
7483}
7484_ACEOF
ac50fbac 7485if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 7486 gt_cv_inttypes_pri_broken=no
f73dda09 7487else
ac50fbac 7488 gt_cv_inttypes_pri_broken=yes
f73dda09 7489fi
3185942a 7490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f73dda09
JA
7491
7492fi
ac50fbac 7493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
3185942a 7494$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
b80f6443
JA
7495 fi
7496 if test "$gt_cv_inttypes_pri_broken" = yes; then
f73dda09 7497
b80f6443
JA
7498cat >>confdefs.h <<_ACEOF
7499#define PRI_MACROS_BROKEN 1
7500_ACEOF
f73dda09 7501
b80f6443 7502 fi
f73dda09 7503
b80f6443
JA
7504
7505 if test "X$prefix" = "XNONE"; then
7506 acl_final_prefix="$ac_default_prefix"
7507 else
7508 acl_final_prefix="$prefix"
7509 fi
7510 if test "X$exec_prefix" = "XNONE"; then
7511 acl_final_exec_prefix='${prefix}'
7512 else
7513 acl_final_exec_prefix="$exec_prefix"
7514 fi
7515 acl_save_prefix="$prefix"
7516 prefix="$acl_final_prefix"
7517 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7518 prefix="$acl_save_prefix"
7519
7520
3185942a 7521# Check whether --with-gnu-ld was given.
ac50fbac 7522if test "${with_gnu_ld+set}" = set; then :
3185942a 7523 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
f73dda09 7524else
b80f6443 7525 with_gnu_ld=no
3185942a
JA
7526fi
7527
b80f6443
JA
7528# Prepare PATH_SEPARATOR.
7529# The user is always right.
7530if test "${PATH_SEPARATOR+set}" != set; then
7531 echo "#! /bin/sh" >conf$$.sh
7532 echo "exit 0" >>conf$$.sh
7533 chmod +x conf$$.sh
7534 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7535 PATH_SEPARATOR=';'
7536 else
7537 PATH_SEPARATOR=:
7538 fi
7539 rm -f conf$$.sh
7540fi
7541ac_prog=ld
7542if test "$GCC" = yes; then
7543 # Check if gcc -print-prog-name=ld gives a path.
ac50fbac 7544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
3185942a 7545$as_echo_n "checking for ld used by GCC... " >&6; }
b80f6443
JA
7546 case $host in
7547 *-*-mingw*)
7548 # gcc leaves a trailing carriage return which upsets mingw
7549 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7550 *)
7551 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7552 esac
7553 case $ac_prog in
7554 # Accept absolute paths.
7555 [\\/]* | [A-Za-z]:[\\/]*)
7556 re_direlt='/[^/][^/]*/\.\./'
7557 # Canonicalize the path of ld
7558 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7559 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7560 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7561 done
7562 test -z "$LD" && LD="$ac_prog"
7563 ;;
7564 "")
7565 # If it fails, then pretend we aren't using GCC.
7566 ac_prog=ld
7567 ;;
7568 *)
7569 # If it is relative, then search for the first ld in PATH.
7570 with_gnu_ld=unknown
7571 ;;
7572 esac
7573elif test "$with_gnu_ld" = yes; then
ac50fbac 7574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
3185942a 7575$as_echo_n "checking for GNU ld... " >&6; }
b80f6443 7576else
ac50fbac 7577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
3185942a 7578$as_echo_n "checking for non-GNU ld... " >&6; }
b80f6443 7579fi
ac50fbac 7580if ${acl_cv_path_LD+:} false; then :
3185942a 7581 $as_echo_n "(cached) " >&6
b80f6443
JA
7582else
7583 if test -z "$LD"; then
7584 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
7585 for ac_dir in $PATH; do
7586 test -z "$ac_dir" && ac_dir=.
7587 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7588 acl_cv_path_LD="$ac_dir/$ac_prog"
7589 # Check to see if the program is GNU ld. I'd rather use --version,
7590 # but apparently some GNU ld's only accept -v.
7591 # Break only if it was the GNU/non-GNU ld that we prefer.
7592 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7593 test "$with_gnu_ld" != no && break
7594 else
7595 test "$with_gnu_ld" != yes && break
7596 fi
7597 fi
7598 done
7599 IFS="$ac_save_ifs"
7600else
7601 acl_cv_path_LD="$LD" # Let the user override the test with a path.
f73dda09 7602fi
f73dda09 7603fi
f73dda09 7604
b80f6443
JA
7605LD="$acl_cv_path_LD"
7606if test -n "$LD"; then
ac50fbac 7607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
3185942a 7608$as_echo "$LD" >&6; }
f73dda09 7609else
ac50fbac 7610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 7611$as_echo "no" >&6; }
f73dda09 7612fi
ac50fbac
CR
7613test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
3185942a 7615$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
ac50fbac 7616if ${acl_cv_prog_gnu_ld+:} false; then :
3185942a 7617 $as_echo_n "(cached) " >&6
b80f6443
JA
7618else
7619 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
7620if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7621 acl_cv_prog_gnu_ld=yes
7622else
7623 acl_cv_prog_gnu_ld=no
7624fi
7625fi
ac50fbac 7626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
3185942a 7627$as_echo "$acl_cv_prog_gnu_ld" >&6; }
b80f6443
JA
7628with_gnu_ld=$acl_cv_prog_gnu_ld
7629
7630
7631
ac50fbac 7632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
3185942a 7633$as_echo_n "checking for shared library run path origin... " >&6; }
ac50fbac 7634if ${acl_cv_rpath+:} false; then :
3185942a 7635 $as_echo_n "(cached) " >&6
b80f6443
JA
7636else
7637
7638 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7639 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7640 . ./conftest.sh
7641 rm -f ./conftest.sh
7642 acl_cv_rpath=done
7643
7644fi
ac50fbac 7645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
3185942a 7646$as_echo "$acl_cv_rpath" >&6; }
b80f6443
JA
7647 wl="$acl_cv_wl"
7648 libext="$acl_cv_libext"
7649 shlibext="$acl_cv_shlibext"
7650 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7651 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7652 hardcode_direct="$acl_cv_hardcode_direct"
7653 hardcode_minus_L="$acl_cv_hardcode_minus_L"
3185942a 7654 # Check whether --enable-rpath was given.
ac50fbac 7655if test "${enable_rpath+set}" = set; then :
3185942a 7656 enableval=$enable_rpath; :
b80f6443
JA
7657else
7658 enable_rpath=yes
3185942a
JA
7659fi
7660
b80f6443
JA
7661
7662
7663
7664
7665
7666
7667
7668 use_additional=yes
7669
7670 acl_save_prefix="$prefix"
7671 prefix="$acl_final_prefix"
7672 acl_save_exec_prefix="$exec_prefix"
7673 exec_prefix="$acl_final_exec_prefix"
7674
7675 eval additional_includedir=\"$includedir\"
7676 eval additional_libdir=\"$libdir\"
7677
7678 exec_prefix="$acl_save_exec_prefix"
7679 prefix="$acl_save_prefix"
7680
7681
3185942a 7682# Check whether --with-libiconv-prefix was given.
ac50fbac 7683if test "${with_libiconv_prefix+set}" = set; then :
3185942a 7684 withval=$with_libiconv_prefix;
b80f6443
JA
7685 if test "X$withval" = "Xno"; then
7686 use_additional=no
7687 else
7688 if test "X$withval" = "X"; then
7689
7690 acl_save_prefix="$prefix"
7691 prefix="$acl_final_prefix"
7692 acl_save_exec_prefix="$exec_prefix"
7693 exec_prefix="$acl_final_exec_prefix"
7694
7695 eval additional_includedir=\"$includedir\"
7696 eval additional_libdir=\"$libdir\"
7697
7698 exec_prefix="$acl_save_exec_prefix"
7699 prefix="$acl_save_prefix"
7700
7701 else
7702 additional_includedir="$withval/include"
7703 additional_libdir="$withval/lib"
7704 fi
7705 fi
7706
3185942a
JA
7707fi
7708
b80f6443
JA
7709 LIBICONV=
7710 LTLIBICONV=
7711 INCICONV=
7712 rpathdirs=
7713 ltrpathdirs=
7714 names_already_handled=
7715 names_next_round='iconv '
7716 while test -n "$names_next_round"; do
7717 names_this_round="$names_next_round"
7718 names_next_round=
7719 for name in $names_this_round; do
7720 already_handled=
7721 for n in $names_already_handled; do
7722 if test "$n" = "$name"; then
7723 already_handled=yes
7724 break
7725 fi
7726 done
7727 if test -z "$already_handled"; then
7728 names_already_handled="$names_already_handled $name"
7729 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7730 eval value=\"\$HAVE_LIB$uppername\"
7731 if test -n "$value"; then
7732 if test "$value" = yes; then
7733 eval value=\"\$LIB$uppername\"
7734 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
7735 eval value=\"\$LTLIB$uppername\"
7736 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
7737 else
7738 :
7739 fi
7740 else
7741 found_dir=
7742 found_la=
7743 found_so=
7744 found_a=
7745 if test $use_additional = yes; then
ac50fbac 7746 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
b80f6443
JA
7747 found_dir="$additional_libdir"
7748 found_so="$additional_libdir/lib$name.$shlibext"
7749 if test -f "$additional_libdir/lib$name.la"; then
7750 found_la="$additional_libdir/lib$name.la"
7751 fi
7752 else
7753 if test -f "$additional_libdir/lib$name.$libext"; then
7754 found_dir="$additional_libdir"
7755 found_a="$additional_libdir/lib$name.$libext"
7756 if test -f "$additional_libdir/lib$name.la"; then
7757 found_la="$additional_libdir/lib$name.la"
7758 fi
7759 fi
7760 fi
7761 fi
7762 if test "X$found_dir" = "X"; then
7763 for x in $LDFLAGS $LTLIBICONV; do
7764
7765 acl_save_prefix="$prefix"
7766 prefix="$acl_final_prefix"
7767 acl_save_exec_prefix="$exec_prefix"
7768 exec_prefix="$acl_final_exec_prefix"
7769 eval x=\"$x\"
7770 exec_prefix="$acl_save_exec_prefix"
7771 prefix="$acl_save_prefix"
7772
7773 case "$x" in
7774 -L*)
7775 dir=`echo "X$x" | sed -e 's/^X-L//'`
ac50fbac 7776 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
b80f6443
JA
7777 found_dir="$dir"
7778 found_so="$dir/lib$name.$shlibext"
7779 if test -f "$dir/lib$name.la"; then
7780 found_la="$dir/lib$name.la"
7781 fi
7782 else
7783 if test -f "$dir/lib$name.$libext"; then
7784 found_dir="$dir"
7785 found_a="$dir/lib$name.$libext"
7786 if test -f "$dir/lib$name.la"; then
7787 found_la="$dir/lib$name.la"
7788 fi
7789 fi
7790 fi
7791 ;;
7792 esac
7793 if test "X$found_dir" != "X"; then
7794 break
7795 fi
7796 done
7797 fi
7798 if test "X$found_dir" != "X"; then
7799 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7800 if test "X$found_so" != "X"; then
7801 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
7802 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7803 else
7804 haveit=
7805 for x in $ltrpathdirs; do
7806 if test "X$x" = "X$found_dir"; then
7807 haveit=yes
7808 break
7809 fi
7810 done
7811 if test -z "$haveit"; then
7812 ltrpathdirs="$ltrpathdirs $found_dir"
7813 fi
7814 if test "$hardcode_direct" = yes; then
7815 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7816 else
7817 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
7818 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7819 haveit=
7820 for x in $rpathdirs; do
7821 if test "X$x" = "X$found_dir"; then
7822 haveit=yes
7823 break
7824 fi
7825 done
7826 if test -z "$haveit"; then
7827 rpathdirs="$rpathdirs $found_dir"
7828 fi
7829 else
7830 haveit=
7831 for x in $LDFLAGS $LIBICONV; do
7832
7833 acl_save_prefix="$prefix"
7834 prefix="$acl_final_prefix"
7835 acl_save_exec_prefix="$exec_prefix"
7836 exec_prefix="$acl_final_exec_prefix"
7837 eval x=\"$x\"
7838 exec_prefix="$acl_save_exec_prefix"
7839 prefix="$acl_save_prefix"
7840
7841 if test "X$x" = "X-L$found_dir"; then
7842 haveit=yes
7843 break
7844 fi
7845 done
7846 if test -z "$haveit"; then
7847 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7848 fi
7849 if test "$hardcode_minus_L" != no; then
7850 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7851 else
7852 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7853 fi
7854 fi
7855 fi
7856 fi
7857 else
7858 if test "X$found_a" != "X"; then
7859 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7860 else
7861 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7862 fi
7863 fi
7864 additional_includedir=
7865 case "$found_dir" in
7866 */lib | */lib/)
7867 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
7868 additional_includedir="$basedir/include"
7869 ;;
7870 esac
7871 if test "X$additional_includedir" != "X"; then
7872 if test "X$additional_includedir" != "X/usr/include"; then
7873 haveit=
7874 if test "X$additional_includedir" = "X/usr/local/include"; then
7875 if test -n "$GCC"; then
7876 case $host_os in
7877 linux*) haveit=yes;;
7878 esac
7879 fi
7880 fi
7881 if test -z "$haveit"; then
7882 for x in $CPPFLAGS $INCICONV; do
7883
7884 acl_save_prefix="$prefix"
7885 prefix="$acl_final_prefix"
7886 acl_save_exec_prefix="$exec_prefix"
7887 exec_prefix="$acl_final_exec_prefix"
7888 eval x=\"$x\"
7889 exec_prefix="$acl_save_exec_prefix"
7890 prefix="$acl_save_prefix"
7891
7892 if test "X$x" = "X-I$additional_includedir"; then
7893 haveit=yes
7894 break
7895 fi
7896 done
7897 if test -z "$haveit"; then
7898 if test -d "$additional_includedir"; then
7899 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7900 fi
7901 fi
7902 fi
7903 fi
7904 fi
7905 if test -n "$found_la"; then
7906 save_libdir="$libdir"
7907 case "$found_la" in
7908 */* | *\\*) . "$found_la" ;;
7909 *) . "./$found_la" ;;
7910 esac
7911 libdir="$save_libdir"
7912 for dep in $dependency_libs; do
7913 case "$dep" in
7914 -L*)
7915 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7916 if test "X$additional_libdir" != "X/usr/lib"; then
7917 haveit=
7918 if test "X$additional_libdir" = "X/usr/local/lib"; then
7919 if test -n "$GCC"; then
7920 case $host_os in
7921 linux*) haveit=yes;;
7922 esac
7923 fi
7924 fi
7925 if test -z "$haveit"; then
7926 haveit=
7927 for x in $LDFLAGS $LIBICONV; do
7928
7929 acl_save_prefix="$prefix"
7930 prefix="$acl_final_prefix"
7931 acl_save_exec_prefix="$exec_prefix"
7932 exec_prefix="$acl_final_exec_prefix"
7933 eval x=\"$x\"
7934 exec_prefix="$acl_save_exec_prefix"
7935 prefix="$acl_save_prefix"
7936
7937 if test "X$x" = "X-L$additional_libdir"; then
7938 haveit=yes
7939 break
7940 fi
7941 done
7942 if test -z "$haveit"; then
7943 if test -d "$additional_libdir"; then
7944 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7945 fi
7946 fi
7947 haveit=
7948 for x in $LDFLAGS $LTLIBICONV; do
7949
7950 acl_save_prefix="$prefix"
7951 prefix="$acl_final_prefix"
7952 acl_save_exec_prefix="$exec_prefix"
7953 exec_prefix="$acl_final_exec_prefix"
7954 eval x=\"$x\"
7955 exec_prefix="$acl_save_exec_prefix"
7956 prefix="$acl_save_prefix"
7957
7958 if test "X$x" = "X-L$additional_libdir"; then
7959 haveit=yes
7960 break
7961 fi
7962 done
7963 if test -z "$haveit"; then
7964 if test -d "$additional_libdir"; then
7965 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7966 fi
7967 fi
7968 fi
7969 fi
7970 ;;
7971 -R*)
7972 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7973 if test "$enable_rpath" != no; then
7974 haveit=
7975 for x in $rpathdirs; do
7976 if test "X$x" = "X$dir"; then
7977 haveit=yes
7978 break
7979 fi
7980 done
7981 if test -z "$haveit"; then
7982 rpathdirs="$rpathdirs $dir"
7983 fi
7984 haveit=
7985 for x in $ltrpathdirs; do
7986 if test "X$x" = "X$dir"; then
7987 haveit=yes
7988 break
7989 fi
7990 done
7991 if test -z "$haveit"; then
7992 ltrpathdirs="$ltrpathdirs $dir"
7993 fi
7994 fi
7995 ;;
7996 -l*)
7997 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7998 ;;
7999 *.la)
8000 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8001 ;;
8002 *)
8003 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8004 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8005 ;;
8006 esac
8007 done
8008 fi
8009 else
8010 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8011 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8012 fi
8013 fi
8014 fi
8015 done
8016 done
8017 if test "X$rpathdirs" != "X"; then
8018 if test -n "$hardcode_libdir_separator"; then
8019 alldirs=
8020 for found_dir in $rpathdirs; do
8021 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8022 done
8023 acl_save_libdir="$libdir"
8024 libdir="$alldirs"
8025 eval flag=\"$hardcode_libdir_flag_spec\"
8026 libdir="$acl_save_libdir"
8027 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8028 else
8029 for found_dir in $rpathdirs; do
8030 acl_save_libdir="$libdir"
8031 libdir="$found_dir"
8032 eval flag=\"$hardcode_libdir_flag_spec\"
8033 libdir="$acl_save_libdir"
8034 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8035 done
8036 fi
8037 fi
8038 if test "X$ltrpathdirs" != "X"; then
8039 for found_dir in $ltrpathdirs; do
8040 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8041 done
8042 fi
8043
8044
8045
8046
ac50fbac 8047 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
b80f6443 8048stdlib.h string.h unistd.h sys/param.h
ac50fbac
CR
8049do :
8050 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8051ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8052if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
b80f6443 8053 cat >>confdefs.h <<_ACEOF
3185942a 8054#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
b80f6443
JA
8055_ACEOF
8056
8057fi
8058
f73dda09
JA
8059done
8060
ac50fbac 8061 for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
3185942a 8062geteuid getgid getuid mempcpy munmap putenv setenv setlocale localeconv stpcpy \
b80f6443
JA
8063strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
8064__fsetlocking
ac50fbac
CR
8065do :
8066 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8067ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8068if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
b80f6443 8069 cat >>confdefs.h <<_ACEOF
3185942a 8070#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
b80f6443 8071_ACEOF
f73dda09
JA
8072
8073fi
8074done
8075
b80f6443
JA
8076
8077
8078
8079
8080
8081
8082 am_save_CPPFLAGS="$CPPFLAGS"
8083
8084 for element in $INCICONV; do
8085 haveit=
8086 for x in $CPPFLAGS; do
8087
8088 acl_save_prefix="$prefix"
8089 prefix="$acl_final_prefix"
8090 acl_save_exec_prefix="$exec_prefix"
8091 exec_prefix="$acl_final_exec_prefix"
8092 eval x=\"$x\"
8093 exec_prefix="$acl_save_exec_prefix"
8094 prefix="$acl_save_prefix"
8095
8096 if test "X$x" = "X$element"; then
8097 haveit=yes
8098 break
8099 fi
8100 done
8101 if test -z "$haveit"; then
8102 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8103 fi
8104 done
8105
8106
ac50fbac 8107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
3185942a 8108$as_echo_n "checking for iconv... " >&6; }
ac50fbac 8109if ${am_cv_func_iconv+:} false; then :
3185942a 8110 $as_echo_n "(cached) " >&6
f73dda09 8111else
f73dda09 8112
b80f6443
JA
8113 am_cv_func_iconv="no, consider installing GNU libiconv"
8114 am_cv_lib_iconv=no
ac50fbac 8115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8116/* end confdefs.h. */
b80f6443
JA
8117#include <stdlib.h>
8118#include <iconv.h>
f73dda09
JA
8119int
8120main ()
8121{
b80f6443
JA
8122iconv_t cd = iconv_open("","");
8123 iconv(cd,NULL,NULL,NULL,NULL);
8124 iconv_close(cd);
f73dda09
JA
8125 ;
8126 return 0;
8127}
8128_ACEOF
ac50fbac 8129if ac_fn_c_try_link "$LINENO"; then :
b80f6443 8130 am_cv_func_iconv=yes
f73dda09 8131fi
ac50fbac
CR
8132rm -f core conftest.err conftest.$ac_objext \
8133 conftest$ac_exeext conftest.$ac_ext
b80f6443
JA
8134 if test "$am_cv_func_iconv" != yes; then
8135 am_save_LIBS="$LIBS"
8136 LIBS="$LIBS $LIBICONV"
ac50fbac 8137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8138/* end confdefs.h. */
b80f6443
JA
8139#include <stdlib.h>
8140#include <iconv.h>
f73dda09
JA
8141int
8142main ()
8143{
b80f6443
JA
8144iconv_t cd = iconv_open("","");
8145 iconv(cd,NULL,NULL,NULL,NULL);
8146 iconv_close(cd);
f73dda09
JA
8147 ;
8148 return 0;
8149}
8150_ACEOF
ac50fbac 8151if ac_fn_c_try_link "$LINENO"; then :
b80f6443
JA
8152 am_cv_lib_iconv=yes
8153 am_cv_func_iconv=yes
f73dda09 8154fi
ac50fbac
CR
8155rm -f core conftest.err conftest.$ac_objext \
8156 conftest$ac_exeext conftest.$ac_ext
b80f6443
JA
8157 LIBS="$am_save_LIBS"
8158 fi
8159
f73dda09 8160fi
ac50fbac 8161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
3185942a 8162$as_echo "$am_cv_func_iconv" >&6; }
b80f6443 8163 if test "$am_cv_func_iconv" = yes; then
f73dda09 8164
ac50fbac 8165$as_echo "#define HAVE_ICONV 1" >>confdefs.h
f73dda09 8166
b80f6443
JA
8167 fi
8168 if test "$am_cv_lib_iconv" = yes; then
ac50fbac 8169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
3185942a 8170$as_echo_n "checking how to link with libiconv... " >&6; }
ac50fbac 8171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
3185942a 8172$as_echo "$LIBICONV" >&6; }
b80f6443
JA
8173 else
8174 CPPFLAGS="$am_save_CPPFLAGS"
8175 LIBICONV=
8176 LTLIBICONV=
8177 fi
8178
8179
8180
8181 if test "$am_cv_func_iconv" = yes; then
ac50fbac 8182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
3185942a 8183$as_echo_n "checking for iconv declaration... " >&6; }
ac50fbac 8184 if ${am_cv_proto_iconv+:} false; then :
3185942a 8185 $as_echo_n "(cached) " >&6
f73dda09 8186else
b80f6443 8187
ac50fbac 8188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8189/* end confdefs.h. */
b80f6443
JA
8190
8191#include <stdlib.h>
8192#include <iconv.h>
8193extern
f73dda09 8194#ifdef __cplusplus
b80f6443
JA
8195"C"
8196#endif
8197#if defined(__STDC__) || defined(__cplusplus)
8198size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8199#else
8200size_t iconv();
f73dda09 8201#endif
f73dda09
JA
8202
8203int
8204main ()
8205{
f73dda09
JA
8206
8207 ;
8208 return 0;
8209}
8210_ACEOF
ac50fbac 8211if ac_fn_c_try_compile "$LINENO"; then :
b80f6443 8212 am_cv_proto_iconv_arg1=""
f73dda09 8213else
ac50fbac 8214 am_cv_proto_iconv_arg1="const"
f73dda09 8215fi
3185942a 8216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b80f6443 8217 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 8218fi
f73dda09 8219
b80f6443 8220 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
ac50fbac 8221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
b80f6443 8222 }$am_cv_proto_iconv" >&5
3185942a
JA
8223$as_echo "${ac_t:-
8224 }$am_cv_proto_iconv" >&6; }
f73dda09 8225
b80f6443
JA
8226cat >>confdefs.h <<_ACEOF
8227#define ICONV_CONST $am_cv_proto_iconv_arg1
8228_ACEOF
8229
8230 fi
8231
8232
ac50fbac 8233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
3185942a 8234$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
ac50fbac 8235if ${am_cv_langinfo_codeset+:} false; then :
3185942a 8236 $as_echo_n "(cached) " >&6
f73dda09 8237else
ac50fbac 8238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8239/* end confdefs.h. */
b80f6443 8240#include <langinfo.h>
f73dda09
JA
8241int
8242main ()
8243{
b80f6443 8244char* cs = nl_langinfo(CODESET);
f73dda09
JA
8245 ;
8246 return 0;
8247}
8248_ACEOF
ac50fbac 8249if ac_fn_c_try_link "$LINENO"; then :
b80f6443 8250 am_cv_langinfo_codeset=yes
f73dda09 8251else
ac50fbac 8252 am_cv_langinfo_codeset=no
f73dda09 8253fi
ac50fbac
CR
8254rm -f core conftest.err conftest.$ac_objext \
8255 conftest$ac_exeext conftest.$ac_ext
b80f6443 8256
f73dda09 8257fi
ac50fbac 8258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
3185942a 8259$as_echo "$am_cv_langinfo_codeset" >&6; }
b80f6443 8260 if test $am_cv_langinfo_codeset = yes; then
f73dda09 8261
ac50fbac 8262$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f73dda09 8263
b80f6443 8264 fi
f73dda09 8265
b80f6443 8266 if test $ac_cv_header_locale_h = yes; then
f73dda09 8267
ac50fbac 8268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
3185942a 8269$as_echo_n "checking for LC_MESSAGES... " >&6; }
ac50fbac 8270if ${am_cv_val_LC_MESSAGES+:} false; then :
3185942a 8271 $as_echo_n "(cached) " >&6
f73dda09 8272else
ac50fbac 8273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8274/* end confdefs.h. */
b80f6443 8275#include <locale.h>
f73dda09
JA
8276int
8277main ()
8278{
b80f6443 8279return LC_MESSAGES
f73dda09
JA
8280 ;
8281 return 0;
8282}
8283_ACEOF
ac50fbac 8284if ac_fn_c_try_link "$LINENO"; then :
b80f6443 8285 am_cv_val_LC_MESSAGES=yes
f73dda09 8286else
ac50fbac 8287 am_cv_val_LC_MESSAGES=no
f73dda09 8288fi
ac50fbac
CR
8289rm -f core conftest.err conftest.$ac_objext \
8290 conftest$ac_exeext conftest.$ac_ext
f73dda09 8291fi
ac50fbac 8292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
3185942a 8293$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
b80f6443 8294 if test $am_cv_val_LC_MESSAGES = yes; then
f73dda09 8295
ac50fbac 8296$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
b80f6443
JA
8297
8298 fi
8299
8300 fi
f73dda09 8301
b80f6443
JA
8302 for ac_prog in bison
8303do
8304 # Extract the first word of "$ac_prog", so it can be a program name with args.
8305set dummy $ac_prog; ac_word=$2
ac50fbac 8306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185942a 8307$as_echo_n "checking for $ac_word... " >&6; }
ac50fbac 8308if ${ac_cv_prog_INTLBISON+:} false; then :
3185942a 8309 $as_echo_n "(cached) " >&6
f73dda09 8310else
b80f6443
JA
8311 if test -n "$INTLBISON"; then
8312 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
8313else
8314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8315for as_dir in $PATH
8316do
8317 IFS=$as_save_IFS
8318 test -z "$as_dir" && as_dir=.
ac50fbac
CR
8319 for ac_exec_ext in '' $ac_executable_extensions; do
8320 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
b80f6443 8321 ac_cv_prog_INTLBISON="$ac_prog"
ac50fbac 8322 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
b80f6443
JA
8323 break 2
8324 fi
8325done
ac50fbac 8326 done
3185942a 8327IFS=$as_save_IFS
f73dda09 8328
b80f6443
JA
8329fi
8330fi
8331INTLBISON=$ac_cv_prog_INTLBISON
8332if test -n "$INTLBISON"; then
ac50fbac 8333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5
3185942a 8334$as_echo "$INTLBISON" >&6; }
b80f6443 8335else
ac50fbac 8336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185942a 8337$as_echo "no" >&6; }
f73dda09
JA
8338fi
8339
3185942a 8340
b80f6443
JA
8341 test -n "$INTLBISON" && break
8342done
8343
8344 if test -z "$INTLBISON"; then
8345 ac_verc_fail=yes
8346 else
ac50fbac 8347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5
3185942a 8348$as_echo_n "checking version of bison... " >&6; }
b80f6443
JA
8349 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
8350 case $ac_prog_version in
8351 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
8352 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
8353 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
8354 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
8355 esac
ac50fbac 8356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
3185942a 8357$as_echo "$ac_prog_version" >&6; }
b80f6443
JA
8358 fi
8359 if test $ac_verc_fail = yes; then
8360 INTLBISON=:
8361 fi
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
ac50fbac 8378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
3185942a
JA
8379$as_echo_n "checking whether NLS is requested... " >&6; }
8380 # Check whether --enable-nls was given.
ac50fbac 8381if test "${enable_nls+set}" = set; then :
3185942a 8382 enableval=$enable_nls; USE_NLS=$enableval
b80f6443
JA
8383else
8384 USE_NLS=yes
3185942a
JA
8385fi
8386
ac50fbac 8387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
3185942a 8388$as_echo "$USE_NLS" >&6; }
b80f6443
JA
8389
8390
8391
8392
8393 BUILD_INCLUDED_LIBINTL=no
8394 USE_INCLUDED_LIBINTL=no
8395
8396 LIBINTL=
8397 LTLIBINTL=
8398 POSUB=
8399
8400 if test "$USE_NLS" = "yes"; then
8401 gt_use_preinstalled_gnugettext=no
8402
ac50fbac 8403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5
3185942a 8404$as_echo_n "checking whether included gettext is requested... " >&6; }
b80f6443 8405
3185942a 8406# Check whether --with-included-gettext was given.
ac50fbac 8407if test "${with_included_gettext+set}" = set; then :
3185942a 8408 withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
b80f6443
JA
8409else
8410 nls_cv_force_use_gnu_gettext=no
3185942a
JA
8411fi
8412
ac50fbac 8413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5
3185942a 8414$as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
b80f6443
JA
8415
8416 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8417 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8418
8419
8420
8421
8422
8423
ac50fbac 8424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
3185942a 8425$as_echo_n "checking for GNU gettext in libc... " >&6; }
ac50fbac 8426if ${gt_cv_func_gnugettext2_libc+:} false; then :
3185942a 8427 $as_echo_n "(cached) " >&6
f73dda09 8428else
ac50fbac 8429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 8430/* end confdefs.h. */
b80f6443
JA
8431#include <libintl.h>
8432extern int _nl_msg_cat_cntr;
8433extern int *_nl_domain_bindings;
f73dda09
JA
8434int
8435main ()
8436{
b80f6443
JA
8437bindtextdomain ("", "");
8438return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_domain_bindings
f73dda09
JA
8439 ;
8440 return 0;
8441}
8442_ACEOF
ac50fbac 8443if ac_fn_c_try_link "$LINENO"; then :
b80f6443 8444 gt_cv_func_gnugettext2_libc=yes
f73dda09 8445else
ac50fbac 8446 gt_cv_func_gnugettext2_libc=no
f73dda09 8447fi
ac50fbac
CR
8448rm -f core conftest.err conftest.$ac_objext \
8449 conftest$ac_exeext conftest.$ac_ext
f73dda09 8450fi
ac50fbac 8451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext2_libc" >&5
3185942a 8452$as_echo "$gt_cv_func_gnugettext2_libc" >&6; }
f73dda09 8453
b80f6443 8454 if test "$gt_cv_func_gnugettext2_libc" != "yes"; then
f73dda09 8455
f73dda09 8456
f73dda09 8457
b80f6443
JA
8458 use_additional=yes
8459
8460 acl_save_prefix="$prefix"
8461 prefix="$acl_final_prefix"
8462 acl_save_exec_prefix="$exec_prefix"
8463 exec_prefix="$acl_final_exec_prefix"
8464
8465 eval additional_includedir=\"$includedir\"
8466 eval additional_libdir=\"$libdir\"
8467
8468 exec_prefix="$acl_save_exec_prefix"
8469 prefix="$acl_save_prefix"
8470
8471
3185942a 8472# Check whether --with-libintl-prefix was given.
ac50fbac 8473if test "${with_libintl_prefix+set}" = set; then :
3185942a 8474 withval=$with_libintl_prefix;
b80f6443
JA
8475 if test "X$withval" = "Xno"; then
8476 use_additional=no
8477 else
8478 if test "X$withval" = "X"; then
8479
8480 acl_save_prefix="$prefix"
8481 prefix="$acl_final_prefix"
8482 acl_save_exec_prefix="$exec_prefix"
8483 exec_prefix="$acl_final_exec_prefix"
8484
8485 eval additional_includedir=\"$includedir\"
8486 eval additional_libdir=\"$libdir\"
8487
8488 exec_prefix="$acl_save_exec_prefix"
8489 prefix="$acl_save_prefix"
8490
8491 else
8492 additional_includedir="$withval/include"
8493 additional_libdir="$withval/lib"
8494 fi
8495 fi
8496
3185942a
JA
8497fi
8498
b80f6443
JA
8499 LIBINTL=
8500 LTLIBINTL=
8501 INCINTL=
8502 rpathdirs=
8503 ltrpathdirs=
8504 names_already_handled=
8505 names_next_round='intl '
8506 while test -n "$names_next_round"; do
8507 names_this_round="$names_next_round"
8508 names_next_round=
8509 for name in $names_this_round; do
8510 already_handled=
8511 for n in $names_already_handled; do
8512 if test "$n" = "$name"; then
8513 already_handled=yes
8514 break
8515 fi
8516 done
8517 if test -z "$already_handled"; then
8518 names_already_handled="$names_already_handled $name"
8519 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8520 eval value=\"\$HAVE_LIB$uppername\"
8521 if test -n "$value"; then
8522 if test "$value" = yes; then
8523 eval value=\"\$LIB$uppername\"
8524 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
8525 eval value=\"\$LTLIB$uppername\"
8526 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
8527 else
8528 :
8529 fi
8530 else
8531 found_dir=
8532 found_la=
8533 found_so=
8534 found_a=
8535 if test $use_additional = yes; then
ac50fbac 8536 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
b80f6443
JA
8537 found_dir="$additional_libdir"
8538 found_so="$additional_libdir/lib$name.$shlibext"
8539 if test -f "$additional_libdir/lib$name.la"; then
8540 found_la="$additional_libdir/lib$name.la"
8541 fi
8542 else
8543 if test -f "$additional_libdir/lib$name.$libext"; then
8544 found_dir="$additional_libdir"
8545 found_a="$additional_libdir/lib$name.$libext"
8546 if test -f "$additional_libdir/lib$name.la"; then
8547 found_la="$additional_libdir/lib$name.la"
8548 fi
8549 fi
8550 fi
8551 fi
8552 if test "X$found_dir" = "X"; then
8553 for x in $LDFLAGS $LTLIBINTL; do
8554
8555 acl_save_prefix="$prefix"
8556 prefix="$acl_final_prefix"
8557 acl_save_exec_prefix="$exec_prefix"
8558 exec_prefix="$acl_final_exec_prefix"
8559 eval x=\"$x\"
8560 exec_prefix="$acl_save_exec_prefix"
8561 prefix="$acl_save_prefix"
8562
8563 case "$x" in
8564 -L*)
8565 dir=`echo "X$x" | sed -e 's/^X-L//'`
ac50fbac 8566 if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
b80f6443
JA
8567 found_dir="$dir"
8568 found_so="$dir/lib$name.$shlibext"
8569 if test -f "$dir/lib$name.la"; then
8570 found_la="$dir/lib$name.la"
8571 fi
8572 else
8573 if test -f "$dir/lib$name.$libext"; then
8574 found_dir="$dir"
8575 found_a="$dir/lib$name.$libext"
8576 if test -f "$dir/lib$name.la"; then
8577 found_la="$dir/lib$name.la"
8578 fi
8579 fi
8580 fi
8581 ;;
8582 esac
8583 if test "X$found_dir" != "X"; then
8584 break
8585 fi
8586 done
8587 fi
8588 if test "X$found_dir" != "X"; then
8589 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
8590 if test "X$found_so" != "X"; then
8591 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8592 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8593 else
8594 haveit=
8595 for x in $ltrpathdirs; do
8596 if test "X$x" = "X$found_dir"; then
8597 haveit=yes
8598 break
8599 fi
8600 done
8601 if test -z "$haveit"; then
8602 ltrpathdirs="$ltrpathdirs $found_dir"
8603 fi
8604 if test "$hardcode_direct" = yes; then
8605 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8606 else
8607 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8608 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8609 haveit=
8610 for x in $rpathdirs; do
8611 if test "X$x" = "X$found_dir"; then
8612 haveit=yes
8613 break
8614 fi
8615 done
8616 if test -z "$haveit"; then
8617 rpathdirs="$rpathdirs $found_dir"
8618 fi
8619 else
8620 haveit=
8621 for x in $LDFLAGS $LIBINTL; do
8622
8623 acl_save_prefix="$prefix"
8624 prefix="$acl_final_prefix"
8625 acl_save_exec_prefix="$exec_prefix"
8626 exec_prefix="$acl_final_exec_prefix"
8627 eval x=\"$x\"
8628 exec_prefix="$acl_save_exec_prefix"
8629 prefix="$acl_save_prefix"
8630
8631 if test "X$x" = "X-L$found_dir"; then
8632 haveit=yes
8633 break
8634 fi
8635 done
8636 if test -z "$haveit"; then
8637 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
8638 fi
8639 if test "$hardcode_minus_L" != no; then
8640 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8641 else
8642 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
8643 fi
8644 fi
8645 fi
8646 fi
8647 else
8648 if test "X$found_a" != "X"; then
8649 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
8650 else
8651 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
8652 fi
8653 fi
8654 additional_includedir=
8655 case "$found_dir" in
8656 */lib | */lib/)
8657 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8658 additional_includedir="$basedir/include"
8659 ;;
8660 esac
8661 if test "X$additional_includedir" != "X"; then
8662 if test "X$additional_includedir" != "X/usr/include"; then
8663 haveit=
8664 if test "X$additional_includedir" = "X/usr/local/include"; then
8665 if test -n "$GCC"; then
8666 case $host_os in
8667 linux*) haveit=yes;;
8668 esac
8669 fi
8670 fi
8671 if test -z "$haveit"; then
8672 for x in $CPPFLAGS $INCINTL; do
8673
8674 acl_save_prefix="$prefix"
8675 prefix="$acl_final_prefix"
8676 acl_save_exec_prefix="$exec_prefix"
8677 exec_prefix="$acl_final_exec_prefix"
8678 eval x=\"$x\"
8679 exec_prefix="$acl_save_exec_prefix"
8680 prefix="$acl_save_prefix"
8681
8682 if test "X$x" = "X-I$additional_includedir"; then
8683 haveit=yes
8684 break
8685 fi
8686 done
8687 if test -z "$haveit"; then
8688 if test -d "$additional_includedir"; then
8689 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
8690 fi
8691 fi
8692 fi
8693 fi
8694 fi
8695 if test -n "$found_la"; then
8696 save_libdir="$libdir"
8697 case "$found_la" in
8698 */* | *\\*) . "$found_la" ;;
8699 *) . "./$found_la" ;;
8700 esac
8701 libdir="$save_libdir"
8702 for dep in $dependency_libs; do
8703 case "$dep" in
8704 -L*)
8705 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8706 if test "X$additional_libdir" != "X/usr/lib"; then
8707 haveit=
8708 if test "X$additional_libdir" = "X/usr/local/lib"; then
8709 if test -n "$GCC"; then
8710 case $host_os in
8711 linux*) haveit=yes;;
8712 esac
8713 fi
8714 fi
8715 if test -z "$haveit"; then
8716 haveit=
8717 for x in $LDFLAGS $LIBINTL; do
8718
8719 acl_save_prefix="$prefix"
8720 prefix="$acl_final_prefix"
8721 acl_save_exec_prefix="$exec_prefix"
8722 exec_prefix="$acl_final_exec_prefix"
8723 eval x=\"$x\"
8724 exec_prefix="$acl_save_exec_prefix"
8725 prefix="$acl_save_prefix"
8726
8727 if test "X$x" = "X-L$additional_libdir"; then
8728 haveit=yes
8729 break
8730 fi
8731 done
8732 if test -z "$haveit"; then
8733 if test -d "$additional_libdir"; then
8734 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
8735 fi
8736 fi
8737 haveit=
8738 for x in $LDFLAGS $LTLIBINTL; do
8739
8740 acl_save_prefix="$prefix"
8741 prefix="$acl_final_prefix"
8742 acl_save_exec_prefix="$exec_prefix"
8743 exec_prefix="$acl_final_exec_prefix"
8744 eval x=\"$x\"
8745 exec_prefix="$acl_save_exec_prefix"
8746 prefix="$acl_save_prefix"
8747
8748 if test "X$x" = "X-L$additional_libdir"; then
8749 haveit=yes
8750 break
8751 fi
8752 done
8753 if test -z "$haveit"; then
8754 if test -d "$additional_libdir"; then
8755 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
8756 fi
8757 fi
8758 fi
8759 fi
8760 ;;
8761 -R*)
8762 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8763 if test "$enable_rpath" != no; then
8764 haveit=
8765 for x in $rpathdirs; do
8766 if test "X$x" = "X$dir"; then
8767 haveit=yes
8768 break
8769 fi
8770 done
8771 if test -z "$haveit"; then
8772 rpathdirs="$rpathdirs $dir"
8773 fi
8774 haveit=
8775 for x in $ltrpathdirs; do
8776 if test "X$x" = "X$dir"; then
8777 haveit=yes
8778 break
8779 fi
8780 done
8781 if test -z "$haveit"; then
8782 ltrpathdirs="$ltrpathdirs $dir"
8783 fi
8784 fi
8785 ;;
8786 -l*)
8787 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8788 ;;
8789 *.la)
8790 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8791 ;;
8792 *)
8793 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
8794 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
8795 ;;
8796 esac
8797 done
8798 fi
8799 else
8800 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
8801 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
8802 fi
8803 fi
8804 fi
8805 done
8806 done
8807 if test "X$rpathdirs" != "X"; then
8808 if test -n "$hardcode_libdir_separator"; then
8809 alldirs=
8810 for found_dir in $rpathdirs; do
8811 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8812 done
8813 acl_save_libdir="$libdir"
8814 libdir="$alldirs"
8815 eval flag=\"$hardcode_libdir_flag_spec\"
8816 libdir="$acl_save_libdir"
8817 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
8818 else
8819 for found_dir in $rpathdirs; do
8820 acl_save_libdir="$libdir"
8821 libdir="$found_dir"
8822 eval flag=\"$hardcode_libdir_flag_spec\"
8823 libdir="$acl_save_libdir"
8824 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
8825 done
8826 fi
8827 fi
ac50fbac
CR
8828 if test "X$ltrpathdirs" != "X"; then
8829 for found_dir in $ltrpathdirs; do
8830 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
8831 done
8832 fi
3185942a 8833
ac50fbac
CR
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
8835$as_echo_n "checking for GNU gettext in libintl... " >&6; }
8836if ${gt_cv_func_gnugettext2_libintl+:} false; then :
3185942a
JA
8837 $as_echo_n "(cached) " >&6
8838else
ac50fbac
CR
8839 gt_save_CPPFLAGS="$CPPFLAGS"
8840 CPPFLAGS="$CPPFLAGS $INCINTL"
8841 gt_save_LIBS="$LIBS"
8842 LIBS="$LIBS $LIBINTL"
8843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 8844/* end confdefs.h. */
ac50fbac
CR
8845#include <libintl.h>
8846extern int _nl_msg_cat_cntr;
8847extern
8848#ifdef __cplusplus
8849"C"
8850#endif
8851const char *_nl_expand_alias ();
3185942a
JA
8852int
8853main ()
8854{
ac50fbac
CR
8855bindtextdomain ("", "");
8856return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0)
f73dda09
JA
8857 ;
8858 return 0;
8859}
8860_ACEOF
ac50fbac
CR
8861if ac_fn_c_try_link "$LINENO"; then :
8862 gt_cv_func_gnugettext2_libintl=yes
8863else
8864 gt_cv_func_gnugettext2_libintl=no
8865fi
8866rm -f core conftest.err conftest.$ac_objext \
8867 conftest$ac_exeext conftest.$ac_ext
8868 if test "$gt_cv_func_gnugettext2_libintl" != yes && test -n "$LIBICONV"; then
8869 LIBS="$LIBS $LIBICONV"
8870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 8871/* end confdefs.h. */
ac50fbac
CR
8872#include <libintl.h>
8873extern int _nl_msg_cat_cntr;
8874extern
8875#ifdef __cplusplus
8876"C"
8877#endif
8878const char *_nl_expand_alias ();
3185942a
JA
8879int
8880main ()
8881{
ac50fbac
CR
8882bindtextdomain ("", "");
8883return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0)
3185942a
JA
8884 ;
8885 return 0;
8886}
8887_ACEOF
ac50fbac
CR
8888if ac_fn_c_try_link "$LINENO"; then :
8889 LIBINTL="$LIBINTL $LIBICONV"
8890 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
8891 gt_cv_func_gnugettext2_libintl=yes
3185942a 8892
3185942a 8893fi
ac50fbac
CR
8894rm -f core conftest.err conftest.$ac_objext \
8895 conftest$ac_exeext conftest.$ac_ext
8896 fi
8897 CPPFLAGS="$gt_save_CPPFLAGS"
8898 LIBS="$gt_save_LIBS"
8899fi
8900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext2_libintl" >&5
8901$as_echo "$gt_cv_func_gnugettext2_libintl" >&6; }
8902 fi
3185942a 8903
ac50fbac
CR
8904 if test "$gt_cv_func_gnugettext2_libc" = "yes" \
8905 || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \
8906 && test "$PACKAGE" != gettext-runtime \
8907 && test "$PACKAGE" != gettext-tools; }; then
8908 gt_use_preinstalled_gnugettext=yes
8909 else
8910 LIBINTL=
8911 LTLIBINTL=
8912 INCINTL=
8913 fi
0628567a 8914
3185942a 8915
ac50fbac
CR
8916 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
8917 nls_cv_use_gnu_gettext=yes
8918 fi
8919 fi
3185942a 8920
ac50fbac
CR
8921 if test "$nls_cv_use_gnu_gettext" = "yes"; then
8922 BUILD_INCLUDED_LIBINTL=yes
8923 USE_INCLUDED_LIBINTL=yes
8924 LIBINTL="lib/intl/libintl.a $LIBICONV"
8925 LTLIBINTL="lib/intl/libintl.a $LTLIBICONV"
8926 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
8927 fi
f73dda09 8928
ac50fbac
CR
8929 if test "$gt_use_preinstalled_gnugettext" = "yes" \
8930 || test "$nls_cv_use_gnu_gettext" = "yes"; then
8931 CATOBJEXT=.gmo
8932 fi
ccc6cda3 8933
ccc6cda3 8934
ac50fbac
CR
8935 if test "$gt_use_preinstalled_gnugettext" = "yes" \
8936 || test "$nls_cv_use_gnu_gettext" = "yes"; then
b80f6443 8937
ac50fbac 8938$as_echo "#define ENABLE_NLS 1" >>confdefs.h
b80f6443 8939
ac50fbac
CR
8940 else
8941 USE_NLS=no
8942 fi
8943 fi
ccc6cda3 8944
ac50fbac
CR
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
8946$as_echo_n "checking whether to use NLS... " >&6; }
8947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
8948$as_echo "$USE_NLS" >&6; }
8949 if test "$USE_NLS" = "yes"; then
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
8951$as_echo_n "checking where the gettext function comes from... " >&6; }
8952 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
8953 if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
8954 gt_source="external libintl"
8955 else
8956 gt_source="libc"
8957 fi
8958 else
8959 gt_source="included intl directory"
8960 fi
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
8962$as_echo "$gt_source" >&6; }
8963 fi
f73dda09 8964
ac50fbac 8965 if test "$USE_NLS" = "yes"; then
f73dda09 8966
ac50fbac
CR
8967 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
8968 if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
8969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
8970$as_echo_n "checking how to link with libintl... " >&6; }
8971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
8972$as_echo "$LIBINTL" >&6; }
0628567a 8973
ac50fbac
CR
8974 for element in $INCINTL; do
8975 haveit=
8976 for x in $CPPFLAGS; do
3185942a 8977
ac50fbac
CR
8978 acl_save_prefix="$prefix"
8979 prefix="$acl_final_prefix"
8980 acl_save_exec_prefix="$exec_prefix"
8981 exec_prefix="$acl_final_exec_prefix"
8982 eval x=\"$x\"
8983 exec_prefix="$acl_save_exec_prefix"
8984 prefix="$acl_save_prefix"
ccc6cda3 8985
ac50fbac
CR
8986 if test "X$x" = "X$element"; then
8987 haveit=yes
8988 break
8989 fi
8990 done
8991 if test -z "$haveit"; then
8992 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8993 fi
8994 done
ccc6cda3 8995
ac50fbac 8996 fi
b80f6443 8997
f73dda09 8998
ac50fbac 8999$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
f73dda09 9000
f73dda09 9001
ac50fbac 9002$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
0628567a 9003
ac50fbac 9004 fi
3185942a 9005
ac50fbac
CR
9006 POSUB=po
9007 fi
ccc6cda3 9008
ac50fbac
CR
9009
9010 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
9011 BUILD_INCLUDED_LIBINTL=yes
9012 fi
ccc6cda3 9013
b80f6443 9014
ac50fbac
CR
9015
9016
9017
9018 nls_cv_header_intl=
9019 nls_cv_header_libgt=
9020
9021 DATADIRNAME=share
9022
9023
9024 INSTOBJEXT=.mo
9025
9026
9027 GENCAT=gencat
9028
9029
9030 if test "$USE_INCLUDED_LIBINTL" = yes; then
9031 INTLOBJS="\$(GETTOBJS)"
9032 fi
9033
9034
9035 INTL_LIBTOOL_SUFFIX_PREFIX=
9036
9037
9038
9039 INTLLIBS="$LIBINTL"
9040
9041
9042
9043
9044
9045
9046
9047ac_header_dirent=no
9048for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9049 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
9051$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
9052if eval \${$as_ac_Header+:} false; then :
3185942a 9053 $as_echo_n "(cached) " >&6
ccc6cda3 9054else
ac50fbac 9055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9056/* end confdefs.h. */
ccc6cda3 9057#include <sys/types.h>
ac50fbac 9058#include <$ac_hdr>
f73dda09
JA
9059
9060int
9061main ()
9062{
ac50fbac
CR
9063if ((DIR *) 0)
9064return 0;
f73dda09
JA
9065 ;
9066 return 0;
9067}
9068_ACEOF
ac50fbac
CR
9069if ac_fn_c_try_compile "$LINENO"; then :
9070 eval "$as_ac_Header=yes"
ccc6cda3 9071else
ac50fbac 9072 eval "$as_ac_Header=no"
ccc6cda3 9073fi
3185942a 9074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 9075fi
ac50fbac
CR
9076eval ac_res=\$$as_ac_Header
9077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9078$as_echo "$ac_res" >&6; }
9079if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9080 cat >>confdefs.h <<_ACEOF
9081#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
b80f6443
JA
9082_ACEOF
9083
ac50fbac
CR
9084ac_header_dirent=$ac_hdr; break
9085fi
ccc6cda3 9086
ac50fbac
CR
9087done
9088# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9089if test $ac_header_dirent = dirent.h; then
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9091$as_echo_n "checking for library containing opendir... " >&6; }
9092if ${ac_cv_search_opendir+:} false; then :
17345e5a
JA
9093 $as_echo_n "(cached) " >&6
9094else
ac50fbac
CR
9095 ac_func_search_save_LIBS=$LIBS
9096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a
JA
9097/* end confdefs.h. */
9098
ac50fbac
CR
9099/* Override any GCC internal prototype to avoid an error.
9100 Use char because int might match the return type of a GCC
9101 builtin and then its argument prototype would still apply. */
9102#ifdef __cplusplus
9103extern "C"
9104#endif
9105char opendir ();
17345e5a
JA
9106int
9107main ()
9108{
ac50fbac 9109return opendir ();
17345e5a
JA
9110 ;
9111 return 0;
9112}
9113_ACEOF
ac50fbac
CR
9114for ac_lib in '' dir; do
9115 if test -z "$ac_lib"; then
9116 ac_res="none required"
9117 else
9118 ac_res=-l$ac_lib
9119 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9120 fi
9121 if ac_fn_c_try_link "$LINENO"; then :
9122 ac_cv_search_opendir=$ac_res
9123fi
9124rm -f core conftest.err conftest.$ac_objext \
9125 conftest$ac_exeext
9126 if ${ac_cv_search_opendir+:} false; then :
9127 break
9128fi
9129done
9130if ${ac_cv_search_opendir+:} false; then :
17345e5a 9131
ac50fbac
CR
9132else
9133 ac_cv_search_opendir=no
9134fi
9135rm conftest.$ac_ext
9136LIBS=$ac_func_search_save_LIBS
17345e5a 9137fi
ac50fbac
CR
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9139$as_echo "$ac_cv_search_opendir" >&6; }
9140ac_res=$ac_cv_search_opendir
9141if test "$ac_res" != no; then :
9142 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17345e5a 9143
17345e5a 9144fi
ac50fbac
CR
9145
9146else
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
9148$as_echo_n "checking for library containing opendir... " >&6; }
9149if ${ac_cv_search_opendir+:} false; then :
17345e5a
JA
9150 $as_echo_n "(cached) " >&6
9151else
ac50fbac
CR
9152 ac_func_search_save_LIBS=$LIBS
9153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a 9154/* end confdefs.h. */
ac50fbac
CR
9155
9156/* Override any GCC internal prototype to avoid an error.
9157 Use char because int might match the return type of a GCC
9158 builtin and then its argument prototype would still apply. */
9159#ifdef __cplusplus
9160extern "C"
9161#endif
9162char opendir ();
17345e5a
JA
9163int
9164main ()
9165{
ac50fbac 9166return opendir ();
17345e5a
JA
9167 ;
9168 return 0;
9169}
9170_ACEOF
ac50fbac
CR
9171for ac_lib in '' x; do
9172 if test -z "$ac_lib"; then
9173 ac_res="none required"
9174 else
9175 ac_res=-l$ac_lib
9176 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9177 fi
9178 if ac_fn_c_try_link "$LINENO"; then :
9179 ac_cv_search_opendir=$ac_res
9180fi
9181rm -f core conftest.err conftest.$ac_objext \
9182 conftest$ac_exeext
9183 if ${ac_cv_search_opendir+:} false; then :
9184 break
17345e5a 9185fi
ac50fbac
CR
9186done
9187if ${ac_cv_search_opendir+:} false; then :
17345e5a 9188
17345e5a 9189else
ac50fbac 9190 ac_cv_search_opendir=no
17345e5a 9191fi
ac50fbac
CR
9192rm conftest.$ac_ext
9193LIBS=$ac_func_search_save_LIBS
17345e5a 9194fi
ac50fbac
CR
9195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
9196$as_echo "$ac_cv_search_opendir" >&6; }
9197ac_res=$ac_cv_search_opendir
9198if test "$ac_res" != no; then :
9199 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17345e5a
JA
9200
9201fi
9202
9203fi
9204
ac50fbac
CR
9205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9206$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9207if ${ac_cv_header_time+:} false; then :
3185942a 9208 $as_echo_n "(cached) " >&6
f73dda09 9209else
ac50fbac 9210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9211/* end confdefs.h. */
ac50fbac
CR
9212#include <sys/types.h>
9213#include <sys/time.h>
9214#include <time.h>
b80f6443 9215
f73dda09
JA
9216int
9217main ()
9218{
ac50fbac
CR
9219if ((struct tm *) 0)
9220return 0;
f73dda09
JA
9221 ;
9222 return 0;
9223}
9224_ACEOF
ac50fbac
CR
9225if ac_fn_c_try_compile "$LINENO"; then :
9226 ac_cv_header_time=yes
f73dda09 9227else
ac50fbac
CR
9228 ac_cv_header_time=no
9229fi
9230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9231fi
9232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9233$as_echo "$ac_cv_header_time" >&6; }
9234if test $ac_cv_header_time = yes; then
9235
9236$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
0628567a 9237
f73dda09 9238fi
3185942a 9239
0628567a 9240
b80f6443 9241
ac50fbac
CR
9242 for ac_header in inttypes.h
9243do :
9244 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
9245if test "x$ac_cv_header_inttypes_h" = xyes; then :
9246 cat >>confdefs.h <<_ACEOF
9247#define HAVE_INTTYPES_H 1
9248_ACEOF
9249
9250fi
9251
9252done
9253
9254
9255
9256for ac_header in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
9257 memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
9258 stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \
9259 regex.h syslog.h ulimit.h
9260do :
9261 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9262ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9263if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9264 cat >>confdefs.h <<_ACEOF
9265#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
0628567a 9266_ACEOF
b80f6443 9267
ac50fbac
CR
9268fi
9269
9270done
9271
a0c0a00f
CR
9272for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h sys/ioctl.h \
9273 sys/param.h sys/socket.h sys/stat.h \
ac50fbac
CR
9274 sys/time.h sys/times.h sys/types.h sys/wait.h
9275do :
9276 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9277ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9278if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9279 cat >>confdefs.h <<_ACEOF
9280#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
f73dda09 9281_ACEOF
0628567a 9282
f73dda09 9283fi
3185942a 9284
ac50fbac
CR
9285done
9286
9287for ac_header in netinet/in.h arpa/inet.h
9288do :
9289 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9290ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9291if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9292 cat >>confdefs.h <<_ACEOF
9293#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9294_ACEOF
0628567a 9295
b80f6443 9296fi
3185942a 9297
ac50fbac
CR
9298done
9299
9300
9301ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "
9302#if HAVE_SYS_STREAM_H
9303# include <sys/stream.h>
9304#endif
9305
9306"
9307if test "x$ac_cv_header_sys_ptem_h" = xyes; then :
9308
ccc6cda3 9309fi
3185942a 9310
ac50fbac
CR
9311
9312
a0c0a00f
CR
9313ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
9314#if HAVE_SYS_TIME_H
9315# include <sys/time.h>
9316#endif
9317
9318"
9319if test "x$ac_cv_header_sys_resource_h" = xyes; then :
9320 $as_echo "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
9321
9322fi
9323
9324
9325
ac50fbac
CR
9326# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9327# for constant arguments. Useless!
9328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9329$as_echo_n "checking for working alloca.h... " >&6; }
9330if ${ac_cv_working_alloca_h+:} false; then :
9331 $as_echo_n "(cached) " >&6
9332else
9333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9334/* end confdefs.h. */
ac50fbac 9335#include <alloca.h>
f73dda09
JA
9336int
9337main ()
9338{
ac50fbac
CR
9339char *p = (char *) alloca (2 * sizeof (int));
9340 if (p) return 0;
f73dda09
JA
9341 ;
9342 return 0;
9343}
9344_ACEOF
ac50fbac
CR
9345if ac_fn_c_try_link "$LINENO"; then :
9346 ac_cv_working_alloca_h=yes
f73dda09 9347else
ac50fbac
CR
9348 ac_cv_working_alloca_h=no
9349fi
9350rm -f core conftest.err conftest.$ac_objext \
9351 conftest$ac_exeext conftest.$ac_ext
9352fi
9353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9354$as_echo "$ac_cv_working_alloca_h" >&6; }
9355if test $ac_cv_working_alloca_h = yes; then
9356
9357$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
0628567a 9358
f73dda09 9359fi
3185942a 9360
ac50fbac
CR
9361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9362$as_echo_n "checking for alloca... " >&6; }
9363if ${ac_cv_func_alloca_works+:} false; then :
9364 $as_echo_n "(cached) " >&6
f73dda09 9365else
ac50fbac 9366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9367/* end confdefs.h. */
ac50fbac
CR
9368#ifdef __GNUC__
9369# define alloca __builtin_alloca
9370#else
9371# ifdef _MSC_VER
9372# include <malloc.h>
9373# define alloca _alloca
9374# else
9375# ifdef HAVE_ALLOCA_H
9376# include <alloca.h>
9377# else
9378# ifdef _AIX
9379 #pragma alloca
9380# else
9381# ifndef alloca /* predefined by HP cc +Olibcalls */
9382void *alloca (size_t);
9383# endif
9384# endif
9385# endif
9386# endif
9387#endif
9388
f73dda09
JA
9389int
9390main ()
9391{
ac50fbac
CR
9392char *p = (char *) alloca (1);
9393 if (p) return 0;
f73dda09
JA
9394 ;
9395 return 0;
9396}
9397_ACEOF
ac50fbac
CR
9398if ac_fn_c_try_link "$LINENO"; then :
9399 ac_cv_func_alloca_works=yes
ccc6cda3 9400else
ac50fbac 9401 ac_cv_func_alloca_works=no
f73dda09 9402fi
ac50fbac
CR
9403rm -f core conftest.err conftest.$ac_objext \
9404 conftest$ac_exeext conftest.$ac_ext
f73dda09 9405fi
ac50fbac
CR
9406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9407$as_echo "$ac_cv_func_alloca_works" >&6; }
3185942a 9408
ac50fbac 9409if test $ac_cv_func_alloca_works = yes; then
3185942a 9410
ac50fbac 9411$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
3185942a 9412
ac50fbac
CR
9413else
9414 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9415# that cause trouble. Some versions do not even contain alloca or
9416# contain a buggy version. If you still want to use their alloca,
9417# use ar to extract alloca.o from them instead of compiling alloca.c.
ccc6cda3 9418
ac50fbac 9419ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
b80f6443 9420
ac50fbac
CR
9421$as_echo "#define C_ALLOCA 1" >>confdefs.h
9422
9423
9424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
9425$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
9426if ${ac_cv_os_cray+:} false; then :
3185942a 9427 $as_echo_n "(cached) " >&6
f73dda09 9428else
ac50fbac 9429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9430/* end confdefs.h. */
ac50fbac
CR
9431#if defined CRAY && ! defined CRAY2
9432webecray
9433#else
9434wenotbecray
9435#endif
3185942a 9436
f73dda09 9437_ACEOF
ac50fbac
CR
9438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9439 $EGREP "webecray" >/dev/null 2>&1; then :
9440 ac_cv_os_cray=yes
9441else
9442 ac_cv_os_cray=no
9443fi
9444rm -f conftest*
9445
9446fi
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
9448$as_echo "$ac_cv_os_cray" >&6; }
9449if test $ac_cv_os_cray = yes; then
9450 for ac_func in _getb67 GETB67 getb67; do
9451 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9452ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9453if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9454
9455cat >>confdefs.h <<_ACEOF
9456#define CRAY_STACKSEG_END $ac_func
0628567a 9457_ACEOF
ac50fbac
CR
9458
9459 break
9460fi
9461
9462 done
9463fi
9464
9465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9466$as_echo_n "checking stack direction for C alloca... " >&6; }
9467if ${ac_cv_c_stack_direction+:} false; then :
9468 $as_echo_n "(cached) " >&6
9469else
9470 if test "$cross_compiling" = yes; then :
9471 ac_cv_c_stack_direction=0
9472else
9473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9474/* end confdefs.h. */
f73dda09
JA
9475$ac_includes_default
9476int
ac50fbac 9477find_stack_direction (int *addr, int depth)
f73dda09 9478{
ac50fbac
CR
9479 int dir, dummy = 0;
9480 if (! addr)
9481 addr = &dummy;
9482 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
9483 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
9484 return dir + dummy;
9485}
b80f6443 9486
ac50fbac
CR
9487int
9488main (int argc, char **argv)
9489{
9490 return find_stack_direction (0, argc + !argv + 20) < 0;
f73dda09
JA
9491}
9492_ACEOF
ac50fbac
CR
9493if ac_fn_c_try_run "$LINENO"; then :
9494 ac_cv_c_stack_direction=1
f73dda09 9495else
ac50fbac
CR
9496 ac_cv_c_stack_direction=-1
9497fi
9498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9499 conftest.$ac_objext conftest.beam conftest.$ac_ext
9500fi
9501
9502fi
9503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9504$as_echo "$ac_cv_c_stack_direction" >&6; }
9505cat >>confdefs.h <<_ACEOF
9506#define STACK_DIRECTION $ac_cv_c_stack_direction
9507_ACEOF
9508
0628567a 9509
a0c0a00f
CR
9510fi
9511
9512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9513$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9514if ${ac_cv_type_uid_t+:} false; then :
9515 $as_echo_n "(cached) " >&6
9516else
9517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9518/* end confdefs.h. */
9519#include <sys/types.h>
9520
9521_ACEOF
9522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9523 $EGREP "uid_t" >/dev/null 2>&1; then :
9524 ac_cv_type_uid_t=yes
9525else
9526 ac_cv_type_uid_t=no
9527fi
9528rm -f conftest*
9529
9530fi
9531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9532$as_echo "$ac_cv_type_uid_t" >&6; }
9533if test $ac_cv_type_uid_t = no; then
9534
9535$as_echo "#define uid_t int" >>confdefs.h
9536
9537
9538$as_echo "#define gid_t int" >>confdefs.h
9539
9540fi
9541
9542for ac_header in unistd.h
9543do :
9544 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
9545if test "x$ac_cv_header_unistd_h" = xyes; then :
9546 cat >>confdefs.h <<_ACEOF
9547#define HAVE_UNISTD_H 1
9548_ACEOF
9549
9550fi
9551
9552done
9553
9554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9555$as_echo_n "checking for working chown... " >&6; }
9556if ${ac_cv_func_chown_works+:} false; then :
9557 $as_echo_n "(cached) " >&6
9558else
9559 if test "$cross_compiling" = yes; then :
9560 ac_cv_func_chown_works=no
9561else
9562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9563/* end confdefs.h. */
9564$ac_includes_default
9565#include <fcntl.h>
9566
9567int
9568main ()
9569{
9570 char *f = "conftest.chown";
9571 struct stat before, after;
9572
9573 if (creat (f, 0600) < 0)
9574 return 1;
9575 if (stat (f, &before) < 0)
9576 return 1;
9577 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9578 return 1;
9579 if (stat (f, &after) < 0)
9580 return 1;
9581 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9582
9583 ;
9584 return 0;
9585}
9586_ACEOF
9587if ac_fn_c_try_run "$LINENO"; then :
9588 ac_cv_func_chown_works=yes
9589else
9590 ac_cv_func_chown_works=no
9591fi
9592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9593 conftest.$ac_objext conftest.beam conftest.$ac_ext
9594fi
9595
9596rm -f conftest.chown
9597
9598fi
9599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9600$as_echo "$ac_cv_func_chown_works" >&6; }
9601if test $ac_cv_func_chown_works = yes; then
9602
9603$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9604
f73dda09 9605fi
3185942a 9606
ac50fbac
CR
9607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
9608$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
9609if ${ac_cv_func_getpgrp_void+:} false; then :
9610 $as_echo_n "(cached) " >&6
f73dda09 9611else
ac50fbac
CR
9612 # Use it with a single arg.
9613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9614/* end confdefs.h. */
b80f6443
JA
9615$ac_includes_default
9616int
9617main ()
9618{
ac50fbac 9619getpgrp (0);
b80f6443
JA
9620 ;
9621 return 0;
9622}
9623_ACEOF
ac50fbac
CR
9624if ac_fn_c_try_compile "$LINENO"; then :
9625 ac_cv_func_getpgrp_void=no
9626else
9627 ac_cv_func_getpgrp_void=yes
9628fi
9629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9630
9631fi
9632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
9633$as_echo "$ac_cv_func_getpgrp_void" >&6; }
9634if test $ac_cv_func_getpgrp_void = yes; then
9635
9636$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
9637
9638fi
9639
9640if ${ac_cv_func_setvbuf_reversed+:} false; then :
9641 $as_echo_n "(cached) " >&6
9642else
9643 ac_cv_func_setvbuf_reversed=no
9644fi
9645
9646
9647for ac_func in vprintf
9648do :
9649 ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
9650if test "x$ac_cv_func_vprintf" = xyes; then :
9651 cat >>confdefs.h <<_ACEOF
9652#define HAVE_VPRINTF 1
0628567a 9653_ACEOF
ac50fbac
CR
9654
9655ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
9656if test "x$ac_cv_func__doprnt" = xyes; then :
9657
9658$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
9659
9660fi
9661
9662fi
9663done
9664
9665
9666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5
9667$as_echo_n "checking for working strcoll... " >&6; }
9668if ${ac_cv_func_strcoll_works+:} false; then :
9669 $as_echo_n "(cached) " >&6
9670else
9671 if test "$cross_compiling" = yes; then :
9672 ac_cv_func_strcoll_works=no
9673else
9674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9675/* end confdefs.h. */
f73dda09
JA
9676$ac_includes_default
9677int
9678main ()
9679{
ac50fbac
CR
9680return (strcoll ("abc", "def") >= 0 ||
9681 strcoll ("ABC", "DEF") >= 0 ||
9682 strcoll ("123", "456") >= 0)
f73dda09
JA
9683 ;
9684 return 0;
9685}
9686_ACEOF
ac50fbac
CR
9687if ac_fn_c_try_run "$LINENO"; then :
9688 ac_cv_func_strcoll_works=yes
f73dda09 9689else
ac50fbac
CR
9690 ac_cv_func_strcoll_works=no
9691fi
9692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9693 conftest.$ac_objext conftest.beam conftest.$ac_ext
9694fi
0628567a 9695
f73dda09 9696fi
ac50fbac
CR
9697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5
9698$as_echo "$ac_cv_func_strcoll_works" >&6; }
9699if test $ac_cv_func_strcoll_works = yes; then
3185942a 9700
ac50fbac 9701$as_echo "#define HAVE_STRCOLL 1" >>confdefs.h
0628567a 9702
b80f6443 9703fi
3185942a 9704
ac50fbac
CR
9705
9706
9707if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then
9708 MALLOC_TARGET=alloca
9709 MALLOC_SRC=alloca.c
9710
9711 MALLOC_LIB='-lmalloc'
9712 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
9713 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
9714 MALLOC_DEP='$(MALLOC_LIBRARY)'
ccc6cda3 9715fi
3185942a 9716
ac50fbac
CR
9717if test "$ac_cv_func_vprintf" = no; then
9718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of vprintf in stdio.h" >&5
9719$as_echo_n "checking for declaration of vprintf in stdio.h... " >&6; }
9720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9721/* end confdefs.h. */
9722#include <stdio.h>
9723
0628567a 9724_ACEOF
ac50fbac
CR
9725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9726 $EGREP "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then :
9727 ac_cv_func_vprintf=yes
9728fi
9729rm -f conftest*
9730
9731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vprintf" >&5
9732$as_echo "$ac_cv_func_vprintf" >&6; }
9733 if test $ac_cv_func_vprintf = yes; then
9734 $as_echo "#define HAVE_VPRINTF 1" >>confdefs.h
9735
9736 fi
9737fi
9738
9739if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then
9740 case " $LIBOBJS " in
9741 *" vprint.$ac_objext "* ) ;;
9742 *) LIBOBJS="$LIBOBJS vprint.$ac_objext"
9743 ;;
9744esac
9745
9746fi
9747
9748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9749$as_echo_n "checking return type of signal handlers... " >&6; }
9750if ${ac_cv_type_signal+:} false; then :
9751 $as_echo_n "(cached) " >&6
9752else
9753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 9754/* end confdefs.h. */
ac50fbac
CR
9755#include <sys/types.h>
9756#include <signal.h>
9757
f73dda09
JA
9758int
9759main ()
9760{
ac50fbac 9761return *(signal (0, 0)) (0) == 1;
f73dda09
JA
9762 ;
9763 return 0;
9764}
9765_ACEOF
ac50fbac
CR
9766if ac_fn_c_try_compile "$LINENO"; then :
9767 ac_cv_type_signal=int
f73dda09 9768else
ac50fbac
CR
9769 ac_cv_type_signal=void
9770fi
9771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9772fi
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9774$as_echo "$ac_cv_type_signal" >&6; }
9775
9776cat >>confdefs.h <<_ACEOF
9777#define RETSIGTYPE $ac_cv_type_signal
9778_ACEOF
9779
9780
9781
9782ac_fn_c_check_func "$LINENO" "__setostype" "ac_cv_func___setostype"
9783if test "x$ac_cv_func___setostype" = xyes; then :
9784 $as_echo "#define HAVE_SETOSTYPE 1" >>confdefs.h
0628567a 9785
f73dda09 9786fi
3185942a 9787
ac50fbac
CR
9788ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
9789if test "x$ac_cv_func_wait3" = xyes; then :
9790 $as_echo "#define HAVE_WAIT3 1" >>confdefs.h
9791
9792fi
9793
9794
9795ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
9796if test "x$ac_cv_func_mkfifo" = xyes; then :
9797 $as_echo "#define HAVE_MKFIFO 1" >>confdefs.h
9798
9799else
9800 $as_echo "#define MKFIFO_MISSING 1" >>confdefs.h
9801
9802fi
9803
9804
9805for ac_func in dup2 eaccess fcntl getdtablesize getgroups gethostname \
9806 getpagesize getpeername getrlimit getrusage gettimeofday \
a0c0a00f 9807 kill killpg lstat pselect readlink sbrk select setdtablesize \
ac50fbac
CR
9808 setitimer tcgetpgrp uname ulimit waitpid
9809do :
9810 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9811ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9812if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9813 cat >>confdefs.h <<_ACEOF
9814#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9815_ACEOF
9816
9817fi
f73dda09 9818done
ac50fbac
CR
9819
9820ac_fn_c_check_func "$LINENO" "rename" "ac_cv_func_rename"
9821if test "x$ac_cv_func_rename" = xyes; then :
9822 $as_echo "#define HAVE_RENAME 1" >>confdefs.h
9823
ccc6cda3 9824else
ac50fbac
CR
9825 case " $LIBOBJS " in
9826 *" rename.$ac_objext "* ) ;;
9827 *) LIBOBJS="$LIBOBJS rename.$ac_objext"
9828 ;;
9829esac
9830
9831fi
9832
9833
9834
9835for ac_func in bcopy bzero confstr faccessat fnmatch \
9836 getaddrinfo gethostbyname getservbyname getservent inet_aton \
a0c0a00f 9837 imaxdiv memmove pathconf putenv raise random regcomp regexec \
ac50fbac
CR
9838 setenv setlinebuf setlocale setvbuf siginterrupt strchr \
9839 sysconf syslog tcgetattr times ttyname tzset unsetenv
9840do :
9841 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9842ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9843if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9844 cat >>confdefs.h <<_ACEOF
9845#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
0628567a 9846_ACEOF
b80f6443 9847
ac50fbac
CR
9848fi
9849done
b80f6443 9850
ac50fbac
CR
9851
9852for ac_func in vasprintf asprintf
9853do :
9854 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9855ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9856if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9857 cat >>confdefs.h <<_ACEOF
9858#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f73dda09 9859_ACEOF
0628567a 9860
ccc6cda3 9861fi
ac50fbac
CR
9862done
9863
9864for ac_func in isascii isblank isgraph isprint isspace isxdigit
9865do :
9866 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9867ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9868if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9869 cat >>confdefs.h <<_ACEOF
9870#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9871_ACEOF
9872
ccc6cda3 9873fi
ac50fbac
CR
9874done
9875
9876for ac_func in getpwent getpwnam getpwuid
9877do :
9878 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9879ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9880if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9881 cat >>confdefs.h <<_ACEOF
9882#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9883_ACEOF
9884
ccc6cda3 9885fi
ac50fbac 9886done
ccc6cda3 9887
a0c0a00f
CR
9888for ac_func in mkstemp
9889do :
9890 ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
9891if test "x$ac_cv_func_mkstemp" = xyes; then :
9892 cat >>confdefs.h <<_ACEOF
9893#define HAVE_MKSTEMP 1
9894_ACEOF
9895
9896fi
9897done
9898
ac50fbac
CR
9899ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
9900if test "x$ac_cv_func_getcwd" = xyes; then :
9901 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
b80f6443 9902
ac50fbac
CR
9903else
9904 case " $LIBOBJS " in
9905 *" getcwd.$ac_objext "* ) ;;
9906 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
9907 ;;
9908esac
3185942a 9909
ac50fbac 9910fi
0628567a 9911
ac50fbac
CR
9912ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
9913if test "x$ac_cv_func_memset" = xyes; then :
9914 $as_echo "#define HAVE_MEMSET 1" >>confdefs.h
f73dda09 9915
f73dda09 9916else
ac50fbac
CR
9917 case " $LIBOBJS " in
9918 *" memset.$ac_objext "* ) ;;
9919 *) LIBOBJS="$LIBOBJS memset.$ac_objext"
9920 ;;
3185942a 9921esac
b80f6443 9922
ac50fbac
CR
9923fi
9924
9925
9926ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
9927if test "x$ac_cv_func_strcasecmp" = xyes; then :
9928 $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h
9929
f73dda09 9930else
ac50fbac
CR
9931 case " $LIBOBJS " in
9932 *" strcasecmp.$ac_objext "* ) ;;
9933 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
9934 ;;
9935esac
0628567a 9936
f73dda09 9937fi
3185942a 9938
ac50fbac
CR
9939ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
9940if test "x$ac_cv_func_strcasestr" = xyes; then :
9941 $as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h
9942
f73dda09 9943else
ac50fbac
CR
9944 case " $LIBOBJS " in
9945 *" strcasestr.$ac_objext "* ) ;;
9946 *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext"
9947 ;;
9948esac
0628567a 9949
ac50fbac 9950fi
b80f6443 9951
ac50fbac
CR
9952ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
9953if test "x$ac_cv_func_strerror" = xyes; then :
9954 $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
b80f6443 9955
f73dda09 9956else
ac50fbac
CR
9957 case " $LIBOBJS " in
9958 *" strerror.$ac_objext "* ) ;;
9959 *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
9960 ;;
9961esac
0628567a 9962
f73dda09 9963fi
3185942a 9964
ac50fbac
CR
9965ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
9966if test "x$ac_cv_func_strftime" = xyes; then :
9967 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
9968
b80f6443 9969else
ac50fbac
CR
9970 case " $LIBOBJS " in
9971 *" strftime.$ac_objext "* ) ;;
9972 *) LIBOBJS="$LIBOBJS strftime.$ac_objext"
9973 ;;
9974esac
0628567a 9975
b80f6443 9976fi
3185942a 9977
ac50fbac
CR
9978ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
9979if test "x$ac_cv_func_strnlen" = xyes; then :
9980 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
9981
9982else
9983 case " $LIBOBJS " in
9984 *" strnlen.$ac_objext "* ) ;;
9985 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
9986 ;;
9987esac
9988
ccc6cda3 9989fi
3185942a 9990
ac50fbac
CR
9991ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
9992if test "x$ac_cv_func_strpbrk" = xyes; then :
9993 $as_echo "#define HAVE_STRPBRK 1" >>confdefs.h
b80f6443 9994
f73dda09 9995else
ac50fbac
CR
9996 case " $LIBOBJS " in
9997 *" strpbrk.$ac_objext "* ) ;;
9998 *) LIBOBJS="$LIBOBJS strpbrk.$ac_objext"
9999 ;;
10000esac
0628567a 10001
f73dda09 10002fi
3185942a 10003
ac50fbac
CR
10004ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
10005if test "x$ac_cv_func_strstr" = xyes; then :
10006 $as_echo "#define HAVE_STRSTR 1" >>confdefs.h
10007
ccc6cda3 10008else
ac50fbac
CR
10009 case " $LIBOBJS " in
10010 *" strstr.$ac_objext "* ) ;;
10011 *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
10012 ;;
10013esac
b80f6443 10014
ac50fbac 10015fi
b80f6443 10016
ac50fbac
CR
10017
10018ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod"
10019if test "x$ac_cv_func_strtod" = xyes; then :
10020 $as_echo "#define HAVE_STRTOD 1" >>confdefs.h
10021
10022else
10023 case " $LIBOBJS " in
10024 *" strtod.$ac_objext "* ) ;;
10025 *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
10026 ;;
3185942a 10027esac
ac50fbac
CR
10028
10029fi
10030
10031ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
10032if test "x$ac_cv_func_strtol" = xyes; then :
10033 $as_echo "#define HAVE_STRTOL 1" >>confdefs.h
10034
10035else
10036 case " $LIBOBJS " in
10037 *" strtol.$ac_objext "* ) ;;
10038 *) LIBOBJS="$LIBOBJS strtol.$ac_objext"
10039 ;;
3185942a 10040esac
ac50fbac
CR
10041
10042fi
10043
10044ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
10045if test "x$ac_cv_func_strtoul" = xyes; then :
10046 $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h
10047
ccc6cda3 10048else
ac50fbac
CR
10049 case " $LIBOBJS " in
10050 *" strtoul.$ac_objext "* ) ;;
10051 *) LIBOBJS="$LIBOBJS strtoul.$ac_objext"
10052 ;;
10053esac
0628567a 10054
ccc6cda3 10055fi
ac50fbac
CR
10056
10057ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
10058if test "x$ac_cv_func_strtoll" = xyes; then :
10059 $as_echo "#define HAVE_STRTOLL 1" >>confdefs.h
10060
10061else
10062 case " $LIBOBJS " in
10063 *" strtoll.$ac_objext "* ) ;;
10064 *) LIBOBJS="$LIBOBJS strtoll.$ac_objext"
10065 ;;
10066esac
10067
ccc6cda3 10068fi
ac50fbac
CR
10069
10070ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
10071if test "x$ac_cv_func_strtoull" = xyes; then :
10072 $as_echo "#define HAVE_STRTOULL 1" >>confdefs.h
10073
10074else
10075 case " $LIBOBJS " in
10076 *" strtoull.$ac_objext "* ) ;;
10077 *) LIBOBJS="$LIBOBJS strtoull.$ac_objext"
10078 ;;
10079esac
10080
ccc6cda3 10081fi
ccc6cda3 10082
ac50fbac
CR
10083ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
10084if test "x$ac_cv_func_strtoimax" = xyes; then :
10085 $as_echo "#define HAVE_STRTOIMAX 1" >>confdefs.h
b80f6443 10086
ac50fbac
CR
10087else
10088 case " $LIBOBJS " in
10089 *" strtoimax.$ac_objext "* ) ;;
10090 *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext"
10091 ;;
10092esac
3185942a 10093
ac50fbac 10094fi
0628567a 10095
ac50fbac
CR
10096ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax"
10097if test "x$ac_cv_func_strtoumax" = xyes; then :
10098 $as_echo "#define HAVE_STRTOUMAX 1" >>confdefs.h
f73dda09 10099
f73dda09 10100else
ac50fbac
CR
10101 case " $LIBOBJS " in
10102 *" strtoumax.$ac_objext "* ) ;;
10103 *) LIBOBJS="$LIBOBJS strtoumax.$ac_objext"
10104 ;;
10105esac
b80f6443 10106
ac50fbac
CR
10107fi
10108
10109
10110ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf"
10111if test "x$ac_cv_func_dprintf" = xyes; then :
10112 $as_echo "#define HAVE_DPRINTF 1" >>confdefs.h
10113
10114else
10115 case " $LIBOBJS " in
10116 *" dprintf.$ac_objext "* ) ;;
10117 *) LIBOBJS="$LIBOBJS dprintf.$ac_objext"
10118 ;;
3185942a 10119esac
b80f6443 10120
ac50fbac
CR
10121fi
10122
10123
10124ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
10125if test "x$ac_cv_func_strchrnul" = xyes; then :
10126 $as_echo "#define HAVE_STRCHRNUL 1" >>confdefs.h
10127
10128else
10129 case " $LIBOBJS " in
10130 *" strchrnul.$ac_objext "* ) ;;
10131 *) LIBOBJS="$LIBOBJS strchrnul.$ac_objext"
10132 ;;
3185942a 10133esac
ac50fbac
CR
10134
10135fi
10136
10137
10138ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10139if test "x$ac_cv_func_strdup" = xyes; then :
10140 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10141
f73dda09 10142else
ac50fbac
CR
10143 case " $LIBOBJS " in
10144 *" strdup.$ac_objext "* ) ;;
10145 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10146 ;;
10147esac
0628567a 10148
f73dda09 10149fi
3185942a 10150
ac50fbac
CR
10151
10152
a0c0a00f
CR
10153for ac_header in libaudit.h
10154do :
10155 ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
10156if test "x$ac_cv_header_libaudit_h" = xyes; then :
10157 cat >>confdefs.h <<_ACEOF
10158#define HAVE_LIBAUDIT_H 1
10159_ACEOF
10160
10161fi
10162
10163done
10164
ac50fbac
CR
10165ac_fn_c_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include <linux/audit.h>
10166"
10167if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes; then :
10168 ac_have_decl=1
ccc6cda3 10169else
ac50fbac
CR
10170 ac_have_decl=0
10171fi
0628567a 10172
ac50fbac
CR
10173cat >>confdefs.h <<_ACEOF
10174#define HAVE_DECL_AUDIT_USER_TTY $ac_have_decl
0628567a 10175_ACEOF
b80f6443 10176
b80f6443 10177
ac50fbac
CR
10178ac_fn_c_check_decl "$LINENO" "confstr" "ac_cv_have_decl_confstr" "$ac_includes_default"
10179if test "x$ac_cv_have_decl_confstr" = xyes; then :
10180 ac_have_decl=1
f73dda09 10181else
ac50fbac 10182 ac_have_decl=0
f73dda09 10183fi
3185942a 10184
ac50fbac
CR
10185cat >>confdefs.h <<_ACEOF
10186#define HAVE_DECL_CONFSTR $ac_have_decl
10187_ACEOF
0628567a 10188
ac50fbac
CR
10189ac_fn_c_check_decl "$LINENO" "printf" "ac_cv_have_decl_printf" "$ac_includes_default"
10190if test "x$ac_cv_have_decl_printf" = xyes; then :
10191 ac_have_decl=1
10192else
10193 ac_have_decl=0
b80f6443 10194fi
3185942a 10195
ac50fbac
CR
10196cat >>confdefs.h <<_ACEOF
10197#define HAVE_DECL_PRINTF $ac_have_decl
10198_ACEOF
10199
10200ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default"
10201if test "x$ac_cv_have_decl_sbrk" = xyes; then :
10202 ac_have_decl=1
10203else
10204 ac_have_decl=0
ccc6cda3 10205fi
3185942a 10206
ac50fbac
CR
10207cat >>confdefs.h <<_ACEOF
10208#define HAVE_DECL_SBRK $ac_have_decl
0628567a 10209_ACEOF
b80f6443 10210
ac50fbac
CR
10211ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default"
10212if test "x$ac_cv_have_decl_setregid" = xyes; then :
10213 ac_have_decl=1
10214else
10215 ac_have_decl=0
10216fi
10217
10218cat >>confdefs.h <<_ACEOF
10219#define HAVE_DECL_SETREGID $ac_have_decl
f73dda09 10220_ACEOF
ac50fbac
CR
10221
10222ac_fn_c_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" "$ac_includes_default"
10223if test "x$ac_cv_have_decl_strcpy" = xyes; then :
10224 ac_have_decl=1
f73dda09 10225else
ac50fbac
CR
10226 ac_have_decl=0
10227fi
0628567a 10228
ac50fbac
CR
10229cat >>confdefs.h <<_ACEOF
10230#define HAVE_DECL_STRCPY $ac_have_decl
10231_ACEOF
10232
10233ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
10234if test "x$ac_cv_have_decl_strsignal" = xyes; then :
10235 ac_have_decl=1
10236else
10237 ac_have_decl=0
f73dda09 10238fi
3185942a 10239
ac50fbac
CR
10240cat >>confdefs.h <<_ACEOF
10241#define HAVE_DECL_STRSIGNAL $ac_have_decl
10242_ACEOF
10243
10244
10245ac_fn_c_check_decl "$LINENO" "strtold" "ac_cv_have_decl_strtold" "$ac_includes_default"
10246if test "x$ac_cv_have_decl_strtold" = xyes; then :
10247 ac_have_decl=1
bb70624e 10248else
ac50fbac
CR
10249 ac_have_decl=0
10250fi
10251
10252cat >>confdefs.h <<_ACEOF
10253#define HAVE_DECL_STRTOLD $ac_have_decl
0628567a 10254_ACEOF
ac50fbac
CR
10255if test $ac_have_decl = 1; then :
10256
10257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken strtold" >&5
10258$as_echo_n "checking for broken strtold... " >&6; }
10259 if ${bash_cv_strtold_broken+:} false; then :
10260 $as_echo_n "(cached) " >&6
10261else
10262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10263/* end confdefs.h. */
b80f6443 10264#include <stdlib.h>
f73dda09
JA
10265int
10266main ()
bb70624e 10267{
ac50fbac 10268int main() { long double r; char *foo, bar; r = strtold(foo, &bar);}
f73dda09
JA
10269 ;
10270 return 0;
bb70624e 10271}
f73dda09 10272_ACEOF
ac50fbac
CR
10273if ac_fn_c_try_compile "$LINENO"; then :
10274 bash_cv_strtold_broken=no
bb70624e 10275else
ac50fbac 10276 bash_cv_strtold_broken=yes
bb70624e 10277fi
ac50fbac
CR
10278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10279
10280
bb70624e 10281fi
ac50fbac
CR
10282
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_strtold_broken" >&5
10284$as_echo "$bash_cv_strtold_broken" >&6; }
10285 if test "$bash_cv_strtold_broken" = "yes" ; then
10286 $as_echo "#define STRTOLD_BROKEN 1" >>confdefs.h
10287
10288 fi
10289
f73dda09 10290fi
bb70624e 10291
b80f6443 10292
3185942a 10293
0628567a 10294
f73dda09 10295
ac50fbac
CR
10296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoimax" >&5
10297$as_echo_n "checking for declaration of strtoimax... " >&6; }
10298if ${bash_cv_decl_strtoimax+:} false; then :
3185942a 10299 $as_echo_n "(cached) " >&6
f73dda09 10300else
ac50fbac 10301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10302/* end confdefs.h. */
ac50fbac
CR
10303
10304#if STDC_HEADERS
10305# include <stdlib.h>
10306#endif
10307#if HAVE_INTTYPES_H
10308# include <inttypes.h>
10309#endif
10310
f73dda09
JA
10311int
10312main ()
10313{
ac50fbac 10314return !strtoimax;
f73dda09
JA
10315 ;
10316 return 0;
10317}
10318_ACEOF
ac50fbac
CR
10319if ac_fn_c_try_link "$LINENO"; then :
10320 bash_cv_decl_strtoimax=yes
10321else
10322 bash_cv_decl_strtoimax=no
10323fi
10324rm -f core conftest.err conftest.$ac_objext \
10325 conftest$ac_exeext conftest.$ac_ext
10326fi
10327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoimax" >&5
10328$as_echo "$bash_cv_decl_strtoimax" >&6; }
10329bash_tr_func=HAVE_DECL_`echo strtoimax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10330if test $bash_cv_decl_strtoimax = yes; then
10331 cat >>confdefs.h <<_ACEOF
10332#define $bash_tr_func 1
0628567a 10333_ACEOF
b80f6443 10334
f73dda09 10335else
ac50fbac
CR
10336 cat >>confdefs.h <<_ACEOF
10337#define $bash_tr_func 0
10338_ACEOF
0628567a 10339
f73dda09 10340fi
3185942a 10341
0628567a 10342
b80f6443 10343
ac50fbac
CR
10344
10345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtol" >&5
10346$as_echo_n "checking for declaration of strtol... " >&6; }
10347if ${bash_cv_decl_strtol+:} false; then :
10348 $as_echo_n "(cached) " >&6
10349else
10350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10351/* end confdefs.h. */
ac50fbac
CR
10352
10353#if STDC_HEADERS
10354# include <stdlib.h>
10355#endif
10356#if HAVE_INTTYPES_H
10357# include <inttypes.h>
10358#endif
10359
f73dda09
JA
10360int
10361main ()
10362{
ac50fbac 10363return !strtol;
f73dda09
JA
10364 ;
10365 return 0;
10366}
10367_ACEOF
ac50fbac
CR
10368if ac_fn_c_try_link "$LINENO"; then :
10369 bash_cv_decl_strtol=yes
f73dda09 10370else
ac50fbac 10371 bash_cv_decl_strtol=no
f73dda09 10372fi
ac50fbac
CR
10373rm -f core conftest.err conftest.$ac_objext \
10374 conftest$ac_exeext conftest.$ac_ext
10375fi
10376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtol" >&5
10377$as_echo "$bash_cv_decl_strtol" >&6; }
10378bash_tr_func=HAVE_DECL_`echo strtol | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10379if test $bash_cv_decl_strtol = yes; then
10380 cat >>confdefs.h <<_ACEOF
10381#define $bash_tr_func 1
10382_ACEOF
3185942a 10383
b80f6443 10384else
ac50fbac
CR
10385 cat >>confdefs.h <<_ACEOF
10386#define $bash_tr_func 0
10387_ACEOF
0628567a 10388
b80f6443 10389fi
3185942a 10390
3185942a 10391
ac50fbac
CR
10392
10393
10394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoll" >&5
10395$as_echo_n "checking for declaration of strtoll... " >&6; }
10396if ${bash_cv_decl_strtoll+:} false; then :
10397 $as_echo_n "(cached) " >&6
10398else
10399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10400/* end confdefs.h. */
ac50fbac
CR
10401
10402#if STDC_HEADERS
10403# include <stdlib.h>
10404#endif
10405#if HAVE_INTTYPES_H
10406# include <inttypes.h>
10407#endif
10408
f73dda09
JA
10409int
10410main ()
10411{
ac50fbac 10412return !strtoll;
f73dda09
JA
10413 ;
10414 return 0;
10415}
10416_ACEOF
ac50fbac
CR
10417if ac_fn_c_try_link "$LINENO"; then :
10418 bash_cv_decl_strtoll=yes
f73dda09 10419else
ac50fbac 10420 bash_cv_decl_strtoll=no
f73dda09 10421fi
ac50fbac
CR
10422rm -f core conftest.err conftest.$ac_objext \
10423 conftest$ac_exeext conftest.$ac_ext
10424fi
10425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoll" >&5
10426$as_echo "$bash_cv_decl_strtoll" >&6; }
10427bash_tr_func=HAVE_DECL_`echo strtoll | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10428if test $bash_cv_decl_strtoll = yes; then
10429 cat >>confdefs.h <<_ACEOF
10430#define $bash_tr_func 1
10431_ACEOF
3185942a 10432
bb70624e 10433else
ac50fbac
CR
10434 cat >>confdefs.h <<_ACEOF
10435#define $bash_tr_func 0
0628567a 10436_ACEOF
ac50fbac
CR
10437
10438fi
10439
10440
10441
10442
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoul" >&5
10444$as_echo_n "checking for declaration of strtoul... " >&6; }
10445if ${bash_cv_decl_strtoul+:} false; then :
10446 $as_echo_n "(cached) " >&6
10447else
10448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10449/* end confdefs.h. */
ac50fbac
CR
10450
10451#if STDC_HEADERS
10452# include <stdlib.h>
10453#endif
10454#if HAVE_INTTYPES_H
10455# include <inttypes.h>
10456#endif
10457
f73dda09
JA
10458int
10459main ()
bb70624e 10460{
ac50fbac 10461return !strtoul;
f73dda09
JA
10462 ;
10463 return 0;
bb70624e 10464}
f73dda09 10465_ACEOF
ac50fbac
CR
10466if ac_fn_c_try_link "$LINENO"; then :
10467 bash_cv_decl_strtoul=yes
bb70624e 10468else
ac50fbac 10469 bash_cv_decl_strtoul=no
bb70624e 10470fi
ac50fbac
CR
10471rm -f core conftest.err conftest.$ac_objext \
10472 conftest$ac_exeext conftest.$ac_ext
f73dda09 10473fi
ac50fbac
CR
10474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoul" >&5
10475$as_echo "$bash_cv_decl_strtoul" >&6; }
10476bash_tr_func=HAVE_DECL_`echo strtoul | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10477if test $bash_cv_decl_strtoul = yes; then
10478 cat >>confdefs.h <<_ACEOF
10479#define $bash_tr_func 1
10480_ACEOF
bb70624e 10481
ac50fbac
CR
10482else
10483 cat >>confdefs.h <<_ACEOF
10484#define $bash_tr_func 0
10485_ACEOF
b80f6443 10486
ac50fbac 10487fi
3185942a 10488
0628567a 10489
f73dda09 10490
ac50fbac
CR
10491
10492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoull" >&5
10493$as_echo_n "checking for declaration of strtoull... " >&6; }
10494if ${bash_cv_decl_strtoull+:} false; then :
3185942a 10495 $as_echo_n "(cached) " >&6
f73dda09 10496else
ac50fbac 10497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10498/* end confdefs.h. */
ac50fbac
CR
10499
10500#if STDC_HEADERS
10501# include <stdlib.h>
10502#endif
10503#if HAVE_INTTYPES_H
10504# include <inttypes.h>
10505#endif
10506
f73dda09
JA
10507int
10508main ()
cce855bc 10509{
ac50fbac 10510return !strtoull;
f73dda09
JA
10511 ;
10512 return 0;
cce855bc 10513}
f73dda09 10514_ACEOF
ac50fbac
CR
10515if ac_fn_c_try_link "$LINENO"; then :
10516 bash_cv_decl_strtoull=yes
10517else
10518 bash_cv_decl_strtoull=no
10519fi
10520rm -f core conftest.err conftest.$ac_objext \
10521 conftest$ac_exeext conftest.$ac_ext
10522fi
10523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoull" >&5
10524$as_echo "$bash_cv_decl_strtoull" >&6; }
10525bash_tr_func=HAVE_DECL_`echo strtoull | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10526if test $bash_cv_decl_strtoull = yes; then
10527 cat >>confdefs.h <<_ACEOF
10528#define $bash_tr_func 1
10529_ACEOF
10530
10531else
10532 cat >>confdefs.h <<_ACEOF
10533#define $bash_tr_func 0
0628567a 10534_ACEOF
ac50fbac
CR
10535
10536fi
10537
10538
10539
10540
10541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoumax" >&5
10542$as_echo_n "checking for declaration of strtoumax... " >&6; }
10543if ${bash_cv_decl_strtoumax+:} false; then :
10544 $as_echo_n "(cached) " >&6
10545else
10546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10547/* end confdefs.h. */
ac50fbac
CR
10548
10549#if STDC_HEADERS
10550# include <stdlib.h>
10551#endif
10552#if HAVE_INTTYPES_H
10553# include <inttypes.h>
10554#endif
10555
f73dda09
JA
10556int
10557main ()
10558{
ac50fbac 10559return !strtoumax;
f73dda09
JA
10560 ;
10561 return 0;
10562}
10563_ACEOF
ac50fbac
CR
10564if ac_fn_c_try_link "$LINENO"; then :
10565 bash_cv_decl_strtoumax=yes
f73dda09 10566else
ac50fbac
CR
10567 bash_cv_decl_strtoumax=no
10568fi
10569rm -f core conftest.err conftest.$ac_objext \
10570 conftest$ac_exeext conftest.$ac_ext
f73dda09 10571fi
ac50fbac
CR
10572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoumax" >&5
10573$as_echo "$bash_cv_decl_strtoumax" >&6; }
10574bash_tr_func=HAVE_DECL_`echo strtoumax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10575if test $bash_cv_decl_strtoumax = yes; then
10576 cat >>confdefs.h <<_ACEOF
10577#define $bash_tr_func 1
10578_ACEOF
3185942a 10579
cce855bc 10580else
ac50fbac
CR
10581 cat >>confdefs.h <<_ACEOF
10582#define $bash_tr_func 0
10583_ACEOF
10584
10585fi
10586
0628567a 10587
ac50fbac
CR
10588
10589
10590
10591
10592
10593 for ac_func in $ac_func_list
10594do :
10595 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10596ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10597if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10598 cat >>confdefs.h <<_ACEOF
10599#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
0628567a 10600_ACEOF
ac50fbac
CR
10601
10602fi
10603done
10604
10605
10606
10607
10608
10609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
10610$as_echo_n "checking for working mktime... " >&6; }
10611if ${ac_cv_func_working_mktime+:} false; then :
10612 $as_echo_n "(cached) " >&6
10613else
10614 if test "$cross_compiling" = yes; then :
10615 ac_cv_func_working_mktime=no
10616else
10617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10618/* end confdefs.h. */
ac50fbac
CR
10619/* Test program from Paul Eggert and Tony Leneis. */
10620#ifdef TIME_WITH_SYS_TIME
10621# include <sys/time.h>
10622# include <time.h>
10623#else
10624# ifdef HAVE_SYS_TIME_H
10625# include <sys/time.h>
10626# else
10627# include <time.h>
10628# endif
10629#endif
10630
10631#include <limits.h>
10632#include <stdlib.h>
10633
10634#ifdef HAVE_UNISTD_H
10635# include <unistd.h>
10636#endif
10637
10638#ifndef HAVE_ALARM
10639# define alarm(X) /* empty */
10640#endif
10641
10642/* Work around redefinition to rpl_putenv by other config tests. */
10643#undef putenv
10644
10645static time_t time_t_max;
10646static time_t time_t_min;
10647
10648/* Values we'll use to set the TZ environment variable. */
10649static const char *tz_strings[] = {
10650 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
10651 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
10652};
10653#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
10654
10655/* Return 0 if mktime fails to convert a date in the spring-forward gap.
10656 Based on a problem report from Andreas Jaeger. */
10657static int
10658spring_forward_gap ()
10659{
10660 /* glibc (up to about 1998-10-07) failed this test. */
10661 struct tm tm;
10662
10663 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
10664 instead of "TZ=America/Vancouver" in order to detect the bug even
10665 on systems that don't support the Olson extension, or don't have the
10666 full zoneinfo tables installed. */
10667 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
10668
10669 tm.tm_year = 98;
10670 tm.tm_mon = 3;
10671 tm.tm_mday = 5;
10672 tm.tm_hour = 2;
10673 tm.tm_min = 0;
10674 tm.tm_sec = 0;
10675 tm.tm_isdst = -1;
10676 return mktime (&tm) != (time_t) -1;
10677}
10678
10679static int
10680mktime_test1 (time_t now)
10681{
10682 struct tm *lt;
10683 return ! (lt = localtime (&now)) || mktime (lt) == now;
10684}
10685
10686static int
10687mktime_test (time_t now)
10688{
10689 return (mktime_test1 (now)
10690 && mktime_test1 ((time_t) (time_t_max - now))
10691 && mktime_test1 ((time_t) (time_t_min + now)));
10692}
10693
10694static int
10695irix_6_4_bug ()
10696{
10697 /* Based on code from Ariel Faigon. */
10698 struct tm tm;
10699 tm.tm_year = 96;
10700 tm.tm_mon = 3;
10701 tm.tm_mday = 0;
10702 tm.tm_hour = 0;
10703 tm.tm_min = 0;
10704 tm.tm_sec = 0;
10705 tm.tm_isdst = -1;
10706 mktime (&tm);
10707 return tm.tm_mon == 2 && tm.tm_mday == 31;
10708}
10709
10710static int
10711bigtime_test (int j)
10712{
10713 struct tm tm;
10714 time_t now;
10715 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
10716 now = mktime (&tm);
10717 if (now != (time_t) -1)
10718 {
10719 struct tm *lt = localtime (&now);
10720 if (! (lt
10721 && lt->tm_year == tm.tm_year
10722 && lt->tm_mon == tm.tm_mon
10723 && lt->tm_mday == tm.tm_mday
10724 && lt->tm_hour == tm.tm_hour
10725 && lt->tm_min == tm.tm_min
10726 && lt->tm_sec == tm.tm_sec
10727 && lt->tm_yday == tm.tm_yday
10728 && lt->tm_wday == tm.tm_wday
10729 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
10730 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
10731 return 0;
10732 }
10733 return 1;
10734}
10735
10736static int
10737year_2050_test ()
b80f6443 10738{
ac50fbac
CR
10739 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
10740 ignoring leap seconds. */
10741 unsigned long int answer = 2527315200UL;
10742
10743 struct tm tm;
10744 time_t t;
10745 tm.tm_year = 2050 - 1900;
10746 tm.tm_mon = 2 - 1;
10747 tm.tm_mday = 1;
10748 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
10749 tm.tm_isdst = -1;
10750
10751 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
10752 instead of "TZ=America/Vancouver" in order to detect the bug even
10753 on systems that don't support the Olson extension, or don't have the
10754 full zoneinfo tables installed. */
10755 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
b80f6443 10756
ac50fbac
CR
10757 t = mktime (&tm);
10758
10759 /* Check that the result is either a failure, or close enough
10760 to the correct answer that we can assume the discrepancy is
10761 due to leap seconds. */
10762 return (t == (time_t) -1
10763 || (0 < t && answer - 120 <= t && t <= answer + 120));
b80f6443 10764}
ac50fbac 10765
f73dda09
JA
10766int
10767main ()
10768{
ac50fbac
CR
10769 time_t t, delta;
10770 int i, j;
b80f6443 10771
ac50fbac
CR
10772 /* This test makes some buggy mktime implementations loop.
10773 Give up after 60 seconds; a mktime slower than that
10774 isn't worth using anyway. */
10775 alarm (60);
10776
10777 for (;;)
10778 {
10779 t = (time_t_max << 1) + 1;
10780 if (t <= time_t_max)
10781 break;
10782 time_t_max = t;
10783 }
10784 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
10785
10786 delta = time_t_max / 997; /* a suitable prime number */
10787 for (i = 0; i < N_STRINGS; i++)
10788 {
10789 if (tz_strings[i])
10790 putenv ((char*) tz_strings[i]);
10791
10792 for (t = 0; t <= time_t_max - delta; t += delta)
10793 if (! mktime_test (t))
10794 return 1;
10795 if (! (mktime_test ((time_t) 1)
10796 && mktime_test ((time_t) (60 * 60))
10797 && mktime_test ((time_t) (60 * 60 * 24))))
10798 return 1;
10799
10800 for (j = 1; ; j <<= 1)
10801 if (! bigtime_test (j))
10802 return 1;
10803 else if (INT_MAX / 2 < j)
10804 break;
10805 if (! bigtime_test (INT_MAX))
10806 return 1;
10807 }
10808 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
f73dda09
JA
10809}
10810_ACEOF
ac50fbac
CR
10811if ac_fn_c_try_run "$LINENO"; then :
10812 ac_cv_func_working_mktime=yes
f73dda09 10813else
ac50fbac
CR
10814 ac_cv_func_working_mktime=no
10815fi
10816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10817 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 10818fi
3185942a 10819
b80f6443 10820fi
ac50fbac
CR
10821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
10822$as_echo "$ac_cv_func_working_mktime" >&6; }
10823if test $ac_cv_func_working_mktime = no; then
10824 case " $LIBOBJS " in
10825 *" mktime.$ac_objext "* ) ;;
10826 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
10827 ;;
10828esac
3185942a 10829
cce855bc 10830fi
3185942a 10831
b80f6443 10832
ac50fbac
CR
10833
10834for ac_header in argz.h errno.h fcntl.h malloc.h stdio_ext.h
10835do :
10836 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10837ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10838if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10839 cat >>confdefs.h <<_ACEOF
10840#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
f73dda09 10841_ACEOF
0628567a 10842
f73dda09 10843fi
3185942a 10844
f73dda09 10845done
ac50fbac
CR
10846
10847
10848
10849for ac_func in getpagesize
10850do :
10851 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10852if test "x$ac_cv_func_getpagesize" = xyes; then :
10853 cat >>confdefs.h <<_ACEOF
10854#define HAVE_GETPAGESIZE 1
0628567a 10855_ACEOF
ac50fbac
CR
10856
10857fi
10858done
10859
10860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10861$as_echo_n "checking for working mmap... " >&6; }
10862if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
10863 $as_echo_n "(cached) " >&6
10864else
10865 if test "$cross_compiling" = yes; then :
10866 ac_cv_func_mmap_fixed_mapped=no
10867else
10868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 10869/* end confdefs.h. */
f73dda09 10870$ac_includes_default
ac50fbac
CR
10871/* malloc might have been renamed as rpl_malloc. */
10872#undef malloc
10873
10874/* Thanks to Mike Haertel and Jim Avera for this test.
10875 Here is a matrix of mmap possibilities:
10876 mmap private not fixed
10877 mmap private fixed at somewhere currently unmapped
10878 mmap private fixed at somewhere already mapped
10879 mmap shared not fixed
10880 mmap shared fixed at somewhere currently unmapped
10881 mmap shared fixed at somewhere already mapped
10882 For private mappings, we should verify that changes cannot be read()
10883 back from the file, nor mmap's back from the file at a different
10884 address. (There have been systems where private was not correctly
10885 implemented like the infamous i386 svr4.0, and systems where the
10886 VM page cache was not coherent with the file system buffer cache
10887 like early versions of FreeBSD and possibly contemporary NetBSD.)
10888 For shared mappings, we should conversely verify that changes get
10889 propagated back to all the places they're supposed to be.
10890
10891 Grep wants private fixed already mapped.
10892 The main things grep needs to know about mmap are:
10893 * does it exist and is it safe to write into the mmap'd area
10894 * how to use it (BSD variants) */
10895
10896#include <fcntl.h>
10897#include <sys/mman.h>
10898
10899#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10900char *malloc ();
10901#endif
10902
10903/* This mess was copied from the GNU getpagesize.h. */
10904#ifndef HAVE_GETPAGESIZE
10905# ifdef _SC_PAGESIZE
10906# define getpagesize() sysconf(_SC_PAGESIZE)
10907# else /* no _SC_PAGESIZE */
10908# ifdef HAVE_SYS_PARAM_H
10909# include <sys/param.h>
10910# ifdef EXEC_PAGESIZE
10911# define getpagesize() EXEC_PAGESIZE
10912# else /* no EXEC_PAGESIZE */
10913# ifdef NBPG
10914# define getpagesize() NBPG * CLSIZE
10915# ifndef CLSIZE
10916# define CLSIZE 1
10917# endif /* no CLSIZE */
10918# else /* no NBPG */
10919# ifdef NBPC
10920# define getpagesize() NBPC
10921# else /* no NBPC */
10922# ifdef PAGESIZE
10923# define getpagesize() PAGESIZE
10924# endif /* PAGESIZE */
10925# endif /* no NBPC */
10926# endif /* no NBPG */
10927# endif /* no EXEC_PAGESIZE */
10928# else /* no HAVE_SYS_PARAM_H */
10929# define getpagesize() 8192 /* punt totally */
10930# endif /* no HAVE_SYS_PARAM_H */
10931# endif /* no _SC_PAGESIZE */
10932
10933#endif /* no HAVE_GETPAGESIZE */
10934
f73dda09
JA
10935int
10936main ()
cce855bc 10937{
ac50fbac
CR
10938 char *data, *data2, *data3;
10939 const char *cdata2;
10940 int i, pagesize;
10941 int fd, fd2;
b80f6443 10942
ac50fbac
CR
10943 pagesize = getpagesize ();
10944
10945 /* First, make a file with some known garbage in it. */
10946 data = (char *) malloc (pagesize);
10947 if (!data)
3185942a 10948 return 1;
ac50fbac
CR
10949 for (i = 0; i < pagesize; ++i)
10950 *(data + i) = rand ();
10951 umask (0);
10952 fd = creat ("conftest.mmap", 0600);
10953 if (fd < 0)
10954 return 2;
10955 if (write (fd, data, pagesize) != pagesize)
10956 return 3;
10957 close (fd);
b80f6443 10958
ac50fbac
CR
10959 /* Next, check that the tail of a page is zero-filled. File must have
10960 non-zero length, otherwise we risk SIGBUS for entire page. */
10961 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10962 if (fd2 < 0)
10963 return 4;
10964 cdata2 = "";
10965 if (write (fd2, cdata2, 1) != 1)
10966 return 5;
10967 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10968 if (data2 == MAP_FAILED)
10969 return 6;
10970 for (i = 0; i < pagesize; ++i)
10971 if (*(data2 + i))
10972 return 7;
10973 close (fd2);
10974 if (munmap (data2, pagesize))
10975 return 8;
10976
10977 /* Next, try to mmap the file at a fixed address which already has
10978 something else allocated at it. If we can, also make sure that
10979 we see the same garbage. */
10980 fd = open ("conftest.mmap", O_RDWR);
10981 if (fd < 0)
10982 return 9;
10983 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10984 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10985 return 10;
10986 for (i = 0; i < pagesize; ++i)
10987 if (*(data + i) != *(data2 + i))
10988 return 11;
10989
10990 /* Finally, make sure that changes to the mapped area do not
10991 percolate back to the file as seen by read(). (This is a bug on
10992 some variants of i386 svr4.0.) */
10993 for (i = 0; i < pagesize; ++i)
10994 *(data2 + i) = *(data2 + i) + 1;
10995 data3 = (char *) malloc (pagesize);
10996 if (!data3)
10997 return 12;
10998 if (read (fd, data3, pagesize) != pagesize)
10999 return 13;
11000 for (i = 0; i < pagesize; ++i)
11001 if (*(data + i) != *(data3 + i))
11002 return 14;
11003 close (fd);
f73dda09 11004 return 0;
cce855bc 11005}
f73dda09 11006_ACEOF
ac50fbac
CR
11007if ac_fn_c_try_run "$LINENO"; then :
11008 ac_cv_func_mmap_fixed_mapped=yes
cce855bc 11009else
ac50fbac 11010 ac_cv_func_mmap_fixed_mapped=no
cce855bc 11011fi
ac50fbac
CR
11012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11013 conftest.$ac_objext conftest.beam conftest.$ac_ext
cce855bc 11014fi
ac50fbac 11015
f73dda09 11016fi
ac50fbac
CR
11017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11018$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
11019if test $ac_cv_func_mmap_fixed_mapped = yes; then
cce855bc 11020
ac50fbac 11021$as_echo "#define HAVE_MMAP 1" >>confdefs.h
b80f6443 11022
ac50fbac
CR
11023fi
11024rm -f conftest.mmap conftest.txt
3185942a 11025
ac50fbac
CR
11026for ac_func in __argz_count __argz_next __argz_stringify dcgettext mempcpy \
11027 munmap stpcpy strcspn
11028do :
11029 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11030ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11031if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11032 cat >>confdefs.h <<_ACEOF
11033#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f73dda09 11034_ACEOF
0628567a 11035
ac50fbac
CR
11036fi
11037done
f73dda09 11038
b80f6443 11039
ac50fbac
CR
11040INTL_DEP= INTL_INC= LIBINTL_H=
11041if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then
11042 INTL_DEP='${INTL_LIBDIR}/libintl.a'
11043 INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}'
11044 LIBINTL_H='${INTL_BUILDDIR}/libintl.h'
11045fi
b80f6443 11046
ac50fbac
CR
11047
11048
11049
11050
11051
11052for ac_header in wctype.h
11053do :
11054 ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
11055if test "x$ac_cv_header_wctype_h" = xyes; then :
11056 cat >>confdefs.h <<_ACEOF
11057#define HAVE_WCTYPE_H 1
f73dda09 11058_ACEOF
0628567a 11059
f73dda09 11060fi
3185942a 11061
ac50fbac 11062done
0628567a 11063
ac50fbac
CR
11064for ac_header in wchar.h
11065do :
11066 ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11067if test "x$ac_cv_header_wchar_h" = xyes; then :
11068 cat >>confdefs.h <<_ACEOF
11069#define HAVE_WCHAR_H 1
0628567a 11070_ACEOF
b80f6443 11071
ac50fbac 11072fi
b80f6443 11073
ac50fbac
CR
11074done
11075
11076for ac_header in langinfo.h
11077do :
11078 ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
11079if test "x$ac_cv_header_langinfo_h" = xyes; then :
11080 cat >>confdefs.h <<_ACEOF
11081#define HAVE_LANGINFO_H 1
f73dda09 11082_ACEOF
0628567a 11083
f73dda09 11084fi
3185942a 11085
ac50fbac
CR
11086done
11087
11088
a0c0a00f
CR
11089for ac_header in mbstr.h
11090do :
11091 ac_fn_c_check_header_mongrel "$LINENO" "mbstr.h" "ac_cv_header_mbstr_h" "$ac_includes_default"
11092if test "x$ac_cv_header_mbstr_h" = xyes; then :
11093 cat >>confdefs.h <<_ACEOF
11094#define HAVE_MBSTR_H 1
11095_ACEOF
11096
11097fi
11098
11099done
11100
11101
ac50fbac
CR
11102ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen"
11103if test "x$ac_cv_func_mbrlen" = xyes; then :
11104 $as_echo "#define HAVE_MBRLEN 1" >>confdefs.h
0628567a 11105
b80f6443 11106fi
3185942a 11107
ac50fbac
CR
11108ac_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp"
11109if test "x$ac_cv_func_mbscasecmp" = xyes; then :
11110 $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h
11111
cce855bc 11112fi
3185942a 11113
ac50fbac
CR
11114ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp"
11115if test "x$ac_cv_func_mbscmp" = xyes; then :
11116 $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h
b80f6443 11117
ac50fbac
CR
11118fi
11119
11120ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs"
11121if test "x$ac_cv_func_mbsnrtowcs" = xyes; then :
11122 $as_echo "#define HAVE_MBSNRTOWCS 1" >>confdefs.h
0628567a 11123
f73dda09 11124fi
3185942a 11125
ac50fbac
CR
11126ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs"
11127if test "x$ac_cv_func_mbsrtowcs" = xyes; then :
11128 $as_echo "#define HAVE_MBSRTOWCS 1" >>confdefs.h
b80f6443 11129
ac50fbac
CR
11130fi
11131
11132
11133ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr"
11134if test "x$ac_cv_func_mbschr" = xyes; then :
11135 $as_echo "#define HAVE_MBSCHR 1" >>confdefs.h
b80f6443 11136
bb70624e 11137else
ac50fbac
CR
11138 case " $LIBOBJS " in
11139 *" mbschr.$ac_objext "* ) ;;
11140 *) LIBOBJS="$LIBOBJS mbschr.$ac_objext"
11141 ;;
11142esac
11143
11144fi
11145
11146
11147
11148ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
11149if test "x$ac_cv_func_wcrtomb" = xyes; then :
11150 $as_echo "#define HAVE_WCRTOMB 1" >>confdefs.h
0628567a 11151
bb70624e 11152fi
ac50fbac
CR
11153
11154ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll"
11155if test "x$ac_cv_func_wcscoll" = xyes; then :
11156 $as_echo "#define HAVE_WCSCOLL 1" >>confdefs.h
11157
bb70624e 11158fi
ac50fbac
CR
11159
11160ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup"
11161if test "x$ac_cv_func_wcsdup" = xyes; then :
11162 $as_echo "#define HAVE_WCSDUP 1" >>confdefs.h
11163
f73dda09 11164fi
3185942a 11165
ac50fbac
CR
11166ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth"
11167if test "x$ac_cv_func_wcwidth" = xyes; then :
11168 $as_echo "#define HAVE_WCWIDTH 1" >>confdefs.h
11169
11170fi
3185942a 11171
ac50fbac
CR
11172ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
11173if test "x$ac_cv_func_wctype" = xyes; then :
11174 $as_echo "#define HAVE_WCTYPE 1" >>confdefs.h
3185942a 11175
ac50fbac 11176fi
bb70624e 11177
b80f6443 11178
ac50fbac
CR
11179ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth"
11180if test "x$ac_cv_func_wcswidth" = xyes; then :
11181 $as_echo "#define HAVE_WCSWIDTH 1" >>confdefs.h
b80f6443 11182
bb70624e 11183else
ac50fbac
CR
11184 case " $LIBOBJS " in
11185 *" wcswidth.$ac_objext "* ) ;;
11186 *) LIBOBJS="$LIBOBJS wcswidth.$ac_objext"
11187 ;;
3185942a 11188esac
ac50fbac
CR
11189
11190fi
11191
11192
11193
11194
11195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
11196$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
11197if ${ac_cv_func_mbrtowc+:} false; then :
11198 $as_echo_n "(cached) " >&6
11199else
11200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11201/* end confdefs.h. */
ac50fbac 11202#include <wchar.h>
f73dda09
JA
11203int
11204main ()
11205{
ac50fbac
CR
11206wchar_t wc;
11207 char const s[] = "";
11208 size_t n = 1;
11209 mbstate_t state;
11210 return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
f73dda09
JA
11211 ;
11212 return 0;
11213}
11214_ACEOF
ac50fbac
CR
11215if ac_fn_c_try_link "$LINENO"; then :
11216 ac_cv_func_mbrtowc=yes
3185942a 11217else
ac50fbac
CR
11218 ac_cv_func_mbrtowc=no
11219fi
11220rm -f core conftest.err conftest.$ac_objext \
11221 conftest$ac_exeext conftest.$ac_ext
3185942a 11222fi
ac50fbac
CR
11223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
11224$as_echo "$ac_cv_func_mbrtowc" >&6; }
11225 if test $ac_cv_func_mbrtowc = yes; then
3185942a 11226
ac50fbac 11227$as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h
0628567a 11228
ac50fbac 11229 fi
3185942a 11230
ac50fbac
CR
11231if test $ac_cv_func_mbrtowc = yes; then
11232 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
3185942a 11233
bb70624e 11234fi
f73dda09 11235
ac50fbac
CR
11236for ac_func in iswlower iswupper towlower towupper iswctype
11237do :
11238 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11239ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11240if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11241 cat >>confdefs.h <<_ACEOF
11242#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
b80f6443 11243_ACEOF
bb70624e
JA
11244
11245fi
ac50fbac 11246done
bb70624e 11247
ac50fbac
CR
11248
11249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11250$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
11251if ${bash_cv_langinfo_codeset+:} false; then :
3185942a 11252 $as_echo_n "(cached) " >&6
bb70624e 11253else
ac50fbac 11254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11255/* end confdefs.h. */
ac50fbac 11256#include <langinfo.h>
f73dda09
JA
11257int
11258main ()
11259{
ac50fbac 11260char* cs = nl_langinfo(CODESET);
f73dda09
JA
11261 ;
11262 return 0;
11263}
11264_ACEOF
ac50fbac
CR
11265if ac_fn_c_try_link "$LINENO"; then :
11266 bash_cv_langinfo_codeset=yes
11267else
11268 bash_cv_langinfo_codeset=no
11269fi
11270rm -f core conftest.err conftest.$ac_objext \
11271 conftest$ac_exeext conftest.$ac_ext
11272fi
11273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_langinfo_codeset" >&5
11274$as_echo "$bash_cv_langinfo_codeset" >&6; }
11275if test $bash_cv_langinfo_codeset = yes; then
11276 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
11277
11278fi
11279
11280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5
11281$as_echo_n "checking for wchar_t in wchar.h... " >&6; }
11282if ${bash_cv_type_wchar_t+:} false; then :
11283 $as_echo_n "(cached) " >&6
11284else
11285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11286/* end confdefs.h. */
ac50fbac
CR
11287#include <wchar.h>
11288
f73dda09
JA
11289int
11290main ()
11291{
ac50fbac
CR
11292
11293 wchar_t foo;
11294 foo = 0;
11295
f73dda09
JA
11296 ;
11297 return 0;
11298}
11299_ACEOF
ac50fbac
CR
11300if ac_fn_c_try_compile "$LINENO"; then :
11301 bash_cv_type_wchar_t=yes
bb70624e 11302else
ac50fbac 11303 bash_cv_type_wchar_t=no
bb70624e 11304fi
3185942a 11305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bb70624e 11306fi
ac50fbac
CR
11307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5
11308$as_echo "$bash_cv_type_wchar_t" >&6; }
11309if test $bash_cv_type_wchar_t = yes; then
f73dda09 11310
ac50fbac 11311$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
bb70624e
JA
11312
11313fi
11314
ac50fbac
CR
11315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5
11316$as_echo_n "checking for wctype_t in wctype.h... " >&6; }
11317if ${bash_cv_type_wctype_t+:} false; then :
3185942a 11318 $as_echo_n "(cached) " >&6
b72432fd 11319else
ac50fbac 11320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11321/* end confdefs.h. */
ac50fbac 11322#include <wctype.h>
f73dda09
JA
11323int
11324main ()
11325{
ac50fbac
CR
11326
11327 wctype_t foo;
11328 foo = 0;
11329
f73dda09
JA
11330 ;
11331 return 0;
11332}
11333_ACEOF
ac50fbac
CR
11334if ac_fn_c_try_compile "$LINENO"; then :
11335 bash_cv_type_wctype_t=yes
cce855bc 11336else
ac50fbac 11337 bash_cv_type_wctype_t=no
cce855bc 11338fi
3185942a 11339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cce855bc 11340fi
ac50fbac
CR
11341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5
11342$as_echo "$bash_cv_type_wctype_t" >&6; }
11343if test $bash_cv_type_wctype_t = yes; then
f73dda09 11344
ac50fbac 11345$as_echo "#define HAVE_WCTYPE_T 1" >>confdefs.h
cce855bc
JA
11346
11347fi
11348
ac50fbac
CR
11349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5
11350$as_echo_n "checking for wint_t in wctype.h... " >&6; }
11351if ${bash_cv_type_wint_t+:} false; then :
3185942a 11352 $as_echo_n "(cached) " >&6
cce855bc 11353else
ac50fbac 11354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11355/* end confdefs.h. */
ac50fbac 11356#include <wctype.h>
f73dda09
JA
11357int
11358main ()
11359{
ac50fbac
CR
11360
11361 wint_t foo;
11362 foo = 0;
11363
f73dda09
JA
11364 ;
11365 return 0;
11366}
11367_ACEOF
ac50fbac
CR
11368if ac_fn_c_try_compile "$LINENO"; then :
11369 bash_cv_type_wint_t=yes
3185942a 11370else
ac50fbac
CR
11371 bash_cv_type_wint_t=no
11372fi
11373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11374fi
11375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5
11376$as_echo "$bash_cv_type_wint_t" >&6; }
11377if test $bash_cv_type_wint_t = yes; then
11378
11379$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
11380
11381fi
11382
11383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcwidth broken with unicode combining characters" >&5
11384$as_echo_n "checking for wcwidth broken with unicode combining characters... " >&6; }
11385if ${bash_cv_wcwidth_broken+:} false; then :
11386 $as_echo_n "(cached) " >&6
11387else
11388 if test "$cross_compiling" = yes; then :
11389 bash_cv_wcwidth_broken=no
11390else
11391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11392/* end confdefs.h. */
11393
11394#include <unistd.h>
11395#include <stdlib.h>
11396#include <stdio.h>
11397
11398#include <locale.h>
11399#include <wchar.h>
3185942a 11400
ac50fbac
CR
11401main(c, v)
11402int c;
11403char **v;
11404{
11405 int w;
3185942a 11406
ac50fbac
CR
11407 setlocale(LC_ALL, "en_US.UTF-8");
11408 w = wcwidth (0x0301);
11409 exit (w == 0); /* exit 0 if wcwidth broken */
11410}
0628567a 11411
ac50fbac
CR
11412_ACEOF
11413if ac_fn_c_try_run "$LINENO"; then :
11414 bash_cv_wcwidth_broken=yes
11415else
a0c0a00f 11416 bash_cv_wcwidth_broken=no
ac50fbac
CR
11417fi
11418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11419 conftest.$ac_objext conftest.beam conftest.$ac_ext
11420fi
3185942a 11421
cce855bc 11422fi
ac50fbac
CR
11423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5
11424$as_echo "$bash_cv_wcwidth_broken" >&6; }
11425if test "$bash_cv_wcwidth_broken" = yes; then
11426
11427$as_echo "#define WCWIDTH_BROKEN 1" >>confdefs.h
3185942a 11428
b72432fd 11429fi
f73dda09 11430
ac50fbac
CR
11431if test "$am_cv_func_iconv" = yes; then
11432 OLDLIBS="$LIBS"
a0c0a00f 11433 LIBS="$LIBS $LIBINTL $LIBICONV"
ac50fbac
CR
11434 for ac_func in locale_charset
11435do :
11436 ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset"
11437if test "x$ac_cv_func_locale_charset" = xyes; then :
11438 cat >>confdefs.h <<_ACEOF
11439#define HAVE_LOCALE_CHARSET 1
b80f6443 11440_ACEOF
cce855bc 11441
b72432fd 11442fi
ac50fbac 11443done
b72432fd 11444
ac50fbac
CR
11445 LIBS="$OLDLIBS"
11446fi
11447
11448
11449
11450if test "$opt_static_link" != yes; then
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
11452$as_echo_n "checking for dlopen in -ldl... " >&6; }
11453if ${ac_cv_lib_dl_dlopen+:} false; then :
3185942a
JA
11454 $as_echo_n "(cached) " >&6
11455else
ac50fbac
CR
11456 ac_check_lib_save_LIBS=$LIBS
11457LIBS="-ldl $LIBS"
11458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11459/* end confdefs.h. */
ac50fbac
CR
11460
11461/* Override any GCC internal prototype to avoid an error.
11462 Use char because int might match the return type of a GCC
11463 builtin and then its argument prototype would still apply. */
11464#ifdef __cplusplus
11465extern "C"
11466#endif
11467char dlopen ();
f73dda09
JA
11468int
11469main ()
11470{
ac50fbac 11471return dlopen ();
f73dda09
JA
11472 ;
11473 return 0;
11474}
11475_ACEOF
ac50fbac
CR
11476if ac_fn_c_try_link "$LINENO"; then :
11477 ac_cv_lib_dl_dlopen=yes
3185942a 11478else
ac50fbac 11479 ac_cv_lib_dl_dlopen=no
3185942a 11480fi
ac50fbac
CR
11481rm -f core conftest.err conftest.$ac_objext \
11482 conftest$ac_exeext conftest.$ac_ext
11483LIBS=$ac_check_lib_save_LIBS
11484fi
11485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
11486$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
11487if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
11488 cat >>confdefs.h <<_ACEOF
11489#define HAVE_LIBDL 1
11490_ACEOF
3185942a 11491
ac50fbac
CR
11492 LIBS="-ldl $LIBS"
11493
11494fi
0628567a 11495
ac50fbac
CR
11496for ac_func in dlopen dlclose dlsym
11497do :
11498 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11499ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11500if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11501 cat >>confdefs.h <<_ACEOF
11502#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11503_ACEOF
3185942a 11504
cce855bc 11505fi
ac50fbac 11506done
3185942a 11507
cce855bc 11508fi
ac50fbac
CR
11509
11510ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
11511/* NetBSD declares sys_siglist in unistd.h. */
11512#ifdef HAVE_UNISTD_H
11513# include <unistd.h>
11514#endif
11515
11516"
11517if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
11518 ac_have_decl=1
f73dda09 11519else
ac50fbac
CR
11520 ac_have_decl=0
11521fi
f73dda09 11522
b80f6443 11523cat >>confdefs.h <<_ACEOF
ac50fbac 11524#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
b80f6443 11525_ACEOF
cce855bc 11526
cce855bc 11527
3185942a 11528
ac50fbac 11529if test "$ac_cv_func_inet_aton" != 'yes'; then
3185942a 11530
ac50fbac
CR
11531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11532$as_echo_n "checking for inet_aton... " >&6; }
11533if ${bash_cv_func_inet_aton+:} false; then :
3185942a 11534 $as_echo_n "(cached) " >&6
cce855bc 11535else
ac50fbac 11536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11537/* end confdefs.h. */
ac50fbac
CR
11538
11539#include <sys/types.h>
11540#include <netinet/in.h>
11541#include <arpa/inet.h>
11542struct in_addr ap;
f73dda09
JA
11543int
11544main ()
11545{
ac50fbac 11546 inet_aton("127.0.0.1", &ap);
f73dda09
JA
11547 ;
11548 return 0;
11549}
11550_ACEOF
ac50fbac
CR
11551if ac_fn_c_try_link "$LINENO"; then :
11552 bash_cv_func_inet_aton=yes
11553else
11554 bash_cv_func_inet_aton=no
11555fi
11556rm -f core conftest.err conftest.$ac_objext \
11557 conftest$ac_exeext conftest.$ac_ext
11558fi
11559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_inet_aton" >&5
11560$as_echo "$bash_cv_func_inet_aton" >&6; }
11561if test $bash_cv_func_inet_aton = yes; then
11562 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
11563
11564else
11565 case " $LIBOBJS " in
11566 *" inet_aton.$ac_objext "* ) ;;
11567 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
11568 ;;
3185942a 11569esac
ac50fbac
CR
11570
11571fi
11572
11573fi
11574
11575case "$host_os" in
11576irix4*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent in -lsun" >&5
11577$as_echo_n "checking for getpwent in -lsun... " >&6; }
11578if ${ac_cv_lib_sun_getpwent+:} false; then :
11579 $as_echo_n "(cached) " >&6
11580else
11581 ac_check_lib_save_LIBS=$LIBS
11582LIBS="-lsun $LIBS"
11583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11584/* end confdefs.h. */
ac50fbac
CR
11585
11586/* Override any GCC internal prototype to avoid an error.
11587 Use char because int might match the return type of a GCC
11588 builtin and then its argument prototype would still apply. */
11589#ifdef __cplusplus
11590extern "C"
11591#endif
11592char getpwent ();
f73dda09
JA
11593int
11594main ()
11595{
ac50fbac 11596return getpwent ();
f73dda09
JA
11597 ;
11598 return 0;
11599}
11600_ACEOF
ac50fbac
CR
11601if ac_fn_c_try_link "$LINENO"; then :
11602 ac_cv_lib_sun_getpwent=yes
3185942a 11603else
ac50fbac 11604 ac_cv_lib_sun_getpwent=no
3185942a 11605fi
ac50fbac
CR
11606rm -f core conftest.err conftest.$ac_objext \
11607 conftest$ac_exeext conftest.$ac_ext
11608LIBS=$ac_check_lib_save_LIBS
b72432fd 11609fi
ac50fbac
CR
11610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwent" >&5
11611$as_echo "$ac_cv_lib_sun_getpwent" >&6; }
11612if test "x$ac_cv_lib_sun_getpwent" = xyes; then :
11613 cat >>confdefs.h <<_ACEOF
11614#define HAVE_LIBSUN 1
11615_ACEOF
11616
11617 LIBS="-lsun $LIBS"
3185942a 11618
cce855bc 11619fi
ac50fbac
CR
11620 ;;
11621esac
f73dda09 11622
ac50fbac 11623if test "$ac_cv_func_getpeername" = no; then
cce855bc 11624
ac50fbac
CR
11625if test "X$bash_cv_have_socklib" = "X"; then
11626_bash_needmsg=
11627else
11628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket library" >&5
11629$as_echo_n "checking for socket library... " >&6; }
11630_bash_needmsg=yes
cce855bc 11631fi
ac50fbac 11632if ${bash_cv_have_socklib+:} false; then :
3185942a 11633 $as_echo_n "(cached) " >&6
cce855bc 11634else
ac50fbac
CR
11635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpeername in -lsocket" >&5
11636$as_echo_n "checking for getpeername in -lsocket... " >&6; }
11637if ${ac_cv_lib_socket_getpeername+:} false; then :
11638 $as_echo_n "(cached) " >&6
11639else
11640 ac_check_lib_save_LIBS=$LIBS
11641LIBS="-lsocket -lnsl $LIBS"
11642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 11643/* end confdefs.h. */
ac50fbac
CR
11644
11645/* Override any GCC internal prototype to avoid an error.
11646 Use char because int might match the return type of a GCC
11647 builtin and then its argument prototype would still apply. */
11648#ifdef __cplusplus
11649extern "C"
11650#endif
11651char getpeername ();
f73dda09
JA
11652int
11653main ()
11654{
ac50fbac 11655return getpeername ();
f73dda09
JA
11656 ;
11657 return 0;
11658}
11659_ACEOF
ac50fbac
CR
11660if ac_fn_c_try_link "$LINENO"; then :
11661 ac_cv_lib_socket_getpeername=yes
11662else
11663 ac_cv_lib_socket_getpeername=no
11664fi
11665rm -f core conftest.err conftest.$ac_objext \
11666 conftest$ac_exeext conftest.$ac_ext
11667LIBS=$ac_check_lib_save_LIBS
11668fi
11669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getpeername" >&5
11670$as_echo "$ac_cv_lib_socket_getpeername" >&6; }
11671if test "x$ac_cv_lib_socket_getpeername" = xyes; then :
11672 bash_cv_have_socklib=yes
11673else
11674 bash_cv_have_socklib=no
11675fi
11676
11677fi
11678
11679if test "X$_bash_needmsg" = Xyes; then
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_socklib" >&5
11681$as_echo "$bash_cv_have_socklib" >&6; }
11682 _bash_needmsg=
11683fi
11684if test $bash_cv_have_socklib = yes; then
11685 # check for libnsl, add it to LIBS if present
11686 if test "X$bash_cv_have_libnsl" = "X"; then
11687 _bash_needmsg=
11688 else
11689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5
11690$as_echo_n "checking for libnsl... " >&6; }
11691 _bash_needmsg=yes
11692 fi
11693 if ${bash_cv_have_libnsl+:} false; then :
11694 $as_echo_n "(cached) " >&6
11695else
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
11697$as_echo_n "checking for t_open in -lnsl... " >&6; }
11698if ${ac_cv_lib_nsl_t_open+:} false; then :
11699 $as_echo_n "(cached) " >&6
11700else
11701 ac_check_lib_save_LIBS=$LIBS
11702LIBS="-lnsl $LIBS"
11703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 11704/* end confdefs.h. */
ac50fbac
CR
11705
11706/* Override any GCC internal prototype to avoid an error.
11707 Use char because int might match the return type of a GCC
11708 builtin and then its argument prototype would still apply. */
11709#ifdef __cplusplus
11710extern "C"
11711#endif
11712char t_open ();
3185942a
JA
11713int
11714main ()
11715{
ac50fbac 11716return t_open ();
3185942a
JA
11717 ;
11718 return 0;
11719}
11720_ACEOF
ac50fbac
CR
11721if ac_fn_c_try_link "$LINENO"; then :
11722 ac_cv_lib_nsl_t_open=yes
3185942a 11723else
ac50fbac 11724 ac_cv_lib_nsl_t_open=no
3185942a 11725fi
ac50fbac
CR
11726rm -f core conftest.err conftest.$ac_objext \
11727 conftest$ac_exeext conftest.$ac_ext
11728LIBS=$ac_check_lib_save_LIBS
11729fi
11730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
11731$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
11732if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
11733 bash_cv_have_libnsl=yes
3185942a 11734else
ac50fbac 11735 bash_cv_have_libnsl=no
3185942a
JA
11736fi
11737
3185942a 11738fi
3185942a 11739
ac50fbac
CR
11740 if test "X$_bash_needmsg" = Xyes; then
11741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_libnsl" >&5
11742$as_echo "$bash_cv_have_libnsl" >&6; }
11743 _bash_needmsg=
11744 fi
11745 if test $bash_cv_have_libnsl = yes; then
11746 LIBS="-lsocket -lnsl $LIBS"
11747 else
11748 LIBS="-lsocket $LIBS"
11749 fi
11750 $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h
11751
11752 $as_echo "#define HAVE_GETPEERNAME 1" >>confdefs.h
3185942a
JA
11753
11754fi
11755
ac50fbac
CR
11756fi
11757if test "$ac_cv_func_gethostbyname" = no; then
11758 if test "X$bash_cv_have_gethostbyname" = "X"; then
11759_bash_needmsg=yes
3185942a 11760else
ac50fbac
CR
11761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5
11762$as_echo_n "checking for gethostbyname in socket library... " >&6; }
11763_bash_needmsg=
11764fi
11765if ${bash_cv_have_gethostbyname+:} false; then :
3185942a
JA
11766 $as_echo_n "(cached) " >&6
11767else
ac50fbac 11768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 11769/* end confdefs.h. */
ac50fbac 11770#include <netdb.h>
3185942a
JA
11771int
11772main ()
11773{
ac50fbac
CR
11774 struct hostent *hp;
11775 hp = gethostbyname("localhost");
11776
3185942a
JA
11777 ;
11778 return 0;
11779}
11780_ACEOF
ac50fbac
CR
11781if ac_fn_c_try_link "$LINENO"; then :
11782 bash_cv_have_gethostbyname=yes
3185942a 11783else
ac50fbac 11784 bash_cv_have_gethostbyname=no
3185942a 11785fi
ac50fbac
CR
11786rm -f core conftest.err conftest.$ac_objext \
11787 conftest$ac_exeext conftest.$ac_ext
3185942a 11788
ac50fbac 11789fi
3185942a 11790
ac50fbac
CR
11791if test "X$_bash_needmsg" = Xyes; then
11792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5
11793$as_echo_n "checking for gethostbyname in socket library... " >&6; }
11794fi
11795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_gethostbyname" >&5
11796$as_echo "$bash_cv_have_gethostbyname" >&6; }
11797if test "$bash_cv_have_gethostbyname" = yes; then
11798$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
3185942a
JA
11799
11800fi
11801
3185942a 11802fi
ac50fbac 11803
ac50fbac
CR
11804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
11805$as_echo_n "checking type of array argument to getgroups... " >&6; }
11806if ${ac_cv_type_getgroups+:} false; then :
3185942a
JA
11807 $as_echo_n "(cached) " >&6
11808else
ac50fbac
CR
11809 if test "$cross_compiling" = yes; then :
11810 ac_cv_type_getgroups=cross
11811else
11812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 11813/* end confdefs.h. */
ac50fbac 11814/* Thanks to Mike Rendell for this test. */
3185942a 11815$ac_includes_default
ac50fbac
CR
11816#define NGID 256
11817#undef MAX
11818#define MAX(x, y) ((x) > (y) ? (x) : (y))
11819
3185942a
JA
11820int
11821main ()
11822{
ac50fbac
CR
11823 gid_t gidset[NGID];
11824 int i, n;
11825 union { gid_t gval; long int lval; } val;
11826
11827 val.lval = -1;
11828 for (i = 0; i < NGID; i++)
11829 gidset[i] = val.gval;
11830 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
11831 gidset);
11832 /* Exit non-zero if getgroups seems to require an array of ints. This
11833 happens when gid_t is short int but getgroups modifies an array
11834 of ints. */
11835 return n > 0 && gidset[n] != val.gval;
3185942a
JA
11836}
11837_ACEOF
ac50fbac
CR
11838if ac_fn_c_try_run "$LINENO"; then :
11839 ac_cv_type_getgroups=gid_t
11840else
11841 ac_cv_type_getgroups=int
11842fi
11843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11844 conftest.$ac_objext conftest.beam conftest.$ac_ext
11845fi
11846
11847if test $ac_cv_type_getgroups = cross; then
11848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 11849/* end confdefs.h. */
ac50fbac
CR
11850#include <unistd.h>
11851
3185942a 11852_ACEOF
ac50fbac
CR
11853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11854 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
11855 ac_cv_type_getgroups=gid_t
3185942a 11856else
ac50fbac
CR
11857 ac_cv_type_getgroups=int
11858fi
11859rm -f conftest*
3185942a 11860
3185942a 11861fi
ac50fbac
CR
11862fi
11863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
11864$as_echo "$ac_cv_type_getgroups" >&6; }
11865
11866cat >>confdefs.h <<_ACEOF
11867#define GETGROUPS_T $ac_cv_type_getgroups
11868_ACEOF
11869
11870
11871ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
11872if test "x$ac_cv_type_off_t" = xyes; then :
3185942a 11873
3185942a 11874else
3185942a 11875
ac50fbac
CR
11876cat >>confdefs.h <<_ACEOF
11877#define off_t long int
11878_ACEOF
3185942a
JA
11879
11880fi
11881
ac50fbac
CR
11882ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11883if test "x$ac_cv_type_mode_t" = xyes; then :
11884
3185942a
JA
11885else
11886
11887cat >>confdefs.h <<_ACEOF
ac50fbac 11888#define mode_t int
3185942a
JA
11889_ACEOF
11890
11891fi
11892
ac50fbac
CR
11893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
11894$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
11895if ${ac_cv_type_uid_t+:} false; then :
3185942a
JA
11896 $as_echo_n "(cached) " >&6
11897else
ac50fbac 11898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 11899/* end confdefs.h. */
ac50fbac
CR
11900#include <sys/types.h>
11901
3185942a 11902_ACEOF
ac50fbac
CR
11903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11904 $EGREP "uid_t" >/dev/null 2>&1; then :
11905 ac_cv_type_uid_t=yes
3185942a 11906else
ac50fbac 11907 ac_cv_type_uid_t=no
3185942a 11908fi
ac50fbac 11909rm -f conftest*
3185942a 11910
ac50fbac
CR
11911fi
11912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
11913$as_echo "$ac_cv_type_uid_t" >&6; }
11914if test $ac_cv_type_uid_t = no; then
3185942a 11915
ac50fbac 11916$as_echo "#define uid_t int" >>confdefs.h
3185942a 11917
3185942a 11918
ac50fbac
CR
11919$as_echo "#define gid_t int" >>confdefs.h
11920
3185942a 11921fi
ac50fbac
CR
11922
11923ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11924if test "x$ac_cv_type_pid_t" = xyes; then :
11925
3185942a
JA
11926else
11927
11928cat >>confdefs.h <<_ACEOF
ac50fbac 11929#define pid_t int
3185942a
JA
11930_ACEOF
11931
11932fi
11933
ac50fbac
CR
11934ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
11935if test "x$ac_cv_type_size_t" = xyes; then :
11936
3185942a 11937else
ac50fbac
CR
11938
11939cat >>confdefs.h <<_ACEOF
11940#define size_t unsigned int
3185942a 11941_ACEOF
3185942a 11942
3185942a
JA
11943fi
11944
a0c0a00f
CR
11945
11946 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
11947if test "x$ac_cv_type_uintptr_t" = xyes; then :
11948
11949$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
11950
11951else
11952 for ac_type in 'unsigned int' 'unsigned long int' \
11953 'unsigned long long int'; do
11954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11955/* end confdefs.h. */
11956$ac_includes_default
11957int
11958main ()
11959{
11960static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11961test_array [0] = 0;
11962return test_array [0];
11963
11964 ;
11965 return 0;
11966}
11967_ACEOF
11968if ac_fn_c_try_compile "$LINENO"; then :
11969
11970cat >>confdefs.h <<_ACEOF
11971#define uintptr_t $ac_type
11972_ACEOF
11973
11974 ac_type=
11975fi
11976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11977 test -z "$ac_type" && break
11978 done
11979fi
11980
11981
11982
ac50fbac
CR
11983ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
11984if test "x$ac_cv_type_ssize_t" = xyes; then :
11985
3185942a 11986else
3185942a 11987
ac50fbac
CR
11988cat >>confdefs.h <<_ACEOF
11989#define ssize_t int
11990_ACEOF
3185942a
JA
11991
11992fi
11993
ac50fbac
CR
11994ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default"
11995if test "x$ac_cv_type_time_t" = xyes; then :
11996
3185942a
JA
11997else
11998
11999cat >>confdefs.h <<_ACEOF
ac50fbac 12000#define time_t long
3185942a
JA
12001_ACEOF
12002
12003fi
12004
3185942a
JA
12005
12006
ac50fbac
CR
12007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5
12008$as_echo_n "checking for long long... " >&6; }
12009if ${bash_cv_type_long_long+:} false; then :
3185942a
JA
12010 $as_echo_n "(cached) " >&6
12011else
ac50fbac 12012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 12013/* end confdefs.h. */
ac50fbac
CR
12014
12015long long ll = 1; int i = 63;
3185942a
JA
12016int
12017main ()
12018{
ac50fbac
CR
12019
12020long long llm = (long long) -1;
12021return ll << i | ll >> i | llm / ll | llm % ll;
12022
3185942a
JA
12023 ;
12024 return 0;
12025}
12026_ACEOF
ac50fbac
CR
12027if ac_fn_c_try_link "$LINENO"; then :
12028 bash_cv_type_long_long='long long'
12029else
12030 bash_cv_type_long_long='long'
12031fi
12032rm -f core conftest.err conftest.$ac_objext \
12033 conftest$ac_exeext conftest.$ac_ext
12034fi
12035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_long_long" >&5
12036$as_echo "$bash_cv_type_long_long" >&6; }
12037if test "$bash_cv_type_long_long" = 'long long'; then
12038 $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
12039
12040fi
12041
12042
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5
12044$as_echo_n "checking for unsigned long long... " >&6; }
12045if ${bash_cv_type_unsigned_long_long+:} false; then :
12046 $as_echo_n "(cached) " >&6
12047else
12048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 12049/* end confdefs.h. */
ac50fbac
CR
12050
12051unsigned long long ull = 1; int i = 63;
3185942a
JA
12052int
12053main ()
12054{
ac50fbac
CR
12055
12056unsigned long long ullmax = (unsigned long long) -1;
12057return ull << i | ull >> i | ullmax / ull | ullmax % ull;
12058
3185942a
JA
12059 ;
12060 return 0;
12061}
12062_ACEOF
ac50fbac
CR
12063if ac_fn_c_try_link "$LINENO"; then :
12064 bash_cv_type_unsigned_long_long='unsigned long long'
3185942a 12065else
ac50fbac 12066 bash_cv_type_unsigned_long_long='unsigned long'
3185942a 12067fi
ac50fbac
CR
12068rm -f core conftest.err conftest.$ac_objext \
12069 conftest$ac_exeext conftest.$ac_ext
3185942a 12070fi
ac50fbac
CR
12071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_unsigned_long_long" >&5
12072$as_echo "$bash_cv_type_unsigned_long_long" >&6; }
12073if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
12074 $as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h
3185942a 12075
3185942a 12076fi
3185942a 12077
cce855bc 12078
ac50fbac
CR
12079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
12080$as_echo_n "checking return type of signal handlers... " >&6; }
12081if ${ac_cv_type_signal+:} false; then :
3185942a 12082 $as_echo_n "(cached) " >&6
cce855bc 12083else
ac50fbac 12084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12085/* end confdefs.h. */
ac50fbac
CR
12086#include <sys/types.h>
12087#include <signal.h>
12088
f73dda09
JA
12089int
12090main ()
12091{
ac50fbac 12092return *(signal (0, 0)) (0) == 1;
3185942a 12093 ;
f73dda09 12094 return 0;
3185942a
JA
12095}
12096_ACEOF
ac50fbac
CR
12097if ac_fn_c_try_compile "$LINENO"; then :
12098 ac_cv_type_signal=int
12099else
12100 ac_cv_type_signal=void
12101fi
12102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12103fi
12104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
12105$as_echo "$ac_cv_type_signal" >&6; }
12106
12107cat >>confdefs.h <<_ACEOF
12108#define RETSIGTYPE $ac_cv_type_signal
3185942a 12109_ACEOF
ac50fbac
CR
12110
12111
12112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5
12113$as_echo_n "checking for sig_atomic_t in signal.h... " >&6; }
12114if ${ac_cv_have_sig_atomic_t+:} false; then :
12115 $as_echo_n "(cached) " >&6
12116else
12117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 12118/* end confdefs.h. */
ac50fbac
CR
12119
12120#include <signal.h>
12121
3185942a
JA
12122int
12123main ()
12124{
ac50fbac 12125 sig_atomic_t x;
f73dda09
JA
12126 ;
12127 return 0;
12128}
12129_ACEOF
ac50fbac
CR
12130if ac_fn_c_try_link "$LINENO"; then :
12131 ac_cv_have_sig_atomic_t=yes
3185942a 12132else
ac50fbac
CR
12133 ac_cv_have_sig_atomic_t=no
12134fi
12135rm -f core conftest.err conftest.$ac_objext \
12136 conftest$ac_exeext conftest.$ac_ext
3185942a 12137fi
ac50fbac
CR
12138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5
12139$as_echo "$ac_cv_have_sig_atomic_t" >&6; }
12140if test "$ac_cv_have_sig_atomic_t" = "no"
12141then
12142 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default"
12143if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
3185942a 12144
3185942a 12145else
3185942a 12146
ac50fbac
CR
12147cat >>confdefs.h <<_ACEOF
12148#define sig_atomic_t int
12149_ACEOF
3185942a
JA
12150
12151fi
12152
3185942a 12153fi
ac50fbac
CR
12154
12155
12156# The cast to long int works around a bug in the HP C Compiler
12157# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12158# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12159# This bug is HP SR number 8606223364.
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
12161$as_echo_n "checking size of char... " >&6; }
12162if ${ac_cv_sizeof_char+:} false; then :
12163 $as_echo_n "(cached) " >&6
3185942a 12164else
ac50fbac 12165 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then :
3185942a 12166
ac50fbac
CR
12167else
12168 if test "$ac_cv_type_char" = yes; then
12169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12171as_fn_error 77 "cannot compute sizeof (char)
12172See \`config.log' for more details" "$LINENO" 5; }
12173 else
12174 ac_cv_sizeof_char=0
12175 fi
12176fi
3185942a
JA
12177
12178fi
ac50fbac
CR
12179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
12180$as_echo "$ac_cv_sizeof_char" >&6; }
3185942a 12181
ac50fbac
CR
12182
12183
12184cat >>confdefs.h <<_ACEOF
12185#define SIZEOF_CHAR $ac_cv_sizeof_char
3185942a 12186_ACEOF
ac50fbac
CR
12187
12188
12189# The cast to long int works around a bug in the HP C Compiler
12190# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12191# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12192# This bug is HP SR number 8606223364.
12193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
12194$as_echo_n "checking size of short... " >&6; }
12195if ${ac_cv_sizeof_short+:} false; then :
12196 $as_echo_n "(cached) " >&6
3185942a 12197else
ac50fbac
CR
12198 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
12199
12200else
12201 if test "$ac_cv_type_short" = yes; then
12202 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12204as_fn_error 77 "cannot compute sizeof (short)
12205See \`config.log' for more details" "$LINENO" 5; }
12206 else
12207 ac_cv_sizeof_short=0
12208 fi
12209fi
3185942a 12210
3185942a 12211fi
ac50fbac
CR
12212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
12213$as_echo "$ac_cv_sizeof_short" >&6; }
3185942a 12214
0628567a 12215
3185942a 12216
ac50fbac
CR
12217cat >>confdefs.h <<_ACEOF
12218#define SIZEOF_SHORT $ac_cv_sizeof_short
12219_ACEOF
12220
12221
12222# The cast to long int works around a bug in the HP C Compiler
12223# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12224# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12225# This bug is HP SR number 8606223364.
12226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
12227$as_echo_n "checking size of int... " >&6; }
12228if ${ac_cv_sizeof_int+:} false; then :
12229 $as_echo_n "(cached) " >&6
12230else
12231 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
12232
12233else
12234 if test "$ac_cv_type_int" = yes; then
12235 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12237as_fn_error 77 "cannot compute sizeof (int)
12238See \`config.log' for more details" "$LINENO" 5; }
12239 else
12240 ac_cv_sizeof_int=0
12241 fi
b72432fd 12242fi
3185942a 12243
b72432fd 12244fi
ac50fbac
CR
12245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
12246$as_echo "$ac_cv_sizeof_int" >&6; }
12247
12248
f73dda09 12249
b80f6443 12250cat >>confdefs.h <<_ACEOF
ac50fbac 12251#define SIZEOF_INT $ac_cv_sizeof_int
b80f6443 12252_ACEOF
b72432fd 12253
ac50fbac
CR
12254
12255# The cast to long int works around a bug in the HP C Compiler
12256# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12257# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12258# This bug is HP SR number 8606223364.
12259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
12260$as_echo_n "checking size of long... " >&6; }
12261if ${ac_cv_sizeof_long+:} false; then :
12262 $as_echo_n "(cached) " >&6
12263else
12264 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
12265
12266else
12267 if test "$ac_cv_type_long" = yes; then
12268 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12270as_fn_error 77 "cannot compute sizeof (long)
12271See \`config.log' for more details" "$LINENO" 5; }
12272 else
12273 ac_cv_sizeof_long=0
12274 fi
b72432fd 12275fi
cce855bc 12276
b72432fd 12277fi
ac50fbac
CR
12278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
12279$as_echo "$ac_cv_sizeof_long" >&6; }
b72432fd 12280
b80f6443 12281
ac50fbac
CR
12282
12283cat >>confdefs.h <<_ACEOF
12284#define SIZEOF_LONG $ac_cv_sizeof_long
12285_ACEOF
12286
12287
12288# The cast to long int works around a bug in the HP C Compiler
12289# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12290# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12291# This bug is HP SR number 8606223364.
12292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
12293$as_echo_n "checking size of char *... " >&6; }
12294if ${ac_cv_sizeof_char_p+:} false; then :
3185942a
JA
12295 $as_echo_n "(cached) " >&6
12296else
ac50fbac
CR
12297 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then :
12298
3185942a 12299else
ac50fbac
CR
12300 if test "$ac_cv_type_char_p" = yes; then
12301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12303as_fn_error 77 "cannot compute sizeof (char *)
12304See \`config.log' for more details" "$LINENO" 5; }
12305 else
12306 ac_cv_sizeof_char_p=0
12307 fi
12308fi
3185942a 12309
3185942a 12310fi
ac50fbac
CR
12311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
12312$as_echo "$ac_cv_sizeof_char_p" >&6; }
3185942a 12313
3185942a
JA
12314
12315
ac50fbac
CR
12316cat >>confdefs.h <<_ACEOF
12317#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
12318_ACEOF
12319
12320
12321# The cast to long int works around a bug in the HP C Compiler
12322# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12323# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12324# This bug is HP SR number 8606223364.
12325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
12326$as_echo_n "checking size of double... " >&6; }
12327if ${ac_cv_sizeof_double+:} false; then :
12328 $as_echo_n "(cached) " >&6
12329else
12330 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
12331
12332else
12333 if test "$ac_cv_type_double" = yes; then
12334 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12336as_fn_error 77 "cannot compute sizeof (double)
12337See \`config.log' for more details" "$LINENO" 5; }
12338 else
12339 ac_cv_sizeof_double=0
12340 fi
3185942a
JA
12341fi
12342
3185942a 12343fi
ac50fbac
CR
12344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
12345$as_echo "$ac_cv_sizeof_double" >&6; }
12346
12347
3185942a
JA
12348
12349cat >>confdefs.h <<_ACEOF
ac50fbac 12350#define SIZEOF_DOUBLE $ac_cv_sizeof_double
3185942a
JA
12351_ACEOF
12352
3185942a 12353
ac50fbac
CR
12354# The cast to long int works around a bug in the HP C Compiler
12355# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12356# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12357# This bug is HP SR number 8606223364.
12358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12359$as_echo_n "checking size of long long... " >&6; }
12360if ${ac_cv_sizeof_long_long+:} false; then :
3185942a
JA
12361 $as_echo_n "(cached) " >&6
12362else
ac50fbac
CR
12363 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12364
3185942a 12365else
ac50fbac
CR
12366 if test "$ac_cv_type_long_long" = yes; then
12367 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12368$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12369as_fn_error 77 "cannot compute sizeof (long long)
12370See \`config.log' for more details" "$LINENO" 5; }
12371 else
12372 ac_cv_sizeof_long_long=0
12373 fi
12374fi
3185942a 12375
3185942a 12376fi
ac50fbac
CR
12377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12378$as_echo "$ac_cv_sizeof_long_long" >&6; }
3185942a 12379
3185942a
JA
12380
12381
ac50fbac
CR
12382cat >>confdefs.h <<_ACEOF
12383#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12384_ACEOF
12385
12386
12387
12388ac_fn_c_check_type "$LINENO" "u_int" "ac_cv_type_u_int" "$ac_includes_default"
12389if test "x$ac_cv_type_u_int" = xyes; then :
3185942a 12390
3185942a
JA
12391else
12392
12393cat >>confdefs.h <<_ACEOF
ac50fbac 12394#define u_int unsigned int
3185942a
JA
12395_ACEOF
12396
12397fi
12398
ac50fbac
CR
12399ac_fn_c_check_type "$LINENO" "u_long" "ac_cv_type_u_long" "$ac_includes_default"
12400if test "x$ac_cv_type_u_long" = xyes; then :
12401
cce855bc 12402else
ac50fbac
CR
12403
12404cat >>confdefs.h <<_ACEOF
12405#define u_long unsigned long
f73dda09 12406_ACEOF
3185942a 12407
ac50fbac
CR
12408fi
12409
12410
12411
12412if test "$ac_cv_sizeof_short" = 2; then
12413 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
12414if test "x$ac_cv_type_bits16_t" = xyes; then :
3185942a 12415
b72432fd 12416else
0628567a 12417
ac50fbac
CR
12418cat >>confdefs.h <<_ACEOF
12419#define bits16_t short
12420_ACEOF
3185942a 12421
b72432fd 12422fi
3185942a 12423
ac50fbac
CR
12424elif test "$ac_cv_sizeof_char" = 2; then
12425 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
12426if test "x$ac_cv_type_bits16_t" = xyes; then :
12427
f73dda09
JA
12428else
12429
b80f6443 12430cat >>confdefs.h <<_ACEOF
ac50fbac 12431#define bits16_t char
b80f6443 12432_ACEOF
b72432fd
JA
12433
12434fi
12435
b72432fd 12436else
ac50fbac
CR
12437 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
12438if test "x$ac_cv_type_bits16_t" = xyes; then :
12439
3185942a 12440else
3185942a 12441
ac50fbac
CR
12442cat >>confdefs.h <<_ACEOF
12443#define bits16_t short
12444_ACEOF
12445
3185942a
JA
12446fi
12447
ac50fbac
CR
12448fi
12449
12450
12451if test "$ac_cv_sizeof_short" = 2; then
12452 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
12453if test "x$ac_cv_type_u_bits16_t" = xyes; then :
12454
b72432fd 12455else
0628567a 12456
ac50fbac
CR
12457cat >>confdefs.h <<_ACEOF
12458#define u_bits16_t unsigned short
12459_ACEOF
3185942a 12460
f73dda09 12461fi
3185942a 12462
ac50fbac
CR
12463elif test "$ac_cv_sizeof_char" = 2; then
12464 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
12465if test "x$ac_cv_type_u_bits16_t" = xyes; then :
12466
f73dda09
JA
12467else
12468
b80f6443 12469cat >>confdefs.h <<_ACEOF
ac50fbac 12470#define u_bits16_t unsigned char
b80f6443 12471_ACEOF
f73dda09 12472
cce855bc 12473fi
b72432fd 12474
3185942a 12475else
ac50fbac
CR
12476 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
12477if test "x$ac_cv_type_u_bits16_t" = xyes; then :
12478
f73dda09 12479else
ac50fbac
CR
12480
12481cat >>confdefs.h <<_ACEOF
12482#define u_bits16_t unsigned short
f73dda09 12483_ACEOF
3185942a 12484
3185942a
JA
12485fi
12486
ac50fbac
CR
12487fi
12488
12489
12490if test "$ac_cv_sizeof_int" = 4; then
12491 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
12492if test "x$ac_cv_type_bits32_t" = xyes; then :
12493
b72432fd 12494else
0628567a 12495
ac50fbac
CR
12496cat >>confdefs.h <<_ACEOF
12497#define bits32_t int
12498_ACEOF
3185942a 12499
b72432fd 12500fi
3185942a 12501
ac50fbac
CR
12502elif test "$ac_cv_sizeof_long" = 4; then
12503 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
12504if test "x$ac_cv_type_bits32_t" = xyes; then :
12505
12506else
12507
12508cat >>confdefs.h <<_ACEOF
12509#define bits32_t long
12510_ACEOF
12511
b72432fd 12512fi
ac50fbac
CR
12513
12514else
12515 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
12516if test "x$ac_cv_type_bits32_t" = xyes; then :
12517
f73dda09
JA
12518else
12519
b80f6443 12520cat >>confdefs.h <<_ACEOF
ac50fbac 12521#define bits32_t int
b80f6443 12522_ACEOF
cce855bc
JA
12523
12524fi
12525
12526fi
12527
b80f6443 12528
ac50fbac
CR
12529if test "$ac_cv_sizeof_int" = 4; then
12530 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
12531if test "x$ac_cv_type_u_bits32_t" = xyes; then :
b80f6443 12532
bb70624e 12533else
ac50fbac
CR
12534
12535cat >>confdefs.h <<_ACEOF
12536#define u_bits32_t unsigned int
3185942a 12537_ACEOF
3185942a 12538
3185942a
JA
12539fi
12540
ac50fbac
CR
12541elif test "$ac_cv_sizeof_long" = 4; then
12542 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
12543if test "x$ac_cv_type_u_bits32_t" = xyes; then :
12544
bb70624e 12545else
0628567a 12546
ac50fbac
CR
12547cat >>confdefs.h <<_ACEOF
12548#define u_bits32_t unsigned long
12549_ACEOF
3185942a 12550
bb70624e 12551fi
3185942a 12552
ac50fbac
CR
12553else
12554 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
12555if test "x$ac_cv_type_u_bits32_t" = xyes; then :
12556
f73dda09
JA
12557else
12558
b80f6443 12559cat >>confdefs.h <<_ACEOF
ac50fbac 12560#define u_bits32_t unsigned int
b80f6443 12561_ACEOF
bb70624e
JA
12562
12563fi
12564
ac50fbac
CR
12565fi
12566
12567
12568if test "$ac_cv_sizeof_char_p" = 8; then
12569 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12570if test "x$ac_cv_type_bits64_t" = xyes; then :
12571
bb70624e 12572else
ac50fbac
CR
12573
12574cat >>confdefs.h <<_ACEOF
12575#define bits64_t char *
3185942a 12576_ACEOF
3185942a 12577
3185942a
JA
12578fi
12579
ac50fbac
CR
12580elif test "$ac_cv_sizeof_double" = 8; then
12581 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12582if test "x$ac_cv_type_bits64_t" = xyes; then :
12583
bb70624e 12584else
0628567a 12585
ac50fbac
CR
12586cat >>confdefs.h <<_ACEOF
12587#define bits64_t double
12588_ACEOF
3185942a 12589
bb70624e 12590fi
3185942a 12591
ac50fbac
CR
12592elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
12593 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12594if test "x$ac_cv_type_bits64_t" = xyes; then :
12595
f73dda09
JA
12596else
12597
b80f6443 12598cat >>confdefs.h <<_ACEOF
ac50fbac 12599#define bits64_t long long
b80f6443 12600_ACEOF
bb70624e
JA
12601
12602fi
12603
ac50fbac
CR
12604elif test "$ac_cv_sizeof_long" = 8; then
12605 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12606if test "x$ac_cv_type_bits64_t" = xyes; then :
12607
bb70624e 12608else
ac50fbac
CR
12609
12610cat >>confdefs.h <<_ACEOF
12611#define bits64_t long
3185942a 12612_ACEOF
3185942a 12613
3185942a
JA
12614fi
12615
bb70624e 12616else
ac50fbac
CR
12617 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
12618if test "x$ac_cv_type_bits64_t" = xyes; then :
12619
12620else
0628567a 12621
ac50fbac
CR
12622cat >>confdefs.h <<_ACEOF
12623#define bits64_t double
12624_ACEOF
3185942a 12625
f73dda09 12626fi
3185942a 12627
f73dda09 12628fi
ac50fbac
CR
12629
12630
12631
12632if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
12633 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12634if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12635
f73dda09
JA
12636else
12637
b80f6443 12638cat >>confdefs.h <<_ACEOF
ac50fbac 12639#define ptrdiff_t int
b80f6443 12640_ACEOF
f73dda09 12641
bb70624e 12642fi
bb70624e 12643
ac50fbac
CR
12644elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
12645 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12646if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12647
f73dda09 12648else
ac50fbac
CR
12649
12650cat >>confdefs.h <<_ACEOF
12651#define ptrdiff_t long
3185942a 12652_ACEOF
3185942a 12653
3185942a
JA
12654fi
12655
ac50fbac
CR
12656elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
12657 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12658if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12659
f73dda09 12660else
0628567a 12661
ac50fbac
CR
12662cat >>confdefs.h <<_ACEOF
12663#define ptrdiff_t long long
12664_ACEOF
3185942a 12665
bb70624e 12666fi
3185942a 12667
ac50fbac
CR
12668else
12669 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
12670if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
12671
f73dda09
JA
12672else
12673
b80f6443 12674cat >>confdefs.h <<_ACEOF
bb70624e 12675#define ptrdiff_t int
b80f6443 12676_ACEOF
bb70624e
JA
12677
12678fi
12679
12680fi
12681
b80f6443 12682
ac50fbac 12683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
3185942a 12684$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
ac50fbac 12685if ${ac_cv_header_stat_broken+:} false; then :
3185942a 12686 $as_echo_n "(cached) " >&6
ccc6cda3 12687else
ac50fbac 12688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12689/* end confdefs.h. */
ccc6cda3
JA
12690#include <sys/types.h>
12691#include <sys/stat.h>
12692
3185942a
JA
12693#if defined S_ISBLK && defined S_IFDIR
12694extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
ccc6cda3
JA
12695#endif
12696
3185942a
JA
12697#if defined S_ISBLK && defined S_IFCHR
12698extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
ccc6cda3
JA
12699#endif
12700
3185942a
JA
12701#if defined S_ISLNK && defined S_IFREG
12702extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
ccc6cda3
JA
12703#endif
12704
3185942a
JA
12705#if defined S_ISSOCK && defined S_IFREG
12706extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
f73dda09
JA
12707#endif
12708
12709_ACEOF
ac50fbac 12710if ac_fn_c_try_compile "$LINENO"; then :
f73dda09 12711 ac_cv_header_stat_broken=no
3185942a 12712else
ac50fbac 12713 ac_cv_header_stat_broken=yes
ccc6cda3 12714fi
3185942a 12715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 12716fi
ac50fbac 12717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
3185942a 12718$as_echo "$ac_cv_header_stat_broken" >&6; }
f73dda09 12719if test $ac_cv_header_stat_broken = yes; then
ccc6cda3 12720
ac50fbac 12721$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
ccc6cda3
JA
12722
12723fi
12724
b80f6443 12725
ac50fbac 12726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5
3185942a 12727$as_echo_n "checking whether #! works in shell scripts... " >&6; }
ac50fbac 12728if ${ac_cv_sys_interpreter+:} false; then :
3185942a 12729 $as_echo_n "(cached) " >&6
ccc6cda3
JA
12730else
12731 echo '#! /bin/cat
12732exit 69
f73dda09 12733' >conftest
ccc6cda3 12734chmod u+x conftest
3185942a 12735(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
ccc6cda3
JA
12736if test $? -ne 69; then
12737 ac_cv_sys_interpreter=yes
12738else
12739 ac_cv_sys_interpreter=no
12740fi
12741rm -f conftest
12742fi
ac50fbac 12743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5
3185942a 12744$as_echo "$ac_cv_sys_interpreter" >&6; }
f73dda09 12745interpval=$ac_cv_sys_interpreter
ccc6cda3
JA
12746
12747if test $ac_cv_sys_interpreter = yes; then
ac50fbac 12748$as_echo "#define HAVE_HASH_BANG_EXEC 1" >>confdefs.h
ccc6cda3 12749
ccc6cda3
JA
12750fi
12751
ccc6cda3 12752if test "$ac_cv_func_lstat" = "no"; then
ac50fbac 12753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5
3185942a 12754$as_echo_n "checking for lstat... " >&6; }
ac50fbac 12755if ${bash_cv_func_lstat+:} false; then :
3185942a 12756 $as_echo_n "(cached) " >&6
ccc6cda3 12757else
ac50fbac 12758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12759/* end confdefs.h. */
ccc6cda3
JA
12760
12761#include <sys/types.h>
12762#include <sys/stat.h>
12763
f73dda09
JA
12764int
12765main ()
12766{
12767 lstat(".",(struct stat *)0);
12768 ;
12769 return 0;
12770}
12771_ACEOF
ac50fbac 12772if ac_fn_c_try_link "$LINENO"; then :
ccc6cda3
JA
12773 bash_cv_func_lstat=yes
12774else
ac50fbac 12775 bash_cv_func_lstat=no
ccc6cda3 12776fi
ac50fbac
CR
12777rm -f core conftest.err conftest.$ac_objext \
12778 conftest$ac_exeext conftest.$ac_ext
ccc6cda3 12779fi
ac50fbac 12780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5
3185942a 12781$as_echo "$bash_cv_func_lstat" >&6; }
ccc6cda3 12782if test $bash_cv_func_lstat = yes; then
ac50fbac 12783 $as_echo "#define HAVE_LSTAT 1" >>confdefs.h
b80f6443
JA
12784
12785fi
12786
12787fi
12788
12789
ac50fbac 12790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the ctype macros accept non-ascii characters" >&5
3185942a 12791$as_echo_n "checking whether the ctype macros accept non-ascii characters... " >&6; }
ac50fbac 12792if ${bash_cv_func_ctype_nonascii+:} false; then :
3185942a 12793 $as_echo_n "(cached) " >&6
b80f6443 12794else
ac50fbac
CR
12795 if test "$cross_compiling" = yes; then :
12796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5
3185942a 12797$as_echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;}
b80f6443
JA
12798 bash_cv_func_ctype_nonascii=no
12799
12800else
ac50fbac 12801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12802/* end confdefs.h. */
b80f6443
JA
12803
12804#ifdef HAVE_LOCALE_H
12805#include <locale.h>
12806#endif
12807#include <stdio.h>
12808#include <ctype.h>
12809
12810main(c, v)
12811int c;
12812char *v[];
12813{
12814 char *deflocale;
12815 unsigned char x;
12816 int r1, r2;
12817
12818#ifdef HAVE_SETLOCALE
12819 /* We take a shot here. If that locale is not known, try the
12820 system default. We try this one because '\342' (226) is
12821 known to be a printable character in that locale. */
12822 deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
12823 if (deflocale == 0)
12824 deflocale = setlocale(LC_ALL, "");
12825#endif
12826
12827 x = '\342';
12828 r1 = isprint(x);
12829 x -= 128;
12830 r2 = isprint(x);
12831 exit (r1 == 0 || r2 == 0);
12832}
12833
12834_ACEOF
ac50fbac 12835if ac_fn_c_try_run "$LINENO"; then :
b80f6443
JA
12836 bash_cv_func_ctype_nonascii=yes
12837else
ac50fbac 12838 bash_cv_func_ctype_nonascii=no
b80f6443 12839fi
ac50fbac
CR
12840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12841 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 12842fi
3185942a 12843
b80f6443
JA
12844fi
12845
ac50fbac 12846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_ctype_nonascii" >&5
3185942a 12847$as_echo "$bash_cv_func_ctype_nonascii" >&6; }
b80f6443 12848if test $bash_cv_func_ctype_nonascii = yes; then
ac50fbac 12849$as_echo "#define CTYPE_NON_ASCII 1" >>confdefs.h
ccc6cda3
JA
12850
12851fi
12852
ac50fbac 12853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5
3185942a 12854$as_echo_n "checking if dup2 fails to clear the close-on-exec flag... " >&6; }
ac50fbac 12855if ${bash_cv_dup2_broken+:} false; then :
3185942a 12856 $as_echo_n "(cached) " >&6
ccc6cda3 12857else
ac50fbac
CR
12858 if test "$cross_compiling" = yes; then :
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5
3185942a 12860$as_echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;}
cce855bc 12861 bash_cv_dup2_broken=no
ccc6cda3 12862else
ac50fbac 12863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12864/* end confdefs.h. */
ccc6cda3
JA
12865
12866#include <sys/types.h>
12867#include <fcntl.h>
12868main()
12869{
12870 int fd1, fd2, fl;
12871 fd1 = open("/dev/null", 2);
12872 if (fcntl(fd1, 2, 1) < 0)
12873 exit(1);
12874 fd2 = dup2(fd1, 1);
12875 if (fd2 < 0)
12876 exit(2);
12877 fl = fcntl(fd2, 1, 0);
12878 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
12879 exit(fl != 1);
12880}
12881
f73dda09 12882_ACEOF
ac50fbac 12883if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
12884 bash_cv_dup2_broken=yes
12885else
ac50fbac 12886 bash_cv_dup2_broken=no
ccc6cda3 12887fi
ac50fbac
CR
12888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12889 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
12890fi
12891
3185942a 12892
ccc6cda3
JA
12893fi
12894
ac50fbac 12895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dup2_broken" >&5
3185942a 12896$as_echo "$bash_cv_dup2_broken" >&6; }
ccc6cda3 12897if test $bash_cv_dup2_broken = yes; then
ac50fbac 12898$as_echo "#define DUP2_BROKEN 1" >>confdefs.h
ccc6cda3
JA
12899
12900fi
12901
b80f6443 12902
ac50fbac 12903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pgrps need synchronization" >&5
3185942a 12904$as_echo_n "checking whether pgrps need synchronization... " >&6; }
ac50fbac 12905if ${bash_cv_pgrp_pipe+:} false; then :
3185942a 12906 $as_echo_n "(cached) " >&6
ccc6cda3 12907else
ac50fbac
CR
12908 if test "$cross_compiling" = yes; then :
12909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5
3185942a 12910$as_echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;}
cce855bc 12911 bash_cv_pgrp_pipe=no
ccc6cda3 12912else
ac50fbac 12913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12914/* end confdefs.h. */
ccc6cda3
JA
12915
12916#ifdef HAVE_UNISTD_H
12917# include <unistd.h>
12918#endif
12919main()
12920{
12921# ifdef GETPGRP_VOID
12922# define getpgID() getpgrp()
12923# else
12924# define getpgID() getpgrp(0)
12925# define setpgid(x,y) setpgrp(x,y)
12926# endif
12927 int pid1, pid2, fds[2];
12928 int status;
12929 char ok;
12930
12931 switch (pid1 = fork()) {
12932 case -1:
12933 exit(1);
12934 case 0:
12935 setpgid(0, getpid());
12936 exit(0);
12937 }
12938 setpgid(pid1, pid1);
12939
12940 sleep(2); /* let first child die */
12941
12942 if (pipe(fds) < 0)
12943 exit(2);
12944
12945 switch (pid2 = fork()) {
12946 case -1:
12947 exit(3);
12948 case 0:
12949 setpgid(0, pid1);
12950 ok = getpgID() == pid1;
12951 write(fds[1], &ok, 1);
12952 exit(0);
12953 }
12954 setpgid(pid2, pid1);
12955
12956 close(fds[1]);
12957 if (read(fds[0], &ok, 1) != 1)
12958 exit(4);
12959 wait(&status);
12960 wait(&status);
12961 exit(ok ? 0 : 5);
12962}
12963
f73dda09 12964_ACEOF
ac50fbac 12965if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
12966 bash_cv_pgrp_pipe=no
12967else
ac50fbac 12968 bash_cv_pgrp_pipe=yes
ccc6cda3 12969fi
ac50fbac
CR
12970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12971 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
12972fi
12973
3185942a 12974
ccc6cda3
JA
12975fi
12976
ac50fbac 12977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_pgrp_pipe" >&5
3185942a 12978$as_echo "$bash_cv_pgrp_pipe" >&6; }
ccc6cda3 12979if test $bash_cv_pgrp_pipe = yes; then
ac50fbac 12980$as_echo "#define PGRP_PIPE 1" >>confdefs.h
ccc6cda3
JA
12981
12982fi
12983
b80f6443 12984
ac50fbac 12985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5
3185942a 12986$as_echo_n "checking for type of signal functions... " >&6; }
ac50fbac 12987if ${bash_cv_signal_vintage+:} false; then :
3185942a 12988 $as_echo_n "(cached) " >&6
ccc6cda3 12989else
f73dda09 12990
ac50fbac 12991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12992/* end confdefs.h. */
d166f048 12993#include <signal.h>
f73dda09
JA
12994int
12995main ()
12996{
d166f048
JA
12997
12998 sigset_t ss;
12999 struct sigaction sa;
13000 sigemptyset(&ss); sigsuspend(&ss);
13001 sigaction(SIGINT, &sa, (struct sigaction *) 0);
13002 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
f73dda09
JA
13003
13004 ;
13005 return 0;
13006}
13007_ACEOF
ac50fbac 13008if ac_fn_c_try_link "$LINENO"; then :
d166f048 13009 bash_cv_signal_vintage=posix
ccc6cda3 13010else
0628567a 13011
ac50fbac 13012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13013/* end confdefs.h. */
d166f048 13014#include <signal.h>
f73dda09
JA
13015int
13016main ()
13017{
d166f048
JA
13018
13019 int mask = sigmask(SIGINT);
13020 sigsetmask(mask); sigblock(mask); sigpause(mask);
f73dda09
JA
13021
13022 ;
13023 return 0;
13024}
13025_ACEOF
ac50fbac 13026if ac_fn_c_try_link "$LINENO"; then :
d166f048
JA
13027 bash_cv_signal_vintage=4.2bsd
13028else
f73dda09 13029
ac50fbac 13030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13031/* end confdefs.h. */
d166f048
JA
13032
13033 #include <signal.h>
13034 RETSIGTYPE foo() { }
f73dda09
JA
13035int
13036main ()
13037{
d166f048
JA
13038
13039 int mask = sigmask(SIGINT);
13040 sigset(SIGINT, foo); sigrelse(SIGINT);
ac50fbac
CR
13041 sighold(SIGINT); sigpause(SIGINT);
13042
13043 ;
13044 return 0;
13045}
13046_ACEOF
13047if ac_fn_c_try_link "$LINENO"; then :
d166f048
JA
13048 bash_cv_signal_vintage=svr3
13049else
ac50fbac 13050 bash_cv_signal_vintage=v7
f73dda09 13051
d166f048 13052fi
ac50fbac
CR
13053rm -f core conftest.err conftest.$ac_objext \
13054 conftest$ac_exeext conftest.$ac_ext
f73dda09 13055
d166f048 13056fi
ac50fbac
CR
13057rm -f core conftest.err conftest.$ac_objext \
13058 conftest$ac_exeext conftest.$ac_ext
d166f048
JA
13059
13060fi
ac50fbac
CR
13061rm -f core conftest.err conftest.$ac_objext \
13062 conftest$ac_exeext conftest.$ac_ext
d166f048
JA
13063
13064fi
13065
ac50fbac 13066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5
3185942a 13067$as_echo "$bash_cv_signal_vintage" >&6; }
d166f048 13068if test "$bash_cv_signal_vintage" = posix; then
ac50fbac 13069$as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
d166f048
JA
13070
13071elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
ac50fbac 13072$as_echo "#define HAVE_BSD_SIGNALS 1" >>confdefs.h
d166f048
JA
13073
13074elif test "$bash_cv_signal_vintage" = svr3; then
ac50fbac 13075$as_echo "#define HAVE_USG_SIGHOLD 1" >>confdefs.h
d166f048
JA
13076
13077fi
13078
b80f6443 13079
ac50fbac 13080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_errlist and sys_nerr" >&5
3185942a 13081$as_echo_n "checking for sys_errlist and sys_nerr... " >&6; }
ac50fbac 13082if ${bash_cv_sys_errlist+:} false; then :
3185942a 13083 $as_echo_n "(cached) " >&6
cce855bc 13084else
ac50fbac 13085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13086/* end confdefs.h. */
f73dda09
JA
13087#include <errno.h>
13088int
cce855bc
JA
13089main ()
13090{
d166f048
JA
13091extern char *sys_errlist[];
13092 extern int sys_nerr;
13093 char *msg = sys_errlist[sys_nerr - 1];
f73dda09
JA
13094 ;
13095 return 0;
13096}
13097_ACEOF
ac50fbac 13098if ac_fn_c_try_link "$LINENO"; then :
d166f048
JA
13099 bash_cv_sys_errlist=yes
13100else
ac50fbac 13101 bash_cv_sys_errlist=no
d166f048 13102fi
ac50fbac
CR
13103rm -f core conftest.err conftest.$ac_objext \
13104 conftest$ac_exeext conftest.$ac_ext
d166f048 13105fi
ac50fbac 13106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_errlist" >&5
3185942a 13107$as_echo "$bash_cv_sys_errlist" >&6; }
d166f048 13108if test $bash_cv_sys_errlist = yes; then
ac50fbac 13109$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
d166f048
JA
13110
13111fi
13112
b80f6443 13113
ac50fbac 13114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_siglist in system C library" >&5
3185942a 13115$as_echo_n "checking for sys_siglist in system C library... " >&6; }
ac50fbac 13116if ${bash_cv_sys_siglist+:} false; then :
3185942a 13117 $as_echo_n "(cached) " >&6
ccc6cda3 13118else
ac50fbac
CR
13119 if test "$cross_compiling" = yes; then :
13120 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5
3185942a 13121$as_echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;}
cce855bc 13122 bash_cv_sys_siglist=no
ccc6cda3 13123else
ac50fbac 13124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13125/* end confdefs.h. */
ccc6cda3
JA
13126
13127#include <sys/types.h>
13128#include <signal.h>
13129#ifdef HAVE_UNISTD_H
13130#include <unistd.h>
13131#endif
3185942a 13132#if !HAVE_DECL_SYS_SIGLIST
ccc6cda3
JA
13133extern char *sys_siglist[];
13134#endif
13135main()
13136{
13137char *msg = sys_siglist[2];
13138exit(msg == 0);
13139}
f73dda09 13140_ACEOF
ac50fbac 13141if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
13142 bash_cv_sys_siglist=yes
13143else
ac50fbac 13144 bash_cv_sys_siglist=no
ccc6cda3 13145fi
ac50fbac
CR
13146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13147 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 13148fi
3185942a 13149
ccc6cda3 13150fi
cce855bc 13151
ac50fbac 13152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_siglist" >&5
3185942a 13153$as_echo "$bash_cv_sys_siglist" >&6; }
ccc6cda3 13154if test $bash_cv_sys_siglist = yes; then
ac50fbac 13155$as_echo "#define HAVE_SYS_SIGLIST 1" >>confdefs.h
ccc6cda3
JA
13156
13157fi
13158
ac50fbac 13159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in signal.h or unistd.h" >&5
3185942a 13160$as_echo_n "checking for _sys_siglist in signal.h or unistd.h... " >&6; }
ac50fbac 13161if ${bash_cv_decl_under_sys_siglist+:} false; then :
3185942a 13162 $as_echo_n "(cached) " >&6
e8ce775d 13163else
ac50fbac 13164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13165/* end confdefs.h. */
e8ce775d
JA
13166
13167#include <sys/types.h>
13168#include <signal.h>
13169#ifdef HAVE_UNISTD_H
13170#include <unistd.h>
13171#endif
f73dda09
JA
13172int
13173main ()
13174{
13175 char *msg = _sys_siglist[2];
13176 ;
13177 return 0;
13178}
13179_ACEOF
ac50fbac 13180if ac_fn_c_try_compile "$LINENO"; then :
e8ce775d
JA
13181 bash_cv_decl_under_sys_siglist=yes
13182else
ac50fbac 13183 bash_cv_decl_under_sys_siglist=no
e8ce775d 13184fi
3185942a 13185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e8ce775d 13186fi
ac50fbac 13187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_under_sys_siglist" >&5
3185942a 13188$as_echo "$bash_cv_decl_under_sys_siglist" >&6; }
e8ce775d 13189if test $bash_cv_decl_under_sys_siglist = yes; then
ac50fbac 13190$as_echo "#define UNDER_SYS_SIGLIST_DECLARED 1" >>confdefs.h
e8ce775d
JA
13191
13192fi
13193
b80f6443 13194
ac50fbac 13195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in system C library" >&5
3185942a 13196$as_echo_n "checking for _sys_siglist in system C library... " >&6; }
ac50fbac 13197if ${bash_cv_under_sys_siglist+:} false; then :
3185942a 13198 $as_echo_n "(cached) " >&6
ccc6cda3 13199else
ac50fbac
CR
13200 if test "$cross_compiling" = yes; then :
13201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5
3185942a 13202$as_echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;}
cce855bc 13203 bash_cv_under_sys_siglist=no
ccc6cda3 13204else
ac50fbac 13205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13206/* end confdefs.h. */
ccc6cda3
JA
13207
13208#include <sys/types.h>
13209#include <signal.h>
13210#ifdef HAVE_UNISTD_H
13211#include <unistd.h>
13212#endif
e8ce775d 13213#ifndef UNDER_SYS_SIGLIST_DECLARED
ccc6cda3
JA
13214extern char *_sys_siglist[];
13215#endif
13216main()
13217{
e8ce775d 13218char *msg = (char *)_sys_siglist[2];
ccc6cda3
JA
13219exit(msg == 0);
13220}
f73dda09 13221_ACEOF
ac50fbac 13222if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
13223 bash_cv_under_sys_siglist=yes
13224else
ac50fbac 13225 bash_cv_under_sys_siglist=no
ccc6cda3 13226fi
ac50fbac
CR
13227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13228 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 13229fi
3185942a 13230
ccc6cda3 13231fi
cce855bc 13232
ac50fbac 13233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_under_sys_siglist" >&5
3185942a 13234$as_echo "$bash_cv_under_sys_siglist" >&6; }
ccc6cda3 13235if test $bash_cv_under_sys_siglist = yes; then
ac50fbac 13236$as_echo "#define HAVE_UNDER_SYS_SIGLIST 1" >>confdefs.h
ccc6cda3
JA
13237
13238fi
13239
b80f6443 13240
ac50fbac 13241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signal handlers are of type void" >&5
3185942a 13242$as_echo_n "checking whether signal handlers are of type void... " >&6; }
ac50fbac 13243if ${bash_cv_void_sighandler+:} false; then :
3185942a 13244 $as_echo_n "(cached) " >&6
ccc6cda3 13245else
ac50fbac 13246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13247/* end confdefs.h. */
ccc6cda3
JA
13248#include <sys/types.h>
13249#include <signal.h>
13250#ifdef signal
13251#undef signal
13252#endif
13253#ifdef __cplusplus
13254extern "C"
13255#endif
13256void (*signal ()) ();
f73dda09
JA
13257int
13258main ()
13259{
ccc6cda3 13260int i;
f73dda09
JA
13261 ;
13262 return 0;
13263}
13264_ACEOF
ac50fbac 13265if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
13266 bash_cv_void_sighandler=yes
13267else
ac50fbac 13268 bash_cv_void_sighandler=no
ccc6cda3 13269fi
3185942a 13270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3 13271fi
ac50fbac 13272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_void_sighandler" >&5
3185942a 13273$as_echo "$bash_cv_void_sighandler" >&6; }
ccc6cda3 13274if test $bash_cv_void_sighandler = yes; then
ac50fbac 13275$as_echo "#define VOID_SIGHANDLER 1" >>confdefs.h
ccc6cda3
JA
13276
13277fi
13278
b80f6443
JA
13279
13280
ac50fbac 13281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
3185942a 13282$as_echo_n "checking for clock_t... " >&6; }
ac50fbac 13283if ${bash_cv_type_clock_t+:} false; then :
3185942a 13284 $as_echo_n "(cached) " >&6
ccc6cda3 13285else
ac50fbac 13286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13287/* end confdefs.h. */
ccc6cda3
JA
13288#include <sys/types.h>
13289#if STDC_HEADERS
13290#include <stdlib.h>
f73dda09
JA
13291#include <stddef.h>
13292#endif
13293#if HAVE_INTTYPES_H
13294#include <inttypes.h>
ccc6cda3 13295#endif
0001803f
CR
13296#if HAVE_STDINT_H
13297#include <stdint.h>
13298#endif
ccc6cda3
JA
13299#include <sys/times.h>
13300
f73dda09 13301_ACEOF
ccc6cda3 13302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 13303 $EGREP "clock_t" >/dev/null 2>&1; then :
ccc6cda3
JA
13304 bash_cv_type_clock_t=yes
13305else
ccc6cda3
JA
13306 bash_cv_type_clock_t=no
13307fi
13308rm -f conftest*
13309
13310fi
13311
ac50fbac 13312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_clock_t" >&5
3185942a 13313$as_echo "$bash_cv_type_clock_t" >&6; }
ccc6cda3
JA
13314
13315if test $bash_cv_type_clock_t = no; then
b80f6443 13316 cat >>confdefs.h <<_ACEOF
ccc6cda3 13317#define clock_t long
b80f6443 13318_ACEOF
ccc6cda3
JA
13319
13320fi
13321
b80f6443
JA
13322
13323
ac50fbac 13324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset_t" >&5
3185942a 13325$as_echo_n "checking for sigset_t... " >&6; }
ac50fbac 13326if ${bash_cv_type_sigset_t+:} false; then :
3185942a 13327 $as_echo_n "(cached) " >&6
f73dda09 13328else
ac50fbac 13329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13330/* end confdefs.h. */
f73dda09
JA
13331#include <sys/types.h>
13332#if STDC_HEADERS
13333#include <stdlib.h>
13334#include <stddef.h>
13335#endif
13336#if HAVE_INTTYPES_H
13337#include <inttypes.h>
13338#endif
0001803f
CR
13339#if HAVE_STDINT_H
13340#include <stdint.h>
13341#endif
ac50fbac 13342#include <signal.h>
f73dda09
JA
13343
13344_ACEOF
13345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac
CR
13346 $EGREP "sigset_t" >/dev/null 2>&1; then :
13347 bash_cv_type_sigset_t=yes
f73dda09 13348else
ac50fbac 13349 bash_cv_type_sigset_t=no
f73dda09
JA
13350fi
13351rm -f conftest*
13352
13353fi
13354
ac50fbac
CR
13355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sigset_t" >&5
13356$as_echo "$bash_cv_type_sigset_t" >&6; }
f73dda09 13357
ac50fbac 13358if test $bash_cv_type_sigset_t = no; then
b80f6443 13359 cat >>confdefs.h <<_ACEOF
ac50fbac 13360#define sigset_t int
b80f6443 13361_ACEOF
f73dda09
JA
13362
13363fi
13364
0628567a 13365
f73dda09 13366
ac50fbac
CR
13367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5
13368$as_echo_n "checking for sig_atomic_t... " >&6; }
13369if ${bash_cv_type_sig_atomic_t+:} false; then :
13370 $as_echo_n "(cached) " >&6
ccc6cda3 13371else
ac50fbac 13372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13373/* end confdefs.h. */
ccc6cda3 13374#include <sys/types.h>
ac50fbac
CR
13375#if STDC_HEADERS
13376#include <stdlib.h>
13377#include <stddef.h>
ccc6cda3 13378#endif
ac50fbac
CR
13379#if HAVE_INTTYPES_H
13380#include <inttypes.h>
13381#endif
13382#if HAVE_STDINT_H
13383#include <stdint.h>
13384#endif
13385#include <signal.h>
13386
f73dda09 13387_ACEOF
ac50fbac
CR
13388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13389 $EGREP "sig_atomic_t" >/dev/null 2>&1; then :
13390 bash_cv_type_sig_atomic_t=yes
ccc6cda3 13391else
ac50fbac 13392 bash_cv_type_sig_atomic_t=no
ccc6cda3 13393fi
ac50fbac 13394rm -f conftest*
ccc6cda3
JA
13395
13396fi
13397
ac50fbac
CR
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5
13399$as_echo "$bash_cv_type_sig_atomic_t" >&6; }
ccc6cda3 13400
ac50fbac
CR
13401if test $bash_cv_type_sig_atomic_t = no; then
13402 cat >>confdefs.h <<_ACEOF
13403#define sig_atomic_t int
b80f6443 13404_ACEOF
ccc6cda3
JA
13405
13406fi
13407
b80f6443 13408
3185942a 13409
ac50fbac
CR
13410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for quad_t" >&5
13411$as_echo_n "checking for quad_t... " >&6; }
13412if ${bash_cv_type_quad_t+:} false; then :
13413 $as_echo_n "(cached) " >&6
ccc6cda3 13414else
ac50fbac 13415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13416/* end confdefs.h. */
ac50fbac
CR
13417#include <sys/types.h>
13418#if STDC_HEADERS
13419#include <stdlib.h>
13420#include <stddef.h>
13421#endif
13422#if HAVE_INTTYPES_H
13423#include <inttypes.h>
13424#endif
13425#if HAVE_STDINT_H
13426#include <stdint.h>
13427#endif
495aee44 13428
495aee44 13429
0628567a 13430_ACEOF
ac50fbac
CR
13431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13432 $EGREP "quad_t" >/dev/null 2>&1; then :
13433 bash_cv_type_quad_t=yes
495aee44 13434else
ac50fbac 13435 bash_cv_type_quad_t=no
f73dda09 13436fi
ac50fbac 13437rm -f conftest*
ccc6cda3
JA
13438
13439fi
13440
ac50fbac
CR
13441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_quad_t" >&5
13442$as_echo "$bash_cv_type_quad_t" >&6; }
13443if test $bash_cv_type_quad_t = yes; then
13444 $as_echo "#define HAVE_QUAD_T 1" >>confdefs.h
495aee44 13445
ac50fbac
CR
13446 fi
13447if test $bash_cv_type_quad_t = no; then
13448 cat >>confdefs.h <<_ACEOF
13449#define quad_t long
495aee44 13450_ACEOF
495aee44 13451
495aee44
CR
13452fi
13453
ac50fbac
CR
13454
13455
13456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
13457$as_echo_n "checking for intmax_t... " >&6; }
13458if ${bash_cv_type_intmax_t+:} false; then :
13459 $as_echo_n "(cached) " >&6
495aee44 13460else
ac50fbac 13461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 13462/* end confdefs.h. */
ac50fbac
CR
13463#include <sys/types.h>
13464#if STDC_HEADERS
495aee44 13465#include <stdlib.h>
ac50fbac
CR
13466#include <stddef.h>
13467#endif
13468#if HAVE_INTTYPES_H
13469#include <inttypes.h>
13470#endif
13471#if HAVE_STDINT_H
13472#include <stdint.h>
13473#endif
495aee44 13474
495aee44 13475
495aee44 13476_ACEOF
ac50fbac
CR
13477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13478 $EGREP "intmax_t" >/dev/null 2>&1; then :
13479 bash_cv_type_intmax_t=yes
495aee44 13480else
ac50fbac 13481 bash_cv_type_intmax_t=no
495aee44 13482fi
ac50fbac 13483rm -f conftest*
495aee44 13484
ac50fbac 13485fi
495aee44 13486
ac50fbac
CR
13487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_intmax_t" >&5
13488$as_echo "$bash_cv_type_intmax_t" >&6; }
495aee44 13489
ac50fbac
CR
13490if test $bash_cv_type_intmax_t = no; then
13491 cat >>confdefs.h <<_ACEOF
13492#define intmax_t $bash_cv_type_long_long
495aee44
CR
13493_ACEOF
13494
ac50fbac 13495fi
495aee44
CR
13496
13497
13498
ac50fbac
CR
13499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintmax_t" >&5
13500$as_echo_n "checking for uintmax_t... " >&6; }
13501if ${bash_cv_type_uintmax_t+:} false; then :
495aee44
CR
13502 $as_echo_n "(cached) " >&6
13503else
ac50fbac 13504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 13505/* end confdefs.h. */
495aee44 13506#include <sys/types.h>
ac50fbac
CR
13507#if STDC_HEADERS
13508#include <stdlib.h>
13509#include <stddef.h>
13510#endif
13511#if HAVE_INTTYPES_H
13512#include <inttypes.h>
13513#endif
13514#if HAVE_STDINT_H
13515#include <stdint.h>
13516#endif
495aee44
CR
13517
13518
495aee44 13519_ACEOF
ac50fbac
CR
13520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13521 $EGREP "uintmax_t" >/dev/null 2>&1; then :
13522 bash_cv_type_uintmax_t=yes
495aee44 13523else
ac50fbac
CR
13524 bash_cv_type_uintmax_t=no
13525fi
13526rm -f conftest*
13527
13528fi
13529
13530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_uintmax_t" >&5
13531$as_echo "$bash_cv_type_uintmax_t" >&6; }
495aee44 13532
ac50fbac
CR
13533if test $bash_cv_type_uintmax_t = no; then
13534 cat >>confdefs.h <<_ACEOF
13535#define uintmax_t $bash_cv_type_unsigned_long_long
495aee44 13536_ACEOF
495aee44 13537
ac50fbac
CR
13538fi
13539
13540if test "$ac_cv_header_sys_socket_h" = "yes"; then
495aee44
CR
13541
13542
ac50fbac
CR
13543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
13544$as_echo_n "checking for socklen_t... " >&6; }
13545if ${bash_cv_type_socklen_t+:} false; then :
13546 $as_echo_n "(cached) " >&6
495aee44 13547else
ac50fbac
CR
13548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13549/* end confdefs.h. */
13550#include <sys/types.h>
13551#if STDC_HEADERS
13552#include <stdlib.h>
13553#include <stddef.h>
13554#endif
13555#if HAVE_INTTYPES_H
13556#include <inttypes.h>
13557#endif
13558#if HAVE_STDINT_H
13559#include <stdint.h>
13560#endif
13561#include <sys/socket.h>
495aee44 13562
ac50fbac
CR
13563_ACEOF
13564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13565 $EGREP "socklen_t" >/dev/null 2>&1; then :
13566 bash_cv_type_socklen_t=yes
13567else
13568 bash_cv_type_socklen_t=no
495aee44 13569fi
ac50fbac 13570rm -f conftest*
495aee44 13571
495aee44
CR
13572fi
13573
ac50fbac
CR
13574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_socklen_t" >&5
13575$as_echo "$bash_cv_type_socklen_t" >&6; }
13576if test $bash_cv_type_socklen_t = yes; then
13577 $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
13578
13579 fi
13580if test $bash_cv_type_socklen_t = no; then
13581 cat >>confdefs.h <<_ACEOF
13582#define socklen_t unsigned int
495aee44
CR
13583_ACEOF
13584
13585fi
13586
ac50fbac
CR
13587fi
13588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size and type of struct rlimit fields" >&5
13589$as_echo_n "checking for size and type of struct rlimit fields... " >&6; }
13590if ${bash_cv_type_rlimit+:} false; then :
495aee44
CR
13591 $as_echo_n "(cached) " >&6
13592else
ac50fbac 13593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 13594/* end confdefs.h. */
495aee44 13595#include <sys/types.h>
ac50fbac 13596#include <sys/resource.h>
495aee44
CR
13597int
13598main ()
13599{
ac50fbac 13600rlim_t xxx;
495aee44
CR
13601 ;
13602 return 0;
13603}
13604_ACEOF
ac50fbac
CR
13605if ac_fn_c_try_compile "$LINENO"; then :
13606 bash_cv_type_rlimit=rlim_t
495aee44 13607else
495aee44 13608
ac50fbac
CR
13609if test "$cross_compiling" = yes; then :
13610 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5
13611$as_echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&2;}
13612 bash_cv_type_rlimit=long
13613else
13614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44
CR
13615/* end confdefs.h. */
13616
13617#include <sys/types.h>
ac50fbac
CR
13618#include <sys/time.h>
13619#include <sys/resource.h>
13620main()
495aee44 13621{
ac50fbac
CR
13622#ifdef HAVE_QUAD_T
13623 struct rlimit rl;
13624 if (sizeof(rl.rlim_cur) == sizeof(quad_t))
13625 exit(0);
13626#endif
13627 exit(1);
495aee44
CR
13628}
13629_ACEOF
ac50fbac
CR
13630if ac_fn_c_try_run "$LINENO"; then :
13631 bash_cv_type_rlimit=quad_t
495aee44 13632else
ac50fbac
CR
13633 bash_cv_type_rlimit=long
13634fi
13635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13636 conftest.$ac_objext conftest.beam conftest.$ac_ext
13637fi
13638
13639fi
13640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641
13642fi
13643
13644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_rlimit" >&5
13645$as_echo "$bash_cv_type_rlimit" >&6; }
13646if test $bash_cv_type_rlimit = quad_t; then
13647$as_echo "#define RLIMTYPE quad_t" >>confdefs.h
13648
13649elif test $bash_cv_type_rlimit = rlim_t; then
13650$as_echo "#define RLIMTYPE rlim_t" >>confdefs.h
13651
13652fi
13653
13654
13655# The cast to long int works around a bug in the HP C Compiler
13656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13658# This bug is HP SR number 8606223364.
13659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5
13660$as_echo_n "checking size of intmax_t... " >&6; }
13661if ${ac_cv_sizeof_intmax_t+:} false; then :
13662 $as_echo_n "(cached) " >&6
13663else
13664 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default"; then :
495aee44 13665
ac50fbac
CR
13666else
13667 if test "$ac_cv_type_intmax_t" = yes; then
13668 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13670as_fn_error 77 "cannot compute sizeof (intmax_t)
13671See \`config.log' for more details" "$LINENO" 5; }
13672 else
13673 ac_cv_sizeof_intmax_t=0
13674 fi
495aee44
CR
13675fi
13676
495aee44 13677fi
ac50fbac
CR
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5
13679$as_echo "$ac_cv_sizeof_intmax_t" >&6; }
495aee44 13680
ac50fbac
CR
13681
13682
13683cat >>confdefs.h <<_ACEOF
13684#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t
495aee44
CR
13685_ACEOF
13686
ac50fbac
CR
13687
13688
13689
13690ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" "
13691#include <sys/types.h>
13692#include <termios.h>
13693
13694"
13695if test "x$ac_cv_member_struct_termios_c_line" = xyes; then :
13696 $as_echo "#define TERMIOS_LDISC 1" >>confdefs.h
13697
13698fi
13699
13700
13701
13702ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" "
13703#include <sys/types.h>
13704#include <termio.h>
13705
13706"
13707if test "x$ac_cv_member_struct_termio_c_line" = xyes; then :
13708 $as_echo "#define TERMIO_LDISC 1" >>confdefs.h
13709
495aee44
CR
13710fi
13711
13712
13713
ac50fbac 13714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5
495aee44 13715$as_echo_n "checking for struct dirent.d_ino... " >&6; }
ac50fbac 13716if ${bash_cv_dirent_has_dino+:} false; then :
495aee44 13717 $as_echo_n "(cached) " >&6
ccc6cda3 13718else
ac50fbac 13719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13720/* end confdefs.h. */
ccc6cda3
JA
13721
13722#include <stdio.h>
13723#include <sys/types.h>
13724#ifdef HAVE_UNISTD_H
13725# include <unistd.h>
13726#endif /* HAVE_UNISTD_H */
13727#if defined(HAVE_DIRENT_H)
13728# include <dirent.h>
13729#else
13730# define dirent direct
13731# ifdef HAVE_SYS_NDIR_H
13732# include <sys/ndir.h>
13733# endif /* SYSNDIR */
13734# ifdef HAVE_SYS_DIR_H
13735# include <sys/dir.h>
13736# endif /* SYSDIR */
13737# ifdef HAVE_NDIR_H
13738# include <ndir.h>
13739# endif
13740#endif /* HAVE_DIRENT_H */
13741
f73dda09
JA
13742int
13743main ()
13744{
ccc6cda3
JA
13745
13746struct dirent d; int z; z = d.d_ino;
13747
f73dda09
JA
13748 ;
13749 return 0;
13750}
13751_ACEOF
ac50fbac 13752if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
13753 bash_cv_dirent_has_dino=yes
13754else
ac50fbac 13755 bash_cv_dirent_has_dino=no
ccc6cda3 13756fi
3185942a 13757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
13758fi
13759
ac50fbac 13760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_dino" >&5
3185942a 13761$as_echo "$bash_cv_dirent_has_dino" >&6; }
ccc6cda3 13762if test $bash_cv_dirent_has_dino = yes; then
ac50fbac 13763$as_echo "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h
ccc6cda3
JA
13764
13765fi
13766
b80f6443 13767
ac50fbac 13768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5
3185942a 13769$as_echo_n "checking for struct dirent.d_fileno... " >&6; }
ac50fbac 13770if ${bash_cv_dirent_has_d_fileno+:} false; then :
3185942a 13771 $as_echo_n "(cached) " >&6
d166f048 13772else
ac50fbac 13773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13774/* end confdefs.h. */
d166f048
JA
13775
13776#include <stdio.h>
13777#include <sys/types.h>
13778#ifdef HAVE_UNISTD_H
13779# include <unistd.h>
13780#endif /* HAVE_UNISTD_H */
13781#if defined(HAVE_DIRENT_H)
13782# include <dirent.h>
13783#else
13784# define dirent direct
13785# ifdef HAVE_SYS_NDIR_H
13786# include <sys/ndir.h>
13787# endif /* SYSNDIR */
13788# ifdef HAVE_SYS_DIR_H
13789# include <sys/dir.h>
13790# endif /* SYSDIR */
13791# ifdef HAVE_NDIR_H
13792# include <ndir.h>
13793# endif
13794#endif /* HAVE_DIRENT_H */
13795
f73dda09
JA
13796int
13797main ()
13798{
d166f048
JA
13799
13800struct dirent d; int z; z = d.d_fileno;
13801
f73dda09
JA
13802 ;
13803 return 0;
13804}
13805_ACEOF
ac50fbac 13806if ac_fn_c_try_compile "$LINENO"; then :
d166f048
JA
13807 bash_cv_dirent_has_d_fileno=yes
13808else
ac50fbac 13809 bash_cv_dirent_has_d_fileno=no
d166f048 13810fi
3185942a 13811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
13812fi
13813
ac50fbac 13814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5
3185942a 13815$as_echo "$bash_cv_dirent_has_d_fileno" >&6; }
d166f048 13816if test $bash_cv_dirent_has_d_fileno = yes; then
ac50fbac 13817$as_echo "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h
b80f6443
JA
13818
13819fi
13820
13821
ac50fbac 13822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_namlen" >&5
3185942a 13823$as_echo_n "checking for struct dirent.d_namlen... " >&6; }
ac50fbac 13824if ${bash_cv_dirent_has_d_namlen+:} false; then :
3185942a 13825 $as_echo_n "(cached) " >&6
b80f6443 13826else
ac50fbac 13827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13828/* end confdefs.h. */
b80f6443
JA
13829
13830#include <stdio.h>
13831#include <sys/types.h>
13832#ifdef HAVE_UNISTD_H
13833# include <unistd.h>
13834#endif /* HAVE_UNISTD_H */
13835#if defined(HAVE_DIRENT_H)
13836# include <dirent.h>
13837#else
13838# define dirent direct
13839# ifdef HAVE_SYS_NDIR_H
13840# include <sys/ndir.h>
13841# endif /* SYSNDIR */
13842# ifdef HAVE_SYS_DIR_H
13843# include <sys/dir.h>
13844# endif /* SYSDIR */
13845# ifdef HAVE_NDIR_H
13846# include <ndir.h>
13847# endif
13848#endif /* HAVE_DIRENT_H */
13849
13850int
13851main ()
13852{
13853
13854struct dirent d; int z; z = d.d_namlen;
13855
13856 ;
13857 return 0;
13858}
13859_ACEOF
ac50fbac 13860if ac_fn_c_try_compile "$LINENO"; then :
b80f6443
JA
13861 bash_cv_dirent_has_d_namlen=yes
13862else
ac50fbac 13863 bash_cv_dirent_has_d_namlen=no
d166f048 13864fi
3185942a 13865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b80f6443
JA
13866fi
13867
ac50fbac 13868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_namlen" >&5
3185942a 13869$as_echo "$bash_cv_dirent_has_d_namlen" >&6; }
b80f6443 13870if test $bash_cv_dirent_has_d_namlen = yes; then
ac50fbac 13871$as_echo "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h
d166f048 13872
b80f6443
JA
13873fi
13874
ac50fbac 13875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5
3185942a 13876$as_echo_n "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; }
ac50fbac 13877if ${bash_cv_struct_winsize_header+:} false; then :
3185942a 13878 $as_echo_n "(cached) " >&6
d166f048 13879else
ac50fbac 13880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13881/* end confdefs.h. */
d166f048
JA
13882#include <sys/types.h>
13883#include <sys/ioctl.h>
f73dda09
JA
13884int
13885main ()
13886{
d166f048 13887struct winsize x;
f73dda09
JA
13888 ;
13889 return 0;
13890}
13891_ACEOF
ac50fbac 13892if ac_fn_c_try_compile "$LINENO"; then :
cce855bc
JA
13893 bash_cv_struct_winsize_header=ioctl_h
13894else
ac50fbac 13895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13896/* end confdefs.h. */
cce855bc
JA
13897#include <sys/types.h>
13898#include <termios.h>
f73dda09
JA
13899int
13900main ()
13901{
cce855bc 13902struct winsize x;
f73dda09
JA
13903 ;
13904 return 0;
13905}
13906_ACEOF
ac50fbac 13907if ac_fn_c_try_compile "$LINENO"; then :
cce855bc 13908 bash_cv_struct_winsize_header=termios_h
d166f048 13909else
ac50fbac 13910 bash_cv_struct_winsize_header=other
cce855bc 13911fi
3185942a 13912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cce855bc 13913
d166f048 13914fi
3185942a 13915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
13916fi
13917
cce855bc 13918if test $bash_cv_struct_winsize_header = ioctl_h; then
ac50fbac 13919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5
3185942a 13920$as_echo "sys/ioctl.h" >&6; }
ac50fbac 13921 $as_echo "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h
d166f048 13922
cce855bc 13923elif test $bash_cv_struct_winsize_header = termios_h; then
ac50fbac 13924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5
3185942a 13925$as_echo "termios.h" >&6; }
ac50fbac 13926 $as_echo "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h
d166f048 13927
0628567a 13928else
ac50fbac
CR
13929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13930$as_echo "not found" >&6; }
13931fi
0628567a 13932
ac50fbac
CR
13933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5
13934$as_echo_n "checking for struct timeval in sys/time.h and time.h... " >&6; }
13935if ${bash_cv_struct_timeval+:} false; then :
13936 $as_echo_n "(cached) " >&6
13937else
13938
13939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13940/* end confdefs.h. */
ac50fbac 13941#include <sys/time.h>
0628567a 13942
ac50fbac
CR
13943_ACEOF
13944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13945 $EGREP "struct timeval" >/dev/null 2>&1; then :
13946 bash_cv_struct_timeval=yes
13947else
13948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13949/* end confdefs.h. */
13950#include <time.h>
0628567a 13951
0628567a 13952_ACEOF
ac50fbac
CR
13953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13954 $EGREP "struct timeval" >/dev/null 2>&1; then :
13955 bash_cv_struct_timeval=yes
b80f6443 13956else
ac50fbac
CR
13957 bash_cv_struct_timeval=no
13958fi
13959rm -f conftest*
0628567a 13960
7117c2d2 13961fi
ac50fbac
CR
13962rm -f conftest*
13963
3185942a 13964
0628567a 13965fi
3185942a 13966
ac50fbac
CR
13967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timeval" >&5
13968$as_echo "$bash_cv_struct_timeval" >&6; }
13969if test $bash_cv_struct_timeval = yes; then
13970 $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
13971
7117c2d2 13972fi
ac50fbac
CR
13973
13974ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13975if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
7117c2d2 13976
b80f6443 13977cat >>confdefs.h <<_ACEOF
ac50fbac 13978#define HAVE_STRUCT_STAT_ST_BLOCKS 1
b80f6443
JA
13979_ACEOF
13980
7117c2d2
JA
13981
13982fi
13983
ac50fbac
CR
13984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13985$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13986if ${ac_cv_struct_tm+:} false; then :
3185942a
JA
13987 $as_echo_n "(cached) " >&6
13988else
ac50fbac 13989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 13990/* end confdefs.h. */
ac50fbac 13991#include <sys/types.h>
3185942a
JA
13992#include <time.h>
13993
13994int
13995main ()
13996{
ac50fbac
CR
13997struct tm tm;
13998 int *p = &tm.tm_sec;
13999 return !p;
3185942a
JA
14000 ;
14001 return 0;
14002}
14003_ACEOF
ac50fbac
CR
14004if ac_fn_c_try_compile "$LINENO"; then :
14005 ac_cv_struct_tm=time.h
3185942a 14006else
ac50fbac 14007 ac_cv_struct_tm=sys/time.h
3185942a 14008fi
3185942a
JA
14009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14010fi
ac50fbac
CR
14011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14012$as_echo "$ac_cv_struct_tm" >&6; }
14013if test $ac_cv_struct_tm = sys/time.h; then
14014
14015$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14016
14017fi
14018
14019ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14020#include <$ac_cv_struct_tm>
14021
14022"
14023if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
3185942a
JA
14024
14025cat >>confdefs.h <<_ACEOF
ac50fbac 14026#define HAVE_STRUCT_TM_TM_ZONE 1
3185942a
JA
14027_ACEOF
14028
14029
ac50fbac 14030fi
3185942a 14031
ac50fbac
CR
14032if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14033
14034$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
3185942a 14035
ac50fbac
CR
14036else
14037 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14038"
14039if test "x$ac_cv_have_decl_tzname" = xyes; then :
14040 ac_have_decl=1
14041else
14042 ac_have_decl=0
3185942a
JA
14043fi
14044
ac50fbac
CR
14045cat >>confdefs.h <<_ACEOF
14046#define HAVE_DECL_TZNAME $ac_have_decl
14047_ACEOF
3185942a 14048
ac50fbac 14049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
3185942a 14050$as_echo_n "checking for tzname... " >&6; }
ac50fbac 14051if ${ac_cv_var_tzname+:} false; then :
3185942a 14052 $as_echo_n "(cached) " >&6
7117c2d2 14053else
ac50fbac 14054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14055/* end confdefs.h. */
7117c2d2 14056#include <time.h>
3185942a
JA
14057#if !HAVE_DECL_TZNAME
14058extern char *tzname[];
7117c2d2
JA
14059#endif
14060
14061int
14062main ()
14063{
3185942a 14064return tzname[0][0];
7117c2d2
JA
14065 ;
14066 return 0;
14067}
14068_ACEOF
ac50fbac 14069if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
14070 ac_cv_var_tzname=yes
14071else
ac50fbac 14072 ac_cv_var_tzname=no
7117c2d2 14073fi
ac50fbac
CR
14074rm -f core conftest.err conftest.$ac_objext \
14075 conftest$ac_exeext conftest.$ac_ext
7117c2d2 14076fi
ac50fbac 14077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
3185942a 14078$as_echo "$ac_cv_var_tzname" >&6; }
7117c2d2
JA
14079 if test $ac_cv_var_tzname = yes; then
14080
ac50fbac 14081$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
7117c2d2
JA
14082
14083 fi
14084fi
14085
ac50fbac 14086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timezone in sys/time.h and time.h" >&5
3185942a 14087$as_echo_n "checking for struct timezone in sys/time.h and time.h... " >&6; }
ac50fbac 14088if ${bash_cv_struct_timezone+:} false; then :
3185942a 14089 $as_echo_n "(cached) " >&6
b80f6443
JA
14090else
14091
ac50fbac 14092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14093/* end confdefs.h. */
b80f6443
JA
14094#include <sys/time.h>
14095
14096_ACEOF
14097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 14098 $EGREP "struct timezone" >/dev/null 2>&1; then :
b80f6443
JA
14099 bash_cv_struct_timezone=yes
14100else
ac50fbac 14101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14102/* end confdefs.h. */
b80f6443
JA
14103#include <time.h>
14104
14105_ACEOF
14106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 14107 $EGREP "struct timezone" >/dev/null 2>&1; then :
b80f6443
JA
14108 bash_cv_struct_timezone=yes
14109else
14110 bash_cv_struct_timezone=no
14111fi
14112rm -f conftest*
14113
14114fi
14115rm -f conftest*
14116
14117
14118fi
14119
ac50fbac 14120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timezone" >&5
3185942a 14121$as_echo "$bash_cv_struct_timezone" >&6; }
b80f6443 14122if test $bash_cv_struct_timezone = yes; then
ac50fbac 14123 $as_echo "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h
b80f6443
JA
14124
14125fi
14126
14127
ac50fbac 14128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for offset of exit status in return status from wait" >&5
495aee44 14129$as_echo_n "checking for offset of exit status in return status from wait... " >&6; }
ac50fbac 14130if ${bash_cv_wexitstatus_offset+:} false; then :
495aee44
CR
14131 $as_echo_n "(cached) " >&6
14132else
ac50fbac
CR
14133 if test "$cross_compiling" = yes; then :
14134 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&5
495aee44
CR
14135$as_echo "$as_me: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&2;}
14136 bash_cv_wexitstatus_offset=0
14137
14138else
ac50fbac
CR
14139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14140/* end confdefs.h. */
495aee44
CR
14141
14142#include <stdlib.h>
14143#include <unistd.h>
14144
14145#include <sys/wait.h>
14146
14147main(c, v)
14148 int c;
14149 char **v;
14150{
14151 pid_t pid, p;
14152 int s, i, n;
14153
14154 s = 0;
14155 pid = fork();
14156 if (pid == 0)
14157 exit (42);
14158
14159 /* wait for the process */
14160 p = wait(&s);
14161 if (p != pid)
14162 exit (255);
14163
14164 /* crack s */
14165 for (i = 0; i < (sizeof(s) - 8); i++)
14166 {
14167 n = (s >> i) & 0xff;
14168 if (n == 42)
14169 exit (i);
14170 }
14171
14172 exit (254);
14173}
14174
14175_ACEOF
ac50fbac 14176if ac_fn_c_try_run "$LINENO"; then :
495aee44
CR
14177 bash_cv_wexitstatus_offset=0
14178else
ac50fbac
CR
14179 bash_cv_wexitstatus_offset=$?
14180fi
14181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14182 conftest.$ac_objext conftest.beam conftest.$ac_ext
14183fi
14184
14185fi
14186
14187if test "$bash_cv_wexitstatus_offset" -gt 32 ; then
14188 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad exit status from test program -- defaulting to 0" >&5
14189$as_echo "$as_me: WARNING: bad exit status from test program -- defaulting to 0" >&2;}
14190 bash_cv_wexitstatus_offset=0
14191fi
14192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wexitstatus_offset" >&5
14193$as_echo "$bash_cv_wexitstatus_offset" >&6; }
14194
14195cat >>confdefs.h <<_ACEOF
14196#define WEXITSTATUS_OFFSET $bash_cv_wexitstatus_offset
14197_ACEOF
14198
14199
14200
14201
14202
14203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
14204$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
14205if ${bash_cv_sys_struct_timespec_in_time_h+:} false; then :
14206 $as_echo_n "(cached) " >&6
14207else
14208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14209/* end confdefs.h. */
14210#include <time.h>
14211
14212int
14213main ()
14214{
14215static struct timespec x; x.tv_sec = x.tv_nsec;
14216 ;
14217 return 0;
14218}
14219_ACEOF
14220if ac_fn_c_try_compile "$LINENO"; then :
14221 bash_cv_sys_struct_timespec_in_time_h=yes
14222else
14223 bash_cv_sys_struct_timespec_in_time_h=no
14224fi
14225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14226fi
14227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_time_h" >&5
14228$as_echo "$bash_cv_sys_struct_timespec_in_time_h" >&6; }
14229
14230 HAVE_STRUCT_TIMESPEC=0
14231 TIME_H_DEFINES_STRUCT_TIMESPEC=0
14232 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
14233 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
14234 if test $bash_cv_sys_struct_timespec_in_time_h = yes; then
14235 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
14236
14237 $as_echo "#define TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
14238
14239 TIME_H_DEFINES_STRUCT_TIMESPEC=1
14240 else
14241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
14242$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
14243if ${bash_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
14244 $as_echo_n "(cached) " >&6
14245else
14246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14247/* end confdefs.h. */
14248#include <sys/time.h>
14249
14250int
14251main ()
14252{
14253static struct timespec x; x.tv_sec = x.tv_nsec;
14254 ;
14255 return 0;
14256}
14257_ACEOF
14258if ac_fn_c_try_compile "$LINENO"; then :
14259 bash_cv_sys_struct_timespec_in_sys_time_h=yes
14260else
14261 bash_cv_sys_struct_timespec_in_sys_time_h=no
14262fi
14263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14264fi
14265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_sys_time_h" >&5
14266$as_echo "$bash_cv_sys_struct_timespec_in_sys_time_h" >&6; }
14267 if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then
14268 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
14269 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
14270
14271 $as_echo "#define SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
14272
14273 else
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
14275$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
14276if ${bash_cv_sys_struct_timespec_in_pthread_h+:} false; then :
14277 $as_echo_n "(cached) " >&6
14278else
14279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14280/* end confdefs.h. */
14281#include <pthread.h>
14282
14283int
14284main ()
14285{
14286static struct timespec x; x.tv_sec = x.tv_nsec;
14287 ;
14288 return 0;
14289}
14290_ACEOF
14291if ac_fn_c_try_compile "$LINENO"; then :
14292 bash_cv_sys_struct_timespec_in_pthread_h=yes
14293else
14294 bash_cv_sys_struct_timespec_in_pthread_h=no
14295fi
14296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14297fi
14298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_pthread_h" >&5
14299$as_echo "$bash_cv_sys_struct_timespec_in_pthread_h" >&6; }
14300 if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then
14301 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
14302 $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
14303
14304 $as_echo "#define PTHREAD_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
14305
14306 fi
14307 fi
14308 fi
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318 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>
14319 #include <sys/stat.h>
14320"
14321if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
14322
14323cat >>confdefs.h <<_ACEOF
14324#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
14325_ACEOF
14326
14327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
14328$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
14329if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
14330 $as_echo_n "(cached) " >&6
14331else
14332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14333/* end confdefs.h. */
14334
14335 #include <sys/types.h>
14336 #include <sys/stat.h>
14337 #if HAVE_SYS_TIME_H
14338 # include <sys/time.h>
14339 #endif
14340 #include <time.h>
14341 struct timespec ts;
14342 struct stat st;
14343
14344int
14345main ()
14346{
14347
14348 st.st_atim = ts;
14349
14350 ;
14351 return 0;
14352}
14353_ACEOF
14354if ac_fn_c_try_compile "$LINENO"; then :
14355 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
14356else
14357 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
14358fi
14359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14360fi
14361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
14362$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
14363 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
14364
14365$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
14366
14367 fi
14368else
14369 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>
14370 #include <sys/stat.h>
14371"
14372if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
14373
14374cat >>confdefs.h <<_ACEOF
14375#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
14376_ACEOF
14377
14378
14379else
14380 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
14381 #include <sys/stat.h>
14382"
14383if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
14384
14385cat >>confdefs.h <<_ACEOF
14386#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
14387_ACEOF
14388
14389
14390else
14391 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>
14392 #include <sys/stat.h>
14393"
14394if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
495aee44 14395
ac50fbac
CR
14396cat >>confdefs.h <<_ACEOF
14397#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
14398_ACEOF
495aee44
CR
14399
14400
14401fi
14402
495aee44 14403fi
495aee44 14404
ac50fbac
CR
14405fi
14406
14407fi
495aee44
CR
14408
14409
14410
ac50fbac 14411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5
3185942a 14412$as_echo_n "checking for the existence of strsignal... " >&6; }
ac50fbac 14413if ${bash_cv_have_strsignal+:} false; then :
3185942a 14414 $as_echo_n "(cached) " >&6
ccc6cda3 14415else
ac50fbac 14416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14417/* end confdefs.h. */
ccc6cda3
JA
14418#include <sys/types.h>
14419#include <signal.h>
f73dda09
JA
14420int
14421main ()
14422{
ccc6cda3 14423char *s = (char *)strsignal(2);
f73dda09
JA
14424 ;
14425 return 0;
14426}
14427_ACEOF
ac50fbac 14428if ac_fn_c_try_link "$LINENO"; then :
ccc6cda3
JA
14429 bash_cv_have_strsignal=yes
14430else
ac50fbac 14431 bash_cv_have_strsignal=no
ccc6cda3 14432fi
ac50fbac
CR
14433rm -f core conftest.err conftest.$ac_objext \
14434 conftest$ac_exeext conftest.$ac_ext
ccc6cda3
JA
14435fi
14436
ac50fbac 14437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_strsignal" >&5
3185942a 14438$as_echo "$bash_cv_have_strsignal" >&6; }
ccc6cda3 14439if test $bash_cv_have_strsignal = yes; then
ac50fbac 14440$as_echo "#define HAVE_STRSIGNAL 1" >>confdefs.h
ccc6cda3
JA
14441
14442fi
14443
ac50fbac 14444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if opendir() opens non-directories" >&5
3185942a 14445$as_echo_n "checking if opendir() opens non-directories... " >&6; }
ac50fbac 14446if ${bash_cv_opendir_not_robust+:} false; then :
3185942a 14447 $as_echo_n "(cached) " >&6
ccc6cda3 14448else
ac50fbac
CR
14449 if test "$cross_compiling" = yes; then :
14450 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5
3185942a 14451$as_echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14452 bash_cv_opendir_not_robust=no
14453
ccc6cda3 14454else
ac50fbac 14455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14456/* end confdefs.h. */
ccc6cda3
JA
14457
14458#include <stdio.h>
14459#include <sys/types.h>
14460#include <fcntl.h>
14461#ifdef HAVE_UNISTD_H
14462# include <unistd.h>
14463#endif /* HAVE_UNISTD_H */
14464#if defined(HAVE_DIRENT_H)
14465# include <dirent.h>
14466#else
14467# define dirent direct
14468# ifdef HAVE_SYS_NDIR_H
14469# include <sys/ndir.h>
14470# endif /* SYSNDIR */
14471# ifdef HAVE_SYS_DIR_H
14472# include <sys/dir.h>
14473# endif /* SYSDIR */
14474# ifdef HAVE_NDIR_H
14475# include <ndir.h>
14476# endif
14477#endif /* HAVE_DIRENT_H */
14478main()
14479{
14480DIR *dir;
bb70624e 14481int fd, err;
3185942a 14482err = mkdir("bash-aclocal", 0700);
bb70624e
JA
14483if (err < 0) {
14484 perror("mkdir");
14485 exit(1);
14486}
3185942a
JA
14487unlink("bash-aclocal/not_a_directory");
14488fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
ccc6cda3
JA
14489write(fd, "\n", 1);
14490close(fd);
3185942a
JA
14491dir = opendir("bash-aclocal/not_a_directory");
14492unlink("bash-aclocal/not_a_directory");
14493rmdir("bash-aclocal");
ccc6cda3
JA
14494exit (dir == 0);
14495}
f73dda09 14496_ACEOF
ac50fbac 14497if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14498 bash_cv_opendir_not_robust=yes
14499else
ac50fbac 14500 bash_cv_opendir_not_robust=no
ccc6cda3 14501fi
ac50fbac
CR
14502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14503 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14504fi
3185942a 14505
ccc6cda3
JA
14506fi
14507
ac50fbac 14508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_opendir_not_robust" >&5
3185942a 14509$as_echo "$bash_cv_opendir_not_robust" >&6; }
ccc6cda3 14510if test $bash_cv_opendir_not_robust = yes; then
ac50fbac 14511$as_echo "#define OPENDIR_NOT_ROBUST 1" >>confdefs.h
ccc6cda3
JA
14512
14513fi
14514
ac50fbac 14515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ulimit can substitute for getdtablesize" >&5
3185942a 14516$as_echo_n "checking whether ulimit can substitute for getdtablesize... " >&6; }
ac50fbac 14517if ${bash_cv_ulimit_maxfds+:} false; then :
3185942a 14518 $as_echo_n "(cached) " >&6
ccc6cda3 14519else
ac50fbac
CR
14520 if test "$cross_compiling" = yes; then :
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5
3185942a 14522$as_echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14523 bash_cv_ulimit_maxfds=no
14524
ccc6cda3 14525else
ac50fbac 14526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14527/* end confdefs.h. */
ccc6cda3
JA
14528
14529main()
14530{
14531long maxfds = ulimit(4, 0L);
14532exit (maxfds == -1L);
14533}
14534
f73dda09 14535_ACEOF
ac50fbac 14536if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14537 bash_cv_ulimit_maxfds=yes
14538else
ac50fbac 14539 bash_cv_ulimit_maxfds=no
3185942a 14540fi
ac50fbac
CR
14541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14542 conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a
JA
14543fi
14544
3185942a
JA
14545fi
14546
ac50fbac 14547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_ulimit_maxfds" >&5
3185942a
JA
14548$as_echo "$bash_cv_ulimit_maxfds" >&6; }
14549if test $bash_cv_ulimit_maxfds = yes; then
ac50fbac 14550$as_echo "#define ULIMIT_MAXFDS 1" >>confdefs.h
3185942a
JA
14551
14552fi
14553
14554
14555
14556
14557
14558
14559
14560
ac50fbac
CR
14561 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
14562"
14563if test "x$ac_cv_have_decl_fpurge" = xyes; then :
14564 ac_have_decl=1
3185942a 14565else
ac50fbac 14566 ac_have_decl=0
ccc6cda3
JA
14567fi
14568
3185942a 14569cat >>confdefs.h <<_ACEOF
ac50fbac 14570#define HAVE_DECL_FPURGE $ac_have_decl
b80f6443 14571_ACEOF
ccc6cda3 14572
3185942a 14573
ac50fbac 14574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if getenv can be redefined" >&5
3185942a 14575$as_echo_n "checking to see if getenv can be redefined... " >&6; }
ac50fbac 14576if ${bash_cv_getenv_redef+:} false; then :
3185942a 14577 $as_echo_n "(cached) " >&6
ccc6cda3 14578else
ac50fbac
CR
14579 if test "$cross_compiling" = yes; then :
14580 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5
3185942a 14581$as_echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;}
cce855bc
JA
14582 bash_cv_getenv_redef=yes
14583
ccc6cda3 14584else
ac50fbac 14585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14586/* end confdefs.h. */
ccc6cda3
JA
14587
14588#ifdef HAVE_UNISTD_H
14589# include <unistd.h>
14590#endif
14591#ifndef __STDC__
14592# ifndef const
14593# define const
14594# endif
14595#endif
14596char *
14597getenv (name)
14598#if defined (__linux__) || defined (__bsdi__) || defined (convex)
14599 const char *name;
14600#else
14601 char const *name;
14602#endif /* !__linux__ && !__bsdi__ && !convex */
14603{
14604return "42";
14605}
14606main()
14607{
14608char *s;
14609/* The next allows this program to run, but does not allow bash to link
14610 when it redefines getenv. I'm not really interested in figuring out
14611 why not. */
14612#if defined (NeXT)
14613exit(1);
14614#endif
14615s = getenv("ABCDE");
14616exit(s == 0); /* force optimizer to leave getenv in */
14617}
14618
f73dda09 14619_ACEOF
ac50fbac 14620if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14621 bash_cv_getenv_redef=yes
14622else
ac50fbac 14623 bash_cv_getenv_redef=no
ccc6cda3 14624fi
ac50fbac
CR
14625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14626 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14627fi
3185942a 14628
ccc6cda3
JA
14629fi
14630
ac50fbac 14631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getenv_redef" >&5
3185942a 14632$as_echo "$bash_cv_getenv_redef" >&6; }
ccc6cda3 14633if test $bash_cv_getenv_redef = yes; then
ac50fbac 14634$as_echo "#define CAN_REDEFINE_GETENV 1" >>confdefs.h
ccc6cda3
JA
14635
14636fi
14637
7117c2d2 14638if test "$ac_cv_func_getcwd" = "yes"; then
ac50fbac 14639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getcwd() will dynamically allocate memory with 0 size" >&5
3185942a 14640$as_echo_n "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; }
ac50fbac 14641if ${bash_cv_getcwd_malloc+:} false; then :
3185942a 14642 $as_echo_n "(cached) " >&6
ccc6cda3 14643else
ac50fbac
CR
14644 if test "$cross_compiling" = yes; then :
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5
3185942a 14646$as_echo "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;}
b80f6443 14647 bash_cv_getcwd_malloc=no
cce855bc 14648
ccc6cda3 14649else
ac50fbac 14650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14651/* end confdefs.h. */
ccc6cda3
JA
14652
14653#include <stdio.h>
14654#ifdef HAVE_UNISTD_H
14655#include <unistd.h>
14656#endif
14657
ccc6cda3
JA
14658main()
14659{
b80f6443
JA
14660 char *xpwd;
14661 xpwd = getcwd(0, 0);
14662 exit (xpwd == 0);
ccc6cda3
JA
14663}
14664
f73dda09 14665_ACEOF
ac50fbac 14666if ac_fn_c_try_run "$LINENO"; then :
b80f6443 14667 bash_cv_getcwd_malloc=yes
ccc6cda3 14668else
ac50fbac 14669 bash_cv_getcwd_malloc=no
ccc6cda3 14670fi
ac50fbac
CR
14671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14672 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14673fi
3185942a 14674
ccc6cda3
JA
14675fi
14676
ac50fbac 14677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getcwd_malloc" >&5
3185942a 14678$as_echo "$bash_cv_getcwd_malloc" >&6; }
b80f6443 14679if test $bash_cv_getcwd_malloc = no; then
ac50fbac 14680$as_echo "#define GETCWD_BROKEN 1" >>confdefs.h
ccc6cda3 14681
3185942a 14682case " $LIBOBJS " in
0628567a 14683 *" getcwd.$ac_objext "* ) ;;
3185942a
JA
14684 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
14685 ;;
0628567a
JA
14686esac
14687
ccc6cda3
JA
14688fi
14689
ccc6cda3
JA
14690fi
14691
ac50fbac 14692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
3185942a 14693$as_echo_n "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; }
ac50fbac 14694if ${bash_cv_func_sigsetjmp+:} false; then :
3185942a 14695 $as_echo_n "(cached) " >&6
ccc6cda3 14696else
ac50fbac
CR
14697 if test "$cross_compiling" = yes; then :
14698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5
3185942a 14699$as_echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
14700 bash_cv_func_sigsetjmp=missing
14701
ccc6cda3 14702else
ac50fbac 14703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14704/* end confdefs.h. */
ccc6cda3
JA
14705
14706#ifdef HAVE_UNISTD_H
14707#include <unistd.h>
14708#endif
14709#include <sys/types.h>
14710#include <signal.h>
14711#include <setjmp.h>
14712
14713main()
14714{
14715#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
14716exit (1);
14717#else
14718
14719int code;
14720sigset_t set, oset;
14721sigjmp_buf xx;
14722
14723/* get the mask */
14724sigemptyset(&set);
14725sigemptyset(&oset);
14726sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
14727sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
14728
14729/* save it */
14730code = sigsetjmp(xx, 1);
14731if (code)
14732 exit(0); /* could get sigmask and compare to oset here. */
14733
14734/* change it */
14735sigaddset(&set, SIGINT);
14736sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
14737
14738/* and siglongjmp */
14739siglongjmp(xx, 10);
14740exit(1);
14741#endif
14742}
f73dda09 14743_ACEOF
ac50fbac 14744if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
14745 bash_cv_func_sigsetjmp=present
14746else
ac50fbac 14747 bash_cv_func_sigsetjmp=missing
ccc6cda3 14748fi
ac50fbac
CR
14749rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14750 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14751fi
3185942a 14752
ccc6cda3
JA
14753fi
14754
ac50fbac 14755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5
3185942a 14756$as_echo "$bash_cv_func_sigsetjmp" >&6; }
ccc6cda3 14757if test $bash_cv_func_sigsetjmp = present; then
ac50fbac 14758$as_echo "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h
ccc6cda3
JA
14759
14760fi
14761
b80f6443 14762
ac50fbac 14763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5
3185942a 14764$as_echo_n "checking whether or not strcoll and strcmp differ... " >&6; }
ac50fbac 14765if ${bash_cv_func_strcoll_broken+:} false; then :
3185942a 14766 $as_echo_n "(cached) " >&6
d166f048 14767else
ac50fbac
CR
14768 if test "$cross_compiling" = yes; then :
14769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5
3185942a 14770$as_echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
14771 bash_cv_func_strcoll_broken=no
14772
d166f048 14773else
ac50fbac 14774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14775/* end confdefs.h. */
d166f048
JA
14776
14777#include <stdio.h>
14778#if defined (HAVE_LOCALE_H)
14779#include <locale.h>
14780#endif
14781
14782main(c, v)
14783int c;
14784char *v[];
14785{
14786 int r1, r2;
14787 char *deflocale, *defcoll;
14788
14789#ifdef HAVE_SETLOCALE
14790 deflocale = setlocale(LC_ALL, "");
14791 defcoll = setlocale(LC_COLLATE, "");
14792#endif
14793
14794#ifdef HAVE_STRCOLL
14795 /* These two values are taken from tests/glob-test. */
14796 r1 = strcoll("abd", "aXd");
14797#else
14798 r1 = 0;
14799#endif
14800 r2 = strcmp("abd", "aXd");
14801
14802 /* These two should both be greater than 0. It is permissible for
14803 a system to return different values, as long as the sign is the
14804 same. */
14805
14806 /* Exit with 1 (failure) if these two values are both > 0, since
14807 this tests whether strcoll(3) is broken with respect to strcmp(3)
14808 in the default locale. */
14809 exit (r1 > 0 && r2 > 0);
14810}
14811
f73dda09 14812_ACEOF
ac50fbac 14813if ac_fn_c_try_run "$LINENO"; then :
d166f048
JA
14814 bash_cv_func_strcoll_broken=yes
14815else
ac50fbac 14816 bash_cv_func_strcoll_broken=no
d166f048 14817fi
ac50fbac
CR
14818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14819 conftest.$ac_objext conftest.beam conftest.$ac_ext
d166f048 14820fi
3185942a 14821
d166f048
JA
14822fi
14823
ac50fbac 14824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5
3185942a 14825$as_echo "$bash_cv_func_strcoll_broken" >&6; }
d166f048 14826if test $bash_cv_func_strcoll_broken = yes; then
ac50fbac 14827$as_echo "#define STRCOLL_BROKEN 1" >>confdefs.h
d166f048
JA
14828
14829fi
14830
b80f6443
JA
14831
14832
0001803f
CR
14833
14834
0001803f 14835 if test X$ac_cv_func_snprintf = Xyes; then
ac50fbac 14836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant snprintf" >&5
0001803f 14837$as_echo_n "checking for standard-conformant snprintf... " >&6; }
ac50fbac 14838if ${bash_cv_func_snprintf+:} false; then :
0001803f
CR
14839 $as_echo_n "(cached) " >&6
14840else
ac50fbac
CR
14841 if test "$cross_compiling" = yes; then :
14842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard snprintf if cross-compiling" >&5
0001803f
CR
14843$as_echo "$as_me: WARNING: cannot check standard snprintf if cross-compiling" >&2;}
14844 bash_cv_func_snprintf=yes
14845
14846else
ac50fbac 14847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0001803f
CR
14848/* end confdefs.h. */
14849
14850#include <stdio.h>
14851
14852main()
14853{
14854 int n;
14855 n = snprintf (0, 0, "%s", "0123456");
14856 exit(n != 7);
14857}
14858
14859_ACEOF
ac50fbac 14860if ac_fn_c_try_run "$LINENO"; then :
0001803f
CR
14861 bash_cv_func_snprintf=yes
14862else
ac50fbac 14863 bash_cv_func_snprintf=no
0001803f 14864fi
ac50fbac
CR
14865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14866 conftest.$ac_objext conftest.beam conftest.$ac_ext
0001803f
CR
14867fi
14868
0001803f 14869fi
ac50fbac 14870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_snprintf" >&5
0001803f
CR
14871$as_echo "$bash_cv_func_snprintf" >&6; }
14872 if test $bash_cv_func_snprintf = no; then
14873 ac_cv_func_snprintf=no
14874 fi
14875 fi
14876 if test $ac_cv_func_snprintf = no; then
14877
ac50fbac 14878$as_echo "#define HAVE_SNPRINTF 0" >>confdefs.h
0001803f
CR
14879
14880 fi
14881
14882
14883
14884
14885
0001803f 14886 if test X$ac_cv_func_vsnprintf = Xyes; then
ac50fbac 14887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant vsnprintf" >&5
0001803f 14888$as_echo_n "checking for standard-conformant vsnprintf... " >&6; }
ac50fbac 14889if ${bash_cv_func_vsnprintf+:} false; then :
0001803f
CR
14890 $as_echo_n "(cached) " >&6
14891else
ac50fbac
CR
14892 if test "$cross_compiling" = yes; then :
14893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard vsnprintf if cross-compiling" >&5
0001803f
CR
14894$as_echo "$as_me: WARNING: cannot check standard vsnprintf if cross-compiling" >&2;}
14895 bash_cv_func_vsnprintf=yes
14896
14897else
ac50fbac 14898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0001803f
CR
14899/* end confdefs.h. */
14900
14901#if HAVE_STDARG_H
14902#include <stdarg.h>
14903#else
14904#include <varargs.h>
14905#endif
14906#include <stdio.h>
14907#include <stdlib.h>
14908
14909static int
14910#if HAVE_STDARG_H
14911foo(const char *fmt, ...)
14912#else
14913foo(format, va_alist)
14914 const char *format;
14915 va_dcl
14916#endif
14917{
14918 va_list args;
14919 int n;
14920
14921#if HAVE_STDARG_H
14922 va_start(args, fmt);
14923#else
14924 va_start(args);
14925#endif
14926 n = vsnprintf(0, 0, fmt, args);
14927 va_end (args);
14928 return n;
14929}
14930
14931main()
14932{
14933 int n;
14934 n = foo("%s", "0123456");
14935 exit(n != 7);
14936}
14937
14938_ACEOF
ac50fbac 14939if ac_fn_c_try_run "$LINENO"; then :
0001803f
CR
14940 bash_cv_func_vsnprintf=yes
14941else
ac50fbac 14942 bash_cv_func_vsnprintf=no
0001803f 14943fi
ac50fbac
CR
14944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14945 conftest.$ac_objext conftest.beam conftest.$ac_ext
0001803f
CR
14946fi
14947
0001803f 14948fi
ac50fbac 14949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_vsnprintf" >&5
0001803f
CR
14950$as_echo "$bash_cv_func_vsnprintf" >&6; }
14951 if test $bash_cv_func_vsnprintf = no; then
14952 ac_cv_func_vsnprintf=no
14953 fi
14954 fi
14955 if test $ac_cv_func_vsnprintf = no; then
14956
ac50fbac 14957$as_echo "#define HAVE_VSNPRINTF 0" >>confdefs.h
0001803f
CR
14958
14959 fi
14960
14961
14962
7117c2d2
JA
14963if test "$ac_cv_func_putenv" = "yes"; then
14964
b80f6443
JA
14965
14966
ac50fbac 14967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant putenv declaration" >&5
3185942a 14968$as_echo_n "checking for standard-conformant putenv declaration... " >&6; }
ac50fbac 14969if ${bash_cv_std_putenv+:} false; then :
3185942a 14970 $as_echo_n "(cached) " >&6
7117c2d2 14971else
ac50fbac 14972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14973/* end confdefs.h. */
7117c2d2
JA
14974
14975#if STDC_HEADERS
14976#include <stdlib.h>
14977#include <stddef.h>
14978#endif
14979#ifndef __STDC__
14980# ifndef const
14981# define const
14982# endif
14983#endif
14984#ifdef PROTOTYPES
14985extern int putenv (char *);
14986#else
14987extern int putenv ();
14988#endif
14989
14990int
14991main ()
14992{
14993return (putenv == 0);
14994 ;
14995 return 0;
14996}
14997_ACEOF
ac50fbac 14998if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
14999 bash_cv_std_putenv=yes
15000else
ac50fbac 15001 bash_cv_std_putenv=no
7117c2d2
JA
15002
15003fi
ac50fbac
CR
15004rm -f core conftest.err conftest.$ac_objext \
15005 conftest$ac_exeext conftest.$ac_ext
7117c2d2 15006fi
ac50fbac 15007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_putenv" >&5
3185942a 15008$as_echo "$bash_cv_std_putenv" >&6; }
7117c2d2 15009if test $bash_cv_std_putenv = yes; then
ac50fbac 15010$as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h
7117c2d2
JA
15011
15012fi
15013
15014else
ac50fbac 15015$as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h
7117c2d2
JA
15016
15017fi
15018if test "$ac_cv_func_unsetenv" = "yes"; then
15019
b80f6443
JA
15020
15021
ac50fbac 15022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant unsetenv declaration" >&5
3185942a 15023$as_echo_n "checking for standard-conformant unsetenv declaration... " >&6; }
ac50fbac 15024if ${bash_cv_std_unsetenv+:} false; then :
3185942a 15025 $as_echo_n "(cached) " >&6
7117c2d2 15026else
ac50fbac 15027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15028/* end confdefs.h. */
7117c2d2
JA
15029
15030#if STDC_HEADERS
15031#include <stdlib.h>
15032#include <stddef.h>
15033#endif
15034#ifndef __STDC__
15035# ifndef const
15036# define const
15037# endif
15038#endif
15039#ifdef PROTOTYPES
15040extern int unsetenv (const char *);
15041#else
15042extern int unsetenv ();
15043#endif
15044
15045int
15046main ()
15047{
15048return (unsetenv == 0);
15049 ;
15050 return 0;
15051}
15052_ACEOF
ac50fbac 15053if ac_fn_c_try_link "$LINENO"; then :
7117c2d2
JA
15054 bash_cv_std_unsetenv=yes
15055else
ac50fbac 15056 bash_cv_std_unsetenv=no
7117c2d2
JA
15057
15058fi
ac50fbac
CR
15059rm -f core conftest.err conftest.$ac_objext \
15060 conftest$ac_exeext conftest.$ac_ext
7117c2d2 15061fi
ac50fbac 15062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_unsetenv" >&5
3185942a 15063$as_echo "$bash_cv_std_unsetenv" >&6; }
7117c2d2 15064if test $bash_cv_std_unsetenv = yes; then
ac50fbac 15065$as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h
7117c2d2
JA
15066
15067fi
15068
15069else
ac50fbac 15070$as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h
7117c2d2
JA
15071
15072fi
15073
ac50fbac 15074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf floating point output in hex notation" >&5
3185942a 15075$as_echo_n "checking for printf floating point output in hex notation... " >&6; }
ac50fbac 15076if ${bash_cv_printf_a_format+:} false; then :
3185942a 15077 $as_echo_n "(cached) " >&6
f73dda09 15078else
ac50fbac
CR
15079 if test "$cross_compiling" = yes; then :
15080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5
3185942a 15081$as_echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;}
f73dda09
JA
15082 bash_cv_printf_a_format=no
15083
15084else
ac50fbac 15085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15086/* end confdefs.h. */
f73dda09
JA
15087
15088#include <stdio.h>
15089#include <string.h>
15090
15091int
15092main()
15093{
15094 double y = 0.0;
15095 char abuf[1024];
15096
15097 sprintf(abuf, "%A", y);
15098 exit(strchr(abuf, 'P') == (char *)0);
15099}
15100
15101_ACEOF
ac50fbac 15102if ac_fn_c_try_run "$LINENO"; then :
f73dda09
JA
15103 bash_cv_printf_a_format=yes
15104else
ac50fbac 15105 bash_cv_printf_a_format=no
f73dda09 15106fi
ac50fbac
CR
15107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15108 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 15109fi
3185942a 15110
f73dda09 15111fi
d166f048 15112
ac50fbac 15113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_printf_a_format" >&5
3185942a 15114$as_echo "$bash_cv_printf_a_format" >&6; }
f73dda09 15115if test $bash_cv_printf_a_format = yes; then
ac50fbac 15116$as_echo "#define HAVE_PRINTF_A_FORMAT 1" >>confdefs.h
d166f048 15117
f73dda09 15118fi
ccc6cda3 15119
b80f6443
JA
15120
15121
15122
ac50fbac 15123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5
3185942a 15124$as_echo_n "checking if signal handlers must be reinstalled when invoked... " >&6; }
ac50fbac 15125if ${bash_cv_must_reinstall_sighandlers+:} false; then :
3185942a 15126 $as_echo_n "(cached) " >&6
ccc6cda3 15127else
ac50fbac
CR
15128 if test "$cross_compiling" = yes; then :
15129 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5
3185942a 15130$as_echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
15131 bash_cv_must_reinstall_sighandlers=no
15132
ccc6cda3 15133else
ac50fbac 15134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15135/* end confdefs.h. */
ccc6cda3
JA
15136
15137#include <signal.h>
15138#ifdef HAVE_UNISTD_H
15139#include <unistd.h>
15140#endif
15141
15142typedef RETSIGTYPE sigfunc();
15143
15144int nsigint;
15145
15146#ifdef HAVE_POSIX_SIGNALS
15147sigfunc *
15148set_signal_handler(sig, handler)
15149 int sig;
15150 sigfunc *handler;
15151{
15152 struct sigaction act, oact;
15153 act.sa_handler = handler;
15154 act.sa_flags = 0;
15155 sigemptyset (&act.sa_mask);
15156 sigemptyset (&oact.sa_mask);
15157 sigaction (sig, &act, &oact);
15158 return (oact.sa_handler);
15159}
15160#else
15161#define set_signal_handler(s, h) signal(s, h)
15162#endif
15163
15164RETSIGTYPE
15165sigint(s)
15166int s;
15167{
15168 nsigint++;
15169}
15170
15171main()
15172{
15173 nsigint = 0;
15174 set_signal_handler(SIGINT, sigint);
15175 kill((int)getpid(), SIGINT);
15176 kill((int)getpid(), SIGINT);
15177 exit(nsigint != 2);
15178}
15179
f73dda09 15180_ACEOF
ac50fbac 15181if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
15182 bash_cv_must_reinstall_sighandlers=no
15183else
ac50fbac 15184 bash_cv_must_reinstall_sighandlers=yes
ccc6cda3 15185fi
ac50fbac
CR
15186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15187 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 15188fi
3185942a 15189
ccc6cda3
JA
15190fi
15191
ac50fbac 15192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5
3185942a 15193$as_echo "$bash_cv_must_reinstall_sighandlers" >&6; }
ccc6cda3 15194if test $bash_cv_must_reinstall_sighandlers = yes; then
ac50fbac 15195$as_echo "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h
ccc6cda3
JA
15196
15197fi
15198
b80f6443 15199
ac50fbac 15200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of necessary job control definitions" >&5
3185942a 15201$as_echo_n "checking for presence of necessary job control definitions... " >&6; }
ac50fbac 15202if ${bash_cv_job_control_missing+:} false; then :
3185942a 15203 $as_echo_n "(cached) " >&6
ccc6cda3 15204else
ac50fbac
CR
15205 if test "$cross_compiling" = yes; then :
15206 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&5
3185942a 15207$as_echo "$as_me: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
15208 bash_cv_job_control_missing=missing
15209
ccc6cda3 15210else
ac50fbac 15211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15212/* end confdefs.h. */
ccc6cda3
JA
15213
15214#include <sys/types.h>
15215#ifdef HAVE_SYS_WAIT_H
15216#include <sys/wait.h>
15217#endif
15218#ifdef HAVE_UNISTD_H
15219#include <unistd.h>
15220#endif
15221#include <signal.h>
15222
15223/* Add more tests in here as appropriate. */
15224main()
15225{
15226/* signal type */
15227#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
15228exit(1);
15229#endif
15230
15231/* signals and tty control. */
15232#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
15233exit (1);
15234#endif
15235
15236/* process control */
f73dda09 15237#if !defined (WNOHANG) || !defined (WUNTRACED)
ccc6cda3
JA
15238exit(1);
15239#endif
15240
15241/* Posix systems have tcgetpgrp and waitpid. */
15242#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
15243exit(1);
15244#endif
15245
15246#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
15247exit(1);
15248#endif
15249
15250/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
15251#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
15252exit(1);
15253#endif
15254
15255exit(0);
15256}
f73dda09 15257_ACEOF
ac50fbac 15258if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
15259 bash_cv_job_control_missing=present
15260else
ac50fbac 15261 bash_cv_job_control_missing=missing
ccc6cda3 15262fi
ac50fbac
CR
15263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15264 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 15265fi
3185942a 15266
ccc6cda3
JA
15267fi
15268
ac50fbac 15269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_job_control_missing" >&5
3185942a 15270$as_echo "$bash_cv_job_control_missing" >&6; }
ccc6cda3 15271if test $bash_cv_job_control_missing = missing; then
ac50fbac 15272$as_echo "#define JOB_CONTROL_MISSING 1" >>confdefs.h
ccc6cda3
JA
15273
15274fi
15275
ac50fbac 15276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of named pipes" >&5
3185942a 15277$as_echo_n "checking for presence of named pipes... " >&6; }
ac50fbac 15278if ${bash_cv_sys_named_pipes+:} false; then :
3185942a 15279 $as_echo_n "(cached) " >&6
ccc6cda3 15280else
ac50fbac
CR
15281 if test "$cross_compiling" = yes; then :
15282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5
3185942a 15283$as_echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
15284 bash_cv_sys_named_pipes=missing
15285
ccc6cda3 15286else
ac50fbac 15287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15288/* end confdefs.h. */
ccc6cda3
JA
15289
15290#include <sys/types.h>
15291#include <sys/stat.h>
15292#ifdef HAVE_UNISTD_H
15293#include <unistd.h>
15294#endif
15295
15296/* Add more tests in here as appropriate. */
15297main()
15298{
bb70624e 15299int fd, err;
ccc6cda3
JA
15300
15301#if defined (HAVE_MKFIFO)
15302exit (0);
15303#endif
15304
15305#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
15306exit (1);
15307#endif
15308
15309#if defined (NeXT)
15310exit (1);
15311#endif
3185942a 15312err = mkdir("bash-aclocal", 0700);
bb70624e
JA
15313if (err < 0) {
15314 perror ("mkdir");
15315 exit(1);
15316}
3185942a 15317fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
bb70624e 15318if (fd == -1) {
3185942a 15319 rmdir ("bash-aclocal");
ccc6cda3 15320 exit (1);
bb70624e 15321}
ccc6cda3 15322close(fd);
3185942a
JA
15323unlink ("bash-aclocal/sh-np-autoconf");
15324rmdir ("bash-aclocal");
ccc6cda3
JA
15325exit(0);
15326}
f73dda09 15327_ACEOF
ac50fbac 15328if ac_fn_c_try_run "$LINENO"; then :
ccc6cda3
JA
15329 bash_cv_sys_named_pipes=present
15330else
ac50fbac 15331 bash_cv_sys_named_pipes=missing
0628567a 15332fi
ac50fbac
CR
15333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15334 conftest.$ac_objext conftest.beam conftest.$ac_ext
95732b49 15335fi
3185942a 15336
95732b49 15337fi
95732b49 15338
ac50fbac 15339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_named_pipes" >&5
3185942a 15340$as_echo "$bash_cv_sys_named_pipes" >&6; }
0628567a 15341if test $bash_cv_sys_named_pipes = missing; then
ac50fbac 15342$as_echo "#define NAMED_PIPES_MISSING 1" >>confdefs.h
0628567a
JA
15343
15344fi
15345
15346
ac50fbac 15347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
3185942a 15348$as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
ac50fbac 15349if ${ac_cv_sys_tiocgwinsz_in_termios_h+:} false; then :
3185942a 15350 $as_echo_n "(cached) " >&6
f73dda09 15351else
ac50fbac 15352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15353/* end confdefs.h. */
f73dda09
JA
15354#include <sys/types.h>
15355#include <termios.h>
15356#ifdef TIOCGWINSZ
15357 yes
15358#endif
15359
15360_ACEOF
15361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 15362 $EGREP "yes" >/dev/null 2>&1; then :
f73dda09
JA
15363 ac_cv_sys_tiocgwinsz_in_termios_h=yes
15364else
15365 ac_cv_sys_tiocgwinsz_in_termios_h=no
15366fi
15367rm -f conftest*
15368
15369fi
ac50fbac 15370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
3185942a 15371$as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
d166f048 15372
f73dda09 15373if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
ac50fbac 15374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
3185942a 15375$as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
ac50fbac 15376if ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+:} false; then :
3185942a 15377 $as_echo_n "(cached) " >&6
ccc6cda3 15378else
ac50fbac 15379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15380/* end confdefs.h. */
ccc6cda3
JA
15381#include <sys/types.h>
15382#include <sys/ioctl.h>
f73dda09
JA
15383#ifdef TIOCGWINSZ
15384 yes
15385#endif
15386
15387_ACEOF
15388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 15389 $EGREP "yes" >/dev/null 2>&1; then :
f73dda09 15390 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
ccc6cda3 15391else
f73dda09 15392 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
ccc6cda3
JA
15393fi
15394rm -f conftest*
f73dda09 15395
ccc6cda3 15396fi
ac50fbac 15397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
3185942a 15398$as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
f73dda09
JA
15399
15400 if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
ccc6cda3 15401
ac50fbac 15402$as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3 15403
f73dda09 15404 fi
ccc6cda3
JA
15405fi
15406
ac50fbac 15407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5
3185942a 15408$as_echo_n "checking for TIOCSTAT in sys/ioctl.h... " >&6; }
ac50fbac 15409if ${bash_cv_tiocstat_in_ioctl+:} false; then :
3185942a 15410 $as_echo_n "(cached) " >&6
ccc6cda3 15411else
ac50fbac 15412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15413/* end confdefs.h. */
ccc6cda3
JA
15414#include <sys/types.h>
15415#include <sys/ioctl.h>
f73dda09
JA
15416int
15417main ()
15418{
ccc6cda3 15419int x = TIOCSTAT;
f73dda09
JA
15420 ;
15421 return 0;
15422}
15423_ACEOF
ac50fbac 15424if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15425 bash_cv_tiocstat_in_ioctl=yes
15426else
ac50fbac 15427 bash_cv_tiocstat_in_ioctl=no
ccc6cda3 15428fi
3185942a 15429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15430fi
15431
ac50fbac 15432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5
3185942a 15433$as_echo "$bash_cv_tiocstat_in_ioctl" >&6; }
f73dda09 15434if test $bash_cv_tiocstat_in_ioctl = yes; then
ac50fbac 15435$as_echo "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3
JA
15436
15437fi
15438
ac50fbac 15439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5
3185942a 15440$as_echo_n "checking for FIONREAD in sys/ioctl.h... " >&6; }
ac50fbac 15441if ${bash_cv_fionread_in_ioctl+:} false; then :
3185942a 15442 $as_echo_n "(cached) " >&6
ccc6cda3 15443else
ac50fbac 15444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15445/* end confdefs.h. */
ccc6cda3
JA
15446#include <sys/types.h>
15447#include <sys/ioctl.h>
f73dda09
JA
15448int
15449main ()
15450{
ccc6cda3 15451int x = FIONREAD;
f73dda09
JA
15452 ;
15453 return 0;
15454}
15455_ACEOF
ac50fbac 15456if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15457 bash_cv_fionread_in_ioctl=yes
15458else
ac50fbac 15459 bash_cv_fionread_in_ioctl=no
ccc6cda3 15460fi
3185942a 15461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15462fi
15463
ac50fbac 15464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5
3185942a 15465$as_echo "$bash_cv_fionread_in_ioctl" >&6; }
f73dda09 15466if test $bash_cv_fionread_in_ioctl = yes; then
ac50fbac 15467$as_echo "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3
JA
15468
15469fi
15470
b80f6443 15471
95732b49 15472
ac50fbac 15473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5
3185942a 15474$as_echo_n "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; }
ac50fbac 15475if ${bash_cv_wcontinued_broken+:} false; then :
3185942a 15476 $as_echo_n "(cached) " >&6
95732b49 15477else
ac50fbac
CR
15478 if test "$cross_compiling" = yes; then :
15479 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5
3185942a 15480$as_echo "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&2;}
95732b49
JA
15481 bash_cv_wcontinued_broken=no
15482
15483else
ac50fbac 15484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15485/* end confdefs.h. */
95732b49
JA
15486
15487#include <sys/types.h>
15488#include <sys/wait.h>
15489#include <unistd.h>
15490#include <errno.h>
15491
15492#ifndef errno
15493extern int errno;
15494#endif
15495main()
15496{
15497 int x;
15498
15499 x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED);
15500 if (x == -1 && errno == EINVAL)
15501 exit (1);
15502 else
15503 exit (0);
15504}
15505
15506_ACEOF
ac50fbac 15507if ac_fn_c_try_run "$LINENO"; then :
95732b49
JA
15508 bash_cv_wcontinued_broken=no
15509else
ac50fbac 15510 bash_cv_wcontinued_broken=yes
95732b49 15511fi
ac50fbac
CR
15512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15513 conftest.$ac_objext conftest.beam conftest.$ac_ext
95732b49 15514fi
3185942a 15515
95732b49
JA
15516fi
15517
ac50fbac 15518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcontinued_broken" >&5
3185942a 15519$as_echo "$bash_cv_wcontinued_broken" >&6; }
95732b49 15520if test $bash_cv_wcontinued_broken = yes; then
ac50fbac 15521$as_echo "#define WCONTINUED_BROKEN 1" >>confdefs.h
95732b49
JA
15522
15523fi
15524
15525
ac50fbac 15526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5
3185942a 15527$as_echo_n "checking for speed_t in sys/types.h... " >&6; }
ac50fbac 15528if ${bash_cv_speed_t_in_sys_types+:} false; then :
3185942a 15529 $as_echo_n "(cached) " >&6
d166f048 15530else
ac50fbac 15531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15532/* end confdefs.h. */
d166f048 15533#include <sys/types.h>
f73dda09
JA
15534int
15535main ()
15536{
d166f048 15537speed_t x;
f73dda09
JA
15538 ;
15539 return 0;
15540}
15541_ACEOF
ac50fbac 15542if ac_fn_c_try_compile "$LINENO"; then :
d166f048
JA
15543 bash_cv_speed_t_in_sys_types=yes
15544else
ac50fbac 15545 bash_cv_speed_t_in_sys_types=no
d166f048 15546fi
3185942a 15547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d166f048
JA
15548fi
15549
ac50fbac 15550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5
3185942a 15551$as_echo "$bash_cv_speed_t_in_sys_types" >&6; }
f73dda09 15552if test $bash_cv_speed_t_in_sys_types = yes; then
ac50fbac 15553$as_echo "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h
d166f048
JA
15554
15555fi
15556
ac50fbac 15557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5
3185942a 15558$as_echo_n "checking whether getpw functions are declared in pwd.h... " >&6; }
ac50fbac 15559if ${bash_cv_getpw_declared+:} false; then :
3185942a 15560 $as_echo_n "(cached) " >&6
ccc6cda3 15561else
ac50fbac 15562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15563/* end confdefs.h. */
28ef6c31 15564
ccc6cda3 15565#include <sys/types.h>
28ef6c31
JA
15566#ifdef HAVE_UNISTD_H
15567# include <unistd.h>
15568#endif
ccc6cda3 15569#include <pwd.h>
28ef6c31 15570
f73dda09 15571_ACEOF
28ef6c31 15572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ac50fbac 15573 $EGREP "getpwuid" >/dev/null 2>&1; then :
28ef6c31 15574 bash_cv_getpw_declared=yes
ccc6cda3 15575else
28ef6c31 15576 bash_cv_getpw_declared=no
ccc6cda3
JA
15577fi
15578rm -f conftest*
28ef6c31 15579
ccc6cda3
JA
15580fi
15581
ac50fbac 15582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5
3185942a 15583$as_echo "$bash_cv_getpw_declared" >&6; }
28ef6c31 15584if test $bash_cv_getpw_declared = yes; then
ac50fbac 15585$as_echo "#define HAVE_GETPW_DECLS 1" >>confdefs.h
ccc6cda3
JA
15586
15587fi
15588
ac50fbac 15589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unusable real-time signals due to large values" >&5
3185942a 15590$as_echo_n "checking for unusable real-time signals due to large values... " >&6; }
ac50fbac 15591if ${bash_cv_unusable_rtsigs+:} false; then :
3185942a 15592 $as_echo_n "(cached) " >&6
28ef6c31 15593else
ac50fbac
CR
15594 if test "$cross_compiling" = yes; then :
15595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5
3185942a 15596$as_echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;}
28ef6c31
JA
15597 bash_cv_unusable_rtsigs=yes
15598
15599else
ac50fbac 15600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15601/* end confdefs.h. */
28ef6c31
JA
15602
15603#include <sys/types.h>
15604#include <signal.h>
15605
15606#ifndef NSIG
15607# define NSIG 64
15608#endif
15609
15610main ()
15611{
15612 int n_sigs = 2 * NSIG;
15613#ifdef SIGRTMIN
15614 int rtmin = SIGRTMIN;
15615#else
15616 int rtmin = 0;
15617#endif
15618
15619 exit(rtmin < n_sigs);
15620}
f73dda09 15621_ACEOF
ac50fbac 15622if ac_fn_c_try_run "$LINENO"; then :
28ef6c31
JA
15623 bash_cv_unusable_rtsigs=yes
15624else
ac50fbac 15625 bash_cv_unusable_rtsigs=no
28ef6c31 15626fi
ac50fbac
CR
15627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15628 conftest.$ac_objext conftest.beam conftest.$ac_ext
28ef6c31 15629fi
3185942a 15630
28ef6c31
JA
15631fi
15632
ac50fbac 15633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_unusable_rtsigs" >&5
3185942a 15634$as_echo "$bash_cv_unusable_rtsigs" >&6; }
28ef6c31 15635if test $bash_cv_unusable_rtsigs = yes; then
ac50fbac 15636$as_echo "#define UNUSABLE_RT_SIGNALS 1" >>confdefs.h
28ef6c31
JA
15637
15638fi
15639
b80f6443
JA
15640
15641
15642
15643
f73dda09
JA
15644if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
15645 SIGLIST_O=siglist.o
15646else
15647 SIGLIST_O=
15648fi
ccc6cda3 15649
b80f6443
JA
15650
15651
ccc6cda3 15652case "$host_os" in
ac50fbac 15653hpux*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
3185942a 15654$as_echo_n "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; }
ac50fbac 15655if ${bash_cv_kernel_rlimit+:} false; then :
3185942a 15656 $as_echo_n "(cached) " >&6
ccc6cda3 15657else
ac50fbac 15658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15659/* end confdefs.h. */
ccc6cda3
JA
15660
15661#include <sys/types.h>
15662#include <sys/resource.h>
15663
f73dda09
JA
15664int
15665main ()
15666{
ccc6cda3
JA
15667
15668 int f;
15669 f = RLIMIT_DATA;
15670
f73dda09
JA
15671 ;
15672 return 0;
15673}
15674_ACEOF
ac50fbac 15675if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15676 bash_cv_kernel_rlimit=no
15677else
ac50fbac 15678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15679/* end confdefs.h. */
ccc6cda3 15680
cce855bc
JA
15681#include <sys/types.h>
15682#define _KERNEL
15683#include <sys/resource.h>
15684#undef _KERNEL
15685
f73dda09
JA
15686int
15687main ()
15688{
ccc6cda3
JA
15689
15690 int f;
15691 f = RLIMIT_DATA;
cce855bc 15692
f73dda09
JA
15693 ;
15694 return 0;
15695}
15696_ACEOF
ac50fbac 15697if ac_fn_c_try_compile "$LINENO"; then :
ccc6cda3
JA
15698 bash_cv_kernel_rlimit=yes
15699else
ac50fbac 15700 bash_cv_kernel_rlimit=no
ccc6cda3 15701fi
3185942a 15702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15703
15704fi
3185942a 15705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ccc6cda3
JA
15706fi
15707
ac50fbac 15708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_kernel_rlimit" >&5
3185942a 15709$as_echo "$bash_cv_kernel_rlimit" >&6; }
ccc6cda3 15710if test $bash_cv_kernel_rlimit = yes; then
ac50fbac 15711$as_echo "#define RLIMIT_NEEDS_KERNEL 1" >>confdefs.h
ccc6cda3
JA
15712
15713fi
15714 ;;
15715esac
15716
15717if test "$opt_readline" = yes; then
d166f048
JA
15718case "$host_os" in
15719aix*) prefer_curses=yes ;;
15720esac
ccc6cda3
JA
15721
15722if test "X$bash_cv_termcap_lib" = "X"; then
15723_bash_needmsg=yes
15724else
ac50fbac 15725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 15726$as_echo_n "checking which library has the termcap functions... " >&6; }
ccc6cda3
JA
15727_bash_needmsg=
15728fi
ac50fbac 15729if ${bash_cv_termcap_lib+:} false; then :
3185942a 15730 $as_echo_n "(cached) " >&6
b80f6443 15731else
ac50fbac
CR
15732 ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
15733if test "x$ac_cv_func_tgetent" = xyes; then :
b80f6443
JA
15734 bash_cv_termcap_lib=libc
15735else
ac50fbac 15736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
3185942a 15737$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
ac50fbac 15738if ${ac_cv_lib_termcap_tgetent+:} false; then :
3185942a 15739 $as_echo_n "(cached) " >&6
ccc6cda3 15740else
f73dda09 15741 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 15742LIBS="-ltermcap $LIBS"
ac50fbac 15743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15744/* end confdefs.h. */
f73dda09 15745
3185942a
JA
15746/* Override any GCC internal prototype to avoid an error.
15747 Use char because int might match the return type of a GCC
15748 builtin and then its argument prototype would still apply. */
f73dda09
JA
15749#ifdef __cplusplus
15750extern "C"
15751#endif
f73dda09
JA
15752char tgetent ();
15753int
15754main ()
15755{
3185942a 15756return tgetent ();
f73dda09
JA
15757 ;
15758 return 0;
15759}
15760_ACEOF
ac50fbac 15761if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
15762 ac_cv_lib_termcap_tgetent=yes
15763else
ac50fbac 15764 ac_cv_lib_termcap_tgetent=no
f73dda09 15765fi
ac50fbac
CR
15766rm -f core conftest.err conftest.$ac_objext \
15767 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
15768LIBS=$ac_check_lib_save_LIBS
15769fi
ac50fbac 15770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
3185942a 15771$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
ac50fbac 15772if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
ccc6cda3
JA
15773 bash_cv_termcap_lib=libtermcap
15774else
ac50fbac 15775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
3185942a 15776$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
ac50fbac 15777if ${ac_cv_lib_tinfo_tgetent+:} false; then :
3185942a 15778 $as_echo_n "(cached) " >&6
ccc6cda3 15779else
f73dda09
JA
15780 ac_check_lib_save_LIBS=$LIBS
15781LIBS="-ltinfo $LIBS"
ac50fbac 15782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15783/* end confdefs.h. */
f73dda09 15784
3185942a
JA
15785/* Override any GCC internal prototype to avoid an error.
15786 Use char because int might match the return type of a GCC
15787 builtin and then its argument prototype would still apply. */
f73dda09
JA
15788#ifdef __cplusplus
15789extern "C"
15790#endif
f73dda09
JA
15791char tgetent ();
15792int
15793main ()
15794{
3185942a 15795return tgetent ();
f73dda09
JA
15796 ;
15797 return 0;
15798}
15799_ACEOF
ac50fbac 15800if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
15801 ac_cv_lib_tinfo_tgetent=yes
15802else
ac50fbac 15803 ac_cv_lib_tinfo_tgetent=no
f73dda09 15804fi
ac50fbac
CR
15805rm -f core conftest.err conftest.$ac_objext \
15806 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
15807LIBS=$ac_check_lib_save_LIBS
15808fi
ac50fbac 15809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
3185942a 15810$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
ac50fbac 15811if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
7117c2d2 15812 bash_cv_termcap_lib=libtinfo
f73dda09 15813else
ac50fbac 15814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
3185942a 15815$as_echo_n "checking for tgetent in -lcurses... " >&6; }
ac50fbac 15816if ${ac_cv_lib_curses_tgetent+:} false; then :
3185942a 15817 $as_echo_n "(cached) " >&6
f73dda09
JA
15818else
15819 ac_check_lib_save_LIBS=$LIBS
15820LIBS="-lcurses $LIBS"
ac50fbac 15821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15822/* end confdefs.h. */
ccc6cda3 15823
3185942a
JA
15824/* Override any GCC internal prototype to avoid an error.
15825 Use char because int might match the return type of a GCC
15826 builtin and then its argument prototype would still apply. */
f73dda09
JA
15827#ifdef __cplusplus
15828extern "C"
15829#endif
f73dda09
JA
15830char tgetent ();
15831int
15832main ()
15833{
3185942a 15834return tgetent ();
f73dda09
JA
15835 ;
15836 return 0;
15837}
15838_ACEOF
ac50fbac 15839if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
15840 ac_cv_lib_curses_tgetent=yes
15841else
ac50fbac 15842 ac_cv_lib_curses_tgetent=no
f73dda09 15843fi
ac50fbac
CR
15844rm -f core conftest.err conftest.$ac_objext \
15845 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
15846LIBS=$ac_check_lib_save_LIBS
15847fi
ac50fbac 15848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
3185942a 15849$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
ac50fbac 15850if test "x$ac_cv_lib_curses_tgetent" = xyes; then :
ccc6cda3
JA
15851 bash_cv_termcap_lib=libcurses
15852else
ac50fbac 15853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
3185942a 15854$as_echo_n "checking for tgetent in -lncurses... " >&6; }
ac50fbac 15855if ${ac_cv_lib_ncurses_tgetent+:} false; then :
3185942a 15856 $as_echo_n "(cached) " >&6
ccc6cda3 15857else
f73dda09 15858 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 15859LIBS="-lncurses $LIBS"
ac50fbac 15860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15861/* end confdefs.h. */
f73dda09 15862
3185942a
JA
15863/* Override any GCC internal prototype to avoid an error.
15864 Use char because int might match the return type of a GCC
15865 builtin and then its argument prototype would still apply. */
f73dda09
JA
15866#ifdef __cplusplus
15867extern "C"
15868#endif
f73dda09
JA
15869char tgetent ();
15870int
15871main ()
15872{
3185942a 15873return tgetent ();
f73dda09
JA
15874 ;
15875 return 0;
15876}
15877_ACEOF
ac50fbac 15878if ac_fn_c_try_link "$LINENO"; then :
f73dda09
JA
15879 ac_cv_lib_ncurses_tgetent=yes
15880else
ac50fbac 15881 ac_cv_lib_ncurses_tgetent=no
f73dda09 15882fi
ac50fbac
CR
15883rm -f core conftest.err conftest.$ac_objext \
15884 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
15885LIBS=$ac_check_lib_save_LIBS
15886fi
ac50fbac 15887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
3185942a 15888$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
ac50fbac 15889if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then :
f73dda09 15890 bash_cv_termcap_lib=libncurses
ccc6cda3 15891else
f73dda09 15892 bash_cv_termcap_lib=gnutermcap
ccc6cda3 15893fi
ccc6cda3 15894
ccc6cda3
JA
15895fi
15896
15897fi
15898
15899fi
15900
15901fi
15902
b80f6443
JA
15903fi
15904
ccc6cda3 15905if test "X$_bash_needmsg" = "Xyes"; then
ac50fbac 15906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
3185942a 15907$as_echo_n "checking which library has the termcap functions... " >&6; }
ccc6cda3 15908fi
ac50fbac 15909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5
3185942a 15910$as_echo "using $bash_cv_termcap_lib" >&6; }
cce855bc 15911if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
15912LDFLAGS="$LDFLAGS -L./lib/termcap"
15913TERMCAP_LIB="./lib/termcap/libtermcap.a"
15914TERMCAP_DEP="./lib/termcap/libtermcap.a"
d166f048 15915elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
15916TERMCAP_LIB=-ltermcap
15917TERMCAP_DEP=
f73dda09
JA
15918elif test $bash_cv_termcap_lib = libtinfo; then
15919TERMCAP_LIB=-ltinfo
15920TERMCAP_DEP=
ccc6cda3
JA
15921elif test $bash_cv_termcap_lib = libncurses; then
15922TERMCAP_LIB=-lncurses
15923TERMCAP_DEP=
b80f6443
JA
15924elif test $bash_cv_termcap_lib = libc; then
15925TERMCAP_LIB=
15926TERMCAP_DEP=
ccc6cda3
JA
15927else
15928TERMCAP_LIB=-lcurses
15929TERMCAP_DEP=
15930fi
15931
15932fi
15933
b80f6443
JA
15934
15935
ac50fbac 15936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/fd is available" >&5
3185942a 15937$as_echo_n "checking whether /dev/fd is available... " >&6; }
ac50fbac 15938if ${bash_cv_dev_fd+:} false; then :
3185942a 15939 $as_echo_n "(cached) " >&6
d166f048 15940else
0628567a 15941 bash_cv_dev_fd=""
3185942a 15942if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then
95732b49 15943# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
3185942a 15944 if (exec test -r /dev/fd/3 3</dev/null) ; then
95732b49
JA
15945 bash_cv_dev_fd=standard
15946 else
15947 bash_cv_dev_fd=absent
15948 fi
0628567a
JA
15949fi
15950if test -z "$bash_cv_dev_fd" ; then
3185942a 15951 if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
0628567a
JA
15952 bash_cv_dev_fd=whacky
15953 else
15954 bash_cv_dev_fd=absent
15955 fi
15956fi
d166f048
JA
15957
15958fi
15959
ac50fbac 15960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_fd" >&5
3185942a 15961$as_echo "$bash_cv_dev_fd" >&6; }
d166f048 15962if test $bash_cv_dev_fd = "standard"; then
ac50fbac 15963 $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h
d166f048 15964
ac50fbac 15965 $as_echo "#define DEV_FD_PREFIX \"/dev/fd/\"" >>confdefs.h
d166f048
JA
15966
15967elif test $bash_cv_dev_fd = "whacky"; then
ac50fbac 15968 $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h
d166f048 15969
ac50fbac 15970 $as_echo "#define DEV_FD_PREFIX \"/proc/self/fd/\"" >>confdefs.h
d166f048
JA
15971
15972fi
15973
ac50fbac 15974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/stdin stdout stderr are available" >&5
3185942a 15975$as_echo_n "checking whether /dev/stdin stdout stderr are available... " >&6; }
ac50fbac 15976if ${bash_cv_dev_stdin+:} false; then :
3185942a 15977 $as_echo_n "(cached) " >&6
bb70624e 15978else
3185942a 15979 if test -d /dev/fd && (exec test -r /dev/stdin < /dev/null) ; then
bb70624e 15980 bash_cv_dev_stdin=present
3185942a 15981 elif test -d /proc/self/fd && (exec test -r /dev/stdin < /dev/null) ; then
bb70624e
JA
15982 bash_cv_dev_stdin=present
15983 else
15984 bash_cv_dev_stdin=absent
15985 fi
15986
15987fi
15988
ac50fbac 15989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_stdin" >&5
3185942a 15990$as_echo "$bash_cv_dev_stdin" >&6; }
bb70624e 15991if test $bash_cv_dev_stdin = "present"; then
ac50fbac 15992 $as_echo "#define HAVE_DEV_STDIN 1" >>confdefs.h
bb70624e
JA
15993
15994fi
15995
ac50fbac 15996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5
3185942a 15997$as_echo_n "checking for default mail directory... " >&6; }
ac50fbac 15998if ${bash_cv_mail_dir+:} false; then :
3185942a 15999 $as_echo_n "(cached) " >&6
ccc6cda3
JA
16000else
16001 if test -d /var/mail; then
16002 bash_cv_mail_dir=/var/mail
ccc6cda3
JA
16003 elif test -d /var/spool/mail; then
16004 bash_cv_mail_dir=/var/spool/mail
7117c2d2
JA
16005 elif test -d /usr/mail; then
16006 bash_cv_mail_dir=/usr/mail
e8ce775d
JA
16007 elif test -d /usr/spool/mail; then
16008 bash_cv_mail_dir=/usr/spool/mail
ccc6cda3
JA
16009 else
16010 bash_cv_mail_dir=unknown
16011 fi
16012
16013fi
16014
ac50fbac 16015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_mail_dir" >&5
3185942a 16016$as_echo "$bash_cv_mail_dir" >&6; }
b80f6443
JA
16017cat >>confdefs.h <<_ACEOF
16018#define DEFAULT_MAIL_DIRECTORY "$bash_cv_mail_dir"
16019_ACEOF
16020
16021
ccc6cda3 16022
ccc6cda3
JA
16023if test "$bash_cv_job_control_missing" = missing; then
16024 opt_job_control=no
16025fi
16026
16027if test "$opt_job_control" = yes; then
ac50fbac 16028$as_echo "#define JOB_CONTROL 1" >>confdefs.h
ccc6cda3
JA
16029
16030JOBS_O=jobs.o
16031else
16032JOBS_O=nojobs.o
16033fi
16034
b80f6443
JA
16035
16036
16037
d166f048
JA
16038LOCAL_DEFS=-DSHELL
16039
b80f6443 16040
b72432fd 16041case "${host_os}" in
ac50fbac 16042sysv4.2*) $as_echo "#define SVR4_2 1" >>confdefs.h
ccc6cda3 16043
ac50fbac 16044 $as_echo "#define SVR4 1" >>confdefs.h
ccc6cda3 16045 ;;
ac50fbac 16046sysv4*) $as_echo "#define SVR4 1" >>confdefs.h
ccc6cda3 16047 ;;
ac50fbac 16048sysv5*) $as_echo "#define SVR5 1" >>confdefs.h
b72432fd
JA
16049 ;;
16050hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;;
ccc6cda3
JA
16051hpux*) LOCAL_CFLAGS=-DHPUX ;;
16052dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
bb70624e
JA
16053isc*) LOCAL_CFLAGS=-Disc386 ;;
16054rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;;
f73dda09 16055darwin*) LOCAL_CFLAGS=-DMACOSX ;;
7117c2d2
JA
16056sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;;
16057sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;;
ccc6cda3 16058sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
d166f048 16059sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
f1be666c 16060solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
17345e5a
JA
16061solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;;
16062solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;;
16063solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;;
f1be666c 16064solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
b72432fd 16065lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
95732b49
JA
16066linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
16067 case "`uname -r`" in
a0c0a00f 16068 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h
95732b49
JA
16069 ;;
16070 esac ;;
16071*qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
7117c2d2 16072*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
b72432fd 16073powerux*) LOCAL_LIBS="-lgen" ;;
b80f6443 16074cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
ac50fbac
CR
16075opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;;
16076*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;;
b72432fd
JA
16077esac
16078
16079case "${host_os}-${CC}" in
16080aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;;
16081aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;
16082bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
a0c0a00f
CR
16083bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
16084hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading
ccc6cda3
JA
16085esac
16086
bb70624e 16087case "${host_os}" in
28ef6c31
JA
16088freebsd[3-9]*)
16089 if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then
bb70624e
JA
16090 LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
16091 fi ;;
28ef6c31 16092freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
95732b49 16093dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
bb70624e
JA
16094esac
16095
ccc6cda3
JA
16096case "$host_cpu" in
16097*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
16098esac
16099
16100case "$host_cpu-$host_os" in
16101ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
16102esac
16103
16104case "$host_cpu-$host_vendor-$host_os" in
16105m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
16106mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
16107esac
16108
b72432fd
JA
16109#
16110# Shared object configuration section. These values are generated by
16111# ${srcdir}/support/shobj-conf
16112#
16113if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf
16114then
ac50fbac 16115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5
3185942a 16116$as_echo_n "checking shared object configuration for loadable builtins... " >&6; }
28ef6c31 16117 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
f73dda09 16118
b80f6443
JA
16119
16120
16121
16122
16123
16124
ac50fbac 16125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5
3185942a 16126$as_echo "$SHOBJ_STATUS" >&6; }
b72432fd
JA
16127fi
16128
ccc6cda3
JA
16129# try to create a directory tree if the source is elsewhere
16130# this should be packaged into a script accessible via ${srcdir}/support
16131case "$srcdir" in
16132.) ;;
cce855bc 16133*) for d in doc tests support lib examples; do # dirs
ccc6cda3
JA
16134 test -d $d || mkdir $d
16135 done
cce855bc 16136 for ld in readline glob tilde malloc sh termcap; do # libdirs
ccc6cda3
JA
16137 test -d lib/$ld || mkdir lib/$ld
16138 done
cce855bc 16139 test -d examples/loadables || mkdir examples/loadables # loadable builtins
bb70624e 16140 test -d examples/loadables/perl || mkdir examples/loadables/perl
ccc6cda3
JA
16141 ;;
16142esac
16143
16144BUILD_DIR=`pwd`
95732b49
JA
16145case "$BUILD_DIR" in
16146*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
16147*) ;;
16148esac
ccc6cda3 16149
3185942a
JA
16150if test -z "$localedir"; then
16151 localedir='${datarootdir}/locale'
16152fi
16153if test -z "$datarootdir"; then
16154 datarootdir='${prefix}/share'
16155fi
16156
16157
16158
16159
b80f6443
JA
16160
16161
3185942a 16162# Some versions of autoconf don't substitute these automatically
b80f6443
JA
16163
16164
16165
a0c0a00f
CR
16166# directory where we install dynamically loadable builtins
16167if test -z "$loadablesdir"; then
16168 loadablesdir='${libdir}/bash'
16169fi
16170
16171if test -z "$headersdir"; then
16172 headersdir='$(includedir)/$(PACKAGE_NAME)'
16173fi
16174
16175
b80f6443
JA
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
d166f048
JA
16194#AC_SUBST(ALLOCA_SOURCE)
16195#AC_SUBST(ALLOCA_OBJECT)
16196
a0c0a00f 16197ac_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"
3185942a
JA
16198
16199ac_config_commands="$ac_config_commands default"
16200
f73dda09 16201cat >confcache <<\_ACEOF
ccc6cda3
JA
16202# This file is a shell script that caches the results of configure
16203# tests run on this system so they can be shared between configure
f73dda09
JA
16204# scripts and configure runs, see configure's option --config-cache.
16205# It is not useful on other systems. If it contains results you don't
16206# want to keep, you may remove or edit it.
726f6388 16207#
f73dda09
JA
16208# config.status only pays attention to the cache file if you give it
16209# the --recheck option to rerun configure.
ccc6cda3 16210#
0628567a 16211# `ac_cv_env_foo' variables (set or unset) will be overridden when
f73dda09
JA
16212# loading this file, other *unset* `ac_cv_foo' will be assigned the
16213# following values.
16214
16215_ACEOF
16216
ccc6cda3
JA
16217# The following way of writing the cache mishandles newlines in values,
16218# but we know of no workaround that is simple, portable, and efficient.
3185942a 16219# So, we kill variables containing newlines.
ccc6cda3
JA
16220# Ultrix sh set writes to stderr and can't be redirected directly,
16221# and sets the high bit in the cache file unless we assign to the vars.
3185942a
JA
16222(
16223 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16224 eval ac_val=\$$ac_var
16225 case $ac_val in #(
16226 *${as_nl}*)
16227 case $ac_var in #(
ac50fbac 16228 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3185942a
JA
16229$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16230 esac
16231 case $ac_var in #(
16232 _ | IFS | as_nl) ;; #(
16233 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
ac50fbac 16234 *) { eval $ac_var=; unset $ac_var;} ;;
3185942a
JA
16235 esac ;;
16236 esac
16237 done
16238
f73dda09 16239 (set) 2>&1 |
3185942a
JA
16240 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16241 *${as_nl}ac_space=\ *)
ac50fbac
CR
16242 # `set' does not quote correctly, so add quotes: double-quote
16243 # substitution turns \\\\ into \\, and sed turns \\ into \.
f73dda09 16244 sed -n \
0628567a
JA
16245 "s/'/'\\\\''/g;
16246 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
3185942a 16247 ;; #(
f73dda09
JA
16248 *)
16249 # `set' quotes correctly as required by POSIX, so do not add quotes.
3185942a 16250 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
f73dda09 16251 ;;
3185942a
JA
16252 esac |
16253 sort
16254) |
f73dda09 16255 sed '
3185942a 16256 /^ac_cv_env_/b end
f73dda09 16257 t clear
3185942a 16258 :clear
f73dda09
JA
16259 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16260 t end
3185942a
JA
16261 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16262 :end' >>confcache
16263if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16264 if test -w "$cache_file"; then
ac50fbac
CR
16265 if test "x$cache_file" != "x/dev/null"; then
16266 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
3185942a 16267$as_echo "$as_me: updating cache $cache_file" >&6;}
ac50fbac
CR
16268 if test ! -f "$cache_file" || test -h "$cache_file"; then
16269 cat confcache >"$cache_file"
16270 else
16271 case $cache_file in #(
16272 */* | ?:*)
16273 mv -f confcache "$cache_file"$$ &&
16274 mv -f "$cache_file"$$ "$cache_file" ;; #(
16275 *)
16276 mv -f confcache "$cache_file" ;;
16277 esac
16278 fi
16279 fi
ccc6cda3 16280 else
ac50fbac 16281 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
3185942a 16282$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ccc6cda3
JA
16283 fi
16284fi
16285rm -f confcache
16286
ccc6cda3
JA
16287test "x$prefix" = xNONE && prefix=$ac_default_prefix
16288# Let make expand exec_prefix.
16289test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16290
ccc6cda3
JA
16291DEFS=-DHAVE_CONFIG_H
16292
0628567a
JA
16293ac_libobjs=
16294ac_ltlibobjs=
ac50fbac 16295U=
0628567a
JA
16296for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16297 # 1. Remove the extension, and $U if already installed.
3185942a
JA
16298 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16299 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16300 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16301 # will be set to the directory where LIBOBJS objects are built.
ac50fbac
CR
16302 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16303 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
0628567a
JA
16304done
16305LIBOBJS=$ac_libobjs
16306
16307LTLIBOBJS=$ac_ltlibobjs
16308
16309
b80f6443 16310
3185942a 16311
ac50fbac 16312: "${CONFIG_STATUS=./config.status}"
3185942a 16313ac_write_fail=0
f73dda09
JA
16314ac_clean_files_save=$ac_clean_files
16315ac_clean_files="$ac_clean_files $CONFIG_STATUS"
ac50fbac 16316{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
3185942a 16317$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
ac50fbac
CR
16318as_write_fail=0
16319cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
f73dda09 16320#! $SHELL
b80f6443 16321# Generated by $as_me.
ccc6cda3 16322# Run this file to recreate the current configuration.
ccc6cda3 16323# Compiler output produced by configure, useful for debugging
f73dda09 16324# configure, is in config.log if it exists.
ccc6cda3 16325
f73dda09 16326debug=false
0628567a
JA
16327ac_cs_recheck=false
16328ac_cs_silent=false
f73dda09 16329
ac50fbac
CR
16330SHELL=\${CONFIG_SHELL-$SHELL}
16331export SHELL
16332_ASEOF
16333cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16334## -------------------- ##
16335## M4sh Initialization. ##
16336## -------------------- ##
b80f6443 16337
3185942a
JA
16338# Be more Bourne compatible
16339DUALCASE=1; export DUALCASE # for MKS sh
ac50fbac 16340if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
f73dda09
JA
16341 emulate sh
16342 NULLCMD=:
3185942a 16343 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
0628567a
JA
16344 # is contrary to our usage. Disable this feature.
16345 alias -g '${1+"$@"}'='"$@"'
3185942a
JA
16346 setopt NO_GLOB_SUBST
16347else
ac50fbac
CR
16348 case `(set -o) 2>/dev/null` in #(
16349 *posix*) :
16350 set -o posix ;; #(
16351 *) :
16352 ;;
3185942a 16353esac
3185942a
JA
16354fi
16355
16356
3185942a
JA
16357as_nl='
16358'
16359export as_nl
16360# Printing a long string crashes Solaris 7 /usr/bin/printf.
16361as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16362as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16363as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
ac50fbac
CR
16364# Prefer a ksh shell builtin over an external printf program on Solaris,
16365# but without wasting forks for bash or zsh.
16366if test -z "$BASH_VERSION$ZSH_VERSION" \
16367 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16368 as_echo='print -r --'
16369 as_echo_n='print -rn --'
16370elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
3185942a
JA
16371 as_echo='printf %s\n'
16372 as_echo_n='printf %s'
16373else
16374 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16375 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16376 as_echo_n='/usr/ucb/echo -n'
16377 else
16378 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16379 as_echo_n_body='eval
16380 arg=$1;
ac50fbac 16381 case $arg in #(
3185942a
JA
16382 *"$as_nl"*)
16383 expr "X$arg" : "X\\(.*\\)$as_nl";
16384 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16385 esac;
16386 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16387 '
16388 export as_echo_n_body
16389 as_echo_n='sh -c $as_echo_n_body as_echo'
16390 fi
16391 export as_echo_body
16392 as_echo='sh -c $as_echo_body as_echo'
16393fi
16394
16395# The user is always right.
16396if test "${PATH_SEPARATOR+set}" != set; then
16397 PATH_SEPARATOR=:
16398 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16399 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16400 PATH_SEPARATOR=';'
16401 }
f73dda09
JA
16402fi
16403
0628567a 16404
3185942a
JA
16405# IFS
16406# We need space, tab and new line, in precisely that order. Quoting is
16407# there to prevent editors from complaining about space-tab.
16408# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16409# splitting by setting IFS to empty value.)
16410IFS=" "" $as_nl"
16411
16412# Find who we are. Look in the path if we contain no directory separator.
ac50fbac
CR
16413as_myself=
16414case $0 in #((
3185942a
JA
16415 *[\\/]* ) as_myself=$0 ;;
16416 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16417for as_dir in $PATH
16418do
16419 IFS=$as_save_IFS
16420 test -z "$as_dir" && as_dir=.
ac50fbac
CR
16421 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16422 done
3185942a
JA
16423IFS=$as_save_IFS
16424
16425 ;;
16426esac
16427# We did not find ourselves, most probably we were run as `sh COMMAND'
16428# in which case we are not to be found in the path.
16429if test "x$as_myself" = x; then
16430 as_myself=$0
16431fi
16432if test ! -f "$as_myself"; then
16433 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ac50fbac 16434 exit 1
3185942a
JA
16435fi
16436
ac50fbac
CR
16437# Unset variables that we do not need and which cause bugs (e.g. in
16438# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16439# suppresses any "Segmentation fault" message there. '((' could
16440# trigger a bug in pdksh 5.2.14.
16441for as_var in BASH_ENV ENV MAIL MAILPATH
16442do eval test x\${$as_var+set} = xset \
16443 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
3185942a 16444done
0628567a
JA
16445PS1='$ '
16446PS2='> '
16447PS4='+ '
16448
16449# NLS nuisances.
3185942a
JA
16450LC_ALL=C
16451export LC_ALL
16452LANGUAGE=C
16453export LANGUAGE
0628567a 16454
ac50fbac
CR
16455# CDPATH.
16456(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16457
16458
16459# as_fn_error STATUS ERROR [LINENO LOG_FD]
16460# ----------------------------------------
16461# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16462# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16463# script with STATUS, using 1 if that was 0.
16464as_fn_error ()
16465{
16466 as_status=$1; test $as_status -eq 0 && as_status=1
16467 if test "$4"; then
16468 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16469 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16470 fi
16471 $as_echo "$as_me: error: $2" >&2
16472 as_fn_exit $as_status
16473} # as_fn_error
16474
16475
16476# as_fn_set_status STATUS
16477# -----------------------
16478# Set $? to STATUS, without forking.
16479as_fn_set_status ()
16480{
16481 return $1
16482} # as_fn_set_status
16483
16484# as_fn_exit STATUS
16485# -----------------
16486# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16487as_fn_exit ()
16488{
16489 set +e
16490 as_fn_set_status $1
16491 exit $1
16492} # as_fn_exit
16493
16494# as_fn_unset VAR
16495# ---------------
16496# Portably unset VAR.
16497as_fn_unset ()
16498{
16499 { eval $1=; unset $1;}
16500}
16501as_unset=as_fn_unset
16502# as_fn_append VAR VALUE
16503# ----------------------
16504# Append the text in VALUE to the end of the definition contained in VAR. Take
16505# advantage of any shell optimizations that allow amortized linear growth over
16506# repeated appends, instead of the typical quadratic growth present in naive
16507# implementations.
16508if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16509 eval 'as_fn_append ()
16510 {
16511 eval $1+=\$2
16512 }'
16513else
16514 as_fn_append ()
16515 {
16516 eval $1=\$$1\$2
16517 }
16518fi # as_fn_append
16519
16520# as_fn_arith ARG...
16521# ------------------
16522# Perform arithmetic evaluation on the ARGs, and store the result in the
16523# global $as_val. Take advantage of shells that can avoid forks. The arguments
16524# must be portable across $(()) and expr.
16525if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16526 eval 'as_fn_arith ()
16527 {
16528 as_val=$(( $* ))
16529 }'
16530else
16531 as_fn_arith ()
16532 {
16533 as_val=`expr "$@" || test $? -eq 1`
16534 }
16535fi # as_fn_arith
16536
16537
3185942a
JA
16538if expr a : '\(a\)' >/dev/null 2>&1 &&
16539 test "X`expr 00001 : '.*\(...\)'`" = X001; then
0628567a
JA
16540 as_expr=expr
16541else
16542 as_expr=false
16543fi
16544
3185942a 16545if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
0628567a
JA
16546 as_basename=basename
16547else
16548 as_basename=false
16549fi
b80f6443 16550
ac50fbac
CR
16551if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16552 as_dirname=dirname
16553else
16554 as_dirname=false
16555fi
b80f6443 16556
3185942a 16557as_me=`$as_basename -- "$0" ||
b80f6443
JA
16558$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16559 X"$0" : 'X\(//\)$' \| \
3185942a
JA
16560 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16561$as_echo X/"$0" |
16562 sed '/^.*\/\([^/][^/]*\)\/*$/{
16563 s//\1/
16564 q
16565 }
16566 /^X\/\(\/\/\)$/{
16567 s//\1/
16568 q
16569 }
16570 /^X\/\(\/\).*/{
16571 s//\1/
16572 q
16573 }
16574 s/.*/./; q'`
b80f6443 16575
ac50fbac
CR
16576# Avoid depending upon Character Ranges.
16577as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16578as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16579as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16580as_cr_digits='0123456789'
16581as_cr_alnum=$as_cr_Letters$as_cr_digits
f73dda09 16582
3185942a 16583ECHO_C= ECHO_N= ECHO_T=
ac50fbac 16584case `echo -n x` in #(((((
3185942a 16585-n*)
ac50fbac 16586 case `echo 'xy\c'` in
3185942a 16587 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
ac50fbac
CR
16588 xy) ECHO_C='\c';;
16589 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16590 ECHO_T=' ';;
3185942a
JA
16591 esac;;
16592*)
16593 ECHO_N='-n';;
16594esac
f73dda09
JA
16595
16596rm -f conf$$ conf$$.exe conf$$.file
3185942a
JA
16597if test -d conf$$.dir; then
16598 rm -f conf$$.dir/conf$$.file
16599else
16600 rm -f conf$$.dir
16601 mkdir conf$$.dir 2>/dev/null
16602fi
16603if (echo >conf$$.file) 2>/dev/null; then
16604 if ln -s conf$$.file conf$$ 2>/dev/null; then
f73dda09 16605 as_ln_s='ln -s'
3185942a
JA
16606 # ... but there are two gotchas:
16607 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16608 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
ac50fbac 16609 # In both cases, we have to default to `cp -pR'.
3185942a 16610 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
ac50fbac 16611 as_ln_s='cp -pR'
3185942a
JA
16612 elif ln conf$$.file conf$$ 2>/dev/null; then
16613 as_ln_s=ln
16614 else
ac50fbac 16615 as_ln_s='cp -pR'
f73dda09 16616 fi
f73dda09 16617else
ac50fbac 16618 as_ln_s='cp -pR'
f73dda09 16619fi
3185942a
JA
16620rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16621rmdir conf$$.dir 2>/dev/null
f73dda09 16622
ac50fbac
CR
16623
16624# as_fn_mkdir_p
16625# -------------
16626# Create "$as_dir" as a directory, including parents if necessary.
16627as_fn_mkdir_p ()
16628{
16629
16630 case $as_dir in #(
16631 -*) as_dir=./$as_dir;;
16632 esac
16633 test -d "$as_dir" || eval $as_mkdir_p || {
16634 as_dirs=
16635 while :; do
16636 case $as_dir in #(
16637 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16638 *) as_qdir=$as_dir;;
16639 esac
16640 as_dirs="'$as_qdir' $as_dirs"
16641 as_dir=`$as_dirname -- "$as_dir" ||
16642$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16643 X"$as_dir" : 'X\(//\)[^/]' \| \
16644 X"$as_dir" : 'X\(//\)$' \| \
16645 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16646$as_echo X"$as_dir" |
16647 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16648 s//\1/
16649 q
16650 }
16651 /^X\(\/\/\)[^/].*/{
16652 s//\1/
16653 q
16654 }
16655 /^X\(\/\/\)$/{
16656 s//\1/
16657 q
16658 }
16659 /^X\(\/\).*/{
16660 s//\1/
16661 q
16662 }
16663 s/.*/./; q'`
16664 test -d "$as_dir" && break
16665 done
16666 test -z "$as_dirs" || eval "mkdir $as_dirs"
16667 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16668
16669
16670} # as_fn_mkdir_p
0628567a 16671if mkdir -p . 2>/dev/null; then
ac50fbac 16672 as_mkdir_p='mkdir -p "$as_dir"'
0628567a
JA
16673else
16674 test -d ./-p && rmdir ./-p
16675 as_mkdir_p=false
16676fi
16677
ac50fbac
CR
16678
16679# as_fn_executable_p FILE
16680# -----------------------
16681# Test if FILE is an executable regular file.
16682as_fn_executable_p ()
16683{
16684 test -f "$1" && test -x "$1"
16685} # as_fn_executable_p
16686as_test_x='test -x'
16687as_executable_p=as_fn_executable_p
b80f6443
JA
16688
16689# Sed expression to map a string onto a valid CPP name.
0628567a 16690as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
b80f6443
JA
16691
16692# Sed expression to map a string onto a valid variable name.
0628567a 16693as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
b80f6443 16694
f73dda09 16695
f73dda09 16696exec 6>&1
ac50fbac
CR
16697## ----------------------------------- ##
16698## Main body of $CONFIG_STATUS script. ##
16699## ----------------------------------- ##
16700_ASEOF
16701test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
f73dda09 16702
ac50fbac
CR
16703cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16704# Save the log message, to keep $0 and so on meaningful, and to
b80f6443 16705# report actual input values of CONFIG_FILES etc. instead of their
3185942a
JA
16706# values after options handling.
16707ac_log="
a0c0a00f 16708This file was extended by bash $as_me 4.4-release, which was
ac50fbac 16709generated by GNU Autoconf 2.69. Invocation command line was
b80f6443
JA
16710
16711 CONFIG_FILES = $CONFIG_FILES
16712 CONFIG_HEADERS = $CONFIG_HEADERS
16713 CONFIG_LINKS = $CONFIG_LINKS
16714 CONFIG_COMMANDS = $CONFIG_COMMANDS
16715 $ $0 $@
16716
3185942a
JA
16717on `(hostname || uname -n) 2>/dev/null | sed 1q`
16718"
16719
f73dda09
JA
16720_ACEOF
16721
3185942a
JA
16722case $ac_config_files in *"
16723"*) set x $ac_config_files; shift; ac_config_files=$*;;
16724esac
f73dda09 16725
3185942a
JA
16726case $ac_config_headers in *"
16727"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16728esac
f73dda09 16729
f73dda09 16730
3185942a
JA
16731cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16732# Files that config.status was made for.
16733config_files="$ac_config_files"
16734config_headers="$ac_config_headers"
16735config_commands="$ac_config_commands"
f73dda09 16736
3185942a 16737_ACEOF
f73dda09 16738
3185942a 16739cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09 16740ac_cs_usage="\
ac50fbac
CR
16741\`$as_me' instantiates files and other configuration actions
16742from templates according to the current configuration. Unless the files
16743and actions are specified as TAGs, all are instantiated by default.
f73dda09 16744
ac50fbac 16745Usage: $0 [OPTION]... [TAG]...
f73dda09
JA
16746
16747 -h, --help print this help, then exit
3185942a 16748 -V, --version print version number and configuration settings, then exit
ac50fbac 16749 --config print configuration, then exit
3185942a
JA
16750 -q, --quiet, --silent
16751 do not print progress messages
f73dda09
JA
16752 -d, --debug don't remove temporary files
16753 --recheck update $as_me by reconfiguring in the same conditions
3185942a
JA
16754 --file=FILE[:TEMPLATE]
16755 instantiate the configuration file FILE
16756 --header=FILE[:TEMPLATE]
16757 instantiate the configuration header FILE
f73dda09
JA
16758
16759Configuration files:
16760$config_files
16761
16762Configuration headers:
16763$config_headers
16764
16765Configuration commands:
16766$config_commands
16767
ac50fbac 16768Report bugs to <bug-bash@gnu.org>."
f73dda09 16769
3185942a
JA
16770_ACEOF
16771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac50fbac 16772ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
f73dda09 16773ac_cs_version="\\
a0c0a00f 16774bash config.status 4.4-release
ac50fbac
CR
16775configured by $0, generated by GNU Autoconf 2.69,
16776 with options \\"\$ac_cs_config\\"
f73dda09 16777
ac50fbac 16778Copyright (C) 2012 Free Software Foundation, Inc.
f73dda09
JA
16779This config.status script is free software; the Free Software Foundation
16780gives unlimited permission to copy, distribute and modify it."
3185942a
JA
16781
16782ac_pwd='$ac_pwd'
16783srcdir='$srcdir'
16784INSTALL='$INSTALL'
16785test -n "\$AWK" || AWK=awk
b80f6443 16786_ACEOF
f73dda09 16787
3185942a
JA
16788cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16789# The default lists apply if the user does not specify any file.
f73dda09
JA
16790ac_need_defaults=:
16791while test $# != 0
ccc6cda3 16792do
f73dda09 16793 case $1 in
ac50fbac 16794 --*=?*)
3185942a
JA
16795 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16796 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
0628567a
JA
16797 ac_shift=:
16798 ;;
ac50fbac
CR
16799 --*=)
16800 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16801 ac_optarg=
16802 ac_shift=:
16803 ;;
3185942a 16804 *)
0628567a
JA
16805 ac_option=$1
16806 ac_optarg=$2
16807 ac_shift=shift
f73dda09 16808 ;;
f73dda09
JA
16809 esac
16810
0628567a 16811 case $ac_option in
f73dda09 16812 # Handling of the options.
0628567a
JA
16813 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16814 ac_cs_recheck=: ;;
3185942a
JA
16815 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16816 $as_echo "$ac_cs_version"; exit ;;
ac50fbac
CR
16817 --config | --confi | --conf | --con | --co | --c )
16818 $as_echo "$ac_cs_config"; exit ;;
3185942a 16819 --debug | --debu | --deb | --de | --d | -d )
f73dda09
JA
16820 debug=: ;;
16821 --file | --fil | --fi | --f )
0628567a 16822 $ac_shift
3185942a
JA
16823 case $ac_optarg in
16824 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
ac50fbac 16825 '') as_fn_error $? "missing file argument" ;;
3185942a 16826 esac
ac50fbac 16827 as_fn_append CONFIG_FILES " '$ac_optarg'"
f73dda09
JA
16828 ac_need_defaults=false;;
16829 --header | --heade | --head | --hea )
0628567a 16830 $ac_shift
3185942a
JA
16831 case $ac_optarg in
16832 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16833 esac
ac50fbac 16834 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
f73dda09 16835 ac_need_defaults=false;;
3185942a
JA
16836 --he | --h)
16837 # Conflict between --help and --header
ac50fbac
CR
16838 as_fn_error $? "ambiguous option: \`$1'
16839Try \`$0 --help' for more information.";;
3185942a
JA
16840 --help | --hel | -h )
16841 $as_echo "$ac_cs_usage"; exit ;;
0628567a
JA
16842 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16843 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16844 ac_cs_silent=: ;;
f73dda09
JA
16845
16846 # This is an error.
ac50fbac
CR
16847 -*) as_fn_error $? "unrecognized option: \`$1'
16848Try \`$0 --help' for more information." ;;
f73dda09 16849
ac50fbac 16850 *) as_fn_append ac_config_targets " $1"
3185942a 16851 ac_need_defaults=false ;;
f73dda09 16852
ccc6cda3 16853 esac
f73dda09 16854 shift
ccc6cda3
JA
16855done
16856
0628567a
JA
16857ac_configure_extra_args=
16858
16859if $ac_cs_silent; then
16860 exec 6>/dev/null
16861 ac_configure_extra_args="$ac_configure_extra_args --silent"
16862fi
16863
16864_ACEOF
3185942a 16865cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
0628567a 16866if \$ac_cs_recheck; then
ac50fbac 16867 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
3185942a
JA
16868 shift
16869 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16870 CONFIG_SHELL='$SHELL'
16871 export CONFIG_SHELL
16872 exec "\$@"
0628567a
JA
16873fi
16874
b80f6443 16875_ACEOF
3185942a
JA
16876cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16877exec 5>>config.log
16878{
16879 echo
16880 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16881## Running $as_me. ##
16882_ASBOX
16883 $as_echo "$ac_log"
16884} >&5
b80f6443 16885
3185942a
JA
16886_ACEOF
16887cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
b80f6443 16888#
3185942a 16889# INIT-COMMANDS
b80f6443 16890#
b80f6443
JA
16891# Capture the value of obsolete ALL_LINGUAS because we need it to compute
16892 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
16893 # from automake.
16894 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
16895 # Capture the value of LINGUAS because we need it to compute CATALOGS.
16896 LINGUAS="${LINGUAS-%UNSET%}"
f73dda09 16897
f73dda09
JA
16898
16899_ACEOF
ccc6cda3 16900
3185942a 16901cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b80f6443 16902
3185942a 16903# Handling of arguments.
f73dda09
JA
16904for ac_config_target in $ac_config_targets
16905do
3185942a
JA
16906 case $ac_config_target in
16907 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
16908 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
16909 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16910 "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;;
16911 "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;;
16912 "lib/glob/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;;
16913 "lib/intl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;;
16914 "lib/malloc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;;
16915 "lib/sh/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;;
16916 "lib/termcap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;;
16917 "lib/tilde/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;;
16918 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
16919 "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;;
16920 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
16921 "examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;;
a0c0a00f 16922 "examples/loadables/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;;
3185942a 16923 "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;;
a0c0a00f 16924 "support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;;
3185942a
JA
16925 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16926
ac50fbac 16927 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
f73dda09
JA
16928 esac
16929done
16930
3185942a 16931
f73dda09
JA
16932# If the user did not use the arguments to specify the items to instantiate,
16933# then the envvar interface is used. Set only those that are not.
16934# We use the long form for the default assignment because of an extremely
16935# bizarre bug on SunOS 4.1.3.
16936if $ac_need_defaults; then
16937 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16938 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16939 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16940fi
16941
0628567a 16942# Have a temporary directory for convenience. Make it in the build tree
3185942a 16943# simply because there is no reason against having it here, and in addition,
0628567a 16944# creating and moving files from /tmp can sometimes cause problems.
3185942a
JA
16945# Hook for its removal unless debugging.
16946# Note that there is a small window in which the directory will not be cleaned:
16947# after its creation but before its name has been assigned to `$tmp'.
f73dda09
JA
16948$debug ||
16949{
ac50fbac 16950 tmp= ac_tmp=
3185942a 16951 trap 'exit_status=$?
ac50fbac
CR
16952 : "${ac_tmp:=$tmp}"
16953 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
3185942a 16954' 0
ac50fbac 16955 trap 'as_fn_exit 1' 1 2 13 15
f73dda09 16956}
f73dda09 16957# Create a (secure) tmp directory for tmp files.
0628567a 16958
f73dda09 16959{
3185942a 16960 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
ac50fbac 16961 test -d "$tmp"
f73dda09
JA
16962} ||
16963{
3185942a
JA
16964 tmp=./conf$$-$RANDOM
16965 (umask 077 && mkdir "$tmp")
ac50fbac
CR
16966} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16967ac_tmp=$tmp
ccc6cda3 16968
3185942a
JA
16969# Set up the scripts for CONFIG_FILES section.
16970# No need to generate them if there are no CONFIG_FILES.
16971# This happens for instance with `./config.status config.h'.
16972if test -n "$CONFIG_FILES"; then
16973
16974
ac50fbac
CR
16975ac_cr=`echo X | tr X '\015'`
16976# On cygwin, bash can eat \r inside `` if the user requested igncr.
16977# But we know of no other shell where ac_cr would be empty at this
16978# point, so we can use a bashism as a fallback.
16979if test "x$ac_cr" = x; then
16980 eval ac_cr=\$\'\\r\'
16981fi
3185942a
JA
16982ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16983if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16984 ac_cs_awk_cr='\\r'
16985else
16986 ac_cs_awk_cr=$ac_cr
16987fi
16988
ac50fbac 16989echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
b80f6443 16990_ACEOF
ccc6cda3 16991
ccc6cda3 16992
3185942a
JA
16993{
16994 echo "cat >conf$$subs.awk <<_ACEOF" &&
16995 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16996 echo "_ACEOF"
16997} >conf$$subs.sh ||
ac50fbac
CR
16998 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16999ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
3185942a
JA
17000ac_delim='%!_!# '
17001for ac_last_try in false false false false false :; do
17002 . ./conf$$subs.sh ||
ac50fbac 17003 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
f73dda09 17004
3185942a
JA
17005 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17006 if test $ac_delim_n = $ac_delim_num; then
17007 break
17008 elif $ac_last_try; then
ac50fbac 17009 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
3185942a
JA
17010 else
17011 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
ccc6cda3 17012 fi
3185942a
JA
17013done
17014rm -f conf$$subs.sh
17015
17016cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac50fbac 17017cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
3185942a
JA
17018_ACEOF
17019sed -n '
17020h
17021s/^/S["/; s/!.*/"]=/
17022p
17023g
17024s/^[^!]*!//
17025:repl
17026t repl
17027s/'"$ac_delim"'$//
17028t delim
17029:nl
17030h
ac50fbac 17031s/\(.\{148\}\)..*/\1/
3185942a
JA
17032t more1
17033s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17034p
17035n
17036b repl
17037:more1
17038s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17039p
17040g
17041s/.\{148\}//
17042t nl
17043:delim
17044h
ac50fbac 17045s/\(.\{148\}\)..*/\1/
3185942a
JA
17046t more2
17047s/["\\]/\\&/g; s/^/"/; s/$/"/
17048p
17049b
17050:more2
17051s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17052p
17053g
17054s/.\{148\}//
17055t delim
17056' <conf$$subs.awk | sed '
17057/^[^""]/{
17058 N
17059 s/\n//
17060}
17061' >>$CONFIG_STATUS || ac_write_fail=1
17062rm -f conf$$subs.awk
17063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17064_ACAWK
ac50fbac 17065cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
3185942a
JA
17066 for (key in S) S_is_set[key] = 1
17067 FS = "\a"
17068
17069}
17070{
17071 line = $ 0
17072 nfields = split(line, field, "@")
17073 substed = 0
17074 len = length(field[1])
17075 for (i = 2; i < nfields; i++) {
17076 key = field[i]
17077 keylen = length(key)
17078 if (S_is_set[key]) {
17079 value = S[key]
17080 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17081 len += length(value) + length(field[++i])
17082 substed = 1
17083 } else
17084 len += 1 + keylen
17085 }
17086
17087 print line
17088}
17089
17090_ACAWK
17091_ACEOF
17092cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17093if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17094 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17095else
17096 cat
ac50fbac
CR
17097fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17098 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
3185942a
JA
17099_ACEOF
17100
ac50fbac
CR
17101# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17102# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
3185942a
JA
17103# trailing colons and then remove the whole line if VPATH becomes empty
17104# (actually we leave an empty line to preserve line numbers).
17105if test "x$srcdir" = x.; then
ac50fbac
CR
17106 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17107h
17108s///
17109s/^/:/
17110s/[ ]*$/:/
17111s/:\$(srcdir):/:/g
17112s/:\${srcdir}:/:/g
17113s/:@srcdir@:/:/g
17114s/^:*//
3185942a 17115s/:*$//
ac50fbac
CR
17116x
17117s/\(=[ ]*\).*/\1/
17118G
17119s/\n//
3185942a
JA
17120s/^[^=]*=[ ]*$//
17121}'
17122fi
17123
17124cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09 17125fi # test -n "$CONFIG_FILES"
ccc6cda3 17126
3185942a
JA
17127# Set up the scripts for CONFIG_HEADERS section.
17128# No need to generate them if there are no CONFIG_HEADERS.
17129# This happens for instance with `./config.status Makefile'.
17130if test -n "$CONFIG_HEADERS"; then
ac50fbac 17131cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
3185942a 17132BEGIN {
b80f6443 17133_ACEOF
3185942a
JA
17134
17135# Transform confdefs.h into an awk script `defines.awk', embedded as
17136# here-document in config.status, that substitutes the proper values into
17137# config.h.in to produce config.h.
17138
17139# Create a delimiter string that does not exist in confdefs.h, to ease
17140# handling of long lines.
17141ac_delim='%!_!# '
17142for ac_last_try in false false :; do
ac50fbac
CR
17143 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17144 if test -z "$ac_tt"; then
3185942a
JA
17145 break
17146 elif $ac_last_try; then
ac50fbac 17147 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
3185942a
JA
17148 else
17149 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17150 fi
17151done
17152
17153# For the awk script, D is an array of macro values keyed by name,
17154# likewise P contains macro parameters if any. Preserve backslash
17155# newline sequences.
17156
17157ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17158sed -n '
17159s/.\{148\}/&'"$ac_delim"'/g
17160t rset
17161:rset
17162s/^[ ]*#[ ]*define[ ][ ]*/ /
17163t def
17164d
17165:def
17166s/\\$//
17167t bsnl
17168s/["\\]/\\&/g
17169s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17170D["\1"]=" \3"/p
17171s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17172d
17173:bsnl
17174s/["\\]/\\&/g
17175s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17176D["\1"]=" \3\\\\\\n"\\/p
17177t cont
17178s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17179t cont
17180d
17181:cont
17182n
17183s/.\{148\}/&'"$ac_delim"'/g
17184t clear
17185:clear
17186s/\\$//
17187t bsnlc
17188s/["\\]/\\&/g; s/^/"/; s/$/"/p
17189d
17190:bsnlc
17191s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17192b cont
17193' <confdefs.h | sed '
17194s/'"$ac_delim"'/"\\\
17195"/g' >>$CONFIG_STATUS || ac_write_fail=1
17196
17197cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17198 for (key in D) D_is_set[key] = 1
17199 FS = "\a"
17200}
17201/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17202 line = \$ 0
17203 split(line, arg, " ")
17204 if (arg[1] == "#") {
17205 defundef = arg[2]
17206 mac1 = arg[3]
17207 } else {
17208 defundef = substr(arg[1], 2)
17209 mac1 = arg[2]
17210 }
17211 split(mac1, mac2, "(") #)
17212 macro = mac2[1]
17213 prefix = substr(line, 1, index(line, defundef) - 1)
17214 if (D_is_set[macro]) {
17215 # Preserve the white space surrounding the "#".
17216 print prefix "define", macro P[macro] D[macro]
17217 next
17218 } else {
17219 # Replace #undef with comments. This is necessary, for example,
17220 # in the case of _POSIX_SOURCE, which is predefined and required
17221 # on some systems where configure will not decide to define it.
17222 if (defundef == "undef") {
17223 print "/*", prefix defundef, macro, "*/"
17224 next
17225 }
17226 }
17227}
17228{ print }
17229_ACAWK
17230_ACEOF
17231cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac50fbac 17232 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
3185942a
JA
17233fi # test -n "$CONFIG_HEADERS"
17234
17235
17236eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
17237shift
17238for ac_tag
17239do
17240 case $ac_tag in
17241 :[FHLC]) ac_mode=$ac_tag; continue;;
17242 esac
17243 case $ac_mode$ac_tag in
17244 :[FHL]*:*);;
ac50fbac 17245 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
3185942a
JA
17246 :[FH]-) ac_tag=-:-;;
17247 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17248 esac
17249 ac_save_IFS=$IFS
17250 IFS=:
17251 set x $ac_tag
17252 IFS=$ac_save_IFS
17253 shift
17254 ac_file=$1
17255 shift
17256
17257 case $ac_mode in
17258 :L) ac_source=$1;;
17259 :[FH])
17260 ac_file_inputs=
17261 for ac_f
17262 do
17263 case $ac_f in
ac50fbac 17264 -) ac_f="$ac_tmp/stdin";;
3185942a
JA
17265 *) # Look for the file first in the build tree, then in the source tree
17266 # (if the path is not absolute). The absolute path cannot be DOS-style,
17267 # because $ac_f cannot contain `:'.
17268 test -f "$ac_f" ||
17269 case $ac_f in
17270 [\\/$]*) false;;
17271 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17272 esac ||
ac50fbac 17273 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
3185942a
JA
17274 esac
17275 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
ac50fbac 17276 as_fn_append ac_file_inputs " '$ac_f'"
3185942a
JA
17277 done
17278
17279 # Let's still pretend it is `configure' which instantiates (i.e., don't
17280 # use $as_me), people would be surprised to read:
17281 # /* config.h. Generated by config.status. */
17282 configure_input='Generated from '`
17283 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17284 `' by configure.'
17285 if test x"$ac_file" != x-; then
17286 configure_input="$ac_file. $configure_input"
ac50fbac 17287 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
3185942a
JA
17288$as_echo "$as_me: creating $ac_file" >&6;}
17289 fi
17290 # Neutralize special characters interpreted by sed in replacement strings.
17291 case $configure_input in #(
17292 *\&* | *\|* | *\\* )
17293 ac_sed_conf_input=`$as_echo "$configure_input" |
17294 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17295 *) ac_sed_conf_input=$configure_input;;
17296 esac
17297
17298 case $ac_tag in
ac50fbac
CR
17299 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17300 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
3185942a
JA
17301 esac
17302 ;;
ccc6cda3
JA
17303 esac
17304
3185942a 17305 ac_dir=`$as_dirname -- "$ac_file" ||
b80f6443 17306$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
0628567a
JA
17307 X"$ac_file" : 'X\(//\)[^/]' \| \
17308 X"$ac_file" : 'X\(//\)$' \| \
3185942a
JA
17309 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17310$as_echo X"$ac_file" |
17311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17312 s//\1/
17313 q
17314 }
17315 /^X\(\/\/\)[^/].*/{
17316 s//\1/
17317 q
17318 }
17319 /^X\(\/\/\)$/{
17320 s//\1/
17321 q
17322 }
17323 /^X\(\/\).*/{
17324 s//\1/
17325 q
17326 }
17327 s/.*/./; q'`
ac50fbac 17328 as_dir="$ac_dir"; as_fn_mkdir_p
b80f6443
JA
17329 ac_builddir=.
17330
3185942a
JA
17331case "$ac_dir" in
17332.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17333*)
17334 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17335 # A ".." for each directory in $ac_dir_suffix.
17336 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17337 case $ac_top_builddir_sub in
17338 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17339 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17340 esac ;;
17341esac
17342ac_abs_top_builddir=$ac_pwd
17343ac_abs_builddir=$ac_pwd$ac_dir_suffix
17344# for backward compatibility:
17345ac_top_builddir=$ac_top_build_prefix
b80f6443
JA
17346
17347case $srcdir in
3185942a 17348 .) # We are building in place.
b80f6443 17349 ac_srcdir=.
3185942a
JA
17350 ac_top_srcdir=$ac_top_builddir_sub
17351 ac_abs_top_srcdir=$ac_pwd ;;
17352 [\\/]* | ?:[\\/]* ) # Absolute name.
b80f6443 17353 ac_srcdir=$srcdir$ac_dir_suffix;
3185942a
JA
17354 ac_top_srcdir=$srcdir
17355 ac_abs_top_srcdir=$srcdir ;;
17356 *) # Relative name.
17357 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17358 ac_top_srcdir=$ac_top_build_prefix$srcdir
17359 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
b80f6443 17360esac
3185942a 17361ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
0628567a 17362
b80f6443 17363
3185942a
JA
17364 case $ac_mode in
17365 :F)
17366 #
17367 # CONFIG_FILE
17368 #
ccc6cda3 17369
f73dda09
JA
17370 case $INSTALL in
17371 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
3185942a 17372 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ccc6cda3 17373 esac
3185942a 17374_ACEOF
ccc6cda3 17375
3185942a
JA
17376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17377# If the template does not know about datarootdir, expand it.
17378# FIXME: This hack should be removed a few years after 2.60.
17379ac_datarootdir_hack=; ac_datarootdir_seen=
3185942a
JA
17380ac_sed_dataroot='
17381/datarootdir/ {
17382 p
17383 q
17384}
17385/@datadir@/p
17386/@docdir@/p
17387/@infodir@/p
17388/@localedir@/p
ac50fbac 17389/@mandir@/p'
3185942a
JA
17390case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17391*datarootdir*) ac_datarootdir_seen=yes;;
17392*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
ac50fbac 17393 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
3185942a
JA
17394$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17395_ACEOF
17396cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17397 ac_datarootdir_hack='
17398 s&@datadir@&$datadir&g
17399 s&@docdir@&$docdir&g
17400 s&@infodir@&$infodir&g
17401 s&@localedir@&$localedir&g
17402 s&@mandir@&$mandir&g
ac50fbac 17403 s&\\\${datarootdir}&$datarootdir&g' ;;
3185942a 17404esac
b80f6443 17405_ACEOF
3185942a
JA
17406
17407# Neutralize VPATH when `$srcdir' = `.'.
17408# Shell code in configure.ac might set extrasub.
17409# FIXME: do we really want to maintain this feature?
17410cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17411ac_sed_extra="$ac_vpsub
f73dda09 17412$extrasub
b80f6443 17413_ACEOF
3185942a 17414cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09
JA
17415:t
17416/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
3185942a
JA
17417s|@configure_input@|$ac_sed_conf_input|;t t
17418s&@top_builddir@&$ac_top_builddir_sub&;t t
17419s&@top_build_prefix@&$ac_top_build_prefix&;t t
17420s&@srcdir@&$ac_srcdir&;t t
17421s&@abs_srcdir@&$ac_abs_srcdir&;t t
17422s&@top_srcdir@&$ac_top_srcdir&;t t
17423s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17424s&@builddir@&$ac_builddir&;t t
17425s&@abs_builddir@&$ac_abs_builddir&;t t
17426s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17427s&@INSTALL@&$ac_INSTALL&;t t
17428$ac_datarootdir_hack
17429"
ac50fbac
CR
17430eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17431 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ccc6cda3 17432
3185942a 17433test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
ac50fbac
CR
17434 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17435 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17436 "$ac_tmp/out"`; test -z "$ac_out"; } &&
17437 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17438which seems to be undefined. Please make sure it is defined" >&5
3185942a 17439$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ac50fbac 17440which seems to be undefined. Please make sure it is defined" >&2;}
ccc6cda3 17441
ac50fbac 17442 rm -f "$ac_tmp/stdin"
f73dda09 17443 case $ac_file in
ac50fbac
CR
17444 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17445 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
3185942a 17446 esac \
ac50fbac 17447 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
3185942a
JA
17448 ;;
17449 :H)
17450 #
17451 # CONFIG_HEADER
17452 #
f73dda09 17453 if test x"$ac_file" != x-; then
3185942a
JA
17454 {
17455 $as_echo "/* $configure_input */" \
ac50fbac
CR
17456 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17457 } >"$ac_tmp/config.h" \
17458 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17459 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17460 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
3185942a 17461$as_echo "$as_me: $ac_file is unchanged" >&6;}
f73dda09 17462 else
3185942a 17463 rm -f "$ac_file"
ac50fbac
CR
17464 mv "$ac_tmp/config.h" "$ac_file" \
17465 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ccc6cda3 17466 fi
f73dda09 17467 else
3185942a 17468 $as_echo "/* $configure_input */" \
ac50fbac
CR
17469 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17470 || as_fn_error $? "could not create -" "$LINENO" 5
ccc6cda3 17471 fi
3185942a 17472 ;;
0628567a 17473
ac50fbac 17474 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
3185942a
JA
17475$as_echo "$as_me: executing $ac_file commands" >&6;}
17476 ;;
17477 esac
b80f6443 17478
ccc6cda3 17479
3185942a
JA
17480 case $ac_file$ac_mode in
17481 "default-1":C)
b80f6443
JA
17482 for ac_file in $CONFIG_FILES; do
17483 # Support "outfile[:infile[:infile...]]"
17484 case "$ac_file" in
17485 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
17486 esac
17487 # PO directories have a Makefile.in generated from Makefile.in.in.
17488 case "$ac_file" in */Makefile.in)
17489 # Adjust a relative srcdir.
17490 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
17491 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
17492 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
17493 # In autoconf-2.13 it is called $ac_given_srcdir.
17494 # In autoconf-2.50 it is called $srcdir.
17495 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
17496 case "$ac_given_srcdir" in
17497 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
17498 /*) top_srcdir="$ac_given_srcdir" ;;
17499 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
17500 esac
17501 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
17502 rm -f "$ac_dir/POTFILES"
17503 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
17504 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
17505 POMAKEFILEDEPS="POTFILES.in"
17506 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
17507 # on $ac_dir but don't depend on user-specified configuration
17508 # parameters.
17509 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
17510 # The LINGUAS file contains the set of available languages.
17511 if test -n "$OBSOLETE_ALL_LINGUAS"; then
17512 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
17513 fi
17514 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
17515 # Hide the ALL_LINGUAS assigment from automake.
17516 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
17517 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
17518 else
17519 # The set of available languages was given in configure.in.
17520 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
17521 fi
17522 case "$ac_given_srcdir" in
17523 .) srcdirpre= ;;
17524 *) srcdirpre='$(srcdir)/' ;;
17525 esac
17526 POFILES=
17527 GMOFILES=
17528 UPDATEPOFILES=
17529 DUMMYPOFILES=
17530 for lang in $ALL_LINGUAS; do
17531 POFILES="$POFILES $srcdirpre$lang.po"
17532 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
17533 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
17534 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
17535 done
17536 # CATALOGS depends on both $ac_dir and the user's LINGUAS
17537 # environment variable.
17538 INST_LINGUAS=
17539 if test -n "$ALL_LINGUAS"; then
17540 for presentlang in $ALL_LINGUAS; do
17541 useit=no
17542 if test "%UNSET%" != "$LINGUAS"; then
17543 desiredlanguages="$LINGUAS"
17544 else
17545 desiredlanguages="$ALL_LINGUAS"
17546 fi
17547 for desiredlang in $desiredlanguages; do
17548 # Use the presentlang catalog if desiredlang is
17549 # a. equal to presentlang, or
17550 # b. a variant of presentlang (because in this case,
17551 # presentlang can be used as a fallback for messages
17552 # which are not translated in the desiredlang catalog).
17553 case "$desiredlang" in
17554 "$presentlang"*) useit=yes;;
17555 esac
17556 done
17557 if test $useit = yes; then
17558 INST_LINGUAS="$INST_LINGUAS $presentlang"
17559 fi
17560 done
17561 fi
17562 CATALOGS=
17563 if test -n "$INST_LINGUAS"; then
17564 for lang in $INST_LINGUAS; do
17565 CATALOGS="$CATALOGS $lang.gmo"
17566 done
17567 fi
17568 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
17569 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"
17570 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
17571 if test -f "$f"; then
17572 case "$f" in
17573 *.orig | *.bak | *~) ;;
17574 *) cat "$f" >> "$ac_dir/Makefile" ;;
17575 esac
17576 fi
17577 done
17578 fi
17579 ;;
17580 esac
17581 done ;;
3185942a 17582 "default":C)
ccc6cda3
JA
17583# Makefile uses this timestamp file to record whether config.h is up to date.
17584echo timestamp > stamp-h
f73dda09 17585 ;;
3185942a 17586
f73dda09 17587 esac
3185942a 17588done # for ac_tag
ccc6cda3 17589
f73dda09 17590
ac50fbac 17591as_fn_exit 0
b80f6443 17592_ACEOF
f73dda09
JA
17593ac_clean_files=$ac_clean_files_save
17594
3185942a 17595test $ac_write_fail = 0 ||
ac50fbac 17596 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
3185942a 17597
b80f6443 17598
f73dda09
JA
17599# configure is writing to config.log, and then calls config.status.
17600# config.status does its own redirection, appending to config.log.
17601# Unfortunately, on DOS this fails, as config.log is still kept open
17602# by configure, so config.status won't be able to write to it; its
17603# output is simply discarded. So we exec the FD to /dev/null,
17604# effectively closing config.log, so it can be properly (re)opened and
17605# appended to by config.status. When coming back to configure, we
17606# need to make the FD available again.
17607if test "$no_create" != yes; then
17608 ac_cs_success=:
0628567a
JA
17609 ac_config_status_args=
17610 test "$silent" = yes &&
17611 ac_config_status_args="$ac_config_status_args --quiet"
f73dda09 17612 exec 5>/dev/null
0628567a 17613 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
f73dda09
JA
17614 exec 5>>config.log
17615 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17616 # would make configure fail if this is the last instruction.
ac50fbac 17617 $ac_cs_success || as_fn_exit 1
f73dda09 17618fi
3185942a 17619if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
ac50fbac 17620 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
3185942a
JA
17621$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17622fi
ccc6cda3 17623