]> git.ipfire.org Git - thirdparty/bash.git/blame - configure
updated translations; remove unneeded files
[thirdparty/bash.git] / configure
CommitLineData
ccc6cda3 1#! /bin/sh
74091dd4 2# From configure.ac for Bash 5.2, version 5.046.
f73dda09 3# Guess values for system-dependent variables and create Makefiles.
74091dd4 4# Generated by GNU Autoconf 2.71 for bash 5.2-release.
f73dda09
JA
5#
6# Report bugs to <bug-bash@gnu.org>.
7#
ac50fbac 8#
74091dd4
CR
9# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
10# Inc.
ac50fbac
CR
11#
12#
f73dda09
JA
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
ac50fbac
CR
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
ccc6cda3 18
3185942a
JA
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
74091dd4
CR
21as_nop=:
22if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
23then :
b80f6443
JA
24 emulate sh
25 NULLCMD=:
3185942a 26 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
0628567a
JA
27 # is contrary to our usage. Disable this feature.
28 alias -g '${1+"$@"}'='"$@"'
3185942a 29 setopt NO_GLOB_SUBST
74091dd4 30else $as_nop
ac50fbac
CR
31 case `(set -o) 2>/dev/null` in #(
32 *posix*) :
33 set -o posix ;; #(
34 *) :
35 ;;
3185942a 36esac
3185942a
JA
37fi
38
39
74091dd4
CR
40
41# Reset variables that may have inherited troublesome values from
42# the environment.
43
44# IFS needs to be set, to space, tab, and newline, in precisely that order.
45# (If _AS_PATH_WALK were called with IFS unset, it would have the
46# side effect of setting IFS to empty, thus disabling word splitting.)
47# Quoting is to prevent editors from complaining about space-tab.
3185942a
JA
48as_nl='
49'
50export as_nl
74091dd4
CR
51IFS=" "" $as_nl"
52
53PS1='$ '
54PS2='> '
55PS4='+ '
56
57# Ensure predictable behavior from utilities with locale-dependent output.
58LC_ALL=C
59export LC_ALL
60LANGUAGE=C
61export LANGUAGE
62
63# We cannot yet rely on "unset" to work, but we need these variables
64# to be unset--not just set to an empty or harmless value--now, to
65# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
66# also avoids known problems related to "unset" and subshell syntax
67# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
68for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
69do eval test \${$as_var+y} \
70 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
71done
72
73# Ensure that fds 0, 1, and 2 are open.
74if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
75if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
76if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
3185942a
JA
77
78# The user is always right.
74091dd4 79if ${PATH_SEPARATOR+false} :; then
3185942a
JA
80 PATH_SEPARATOR=:
81 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
82 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
83 PATH_SEPARATOR=';'
84 }
b80f6443
JA
85fi
86
0628567a 87
3185942a 88# Find who we are. Look in the path if we contain no directory separator.
ac50fbac
CR
89as_myself=
90case $0 in #((
3185942a
JA
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
74091dd4
CR
96 case $as_dir in #(((
97 '') as_dir=./ ;;
98 */) ;;
99 *) as_dir=$as_dir/ ;;
100 esac
101 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
ac50fbac 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
74091dd4 113 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ac50fbac 114 exit 1
3185942a
JA
115fi
116
ac50fbac
CR
117
118# Use a proper internal environment variable to ensure we don't fall
119 # into an infinite loop, continuously re-executing ourselves.
120 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
121 _as_can_reexec=no; export _as_can_reexec;
122 # We cannot yet assume a decent shell, so we have to provide a
123# neutralization value for shells without unset; and this also
124# works around shells that cannot unset nonexistent variables.
125# Preserve -v and -x to the replacement shell.
126BASH_ENV=/dev/null
127ENV=/dev/null
128(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
129case $- in # ((((
130 *v*x* | *x*v* ) as_opts=-vx ;;
131 *v* ) as_opts=-v ;;
132 *x* ) as_opts=-x ;;
133 * ) as_opts= ;;
134esac
135exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
136# Admittedly, this is quite paranoid, since all the known shells bail
137# out after a failed `exec'.
74091dd4
CR
138printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
139exit 255
ac50fbac
CR
140 fi
141 # We don't want this to propagate to other subprocesses.
142 { _as_can_reexec=; unset _as_can_reexec;}
143if test "x$CONFIG_SHELL" = x; then
74091dd4
CR
144 as_bourne_compatible="as_nop=:
145if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
146then :
ac50fbac
CR
147 emulate sh
148 NULLCMD=:
149 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
150 # is contrary to our usage. Disable this feature.
151 alias -g '\${1+\"\$@\"}'='\"\$@\"'
152 setopt NO_GLOB_SUBST
74091dd4 153else \$as_nop
ac50fbac
CR
154 case \`(set -o) 2>/dev/null\` in #(
155 *posix*) :
156 set -o posix ;; #(
157 *) :
158 ;;
159esac
160fi
161"
162 as_required="as_fn_return () { (exit \$1); }
163as_fn_success () { as_fn_return 0; }
164as_fn_failure () { as_fn_return 1; }
165as_fn_ret_success () { return 0; }
166as_fn_ret_failure () { return 1; }
167
168exitcode=0
169as_fn_success || { exitcode=1; echo as_fn_success failed.; }
170as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
171as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
172as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
74091dd4
CR
173if ( set x; as_fn_ret_success y && test x = \"\$1\" )
174then :
ac50fbac 175
74091dd4 176else \$as_nop
ac50fbac
CR
177 exitcode=1; echo positional parameters were not saved.
178fi
179test x\$exitcode = x0 || exit 1
74091dd4
CR
180blah=\$(echo \$(echo blah))
181test x\"\$blah\" = xblah || exit 1
ac50fbac
CR
182test -x / || exit 1"
183 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
184 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
185 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
186 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
187test \$(( 1 + 1 )) = 2 || exit 1"
74091dd4
CR
188 if (eval "$as_required") 2>/dev/null
189then :
ac50fbac 190 as_have_required=yes
74091dd4 191else $as_nop
ac50fbac
CR
192 as_have_required=no
193fi
74091dd4
CR
194 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
195then :
ac50fbac 196
74091dd4 197else $as_nop
ac50fbac
CR
198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
199as_found=false
200for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
201do
202 IFS=$as_save_IFS
74091dd4
CR
203 case $as_dir in #(((
204 '') as_dir=./ ;;
205 */) ;;
206 *) as_dir=$as_dir/ ;;
207 esac
ac50fbac
CR
208 as_found=:
209 case $as_dir in #(
210 /*)
211 for as_base in sh bash ksh sh5; do
212 # Try only shells that exist, to save several forks.
74091dd4 213 as_shell=$as_dir$as_base
ac50fbac 214 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
74091dd4
CR
215 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
216then :
ac50fbac 217 CONFIG_SHELL=$as_shell as_have_required=yes
74091dd4
CR
218 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
219then :
ac50fbac
CR
220 break 2
221fi
222fi
223 done;;
224 esac
225 as_found=false
226done
ac50fbac 227IFS=$as_save_IFS
74091dd4
CR
228if $as_found
229then :
230
231else $as_nop
232 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
233 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
234then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi
237fi
ac50fbac
CR
238
239
74091dd4
CR
240 if test "x$CONFIG_SHELL" != x
241then :
ac50fbac
CR
242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
74091dd4 259printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
ac50fbac
CR
260exit 255
261fi
262
74091dd4
CR
263 if test x$as_have_required = xno
264then :
265 printf "%s\n" "$0: This script requires a shell more modern than all"
266 printf "%s\n" "$0: the shells that I found on your system."
267 if test ${ZSH_VERSION+y} ; then
268 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
ac50fbac 270 else
74091dd4 271 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-bash@gnu.org
ac50fbac
CR
272$0: about your system, including any error possibly output
273$0: before this message. Then install a modern shell, or
274$0: manually run the script under such a shell if you do
275$0: have one."
276 fi
277 exit 1
278fi
279fi
280fi
281SHELL=${CONFIG_SHELL-/bin/sh}
282export SHELL
283# Unset more variables known to interfere with behavior of common tools.
284CLICOLOR_FORCE= GREP_OPTIONS=
285unset CLICOLOR_FORCE GREP_OPTIONS
286
287## --------------------- ##
288## M4sh Shell Functions. ##
289## --------------------- ##
290# as_fn_unset VAR
291# ---------------
292# Portably unset VAR.
293as_fn_unset ()
294{
295 { eval $1=; unset $1;}
296}
297as_unset=as_fn_unset
298
74091dd4 299
ac50fbac
CR
300# as_fn_set_status STATUS
301# -----------------------
302# Set $? to STATUS, without forking.
303as_fn_set_status ()
304{
305 return $1
306} # as_fn_set_status
307
308# as_fn_exit STATUS
309# -----------------
310# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
311as_fn_exit ()
312{
313 set +e
314 as_fn_set_status $1
315 exit $1
316} # as_fn_exit
74091dd4
CR
317# as_fn_nop
318# ---------
319# Do nothing but, unlike ":", preserve the value of $?.
320as_fn_nop ()
321{
322 return $?
323}
324as_nop=as_fn_nop
ac50fbac
CR
325
326# as_fn_mkdir_p
327# -------------
328# Create "$as_dir" as a directory, including parents if necessary.
329as_fn_mkdir_p ()
330{
331
332 case $as_dir in #(
333 -*) as_dir=./$as_dir;;
334 esac
335 test -d "$as_dir" || eval $as_mkdir_p || {
336 as_dirs=
337 while :; do
338 case $as_dir in #(
74091dd4 339 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
ac50fbac
CR
340 *) as_qdir=$as_dir;;
341 esac
342 as_dirs="'$as_qdir' $as_dirs"
343 as_dir=`$as_dirname -- "$as_dir" ||
344$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
345 X"$as_dir" : 'X\(//\)[^/]' \| \
346 X"$as_dir" : 'X\(//\)$' \| \
347 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
74091dd4 348printf "%s\n" X"$as_dir" |
ac50fbac
CR
349 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
350 s//\1/
351 q
352 }
353 /^X\(\/\/\)[^/].*/{
354 s//\1/
355 q
356 }
357 /^X\(\/\/\)$/{
358 s//\1/
359 q
360 }
361 /^X\(\/\).*/{
362 s//\1/
363 q
364 }
365 s/.*/./; q'`
366 test -d "$as_dir" && break
367 done
368 test -z "$as_dirs" || eval "mkdir $as_dirs"
369 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
370
371
372} # as_fn_mkdir_p
373
374# as_fn_executable_p FILE
375# -----------------------
376# Test if FILE is an executable regular file.
377as_fn_executable_p ()
378{
379 test -f "$1" && test -x "$1"
380} # as_fn_executable_p
381# as_fn_append VAR VALUE
382# ----------------------
383# Append the text in VALUE to the end of the definition contained in VAR. Take
384# advantage of any shell optimizations that allow amortized linear growth over
385# repeated appends, instead of the typical quadratic growth present in naive
386# implementations.
74091dd4
CR
387if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
388then :
ac50fbac
CR
389 eval 'as_fn_append ()
390 {
391 eval $1+=\$2
392 }'
74091dd4 393else $as_nop
ac50fbac
CR
394 as_fn_append ()
395 {
396 eval $1=\$$1\$2
397 }
398fi # as_fn_append
399
400# as_fn_arith ARG...
401# ------------------
402# Perform arithmetic evaluation on the ARGs, and store the result in the
403# global $as_val. Take advantage of shells that can avoid forks. The arguments
404# must be portable across $(()) and expr.
74091dd4
CR
405if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
406then :
ac50fbac
CR
407 eval 'as_fn_arith ()
408 {
409 as_val=$(( $* ))
410 }'
74091dd4 411else $as_nop
ac50fbac
CR
412 as_fn_arith ()
413 {
414 as_val=`expr "$@" || test $? -eq 1`
415 }
416fi # as_fn_arith
417
74091dd4
CR
418# as_fn_nop
419# ---------
420# Do nothing but, unlike ":", preserve the value of $?.
421as_fn_nop ()
422{
423 return $?
424}
425as_nop=as_fn_nop
ac50fbac
CR
426
427# as_fn_error STATUS ERROR [LINENO LOG_FD]
428# ----------------------------------------
429# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
430# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
431# script with STATUS, using 1 if that was 0.
432as_fn_error ()
433{
434 as_status=$1; test $as_status -eq 0 && as_status=1
435 if test "$4"; then
436 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
74091dd4 437 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
ac50fbac 438 fi
74091dd4 439 printf "%s\n" "$as_me: error: $2" >&2
ac50fbac
CR
440 as_fn_exit $as_status
441} # as_fn_error
442
3185942a
JA
443if expr a : '\(a\)' >/dev/null 2>&1 &&
444 test "X`expr 00001 : '.*\(...\)'`" = X001; then
0628567a
JA
445 as_expr=expr
446else
447 as_expr=false
448fi
449
3185942a 450if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
0628567a
JA
451 as_basename=basename
452else
453 as_basename=false
454fi
b80f6443 455
ac50fbac
CR
456if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
457 as_dirname=dirname
458else
459 as_dirname=false
460fi
b80f6443 461
3185942a 462as_me=`$as_basename -- "$0" ||
b80f6443
JA
463$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
464 X"$0" : 'X\(//\)$' \| \
3185942a 465 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
74091dd4 466printf "%s\n" X/"$0" |
3185942a
JA
467 sed '/^.*\/\([^/][^/]*\)\/*$/{
468 s//\1/
469 q
470 }
471 /^X\/\(\/\/\)$/{
472 s//\1/
473 q
474 }
475 /^X\/\(\/\).*/{
476 s//\1/
477 q
478 }
479 s/.*/./; q'`
b80f6443 480
ac50fbac
CR
481# Avoid depending upon Character Ranges.
482as_cr_letters='abcdefghijklmnopqrstuvwxyz'
483as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
484as_cr_Letters=$as_cr_letters$as_cr_LETTERS
485as_cr_digits='0123456789'
486as_cr_alnum=$as_cr_Letters$as_cr_digits
0628567a 487
ccc6cda3 488
ac50fbac
CR
489 as_lineno_1=$LINENO as_lineno_1a=$LINENO
490 as_lineno_2=$LINENO as_lineno_2a=$LINENO
491 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
492 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
493 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
494 sed -n '
495 p
496 /[$]LINENO/=
497 ' <$as_myself |
498 sed '
499 s/[$]LINENO.*/&-/
500 t lineno
501 b
502 :lineno
503 N
504 :loop
505 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
506 t loop
507 s/-\n.*//
508 ' >$as_me.lineno &&
509 chmod +x "$as_me.lineno" ||
74091dd4 510 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
ccc6cda3 511
ac50fbac
CR
512 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
513 # already done that, so ensure we don't try to do so again and fall
514 # in an infinite loop. This has already happened in practice.
515 _as_can_reexec=no; export _as_can_reexec
516 # Don't try to exec as it changes $[0], causing all sort of problems
517 # (the dirname of $[0] is not the place where we might find the
518 # original and so on. Autoconf is especially sensitive to this).
519 . "./$as_me.lineno"
520 # Exit status is that of the last command.
521 exit
3185942a 522}
ccc6cda3 523
74091dd4
CR
524
525# Determine whether it's possible to make 'echo' print without a newline.
526# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
527# for compatibility with existing Makefiles.
ac50fbac
CR
528ECHO_C= ECHO_N= ECHO_T=
529case `echo -n x` in #(((((
530-n*)
531 case `echo 'xy\c'` in
532 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
533 xy) ECHO_C='\c';;
534 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
535 ECHO_T=' ';;
536 esac;;
537*)
538 ECHO_N='-n';;
539esac
3185942a 540
74091dd4
CR
541# For backward compatibility with old third-party macros, we provide
542# the shell variables $as_echo and $as_echo_n. New code should use
543# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
544as_echo='printf %s\n'
545as_echo_n='printf %s'
546
547
ac50fbac
CR
548rm -f conf$$ conf$$.exe conf$$.file
549if test -d conf$$.dir; then
550 rm -f conf$$.dir/conf$$.file
3185942a 551else
ac50fbac
CR
552 rm -f conf$$.dir
553 mkdir conf$$.dir 2>/dev/null
3185942a 554fi
ac50fbac
CR
555if (echo >conf$$.file) 2>/dev/null; then
556 if ln -s conf$$.file conf$$ 2>/dev/null; then
557 as_ln_s='ln -s'
558 # ... but there are two gotchas:
559 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
560 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
561 # In both cases, we have to default to `cp -pR'.
562 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
563 as_ln_s='cp -pR'
564 elif ln conf$$.file conf$$ 2>/dev/null; then
565 as_ln_s=ln
566 else
567 as_ln_s='cp -pR'
568 fi
569else
570 as_ln_s='cp -pR'
3185942a 571fi
ac50fbac
CR
572rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
573rmdir conf$$.dir 2>/dev/null
3185942a 574
ac50fbac
CR
575if mkdir -p . 2>/dev/null; then
576 as_mkdir_p='mkdir -p "$as_dir"'
3185942a 577else
ac50fbac
CR
578 test -d ./-p && rmdir ./-p
579 as_mkdir_p=false
3185942a
JA
580fi
581
ac50fbac
CR
582as_test_x='test -x'
583as_executable_p=as_fn_executable_p
3185942a 584
ac50fbac
CR
585# Sed expression to map a string onto a valid CPP name.
586as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
3185942a 587
ac50fbac
CR
588# Sed expression to map a string onto a valid variable name.
589as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
3185942a 590
3185942a 591
ac50fbac
CR
592test -n "$DJDIR" || exec 7<&0 </dev/null
593exec 6>&1
3185942a 594
ac50fbac
CR
595# Name of the host.
596# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
597# so uname gets run too.
598ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
3185942a 599
ac50fbac
CR
600#
601# Initializations.
602#
603ac_default_prefix=/usr/local
604ac_clean_files=
605ac_config_libobj_dir=.
606LIBOBJS=
607cross_compiling=no
608subdirs=
609MFLAGS=
610MAKEFLAGS=
f73dda09 611
b80f6443
JA
612# Identity of this package.
613PACKAGE_NAME='bash'
614PACKAGE_TARNAME='bash'
74091dd4
CR
615PACKAGE_VERSION='5.2-release'
616PACKAGE_STRING='bash 5.2-release'
b80f6443 617PACKAGE_BUGREPORT='bug-bash@gnu.org'
ac50fbac 618PACKAGE_URL=''
b80f6443 619
f73dda09
JA
620ac_unique_file="shell.h"
621# Factoring default headers for most tests.
622ac_includes_default="\
74091dd4
CR
623#include <stddef.h>
624#ifdef HAVE_STDIO_H
625# include <stdio.h>
f73dda09 626#endif
74091dd4 627#ifdef HAVE_STDLIB_H
f73dda09 628# include <stdlib.h>
f73dda09 629#endif
3185942a 630#ifdef HAVE_STRING_H
f73dda09
JA
631# include <string.h>
632#endif
3185942a 633#ifdef HAVE_INTTYPES_H
f73dda09 634# include <inttypes.h>
f73dda09 635#endif
3185942a
JA
636#ifdef HAVE_STDINT_H
637# include <stdint.h>
638#endif
74091dd4
CR
639#ifdef HAVE_STRINGS_H
640# include <strings.h>
641#endif
642#ifdef HAVE_SYS_TYPES_H
643# include <sys/types.h>
644#endif
645#ifdef HAVE_SYS_STAT_H
646# include <sys/stat.h>
647#endif
3185942a 648#ifdef HAVE_UNISTD_H
f73dda09
JA
649# include <unistd.h>
650#endif"
ccc6cda3 651
74091dd4 652ac_header_c_list=
8868edaf 653gt_needs=
74091dd4 654ac_func_c_list=
8868edaf 655gl_use_threads_default=
3185942a
JA
656ac_subst_vars='LTLIBOBJS
657LOCAL_DEFS
658LOCAL_LDFLAGS
659LOCAL_CFLAGS
660LOCAL_LIBS
661MALLOC_DEBUG
662DEBUG
663RELSTATUS
664BASHVERS
a0c0a00f
CR
665headersdir
666loadablesdir
3185942a
JA
667BUILD_DIR
668incdir
669PROFILE_FLAGS
670SHOBJ_STATUS
671SHOBJ_LIBS
672SHOBJ_XLDFLAGS
673SHOBJ_LDFLAGS
674SHOBJ_LD
675SHOBJ_CFLAGS
676SHOBJ_CC
677JOBS_O
678TERMCAP_DEP
679TERMCAP_LIB
680SIGLIST_O
ac50fbac
CR
681PTHREAD_H_DEFINES_STRUCT_TIMESPEC
682SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
683TIME_H_DEFINES_STRUCT_TIMESPEC
3185942a
JA
684LIBINTL_H
685INTL_INC
686INTL_DEP
687LIBOBJS
688POSUB
689LTLIBINTL
690LIBINTL
691INTLLIBS
692INTL_LIBTOOL_SUFFIX_PREFIX
693INTLOBJS
694GENCAT
695INSTOBJEXT
696DATADIRNAME
697CATOBJEXT
698USE_INCLUDED_LIBINTL
699BUILD_INCLUDED_LIBINTL
8868edaf
CR
700WINDRES
701WOE32
702WOE32DLL
703HAVE_NAMELESS_LOCALES
704HAVE_WPRINTF
705HAVE_NEWLOCALE
706HAVE_SNPRINTF
707HAVE_ASPRINTF
708HAVE_POSIX_PRINTF
709INTL_DEFAULT_VERBOSITY
710ARFLAGS
711INTL_MACOSX_LIBS
712GLIBC21
713GNULIB_OVERRIDES_WINT_T
3185942a
JA
714INTLBISON
715LTLIBICONV
716LIBICONV
8868edaf
CR
717LTLIBMULTITHREAD
718LIBMULTITHREAD
719LTLIBTHREAD
720LIBTHREAD
721LIBPTH_PREFIX
722LTLIBPTH
723LIBPTH
724PRI_MACROS_BROKEN
3185942a 725ALLOCA
8868edaf
CR
726HAVE_VISIBILITY
727CFLAG_VISIBILITY
728GLIBC2
729XGETTEXT_EXTRA_OPTIONS
3185942a 730MSGMERGE
8868edaf 731XGETTEXT_015
3185942a 732XGETTEXT
8868edaf
CR
733GMSGFMT_015
734MSGFMT_015
3185942a
JA
735GMSGFMT
736MSGFMT
8868edaf 737GETTEXT_MACRO_VERSION
3185942a 738USE_NLS
8868edaf
CR
739SED
740MKDIR_P
3185942a
JA
741SIZE
742MAKE_SHELL
743SET_MAKE
744YFLAGS
745YACC
746RANLIB
747AR
748INSTALL_DATA
749INSTALL_SCRIPT
750INSTALL_PROGRAM
751TILDE_LIB
752HIST_LIBDIR
753HISTORY_DEP
754HISTORY_LIB
755RL_INCLUDE
756RL_INCLUDEDIR
757RL_LIBDIR
758READLINE_DEP
759READLINE_LIB
760RL_MINOR
761RL_MAJOR
762RL_VERSION
74091dd4
CR
763EGREP
764GREP
765CPP
ac50fbac 766LIBS_FOR_BUILD
74091dd4
CR
767STYLE_CFLAGS
768BASE_CFLAGS_FOR_BUILD
3185942a 769STATIC_LD
3185942a
JA
770SIGNAMES_O
771SIGNAMES_H
772CROSS_COMPILE
3185942a
JA
773OBJEXT
774EXEEXT
775ac_ct_CC
776CPPFLAGS
777LDFLAGS
778CFLAGS
779CC
780HELPSTRINGS
ac50fbac 781HELPFILES_TARGET
3185942a
JA
782HELPINSTALL
783HELPDIRDEFINE
784HELPDIR
74091dd4 785ARRAY_O
3185942a
JA
786MALLOC_DEP
787MALLOC_LDFLAGS
788MALLOC_LIBRARY
789MALLOC_LIB
790MALLOC_SRC
791MALLOC_TARGET
3185942a 792TESTSCRIPT
ac50fbac
CR
793CPPFLAGS_FOR_BUILD
794LDFLAGS_FOR_BUILD
795CFLAGS_FOR_BUILD
796CC_FOR_BUILD
3185942a 797DEBUGGER_START_FILE
3185942a
JA
798host_os
799host_vendor
800host_cpu
801host
802build_os
803build_vendor
804build_cpu
805build
806target_alias
807host_alias
808build_alias
809LIBS
810ECHO_T
811ECHO_N
812ECHO_C
813DEFS
814mandir
815localedir
816libdir
817psdir
818pdfdir
819dvidir
820htmldir
821infodir
822docdir
823oldincludedir
824includedir
74091dd4 825runstatedir
3185942a
JA
826localstatedir
827sharedstatedir
828sysconfdir
829datadir
830datarootdir
831libexecdir
832sbindir
833bindir
834program_transform_name
835prefix
836exec_prefix
ac50fbac 837PACKAGE_URL
3185942a
JA
838PACKAGE_BUGREPORT
839PACKAGE_STRING
840PACKAGE_VERSION
841PACKAGE_TARNAME
842PACKAGE_NAME
843PATH_SEPARATOR
844SHELL'
0628567a 845ac_subst_files=''
3185942a
JA
846ac_user_opts='
847enable_option_checking
3185942a
JA
848with_afs
849with_bash_malloc
850with_curses
851with_gnu_malloc
852with_installed_readline
3185942a
JA
853enable_minimal_config
854enable_alias
74091dd4 855enable_alt_array_implementation
3185942a
JA
856enable_arith_for_command
857enable_array_variables
858enable_bang_history
859enable_brace_expansion
860enable_casemod_attributes
861enable_casemod_expansions
862enable_command_timing
863enable_cond_command
864enable_cond_regexp
865enable_coprocesses
866enable_debugger
d233b485 867enable_dev_fd_stat_broken
ac50fbac 868enable_direxpand_default
3185942a
JA
869enable_directory_stack
870enable_disabled_builtins
871enable_dparen_arithmetic
872enable_extended_glob
0001803f 873enable_extended_glob_default
a0c0a00f 874enable_function_import
ac50fbac 875enable_glob_asciiranges_default
3185942a
JA
876enable_help_builtin
877enable_history
878enable_job_control
879enable_multibyte
880enable_net_redirections
881enable_process_substitution
882enable_progcomp
883enable_prompt_string_decoding
884enable_readline
885enable_restricted
886enable_select
887enable_separate_helpfiles
888enable_single_help_strings
889enable_strict_posix_default
74091dd4 890enable_translatable_strings
3185942a
JA
891enable_usg_echo_default
892enable_xpg_echo_default
893enable_mem_scramble
894enable_profiling
895enable_static_link
896enable_largefile
897enable_nls
8868edaf 898enable_threads
3185942a
JA
899with_gnu_ld
900enable_rpath
8868edaf 901with_libpth_prefix
3185942a
JA
902with_libiconv_prefix
903with_included_gettext
904with_libintl_prefix
905'
906 ac_precious_vars='build_alias
907host_alias
908target_alias
909DEBUGGER_START_FILE
ac50fbac
CR
910CC_FOR_BUILD
911CFLAGS_FOR_BUILD
912LDFLAGS_FOR_BUILD
913CPPFLAGS_FOR_BUILD
3185942a
JA
914CC
915CFLAGS
916LDFLAGS
917LIBS
918CPPFLAGS
919CPP
920YACC
921YFLAGS'
922
b80f6443 923
ccc6cda3 924# Initialize some variables set by options.
f73dda09
JA
925ac_init_help=
926ac_init_version=false
3185942a
JA
927ac_unrecognized_opts=
928ac_unrecognized_sep=
ccc6cda3
JA
929# The variables have the same names as the options, with
930# dashes changed to underlines.
f73dda09 931cache_file=/dev/null
ccc6cda3 932exec_prefix=NONE
ccc6cda3 933no_create=
ccc6cda3
JA
934no_recursion=
935prefix=NONE
936program_prefix=NONE
937program_suffix=NONE
938program_transform_name=s,x,x,
939silent=
940site=
941srcdir=
ccc6cda3
JA
942verbose=
943x_includes=NONE
944x_libraries=NONE
f73dda09
JA
945
946# Installation directory options.
947# These are left unexpanded so users can "make install exec_prefix=/foo"
948# and all the variables that are supposed to be based on exec_prefix
949# by default will actually change.
950# Use braces instead of parens because sh, perl, etc. also accept them.
3185942a 951# (The list follows the same order as the GNU Coding Standards.)
ccc6cda3
JA
952bindir='${exec_prefix}/bin'
953sbindir='${exec_prefix}/sbin'
954libexecdir='${exec_prefix}/libexec'
3185942a
JA
955datarootdir='${prefix}/share'
956datadir='${datarootdir}'
ccc6cda3
JA
957sysconfdir='${prefix}/etc'
958sharedstatedir='${prefix}/com'
959localstatedir='${prefix}/var'
74091dd4 960runstatedir='${localstatedir}/run'
ccc6cda3
JA
961includedir='${prefix}/include'
962oldincludedir='/usr/include'
3185942a
JA
963docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
964infodir='${datarootdir}/info'
965htmldir='${docdir}'
966dvidir='${docdir}'
967pdfdir='${docdir}'
968psdir='${docdir}'
969libdir='${exec_prefix}/lib'
970localedir='${datarootdir}/locale'
971mandir='${datarootdir}/man'
ccc6cda3 972
ccc6cda3 973ac_prev=
3185942a 974ac_dashdash=
ccc6cda3
JA
975for ac_option
976do
ccc6cda3
JA
977 # If the previous option needs an argument, assign it.
978 if test -n "$ac_prev"; then
3185942a 979 eval $ac_prev=\$ac_option
ccc6cda3
JA
980 ac_prev=
981 continue
982 fi
983
3185942a 984 case $ac_option in
ac50fbac
CR
985 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
986 *=) ac_optarg= ;;
987 *) ac_optarg=yes ;;
3185942a 988 esac
ccc6cda3 989
3185942a
JA
990 case $ac_dashdash$ac_option in
991 --)
992 ac_dashdash=yes ;;
ccc6cda3
JA
993
994 -bindir | --bindir | --bindi | --bind | --bin | --bi)
995 ac_prev=bindir ;;
996 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
f73dda09 997 bindir=$ac_optarg ;;
ccc6cda3
JA
998
999 -build | --build | --buil | --bui | --bu)
f73dda09 1000 ac_prev=build_alias ;;
ccc6cda3 1001 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
f73dda09 1002 build_alias=$ac_optarg ;;
ccc6cda3
JA
1003
1004 -cache-file | --cache-file | --cache-fil | --cache-fi \
1005 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1006 ac_prev=cache_file ;;
1007 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1008 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
f73dda09
JA
1009 cache_file=$ac_optarg ;;
1010
1011 --config-cache | -C)
1012 cache_file=config.cache ;;
ccc6cda3 1013
3185942a 1014 -datadir | --datadir | --datadi | --datad)
ccc6cda3 1015 ac_prev=datadir ;;
3185942a 1016 -datadir=* | --datadir=* | --datadi=* | --datad=*)
f73dda09 1017 datadir=$ac_optarg ;;
ccc6cda3 1018
3185942a
JA
1019 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1020 | --dataroo | --dataro | --datar)
1021 ac_prev=datarootdir ;;
1022 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1023 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1024 datarootdir=$ac_optarg ;;
1025
ccc6cda3 1026 -disable-* | --disable-*)
3185942a 1027 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ccc6cda3 1028 # Reject names that are not valid shell variable names.
3185942a 1029 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
74091dd4 1030 as_fn_error $? "invalid feature name: \`$ac_useropt'"
3185942a 1031 ac_useropt_orig=$ac_useropt
74091dd4 1032 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
3185942a
JA
1033 case $ac_user_opts in
1034 *"
1035"enable_$ac_useropt"
1036"*) ;;
1037 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1038 ac_unrecognized_sep=', ';;
1039 esac
1040 eval enable_$ac_useropt=no ;;
1041
1042 -docdir | --docdir | --docdi | --doc | --do)
1043 ac_prev=docdir ;;
1044 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1045 docdir=$ac_optarg ;;
1046
1047 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1048 ac_prev=dvidir ;;
1049 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1050 dvidir=$ac_optarg ;;
ccc6cda3
JA
1051
1052 -enable-* | --enable-*)
3185942a 1053 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ccc6cda3 1054 # Reject names that are not valid shell variable names.
3185942a 1055 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
74091dd4 1056 as_fn_error $? "invalid feature name: \`$ac_useropt'"
3185942a 1057 ac_useropt_orig=$ac_useropt
74091dd4 1058 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
3185942a
JA
1059 case $ac_user_opts in
1060 *"
1061"enable_$ac_useropt"
1062"*) ;;
1063 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1064 ac_unrecognized_sep=', ';;
ccc6cda3 1065 esac
3185942a 1066 eval enable_$ac_useropt=\$ac_optarg ;;
ccc6cda3
JA
1067
1068 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1069 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1070 | --exec | --exe | --ex)
1071 ac_prev=exec_prefix ;;
1072 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1073 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1074 | --exec=* | --exe=* | --ex=*)
f73dda09 1075 exec_prefix=$ac_optarg ;;
ccc6cda3
JA
1076
1077 -gas | --gas | --ga | --g)
1078 # Obsolete; use --with-gas.
1079 with_gas=yes ;;
1080
f73dda09
JA
1081 -help | --help | --hel | --he | -h)
1082 ac_init_help=long ;;
1083 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1084 ac_init_help=recursive ;;
1085 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1086 ac_init_help=short ;;
ccc6cda3
JA
1087
1088 -host | --host | --hos | --ho)
f73dda09 1089 ac_prev=host_alias ;;
ccc6cda3 1090 -host=* | --host=* | --hos=* | --ho=*)
f73dda09 1091 host_alias=$ac_optarg ;;
ccc6cda3 1092
3185942a
JA
1093 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1094 ac_prev=htmldir ;;
1095 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1096 | --ht=*)
1097 htmldir=$ac_optarg ;;
1098
ccc6cda3
JA
1099 -includedir | --includedir | --includedi | --included | --include \
1100 | --includ | --inclu | --incl | --inc)
1101 ac_prev=includedir ;;
1102 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1103 | --includ=* | --inclu=* | --incl=* | --inc=*)
f73dda09 1104 includedir=$ac_optarg ;;
ccc6cda3
JA
1105
1106 -infodir | --infodir | --infodi | --infod | --info | --inf)
1107 ac_prev=infodir ;;
1108 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
f73dda09 1109 infodir=$ac_optarg ;;
ccc6cda3
JA
1110
1111 -libdir | --libdir | --libdi | --libd)
1112 ac_prev=libdir ;;
1113 -libdir=* | --libdir=* | --libdi=* | --libd=*)
f73dda09 1114 libdir=$ac_optarg ;;
ccc6cda3
JA
1115
1116 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1117 | --libexe | --libex | --libe)
1118 ac_prev=libexecdir ;;
1119 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1120 | --libexe=* | --libex=* | --libe=*)
f73dda09 1121 libexecdir=$ac_optarg ;;
ccc6cda3 1122
3185942a
JA
1123 -localedir | --localedir | --localedi | --localed | --locale)
1124 ac_prev=localedir ;;
1125 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1126 localedir=$ac_optarg ;;
1127
ccc6cda3 1128 -localstatedir | --localstatedir | --localstatedi | --localstated \
3185942a 1129 | --localstate | --localstat | --localsta | --localst | --locals)
ccc6cda3
JA
1130 ac_prev=localstatedir ;;
1131 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
3185942a 1132 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
f73dda09 1133 localstatedir=$ac_optarg ;;
ccc6cda3
JA
1134
1135 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1136 ac_prev=mandir ;;
1137 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
f73dda09 1138 mandir=$ac_optarg ;;
ccc6cda3
JA
1139
1140 -nfp | --nfp | --nf)
1141 # Obsolete; use --without-fp.
1142 with_fp=no ;;
1143
1144 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
b80f6443 1145 | --no-cr | --no-c | -n)
ccc6cda3
JA
1146 no_create=yes ;;
1147
1148 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1149 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1150 no_recursion=yes ;;
1151
1152 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1153 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1154 | --oldin | --oldi | --old | --ol | --o)
1155 ac_prev=oldincludedir ;;
1156 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1157 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1158 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
f73dda09 1159 oldincludedir=$ac_optarg ;;
ccc6cda3
JA
1160
1161 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1162 ac_prev=prefix ;;
1163 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
f73dda09 1164 prefix=$ac_optarg ;;
ccc6cda3
JA
1165
1166 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1167 | --program-pre | --program-pr | --program-p)
1168 ac_prev=program_prefix ;;
1169 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1170 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
f73dda09 1171 program_prefix=$ac_optarg ;;
ccc6cda3
JA
1172
1173 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1174 | --program-suf | --program-su | --program-s)
1175 ac_prev=program_suffix ;;
1176 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1177 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
f73dda09 1178 program_suffix=$ac_optarg ;;
ccc6cda3
JA
1179
1180 -program-transform-name | --program-transform-name \
1181 | --program-transform-nam | --program-transform-na \
1182 | --program-transform-n | --program-transform- \
1183 | --program-transform | --program-transfor \
1184 | --program-transfo | --program-transf \
1185 | --program-trans | --program-tran \
1186 | --progr-tra | --program-tr | --program-t)
1187 ac_prev=program_transform_name ;;
1188 -program-transform-name=* | --program-transform-name=* \
1189 | --program-transform-nam=* | --program-transform-na=* \
1190 | --program-transform-n=* | --program-transform-=* \
1191 | --program-transform=* | --program-transfor=* \
1192 | --program-transfo=* | --program-transf=* \
1193 | --program-trans=* | --program-tran=* \
1194 | --progr-tra=* | --program-tr=* | --program-t=*)
f73dda09 1195 program_transform_name=$ac_optarg ;;
ccc6cda3 1196
3185942a
JA
1197 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1198 ac_prev=pdfdir ;;
1199 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1200 pdfdir=$ac_optarg ;;
1201
1202 -psdir | --psdir | --psdi | --psd | --ps)
1203 ac_prev=psdir ;;
1204 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1205 psdir=$ac_optarg ;;
1206
ccc6cda3
JA
1207 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1208 | -silent | --silent | --silen | --sile | --sil)
1209 silent=yes ;;
1210
74091dd4
CR
1211 -runstatedir | --runstatedir | --runstatedi | --runstated \
1212 | --runstate | --runstat | --runsta | --runst | --runs \
1213 | --run | --ru | --r)
1214 ac_prev=runstatedir ;;
1215 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1216 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1217 | --run=* | --ru=* | --r=*)
1218 runstatedir=$ac_optarg ;;
1219
ccc6cda3
JA
1220 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1221 ac_prev=sbindir ;;
1222 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1223 | --sbi=* | --sb=*)
f73dda09 1224 sbindir=$ac_optarg ;;
ccc6cda3
JA
1225
1226 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1227 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1228 | --sharedst | --shareds | --shared | --share | --shar \
1229 | --sha | --sh)
1230 ac_prev=sharedstatedir ;;
1231 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1232 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1233 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1234 | --sha=* | --sh=*)
f73dda09 1235 sharedstatedir=$ac_optarg ;;
ccc6cda3
JA
1236
1237 -site | --site | --sit)
1238 ac_prev=site ;;
1239 -site=* | --site=* | --sit=*)
f73dda09 1240 site=$ac_optarg ;;
ccc6cda3
JA
1241
1242 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1243 ac_prev=srcdir ;;
1244 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
f73dda09 1245 srcdir=$ac_optarg ;;
ccc6cda3
JA
1246
1247 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1248 | --syscon | --sysco | --sysc | --sys | --sy)
1249 ac_prev=sysconfdir ;;
1250 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1251 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
f73dda09 1252 sysconfdir=$ac_optarg ;;
ccc6cda3
JA
1253
1254 -target | --target | --targe | --targ | --tar | --ta | --t)
f73dda09 1255 ac_prev=target_alias ;;
ccc6cda3 1256 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
f73dda09 1257 target_alias=$ac_optarg ;;
ccc6cda3
JA
1258
1259 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1260 verbose=yes ;;
1261
f73dda09
JA
1262 -version | --version | --versio | --versi | --vers | -V)
1263 ac_init_version=: ;;
ccc6cda3
JA
1264
1265 -with-* | --with-*)
3185942a 1266 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ccc6cda3 1267 # Reject names that are not valid shell variable names.
3185942a 1268 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
74091dd4 1269 as_fn_error $? "invalid package name: \`$ac_useropt'"
3185942a 1270 ac_useropt_orig=$ac_useropt
74091dd4 1271 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
3185942a
JA
1272 case $ac_user_opts in
1273 *"
1274"with_$ac_useropt"
1275"*) ;;
1276 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1277 ac_unrecognized_sep=', ';;
ccc6cda3 1278 esac
3185942a 1279 eval with_$ac_useropt=\$ac_optarg ;;
ccc6cda3
JA
1280
1281 -without-* | --without-*)
3185942a 1282 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ccc6cda3 1283 # Reject names that are not valid shell variable names.
3185942a 1284 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
74091dd4 1285 as_fn_error $? "invalid package name: \`$ac_useropt'"
3185942a 1286 ac_useropt_orig=$ac_useropt
74091dd4 1287 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
3185942a
JA
1288 case $ac_user_opts in
1289 *"
1290"with_$ac_useropt"
1291"*) ;;
1292 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1293 ac_unrecognized_sep=', ';;
1294 esac
1295 eval with_$ac_useropt=no ;;
ccc6cda3
JA
1296
1297 --x)
1298 # Obsolete; use --with-x.
1299 with_x=yes ;;
1300
1301 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1302 | --x-incl | --x-inc | --x-in | --x-i)
1303 ac_prev=x_includes ;;
1304 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1305 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
f73dda09 1306 x_includes=$ac_optarg ;;
ccc6cda3
JA
1307
1308 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1309 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1310 ac_prev=x_libraries ;;
1311 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1312 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
f73dda09 1313 x_libraries=$ac_optarg ;;
ccc6cda3 1314
ac50fbac
CR
1315 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1316Try \`$0 --help' for more information"
ccc6cda3
JA
1317 ;;
1318
f73dda09
JA
1319 *=*)
1320 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1321 # Reject names that are not valid shell variable names.
ac50fbac
CR
1322 case $ac_envvar in #(
1323 '' | [0-9]* | *[!_$as_cr_alnum]* )
1324 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1325 esac
3185942a 1326 eval $ac_envvar=\$ac_optarg
f73dda09
JA
1327 export $ac_envvar ;;
1328
ccc6cda3 1329 *)
f73dda09 1330 # FIXME: should be removed in autoconf 3.0.
74091dd4 1331 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
f73dda09 1332 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
74091dd4 1333 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
ac50fbac 1334 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
ccc6cda3
JA
1335 ;;
1336
1337 esac
1338done
1339
1340if test -n "$ac_prev"; then
f73dda09 1341 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
ac50fbac 1342 as_fn_error $? "missing argument to $ac_option"
ccc6cda3 1343fi
ccc6cda3 1344
3185942a
JA
1345if test -n "$ac_unrecognized_opts"; then
1346 case $enable_option_checking in
1347 no) ;;
ac50fbac 1348 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
74091dd4 1349 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
f73dda09 1350 esac
3185942a 1351fi
ccc6cda3 1352
3185942a
JA
1353# Check all directory arguments for consistency.
1354for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1355 datadir sysconfdir sharedstatedir localstatedir includedir \
1356 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
74091dd4 1357 libdir localedir mandir runstatedir
ccc6cda3 1358do
3185942a
JA
1359 eval ac_val=\$$ac_var
1360 # Remove trailing slashes.
f73dda09 1361 case $ac_val in
3185942a
JA
1362 */ )
1363 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1364 eval $ac_var=\$ac_val;;
ccc6cda3 1365 esac
3185942a
JA
1366 # Be sure to have absolute directory names.
1367 case $ac_val in
1368 [\\/$]* | ?:[\\/]* ) continue;;
1369 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1370 esac
ac50fbac 1371 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
ccc6cda3
JA
1372done
1373
f73dda09
JA
1374# There might be people who depend on the old broken behavior: `$host'
1375# used to hold the argument of --host etc.
b80f6443 1376# FIXME: To remove some day.
f73dda09
JA
1377build=$build_alias
1378host=$host_alias
1379target=$target_alias
1380
b80f6443 1381# FIXME: To remove some day.
f73dda09
JA
1382if test "x$host_alias" != x; then
1383 if test "x$build_alias" = x; then
1384 cross_compiling=maybe
f73dda09
JA
1385 elif test "x$build_alias" != "x$host_alias"; then
1386 cross_compiling=yes
1387 fi
1388fi
ccc6cda3 1389
f73dda09
JA
1390ac_tool_prefix=
1391test -n "$host_alias" && ac_tool_prefix=$host_alias-
ccc6cda3 1392
f73dda09 1393test "$silent" = yes && exec 6>/dev/null
ccc6cda3 1394
b80f6443 1395
3185942a
JA
1396ac_pwd=`pwd` && test -n "$ac_pwd" &&
1397ac_ls_di=`ls -di .` &&
1398ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
ac50fbac 1399 as_fn_error $? "working directory cannot be determined"
3185942a 1400test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
ac50fbac 1401 as_fn_error $? "pwd does not report name of working directory"
3185942a
JA
1402
1403
ccc6cda3
JA
1404# Find the source files, if location was not specified.
1405if test -z "$srcdir"; then
1406 ac_srcdir_defaulted=yes
3185942a
JA
1407 # Try the directory containing this script, then the parent directory.
1408 ac_confdir=`$as_dirname -- "$as_myself" ||
1409$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1410 X"$as_myself" : 'X\(//\)[^/]' \| \
1411 X"$as_myself" : 'X\(//\)$' \| \
1412 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
74091dd4 1413printf "%s\n" X"$as_myself" |
3185942a
JA
1414 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1415 s//\1/
1416 q
1417 }
1418 /^X\(\/\/\)[^/].*/{
1419 s//\1/
1420 q
1421 }
1422 /^X\(\/\/\)$/{
1423 s//\1/
1424 q
1425 }
1426 /^X\(\/\).*/{
1427 s//\1/
1428 q
1429 }
1430 s/.*/./; q'`
ccc6cda3 1431 srcdir=$ac_confdir
3185942a 1432 if test ! -r "$srcdir/$ac_unique_file"; then
ccc6cda3
JA
1433 srcdir=..
1434 fi
1435else
1436 ac_srcdir_defaulted=no
1437fi
3185942a
JA
1438if test ! -r "$srcdir/$ac_unique_file"; then
1439 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
ac50fbac 1440 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
ccc6cda3 1441fi
3185942a
JA
1442ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1443ac_abs_confdir=`(
ac50fbac 1444 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
3185942a
JA
1445 pwd)`
1446# When building in place, set srcdir=.
1447if test "$ac_abs_confdir" = "$ac_pwd"; then
1448 srcdir=.
1449fi
1450# Remove unnecessary trailing slashes from srcdir.
1451# Double slashes in file names in object file debugging info
1452# mess up M-x gdb in Emacs.
1453case $srcdir in
1454*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1455esac
1456for ac_var in $ac_precious_vars; do
1457 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1458 eval ac_env_${ac_var}_value=\$${ac_var}
1459 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1460 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1461done
ccc6cda3 1462
f73dda09
JA
1463#
1464# Report the --help message.
1465#
1466if test "$ac_init_help" = "long"; then
1467 # Omit some internal or obsolete options to make the list less imposing.
1468 # This message is too long to be a string in the A/UX 3.1 sh.
b80f6443 1469 cat <<_ACEOF
74091dd4 1470\`configure' configures bash 5.2-release to adapt to many kinds of systems.
ccc6cda3 1471
f73dda09 1472Usage: $0 [OPTION]... [VAR=VALUE]...
ccc6cda3 1473
f73dda09
JA
1474To assign environment variables (e.g., CC, CFLAGS...), specify them as
1475VAR=VALUE. See below for descriptions of some of the useful variables.
1476
1477Defaults for the options are specified in brackets.
ccc6cda3 1478
f73dda09
JA
1479Configuration:
1480 -h, --help display this help and exit
1481 --help=short display options specific to this package
1482 --help=recursive display the short help of all the included packages
1483 -V, --version display version information and exit
ac50fbac 1484 -q, --quiet, --silent do not print \`checking ...' messages
f73dda09
JA
1485 --cache-file=FILE cache test results in FILE [disabled]
1486 -C, --config-cache alias for \`--cache-file=config.cache'
1487 -n, --no-create do not create output files
1488 --srcdir=DIR find the sources in DIR [configure dir or \`..']
ccc6cda3 1489
f73dda09
JA
1490Installation directories:
1491 --prefix=PREFIX install architecture-independent files in PREFIX
3185942a 1492 [$ac_default_prefix]
f73dda09 1493 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
3185942a 1494 [PREFIX]
ccc6cda3 1495
f73dda09
JA
1496By default, \`make install' will install all the files in
1497\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1498an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1499for instance \`--prefix=\$HOME'.
ccc6cda3 1500
f73dda09 1501For better control, use the options below.
ccc6cda3 1502
f73dda09 1503Fine tuning of the installation directories:
3185942a
JA
1504 --bindir=DIR user executables [EPREFIX/bin]
1505 --sbindir=DIR system admin executables [EPREFIX/sbin]
1506 --libexecdir=DIR program executables [EPREFIX/libexec]
1507 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1508 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1509 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
74091dd4 1510 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
3185942a
JA
1511 --libdir=DIR object code libraries [EPREFIX/lib]
1512 --includedir=DIR C header files [PREFIX/include]
1513 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1514 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1515 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1516 --infodir=DIR info documentation [DATAROOTDIR/info]
1517 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1518 --mandir=DIR man documentation [DATAROOTDIR/man]
1519 --docdir=DIR documentation root [DATAROOTDIR/doc/bash]
1520 --htmldir=DIR html documentation [DOCDIR]
1521 --dvidir=DIR dvi documentation [DOCDIR]
1522 --pdfdir=DIR pdf documentation [DOCDIR]
1523 --psdir=DIR ps documentation [DOCDIR]
b80f6443 1524_ACEOF
f73dda09 1525
b80f6443 1526 cat <<\_ACEOF
f73dda09
JA
1527
1528System types:
1529 --build=BUILD configure for building on BUILD [guessed]
b80f6443
JA
1530 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1531_ACEOF
ccc6cda3 1532fi
ccc6cda3 1533
f73dda09
JA
1534if test -n "$ac_init_help"; then
1535 case $ac_init_help in
74091dd4 1536 short | recursive ) echo "Configuration of bash 5.2-release:";;
f73dda09 1537 esac
b80f6443 1538 cat <<\_ACEOF
ccc6cda3 1539
f73dda09 1540Optional Features:
3185942a 1541 --disable-option-checking ignore unrecognized --enable/--with options
f73dda09
JA
1542 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1543 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
7117c2d2
JA
1544 --enable-minimal-config a minimal sh-like configuration
1545 --enable-alias enable shell aliases
74091dd4
CR
1546 --enable-alt-array-implementation
1547 enable an alternate array implementation that
1548 optimizes speed at the cost of space
7117c2d2
JA
1549 --enable-arith-for-command
1550 enable arithmetic for command
1551 --enable-array-variables
1552 include shell array variables
1553 --enable-bang-history turn on csh-style history substitution
1554 --enable-brace-expansion
1555 include brace expansion
3185942a
JA
1556 --enable-casemod-attributes
1557 include case-modifying variable attributes
1558 --enable-casemod-expansions
1559 include case-modifying word expansions
7117c2d2
JA
1560 --enable-command-timing enable the time reserved word and command timing
1561 --enable-cond-command enable the conditional command
3185942a 1562 --enable-cond-regexp enable extended regular expression matching in
b80f6443 1563 conditional commands
3185942a
JA
1564 --enable-coprocesses enable coprocess support and the coproc reserved
1565 word
b80f6443 1566 --enable-debugger enable support for bash debugger
d233b485
CR
1567 --enable-dev-fd-stat-broken
1568 enable this option if stat on /dev/fd/N and fstat on
1569 file descriptor N don't return the same results
ac50fbac
CR
1570 --enable-direxpand-default
1571 enable the direxpand shell option by default
7117c2d2
JA
1572 --enable-directory-stack
1573 enable builtins pushd/popd/dirs
1574 --enable-disabled-builtins
1575 allow disabled builtins to still be invoked
1576 --enable-dparen-arithmetic
1577 include ((...)) command
1578 --enable-extended-glob include ksh-style extended pattern matching
0001803f
CR
1579 --enable-extended-glob-default
1580 force extended pattern matching to be enabled by
1581 default
a0c0a00f
CR
1582 --enable-function-import
1583 allow bash to import exported function definitions
1584 by default
ac50fbac
CR
1585 --enable-glob-asciiranges-default
1586 force bracket range expressions in pattern matching
1587 to use the C locale by default
7117c2d2
JA
1588 --enable-help-builtin include the help builtin
1589 --enable-history turn on command history
1590 --enable-job-control enable job control features
b80f6443 1591 --enable-multibyte enable multibyte characters if OS supports them
7117c2d2
JA
1592 --enable-net-redirections
1593 enable /dev/tcp/host/port redirection
1594 --enable-process-substitution
1595 enable process substitution
1596 --enable-progcomp enable programmable completion and the complete
1597 builtin
1598 --enable-prompt-string-decoding
1599 turn on escape character decoding in prompts
1600 --enable-readline turn on command line editing
1601 --enable-restricted enable a restricted shell
1602 --enable-select include select command
1603 --enable-separate-helpfiles
1604 use external files for help builtin documentation
95732b49
JA
1605 --enable-single-help-strings
1606 store help documentation as a single string to ease
1607 translation
1608 --enable-strict-posix-default
1609 configure bash to be posix-conformant by default
74091dd4
CR
1610 --enable-translatable-strings
1611 include support for $"..." translatable strings
7117c2d2
JA
1612 --enable-usg-echo-default
1613 a synonym for --enable-xpg-echo-default
1614 --enable-xpg-echo-default
1615 make the echo builtin expand escape sequences by
1616 default
1617 --enable-mem-scramble scramble memory on calls to malloc and free
1618 --enable-profiling allow profiling with gprof
1619 --enable-static-link link bash statically, for use as a root shell
f73dda09 1620 --disable-largefile omit support for large files
b80f6443 1621 --disable-nls do not use Native Language Support
8868edaf
CR
1622 --enable-threads={posix|solaris|pth|windows}
1623 specify multithreading API
1624 --disable-threads build without multithread safety
b80f6443 1625 --disable-rpath do not hardcode runtime library paths
f73dda09
JA
1626
1627Optional Packages:
1628 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1629 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
7117c2d2
JA
1630 --with-afs if you are running AFS
1631 --with-bash-malloc use the Bash version of malloc
1632 --with-curses use the curses library instead of the termcap
1633 library
1634 --with-gnu-malloc synonym for --with-bash-malloc
1635 --with-installed-readline
1636 use a version of the readline library that is
1637 already installed
8868edaf
CR
1638 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1639 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
1640 --without-libpth-prefix don't search for libpth in includedir and libdir
b80f6443
JA
1641 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1642 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1643 --with-included-gettext use the GNU gettext library included here
1644 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
1645 --without-libintl-prefix don't search for libintl in includedir and libdir
f73dda09
JA
1646
1647Some influential environment variables:
b80f6443
JA
1648 DEBUGGER_START_FILE
1649 location of bash debugger initialization file
ac50fbac
CR
1650 CC_FOR_BUILD
1651 C compiler used when compiling binaries used only at build time
1652 CFLAGS_FOR_BUILD
d233b485 1653 Compilation options (CFLAGS) used when compiling binaries used
ac50fbac
CR
1654 only at build time
1655 LDFLAGS_FOR_BUILD
1656 Linker options (LDFLAGS) used when compiling binaries used only
1657 at build time
1658 CPPFLAGS_FOR_BUILD
1659 C preprocessor options (CPPFLAGS) used when compiling binaries
1660 used only at build time
f73dda09
JA
1661 CC C compiler command
1662 CFLAGS C compiler flags
1663 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1664 nonstandard directory <lib dir>
3185942a 1665 LIBS libraries to pass to the linker, e.g. -l<library>
ac50fbac 1666 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
3185942a 1667 you have headers in a nonstandard directory <include dir>
f73dda09 1668 CPP C preprocessor
ac50fbac
CR
1669 YACC The `Yet Another Compiler Compiler' implementation to use.
1670 Defaults to the first program found out of: `bison -y', `byacc',
1671 `yacc'.
3185942a
JA
1672 YFLAGS The list of arguments that will be passed by default to $YACC.
1673 This script will default YFLAGS to the empty string to avoid a
1674 default value of `-d' given by some make applications.
f73dda09
JA
1675
1676Use these variables to override the choices made by `configure' or to help
1677it to find libraries and programs with nonstandard names/locations.
1678
1679Report bugs to <bug-bash@gnu.org>.
b80f6443 1680_ACEOF
3185942a 1681ac_status=$?
f73dda09
JA
1682fi
1683
1684if test "$ac_init_help" = "recursive"; then
1685 # If there are subdirs, report their specific --help.
b80f6443 1686 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
3185942a
JA
1687 test -d "$ac_dir" ||
1688 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1689 continue
b80f6443
JA
1690 ac_builddir=.
1691
3185942a
JA
1692case "$ac_dir" in
1693.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1694*)
74091dd4 1695 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
3185942a 1696 # A ".." for each directory in $ac_dir_suffix.
74091dd4 1697 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
3185942a
JA
1698 case $ac_top_builddir_sub in
1699 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1700 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1701 esac ;;
1702esac
1703ac_abs_top_builddir=$ac_pwd
1704ac_abs_builddir=$ac_pwd$ac_dir_suffix
1705# for backward compatibility:
1706ac_top_builddir=$ac_top_build_prefix
ccc6cda3 1707
b80f6443 1708case $srcdir in
3185942a 1709 .) # We are building in place.
b80f6443 1710 ac_srcdir=.
3185942a
JA
1711 ac_top_srcdir=$ac_top_builddir_sub
1712 ac_abs_top_srcdir=$ac_pwd ;;
1713 [\\/]* | ?:[\\/]* ) # Absolute name.
b80f6443 1714 ac_srcdir=$srcdir$ac_dir_suffix;
3185942a
JA
1715 ac_top_srcdir=$srcdir
1716 ac_abs_top_srcdir=$srcdir ;;
1717 *) # Relative name.
1718 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1719 ac_top_srcdir=$ac_top_build_prefix$srcdir
1720 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
0628567a 1721esac
3185942a
JA
1722ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1723
1724 cd "$ac_dir" || { ac_status=$?; continue; }
74091dd4
CR
1725 # Check for configure.gnu first; this name is used for a wrapper for
1726 # Metaconfig's "Configure" on case-insensitive file systems.
3185942a
JA
1727 if test -f "$ac_srcdir/configure.gnu"; then
1728 echo &&
1729 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1730 elif test -f "$ac_srcdir/configure"; then
1731 echo &&
1732 $SHELL "$ac_srcdir/configure" --help=recursive
f73dda09 1733 else
74091dd4 1734 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
3185942a
JA
1735 fi || ac_status=$?
1736 cd "$ac_pwd" || { ac_status=$?; break; }
f73dda09
JA
1737 done
1738fi
ccc6cda3 1739
3185942a 1740test -n "$ac_init_help" && exit $ac_status
f73dda09 1741if $ac_init_version; then
b80f6443 1742 cat <<\_ACEOF
74091dd4
CR
1743bash configure 5.2-release
1744generated by GNU Autoconf 2.71
ccc6cda3 1745
74091dd4 1746Copyright (C) 2021 Free Software Foundation, Inc.
f73dda09
JA
1747This configure script is free software; the Free Software Foundation
1748gives unlimited permission to copy, distribute and modify it.
b80f6443 1749_ACEOF
3185942a 1750 exit
f73dda09 1751fi
ccc6cda3 1752
ac50fbac
CR
1753## ------------------------ ##
1754## Autoconf initialization. ##
1755## ------------------------ ##
bb70624e 1756
ac50fbac
CR
1757# ac_fn_c_try_compile LINENO
1758# --------------------------
1759# Try to compile conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_compile ()
f73dda09 1761{
ac50fbac 1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
74091dd4 1763 rm -f conftest.$ac_objext conftest.beam
ac50fbac
CR
1764 if { { ac_try="$ac_compile"
1765case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
74091dd4 1770printf "%s\n" "$ac_try_echo"; } >&5
ac50fbac
CR
1771 (eval "$ac_compile") 2>conftest.err
1772 ac_status=$?
1773 if test -s conftest.err; then
1774 grep -v '^ *+' conftest.err >conftest.er1
1775 cat conftest.er1 >&5
1776 mv -f conftest.er1 conftest.err
1777 fi
74091dd4 1778 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
ac50fbac
CR
1779 test $ac_status = 0; } && {
1780 test -z "$ac_c_werror_flag" ||
1781 test ! -s conftest.err
74091dd4
CR
1782 } && test -s conftest.$ac_objext
1783then :
ac50fbac 1784 ac_retval=0
74091dd4
CR
1785else $as_nop
1786 printf "%s\n" "$as_me: failed program was:" >&5
ac50fbac 1787sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1788
ac50fbac
CR
1789 ac_retval=1
1790fi
1791 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1792 as_fn_set_status $ac_retval
f73dda09 1793
ac50fbac 1794} # ac_fn_c_try_compile
f73dda09 1795
74091dd4
CR
1796# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1797# -------------------------------------------------------
1798# Tests whether HEADER exists and can be compiled using the include files in
1799# INCLUDES, setting the cache variable VAR accordingly.
1800ac_fn_c_check_header_compile ()
ac50fbac
CR
1801{
1802 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
74091dd4
CR
1803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1804printf %s "checking for $2... " >&6; }
1805if eval test \${$3+y}
1806then :
1807 printf %s "(cached) " >&6
1808else $as_nop
1809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1810/* end confdefs.h. */
1811$4
1812#include <$2>
1813_ACEOF
1814if ac_fn_c_try_compile "$LINENO"
1815then :
1816 eval "$3=yes"
1817else $as_nop
1818 eval "$3=no"
ac50fbac 1819fi
74091dd4
CR
1820rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1821fi
1822eval ac_res=\$$3
1823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1824printf "%s\n" "$ac_res" >&6; }
ac50fbac 1825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
b80f6443 1826
74091dd4 1827} # ac_fn_c_check_header_compile
b80f6443 1828
ac50fbac
CR
1829# ac_fn_c_try_cpp LINENO
1830# ----------------------
1831# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1832ac_fn_c_try_cpp ()
1833{
1834 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1835 if { { ac_try="$ac_cpp conftest.$ac_ext"
1836case "(($ac_try" in
1837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1838 *) ac_try_echo=$ac_try;;
1839esac
1840eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
74091dd4 1841printf "%s\n" "$ac_try_echo"; } >&5
ac50fbac
CR
1842 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1843 ac_status=$?
1844 if test -s conftest.err; then
1845 grep -v '^ *+' conftest.err >conftest.er1
1846 cat conftest.er1 >&5
1847 mv -f conftest.er1 conftest.err
1848 fi
74091dd4 1849 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
ac50fbac
CR
1850 test $ac_status = 0; } > conftest.i && {
1851 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1852 test ! -s conftest.err
74091dd4
CR
1853 }
1854then :
ac50fbac 1855 ac_retval=0
74091dd4
CR
1856else $as_nop
1857 printf "%s\n" "$as_me: failed program was:" >&5
ac50fbac 1858sed 's/^/| /' conftest.$ac_ext >&5
f73dda09 1859
ac50fbac
CR
1860 ac_retval=1
1861fi
1862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863 as_fn_set_status $ac_retval
b80f6443 1864
ac50fbac 1865} # ac_fn_c_try_cpp
b80f6443 1866
74091dd4
CR
1867# ac_fn_c_try_link LINENO
1868# -----------------------
1869# Try to link conftest.$ac_ext, and return whether this succeeded.
1870ac_fn_c_try_link ()
ac50fbac
CR
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
74091dd4 1873 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
ac50fbac
CR
1874 if { { ac_try="$ac_link"
1875case "(($ac_try" in
1876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877 *) ac_try_echo=$ac_try;;
1878esac
1879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
74091dd4
CR
1880printf "%s\n" "$ac_try_echo"; } >&5
1881 (eval "$ac_link") 2>conftest.err
ac50fbac 1882 ac_status=$?
74091dd4
CR
1883 if test -s conftest.err; then
1884 grep -v '^ *+' conftest.err >conftest.er1
1885 cat conftest.er1 >&5
1886 mv -f conftest.er1 conftest.err
1887 fi
1888 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889 test $ac_status = 0; } && {
1890 test -z "$ac_c_werror_flag" ||
1891 test ! -s conftest.err
1892 } && test -s conftest$ac_exeext && {
1893 test "$cross_compiling" = yes ||
1894 test -x conftest$ac_exeext
1895 }
1896then :
ac50fbac 1897 ac_retval=0
74091dd4
CR
1898else $as_nop
1899 printf "%s\n" "$as_me: failed program was:" >&5
ac50fbac 1900sed 's/^/| /' conftest.$ac_ext >&5
0628567a 1901
74091dd4 1902 ac_retval=1
ac50fbac 1903fi
74091dd4
CR
1904 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1905 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1906 # interfere with the next link command; also delete a directory that is
1907 # left behind by Apple's compiler. We do this before executing the actions.
ac50fbac
CR
1908 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1909 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1910 as_fn_set_status $ac_retval
0628567a 1911
74091dd4 1912} # ac_fn_c_try_link
f73dda09 1913
ac50fbac
CR
1914# ac_fn_c_check_func LINENO FUNC VAR
1915# ----------------------------------
1916# Tests whether FUNC exists, setting the cache variable VAR accordingly
1917ac_fn_c_check_func ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
74091dd4
CR
1920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921printf %s "checking for $2... " >&6; }
1922if eval test \${$3+y}
1923then :
1924 printf %s "(cached) " >&6
1925else $as_nop
ac50fbac
CR
1926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1927/* end confdefs.h. */
1928/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1929 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1930#define $2 innocuous_$2
f73dda09 1931
ac50fbac 1932/* System header to define __stub macros and hopefully few prototypes,
74091dd4 1933 which can conflict with char $2 (); below. */
b80f6443 1934
74091dd4 1935#include <limits.h>
ac50fbac 1936#undef $2
b80f6443 1937
ac50fbac
CR
1938/* Override any GCC internal prototype to avoid an error.
1939 Use char because int might match the return type of a GCC
1940 builtin and then its argument prototype would still apply. */
1941#ifdef __cplusplus
1942extern "C"
1943#endif
1944char $2 ();
1945/* The GNU C library defines this for functions which it implements
1946 to always fail with ENOSYS. Some functions are actually named
1947 something starting with __ and the normal name is an alias. */
1948#if defined __stub_$2 || defined __stub___$2
1949choke me
1950#endif
1951
1952int
74091dd4 1953main (void)
ac50fbac
CR
1954{
1955return $2 ();
1956 ;
1957 return 0;
1958}
b80f6443 1959_ACEOF
74091dd4
CR
1960if ac_fn_c_try_link "$LINENO"
1961then :
ac50fbac 1962 eval "$3=yes"
74091dd4 1963else $as_nop
ac50fbac
CR
1964 eval "$3=no"
1965fi
74091dd4 1966rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac
CR
1967 conftest$ac_exeext conftest.$ac_ext
1968fi
1969eval ac_res=\$$3
74091dd4
CR
1970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1971printf "%s\n" "$ac_res" >&6; }
ac50fbac 1972 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
b80f6443 1973
ac50fbac 1974} # ac_fn_c_check_func
b80f6443 1975
74091dd4
CR
1976# ac_fn_c_try_run LINENO
1977# ----------------------
1978# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1979# executables *can* be run.
1980ac_fn_c_try_run ()
ac50fbac
CR
1981{
1982 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
74091dd4
CR
1983 if { { ac_try="$ac_link"
1984case "(($ac_try" in
1985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1986 *) ac_try_echo=$ac_try;;
1987esac
1988eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1989printf "%s\n" "$ac_try_echo"; } >&5
1990 (eval "$ac_link") 2>&5
1991 ac_status=$?
1992 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1993 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1994 { { case "(($ac_try" in
1995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1996 *) ac_try_echo=$ac_try;;
1997esac
1998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1999printf "%s\n" "$ac_try_echo"; } >&5
2000 (eval "$ac_try") 2>&5
2001 ac_status=$?
2002 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2003 test $ac_status = 0; }; }
2004then :
2005 ac_retval=0
2006else $as_nop
2007 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2008 printf "%s\n" "$as_me: failed program was:" >&5
2009sed 's/^/| /' conftest.$ac_ext >&5
2010
2011 ac_retval=$ac_status
2012fi
2013 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2014 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2015 as_fn_set_status $ac_retval
2016
2017} # ac_fn_c_try_run
2018
2019# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2020# -------------------------------------------
2021# Tests whether TYPE exists after having included INCLUDES, setting cache
2022# variable VAR accordingly.
2023ac_fn_c_check_type ()
2024{
2025 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2027printf %s "checking for $2... " >&6; }
2028if eval test \${$3+y}
2029then :
2030 printf %s "(cached) " >&6
2031else $as_nop
2032 eval "$3=no"
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$4
2036int
2037main (void)
ac50fbac
CR
2038{
2039if (sizeof ($2))
2040 return 0;
2041 ;
2042 return 0;
2043}
b80f6443 2044_ACEOF
74091dd4
CR
2045if ac_fn_c_try_compile "$LINENO"
2046then :
ac50fbac
CR
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
74091dd4 2051main (void)
ac50fbac
CR
2052{
2053if (sizeof (($2)))
2054 return 0;
2055 ;
2056 return 0;
2057}
b80f6443 2058_ACEOF
74091dd4
CR
2059if ac_fn_c_try_compile "$LINENO"
2060then :
b80f6443 2061
74091dd4 2062else $as_nop
ac50fbac 2063 eval "$3=yes"
3185942a 2064fi
74091dd4 2065rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 2066fi
74091dd4 2067rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 2068fi
ac50fbac 2069eval ac_res=\$$3
74091dd4
CR
2070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2071printf "%s\n" "$ac_res" >&6; }
ac50fbac 2072 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
f73dda09 2073
ac50fbac 2074} # ac_fn_c_check_type
b80f6443 2075
74091dd4
CR
2076# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2077# ------------------------------------------------------------------
ac50fbac 2078# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
74091dd4
CR
2079# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2080ac_fn_check_decl ()
ac50fbac
CR
2081{
2082 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2083 as_decl_name=`echo $2|sed 's/ *(.*//'`
74091dd4
CR
2084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2085printf %s "checking whether $as_decl_name is declared... " >&6; }
2086if eval test \${$3+y}
2087then :
2088 printf %s "(cached) " >&6
2089else $as_nop
ac50fbac 2090 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
74091dd4
CR
2091 eval ac_save_FLAGS=\$$6
2092 as_fn_append $6 " $5"
ac50fbac
CR
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
74091dd4 2097main (void)
ac50fbac
CR
2098{
2099#ifndef $as_decl_name
2100#ifdef __cplusplus
2101 (void) $as_decl_use;
2102#else
2103 (void) $as_decl_name;
2104#endif
2105#endif
b80f6443 2106
ac50fbac
CR
2107 ;
2108 return 0;
2109}
2110_ACEOF
74091dd4
CR
2111if ac_fn_c_try_compile "$LINENO"
2112then :
ac50fbac 2113 eval "$3=yes"
74091dd4 2114else $as_nop
ac50fbac
CR
2115 eval "$3=no"
2116fi
74091dd4
CR
2117rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2118 eval $6=\$ac_save_FLAGS
2119
ac50fbac
CR
2120fi
2121eval ac_res=\$$3
74091dd4
CR
2122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2123printf "%s\n" "$ac_res" >&6; }
ac50fbac 2124 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
b80f6443 2125
74091dd4 2126} # ac_fn_check_decl
b80f6443 2127
ac50fbac
CR
2128# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2129# --------------------------------------------
2130# Tries to find the compile-time value of EXPR in a program that includes
2131# INCLUDES, setting VAR accordingly. Returns whether the value could be
2132# computed
2133ac_fn_c_compute_int ()
2134{
2135 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136 if test "$cross_compiling" = yes; then
2137 # Depending upon the size, compute the lo and hi bounds.
2138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
74091dd4 2142main (void)
ac50fbac
CR
2143{
2144static int test_array [1 - 2 * !(($2) >= 0)];
2145test_array [0] = 0;
2146return test_array [0];
b80f6443 2147
ac50fbac
CR
2148 ;
2149 return 0;
2150}
2151_ACEOF
74091dd4
CR
2152if ac_fn_c_try_compile "$LINENO"
2153then :
ac50fbac
CR
2154 ac_lo=0 ac_mid=0
2155 while :; do
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h. */
2158$4
2159int
74091dd4 2160main (void)
ac50fbac
CR
2161{
2162static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2163test_array [0] = 0;
2164return test_array [0];
b80f6443 2165
ac50fbac
CR
2166 ;
2167 return 0;
2168}
2169_ACEOF
74091dd4
CR
2170if ac_fn_c_try_compile "$LINENO"
2171then :
ac50fbac 2172 ac_hi=$ac_mid; break
74091dd4 2173else $as_nop
ac50fbac
CR
2174 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2175 if test $ac_lo -le $ac_mid; then
2176 ac_lo= ac_hi=
2177 break
2178 fi
2179 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2180fi
74091dd4 2181rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 2182 done
74091dd4 2183else $as_nop
ac50fbac
CR
2184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2185/* end confdefs.h. */
2186$4
2187int
74091dd4 2188main (void)
ac50fbac
CR
2189{
2190static int test_array [1 - 2 * !(($2) < 0)];
2191test_array [0] = 0;
2192return test_array [0];
b80f6443 2193
ac50fbac
CR
2194 ;
2195 return 0;
2196}
2197_ACEOF
74091dd4
CR
2198if ac_fn_c_try_compile "$LINENO"
2199then :
ac50fbac
CR
2200 ac_hi=-1 ac_mid=-1
2201 while :; do
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204$4
2205int
74091dd4 2206main (void)
ac50fbac
CR
2207{
2208static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2209test_array [0] = 0;
2210return test_array [0];
b80f6443 2211
ac50fbac
CR
2212 ;
2213 return 0;
2214}
2215_ACEOF
74091dd4
CR
2216if ac_fn_c_try_compile "$LINENO"
2217then :
ac50fbac 2218 ac_lo=$ac_mid; break
74091dd4 2219else $as_nop
ac50fbac
CR
2220 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2221 if test $ac_mid -le $ac_hi; then
2222 ac_lo= ac_hi=
2223 break
2224 fi
2225 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2226fi
74091dd4 2227rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 2228 done
74091dd4 2229else $as_nop
ac50fbac
CR
2230 ac_lo= ac_hi=
2231fi
74091dd4 2232rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 2233fi
74091dd4 2234rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac
CR
2235# Binary search between lo and hi bounds.
2236while test "x$ac_lo" != "x$ac_hi"; do
2237 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h. */
2240$4
2241int
74091dd4 2242main (void)
ac50fbac
CR
2243{
2244static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2245test_array [0] = 0;
2246return test_array [0];
b80f6443 2247
ac50fbac
CR
2248 ;
2249 return 0;
2250}
2251_ACEOF
74091dd4
CR
2252if ac_fn_c_try_compile "$LINENO"
2253then :
ac50fbac 2254 ac_hi=$ac_mid
74091dd4 2255else $as_nop
ac50fbac
CR
2256 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2257fi
74091dd4 2258rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac
CR
2259done
2260case $ac_lo in #((
2261?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2262'') ac_retval=1 ;;
2263esac
2264 else
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266/* end confdefs.h. */
2267$4
74091dd4
CR
2268static long int longval (void) { return $2; }
2269static unsigned long int ulongval (void) { return $2; }
ac50fbac
CR
2270#include <stdio.h>
2271#include <stdlib.h>
2272int
74091dd4 2273main (void)
ac50fbac 2274{
b80f6443 2275
ac50fbac
CR
2276 FILE *f = fopen ("conftest.val", "w");
2277 if (! f)
2278 return 1;
2279 if (($2) < 0)
2280 {
2281 long int i = longval ();
2282 if (i != ($2))
2283 return 1;
2284 fprintf (f, "%ld", i);
2285 }
2286 else
2287 {
2288 unsigned long int i = ulongval ();
2289 if (i != ($2))
2290 return 1;
2291 fprintf (f, "%lu", i);
2292 }
2293 /* Do not output a trailing newline, as this causes \r\n confusion
2294 on some platforms. */
2295 return ferror (f) || fclose (f) != 0;
b80f6443 2296
ac50fbac
CR
2297 ;
2298 return 0;
2299}
2300_ACEOF
74091dd4
CR
2301if ac_fn_c_try_run "$LINENO"
2302then :
ac50fbac 2303 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
74091dd4 2304else $as_nop
ac50fbac
CR
2305 ac_retval=1
2306fi
2307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2308 conftest.$ac_objext conftest.beam conftest.$ac_ext
2309rm -f conftest.val
b80f6443 2310
ac50fbac
CR
2311 fi
2312 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2313 as_fn_set_status $ac_retval
b80f6443 2314
ac50fbac 2315} # ac_fn_c_compute_int
b80f6443 2316
ac50fbac
CR
2317# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2318# ----------------------------------------------------
2319# Tries to find if the field MEMBER exists in type AGGR, after including
2320# INCLUDES, setting cache variable VAR accordingly.
2321ac_fn_c_check_member ()
2322{
2323 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
74091dd4
CR
2324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2325printf %s "checking for $2.$3... " >&6; }
2326if eval test \${$4+y}
2327then :
2328 printf %s "(cached) " >&6
2329else $as_nop
ac50fbac
CR
2330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h. */
2332$5
2333int
74091dd4 2334main (void)
ac50fbac
CR
2335{
2336static $2 ac_aggr;
2337if (ac_aggr.$3)
2338return 0;
2339 ;
2340 return 0;
2341}
2342_ACEOF
74091dd4
CR
2343if ac_fn_c_try_compile "$LINENO"
2344then :
ac50fbac 2345 eval "$4=yes"
74091dd4 2346else $as_nop
ac50fbac
CR
2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h. */
2349$5
2350int
74091dd4 2351main (void)
ac50fbac
CR
2352{
2353static $2 ac_aggr;
2354if (sizeof ac_aggr.$3)
2355return 0;
2356 ;
2357 return 0;
2358}
2359_ACEOF
74091dd4
CR
2360if ac_fn_c_try_compile "$LINENO"
2361then :
ac50fbac 2362 eval "$4=yes"
74091dd4 2363else $as_nop
ac50fbac 2364 eval "$4=no"
3185942a 2365fi
74091dd4 2366rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a 2367fi
74091dd4 2368rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a 2369fi
ac50fbac 2370eval ac_res=\$$4
74091dd4
CR
2371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2372printf "%s\n" "$ac_res" >&6; }
ac50fbac 2373 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
d166f048 2374
ac50fbac 2375} # ac_fn_c_check_member
74091dd4
CR
2376ac_configure_args_raw=
2377for ac_arg
2378do
2379 case $ac_arg in
2380 *\'*)
2381 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2382 esac
2383 as_fn_append ac_configure_args_raw " '$ac_arg'"
2384done
2385
2386case $ac_configure_args_raw in
2387 *$as_nl*)
2388 ac_safe_unquote= ;;
2389 *)
2390 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2391 ac_unsafe_a="$ac_unsafe_z#~"
2392 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2393 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2394esac
2395
ac50fbac
CR
2396cat >config.log <<_ACEOF
2397This file contains any messages produced by compilers while
2398running configure, to aid debugging if configure makes a mistake.
3185942a 2399
74091dd4
CR
2400It was created by bash $as_me 5.2-release, which was
2401generated by GNU Autoconf 2.71. Invocation command line was
3185942a 2402
74091dd4 2403 $ $0$ac_configure_args_raw
d166f048 2404
ac50fbac
CR
2405_ACEOF
2406exec 5>>config.log
2407{
2408cat <<_ASUNAME
2409## --------- ##
2410## Platform. ##
2411## --------- ##
3185942a 2412
ac50fbac
CR
2413hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2414uname -m = `(uname -m) 2>/dev/null || echo unknown`
2415uname -r = `(uname -r) 2>/dev/null || echo unknown`
2416uname -s = `(uname -s) 2>/dev/null || echo unknown`
2417uname -v = `(uname -v) 2>/dev/null || echo unknown`
3185942a 2418
ac50fbac
CR
2419/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2420/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
ccc6cda3 2421
ac50fbac
CR
2422/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2423/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2424/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2425/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2426/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2427/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2428/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
f73dda09 2429
ac50fbac 2430_ASUNAME
f73dda09 2431
ac50fbac
CR
2432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2433for as_dir in $PATH
2434do
2435 IFS=$as_save_IFS
74091dd4
CR
2436 case $as_dir in #(((
2437 '') as_dir=./ ;;
2438 */) ;;
2439 *) as_dir=$as_dir/ ;;
2440 esac
2441 printf "%s\n" "PATH: $as_dir"
ac50fbac
CR
2442 done
2443IFS=$as_save_IFS
bb70624e 2444
ac50fbac 2445} >&5
ccc6cda3 2446
ac50fbac 2447cat >&5 <<_ACEOF
7117c2d2 2448
ccc6cda3 2449
ac50fbac
CR
2450## ----------- ##
2451## Core tests. ##
2452## ----------- ##
d166f048 2453
b80f6443 2454_ACEOF
ccc6cda3 2455
d166f048 2456
ac50fbac
CR
2457# Keep a trace of the command line.
2458# Strip out --no-create and --no-recursion so they do not pile up.
2459# Strip out --silent because we don't want to record it for future runs.
2460# Also quote any args containing shell meta-characters.
2461# Make two passes to allow for proper duplicate-argument suppression.
2462ac_configure_args=
2463ac_configure_args0=
2464ac_configure_args1=
2465ac_must_keep_next=false
2466for ac_pass in 1 2
2467do
2468 for ac_arg
2469 do
2470 case $ac_arg in
2471 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2472 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2473 | -silent | --silent | --silen | --sile | --sil)
2474 continue ;;
2475 *\'*)
74091dd4 2476 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
ac50fbac
CR
2477 esac
2478 case $ac_pass in
2479 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2480 2)
2481 as_fn_append ac_configure_args1 " '$ac_arg'"
2482 if test $ac_must_keep_next = true; then
2483 ac_must_keep_next=false # Got value, back to normal.
2484 else
2485 case $ac_arg in
2486 *=* | --config-cache | -C | -disable-* | --disable-* \
2487 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2488 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2489 | -with-* | --with-* | -without-* | --without-* | --x)
2490 case "$ac_configure_args0 " in
2491 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2492 esac
2493 ;;
2494 -* ) ac_must_keep_next=true ;;
2495 esac
2496 fi
2497 as_fn_append ac_configure_args " '$ac_arg'"
2498 ;;
2499 esac
2500 done
2501done
2502{ ac_configure_args0=; unset ac_configure_args0;}
2503{ ac_configure_args1=; unset ac_configure_args1;}
b80f6443 2504
ac50fbac
CR
2505# When interrupted or exit'd, cleanup temporary files, and complete
2506# config.log. We remove comments because anyway the quotes in there
2507# would cause problems or look ugly.
2508# WARNING: Use '\'' to represent an apostrophe within the trap.
2509# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2510trap 'exit_status=$?
74091dd4
CR
2511 # Sanitize IFS.
2512 IFS=" "" $as_nl"
ac50fbac
CR
2513 # Save into config.log some information that might help in debugging.
2514 {
2515 echo
ccc6cda3 2516
74091dd4 2517 printf "%s\n" "## ---------------- ##
ac50fbac
CR
2518## Cache variables. ##
2519## ---------------- ##"
2520 echo
2521 # The following way of writing the cache mishandles newlines in values,
2522(
2523 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2524 eval ac_val=\$$ac_var
2525 case $ac_val in #(
2526 *${as_nl}*)
2527 case $ac_var in #(
74091dd4
CR
2528 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2529printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
ac50fbac
CR
2530 esac
2531 case $ac_var in #(
2532 _ | IFS | as_nl) ;; #(
2533 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2534 *) { eval $ac_var=; unset $ac_var;} ;;
2535 esac ;;
2536 esac
2537 done
2538 (set) 2>&1 |
2539 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2540 *${as_nl}ac_space=\ *)
2541 sed -n \
2542 "s/'\''/'\''\\\\'\'''\''/g;
2543 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2544 ;; #(
2545 *)
2546 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2547 ;;
2548 esac |
2549 sort
2550)
2551 echo
cce855bc 2552
74091dd4 2553 printf "%s\n" "## ----------------- ##
ac50fbac
CR
2554## Output variables. ##
2555## ----------------- ##"
2556 echo
2557 for ac_var in $ac_subst_vars
2558 do
2559 eval ac_val=\$$ac_var
2560 case $ac_val in
74091dd4 2561 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
ac50fbac 2562 esac
74091dd4 2563 printf "%s\n" "$ac_var='\''$ac_val'\''"
ac50fbac
CR
2564 done | sort
2565 echo
ccc6cda3 2566
ac50fbac 2567 if test -n "$ac_subst_files"; then
74091dd4 2568 printf "%s\n" "## ------------------- ##
ac50fbac
CR
2569## File substitutions. ##
2570## ------------------- ##"
2571 echo
2572 for ac_var in $ac_subst_files
2573 do
2574 eval ac_val=\$$ac_var
2575 case $ac_val in
74091dd4 2576 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
ac50fbac 2577 esac
74091dd4 2578 printf "%s\n" "$ac_var='\''$ac_val'\''"
ac50fbac
CR
2579 done | sort
2580 echo
2581 fi
3185942a 2582
ac50fbac 2583 if test -s confdefs.h; then
74091dd4 2584 printf "%s\n" "## ----------- ##
ac50fbac
CR
2585## confdefs.h. ##
2586## ----------- ##"
2587 echo
2588 cat confdefs.h
2589 echo
2590 fi
2591 test "$ac_signal" != 0 &&
74091dd4
CR
2592 printf "%s\n" "$as_me: caught signal $ac_signal"
2593 printf "%s\n" "$as_me: exit $exit_status"
ac50fbac
CR
2594 } >&5
2595 rm -f core *.core core.conftest.* &&
2596 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2597 exit $exit_status
2598' 0
2599for ac_signal in 1 2 13 15; do
2600 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2601done
2602ac_signal=0
ccc6cda3 2603
ac50fbac
CR
2604# confdefs.h avoids OS command line length limits that DEFS can exceed.
2605rm -f -r conftest* confdefs.h
ccc6cda3 2606
74091dd4 2607printf "%s\n" "/* confdefs.h */" > confdefs.h
3185942a 2608
ac50fbac 2609# Predefined preprocessor variables.
3185942a 2610
74091dd4 2611printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3185942a 2612
74091dd4 2613printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3185942a 2614
74091dd4 2615printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3185942a 2616
74091dd4 2617printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3185942a 2618
74091dd4 2619printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3185942a 2620
74091dd4 2621printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3185942a 2622
3185942a 2623
ac50fbac
CR
2624# Let the site file select an alternate cache file if it wants to.
2625# Prefer an explicitly selected file to automatically selected ones.
ac50fbac 2626if test -n "$CONFIG_SITE"; then
74091dd4 2627 ac_site_files="$CONFIG_SITE"
ac50fbac 2628elif test "x$prefix" != xNONE; then
74091dd4 2629 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
ac50fbac 2630else
74091dd4 2631 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
3185942a 2632fi
74091dd4
CR
2633
2634for ac_site_file in $ac_site_files
ac50fbac 2635do
74091dd4
CR
2636 case $ac_site_file in #(
2637 */*) :
2638 ;; #(
2639 *) :
2640 ac_site_file=./$ac_site_file ;;
2641esac
2642 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2644printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
ac50fbac
CR
2645 sed 's/^/| /' "$ac_site_file" >&5
2646 . "$ac_site_file" \
74091dd4
CR
2647 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2648printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
2649as_fn_error $? "failed to load site script $ac_site_file
2650See \`config.log' for more details" "$LINENO" 5; }
2651 fi
2652done
3185942a 2653
ac50fbac
CR
2654if test -r "$cache_file"; then
2655 # Some versions of bash will fail to source /dev/null (special files
2656 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2657 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
74091dd4
CR
2658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2659printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
ac50fbac
CR
2660 case $cache_file in
2661 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2662 *) . "./$cache_file";;
2663 esac
2664 fi
2665else
74091dd4
CR
2666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2667printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
ac50fbac 2668 >$cache_file
3185942a
JA
2669fi
2670
74091dd4
CR
2671# Test code for whether the C compiler supports C89 (global declarations)
2672ac_c_conftest_c89_globals='
2673/* Does the compiler advertise C89 conformance?
2674 Do not test the value of __STDC__, because some compilers set it to 0
2675 while being otherwise adequately conformant. */
2676#if !defined __STDC__
2677# error "Compiler does not advertise C89 conformance"
2678#endif
2679
2680#include <stddef.h>
2681#include <stdarg.h>
2682struct stat;
2683/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2684struct buf { int x; };
2685struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2686static char *e (p, i)
2687 char **p;
2688 int i;
2689{
2690 return p[i];
2691}
2692static char *f (char * (*g) (char **, int), char **p, ...)
2693{
2694 char *s;
2695 va_list v;
2696 va_start (v,p);
2697 s = g (p, va_arg (v,int));
2698 va_end (v);
2699 return s;
2700}
2701
2702/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2703 function prototypes and stuff, but not \xHH hex character constants.
2704 These do not provoke an error unfortunately, instead are silently treated
2705 as an "x". The following induces an error, until -std is added to get
2706 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2707 array size at least. It is necessary to write \x00 == 0 to get something
2708 that is true only with -std. */
2709int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2710
2711/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2712 inside strings and character constants. */
2713#define FOO(x) '\''x'\''
2714int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2715
2716int test (int i, double x);
2717struct s1 {int (*f) (int a);};
2718struct s2 {int (*f) (double a);};
2719int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2720 int, int);'
2721
2722# Test code for whether the C compiler supports C89 (body of main).
2723ac_c_conftest_c89_main='
2724ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2725'
2726
2727# Test code for whether the C compiler supports C99 (global declarations)
2728ac_c_conftest_c99_globals='
2729// Does the compiler advertise C99 conformance?
2730#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2731# error "Compiler does not advertise C99 conformance"
2732#endif
2733
2734#include <stdbool.h>
2735extern int puts (const char *);
2736extern int printf (const char *, ...);
2737extern int dprintf (int, const char *, ...);
2738extern void *malloc (size_t);
2739
2740// Check varargs macros. These examples are taken from C99 6.10.3.5.
2741// dprintf is used instead of fprintf to avoid needing to declare
2742// FILE and stderr.
2743#define debug(...) dprintf (2, __VA_ARGS__)
2744#define showlist(...) puts (#__VA_ARGS__)
2745#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2746static void
2747test_varargs_macros (void)
2748{
2749 int x = 1234;
2750 int y = 5678;
2751 debug ("Flag");
2752 debug ("X = %d\n", x);
2753 showlist (The first, second, and third items.);
2754 report (x>y, "x is %d but y is %d", x, y);
2755}
2756
2757// Check long long types.
2758#define BIG64 18446744073709551615ull
2759#define BIG32 4294967295ul
2760#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2761#if !BIG_OK
2762 #error "your preprocessor is broken"
2763#endif
2764#if BIG_OK
2765#else
2766 #error "your preprocessor is broken"
2767#endif
2768static long long int bignum = -9223372036854775807LL;
2769static unsigned long long int ubignum = BIG64;
2770
2771struct incomplete_array
2772{
2773 int datasize;
2774 double data[];
2775};
2776
2777struct named_init {
2778 int number;
2779 const wchar_t *name;
2780 double average;
2781};
2782
2783typedef const char *ccp;
2784
2785static inline int
2786test_restrict (ccp restrict text)
2787{
2788 // See if C++-style comments work.
2789 // Iterate through items via the restricted pointer.
2790 // Also check for declarations in for loops.
2791 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2792 continue;
2793 return 0;
2794}
2795
2796// Check varargs and va_copy.
2797static bool
2798test_varargs (const char *format, ...)
2799{
2800 va_list args;
2801 va_start (args, format);
2802 va_list args_copy;
2803 va_copy (args_copy, args);
2804
2805 const char *str = "";
2806 int number = 0;
2807 float fnumber = 0;
2808
2809 while (*format)
2810 {
2811 switch (*format++)
2812 {
2813 case '\''s'\'': // string
2814 str = va_arg (args_copy, const char *);
2815 break;
2816 case '\''d'\'': // int
2817 number = va_arg (args_copy, int);
2818 break;
2819 case '\''f'\'': // float
2820 fnumber = va_arg (args_copy, double);
2821 break;
2822 default:
2823 break;
2824 }
2825 }
2826 va_end (args_copy);
2827 va_end (args);
2828
2829 return *str && number && fnumber;
2830}
2831'
2832
2833# Test code for whether the C compiler supports C99 (body of main).
2834ac_c_conftest_c99_main='
2835 // Check bool.
2836 _Bool success = false;
2837 success |= (argc != 0);
2838
2839 // Check restrict.
2840 if (test_restrict ("String literal") == 0)
2841 success = true;
2842 char *restrict newvar = "Another string";
2843
2844 // Check varargs.
2845 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2846 test_varargs_macros ();
2847
2848 // Check flexible array members.
2849 struct incomplete_array *ia =
2850 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2851 ia->datasize = 10;
2852 for (int i = 0; i < ia->datasize; ++i)
2853 ia->data[i] = i * 1.234;
2854
2855 // Check named initializers.
2856 struct named_init ni = {
2857 .number = 34,
2858 .name = L"Test wide string",
2859 .average = 543.34343,
2860 };
2861
2862 ni.number = 58;
2863
2864 int dynamic_array[ni.number];
2865 dynamic_array[0] = argv[0][0];
2866 dynamic_array[ni.number - 1] = 543;
2867
2868 // work around unused variable warnings
2869 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2870 || dynamic_array[ni.number - 1] != 543);
2871'
2872
2873# Test code for whether the C compiler supports C11 (global declarations)
2874ac_c_conftest_c11_globals='
2875// Does the compiler advertise C11 conformance?
2876#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2877# error "Compiler does not advertise C11 conformance"
2878#endif
2879
2880// Check _Alignas.
2881char _Alignas (double) aligned_as_double;
2882char _Alignas (0) no_special_alignment;
2883extern char aligned_as_int;
2884char _Alignas (0) _Alignas (int) aligned_as_int;
2885
2886// Check _Alignof.
2887enum
2888{
2889 int_alignment = _Alignof (int),
2890 int_array_alignment = _Alignof (int[100]),
2891 char_alignment = _Alignof (char)
2892};
2893_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2894
2895// Check _Noreturn.
2896int _Noreturn does_not_return (void) { for (;;) continue; }
2897
2898// Check _Static_assert.
2899struct test_static_assert
2900{
2901 int x;
2902 _Static_assert (sizeof (int) <= sizeof (long int),
2903 "_Static_assert does not work in struct");
2904 long int y;
2905};
2906
2907// Check UTF-8 literals.
2908#define u8 syntax error!
2909char const utf8_literal[] = u8"happens to be ASCII" "another string";
2910
2911// Check duplicate typedefs.
2912typedef long *long_ptr;
2913typedef long int *long_ptr;
2914typedef long_ptr long_ptr;
2915
2916// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2917struct anonymous
2918{
2919 union {
2920 struct { int i; int j; };
2921 struct { int k; long int l; } w;
2922 };
2923 int m;
2924} v1;
2925'
2926
2927# Test code for whether the C compiler supports C11 (body of main).
2928ac_c_conftest_c11_main='
2929 _Static_assert ((offsetof (struct anonymous, i)
2930 == offsetof (struct anonymous, w.k)),
2931 "Anonymous union alignment botch");
2932 v1.i = 2;
2933 v1.w.k = 5;
2934 ok |= v1.i != 5;
2935'
2936
2937# Test code for whether the C compiler supports C11 (complete).
2938ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2939${ac_c_conftest_c99_globals}
2940${ac_c_conftest_c11_globals}
2941
2942int
2943main (int argc, char **argv)
2944{
2945 int ok = 0;
2946 ${ac_c_conftest_c89_main}
2947 ${ac_c_conftest_c99_main}
2948 ${ac_c_conftest_c11_main}
2949 return ok;
2950}
2951"
2952
2953# Test code for whether the C compiler supports C99 (complete).
2954ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2955${ac_c_conftest_c99_globals}
2956
2957int
2958main (int argc, char **argv)
2959{
2960 int ok = 0;
2961 ${ac_c_conftest_c89_main}
2962 ${ac_c_conftest_c99_main}
2963 return ok;
2964}
2965"
2966
2967# Test code for whether the C compiler supports C89 (complete).
2968ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2969
2970int
2971main (int argc, char **argv)
2972{
2973 int ok = 0;
2974 ${ac_c_conftest_c89_main}
2975 return ok;
2976}
2977"
2978
2979as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2980as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2981as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2982as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2983as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2984as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2985as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2986as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2987as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2988as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
2989as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
8868edaf 2990gt_needs="$gt_needs need-ngettext"
74091dd4
CR
2991as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
2992as_fn_append ac_func_c_list " getpagesize HAVE_GETPAGESIZE"
2993as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
2994as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE"
2995as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
2996as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
2997as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2998as_fn_append ac_func_c_list " alarm HAVE_ALARM"
2999as_fn_append ac_func_c_list " fpurge HAVE_FPURGE"
3000as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE"
3001as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
3002as_fn_append ac_func_c_list " vsnprintf HAVE_VSNPRINTF"
3003
3004# Auxiliary files required by this configure script.
3005ac_aux_files="config.rpath install-sh config.guess config.sub"
3006
3007# Locations in which to look for auxiliary files.
3008ac_aux_dir_candidates="${srcdir}/./support"
3009
3010# Search for a directory containing all of the required auxiliary files,
3011# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3012# If we don't find one directory that contains all the files we need,
3013# we report the set of missing files from the *first* directory in
3014# $ac_aux_dir_candidates and give up.
3015ac_missing_aux_files=""
3016ac_first_candidate=:
3017printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3019as_found=false
3020for as_dir in $ac_aux_dir_candidates
3021do
3022 IFS=$as_save_IFS
3023 case $as_dir in #(((
3024 '') as_dir=./ ;;
3025 */) ;;
3026 *) as_dir=$as_dir/ ;;
3027 esac
3028 as_found=:
3029
3030 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
3031 ac_aux_dir_found=yes
3032 ac_install_sh=
3033 for ac_aux in $ac_aux_files
3034 do
3035 # As a special case, if "install-sh" is required, that requirement
3036 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3037 # and $ac_install_sh is set appropriately for whichever one is found.
3038 if test x"$ac_aux" = x"install-sh"
3039 then
3040 if test -f "${as_dir}install-sh"; then
3041 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
3042 ac_install_sh="${as_dir}install-sh -c"
3043 elif test -f "${as_dir}install.sh"; then
3044 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
3045 ac_install_sh="${as_dir}install.sh -c"
3046 elif test -f "${as_dir}shtool"; then
3047 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
3048 ac_install_sh="${as_dir}shtool install -c"
3049 else
3050 ac_aux_dir_found=no
3051 if $ac_first_candidate; then
3052 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3053 else
3054 break
3055 fi
3056 fi
3057 else
3058 if test -f "${as_dir}${ac_aux}"; then
3059 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
3060 else
3061 ac_aux_dir_found=no
3062 if $ac_first_candidate; then
3063 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3064 else
3065 break
3066 fi
3067 fi
3068 fi
3069 done
3070 if test "$ac_aux_dir_found" = yes; then
3071 ac_aux_dir="$as_dir"
3072 break
3073 fi
3074 ac_first_candidate=false
3075
3076 as_found=false
3077done
3078IFS=$as_save_IFS
3079if $as_found
3080then :
3081
3082else $as_nop
3083 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3084fi
3085
3086
3087# These three variables are undocumented and unsupported,
3088# and are intended to be withdrawn in a future Autoconf release.
3089# They can cause serious problems if a builder's source tree is in a directory
3090# whose full name contains unusual characters.
3091if test -f "${ac_aux_dir}config.guess"; then
3092 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3093fi
3094if test -f "${ac_aux_dir}config.sub"; then
3095 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3096fi
3097if test -f "$ac_aux_dir/configure"; then
3098 ac_configure="$SHELL ${ac_aux_dir}configure"
3099fi
3100
ac50fbac
CR
3101# Check that the precious variables saved in the cache have kept the same
3102# value.
3103ac_cache_corrupted=false
3104for ac_var in $ac_precious_vars; do
3105 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3106 eval ac_new_set=\$ac_env_${ac_var}_set
3107 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3108 eval ac_new_val=\$ac_env_${ac_var}_value
3109 case $ac_old_set,$ac_new_set in
3110 set,)
74091dd4
CR
3111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3112printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac50fbac
CR
3113 ac_cache_corrupted=: ;;
3114 ,set)
74091dd4
CR
3115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3116printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac50fbac
CR
3117 ac_cache_corrupted=: ;;
3118 ,);;
3119 *)
3120 if test "x$ac_old_val" != "x$ac_new_val"; then
3121 # differences in whitespace do not lead to failure.
3122 ac_old_val_w=`echo x $ac_old_val`
3123 ac_new_val_w=`echo x $ac_new_val`
3124 if test "$ac_old_val_w" != "$ac_new_val_w"; then
74091dd4
CR
3125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3126printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ac50fbac
CR
3127 ac_cache_corrupted=:
3128 else
74091dd4
CR
3129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3130printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
ac50fbac
CR
3131 eval $ac_var=\$ac_old_val
3132 fi
74091dd4
CR
3133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3134printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3136printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
ac50fbac
CR
3137 fi;;
3138 esac
3139 # Pass precious variables to config.status.
3140 if test "$ac_new_set" = set; then
3141 case $ac_new_val in
74091dd4 3142 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
ac50fbac
CR
3143 *) ac_arg=$ac_var=$ac_new_val ;;
3144 esac
3145 case " $ac_configure_args " in
3146 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3147 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3148 esac
3149 fi
3150done
3151if $ac_cache_corrupted; then
74091dd4
CR
3152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3153printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3155printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3156 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3157 and start over" "$LINENO" 5
3185942a 3158fi
ac50fbac
CR
3159## -------------------- ##
3160## Main body of script. ##
3161## -------------------- ##
3185942a 3162
ac50fbac
CR
3163ac_ext=c
3164ac_cpp='$CPP $CPPFLAGS'
3165ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3166ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3167ac_compiler_gnu=$ac_cv_c_compiler_gnu
3185942a 3168
3185942a 3169
3185942a 3170
0001803f 3171
3185942a 3172
3185942a 3173
3185942a 3174
ac50fbac 3175ac_config_headers="$ac_config_headers config.h"
3185942a 3176
3185942a 3177
74091dd4 3178BASHVERS=5.2
ac50fbac 3179RELSTATUS=release
3185942a 3180
ac50fbac 3181case "$RELSTATUS" in
a0c0a00f 3182alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
ac50fbac
CR
3183*) DEBUG= MALLOC_DEBUG= ;;
3184esac
3185942a 3185
3185942a 3186
74091dd4
CR
3187
3188
3189 # Make sure we can run config.sub.
3190$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
3191 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
3192
3193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3194printf %s "checking build system type... " >&6; }
3195if test ${ac_cv_build+y}
3196then :
3197 printf %s "(cached) " >&6
3198else $as_nop
ac50fbac
CR
3199 ac_build_alias=$build_alias
3200test "x$ac_build_alias" = x &&
74091dd4 3201 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
ac50fbac
CR
3202test "x$ac_build_alias" = x &&
3203 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
74091dd4
CR
3204ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
3205 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
3185942a 3206
3185942a 3207fi
74091dd4
CR
3208{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3209printf "%s\n" "$ac_cv_build" >&6; }
ac50fbac
CR
3210case $ac_cv_build in
3211*-*-*) ;;
3212*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3213esac
3214build=$ac_cv_build
3215ac_save_IFS=$IFS; IFS='-'
3216set x $ac_cv_build
3217shift
3218build_cpu=$1
3219build_vendor=$2
3220shift; shift
3221# Remember, the first character of IFS is used to create $*,
3222# except with old shells:
3223build_os=$*
3224IFS=$ac_save_IFS
3225case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3185942a 3226
3185942a 3227
74091dd4
CR
3228{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3229printf %s "checking host system type... " >&6; }
3230if test ${ac_cv_host+y}
3231then :
3232 printf %s "(cached) " >&6
3233else $as_nop
ac50fbac
CR
3234 if test "x$host_alias" = x; then
3235 ac_cv_host=$ac_cv_build
3236else
74091dd4
CR
3237 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
3238 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
3185942a
JA
3239fi
3240
3185942a 3241fi
74091dd4
CR
3242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3243printf "%s\n" "$ac_cv_host" >&6; }
ac50fbac
CR
3244case $ac_cv_host in
3245*-*-*) ;;
3246*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3247esac
3248host=$ac_cv_host
3249ac_save_IFS=$IFS; IFS='-'
3250set x $ac_cv_host
3251shift
3252host_cpu=$1
3253host_vendor=$2
3254shift; shift
3255# Remember, the first character of IFS is used to create $*,
3256# except with old shells:
3257host_os=$*
3258IFS=$ac_save_IFS
3259case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3185942a 3260
ccc6cda3 3261
3185942a 3262
3185942a 3263
ac50fbac 3264opt_bash_malloc=yes
ac50fbac
CR
3265opt_afs=no
3266opt_curses=no
3267opt_with_installed_readline=no
3185942a 3268
ac50fbac 3269#htmldir=
3185942a 3270
ac50fbac 3271case "${host_cpu}-${host_os}" in
d233b485 3272# mostly obsolete platforms
ac50fbac
CR
3273alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux
3274*[Cc]ray*-*) opt_bash_malloc=no ;; # Crays
3275*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines
d233b485 3276*-dgux*) opt_bash_malloc=no ;; # DG/UX machines
ac50fbac 3277sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2
ac50fbac 3278m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
d233b485
CR
3279*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
3280*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
3281*-beos*) opt_bash_malloc=no ;; # they say it's suitable
3282# These need additional investigation
ac50fbac 3283sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
ac50fbac 3284*-aix*) opt_bash_malloc=no ;; # AIX machines
d233b485 3285*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
8868edaf
CR
3286# These lack a working sbrk(2)
3287aarch64-freebsd*) opt_bash_malloc=no ;;
3288riscv*-freebsd*) opt_bash_malloc=no ;;
d233b485 3289# Mach-derived systems have a ton of extra malloc functions and lack sbrk(2)
ac50fbac
CR
3290*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
3291*-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep
3292*-macos*) opt_bash_malloc=no ;; # Apple MacOS X
3293*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X)
3294*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X)
ac50fbac 3295*-machten4) opt_bash_malloc=no ;; # MachTen 4.x
d233b485
CR
3296# Niche or non-mainstream-shell-user systems
3297*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x
ac50fbac
CR
3298*-nsk*) opt_bash_malloc=no ;; # HP NonStop
3299*-haiku*) opt_bash_malloc=no ;; # Haiku OS
8868edaf 3300*-genode*) opt_bash_malloc=no ;; # Genode has no sbrk
ac50fbac 3301esac
b72432fd 3302
ac50fbac
CR
3303# memory scrambling on free()
3304case "${host_os}" in
3305sco3.2v5*|sco3.2v4*) opt_memscramble=no ;;
3306*) opt_memscramble=yes ;;
3307esac
b80f6443
JA
3308
3309
ccc6cda3 3310
ccc6cda3 3311
ac50fbac 3312# Check whether --with-afs was given.
74091dd4
CR
3313if test ${with_afs+y}
3314then :
ac50fbac 3315 withval=$with_afs; opt_afs=$withval
ccc6cda3 3316fi
ccc6cda3 3317
ccc6cda3 3318
ac50fbac 3319# Check whether --with-bash-malloc was given.
74091dd4
CR
3320if test ${with_bash_malloc+y}
3321then :
ac50fbac 3322 withval=$with_bash_malloc; opt_bash_malloc=$withval
ccc6cda3 3323fi
ccc6cda3 3324
ccc6cda3 3325
ac50fbac 3326# Check whether --with-curses was given.
74091dd4
CR
3327if test ${with_curses+y}
3328then :
ac50fbac 3329 withval=$with_curses; opt_curses=$withval
ccc6cda3 3330fi
ccc6cda3 3331
ac50fbac
CR
3332
3333# Check whether --with-gnu-malloc was given.
74091dd4
CR
3334if test ${with_gnu_malloc+y}
3335then :
ac50fbac 3336 withval=$with_gnu_malloc; opt_bash_malloc=$withval
ccc6cda3 3337fi
ccc6cda3 3338
ac50fbac
CR
3339
3340# Check whether --with-installed-readline was given.
74091dd4
CR
3341if test ${with_installed_readline+y}
3342then :
ac50fbac 3343 withval=$with_installed_readline; opt_with_installed_readline=$withval
ccc6cda3 3344fi
ccc6cda3 3345
ac50fbac 3346
ac50fbac
CR
3347if test "$opt_bash_malloc" = yes; then
3348 MALLOC_TARGET=malloc
3349 MALLOC_SRC=malloc.c
3350
3351 MALLOC_LIB='-lmalloc'
3352 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
3353 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
3354 MALLOC_DEP='$(MALLOC_LIBRARY)'
3355
74091dd4 3356 printf "%s\n" "#define USING_BASH_MALLOC 1" >>confdefs.h
ac50fbac
CR
3357
3358else
3359 MALLOC_LIB=
3360 MALLOC_LIBRARY=
3361 MALLOC_LDFLAGS=
3362 MALLOC_DEP=
ccc6cda3 3363fi
ccc6cda3 3364
ac50fbac 3365if test "$opt_afs" = yes; then
74091dd4 3366 printf "%s\n" "#define AFS 1" >>confdefs.h
95732b49 3367
cce855bc 3368fi
cce855bc 3369
ac50fbac
CR
3370if test "$opt_curses" = yes; then
3371 prefer_curses=yes
0001803f 3372fi
0001803f 3373
ac50fbac
CR
3374if test -z "${DEBUGGER_START_FILE}"; then
3375 DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc'
3376fi
0001803f 3377
ac50fbac
CR
3378opt_minimal_config=no
3379
3380opt_job_control=yes
3381opt_alias=yes
3382opt_readline=yes
3383opt_history=yes
3384opt_bang_history=yes
3385opt_dirstack=yes
3386opt_restricted=yes
3387opt_process_subst=yes
3388opt_prompt_decoding=yes
3389opt_select=yes
3390opt_help=yes
3391opt_array_variables=yes
3392opt_dparen_arith=yes
3393opt_extended_glob=yes
3394opt_brace_expansion=yes
3395opt_disabled_builtins=no
3396opt_command_timing=yes
3397opt_xpg_echo=no
3398opt_strict_posix=no
3399opt_cond_command=yes
3400opt_cond_regexp=yes
3401opt_coproc=yes
3402opt_arith_for_command=yes
3403opt_net_redirs=yes
3404opt_progcomp=yes
3405opt_separate_help=no
3406opt_multibyte=yes
3407opt_debugger=yes
3408opt_single_longdoc_strings=yes
3409opt_casemod_attrs=yes
3410opt_casemod_expansions=yes
3411opt_extglob_default=no
3412opt_dircomplete_expand_default=no
d233b485 3413opt_globascii_default=yes
a0c0a00f 3414opt_function_import=yes
d233b485 3415opt_dev_fd_stat_broken=no
74091dd4
CR
3416opt_alt_array_impl=no
3417opt_translatable_strings=yes
3418
3419ARRAY_O=array.o
ac50fbac
CR
3420
3421opt_static_link=no
3422opt_profiling=no
3423
3424# Check whether --enable-minimal-config was given.
74091dd4
CR
3425if test ${enable_minimal_config+y}
3426then :
ac50fbac 3427 enableval=$enable_minimal_config; opt_minimal_config=$enableval
cce855bc 3428fi
b80f6443 3429
ac50fbac
CR
3430
3431if test $opt_minimal_config = yes; then
3432 opt_job_control=no opt_alias=no opt_readline=no
3433 opt_history=no opt_bang_history=no opt_dirstack=no
3434 opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
3435 opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
3436 opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
3437 opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no
3438 opt_net_redirs=no opt_progcomp=no opt_separate_help=no
3439 opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
3440 opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
74091dd4 3441 opt_translatable_strings=no
d233b485 3442 opt_globascii_default=yes
b80f6443 3443fi
cce855bc 3444
ac50fbac 3445# Check whether --enable-alias was given.
74091dd4
CR
3446if test ${enable_alias+y}
3447then :
ac50fbac 3448 enableval=$enable_alias; opt_alias=$enableval
3185942a 3449fi
3185942a 3450
74091dd4
CR
3451# Check whether --enable-alt-array-implementation was given.
3452if test ${enable_alt_array_implementation+y}
3453then :
3454 enableval=$enable_alt_array_implementation; opt_alt_array_impl=$enableval
3455fi
3456
ac50fbac 3457# Check whether --enable-arith-for-command was given.
74091dd4
CR
3458if test ${enable_arith_for_command+y}
3459then :
ac50fbac 3460 enableval=$enable_arith_for_command; opt_arith_for_command=$enableval
bb70624e 3461fi
bb70624e 3462
ac50fbac 3463# Check whether --enable-array-variables was given.
74091dd4
CR
3464if test ${enable_array_variables+y}
3465then :
ac50fbac 3466 enableval=$enable_array_variables; opt_array_variables=$enableval
bb70624e 3467fi
bb70624e 3468
ac50fbac 3469# Check whether --enable-bang-history was given.
74091dd4
CR
3470if test ${enable_bang_history+y}
3471then :
ac50fbac 3472 enableval=$enable_bang_history; opt_bang_history=$enableval
bb70624e 3473fi
b80f6443 3474
ac50fbac 3475# Check whether --enable-brace-expansion was given.
74091dd4
CR
3476if test ${enable_brace_expansion+y}
3477then :
ac50fbac 3478 enableval=$enable_brace_expansion; opt_brace_expansion=$enableval
b80f6443 3479fi
b80f6443 3480
ac50fbac 3481# Check whether --enable-casemod-attributes was given.
74091dd4
CR
3482if test ${enable_casemod_attributes+y}
3483then :
ac50fbac 3484 enableval=$enable_casemod_attributes; opt_casemod_attrs=$enableval
b80f6443 3485fi
bb70624e 3486
ac50fbac 3487# Check whether --enable-casemod-expansions was given.
74091dd4
CR
3488if test ${enable_casemod_expansions+y}
3489then :
ac50fbac 3490 enableval=$enable_casemod_expansions; opt_casemod_expansions=$enableval
3185942a 3491fi
3185942a 3492
ac50fbac 3493# Check whether --enable-command-timing was given.
74091dd4
CR
3494if test ${enable_command_timing+y}
3495then :
ac50fbac 3496 enableval=$enable_command_timing; opt_command_timing=$enableval
3185942a 3497fi
3185942a 3498
ac50fbac 3499# Check whether --enable-cond-command was given.
74091dd4
CR
3500if test ${enable_cond_command+y}
3501then :
ac50fbac 3502 enableval=$enable_cond_command; opt_cond_command=$enableval
ccc6cda3
JA
3503fi
3504
ac50fbac 3505# Check whether --enable-cond-regexp was given.
74091dd4
CR
3506if test ${enable_cond_regexp+y}
3507then :
ac50fbac
CR
3508 enableval=$enable_cond_regexp; opt_cond_regexp=$enableval
3509fi
7117c2d2 3510
ac50fbac 3511# Check whether --enable-coprocesses was given.
74091dd4
CR
3512if test ${enable_coprocesses+y}
3513then :
ac50fbac 3514 enableval=$enable_coprocesses; opt_coproc=$enableval
7117c2d2
JA
3515fi
3516
ac50fbac 3517# Check whether --enable-debugger was given.
74091dd4
CR
3518if test ${enable_debugger+y}
3519then :
ac50fbac 3520 enableval=$enable_debugger; opt_debugger=$enableval
d166f048
JA
3521fi
3522
d233b485 3523# Check whether --enable-dev-fd-stat-broken was given.
74091dd4
CR
3524if test ${enable_dev_fd_stat_broken+y}
3525then :
d233b485
CR
3526 enableval=$enable_dev_fd_stat_broken; opt_dev_fd_stat_broken=$enableval
3527fi
3528
ac50fbac 3529# Check whether --enable-direxpand-default was given.
74091dd4
CR
3530if test ${enable_direxpand_default+y}
3531then :
ac50fbac 3532 enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval
7117c2d2 3533fi
ac50fbac
CR
3534
3535# Check whether --enable-directory-stack was given.
74091dd4
CR
3536if test ${enable_directory_stack+y}
3537then :
ac50fbac 3538 enableval=$enable_directory_stack; opt_dirstack=$enableval
95732b49
JA
3539fi
3540
ac50fbac 3541# Check whether --enable-disabled-builtins was given.
74091dd4
CR
3542if test ${enable_disabled_builtins+y}
3543then :
ac50fbac
CR
3544 enableval=$enable_disabled_builtins; opt_disabled_builtins=$enableval
3545fi
7117c2d2 3546
ac50fbac 3547# Check whether --enable-dparen-arithmetic was given.
74091dd4
CR
3548if test ${enable_dparen_arithmetic+y}
3549then :
ac50fbac
CR
3550 enableval=$enable_dparen_arithmetic; opt_dparen_arith=$enableval
3551fi
b80f6443 3552
ac50fbac 3553# Check whether --enable-extended-glob was given.
74091dd4
CR
3554if test ${enable_extended_glob+y}
3555then :
ac50fbac
CR
3556 enableval=$enable_extended_glob; opt_extended_glob=$enableval
3557fi
b80f6443 3558
ac50fbac 3559# Check whether --enable-extended-glob-default was given.
74091dd4
CR
3560if test ${enable_extended_glob_default+y}
3561then :
ac50fbac
CR
3562 enableval=$enable_extended_glob_default; opt_extglob_default=$enableval
3563fi
b80f6443 3564
a0c0a00f 3565# Check whether --enable-function-import was given.
74091dd4
CR
3566if test ${enable_function_import+y}
3567then :
a0c0a00f
CR
3568 enableval=$enable_function_import; opt_function_import=$enableval
3569fi
3570
ac50fbac 3571# Check whether --enable-glob-asciiranges-default was given.
74091dd4
CR
3572if test ${enable_glob_asciiranges_default+y}
3573then :
ac50fbac
CR
3574 enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval
3575fi
b80f6443 3576
ac50fbac 3577# Check whether --enable-help-builtin was given.
74091dd4
CR
3578if test ${enable_help_builtin+y}
3579then :
ac50fbac
CR
3580 enableval=$enable_help_builtin; opt_help=$enableval
3581fi
b80f6443 3582
ac50fbac 3583# Check whether --enable-history was given.
74091dd4
CR
3584if test ${enable_history+y}
3585then :
ac50fbac
CR
3586 enableval=$enable_history; opt_history=$enableval
3587fi
b80f6443 3588
ac50fbac 3589# Check whether --enable-job-control was given.
74091dd4
CR
3590if test ${enable_job_control+y}
3591then :
ac50fbac
CR
3592 enableval=$enable_job_control; opt_job_control=$enableval
3593fi
b80f6443 3594
ac50fbac 3595# Check whether --enable-multibyte was given.
74091dd4
CR
3596if test ${enable_multibyte+y}
3597then :
ac50fbac
CR
3598 enableval=$enable_multibyte; opt_multibyte=$enableval
3599fi
b80f6443 3600
ac50fbac 3601# Check whether --enable-net-redirections was given.
74091dd4
CR
3602if test ${enable_net_redirections+y}
3603then :
ac50fbac
CR
3604 enableval=$enable_net_redirections; opt_net_redirs=$enableval
3605fi
b80f6443 3606
ac50fbac 3607# Check whether --enable-process-substitution was given.
74091dd4
CR
3608if test ${enable_process_substitution+y}
3609then :
ac50fbac
CR
3610 enableval=$enable_process_substitution; opt_process_subst=$enableval
3611fi
b80f6443 3612
ac50fbac 3613# Check whether --enable-progcomp was given.
74091dd4
CR
3614if test ${enable_progcomp+y}
3615then :
ac50fbac
CR
3616 enableval=$enable_progcomp; opt_progcomp=$enableval
3617fi
b80f6443 3618
ac50fbac 3619# Check whether --enable-prompt-string-decoding was given.
74091dd4
CR
3620if test ${enable_prompt_string_decoding+y}
3621then :
ac50fbac
CR
3622 enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval
3623fi
b80f6443 3624
ac50fbac 3625# Check whether --enable-readline was given.
74091dd4
CR
3626if test ${enable_readline+y}
3627then :
ac50fbac
CR
3628 enableval=$enable_readline; opt_readline=$enableval
3629fi
b80f6443 3630
ac50fbac 3631# Check whether --enable-restricted was given.
74091dd4
CR
3632if test ${enable_restricted+y}
3633then :
ac50fbac
CR
3634 enableval=$enable_restricted; opt_restricted=$enableval
3635fi
b80f6443 3636
ac50fbac 3637# Check whether --enable-select was given.
74091dd4
CR
3638if test ${enable_select+y}
3639then :
ac50fbac
CR
3640 enableval=$enable_select; opt_select=$enableval
3641fi
b80f6443 3642
ac50fbac 3643# Check whether --enable-separate-helpfiles was given.
74091dd4
CR
3644if test ${enable_separate_helpfiles+y}
3645then :
ac50fbac
CR
3646 enableval=$enable_separate_helpfiles; opt_separate_help=$enableval
3647fi
b80f6443 3648
ac50fbac 3649# Check whether --enable-single-help-strings was given.
74091dd4
CR
3650if test ${enable_single_help_strings+y}
3651then :
ac50fbac
CR
3652 enableval=$enable_single_help_strings; opt_single_longdoc_strings=$enableval
3653fi
d166f048 3654
ac50fbac 3655# Check whether --enable-strict-posix-default was given.
74091dd4
CR
3656if test ${enable_strict_posix_default+y}
3657then :
ac50fbac
CR
3658 enableval=$enable_strict_posix_default; opt_strict_posix=$enableval
3659fi
3660
74091dd4
CR
3661# Check whether --enable-translatable-strings was given.
3662if test ${enable_translatable_strings+y}
3663then :
3664 enableval=$enable_translatable_strings; opt_translatable_strings=$enableval
3665fi
3666
ac50fbac 3667# Check whether --enable-usg-echo-default was given.
74091dd4
CR
3668if test ${enable_usg_echo_default+y}
3669then :
ac50fbac
CR
3670 enableval=$enable_usg_echo_default; opt_xpg_echo=$enableval
3671fi
3672
3673# Check whether --enable-xpg-echo-default was given.
74091dd4
CR
3674if test ${enable_xpg_echo_default+y}
3675then :
ac50fbac
CR
3676 enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval
3677fi
3678
3679
3680# Check whether --enable-mem-scramble was given.
74091dd4
CR
3681if test ${enable_mem_scramble+y}
3682then :
ac50fbac
CR
3683 enableval=$enable_mem_scramble; opt_memscramble=$enableval
3684fi
3685
3686# Check whether --enable-profiling was given.
74091dd4
CR
3687if test ${enable_profiling+y}
3688then :
ac50fbac
CR
3689 enableval=$enable_profiling; opt_profiling=$enableval
3690fi
3691
3692# Check whether --enable-static-link was given.
74091dd4
CR
3693if test ${enable_static_link+y}
3694then :
ac50fbac
CR
3695 enableval=$enable_static_link; opt_static_link=$enableval
3696fi
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706if test $opt_alias = yes; then
74091dd4 3707printf "%s\n" "#define ALIAS 1" >>confdefs.h
ac50fbac
CR
3708
3709fi
3710if test $opt_dirstack = yes; then
74091dd4 3711printf "%s\n" "#define PUSHD_AND_POPD 1" >>confdefs.h
ac50fbac
CR
3712
3713fi
3714if test $opt_restricted = yes; then
74091dd4 3715printf "%s\n" "#define RESTRICTED_SHELL 1" >>confdefs.h
ac50fbac
CR
3716
3717fi
3718if test $opt_process_subst = yes; then
74091dd4 3719printf "%s\n" "#define PROCESS_SUBSTITUTION 1" >>confdefs.h
ac50fbac
CR
3720
3721fi
3722if test $opt_prompt_decoding = yes; then
74091dd4 3723printf "%s\n" "#define PROMPT_STRING_DECODE 1" >>confdefs.h
ac50fbac
CR
3724
3725fi
3726if test $opt_select = yes; then
74091dd4 3727printf "%s\n" "#define SELECT_COMMAND 1" >>confdefs.h
ac50fbac
CR
3728
3729fi
3730if test $opt_help = yes; then
74091dd4 3731printf "%s\n" "#define HELP_BUILTIN 1" >>confdefs.h
ac50fbac
CR
3732
3733fi
3734if test $opt_array_variables = yes; then
74091dd4 3735printf "%s\n" "#define ARRAY_VARS 1" >>confdefs.h
ac50fbac
CR
3736
3737fi
3738if test $opt_dparen_arith = yes; then
74091dd4 3739printf "%s\n" "#define DPAREN_ARITHMETIC 1" >>confdefs.h
ac50fbac
CR
3740
3741fi
3742if test $opt_brace_expansion = yes; then
74091dd4 3743printf "%s\n" "#define BRACE_EXPANSION 1" >>confdefs.h
ac50fbac
CR
3744
3745fi
3746if test $opt_disabled_builtins = yes; then
74091dd4 3747printf "%s\n" "#define DISABLED_BUILTINS 1" >>confdefs.h
ac50fbac
CR
3748
3749fi
3750if test $opt_command_timing = yes; then
74091dd4 3751printf "%s\n" "#define COMMAND_TIMING 1" >>confdefs.h
ac50fbac
CR
3752
3753fi
3754if test $opt_xpg_echo = yes ; then
74091dd4 3755printf "%s\n" "#define DEFAULT_ECHO_TO_XPG 1" >>confdefs.h
ac50fbac
CR
3756
3757fi
3758if test $opt_strict_posix = yes; then
74091dd4 3759printf "%s\n" "#define STRICT_POSIX 1" >>confdefs.h
ac50fbac
CR
3760
3761fi
3762if test $opt_extended_glob = yes ; then
74091dd4 3763printf "%s\n" "#define EXTENDED_GLOB 1" >>confdefs.h
ac50fbac
CR
3764
3765fi
3766if test $opt_extglob_default = yes; then
74091dd4 3767printf "%s\n" "#define EXTGLOB_DEFAULT 1" >>confdefs.h
ac50fbac
CR
3768
3769else
74091dd4 3770printf "%s\n" "#define EXTGLOB_DEFAULT 0" >>confdefs.h
ac50fbac
CR
3771
3772fi
3773if test $opt_cond_command = yes ; then
74091dd4 3774printf "%s\n" "#define COND_COMMAND 1" >>confdefs.h
ac50fbac
CR
3775
3776fi
3777if test $opt_cond_regexp = yes ; then
74091dd4 3778printf "%s\n" "#define COND_REGEXP 1" >>confdefs.h
ac50fbac
CR
3779
3780fi
3781if test $opt_coproc = yes; then
74091dd4 3782printf "%s\n" "#define COPROCESS_SUPPORT 1" >>confdefs.h
ac50fbac
CR
3783
3784fi
3785if test $opt_arith_for_command = yes; then
74091dd4 3786printf "%s\n" "#define ARITH_FOR_COMMAND 1" >>confdefs.h
ac50fbac
CR
3787
3788fi
3789if test $opt_net_redirs = yes; then
74091dd4 3790printf "%s\n" "#define NETWORK_REDIRECTIONS 1" >>confdefs.h
ac50fbac
CR
3791
3792fi
3793if test $opt_progcomp = yes; then
74091dd4 3794printf "%s\n" "#define PROGRAMMABLE_COMPLETION 1" >>confdefs.h
ac50fbac
CR
3795
3796fi
3797if test $opt_multibyte = no; then
74091dd4 3798printf "%s\n" "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h
ac50fbac
CR
3799
3800fi
3801if test $opt_debugger = yes; then
74091dd4 3802printf "%s\n" "#define DEBUGGER 1" >>confdefs.h
ac50fbac
CR
3803
3804fi
3805if test $opt_casemod_attrs = yes; then
74091dd4 3806printf "%s\n" "#define CASEMOD_ATTRS 1" >>confdefs.h
ac50fbac
CR
3807
3808fi
3809if test $opt_casemod_expansions = yes; then
74091dd4 3810printf "%s\n" "#define CASEMOD_EXPANSIONS 1" >>confdefs.h
ac50fbac
CR
3811
3812fi
3813if test $opt_dircomplete_expand_default = yes; then
74091dd4 3814printf "%s\n" "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h
ac50fbac
CR
3815
3816fi
3817if test $opt_globascii_default = yes; then
74091dd4 3818printf "%s\n" "#define GLOBASCII_DEFAULT 1" >>confdefs.h
ac50fbac
CR
3819
3820else
74091dd4 3821printf "%s\n" "#define GLOBASCII_DEFAULT 0" >>confdefs.h
ac50fbac 3822
a0c0a00f
CR
3823fi
3824if test $opt_function_import = yes; then
74091dd4 3825printf "%s\n" "#define FUNCTION_IMPORT 1" >>confdefs.h
a0c0a00f 3826
d233b485
CR
3827fi
3828if test $opt_dev_fd_stat_broken = yes; then
74091dd4
CR
3829printf "%s\n" "#define DEV_FD_STAT_BROKEN 1" >>confdefs.h
3830
3831fi
3832if test $opt_alt_array_impl = yes; then
3833printf "%s\n" "#define ALT_ARRAY_IMPLEMENTATION 1" >>confdefs.h
3834
3835ARRAY_O=array2.o
3836fi
3837if test $opt_translatable_strings = yes; then
3838printf "%s\n" "#define TRANSLATABLE_STRINGS 1" >>confdefs.h
d233b485 3839
ac50fbac
CR
3840fi
3841
3842if test $opt_memscramble = yes; then
74091dd4 3843printf "%s\n" "#define MEMSCRAMBLE 1" >>confdefs.h
ac50fbac
CR
3844
3845fi
3846
3847if test "$opt_minimal_config" = yes; then
3848 TESTSCRIPT=run-minimal
3849else
3850 TESTSCRIPT=run-all
3851fi
3852
3853HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET=
3854if test "$opt_separate_help" != no; then
3855 if test "$opt_separate_help" = "yes" ; then
74091dd4 3856 HELPDIR='${datadir}/bash/helpfiles'
ac50fbac
CR
3857 else
3858 HELPDIR=$opt_separate_help
3859 fi
3860 HELPDIRDEFINE='-H ${HELPDIR}'
3861 HELPINSTALL='install-help'
3862 HELPFILES_TARGET='helpdoc'
3863fi
3864HELPSTRINGS=
3865if test "$opt_single_longdoc_strings" != "yes"; then
3866 HELPSTRINGS='-S'
3867fi
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
74091dd4
CR
3886
3887
a0c0a00f 3888if test -z "$CFLAGS"; then
8868edaf 3889 want_auto_cflags=1
a0c0a00f 3890fi
ac50fbac
CR
3891
3892echo ""
3893echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
3894echo ""
3895
74091dd4
CR
3896
3897
3898
3899
3900
3901
3902
3903
3904
ac50fbac
CR
3905ac_ext=c
3906ac_cpp='$CPP $CPPFLAGS'
3907ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3908ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3909ac_compiler_gnu=$ac_cv_c_compiler_gnu
3910if test -n "$ac_tool_prefix"; then
3911 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3912set dummy ${ac_tool_prefix}gcc; ac_word=$2
74091dd4
CR
3913{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3914printf %s "checking for $ac_word... " >&6; }
3915if test ${ac_cv_prog_CC+y}
3916then :
3917 printf %s "(cached) " >&6
3918else $as_nop
ac50fbac
CR
3919 if test -n "$CC"; then
3920 ac_cv_prog_CC="$CC" # Let the user override the test.
3921else
3922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3923for as_dir in $PATH
3924do
3925 IFS=$as_save_IFS
74091dd4
CR
3926 case $as_dir in #(((
3927 '') as_dir=./ ;;
3928 */) ;;
3929 *) as_dir=$as_dir/ ;;
3930 esac
ac50fbac 3931 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 3932 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac50fbac 3933 ac_cv_prog_CC="${ac_tool_prefix}gcc"
74091dd4 3934 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
ac50fbac 3935 break 2
b80f6443
JA
3936 fi
3937done
ac50fbac 3938 done
3185942a 3939IFS=$as_save_IFS
ccc6cda3 3940
f73dda09
JA
3941fi
3942fi
3943CC=$ac_cv_prog_CC
3944if test -n "$CC"; then
74091dd4
CR
3945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3946printf "%s\n" "$CC" >&6; }
f73dda09 3947else
74091dd4
CR
3948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3949printf "%s\n" "no" >&6; }
f73dda09 3950fi
ccc6cda3 3951
3185942a 3952
f73dda09
JA
3953fi
3954if test -z "$ac_cv_prog_CC"; then
3955 ac_ct_CC=$CC
3956 # Extract the first word of "gcc", so it can be a program name with args.
3957set dummy gcc; ac_word=$2
74091dd4
CR
3958{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3959printf %s "checking for $ac_word... " >&6; }
3960if test ${ac_cv_prog_ac_ct_CC+y}
3961then :
3962 printf %s "(cached) " >&6
3963else $as_nop
f73dda09
JA
3964 if test -n "$ac_ct_CC"; then
3965 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3966else
b80f6443
JA
3967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3968for as_dir in $PATH
3969do
3970 IFS=$as_save_IFS
74091dd4
CR
3971 case $as_dir in #(((
3972 '') as_dir=./ ;;
3973 */) ;;
3974 *) as_dir=$as_dir/ ;;
3975 esac
ac50fbac 3976 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 3977 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
b80f6443 3978 ac_cv_prog_ac_ct_CC="gcc"
74091dd4 3979 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
b80f6443
JA
3980 break 2
3981 fi
3982done
ac50fbac 3983 done
3185942a 3984IFS=$as_save_IFS
ccc6cda3 3985
f73dda09
JA
3986fi
3987fi
3988ac_ct_CC=$ac_cv_prog_ac_ct_CC
3989if test -n "$ac_ct_CC"; then
74091dd4
CR
3990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3991printf "%s\n" "$ac_ct_CC" >&6; }
f73dda09 3992else
74091dd4
CR
3993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3994printf "%s\n" "no" >&6; }
f73dda09 3995fi
ccc6cda3 3996
3185942a
JA
3997 if test "x$ac_ct_CC" = x; then
3998 CC=""
3999 else
4000 case $cross_compiling:$ac_tool_warned in
4001yes:)
74091dd4
CR
4002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4003printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3185942a
JA
4004ac_tool_warned=yes ;;
4005esac
4006 CC=$ac_ct_CC
4007 fi
f73dda09
JA
4008else
4009 CC="$ac_cv_prog_CC"
4010fi
bb70624e 4011
f73dda09 4012if test -z "$CC"; then
3185942a
JA
4013 if test -n "$ac_tool_prefix"; then
4014 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
f73dda09 4015set dummy ${ac_tool_prefix}cc; ac_word=$2
74091dd4
CR
4016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4017printf %s "checking for $ac_word... " >&6; }
4018if test ${ac_cv_prog_CC+y}
4019then :
4020 printf %s "(cached) " >&6
4021else $as_nop
ccc6cda3
JA
4022 if test -n "$CC"; then
4023 ac_cv_prog_CC="$CC" # Let the user override the test.
4024else
b80f6443
JA
4025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4026for as_dir in $PATH
4027do
4028 IFS=$as_save_IFS
74091dd4
CR
4029 case $as_dir in #(((
4030 '') as_dir=./ ;;
4031 */) ;;
4032 *) as_dir=$as_dir/ ;;
4033 esac
ac50fbac 4034 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 4035 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
b80f6443 4036 ac_cv_prog_CC="${ac_tool_prefix}cc"
74091dd4 4037 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
b80f6443
JA
4038 break 2
4039 fi
4040done
ac50fbac 4041 done
3185942a 4042IFS=$as_save_IFS
f73dda09 4043
ccc6cda3
JA
4044fi
4045fi
f73dda09 4046CC=$ac_cv_prog_CC
ccc6cda3 4047if test -n "$CC"; then
74091dd4
CR
4048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4049printf "%s\n" "$CC" >&6; }
f73dda09 4050else
74091dd4
CR
4051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4052printf "%s\n" "no" >&6; }
f73dda09
JA
4053fi
4054
ccc6cda3 4055
3185942a 4056 fi
f73dda09 4057fi
ccc6cda3
JA
4058if test -z "$CC"; then
4059 # Extract the first word of "cc", so it can be a program name with args.
4060set dummy cc; ac_word=$2
74091dd4
CR
4061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4062printf %s "checking for $ac_word... " >&6; }
4063if test ${ac_cv_prog_CC+y}
4064then :
4065 printf %s "(cached) " >&6
4066else $as_nop
ccc6cda3
JA
4067 if test -n "$CC"; then
4068 ac_cv_prog_CC="$CC" # Let the user override the test.
4069else
ccc6cda3 4070 ac_prog_rejected=no
b80f6443
JA
4071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4072for as_dir in $PATH
4073do
4074 IFS=$as_save_IFS
74091dd4
CR
4075 case $as_dir in #(((
4076 '') as_dir=./ ;;
4077 */) ;;
4078 *) as_dir=$as_dir/ ;;
4079 esac
ac50fbac 4080 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4
CR
4081 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4082 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
b80f6443
JA
4083 ac_prog_rejected=yes
4084 continue
4085 fi
4086 ac_cv_prog_CC="cc"
74091dd4 4087 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
b80f6443
JA
4088 break 2
4089 fi
4090done
ac50fbac 4091 done
3185942a 4092IFS=$as_save_IFS
f73dda09 4093
ccc6cda3
JA
4094if test $ac_prog_rejected = yes; then
4095 # We found a bogon in the path, so make sure we never use it.
4096 set dummy $ac_cv_prog_CC
4097 shift
f73dda09 4098 if test $# != 0; then
ccc6cda3
JA
4099 # We chose a different compiler from the bogus one.
4100 # However, it has the same basename, so the bogon will be chosen
4101 # first if we set CC to just the basename; use the full file name.
4102 shift
74091dd4 4103 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
ccc6cda3
JA
4104 fi
4105fi
4106fi
4107fi
f73dda09 4108CC=$ac_cv_prog_CC
ccc6cda3 4109if test -n "$CC"; then
74091dd4
CR
4110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4111printf "%s\n" "$CC" >&6; }
ccc6cda3 4112else
74091dd4
CR
4113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4114printf "%s\n" "no" >&6; }
ccc6cda3
JA
4115fi
4116
3185942a 4117
f73dda09
JA
4118fi
4119if test -z "$CC"; then
4120 if test -n "$ac_tool_prefix"; then
3185942a 4121 for ac_prog in cl.exe
f73dda09
JA
4122 do
4123 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4124set dummy $ac_tool_prefix$ac_prog; ac_word=$2
74091dd4
CR
4125{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4126printf %s "checking for $ac_word... " >&6; }
4127if test ${ac_cv_prog_CC+y}
4128then :
4129 printf %s "(cached) " >&6
4130else $as_nop
bb70624e
JA
4131 if test -n "$CC"; then
4132 ac_cv_prog_CC="$CC" # Let the user override the test.
4133else
b80f6443
JA
4134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4135for as_dir in $PATH
4136do
4137 IFS=$as_save_IFS
74091dd4
CR
4138 case $as_dir in #(((
4139 '') as_dir=./ ;;
4140 */) ;;
4141 *) as_dir=$as_dir/ ;;
4142 esac
ac50fbac 4143 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 4144 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
b80f6443 4145 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
74091dd4 4146 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
b80f6443
JA
4147 break 2
4148 fi
4149done
ac50fbac 4150 done
3185942a 4151IFS=$as_save_IFS
f73dda09 4152
bb70624e
JA
4153fi
4154fi
f73dda09 4155CC=$ac_cv_prog_CC
bb70624e 4156if test -n "$CC"; then
74091dd4
CR
4157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4158printf "%s\n" "$CC" >&6; }
bb70624e 4159else
74091dd4
CR
4160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4161printf "%s\n" "no" >&6; }
bb70624e 4162fi
ccc6cda3 4163
3185942a 4164
f73dda09
JA
4165 test -n "$CC" && break
4166 done
ccc6cda3 4167fi
f73dda09
JA
4168if test -z "$CC"; then
4169 ac_ct_CC=$CC
3185942a 4170 for ac_prog in cl.exe
f73dda09
JA
4171do
4172 # Extract the first word of "$ac_prog", so it can be a program name with args.
4173set dummy $ac_prog; ac_word=$2
74091dd4
CR
4174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4175printf %s "checking for $ac_word... " >&6; }
4176if test ${ac_cv_prog_ac_ct_CC+y}
4177then :
4178 printf %s "(cached) " >&6
4179else $as_nop
f73dda09
JA
4180 if test -n "$ac_ct_CC"; then
4181 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4182else
b80f6443
JA
4183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4184for as_dir in $PATH
4185do
4186 IFS=$as_save_IFS
74091dd4
CR
4187 case $as_dir in #(((
4188 '') as_dir=./ ;;
4189 */) ;;
4190 *) as_dir=$as_dir/ ;;
4191 esac
ac50fbac 4192 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 4193 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
b80f6443 4194 ac_cv_prog_ac_ct_CC="$ac_prog"
74091dd4 4195 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
b80f6443
JA
4196 break 2
4197 fi
4198done
ac50fbac 4199 done
3185942a 4200IFS=$as_save_IFS
ccc6cda3 4201
ccc6cda3 4202fi
ccc6cda3 4203fi
f73dda09
JA
4204ac_ct_CC=$ac_cv_prog_ac_ct_CC
4205if test -n "$ac_ct_CC"; then
74091dd4
CR
4206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4207printf "%s\n" "$ac_ct_CC" >&6; }
f73dda09 4208else
74091dd4
CR
4209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4210printf "%s\n" "no" >&6; }
ccc6cda3
JA
4211fi
4212
3185942a 4213
f73dda09
JA
4214 test -n "$ac_ct_CC" && break
4215done
ccc6cda3 4216
3185942a
JA
4217 if test "x$ac_ct_CC" = x; then
4218 CC=""
4219 else
4220 case $cross_compiling:$ac_tool_warned in
4221yes:)
74091dd4
CR
4222{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4223printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4224ac_tool_warned=yes ;;
4225esac
4226 CC=$ac_ct_CC
4227 fi
4228fi
4229
4230fi
4231if test -z "$CC"; then
4232 if test -n "$ac_tool_prefix"; then
4233 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4234set dummy ${ac_tool_prefix}clang; ac_word=$2
4235{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4236printf %s "checking for $ac_word... " >&6; }
4237if test ${ac_cv_prog_CC+y}
4238then :
4239 printf %s "(cached) " >&6
4240else $as_nop
4241 if test -n "$CC"; then
4242 ac_cv_prog_CC="$CC" # Let the user override the test.
4243else
4244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245for as_dir in $PATH
4246do
4247 IFS=$as_save_IFS
4248 case $as_dir in #(((
4249 '') as_dir=./ ;;
4250 */) ;;
4251 *) as_dir=$as_dir/ ;;
4252 esac
4253 for ac_exec_ext in '' $ac_executable_extensions; do
4254 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4255 ac_cv_prog_CC="${ac_tool_prefix}clang"
4256 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4257 break 2
4258 fi
4259done
4260 done
4261IFS=$as_save_IFS
4262
4263fi
4264fi
4265CC=$ac_cv_prog_CC
4266if test -n "$CC"; then
4267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4268printf "%s\n" "$CC" >&6; }
4269else
4270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4271printf "%s\n" "no" >&6; }
4272fi
4273
4274
4275fi
4276if test -z "$ac_cv_prog_CC"; then
4277 ac_ct_CC=$CC
4278 # Extract the first word of "clang", so it can be a program name with args.
4279set dummy clang; ac_word=$2
4280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4281printf %s "checking for $ac_word... " >&6; }
4282if test ${ac_cv_prog_ac_ct_CC+y}
4283then :
4284 printf %s "(cached) " >&6
4285else $as_nop
4286 if test -n "$ac_ct_CC"; then
4287 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4288else
4289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4290for as_dir in $PATH
4291do
4292 IFS=$as_save_IFS
4293 case $as_dir in #(((
4294 '') as_dir=./ ;;
4295 */) ;;
4296 *) as_dir=$as_dir/ ;;
4297 esac
4298 for ac_exec_ext in '' $ac_executable_extensions; do
4299 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4300 ac_cv_prog_ac_ct_CC="clang"
4301 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4302 break 2
4303 fi
4304done
4305 done
4306IFS=$as_save_IFS
4307
4308fi
4309fi
4310ac_ct_CC=$ac_cv_prog_ac_ct_CC
4311if test -n "$ac_ct_CC"; then
4312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4313printf "%s\n" "$ac_ct_CC" >&6; }
4314else
4315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4316printf "%s\n" "no" >&6; }
4317fi
4318
4319 if test "x$ac_ct_CC" = x; then
4320 CC=""
4321 else
4322 case $cross_compiling:$ac_tool_warned in
4323yes:)
4324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4325printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3185942a
JA
4326ac_tool_warned=yes ;;
4327esac
4328 CC=$ac_ct_CC
4329 fi
74091dd4
CR
4330else
4331 CC="$ac_cv_prog_CC"
bb70624e
JA
4332fi
4333
f73dda09
JA
4334fi
4335
b80f6443 4336
74091dd4
CR
4337test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4338printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
4339as_fn_error $? "no acceptable C compiler found in \$PATH
4340See \`config.log' for more details" "$LINENO" 5; }
f73dda09
JA
4341
4342# Provide some information about the compiler.
74091dd4 4343printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3185942a
JA
4344set X $ac_compile
4345ac_compiler=$2
74091dd4 4346for ac_option in --version -v -V -qversion -version; do
ac50fbac 4347 { { ac_try="$ac_compiler $ac_option >&5"
3185942a
JA
4348case "(($ac_try" in
4349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4350 *) ac_try_echo=$ac_try;;
4351esac
ac50fbac 4352eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
74091dd4 4353printf "%s\n" "$ac_try_echo"; } >&5
ac50fbac 4354 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
f73dda09 4355 ac_status=$?
ac50fbac
CR
4356 if test -s conftest.err; then
4357 sed '10a\
4358... rest of stderr output deleted ...
4359 10q' conftest.err >conftest.er1
4360 cat conftest.er1 >&5
4361 fi
4362 rm -f conftest.er1 conftest.err
74091dd4 4363 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
ac50fbac
CR
4364 test $ac_status = 0; }
4365done
f73dda09 4366
ac50fbac 4367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4368/* end confdefs.h. */
f73dda09
JA
4369
4370int
74091dd4 4371main (void)
f73dda09
JA
4372{
4373
4374 ;
4375 return 0;
4376}
4377_ACEOF
4378ac_clean_files_save=$ac_clean_files
3185942a 4379ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
f73dda09
JA
4380# Try to create an executable without -o first, disregard a.out.
4381# It will help us diagnose broken compilers, and finding out an intuition
4382# of exeext.
74091dd4
CR
4383{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4384printf %s "checking whether the C compiler works... " >&6; }
4385ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3185942a
JA
4386
4387# The possible output files:
4388ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4389
4390ac_rmfiles=
4391for ac_file in $ac_files
4392do
4393 case $ac_file in
4394 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4395 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4396 esac
4397done
4398rm -f $ac_rmfiles
4399
ac50fbac 4400if { { ac_try="$ac_link_default"
3185942a
JA
4401case "(($ac_try" in
4402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4403 *) ac_try_echo=$ac_try;;
4404esac
ac50fbac 4405eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
74091dd4 4406printf "%s\n" "$ac_try_echo"; } >&5
3185942a 4407 (eval "$ac_link_default") 2>&5
f73dda09 4408 ac_status=$?
74091dd4
CR
4409 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4410 test $ac_status = 0; }
4411then :
3185942a
JA
4412 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4413# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4414# in a Makefile. We should not override ac_cv_exeext if it was cached,
4415# so that the user can short-circuit this test for compilers unknown to
4416# Autoconf.
4417for ac_file in $ac_files ''
0628567a
JA
4418do
4419 test -f "$ac_file" || continue
f73dda09 4420 case $ac_file in
3185942a 4421 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
0628567a
JA
4422 ;;
4423 [ab].out )
4424 # We found the default executable, but exeext='' is most
4425 # certainly right.
4426 break;;
4427 *.* )
74091dd4 4428 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3185942a
JA
4429 then :; else
4430 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4431 fi
4432 # We set ac_cv_exeext here because the later test for it is not
4433 # safe: cross compilers may not add the suffix if given an `-o'
4434 # argument, so we may need to know it at that point already.
4435 # Even if this section looks crufty: it has the advantage of
4436 # actually working.
0628567a
JA
4437 break;;
4438 * )
4439 break;;
f73dda09
JA
4440 esac
4441done
3185942a
JA
4442test "$ac_cv_exeext" = no && ac_cv_exeext=
4443
74091dd4 4444else $as_nop
3185942a
JA
4445 ac_file=''
4446fi
74091dd4
CR
4447if test -z "$ac_file"
4448then :
4449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4450printf "%s\n" "no" >&6; }
4451printf "%s\n" "$as_me: failed program was:" >&5
0628567a
JA
4452sed 's/^/| /' conftest.$ac_ext >&5
4453
74091dd4
CR
4454{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4455printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
4456as_fn_error 77 "C compiler cannot create executables
4457See \`config.log' for more details" "$LINENO" 5; }
74091dd4
CR
4458else $as_nop
4459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4460printf "%s\n" "yes" >&6; }
4461fi
4462{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4463printf %s "checking for C compiler default output file name... " >&6; }
4464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4465printf "%s\n" "$ac_file" >&6; }
f73dda09 4466ac_exeext=$ac_cv_exeext
f73dda09 4467
ac50fbac
CR
4468rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4469ac_clean_files=$ac_clean_files_save
74091dd4
CR
4470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4471printf %s "checking for suffix of executables... " >&6; }
ac50fbac
CR
4472if { { ac_try="$ac_link"
4473case "(($ac_try" in
3185942a
JA
4474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4475 *) ac_try_echo=$ac_try;;
4476esac
ac50fbac 4477eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
74091dd4 4478printf "%s\n" "$ac_try_echo"; } >&5
ac50fbac 4479 (eval "$ac_link") 2>&5
f73dda09 4480 ac_status=$?
74091dd4
CR
4481 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4482 test $ac_status = 0; }
4483then :
f73dda09
JA
4484 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4485# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4486# work properly (i.e., refer to `conftest.exe'), while it won't with
4487# `rm'.
0628567a
JA
4488for ac_file in conftest.exe conftest conftest.*; do
4489 test -f "$ac_file" || continue
f73dda09 4490 case $ac_file in
3185942a 4491 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
f73dda09 4492 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
0628567a 4493 break;;
f73dda09
JA
4494 * ) break;;
4495 esac
4496done
74091dd4
CR
4497else $as_nop
4498 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4499printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
4500as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4501See \`config.log' for more details" "$LINENO" 5; }
f73dda09 4502fi
ac50fbac 4503rm -f conftest conftest$ac_cv_exeext
74091dd4
CR
4504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4505printf "%s\n" "$ac_cv_exeext" >&6; }
f73dda09
JA
4506
4507rm -f conftest.$ac_ext
4508EXEEXT=$ac_cv_exeext
4509ac_exeext=$EXEEXT
ac50fbac
CR
4510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4511/* end confdefs.h. */
4512#include <stdio.h>
4513int
74091dd4 4514main (void)
ac50fbac
CR
4515{
4516FILE *f = fopen ("conftest.out", "w");
4517 return ferror (f) || fclose (f) != 0;
4518
4519 ;
4520 return 0;
4521}
4522_ACEOF
4523ac_clean_files="$ac_clean_files conftest.out"
4524# Check that the compiler produces executables we can run. If not, either
4525# the compiler is broken, or we cross compile.
74091dd4
CR
4526{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4527printf %s "checking whether we are cross compiling... " >&6; }
ac50fbac
CR
4528if test "$cross_compiling" != yes; then
4529 { { ac_try="$ac_link"
4530case "(($ac_try" in
4531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4532 *) ac_try_echo=$ac_try;;
4533esac
4534eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
74091dd4 4535printf "%s\n" "$ac_try_echo"; } >&5
ac50fbac
CR
4536 (eval "$ac_link") 2>&5
4537 ac_status=$?
74091dd4 4538 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
ac50fbac
CR
4539 test $ac_status = 0; }
4540 if { ac_try='./conftest$ac_cv_exeext'
4541 { { case "(($ac_try" in
4542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4543 *) ac_try_echo=$ac_try;;
4544esac
4545eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
74091dd4 4546printf "%s\n" "$ac_try_echo"; } >&5
ac50fbac
CR
4547 (eval "$ac_try") 2>&5
4548 ac_status=$?
74091dd4 4549 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
ac50fbac
CR
4550 test $ac_status = 0; }; }; then
4551 cross_compiling=no
4552 else
4553 if test "$cross_compiling" = maybe; then
4554 cross_compiling=yes
4555 else
74091dd4
CR
4556 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4557printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4558as_fn_error 77 "cannot run C compiled programs.
ac50fbac
CR
4559If you meant to cross compile, use \`--host'.
4560See \`config.log' for more details" "$LINENO" 5; }
4561 fi
4562 fi
4563fi
74091dd4
CR
4564{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4565printf "%s\n" "$cross_compiling" >&6; }
ac50fbac
CR
4566
4567rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4568ac_clean_files=$ac_clean_files_save
74091dd4
CR
4569{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4570printf %s "checking for suffix of object files... " >&6; }
4571if test ${ac_cv_objext+y}
4572then :
4573 printf %s "(cached) " >&6
4574else $as_nop
ac50fbac 4575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4576/* end confdefs.h. */
f73dda09
JA
4577
4578int
74091dd4 4579main (void)
f73dda09
JA
4580{
4581
4582 ;
4583 return 0;
4584}
4585_ACEOF
4586rm -f conftest.o conftest.obj
ac50fbac 4587if { { ac_try="$ac_compile"
3185942a
JA
4588case "(($ac_try" in
4589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4590 *) ac_try_echo=$ac_try;;
4591esac
ac50fbac 4592eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
74091dd4 4593printf "%s\n" "$ac_try_echo"; } >&5
3185942a 4594 (eval "$ac_compile") 2>&5
f73dda09 4595 ac_status=$?
74091dd4
CR
4596 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4597 test $ac_status = 0; }
4598then :
3185942a
JA
4599 for ac_file in conftest.o conftest.obj conftest.*; do
4600 test -f "$ac_file" || continue;
f73dda09 4601 case $ac_file in
3185942a 4602 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
f73dda09
JA
4603 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4604 break;;
4605 esac
4606done
74091dd4
CR
4607else $as_nop
4608 printf "%s\n" "$as_me: failed program was:" >&5
0628567a
JA
4609sed 's/^/| /' conftest.$ac_ext >&5
4610
74091dd4
CR
4611{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4612printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
4613as_fn_error $? "cannot compute suffix of object files: cannot compile
4614See \`config.log' for more details" "$LINENO" 5; }
ccc6cda3 4615fi
f73dda09 4616rm -f conftest.$ac_cv_objext conftest.$ac_ext
ccc6cda3 4617fi
74091dd4
CR
4618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4619printf "%s\n" "$ac_cv_objext" >&6; }
f73dda09
JA
4620OBJEXT=$ac_cv_objext
4621ac_objext=$OBJEXT
74091dd4
CR
4622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4623printf %s "checking whether the compiler supports GNU C... " >&6; }
4624if test ${ac_cv_c_compiler_gnu+y}
4625then :
4626 printf %s "(cached) " >&6
4627else $as_nop
ac50fbac 4628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4629/* end confdefs.h. */
f73dda09
JA
4630
4631int
74091dd4 4632main (void)
f73dda09
JA
4633{
4634#ifndef __GNUC__
4635 choke me
4636#endif
4637
4638 ;
4639 return 0;
4640}
4641_ACEOF
74091dd4
CR
4642if ac_fn_c_try_compile "$LINENO"
4643then :
f73dda09 4644 ac_compiler_gnu=yes
74091dd4 4645else $as_nop
ac50fbac 4646 ac_compiler_gnu=no
f73dda09 4647fi
74091dd4 4648rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09
JA
4649ac_cv_c_compiler_gnu=$ac_compiler_gnu
4650
4651fi
74091dd4
CR
4652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4653printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4654ac_compiler_gnu=$ac_cv_c_compiler_gnu
4655
3185942a
JA
4656if test $ac_compiler_gnu = yes; then
4657 GCC=yes
4658else
4659 GCC=
4660fi
74091dd4 4661ac_test_CFLAGS=${CFLAGS+y}
f73dda09 4662ac_save_CFLAGS=$CFLAGS
74091dd4
CR
4663{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4664printf %s "checking whether $CC accepts -g... " >&6; }
4665if test ${ac_cv_prog_cc_g+y}
4666then :
4667 printf %s "(cached) " >&6
4668else $as_nop
3185942a
JA
4669 ac_save_c_werror_flag=$ac_c_werror_flag
4670 ac_c_werror_flag=yes
4671 ac_cv_prog_cc_g=no
4672 CFLAGS="-g"
ac50fbac 4673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4674/* end confdefs.h. */
f73dda09
JA
4675
4676int
74091dd4 4677main (void)
f73dda09 4678{
ccc6cda3 4679
f73dda09
JA
4680 ;
4681 return 0;
4682}
4683_ACEOF
74091dd4
CR
4684if ac_fn_c_try_compile "$LINENO"
4685then :
3185942a 4686 ac_cv_prog_cc_g=yes
74091dd4 4687else $as_nop
ac50fbac
CR
4688 CFLAGS=""
4689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4690/* end confdefs.h. */
4691
4692int
74091dd4 4693main (void)
3185942a
JA
4694{
4695
4696 ;
4697 return 0;
4698}
4699_ACEOF
74091dd4
CR
4700if ac_fn_c_try_compile "$LINENO"
4701then :
3185942a 4702
74091dd4 4703else $as_nop
ac50fbac 4704 ac_c_werror_flag=$ac_save_c_werror_flag
3185942a 4705 CFLAGS="-g"
ac50fbac 4706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a
JA
4707/* end confdefs.h. */
4708
4709int
74091dd4 4710main (void)
3185942a
JA
4711{
4712
4713 ;
4714 return 0;
4715}
4716_ACEOF
74091dd4
CR
4717if ac_fn_c_try_compile "$LINENO"
4718then :
f73dda09 4719 ac_cv_prog_cc_g=yes
3185942a 4720fi
74091dd4 4721rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a 4722fi
74091dd4 4723rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 4724fi
74091dd4 4725rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a 4726 ac_c_werror_flag=$ac_save_c_werror_flag
f73dda09 4727fi
74091dd4
CR
4728{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4729printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4730if test $ac_test_CFLAGS; then
f73dda09 4731 CFLAGS=$ac_save_CFLAGS
bb70624e
JA
4732elif test $ac_cv_prog_cc_g = yes; then
4733 if test "$GCC" = yes; then
ccc6cda3
JA
4734 CFLAGS="-g -O2"
4735 else
bb70624e 4736 CFLAGS="-g"
ccc6cda3
JA
4737 fi
4738else
bb70624e
JA
4739 if test "$GCC" = yes; then
4740 CFLAGS="-O2"
4741 else
4742 CFLAGS=
4743 fi
ccc6cda3 4744fi
74091dd4
CR
4745ac_prog_cc_stdc=no
4746if test x$ac_prog_cc_stdc = xno
4747then :
4748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4749printf %s "checking for $CC option to enable C11 features... " >&6; }
4750if test ${ac_cv_prog_cc_c11+y}
4751then :
4752 printf %s "(cached) " >&6
4753else $as_nop
4754 ac_cv_prog_cc_c11=no
0628567a 4755ac_save_CC=$CC
ac50fbac 4756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4757/* end confdefs.h. */
74091dd4
CR
4758$ac_c_conftest_c11_program
4759_ACEOF
4760for ac_arg in '' -std=gnu11
4761do
4762 CC="$ac_save_CC $ac_arg"
4763 if ac_fn_c_try_compile "$LINENO"
4764then :
4765 ac_cv_prog_cc_c11=$ac_arg
4766fi
4767rm -f core conftest.err conftest.$ac_objext conftest.beam
4768 test "x$ac_cv_prog_cc_c11" != "xno" && break
4769done
4770rm -f conftest.$ac_ext
4771CC=$ac_save_CC
4772fi
0628567a 4773
74091dd4
CR
4774if test "x$ac_cv_prog_cc_c11" = xno
4775then :
4776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4777printf "%s\n" "unsupported" >&6; }
4778else $as_nop
4779 if test "x$ac_cv_prog_cc_c11" = x
4780then :
4781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4782printf "%s\n" "none needed" >&6; }
4783else $as_nop
4784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4785printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4786 CC="$CC $ac_cv_prog_cc_c11"
4787fi
4788 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4789 ac_prog_cc_stdc=c11
4790fi
4791fi
4792if test x$ac_prog_cc_stdc = xno
4793then :
4794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4795printf %s "checking for $CC option to enable C99 features... " >&6; }
4796if test ${ac_cv_prog_cc_c99+y}
4797then :
4798 printf %s "(cached) " >&6
4799else $as_nop
4800 ac_cv_prog_cc_c99=no
4801ac_save_CC=$CC
4802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4803/* end confdefs.h. */
4804$ac_c_conftest_c99_program
4805_ACEOF
4806for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4807do
4808 CC="$ac_save_CC $ac_arg"
4809 if ac_fn_c_try_compile "$LINENO"
4810then :
4811 ac_cv_prog_cc_c99=$ac_arg
4812fi
4813rm -f core conftest.err conftest.$ac_objext conftest.beam
4814 test "x$ac_cv_prog_cc_c99" != "xno" && break
4815done
4816rm -f conftest.$ac_ext
4817CC=$ac_save_CC
4818fi
3185942a 4819
74091dd4
CR
4820if test "x$ac_cv_prog_cc_c99" = xno
4821then :
4822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4823printf "%s\n" "unsupported" >&6; }
4824else $as_nop
4825 if test "x$ac_cv_prog_cc_c99" = x
4826then :
4827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4828printf "%s\n" "none needed" >&6; }
4829else $as_nop
4830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4831printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4832 CC="$CC $ac_cv_prog_cc_c99"
4833fi
4834 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4835 ac_prog_cc_stdc=c99
4836fi
4837fi
4838if test x$ac_prog_cc_stdc = xno
4839then :
4840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4841printf %s "checking for $CC option to enable C89 features... " >&6; }
4842if test ${ac_cv_prog_cc_c89+y}
4843then :
4844 printf %s "(cached) " >&6
4845else $as_nop
4846 ac_cv_prog_cc_c89=no
4847ac_save_CC=$CC
4848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849/* end confdefs.h. */
4850$ac_c_conftest_c89_program
0628567a 4851_ACEOF
74091dd4 4852for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
0628567a
JA
4853do
4854 CC="$ac_save_CC $ac_arg"
74091dd4
CR
4855 if ac_fn_c_try_compile "$LINENO"
4856then :
3185942a 4857 ac_cv_prog_cc_c89=$ac_arg
0628567a 4858fi
74091dd4 4859rm -f core conftest.err conftest.$ac_objext conftest.beam
3185942a 4860 test "x$ac_cv_prog_cc_c89" != "xno" && break
0628567a 4861done
3185942a 4862rm -f conftest.$ac_ext
0628567a 4863CC=$ac_save_CC
0628567a 4864fi
0628567a 4865
74091dd4
CR
4866if test "x$ac_cv_prog_cc_c89" = xno
4867then :
4868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4869printf "%s\n" "unsupported" >&6; }
4870else $as_nop
4871 if test "x$ac_cv_prog_cc_c89" = x
4872then :
4873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4874printf "%s\n" "none needed" >&6; }
4875else $as_nop
4876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4877printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4878 CC="$CC $ac_cv_prog_cc_c89"
4879fi
4880 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4881 ac_prog_cc_stdc=c89
4882fi
ac50fbac 4883fi
0628567a 4884
f73dda09
JA
4885ac_ext=c
4886ac_cpp='$CPP $CPPFLAGS'
4887ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4888ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4889ac_compiler_gnu=$ac_cv_c_compiler_gnu
bb70624e 4890
f73dda09 4891
8868edaf 4892if test -n "$want_auto_cflags"; then
74091dd4
CR
4893 AUTO_CFLAGS="-g ${GCC:+-O2}"
4894 AUTO_LDFLAGS="-g ${GCC:+-O2}"
4895# STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security} ${GCC:+-Wno-tautological-constant-out-of-range-compare}"
4896 STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security}"
8868edaf
CR
4897else
4898 AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS=
4899fi
ccc6cda3 4900
b80f6443 4901
74091dd4
CR
4902ac_header= ac_cache=
4903for ac_item in $ac_header_c_list
4904do
4905 if test $ac_cache; then
4906 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4907 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4908 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4909 fi
4910 ac_header= ac_cache=
4911 elif test $ac_header; then
4912 ac_cache=$ac_item
4913 else
4914 ac_header=$ac_item
4915 fi
4916done
4917
4918
4919
4920
4921
4922
4923
4924
4925if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4926then :
4927
4928printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4929
4930fi
4931
4932
4933
4934
4935
4936
4937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4938printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4939if test ${ac_cv_safe_to_define___extensions__+y}
4940then :
4941 printf %s "(cached) " >&6
4942else $as_nop
4943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4944/* end confdefs.h. */
b80f6443 4945
74091dd4
CR
4946# define __EXTENSIONS__ 1
4947 $ac_includes_default
b80f6443 4948int
74091dd4 4949main (void)
b80f6443 4950{
74091dd4 4951
b80f6443
JA
4952 ;
4953 return 0;
4954}
4955_ACEOF
74091dd4
CR
4956if ac_fn_c_try_compile "$LINENO"
4957then :
4958 ac_cv_safe_to_define___extensions__=yes
4959else $as_nop
4960 ac_cv_safe_to_define___extensions__=no
b80f6443 4961fi
74091dd4 4962rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 4963fi
74091dd4
CR
4964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4965printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
ccc6cda3 4966
74091dd4
CR
4967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4968printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4969if test ${ac_cv_should_define__xopen_source+y}
4970then :
4971 printf %s "(cached) " >&6
4972else $as_nop
4973 ac_cv_should_define__xopen_source=no
4974 if test $ac_cv_header_wchar_h = yes
4975then :
4976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4977/* end confdefs.h. */
b80f6443 4978
74091dd4
CR
4979 #include <wchar.h>
4980 mbstate_t x;
4981int
4982main (void)
4983{
b80f6443 4984
74091dd4
CR
4985 ;
4986 return 0;
4987}
4988_ACEOF
4989if ac_fn_c_try_compile "$LINENO"
4990then :
4991
4992else $as_nop
ac50fbac 4993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 4994/* end confdefs.h. */
b80f6443 4995
74091dd4
CR
4996 #define _XOPEN_SOURCE 500
4997 #include <wchar.h>
4998 mbstate_t x;
0628567a 4999int
74091dd4 5000main (void)
0628567a
JA
5001{
5002
5003 ;
5004 return 0;
5005}
b80f6443 5006_ACEOF
74091dd4
CR
5007if ac_fn_c_try_compile "$LINENO"
5008then :
5009 ac_cv_should_define__xopen_source=yes
b80f6443 5010fi
74091dd4 5011rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
b80f6443 5012fi
74091dd4 5013rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
b80f6443 5014fi
b80f6443 5015fi
74091dd4
CR
5016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5017printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
b80f6443 5018
74091dd4 5019 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
b80f6443 5020
74091dd4 5021 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
b80f6443 5022
74091dd4 5023 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
b80f6443 5024
74091dd4 5025 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
b80f6443 5026
74091dd4 5027 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
b80f6443 5028
74091dd4 5029 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
b80f6443 5030
74091dd4 5031 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
b80f6443 5032
74091dd4 5033 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
b80f6443 5034
74091dd4 5035 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
b80f6443 5036
74091dd4 5037 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
b80f6443 5038
74091dd4 5039 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
b80f6443 5040
74091dd4 5041 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
b80f6443 5042
74091dd4 5043 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
b80f6443 5044
74091dd4 5045 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
ccc6cda3 5046
74091dd4 5047 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
ccc6cda3 5048
74091dd4
CR
5049 if test $ac_cv_header_minix_config_h = yes
5050then :
5051 MINIX=yes
5052 printf "%s\n" "#define _MINIX 1" >>confdefs.h
b80f6443 5053
74091dd4 5054 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
3185942a 5055
74091dd4 5056 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
3185942a 5057
74091dd4
CR
5058else $as_nop
5059 MINIX=
3185942a 5060fi
74091dd4
CR
5061 if test $ac_cv_safe_to_define___extensions__ = yes
5062then :
5063 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
3185942a 5064
74091dd4
CR
5065fi
5066 if test $ac_cv_should_define__xopen_source = yes
5067then :
5068 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
3185942a 5069
74091dd4 5070fi
3185942a
JA
5071
5072# Check whether --enable-largefile was given.
74091dd4
CR
5073if test ${enable_largefile+y}
5074then :
3185942a
JA
5075 enableval=$enable_largefile;
5076fi
f73dda09 5077
f73dda09 5078if test "$enable_largefile" != no; then
ccc6cda3 5079
74091dd4
CR
5080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5081printf %s "checking for special C compiler options needed for large files... " >&6; }
5082if test ${ac_cv_sys_largefile_CC+y}
5083then :
5084 printf %s "(cached) " >&6
5085else $as_nop
f73dda09
JA
5086 ac_cv_sys_largefile_CC=no
5087 if test "$GCC" != yes; then
5088 ac_save_CC=$CC
5089 while :; do
3185942a
JA
5090 # IRIX 6.2 and later do not support large files by default,
5091 # so use the C compiler's -n32 option if that helps.
ac50fbac 5092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5093/* end confdefs.h. */
f73dda09
JA
5094#include <sys/types.h>
5095 /* Check that off_t can represent 2**63 - 1 correctly.
5096 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5097 since some C++ compilers masquerading as C compilers
5098 incorrectly reject 9223372036854775807. */
74091dd4 5099#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
f73dda09
JA
5100 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5101 && LARGE_OFF_T % 2147483647 == 1)
5102 ? 1 : -1];
5103int
74091dd4 5104main (void)
f73dda09 5105{
bb70624e 5106
f73dda09
JA
5107 ;
5108 return 0;
5109}
5110_ACEOF
74091dd4
CR
5111 if ac_fn_c_try_compile "$LINENO"
5112then :
f73dda09 5113 break
f73dda09 5114fi
74091dd4 5115rm -f core conftest.err conftest.$ac_objext conftest.beam
3185942a 5116 CC="$CC -n32"
74091dd4
CR
5117 if ac_fn_c_try_compile "$LINENO"
5118then :
f73dda09 5119 ac_cv_sys_largefile_CC=' -n32'; break
f73dda09 5120fi
74091dd4 5121rm -f core conftest.err conftest.$ac_objext conftest.beam
0628567a 5122 break
f73dda09
JA
5123 done
5124 CC=$ac_save_CC
5125 rm -f conftest.$ac_ext
5126 fi
bb70624e 5127fi
74091dd4
CR
5128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5129printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
f73dda09
JA
5130 if test "$ac_cv_sys_largefile_CC" != no; then
5131 CC=$CC$ac_cv_sys_largefile_CC
5132 fi
bb70624e 5133
74091dd4
CR
5134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5135printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5136if test ${ac_cv_sys_file_offset_bits+y}
5137then :
5138 printf %s "(cached) " >&6
5139else $as_nop
f73dda09 5140 while :; do
ac50fbac 5141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5142/* end confdefs.h. */
f73dda09
JA
5143#include <sys/types.h>
5144 /* Check that off_t can represent 2**63 - 1 correctly.
5145 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5146 since some C++ compilers masquerading as C compilers
5147 incorrectly reject 9223372036854775807. */
74091dd4 5148#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
f73dda09
JA
5149 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5150 && LARGE_OFF_T % 2147483647 == 1)
5151 ? 1 : -1];
5152int
74091dd4 5153main (void)
f73dda09 5154{
bb70624e 5155
f73dda09
JA
5156 ;
5157 return 0;
5158}
5159_ACEOF
74091dd4
CR
5160if ac_fn_c_try_compile "$LINENO"
5161then :
3185942a 5162 ac_cv_sys_file_offset_bits=no; break
bb70624e 5163fi
74091dd4 5164rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5166/* end confdefs.h. */
f73dda09
JA
5167#define _FILE_OFFSET_BITS 64
5168#include <sys/types.h>
5169 /* Check that off_t can represent 2**63 - 1 correctly.
5170 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5171 since some C++ compilers masquerading as C compilers
5172 incorrectly reject 9223372036854775807. */
74091dd4 5173#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
f73dda09
JA
5174 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5175 && LARGE_OFF_T % 2147483647 == 1)
5176 ? 1 : -1];
5177int
74091dd4 5178main (void)
f73dda09 5179{
bb70624e 5180
f73dda09
JA
5181 ;
5182 return 0;
5183}
5184_ACEOF
74091dd4
CR
5185if ac_fn_c_try_compile "$LINENO"
5186then :
f73dda09 5187 ac_cv_sys_file_offset_bits=64; break
f73dda09 5188fi
74091dd4 5189rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a 5190 ac_cv_sys_file_offset_bits=unknown
f73dda09
JA
5191 break
5192done
5193fi
74091dd4
CR
5194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5195printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
3185942a
JA
5196case $ac_cv_sys_file_offset_bits in #(
5197 no | unknown) ;;
5198 *)
74091dd4 5199printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
3185942a
JA
5200;;
5201esac
5202rm -rf conftest*
5203 if test $ac_cv_sys_file_offset_bits = unknown; then
74091dd4
CR
5204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5205printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
5206if test ${ac_cv_sys_large_files+y}
5207then :
5208 printf %s "(cached) " >&6
5209else $as_nop
f73dda09 5210 while :; do
ac50fbac 5211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5212/* end confdefs.h. */
f73dda09
JA
5213#include <sys/types.h>
5214 /* Check that off_t can represent 2**63 - 1 correctly.
5215 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5216 since some C++ compilers masquerading as C compilers
5217 incorrectly reject 9223372036854775807. */
74091dd4 5218#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
f73dda09
JA
5219 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5220 && LARGE_OFF_T % 2147483647 == 1)
5221 ? 1 : -1];
5222int
74091dd4 5223main (void)
f73dda09
JA
5224{
5225
5226 ;
5227 return 0;
5228}
5229_ACEOF
74091dd4
CR
5230if ac_fn_c_try_compile "$LINENO"
5231then :
3185942a 5232 ac_cv_sys_large_files=no; break
bb70624e 5233fi
74091dd4 5234rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 5235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5236/* end confdefs.h. */
f73dda09
JA
5237#define _LARGE_FILES 1
5238#include <sys/types.h>
5239 /* Check that off_t can represent 2**63 - 1 correctly.
5240 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5241 since some C++ compilers masquerading as C compilers
5242 incorrectly reject 9223372036854775807. */
74091dd4 5243#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
f73dda09
JA
5244 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5245 && LARGE_OFF_T % 2147483647 == 1)
5246 ? 1 : -1];
5247int
74091dd4 5248main (void)
f73dda09 5249{
bb70624e 5250
f73dda09
JA
5251 ;
5252 return 0;
5253}
5254_ACEOF
74091dd4
CR
5255if ac_fn_c_try_compile "$LINENO"
5256then :
f73dda09 5257 ac_cv_sys_large_files=1; break
f73dda09 5258fi
74091dd4 5259rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a 5260 ac_cv_sys_large_files=unknown
f73dda09
JA
5261 break
5262done
5263fi
74091dd4
CR
5264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5265printf "%s\n" "$ac_cv_sys_large_files" >&6; }
3185942a
JA
5266case $ac_cv_sys_large_files in #(
5267 no | unknown) ;;
5268 *)
74091dd4 5269printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
3185942a
JA
5270;;
5271esac
5272rm -rf conftest*
5273 fi
f73dda09 5274fi
cce855bc 5275
b80f6443
JA
5276
5277
0628567a 5278SIGNAMES_O=
b72432fd
JA
5279SIGNAMES_H=lsignames.h
5280
b80f6443
JA
5281
5282
0628567a 5283CROSS_COMPILE=
cce855bc
JA
5284if test "x$cross_compiling" = "xyes"; then
5285 case "${host}" in
28ef6c31 5286 *-cygwin*)
cce855bc 5287 cross_cache=${srcdir}/cross-build/cygwin32.cache
cce855bc 5288 ;;
95732b49
JA
5289 *-mingw*)
5290 cross_cache=${srcdir}/cross-build/cygwin32.cache
5291 ;;
b72432fd
JA
5292 i[3456]86-*-beos*)
5293 cross_cache=${srcdir}/cross-build/x86-beos.cache
b72432fd 5294 ;;
d233b485
CR
5295 *-qnx*)
5296 cross_cache=${srcdir}/cross-build/qnx.cache
5297 ;;
b72432fd 5298 *) echo "configure: cross-compiling for $host is not supported" >&2
cce855bc
JA
5299 ;;
5300 esac
b72432fd
JA
5301 if test -n "${cross_cache}" && test -r "${cross_cache}"; then
5302 echo "loading cross-build cache file ${cross_cache}"
5303 . ${cross_cache}
5304 fi
5305 unset cross_cache
0628567a 5306 SIGNAMES_O='signames.o'
95732b49
JA
5307 CROSS_COMPILE='-DCROSS_COMPILING'
5308
cce855bc
JA
5309fi
5310
b80f6443 5311
0628567a 5312
b80f6443 5313
ac50fbac
CR
5314CFLAGS=${CFLAGS-"$AUTO_CFLAGS"}
5315# LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX
ccc6cda3 5316
cce855bc
JA
5317if test "$opt_profiling" = "yes"; then
5318 PROFILE_FLAGS=-pg
b72432fd 5319 case "$host_os" in
74091dd4 5320 solaris2*|linux*|darwin*) ;;
b72432fd
JA
5321 *) opt_static_link=yes ;;
5322 esac
7117c2d2 5323 DEBUG= MALLOC_DEBUG=
cce855bc
JA
5324fi
5325
ac50fbac
CR
5326prefer_shared=yes
5327prefer_static=no
5328
cce855bc 5329if test "$opt_static_link" = yes; then
ac50fbac
CR
5330 prefer_static=yes
5331 prefer_shared=no
f73dda09 5332 # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
74091dd4 5333 if test "$GCC" = "yes"; then
b72432fd 5334 STATIC_LD="-static"
f73dda09 5335 case "$host_os" in
d233b485 5336 solaris2*|linux*) ;;
f73dda09
JA
5337 *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental
5338 esac
cce855bc
JA
5339 fi
5340fi
5341
ac50fbac
CR
5342# set the appropriate make variables for building the "build tools"
5343# modify defaults based on whether or not we are cross compiling, since the
5344# options for the target host may not be appropriate for the build host
b80f6443 5345if test "X$cross_compiling" = "Xno"; then
ac50fbac
CR
5346 CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'}
5347 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)'
d233b485
CR
5348 if test X"$opt_profiling" = Xyes; then
5349 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(BASE_LDFLAGS)'}
5350 else
5351 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'}
5352 fi
ac50fbac 5353 # CFLAGS set above to default value if not passed in environment
8868edaf 5354 if test -n "$want_auto_cflags" ; then
74091dd4
CR
5355 CFLAGS_FOR_BUILD="${CFLAGS}"
5356 BASE_CFLAGS_FOR_BUILD="${CFLAGS}"
8868edaf 5357 else
74091dd4 5358 # passed in environment
8868edaf 5359 CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'}
74091dd4 5360 BASE_CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'}
8868edaf 5361 fi
ac50fbac 5362 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'}
b80f6443 5363else
ac50fbac 5364 CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"}
b80f6443
JA
5365 CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
5366 LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
ac50fbac 5367 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"}
74091dd4 5368 BASE_CFLAGS_FOR_BUILD=${BASE_CFLAGS_FOR_BUILD="-g"}
ac50fbac 5369 LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""}
b80f6443
JA
5370fi
5371
ac50fbac 5372
7117c2d2 5373
b80f6443
JA
5374
5375
5376
5377
5378
5379
5380
5381
5382
74091dd4
CR
5383
5384
5385ac_ext=c
5386ac_cpp='$CPP $CPPFLAGS'
5387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5389ac_compiler_gnu=$ac_cv_c_compiler_gnu
5390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5391printf %s "checking how to run the C preprocessor... " >&6; }
5392# On Suns, sometimes $CPP names a directory.
5393if test -n "$CPP" && test -d "$CPP"; then
5394 CPP=
5395fi
5396if test -z "$CPP"; then
5397 if test ${ac_cv_prog_CPP+y}
5398then :
5399 printf %s "(cached) " >&6
5400else $as_nop
5401 # Double quotes because $CC needs to be expanded
5402 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
5403 do
5404 ac_preproc_ok=false
5405for ac_c_preproc_warn_flag in '' yes
5406do
5407 # Use a header file that comes with gcc, so configuring glibc
5408 # with a fresh cross-compiler works.
5409 # On the NeXT, cc -E runs the code through the compiler's parser,
5410 # not just through cpp. "Syntax error" is here to catch this case.
5411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5412/* end confdefs.h. */
5413#include <limits.h>
5414 Syntax error
5415_ACEOF
5416if ac_fn_c_try_cpp "$LINENO"
5417then :
5418
5419else $as_nop
5420 # Broken: fails on valid input.
5421continue
5422fi
5423rm -f conftest.err conftest.i conftest.$ac_ext
5424
5425 # OK, works on sane cases. Now check whether nonexistent headers
5426 # can be detected and how.
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5428/* end confdefs.h. */
5429#include <ac_nonexistent.h>
5430_ACEOF
5431if ac_fn_c_try_cpp "$LINENO"
5432then :
5433 # Broken: success on invalid input.
5434continue
5435else $as_nop
5436 # Passes both tests.
5437ac_preproc_ok=:
5438break
5439fi
5440rm -f conftest.err conftest.i conftest.$ac_ext
5441
5442done
5443# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5444rm -f conftest.i conftest.err conftest.$ac_ext
5445if $ac_preproc_ok
5446then :
5447 break
5448fi
5449
5450 done
5451 ac_cv_prog_CPP=$CPP
5452
5453fi
5454 CPP=$ac_cv_prog_CPP
5455else
5456 ac_cv_prog_CPP=$CPP
5457fi
5458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5459printf "%s\n" "$CPP" >&6; }
5460ac_preproc_ok=false
5461for ac_c_preproc_warn_flag in '' yes
5462do
5463 # Use a header file that comes with gcc, so configuring glibc
5464 # with a fresh cross-compiler works.
5465 # On the NeXT, cc -E runs the code through the compiler's parser,
5466 # not just through cpp. "Syntax error" is here to catch this case.
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5468/* end confdefs.h. */
5469#include <limits.h>
5470 Syntax error
5471_ACEOF
5472if ac_fn_c_try_cpp "$LINENO"
5473then :
5474
5475else $as_nop
5476 # Broken: fails on valid input.
5477continue
5478fi
5479rm -f conftest.err conftest.i conftest.$ac_ext
5480
5481 # OK, works on sane cases. Now check whether nonexistent headers
5482 # can be detected and how.
5483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5484/* end confdefs.h. */
5485#include <ac_nonexistent.h>
5486_ACEOF
5487if ac_fn_c_try_cpp "$LINENO"
5488then :
5489 # Broken: success on invalid input.
5490continue
5491else $as_nop
5492 # Passes both tests.
5493ac_preproc_ok=:
5494break
5495fi
5496rm -f conftest.err conftest.i conftest.$ac_ext
5497
5498done
5499# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5500rm -f conftest.i conftest.err conftest.$ac_ext
5501if $ac_preproc_ok
5502then :
5503
5504else $as_nop
5505 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5506printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5507as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5508See \`config.log' for more details" "$LINENO" 5; }
5509fi
5510
5511ac_ext=c
5512ac_cpp='$CPP $CPPFLAGS'
5513ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5514ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5515ac_compiler_gnu=$ac_cv_c_compiler_gnu
5516
5517
5518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5519printf %s "checking for grep that handles long lines and -e... " >&6; }
5520if test ${ac_cv_path_GREP+y}
5521then :
5522 printf %s "(cached) " >&6
5523else $as_nop
5524 if test -z "$GREP"; then
5525 ac_path_GREP_found=false
5526 # Loop through the user's path and test for each of PROGNAME-LIST
5527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5528for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5529do
5530 IFS=$as_save_IFS
5531 case $as_dir in #(((
5532 '') as_dir=./ ;;
5533 */) ;;
5534 *) as_dir=$as_dir/ ;;
5535 esac
5536 for ac_prog in grep ggrep
5537 do
5538 for ac_exec_ext in '' $ac_executable_extensions; do
5539 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5540 as_fn_executable_p "$ac_path_GREP" || continue
5541# Check for GNU ac_path_GREP and select it if it is found.
5542 # Check for GNU $ac_path_GREP
5543case `"$ac_path_GREP" --version 2>&1` in
5544*GNU*)
5545 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5546*)
5547 ac_count=0
5548 printf %s 0123456789 >"conftest.in"
5549 while :
5550 do
5551 cat "conftest.in" "conftest.in" >"conftest.tmp"
5552 mv "conftest.tmp" "conftest.in"
5553 cp "conftest.in" "conftest.nl"
5554 printf "%s\n" 'GREP' >> "conftest.nl"
5555 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5556 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5557 as_fn_arith $ac_count + 1 && ac_count=$as_val
5558 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5559 # Best one so far, save it but keep looking for a better one
5560 ac_cv_path_GREP="$ac_path_GREP"
5561 ac_path_GREP_max=$ac_count
5562 fi
5563 # 10*(2^10) chars as input seems more than enough
5564 test $ac_count -gt 10 && break
5565 done
5566 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5567esac
5568
5569 $ac_path_GREP_found && break 3
5570 done
5571 done
5572 done
5573IFS=$as_save_IFS
5574 if test -z "$ac_cv_path_GREP"; then
5575 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5576 fi
5577else
5578 ac_cv_path_GREP=$GREP
5579fi
5580
5581fi
5582{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5583printf "%s\n" "$ac_cv_path_GREP" >&6; }
5584 GREP="$ac_cv_path_GREP"
5585
5586
5587{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5588printf %s "checking for egrep... " >&6; }
5589if test ${ac_cv_path_EGREP+y}
5590then :
5591 printf %s "(cached) " >&6
5592else $as_nop
5593 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5594 then ac_cv_path_EGREP="$GREP -E"
5595 else
5596 if test -z "$EGREP"; then
5597 ac_path_EGREP_found=false
5598 # Loop through the user's path and test for each of PROGNAME-LIST
5599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5600for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5601do
5602 IFS=$as_save_IFS
5603 case $as_dir in #(((
5604 '') as_dir=./ ;;
5605 */) ;;
5606 *) as_dir=$as_dir/ ;;
5607 esac
5608 for ac_prog in egrep
5609 do
5610 for ac_exec_ext in '' $ac_executable_extensions; do
5611 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
5612 as_fn_executable_p "$ac_path_EGREP" || continue
5613# Check for GNU ac_path_EGREP and select it if it is found.
5614 # Check for GNU $ac_path_EGREP
5615case `"$ac_path_EGREP" --version 2>&1` in
5616*GNU*)
5617 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5618*)
5619 ac_count=0
5620 printf %s 0123456789 >"conftest.in"
5621 while :
5622 do
5623 cat "conftest.in" "conftest.in" >"conftest.tmp"
5624 mv "conftest.tmp" "conftest.in"
5625 cp "conftest.in" "conftest.nl"
5626 printf "%s\n" 'EGREP' >> "conftest.nl"
5627 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5628 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5629 as_fn_arith $ac_count + 1 && ac_count=$as_val
5630 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5631 # Best one so far, save it but keep looking for a better one
5632 ac_cv_path_EGREP="$ac_path_EGREP"
5633 ac_path_EGREP_max=$ac_count
5634 fi
5635 # 10*(2^10) chars as input seems more than enough
5636 test $ac_count -gt 10 && break
5637 done
5638 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5639esac
5640
5641 $ac_path_EGREP_found && break 3
5642 done
5643 done
5644 done
5645IFS=$as_save_IFS
5646 if test -z "$ac_cv_path_EGREP"; then
5647 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5648 fi
5649else
5650 ac_cv_path_EGREP=$EGREP
5651fi
5652
5653 fi
5654fi
5655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5656printf "%s\n" "$ac_cv_path_EGREP" >&6; }
5657 EGREP="$ac_cv_path_EGREP"
5658
5659
f73dda09 5660if test $ac_cv_c_compiler_gnu = yes; then
74091dd4
CR
5661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
5662printf %s "checking whether $CC needs -traditional... " >&6; }
5663if test ${ac_cv_prog_gcc_traditional+y}
5664then :
5665 printf %s "(cached) " >&6
5666else $as_nop
ccc6cda3 5667 ac_pattern="Autoconf.*'x'"
ac50fbac 5668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5669/* end confdefs.h. */
ccc6cda3
JA
5670#include <sgtty.h>
5671Autoconf TIOCGETP
f73dda09 5672_ACEOF
ccc6cda3 5673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
5674 $EGREP "$ac_pattern" >/dev/null 2>&1
5675then :
ccc6cda3 5676 ac_cv_prog_gcc_traditional=yes
74091dd4 5677else $as_nop
ccc6cda3
JA
5678 ac_cv_prog_gcc_traditional=no
5679fi
74091dd4 5680rm -rf conftest*
ccc6cda3 5681
b80f6443 5682
ccc6cda3 5683 if test $ac_cv_prog_gcc_traditional = no; then
ac50fbac 5684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5685/* end confdefs.h. */
ccc6cda3
JA
5686#include <termio.h>
5687Autoconf TCGETA
f73dda09 5688_ACEOF
ccc6cda3 5689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
5690 $EGREP "$ac_pattern" >/dev/null 2>&1
5691then :
ccc6cda3
JA
5692 ac_cv_prog_gcc_traditional=yes
5693fi
74091dd4 5694rm -rf conftest*
ccc6cda3
JA
5695
5696 fi
5697fi
74091dd4
CR
5698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
5699printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
ccc6cda3
JA
5700 if test $ac_cv_prog_gcc_traditional = yes; then
5701 CC="$CC -traditional"
5702 fi
5703fi
5704
b80f6443
JA
5705
5706
f73dda09 5707if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no"
b72432fd 5708then
f73dda09
JA
5709 # If the user specified --with-installed-readline=PREFIX and PREFIX
5710 # is not `yes', set ac_cv_rl_prefix to PREFIX
5711 test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline
b72432fd 5712
b80f6443 5713
bb70624e
JA
5714if test "X$bash_cv_termcap_lib" = "X"; then
5715_bash_needmsg=yes
5716else
74091dd4
CR
5717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
5718printf %s "checking which library has the termcap functions... " >&6; }
bb70624e
JA
5719_bash_needmsg=
5720fi
74091dd4
CR
5721if test ${bash_cv_termcap_lib+y}
5722then :
5723 printf %s "(cached) " >&6
5724else $as_nop
ac50fbac 5725 ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
74091dd4
CR
5726if test "x$ac_cv_func_tgetent" = xyes
5727then :
ac50fbac 5728 bash_cv_termcap_lib=libc
74091dd4
CR
5729else $as_nop
5730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
5731printf %s "checking for tgetent in -ltermcap... " >&6; }
5732if test ${ac_cv_lib_termcap_tgetent+y}
5733then :
5734 printf %s "(cached) " >&6
5735else $as_nop
ac50fbac
CR
5736 ac_check_lib_save_LIBS=$LIBS
5737LIBS="-ltermcap $LIBS"
5738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5739/* end confdefs.h. */
0628567a 5740
3185942a
JA
5741/* Override any GCC internal prototype to avoid an error.
5742 Use char because int might match the return type of a GCC
5743 builtin and then its argument prototype would still apply. */
b80f6443 5744char tgetent ();
0628567a 5745int
74091dd4 5746main (void)
0628567a 5747{
3185942a 5748return tgetent ();
b80f6443
JA
5749 ;
5750 return 0;
5751}
5752_ACEOF
74091dd4
CR
5753if ac_fn_c_try_link "$LINENO"
5754then :
ac50fbac 5755 ac_cv_lib_termcap_tgetent=yes
74091dd4 5756else $as_nop
ac50fbac 5757 ac_cv_lib_termcap_tgetent=no
b80f6443 5758fi
74091dd4 5759rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac
CR
5760 conftest$ac_exeext conftest.$ac_ext
5761LIBS=$ac_check_lib_save_LIBS
b80f6443 5762fi
74091dd4
CR
5763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
5764printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; }
5765if test "x$ac_cv_lib_termcap_tgetent" = xyes
5766then :
bb70624e 5767 bash_cv_termcap_lib=libtermcap
74091dd4
CR
5768else $as_nop
5769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
5770printf %s "checking for tgetent in -ltinfo... " >&6; }
5771if test ${ac_cv_lib_tinfo_tgetent+y}
5772then :
5773 printf %s "(cached) " >&6
5774else $as_nop
f73dda09
JA
5775 ac_check_lib_save_LIBS=$LIBS
5776LIBS="-ltinfo $LIBS"
ac50fbac 5777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5778/* end confdefs.h. */
f73dda09 5779
3185942a
JA
5780/* Override any GCC internal prototype to avoid an error.
5781 Use char because int might match the return type of a GCC
5782 builtin and then its argument prototype would still apply. */
f73dda09
JA
5783char tgetent ();
5784int
74091dd4 5785main (void)
f73dda09 5786{
3185942a 5787return tgetent ();
f73dda09
JA
5788 ;
5789 return 0;
5790}
5791_ACEOF
74091dd4
CR
5792if ac_fn_c_try_link "$LINENO"
5793then :
f73dda09 5794 ac_cv_lib_tinfo_tgetent=yes
74091dd4 5795else $as_nop
ac50fbac 5796 ac_cv_lib_tinfo_tgetent=no
f73dda09 5797fi
74091dd4 5798rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 5799 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5800LIBS=$ac_check_lib_save_LIBS
5801fi
74091dd4
CR
5802{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
5803printf "%s\n" "$ac_cv_lib_tinfo_tgetent" >&6; }
5804if test "x$ac_cv_lib_tinfo_tgetent" = xyes
5805then :
7117c2d2 5806 bash_cv_termcap_lib=libtinfo
74091dd4
CR
5807else $as_nop
5808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
5809printf %s "checking for tgetent in -lcurses... " >&6; }
5810if test ${ac_cv_lib_curses_tgetent+y}
5811then :
5812 printf %s "(cached) " >&6
5813else $as_nop
f73dda09
JA
5814 ac_check_lib_save_LIBS=$LIBS
5815LIBS="-lcurses $LIBS"
ac50fbac 5816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5817/* end confdefs.h. */
b72432fd 5818
3185942a
JA
5819/* Override any GCC internal prototype to avoid an error.
5820 Use char because int might match the return type of a GCC
5821 builtin and then its argument prototype would still apply. */
f73dda09
JA
5822char tgetent ();
5823int
74091dd4 5824main (void)
f73dda09 5825{
3185942a 5826return tgetent ();
f73dda09
JA
5827 ;
5828 return 0;
5829}
5830_ACEOF
74091dd4
CR
5831if ac_fn_c_try_link "$LINENO"
5832then :
f73dda09 5833 ac_cv_lib_curses_tgetent=yes
74091dd4 5834else $as_nop
ac50fbac 5835 ac_cv_lib_curses_tgetent=no
f73dda09 5836fi
74091dd4 5837rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 5838 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5839LIBS=$ac_check_lib_save_LIBS
5840fi
74091dd4
CR
5841{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
5842printf "%s\n" "$ac_cv_lib_curses_tgetent" >&6; }
5843if test "x$ac_cv_lib_curses_tgetent" = xyes
5844then :
bb70624e 5845 bash_cv_termcap_lib=libcurses
74091dd4
CR
5846else $as_nop
5847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
5848printf %s "checking for tgetent in -lncurses... " >&6; }
5849if test ${ac_cv_lib_ncurses_tgetent+y}
5850then :
5851 printf %s "(cached) " >&6
5852else $as_nop
f73dda09 5853 ac_check_lib_save_LIBS=$LIBS
bb70624e 5854LIBS="-lncurses $LIBS"
ac50fbac 5855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 5856/* end confdefs.h. */
f73dda09 5857
3185942a
JA
5858/* Override any GCC internal prototype to avoid an error.
5859 Use char because int might match the return type of a GCC
5860 builtin and then its argument prototype would still apply. */
f73dda09
JA
5861char tgetent ();
5862int
74091dd4 5863main (void)
f73dda09 5864{
3185942a 5865return tgetent ();
f73dda09
JA
5866 ;
5867 return 0;
5868}
5869_ACEOF
74091dd4
CR
5870if ac_fn_c_try_link "$LINENO"
5871then :
f73dda09 5872 ac_cv_lib_ncurses_tgetent=yes
74091dd4 5873else $as_nop
ac50fbac 5874 ac_cv_lib_ncurses_tgetent=no
f73dda09 5875fi
74091dd4 5876rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 5877 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
5878LIBS=$ac_check_lib_save_LIBS
5879fi
74091dd4
CR
5880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
5881printf "%s\n" "$ac_cv_lib_ncurses_tgetent" >&6; }
5882if test "x$ac_cv_lib_ncurses_tgetent" = xyes
5883then :
f73dda09 5884 bash_cv_termcap_lib=libncurses
74091dd4
CR
5885else $as_nop
5886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
5887printf %s "checking for tgetent in -lncursesw... " >&6; }
5888if test ${ac_cv_lib_ncursesw_tgetent+y}
5889then :
5890 printf %s "(cached) " >&6
5891else $as_nop
d233b485
CR
5892 ac_check_lib_save_LIBS=$LIBS
5893LIBS="-lncursesw $LIBS"
5894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5895/* end confdefs.h. */
5896
5897/* Override any GCC internal prototype to avoid an error.
5898 Use char because int might match the return type of a GCC
5899 builtin and then its argument prototype would still apply. */
d233b485
CR
5900char tgetent ();
5901int
74091dd4 5902main (void)
d233b485
CR
5903{
5904return tgetent ();
5905 ;
5906 return 0;
5907}
5908_ACEOF
74091dd4
CR
5909if ac_fn_c_try_link "$LINENO"
5910then :
d233b485 5911 ac_cv_lib_ncursesw_tgetent=yes
74091dd4 5912else $as_nop
d233b485
CR
5913 ac_cv_lib_ncursesw_tgetent=no
5914fi
74091dd4 5915rm -f core conftest.err conftest.$ac_objext conftest.beam \
d233b485
CR
5916 conftest$ac_exeext conftest.$ac_ext
5917LIBS=$ac_check_lib_save_LIBS
5918fi
74091dd4
CR
5919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
5920printf "%s\n" "$ac_cv_lib_ncursesw_tgetent" >&6; }
5921if test "x$ac_cv_lib_ncursesw_tgetent" = xyes
5922then :
d233b485 5923 bash_cv_termcap_lib=libncursesw
74091dd4 5924else $as_nop
f73dda09 5925 bash_cv_termcap_lib=gnutermcap
bb70624e 5926fi
bb70624e 5927
bb70624e
JA
5928fi
5929
5930fi
5931
5932fi
5933
5934fi
5935
b80f6443
JA
5936fi
5937
d233b485
CR
5938fi
5939
bb70624e 5940if test "X$_bash_needmsg" = "Xyes"; then
74091dd4
CR
5941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
5942printf %s "checking which library has the termcap functions... " >&6; }
bb70624e 5943fi
74091dd4
CR
5944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5
5945printf "%s\n" "using $bash_cv_termcap_lib" >&6; }
bb70624e
JA
5946if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
5947LDFLAGS="$LDFLAGS -L./lib/termcap"
5948TERMCAP_LIB="./lib/termcap/libtermcap.a"
5949TERMCAP_DEP="./lib/termcap/libtermcap.a"
5950elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
5951TERMCAP_LIB=-ltermcap
5952TERMCAP_DEP=
f73dda09
JA
5953elif test $bash_cv_termcap_lib = libtinfo; then
5954TERMCAP_LIB=-ltinfo
5955TERMCAP_DEP=
bb70624e
JA
5956elif test $bash_cv_termcap_lib = libncurses; then
5957TERMCAP_LIB=-lncurses
5958TERMCAP_DEP=
b80f6443
JA
5959elif test $bash_cv_termcap_lib = libc; then
5960TERMCAP_LIB=
5961TERMCAP_DEP=
bb70624e 5962else
74091dd4
CR
5963# we assume ncurses is installed somewhere the linker can find it
5964TERMCAP_LIB=-lncurses
bb70624e
JA
5965TERMCAP_DEP=
5966fi
5967
b80f6443
JA
5968
5969
5970
74091dd4
CR
5971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of installed readline library" >&5
5972printf %s "checking version of installed readline library... " >&6; }
f73dda09
JA
5973
5974# What a pain in the ass this is.
5975
5976# save cpp and ld options
5977_save_CFLAGS="$CFLAGS"
5978_save_LDFLAGS="$LDFLAGS"
5979_save_LIBS="$LIBS"
5980
5981# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
5982# allows the caller to do something like $_rl_prefix=$withval if the user
5983# specifies --with-installed-readline=PREFIX as an argument to configure
5984
5985if test -z "$ac_cv_rl_prefix"; then
5986test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
5987fi
5988
5989eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
5990eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
5991
5992LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
5993CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
5994LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
5995
74091dd4
CR
5996if test ${ac_cv_rl_version+y}
5997then :
5998 printf %s "(cached) " >&6
5999else $as_nop
6000 if test "$cross_compiling" = yes
6001then :
d233b485 6002 ac_cv_rl_version='8.0'
74091dd4
CR
6003
6004else $as_nop
ac50fbac 6005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 6006/* end confdefs.h. */
f73dda09
JA
6007
6008#include <stdio.h>
6009#include <readline/readline.h>
8868edaf 6010#include <stdlib.h>
f73dda09 6011
95732b49
JA
6012extern int rl_gnu_readline_p;
6013
8868edaf 6014int
f73dda09
JA
6015main()
6016{
6017 FILE *fp;
6018 fp = fopen("conftest.rlv", "w");
95732b49
JA
6019 if (fp == 0)
6020 exit(1);
6021 if (rl_gnu_readline_p != 1)
6022 fprintf(fp, "0.0\n");
6023 else
6024 fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
f73dda09
JA
6025 fclose(fp);
6026 exit(0);
6027}
6028
6029_ACEOF
74091dd4
CR
6030if ac_fn_c_try_run "$LINENO"
6031then :
f73dda09 6032 ac_cv_rl_version=`cat conftest.rlv`
74091dd4 6033else $as_nop
ac50fbac 6034 ac_cv_rl_version='0.0'
f73dda09 6035fi
ac50fbac
CR
6036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6037 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 6038fi
3185942a 6039
b80f6443
JA
6040fi
6041
f73dda09
JA
6042
6043CFLAGS="$_save_CFLAGS"
6044LDFLAGS="$_save_LDFLAGS"
6045LIBS="$_save_LIBS"
6046
6047RL_MAJOR=0
6048RL_MINOR=0
6049
6050# (
6051case "$ac_cv_rl_version" in
60522*|3*|4*|5*|6*|7*|8*|9*)
6053 RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
7117c2d2 6054 RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'`
f73dda09
JA
6055 ;;
6056esac
6057
6058# (((
6059case $RL_MAJOR in
6060[0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;;
6061[0-9]) _RL_MAJOR=0$RL_MAJOR ;;
6062*) _RL_MAJOR=00 ;;
6063esac
6064
6065# (((
6066case $RL_MINOR in
6067[0-9][0-9]) _RL_MINOR=$RL_MINOR ;;
6068[0-9]) _RL_MINOR=0$RL_MINOR ;;
6069*) _RL_MINOR=00 ;;
6070esac
6071
6072RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
6073
6074# Readline versions greater than 4.2 have these defines in readline.h
6075
6076if test $ac_cv_rl_version = '0.0' ; then
74091dd4
CR
6077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Could not test version of installed readline library." >&5
6078printf "%s\n" "$as_me: WARNING: Could not test version of installed readline library." >&2;}
f73dda09
JA
6079elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
6080 # set these for use by the caller
6081 RL_PREFIX=$ac_cv_rl_prefix
6082 RL_LIBDIR=$ac_cv_rl_libdir
6083 RL_INCLUDEDIR=$ac_cv_rl_includedir
74091dd4
CR
6084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5
6085printf "%s\n" "$ac_cv_rl_version" >&6; }
f73dda09
JA
6086else
6087
b80f6443 6088
74091dd4 6089printf "%s\n" "#define RL_READLINE_VERSION $RL_VERSION" >>confdefs.h
f73dda09 6090
b80f6443 6091
74091dd4 6092printf "%s\n" "#define RL_VERSION_MAJOR $RL_MAJOR" >>confdefs.h
f73dda09 6093
b80f6443 6094
74091dd4 6095printf "%s\n" "#define RL_VERSION_MINOR $RL_MINOR" >>confdefs.h
b80f6443
JA
6096
6097
6098
6099
6100
f73dda09
JA
6101
6102# set these for use by the caller
6103RL_PREFIX=$ac_cv_rl_prefix
6104RL_LIBDIR=$ac_cv_rl_libdir
6105RL_INCLUDEDIR=$ac_cv_rl_includedir
bb70624e 6106
74091dd4
CR
6107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5
6108printf "%s\n" "$ac_cv_rl_version" >&6; }
bb70624e 6109
f73dda09 6110fi
bb70624e 6111
b80f6443 6112
f73dda09 6113 case "$ac_cv_rl_version" in
d233b485 6114 8*|9*) ;;
f73dda09 6115 *) opt_with_installed_readline=no
74091dd4
CR
6116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5
6117printf "%s\n" "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;}
6118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using private bash version" >&5
6119printf "%s\n" "$as_me: WARNING: using private bash version" >&2;}
bb70624e
JA
6120 ;;
6121 esac
bb70624e
JA
6122fi
6123
95732b49 6124TILDE_LIB=-ltilde
bb70624e 6125if test $opt_readline = yes; then
74091dd4 6126 printf "%s\n" "#define READLINE 1" >>confdefs.h
bb70624e 6127
f73dda09 6128 if test "$opt_with_installed_readline" != "no" ; then
b80f6443
JA
6129 case "$opt_with_installed_readline" in
6130 yes) RL_INCLUDE= ;;
6131 *) case "$RL_INCLUDEDIR" in
6132 /usr/include) ;;
6133 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
6134 esac
6135 ;;
f73dda09 6136 esac
bb70624e 6137 READLINE_DEP=
95732b49
JA
6138 READLINE_LIB=-lreadline
6139 # section for OS versions that don't allow unresolved symbols
6140 # to be compiled into dynamic libraries.
6141 case "$host_os" in
6142 cygwin*) TILDE_LIB= ;;
6143 esac
bb70624e
JA
6144 else
6145 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
6146 READLINE_DEP='$(READLINE_LIBRARY)'
95732b49
JA
6147 # section for OS versions that ship an older/broken version of
6148 # readline as a standard dynamic library and don't allow a
6149 # static version specified as -llibname to override the
6150 # dynamic version
6151 case "${host_os}" in
89a92869 6152 darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
95732b49
JA
6153 *) READLINE_LIB=-lreadline ;;
6154 esac
bb70624e
JA
6155 fi
6156else
6157 RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
6158 READLINE_LIB= READLINE_DEP=
6159fi
6160if test $opt_history = yes || test $opt_bang_history = yes; then
6161 if test $opt_history = yes; then
74091dd4 6162 printf "%s\n" "#define HISTORY 1" >>confdefs.h
bb70624e
JA
6163
6164 fi
6165 if test $opt_bang_history = yes; then
74091dd4 6166 printf "%s\n" "#define BANG_HISTORY 1" >>confdefs.h
b72432fd
JA
6167
6168 fi
f73dda09
JA
6169 if test "$opt_with_installed_readline" != "no"; then
6170 HIST_LIBDIR=$RL_LIBDIR
b72432fd 6171 HISTORY_DEP=
95732b49 6172 HISTORY_LIB=-lhistory
b80f6443
JA
6173 case "$opt_with_installed_readline" in
6174 yes) RL_INCLUDE= ;;
6175 *) case "$RL_INCLUDEDIR" in
6176 /usr/include) ;;
6177 *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
6178 esac
6179 ;;
f73dda09 6180 esac
b72432fd
JA
6181 else
6182 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
6183 HISTORY_DEP='$(HISTORY_LIBRARY)'
95732b49
JA
6184 # section for OS versions that ship an older version of
6185 # readline as a standard dynamic library and don't allow a
6186 # static version specified as -llibname to override the
6187 # dynamic version
6188 case "${host_os}" in
89a92869 6189 darwin[89]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;;
95732b49
JA
6190 *) HISTORY_LIB=-lhistory ;;
6191 esac
b72432fd
JA
6192 fi
6193else
6194 HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
6195 HISTORY_LIB= HISTORY_DEP=
6196fi
6197
b80f6443
JA
6198
6199
6200
6201
6202
6203
6204
6205
6206
95732b49 6207
74091dd4
CR
6208
6209 # Find a good install program. We prefer a C program (faster),
ccc6cda3
JA
6210# so one script is as good as another. But avoid the broken or
6211# incompatible versions:
6212# SysV /etc/install, /usr/sbin/install
6213# SunOS /usr/etc/install
6214# IRIX /sbin/install
6215# AIX /bin/install
f73dda09 6216# AmigaOS /C/install, which installs bootblocks on floppy discs
bb70624e 6217# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ccc6cda3
JA
6218# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6219# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
0628567a 6220# OS/2's system install, which has a completely different semantic
ccc6cda3 6221# ./install, which can be erroneously created by make from ./install.sh.
3185942a 6222# Reject install programs that cannot install multiple files.
74091dd4
CR
6223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6224printf %s "checking for a BSD-compatible install... " >&6; }
ccc6cda3 6225if test -z "$INSTALL"; then
74091dd4
CR
6226if test ${ac_cv_path_install+y}
6227then :
6228 printf %s "(cached) " >&6
6229else $as_nop
b80f6443
JA
6230 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6231for as_dir in $PATH
6232do
6233 IFS=$as_save_IFS
74091dd4
CR
6234 case $as_dir in #(((
6235 '') as_dir=./ ;;
6236 */) ;;
6237 *) as_dir=$as_dir/ ;;
6238 esac
6239 # Account for fact that we put trailing slashes in our PATH walk.
6240case $as_dir in #((
6241 ./ | /[cC]/* | \
b80f6443 6242 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
ac50fbac 6243 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
b80f6443
JA
6244 /usr/ucb/* ) ;;
6245 *)
6246 # OSF1 and SCO ODT 3.0 have their own names for install.
6247 # Don't use installbsd from OSF since it installs stuff as root
6248 # by default.
6249 for ac_prog in ginstall scoinst install; do
6250 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 6251 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
0628567a 6252 if test $ac_prog = install &&
74091dd4 6253 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
0628567a
JA
6254 # AIX install. It has an incompatible calling convention.
6255 :
6256 elif test $ac_prog = install &&
74091dd4 6257 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
0628567a
JA
6258 # program-specific install script used by HP pwplus--don't use.
6259 :
6260 else
3185942a
JA
6261 rm -rf conftest.one conftest.two conftest.dir
6262 echo one > conftest.one
6263 echo two > conftest.two
6264 mkdir conftest.dir
74091dd4 6265 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
3185942a
JA
6266 test -s conftest.one && test -s conftest.two &&
6267 test -s conftest.dir/conftest.one &&
6268 test -s conftest.dir/conftest.two
6269 then
74091dd4 6270 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3185942a
JA
6271 break 3
6272 fi
0628567a
JA
6273 fi
6274 fi
ccc6cda3 6275 done
b80f6443
JA
6276 done
6277 ;;
6278esac
3185942a 6279
ac50fbac 6280 done
3185942a 6281IFS=$as_save_IFS
b80f6443 6282
3185942a 6283rm -rf conftest.one conftest.two conftest.dir
ccc6cda3
JA
6284
6285fi
74091dd4 6286 if test ${ac_cv_path_install+y}; then
f73dda09 6287 INSTALL=$ac_cv_path_install
ccc6cda3 6288 else
3185942a
JA
6289 # As a last resort, use the slow shell script. Don't cache a
6290 # value for INSTALL within a source directory, because that will
ccc6cda3 6291 # break other packages using the cache if that directory is
3185942a 6292 # removed, or if the value is a relative name.
f73dda09 6293 INSTALL=$ac_install_sh
ccc6cda3
JA
6294 fi
6295fi
74091dd4
CR
6296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6297printf "%s\n" "$INSTALL" >&6; }
ccc6cda3
JA
6298
6299# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6300# It thinks the first close brace ends the variable substitution.
6301test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6302
f73dda09 6303test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
bb70624e 6304
ccc6cda3
JA
6305test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6306
ac50fbac
CR
6307if test -n "$ac_tool_prefix"; then
6308 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6309set dummy ${ac_tool_prefix}ar; ac_word=$2
74091dd4
CR
6310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6311printf %s "checking for $ac_word... " >&6; }
6312if test ${ac_cv_prog_AR+y}
6313then :
6314 printf %s "(cached) " >&6
6315else $as_nop
ccc6cda3
JA
6316 if test -n "$AR"; then
6317 ac_cv_prog_AR="$AR" # Let the user override the test.
6318else
b80f6443
JA
6319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6320for as_dir in $PATH
6321do
6322 IFS=$as_save_IFS
74091dd4
CR
6323 case $as_dir in #(((
6324 '') as_dir=./ ;;
6325 */) ;;
6326 *) as_dir=$as_dir/ ;;
6327 esac
ac50fbac 6328 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 6329 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac50fbac 6330 ac_cv_prog_AR="${ac_tool_prefix}ar"
74091dd4 6331 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
b80f6443
JA
6332 break 2
6333 fi
6334done
ac50fbac 6335 done
3185942a 6336IFS=$as_save_IFS
f73dda09 6337
ccc6cda3
JA
6338fi
6339fi
f73dda09 6340AR=$ac_cv_prog_AR
ccc6cda3 6341if test -n "$AR"; then
74091dd4
CR
6342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6343printf "%s\n" "$AR" >&6; }
ccc6cda3 6344else
74091dd4
CR
6345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346printf "%s\n" "no" >&6; }
ac50fbac
CR
6347fi
6348
6349
6350fi
6351if test -z "$ac_cv_prog_AR"; then
6352 ac_ct_AR=$AR
6353 # Extract the first word of "ar", so it can be a program name with args.
6354set dummy ar; ac_word=$2
74091dd4
CR
6355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6356printf %s "checking for $ac_word... " >&6; }
6357if test ${ac_cv_prog_ac_ct_AR+y}
6358then :
6359 printf %s "(cached) " >&6
6360else $as_nop
ac50fbac
CR
6361 if test -n "$ac_ct_AR"; then
6362 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6363else
6364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6365for as_dir in $PATH
6366do
6367 IFS=$as_save_IFS
74091dd4
CR
6368 case $as_dir in #(((
6369 '') as_dir=./ ;;
6370 */) ;;
6371 *) as_dir=$as_dir/ ;;
6372 esac
ac50fbac 6373 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 6374 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac50fbac 6375 ac_cv_prog_ac_ct_AR="ar"
74091dd4 6376 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
ac50fbac
CR
6377 break 2
6378 fi
6379done
6380 done
6381IFS=$as_save_IFS
6382
6383fi
6384fi
6385ac_ct_AR=$ac_cv_prog_ac_ct_AR
6386if test -n "$ac_ct_AR"; then
74091dd4
CR
6387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6388printf "%s\n" "$ac_ct_AR" >&6; }
ac50fbac 6389else
74091dd4
CR
6390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391printf "%s\n" "no" >&6; }
ccc6cda3
JA
6392fi
6393
ac50fbac
CR
6394 if test "x$ac_ct_AR" = x; then
6395 AR=""
6396 else
6397 case $cross_compiling:$ac_tool_warned in
6398yes:)
74091dd4
CR
6399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6400printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac50fbac
CR
6401ac_tool_warned=yes ;;
6402esac
6403 AR=$ac_ct_AR
6404 fi
6405else
6406 AR="$ac_cv_prog_AR"
6407fi
3185942a 6408
b72432fd 6409test -n "$ARFLAGS" || ARFLAGS="cr"
f73dda09
JA
6410if test -n "$ac_tool_prefix"; then
6411 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6412set dummy ${ac_tool_prefix}ranlib; ac_word=$2
74091dd4
CR
6413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6414printf %s "checking for $ac_word... " >&6; }
6415if test ${ac_cv_prog_RANLIB+y}
6416then :
6417 printf %s "(cached) " >&6
6418else $as_nop
ccc6cda3
JA
6419 if test -n "$RANLIB"; then
6420 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6421else
b80f6443
JA
6422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6423for as_dir in $PATH
6424do
6425 IFS=$as_save_IFS
74091dd4
CR
6426 case $as_dir in #(((
6427 '') as_dir=./ ;;
6428 */) ;;
6429 *) as_dir=$as_dir/ ;;
6430 esac
ac50fbac 6431 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 6432 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
b80f6443 6433 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
74091dd4 6434 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
b80f6443
JA
6435 break 2
6436 fi
6437done
ac50fbac 6438 done
3185942a 6439IFS=$as_save_IFS
f73dda09 6440
ccc6cda3
JA
6441fi
6442fi
f73dda09 6443RANLIB=$ac_cv_prog_RANLIB
ccc6cda3 6444if test -n "$RANLIB"; then
74091dd4
CR
6445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6446printf "%s\n" "$RANLIB" >&6; }
f73dda09 6447else
74091dd4
CR
6448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449printf "%s\n" "no" >&6; }
f73dda09
JA
6450fi
6451
3185942a 6452
f73dda09
JA
6453fi
6454if test -z "$ac_cv_prog_RANLIB"; then
6455 ac_ct_RANLIB=$RANLIB
6456 # Extract the first word of "ranlib", so it can be a program name with args.
6457set dummy ranlib; ac_word=$2
74091dd4
CR
6458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6459printf %s "checking for $ac_word... " >&6; }
6460if test ${ac_cv_prog_ac_ct_RANLIB+y}
6461then :
6462 printf %s "(cached) " >&6
6463else $as_nop
f73dda09
JA
6464 if test -n "$ac_ct_RANLIB"; then
6465 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6466else
b80f6443
JA
6467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6468for as_dir in $PATH
6469do
6470 IFS=$as_save_IFS
74091dd4
CR
6471 case $as_dir in #(((
6472 '') as_dir=./ ;;
6473 */) ;;
6474 *) as_dir=$as_dir/ ;;
6475 esac
ac50fbac 6476 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 6477 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
b80f6443 6478 ac_cv_prog_ac_ct_RANLIB="ranlib"
74091dd4 6479 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
b80f6443
JA
6480 break 2
6481 fi
6482done
ac50fbac 6483 done
3185942a 6484IFS=$as_save_IFS
f73dda09 6485
f73dda09
JA
6486fi
6487fi
6488ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6489if test -n "$ac_ct_RANLIB"; then
74091dd4
CR
6490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6491printf "%s\n" "$ac_ct_RANLIB" >&6; }
ccc6cda3 6492else
74091dd4
CR
6493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6494printf "%s\n" "no" >&6; }
f73dda09
JA
6495fi
6496
3185942a
JA
6497 if test "x$ac_ct_RANLIB" = x; then
6498 RANLIB=":"
6499 else
6500 case $cross_compiling:$ac_tool_warned in
6501yes:)
74091dd4
CR
6502{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6503printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3185942a
JA
6504ac_tool_warned=yes ;;
6505esac
6506 RANLIB=$ac_ct_RANLIB
6507 fi
f73dda09
JA
6508else
6509 RANLIB="$ac_cv_prog_RANLIB"
ccc6cda3
JA
6510fi
6511
6512for ac_prog in 'bison -y' byacc
6513do
f73dda09 6514 # Extract the first word of "$ac_prog", so it can be a program name with args.
ccc6cda3 6515set dummy $ac_prog; ac_word=$2
74091dd4
CR
6516{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517printf %s "checking for $ac_word... " >&6; }
6518if test ${ac_cv_prog_YACC+y}
6519then :
6520 printf %s "(cached) " >&6
6521else $as_nop
ccc6cda3
JA
6522 if test -n "$YACC"; then
6523 ac_cv_prog_YACC="$YACC" # Let the user override the test.
6524else
b80f6443
JA
6525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in $PATH
6527do
6528 IFS=$as_save_IFS
74091dd4
CR
6529 case $as_dir in #(((
6530 '') as_dir=./ ;;
6531 */) ;;
6532 *) as_dir=$as_dir/ ;;
6533 esac
ac50fbac 6534 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 6535 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
b80f6443 6536 ac_cv_prog_YACC="$ac_prog"
74091dd4 6537 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
b80f6443
JA
6538 break 2
6539 fi
6540done
ac50fbac 6541 done
3185942a 6542IFS=$as_save_IFS
f73dda09 6543
ccc6cda3
JA
6544fi
6545fi
f73dda09 6546YACC=$ac_cv_prog_YACC
ccc6cda3 6547if test -n "$YACC"; then
74091dd4
CR
6548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6549printf "%s\n" "$YACC" >&6; }
ccc6cda3 6550else
74091dd4
CR
6551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6552printf "%s\n" "no" >&6; }
ccc6cda3
JA
6553fi
6554
3185942a 6555
f73dda09 6556 test -n "$YACC" && break
ccc6cda3
JA
6557done
6558test -n "$YACC" || YACC="yacc"
6559
74091dd4
CR
6560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6561printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3185942a 6562set x ${MAKE-make}
74091dd4
CR
6563ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6564if eval test \${ac_cv_prog_make_${ac_make}_set+y}
6565then :
6566 printf %s "(cached) " >&6
6567else $as_nop
b80f6443 6568 cat >conftest.make <<\_ACEOF
3185942a 6569SHELL = /bin/sh
ccc6cda3 6570all:
3185942a 6571 @echo '@@@%%%=$(MAKE)=@@@%%%'
b80f6443 6572_ACEOF
ac50fbac 6573# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3185942a
JA
6574case `${MAKE-make} -f conftest.make 2>/dev/null` in
6575 *@@@%%%=?*=@@@%%%*)
6576 eval ac_cv_prog_make_${ac_make}_set=yes;;
6577 *)
6578 eval ac_cv_prog_make_${ac_make}_set=no;;
6579esac
f73dda09 6580rm -f conftest.make
ccc6cda3 6581fi
3185942a 6582if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
74091dd4
CR
6583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6584printf "%s\n" "yes" >&6; }
ccc6cda3
JA
6585 SET_MAKE=
6586else
74091dd4
CR
6587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588printf "%s\n" "no" >&6; }
ccc6cda3
JA
6589 SET_MAKE="MAKE=${MAKE-make}"
6590fi
6591
b80f6443 6592
ac50fbac
CR
6593case "$ac_cv_prog_YACC" in
6594*bison*) ;;
74091dd4
CR
6595*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5
6596printf "%s\n" "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;;
ac50fbac
CR
6597esac
6598
b72432fd 6599case "$host_os" in
bb70624e 6600opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
b72432fd
JA
6601*) MAKE_SHELL=/bin/sh ;;
6602esac
6603
6604
95732b49
JA
6605if test x$SIZE = x; then
6606 if test x$ac_tool_prefix = x; then
6607 SIZE=size
6608 else
6609 SIZE=${ac_tool_prefix}size
6610 save_IFS=$IFS ; IFS=:
6611 size_found=0
6612 for dir in $PATH; do
6613 if test -x $dir/$SIZE ; then
6614 size_found=1
6615 break
6616 fi
6617 done
6618 if test $size_found -eq 0; then
6619 SIZE=:
6620 fi
6621 IFS=$save_IFS
6622 fi
6623fi
6624
6625
ac50fbac
CR
6626# Checks for stat-related time functions.
6627
6628# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software
6629# Foundation, Inc.
6630
6631# This file is free software; the Free Software Foundation
6632# gives unlimited permission to copy and/or distribute it,
6633# with or without modifications, as long as this notice is preserved.
ccc6cda3 6634
f73dda09 6635
ac50fbac
CR
6636# st_atim.tv_nsec - Linux, Solaris, Cygwin
6637# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
6638# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
6639# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
6640
6641# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
6642# st_birthtim - Cygwin 1.7.0+
6643
6644
6645
6646# Configure checks for struct timespec
6647
6648# Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc.
6649
6650# This file is free software; the Free Software Foundation
6651# gives unlimited permission to copy and/or distribute it,
6652# with or without modifications, as long as this notice is preserved.
6653
6654# Original written by Paul Eggert and Jim Meyering.
6655# Modified by Chet Ramey for bash
6656
6657
6658
6659
6660
ac50fbac 6661
74091dd4
CR
6662
6663
6664
6665
6666
8868edaf 6667# codeset.m4 serial 5 (gettext-0.18.2)
ac50fbac 6668
0628567a 6669
ac50fbac 6670
f73dda09 6671
ccc6cda3 6672
f73dda09 6673
ccc6cda3 6674
ccc6cda3 6675
8868edaf 6676# fcntl-o.m4 serial 6
ccc6cda3 6677
ccc6cda3 6678
0628567a 6679
ccc6cda3 6680
8868edaf
CR
6681# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
6682# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
6683# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
3185942a 6684
3185942a 6685
8868edaf 6686# gettext.m4 serial 69 (gettext-0.19.9)
ccc6cda3 6687
ccc6cda3 6688
ccc6cda3 6689
ccc6cda3 6690
3185942a 6691
3185942a 6692
3185942a 6693
3185942a 6694
3185942a 6695
3185942a 6696
3185942a 6697
3185942a 6698
3185942a 6699
3185942a 6700
b80f6443 6701
ccc6cda3 6702
ccc6cda3 6703
8868edaf 6704# glibc2.m4 serial 3
ccc6cda3 6705
8868edaf
CR
6706# Test for the GNU C Library, version 2.0 or newer.
6707# From Bruno Haible.
ccc6cda3 6708
ccc6cda3 6709
3185942a 6710
8868edaf 6711# glibc21.m4 serial 5
3185942a 6712
8868edaf
CR
6713# Test for the GNU C Library, version 2.1 or newer, or uClibc.
6714# From Bruno Haible.
3185942a 6715
b80f6443 6716
3185942a 6717
8868edaf 6718# host-cpu-c-abi.m4 serial 11
3185942a 6719
3185942a 6720
ccc6cda3 6721
ccc6cda3 6722
ccc6cda3 6723
ccc6cda3 6724
ccc6cda3 6725
8868edaf 6726# iconv.m4 serial 21
f73dda09 6727
f73dda09 6728
ccc6cda3 6729
b80f6443 6730
ccc6cda3 6731
ccc6cda3 6732
17345e5a 6733
17345e5a 6734
17345e5a 6735
8868edaf 6736# intdiv0.m4 serial 6 (gettext-0.18.2)
17345e5a 6737
17345e5a 6738
17345e5a 6739
17345e5a 6740
8868edaf 6741# intl.m4 serial 34 (gettext-0.19.9)
17345e5a 6742
ccc6cda3 6743
b80f6443 6744
b80f6443
JA
6745
6746
6747
3185942a 6748
b80f6443
JA
6749
6750
6751
6752
8868edaf 6753# intlmacosx.m4 serial 6 (gettext-0.19.9)
b80f6443
JA
6754
6755
ccc6cda3 6756
8868edaf 6757# intl-thread-locale.m4 serial 4
ccc6cda3 6758
b80f6443 6759
b80f6443 6760
b80f6443
JA
6761
6762
8868edaf 6763# intmax.m4 serial 6 (gettext-0.18.2)
b80f6443 6764
3185942a 6765
ccc6cda3 6766
b80f6443 6767
8868edaf 6768# inttypes-pri.m4 serial 7 (gettext-0.18.2)
f73dda09 6769
b80f6443
JA
6770
6771
b80f6443 6772
8868edaf
CR
6773# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
6774# macros to non-string values. This is the case on AIX 4.3.3.
b80f6443 6775
b80f6443
JA
6776
6777
8868edaf 6778# inttypes.m4 serial 27
b80f6443 6779
b80f6443 6780
b80f6443
JA
6781
6782
3185942a 6783
b80f6443 6784
8868edaf 6785# Ensure that the PRI* and SCN* macros are defined appropriately.
ccc6cda3 6786
ccc6cda3 6787
8868edaf
CR
6788# Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
6789# If $2 is true, the condition is $3; otherwise if long long int is supported
6790# approximate the condition with $4; otherwise, assume the condition is false.
6791# The condition should work on all C99 platforms; the approximations should be
6792# good enough to work on all practical pre-C99 platforms.
6793# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants.
3185942a 6794
ccc6cda3 6795
ccc6cda3 6796
ccc6cda3 6797
b80f6443 6798
ccc6cda3 6799
8868edaf 6800# inttypes_h.m4 serial 10
ccc6cda3 6801
ccc6cda3 6802
8868edaf
CR
6803# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
6804# doesn't clash with <sys/types.h>, and declares uintmax_t.
f73dda09 6805
ccc6cda3 6806
f73dda09 6807
8868edaf 6808# lcmessage.m4 serial 7 (gettext-0.18.2)
ccc6cda3
JA
6809
6810
8868edaf 6811# Check whether LC_MESSAGES is available in <locale.h>.
f73dda09 6812
b80f6443 6813
ccc6cda3 6814
8868edaf 6815# lib-ld.m4 serial 9
ccc6cda3 6816
f73dda09 6817
ccc6cda3 6818
ccc6cda3 6819
ccc6cda3 6820
ccc6cda3 6821
8868edaf 6822# lib-link.m4 serial 28
3185942a 6823
b80f6443 6824
ccc6cda3 6825
ccc6cda3 6826
b80f6443
JA
6827
6828
f73dda09 6829
ccc6cda3
JA
6830
6831
b80f6443
JA
6832
6833
0628567a 6834
0628567a 6835
0628567a 6836
f73dda09 6837
0628567a 6838
3185942a 6839
f73dda09 6840
8868edaf 6841# lib-prefix.m4 serial 14
b80f6443 6842
b80f6443 6843
b80f6443 6844
b80f6443 6845
b80f6443 6846
b80f6443 6847
b80f6443 6848
ccc6cda3 6849
f73dda09 6850
b80f6443 6851
8868edaf 6852# lock.m4 serial 14
b80f6443 6853
ac50fbac 6854
b80f6443 6855
3185942a 6856
8868edaf 6857# Prerequisites of lib/glthread/lock.c.
f73dda09 6858
b80f6443 6859
8868edaf 6860# nls.m4 serial 5 (gettext-0.18)
b80f6443
JA
6861
6862
b80f6443 6863
ccc6cda3 6864
b80f6443
JA
6865
6866
8868edaf 6867# po.m4 serial 24a
f73dda09 6868
ccc6cda3 6869
b80f6443
JA
6870
6871
6872
6873
b80f6443 6874
b80f6443 6875
b80f6443 6876
b80f6443 6877
b80f6443 6878
b80f6443 6879
8868edaf 6880# printf-posix.m4 serial 6 (gettext-0.18.2)
b80f6443 6881
b80f6443 6882
b80f6443 6883
ccc6cda3 6884
8868edaf 6885# progtest.m4 serial 7 (gettext-0.18.2)
3185942a 6886
ccc6cda3 6887
ccc6cda3 6888
ccc6cda3 6889
8868edaf 6890# Search path for a program which passes the given test.
ccc6cda3 6891
f73dda09 6892
ccc6cda3 6893
8868edaf 6894# pthread_rwlock_rdlock.m4 serial 2
b80f6443
JA
6895
6896
f73dda09 6897
f73dda09 6898
8868edaf 6899# size_max.m4 serial 11
b80f6443
JA
6900
6901
f73dda09 6902
f73dda09 6903
7117c2d2 6904
7117c2d2 6905
8868edaf 6906# stdint_h.m4 serial 9
b80f6443
JA
6907
6908
8868edaf
CR
6909# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
6910# doesn't clash with <sys/types.h>, and declares uintmax_t.
b80f6443 6911
b80f6443 6912
7117c2d2 6913
8868edaf 6914# threadlib.m4 serial 16
7117c2d2 6915
b80f6443 6916
b80f6443
JA
6917
6918
f73dda09 6919
f73dda09 6920
b80f6443 6921
f73dda09 6922
f73dda09 6923
f73dda09 6924
b80f6443
JA
6925
6926
b80f6443 6927
f73dda09 6928
f73dda09 6929
f73dda09 6930
f73dda09 6931
f73dda09 6932
f73dda09 6933
b80f6443 6934
b80f6443 6935
8868edaf 6936# uintmax_t.m4 serial 12
b80f6443 6937
3185942a 6938
f73dda09 6939
b80f6443 6940
8868edaf
CR
6941# Define uintmax_t to 'unsigned long' or 'unsigned long long'
6942# if it is not already defined in <stdint.h> or <inttypes.h>.
b80f6443
JA
6943
6944
b80f6443 6945
8868edaf 6946# ulonglong.m4 serial 10
b80f6443 6947
8868edaf 6948# visibility.m4 serial 6
3185942a 6949
b80f6443
JA
6950
6951
6952
6953
8868edaf 6954# wchar_t.m4 serial 4 (gettext-0.18.2)
b80f6443
JA
6955
6956
6957
b80f6443 6958
8868edaf 6959# wint_t.m4 serial 7
b80f6443 6960
b80f6443 6961
b80f6443
JA
6962
6963
b80f6443 6964
b80f6443 6965
8868edaf 6966# xsize.m4 serial 5
b80f6443 6967
b80f6443 6968
b80f6443 6969
3185942a 6970
74091dd4
CR
6971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6972printf %s "checking for an ANSI C-conforming const... " >&6; }
6973if test ${ac_cv_c_const+y}
6974then :
6975 printf %s "(cached) " >&6
6976else $as_nop
8868edaf
CR
6977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6978/* end confdefs.h. */
6979
6980int
74091dd4 6981main (void)
8868edaf
CR
6982{
6983
6984#ifndef __cplusplus
6985 /* Ultrix mips cc rejects this sort of thing. */
6986 typedef int charset[2];
6987 const charset cs = { 0, 0 };
6988 /* SunOS 4.1.1 cc rejects this. */
6989 char const *const *pcpcc;
6990 char **ppc;
6991 /* NEC SVR4.0.2 mips cc rejects this. */
6992 struct point {int x, y;};
6993 static struct point const zero = {0,0};
74091dd4 6994 /* IBM XL C 1.02.0.0 rejects this.
8868edaf
CR
6995 It does not let you subtract one const X* pointer from another in
6996 an arm of an if-expression whose if-part is not a constant
6997 expression */
6998 const char *g = "string";
6999 pcpcc = &g + (g ? g-g : 0);
7000 /* HPUX 7.0 cc rejects these. */
7001 ++pcpcc;
7002 ppc = (char**) pcpcc;
7003 pcpcc = (char const *const *) ppc;
7004 { /* SCO 3.2v4 cc rejects this sort of thing. */
7005 char tx;
7006 char *t = &tx;
7007 char const *s = 0 ? (char *) 0 : (char const *) 0;
7008
7009 *t++ = 0;
7010 if (s) return 0;
7011 }
7012 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
7013 int x[] = {25, 17};
7014 const int *foo = &x[0];
7015 ++foo;
7016 }
7017 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7018 typedef const int *iptr;
7019 iptr p = 0;
7020 ++p;
7021 }
74091dd4 7022 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
8868edaf
CR
7023 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7024 struct s { int j; const int *ap[3]; } bx;
7025 struct s *b = &bx; b->j = 5;
7026 }
7027 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7028 const int foo = 10;
7029 if (!foo) return 0;
7030 }
7031 return !cs[0] && !zero.x;
7032#endif
7033
7034 ;
7035 return 0;
7036}
7037_ACEOF
74091dd4
CR
7038if ac_fn_c_try_compile "$LINENO"
7039then :
8868edaf 7040 ac_cv_c_const=yes
74091dd4 7041else $as_nop
8868edaf
CR
7042 ac_cv_c_const=no
7043fi
74091dd4 7044rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 7045fi
74091dd4
CR
7046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7047printf "%s\n" "$ac_cv_c_const" >&6; }
8868edaf
CR
7048if test $ac_cv_c_const = no; then
7049
74091dd4 7050printf "%s\n" "#define const /**/" >>confdefs.h
8868edaf
CR
7051
7052fi
7053
74091dd4
CR
7054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7055printf %s "checking for inline... " >&6; }
7056if test ${ac_cv_c_inline+y}
7057then :
7058 printf %s "(cached) " >&6
7059else $as_nop
8868edaf
CR
7060 ac_cv_c_inline=no
7061for ac_kw in inline __inline__ __inline; do
7062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7063/* end confdefs.h. */
7064#ifndef __cplusplus
7065typedef int foo_t;
74091dd4
CR
7066static $ac_kw foo_t static_foo (void) {return 0; }
7067$ac_kw foo_t foo (void) {return 0; }
8868edaf
CR
7068#endif
7069
7070_ACEOF
74091dd4
CR
7071if ac_fn_c_try_compile "$LINENO"
7072then :
8868edaf
CR
7073 ac_cv_c_inline=$ac_kw
7074fi
74091dd4 7075rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
7076 test "$ac_cv_c_inline" != no && break
7077done
7078
7079fi
74091dd4
CR
7080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
7081printf "%s\n" "$ac_cv_c_inline" >&6; }
8868edaf
CR
7082
7083case $ac_cv_c_inline in
7084 inline | yes) ;;
7085 *)
7086 case $ac_cv_c_inline in
7087 no) ac_val=;;
7088 *) ac_val=$ac_cv_c_inline;;
7089 esac
7090 cat >>confdefs.h <<_ACEOF
7091#ifndef __cplusplus
7092#define inline $ac_val
7093#endif
7094_ACEOF
7095 ;;
7096esac
7097
74091dd4
CR
7098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
7099printf %s "checking whether byte ordering is bigendian... " >&6; }
7100if test ${ac_cv_c_bigendian+y}
7101then :
7102 printf %s "(cached) " >&6
7103else $as_nop
8868edaf
CR
7104 ac_cv_c_bigendian=unknown
7105 # See if we're dealing with a universal compiler.
7106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107/* end confdefs.h. */
7108#ifndef __APPLE_CC__
7109 not a universal capable compiler
7110 #endif
7111 typedef int dummy;
7112
7113_ACEOF
74091dd4
CR
7114if ac_fn_c_try_compile "$LINENO"
7115then :
8868edaf
CR
7116
7117 # Check for potential -arch flags. It is not universal unless
7118 # there are at least two -arch flags with different values.
7119 ac_arch=
7120 ac_prev=
7121 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
7122 if test -n "$ac_prev"; then
7123 case $ac_word in
7124 i?86 | x86_64 | ppc | ppc64)
7125 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
7126 ac_arch=$ac_word
7127 else
7128 ac_cv_c_bigendian=universal
7129 break
7130 fi
7131 ;;
7132 esac
7133 ac_prev=
7134 elif test "x$ac_word" = "x-arch"; then
7135 ac_prev=arch
7136 fi
7137 done
7138fi
74091dd4 7139rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
7140 if test $ac_cv_c_bigendian = unknown; then
7141 # See if sys/param.h defines the BYTE_ORDER macro.
7142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7143/* end confdefs.h. */
7144#include <sys/types.h>
7145 #include <sys/param.h>
7146
7147int
74091dd4 7148main (void)
8868edaf
CR
7149{
7150#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
7151 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
7152 && LITTLE_ENDIAN)
7153 bogus endian macros
7154 #endif
7155
7156 ;
7157 return 0;
7158}
7159_ACEOF
74091dd4
CR
7160if ac_fn_c_try_compile "$LINENO"
7161then :
8868edaf
CR
7162 # It does; now see whether it defined to BIG_ENDIAN or not.
7163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7164/* end confdefs.h. */
7165#include <sys/types.h>
7166 #include <sys/param.h>
7167
7168int
74091dd4 7169main (void)
8868edaf
CR
7170{
7171#if BYTE_ORDER != BIG_ENDIAN
7172 not big endian
7173 #endif
7174
7175 ;
7176 return 0;
7177}
7178_ACEOF
74091dd4
CR
7179if ac_fn_c_try_compile "$LINENO"
7180then :
8868edaf 7181 ac_cv_c_bigendian=yes
74091dd4 7182else $as_nop
8868edaf
CR
7183 ac_cv_c_bigendian=no
7184fi
74091dd4 7185rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 7186fi
74091dd4 7187rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
7188 fi
7189 if test $ac_cv_c_bigendian = unknown; then
7190 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
7191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7192/* end confdefs.h. */
7193#include <limits.h>
7194
7195int
74091dd4 7196main (void)
8868edaf
CR
7197{
7198#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
7199 bogus endian macros
7200 #endif
7201
7202 ;
7203 return 0;
7204}
7205_ACEOF
74091dd4
CR
7206if ac_fn_c_try_compile "$LINENO"
7207then :
8868edaf
CR
7208 # It does; now see whether it defined to _BIG_ENDIAN or not.
7209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7210/* end confdefs.h. */
7211#include <limits.h>
7212
7213int
74091dd4 7214main (void)
8868edaf
CR
7215{
7216#ifndef _BIG_ENDIAN
7217 not big endian
7218 #endif
7219
7220 ;
7221 return 0;
7222}
7223_ACEOF
74091dd4
CR
7224if ac_fn_c_try_compile "$LINENO"
7225then :
8868edaf 7226 ac_cv_c_bigendian=yes
74091dd4 7227else $as_nop
8868edaf
CR
7228 ac_cv_c_bigendian=no
7229fi
74091dd4 7230rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 7231fi
74091dd4 7232rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
7233 fi
7234 if test $ac_cv_c_bigendian = unknown; then
7235 # Compile a test program.
74091dd4
CR
7236 if test "$cross_compiling" = yes
7237then :
8868edaf
CR
7238 # Try to guess by grepping values from an object file.
7239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7240/* end confdefs.h. */
74091dd4 7241unsigned short int ascii_mm[] =
8868edaf 7242 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
74091dd4 7243 unsigned short int ascii_ii[] =
8868edaf
CR
7244 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
7245 int use_ascii (int i) {
7246 return ascii_mm[i] + ascii_ii[i];
7247 }
74091dd4 7248 unsigned short int ebcdic_ii[] =
8868edaf 7249 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
74091dd4 7250 unsigned short int ebcdic_mm[] =
8868edaf
CR
7251 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
7252 int use_ebcdic (int i) {
7253 return ebcdic_mm[i] + ebcdic_ii[i];
7254 }
7255 extern int foo;
7256
7257int
74091dd4 7258main (void)
8868edaf
CR
7259{
7260return use_ascii (foo) == use_ebcdic (foo);
7261 ;
7262 return 0;
7263}
7264_ACEOF
74091dd4
CR
7265if ac_fn_c_try_compile "$LINENO"
7266then :
8868edaf
CR
7267 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
7268 ac_cv_c_bigendian=yes
7269 fi
7270 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
7271 if test "$ac_cv_c_bigendian" = unknown; then
7272 ac_cv_c_bigendian=no
7273 else
7274 # finding both strings is unlikely to happen, but who knows?
7275 ac_cv_c_bigendian=unknown
7276 fi
7277 fi
7278fi
74091dd4
CR
7279rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7280else $as_nop
8868edaf
CR
7281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7282/* end confdefs.h. */
7283$ac_includes_default
7284int
74091dd4 7285main (void)
8868edaf
CR
7286{
7287
7288 /* Are we little or big endian? From Harbison&Steele. */
7289 union
7290 {
7291 long int l;
7292 char c[sizeof (long int)];
7293 } u;
7294 u.l = 1;
7295 return u.c[sizeof (long int) - 1] == 1;
7296
7297 ;
7298 return 0;
7299}
7300_ACEOF
74091dd4
CR
7301if ac_fn_c_try_run "$LINENO"
7302then :
8868edaf 7303 ac_cv_c_bigendian=no
74091dd4 7304else $as_nop
8868edaf
CR
7305 ac_cv_c_bigendian=yes
7306fi
7307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7308 conftest.$ac_objext conftest.beam conftest.$ac_ext
7309fi
7310
7311 fi
7312fi
74091dd4
CR
7313{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
7314printf "%s\n" "$ac_cv_c_bigendian" >&6; }
8868edaf
CR
7315 case $ac_cv_c_bigendian in #(
7316 yes)
74091dd4 7317 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
8868edaf
CR
7318;; #(
7319 no)
7320 ;; #(
7321 universal)
7322
74091dd4 7323printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8868edaf
CR
7324
7325 ;; #(
7326 *)
7327 as_fn_error $? "unknown endianness
7328 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
7329 esac
7330
74091dd4
CR
7331{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5
7332printf %s "checking for preprocessor stringizing operator... " >&6; }
7333if test ${ac_cv_c_stringize+y}
7334then :
7335 printf %s "(cached) " >&6
7336else $as_nop
8868edaf
CR
7337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7338/* end confdefs.h. */
7339#define x(y) #y
7340
7341char *s = x(teststring);
7342_ACEOF
7343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
7344 $EGREP "#teststring" >/dev/null 2>&1
7345then :
8868edaf 7346 ac_cv_c_stringize=no
74091dd4 7347else $as_nop
8868edaf
CR
7348 ac_cv_c_stringize=yes
7349fi
74091dd4 7350rm -rf conftest*
8868edaf
CR
7351
7352fi
74091dd4
CR
7353{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5
7354printf "%s\n" "$ac_cv_c_stringize" >&6; }
8868edaf
CR
7355if test $ac_cv_c_stringize = yes; then
7356
74091dd4 7357printf "%s\n" "#define HAVE_STRINGIZE 1" >>confdefs.h
8868edaf
CR
7358
7359fi
7360
7361
74091dd4
CR
7362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
7363printf %s "checking for long double... " >&6; }
7364if test ${ac_cv_type_long_double+y}
7365then :
7366 printf %s "(cached) " >&6
7367else $as_nop
7368 if test "$GCC" = yes; then
7369 ac_cv_type_long_double=yes
7370 else
7371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8868edaf 7372/* end confdefs.h. */
74091dd4
CR
7373/* The Stardent Vistra knows sizeof (long double), but does
7374 not support it. */
7375 long double foo = 0.0L;
8868edaf 7376int
74091dd4 7377main (void)
8868edaf 7378{
74091dd4
CR
7379static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
7380 sizeof (double) <= sizeof (long double))];
8868edaf
CR
7381test_array [0] = 0;
7382return test_array [0];
7383
7384 ;
7385 return 0;
7386}
7387_ACEOF
74091dd4
CR
7388if ac_fn_c_try_compile "$LINENO"
7389then :
7390 ac_cv_type_long_double=yes
7391else $as_nop
7392 ac_cv_type_long_double=no
8868edaf 7393fi
74091dd4
CR
7394rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7395 fi
8868edaf 7396fi
74091dd4
CR
7397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
7398printf "%s\n" "$ac_cv_type_long_double" >&6; }
7399 if test $ac_cv_type_long_double = yes; then
8868edaf 7400
74091dd4 7401printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
8868edaf
CR
7402
7403 fi
7404
74091dd4 7405if test "$ac_prog_cc_stdc" != no; then
8868edaf 7406
74091dd4 7407printf "%s\n" "#define PROTOTYPES 1" >>confdefs.h
8868edaf
CR
7408
7409
74091dd4 7410printf "%s\n" "#define __PROTOTYPES 1" >>confdefs.h
8868edaf 7411
8868edaf
CR
7412fi
7413
74091dd4
CR
7414{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
7415printf %s "checking whether char is unsigned... " >&6; }
7416if test ${ac_cv_c_char_unsigned+y}
7417then :
7418 printf %s "(cached) " >&6
7419else $as_nop
8868edaf
CR
7420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7421/* end confdefs.h. */
7422$ac_includes_default
7423int
74091dd4 7424main (void)
8868edaf
CR
7425{
7426static int test_array [1 - 2 * !(((char) -1) < 0)];
7427test_array [0] = 0;
7428return test_array [0];
7429
7430 ;
7431 return 0;
7432}
7433_ACEOF
74091dd4
CR
7434if ac_fn_c_try_compile "$LINENO"
7435then :
8868edaf 7436 ac_cv_c_char_unsigned=no
74091dd4 7437else $as_nop
8868edaf
CR
7438 ac_cv_c_char_unsigned=yes
7439fi
74091dd4 7440rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 7441fi
74091dd4
CR
7442{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
7443printf "%s\n" "$ac_cv_c_char_unsigned" >&6; }
7444if test $ac_cv_c_char_unsigned = yes; then
7445 printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
8868edaf
CR
7446
7447fi
7448
74091dd4
CR
7449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
7450printf %s "checking for working volatile... " >&6; }
7451if test ${ac_cv_c_volatile+y}
7452then :
7453 printf %s "(cached) " >&6
7454else $as_nop
8868edaf
CR
7455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7456/* end confdefs.h. */
7457
7458int
74091dd4 7459main (void)
8868edaf
CR
7460{
7461
7462volatile int x;
7463int * volatile y = (int *) 0;
7464return !x && !y;
7465 ;
7466 return 0;
7467}
7468_ACEOF
74091dd4
CR
7469if ac_fn_c_try_compile "$LINENO"
7470then :
8868edaf 7471 ac_cv_c_volatile=yes
74091dd4 7472else $as_nop
8868edaf
CR
7473 ac_cv_c_volatile=no
7474fi
74091dd4 7475rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 7476fi
74091dd4
CR
7477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
7478printf "%s\n" "$ac_cv_c_volatile" >&6; }
8868edaf
CR
7479if test $ac_cv_c_volatile = no; then
7480
74091dd4 7481printf "%s\n" "#define volatile /**/" >>confdefs.h
8868edaf
CR
7482
7483fi
7484
74091dd4
CR
7485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
7486printf %s "checking for C/C++ restrict keyword... " >&6; }
7487if test ${ac_cv_c_restrict+y}
7488then :
7489 printf %s "(cached) " >&6
7490else $as_nop
8868edaf 7491 ac_cv_c_restrict=no
74091dd4
CR
7492 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
7493 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
7494 # Put 'restrict' last, because C++ lacks it.
7495 for ac_kw in __restrict__ __restrict _Restrict restrict; do
8868edaf
CR
7496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7497/* end confdefs.h. */
74091dd4
CR
7498typedef int *int_ptr;
7499 int foo (int_ptr $ac_kw ip) { return ip[0]; }
7500 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
7501 int bar (int ip[$ac_kw]) { return ip[0]; }
7502
8868edaf 7503int
74091dd4 7504main (void)
8868edaf
CR
7505{
7506int s[1];
74091dd4
CR
7507 int *$ac_kw t = s;
7508 t[0] = 0;
7509 return foo (t) + bar (t);
7510
8868edaf
CR
7511 ;
7512 return 0;
7513}
7514_ACEOF
74091dd4
CR
7515if ac_fn_c_try_compile "$LINENO"
7516then :
8868edaf
CR
7517 ac_cv_c_restrict=$ac_kw
7518fi
74091dd4 7519rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
7520 test "$ac_cv_c_restrict" != no && break
7521 done
7522
7523fi
74091dd4
CR
7524{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
7525printf "%s\n" "$ac_cv_c_restrict" >&6; }
8868edaf
CR
7526
7527 case $ac_cv_c_restrict in
7528 restrict) ;;
74091dd4 7529 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
8868edaf 7530 ;;
74091dd4 7531 *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
8868edaf
CR
7532 ;;
7533 esac
7534
7535
74091dd4
CR
7536
7537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
7538printf %s "checking for a race-free mkdir -p... " >&6; }
8868edaf 7539if test -z "$MKDIR_P"; then
74091dd4
CR
7540 if test ${ac_cv_path_mkdir+y}
7541then :
7542 printf %s "(cached) " >&6
7543else $as_nop
8868edaf
CR
7544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7545for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7546do
7547 IFS=$as_save_IFS
74091dd4
CR
7548 case $as_dir in #(((
7549 '') as_dir=./ ;;
7550 */) ;;
7551 *) as_dir=$as_dir/ ;;
7552 esac
8868edaf
CR
7553 for ac_prog in mkdir gmkdir; do
7554 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4
CR
7555 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
7556 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
7557 'mkdir ('*'coreutils) '* | \
7558 'BusyBox '* | \
8868edaf 7559 'mkdir (fileutils) '4.1*)
74091dd4 7560 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
8868edaf
CR
7561 break 3;;
7562 esac
7563 done
7564 done
7565 done
7566IFS=$as_save_IFS
7567
7568fi
7569
7570 test -d ./--version && rmdir ./--version
74091dd4 7571 if test ${ac_cv_path_mkdir+y}; then
8868edaf
CR
7572 MKDIR_P="$ac_cv_path_mkdir -p"
7573 else
7574 # As a last resort, use the slow shell script. Don't cache a
7575 # value for MKDIR_P within a source directory, because that will
7576 # break other packages using the cache if that directory is
7577 # removed, or if the value is a relative name.
7578 MKDIR_P="$ac_install_sh -d"
7579 fi
7580fi
74091dd4
CR
7581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7582printf "%s\n" "$MKDIR_P" >&6; }
8868edaf 7583
74091dd4
CR
7584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7585printf %s "checking for a sed that does not truncate output... " >&6; }
7586if test ${ac_cv_path_SED+y}
7587then :
7588 printf %s "(cached) " >&6
7589else $as_nop
8868edaf
CR
7590 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7591 for ac_i in 1 2 3 4 5 6 7; do
7592 ac_script="$ac_script$as_nl$ac_script"
7593 done
7594 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7595 { ac_script=; unset ac_script;}
7596 if test -z "$SED"; then
7597 ac_path_SED_found=false
7598 # Loop through the user's path and test for each of PROGNAME-LIST
7599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7600for as_dir in $PATH
7601do
7602 IFS=$as_save_IFS
74091dd4
CR
7603 case $as_dir in #(((
7604 '') as_dir=./ ;;
7605 */) ;;
7606 *) as_dir=$as_dir/ ;;
7607 esac
7608 for ac_prog in sed gsed
7609 do
8868edaf 7610 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 7611 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
8868edaf
CR
7612 as_fn_executable_p "$ac_path_SED" || continue
7613# Check for GNU ac_path_SED and select it if it is found.
7614 # Check for GNU $ac_path_SED
7615case `"$ac_path_SED" --version 2>&1` in
7616*GNU*)
7617 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7618*)
7619 ac_count=0
74091dd4 7620 printf %s 0123456789 >"conftest.in"
8868edaf
CR
7621 while :
7622 do
7623 cat "conftest.in" "conftest.in" >"conftest.tmp"
7624 mv "conftest.tmp" "conftest.in"
7625 cp "conftest.in" "conftest.nl"
74091dd4 7626 printf "%s\n" '' >> "conftest.nl"
8868edaf
CR
7627 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7628 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7629 as_fn_arith $ac_count + 1 && ac_count=$as_val
7630 if test $ac_count -gt ${ac_path_SED_max-0}; then
7631 # Best one so far, save it but keep looking for a better one
7632 ac_cv_path_SED="$ac_path_SED"
7633 ac_path_SED_max=$ac_count
7634 fi
7635 # 10*(2^10) chars as input seems more than enough
7636 test $ac_count -gt 10 && break
7637 done
7638 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7639esac
7640
7641 $ac_path_SED_found && break 3
7642 done
7643 done
7644 done
7645IFS=$as_save_IFS
7646 if test -z "$ac_cv_path_SED"; then
7647 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7648 fi
7649else
7650 ac_cv_path_SED=$SED
7651fi
7652
7653fi
74091dd4
CR
7654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7655printf "%s\n" "$ac_cv_path_SED" >&6; }
8868edaf
CR
7656 SED="$ac_cv_path_SED"
7657 rm -f conftest.sed
7658
7659
74091dd4
CR
7660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
7661printf %s "checking whether NLS is requested... " >&6; }
8868edaf 7662 # Check whether --enable-nls was given.
74091dd4
CR
7663if test ${enable_nls+y}
7664then :
8868edaf 7665 enableval=$enable_nls; USE_NLS=$enableval
74091dd4 7666else $as_nop
8868edaf
CR
7667 USE_NLS=yes
7668fi
7669
74091dd4
CR
7670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
7671printf "%s\n" "$USE_NLS" >&6; }
8868edaf
CR
7672
7673
7674
7675
7676 GETTEXT_MACRO_VERSION=0.19
7677
7678
7679
7680
7681# Prepare PATH_SEPARATOR.
7682# The user is always right.
7683if test "${PATH_SEPARATOR+set}" != set; then
7684 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
7685 # contains only /bin. Note that ksh looks also at the FPATH variable,
7686 # so we have to set that as well for the test.
7687 PATH_SEPARATOR=:
7688 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7689 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7690 || PATH_SEPARATOR=';'
7691 }
7692fi
7693
7694# Find out how to test for executable files. Don't use a zero-byte file,
7695# as systems may use methods other than mode bits to determine executability.
7696cat >conf$$.file <<_ASEOF
7697#! /bin/sh
7698exit 0
7699_ASEOF
7700chmod +x conf$$.file
7701if test -x conf$$.file >/dev/null 2>&1; then
7702 ac_executable_p="test -x"
7703else
7704 ac_executable_p="test -f"
7705fi
7706rm -f conf$$.file
7707
7708# Extract the first word of "msgfmt", so it can be a program name with args.
7709set dummy msgfmt; ac_word=$2
74091dd4
CR
7710{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7711printf %s "checking for $ac_word... " >&6; }
7712if test ${ac_cv_path_MSGFMT+y}
7713then :
7714 printf %s "(cached) " >&6
7715else $as_nop
8868edaf
CR
7716 case "$MSGFMT" in
7717 [\\/]* | ?:[\\/]*)
7718 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7719 ;;
7720 *)
7721 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7722 for ac_dir in $PATH; do
7723 IFS="$ac_save_IFS"
7724 test -z "$ac_dir" && ac_dir=.
7725 for ac_exec_ext in '' $ac_executable_extensions; do
7726 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7727 echo "$as_me: trying $ac_dir/$ac_word..." >&5
7728 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
7729 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
7730 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
7731 break 2
7732 fi
7733 fi
7734 done
7735 done
7736 IFS="$ac_save_IFS"
7737 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7738 ;;
7739esac
7740fi
7741MSGFMT="$ac_cv_path_MSGFMT"
7742if test "$MSGFMT" != ":"; then
74091dd4
CR
7743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
7744printf "%s\n" "$MSGFMT" >&6; }
8868edaf 7745else
74091dd4
CR
7746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7747printf "%s\n" "no" >&6; }
8868edaf
CR
7748fi
7749
7750 # Extract the first word of "gmsgfmt", so it can be a program name with args.
7751set dummy gmsgfmt; ac_word=$2
74091dd4
CR
7752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7753printf %s "checking for $ac_word... " >&6; }
7754if test ${ac_cv_path_GMSGFMT+y}
7755then :
7756 printf %s "(cached) " >&6
7757else $as_nop
8868edaf
CR
7758 case $GMSGFMT in
7759 [\\/]* | ?:[\\/]*)
7760 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7761 ;;
7762 *)
7763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7764for as_dir in $PATH
7765do
7766 IFS=$as_save_IFS
74091dd4
CR
7767 case $as_dir in #(((
7768 '') as_dir=./ ;;
7769 */) ;;
7770 *) as_dir=$as_dir/ ;;
7771 esac
8868edaf 7772 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4
CR
7773 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7774 ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
7775 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8868edaf
CR
7776 break 2
7777 fi
7778done
7779 done
7780IFS=$as_save_IFS
7781
7782 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7783 ;;
7784esac
7785fi
7786GMSGFMT=$ac_cv_path_GMSGFMT
7787if test -n "$GMSGFMT"; then
74091dd4
CR
7788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
7789printf "%s\n" "$GMSGFMT" >&6; }
8868edaf 7790else
74091dd4
CR
7791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7792printf "%s\n" "no" >&6; }
8868edaf
CR
7793fi
7794
7795
7796
7797 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
7798 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
7799 *) MSGFMT_015=$MSGFMT ;;
7800 esac
7801
7802 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
7803 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
7804 *) GMSGFMT_015=$GMSGFMT ;;
7805 esac
7806
7807
7808
7809# Prepare PATH_SEPARATOR.
7810# The user is always right.
7811if test "${PATH_SEPARATOR+set}" != set; then
7812 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
7813 # contains only /bin. Note that ksh looks also at the FPATH variable,
7814 # so we have to set that as well for the test.
7815 PATH_SEPARATOR=:
7816 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7817 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7818 || PATH_SEPARATOR=';'
7819 }
7820fi
7821
7822# Find out how to test for executable files. Don't use a zero-byte file,
7823# as systems may use methods other than mode bits to determine executability.
7824cat >conf$$.file <<_ASEOF
7825#! /bin/sh
7826exit 0
7827_ASEOF
7828chmod +x conf$$.file
7829if test -x conf$$.file >/dev/null 2>&1; then
7830 ac_executable_p="test -x"
7831else
7832 ac_executable_p="test -f"
7833fi
7834rm -f conf$$.file
7835
7836# Extract the first word of "xgettext", so it can be a program name with args.
7837set dummy xgettext; ac_word=$2
74091dd4
CR
7838{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7839printf %s "checking for $ac_word... " >&6; }
7840if test ${ac_cv_path_XGETTEXT+y}
7841then :
7842 printf %s "(cached) " >&6
7843else $as_nop
8868edaf
CR
7844 case "$XGETTEXT" in
7845 [\\/]* | ?:[\\/]*)
7846 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7847 ;;
7848 *)
7849 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7850 for ac_dir in $PATH; do
7851 IFS="$ac_save_IFS"
7852 test -z "$ac_dir" && ac_dir=.
7853 for ac_exec_ext in '' $ac_executable_extensions; do
7854 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7855 echo "$as_me: trying $ac_dir/$ac_word..." >&5
7856 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
7857 (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
7858 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
7859 break 2
7860 fi
7861 fi
7862 done
7863 done
7864 IFS="$ac_save_IFS"
7865 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7866 ;;
7867esac
7868fi
7869XGETTEXT="$ac_cv_path_XGETTEXT"
7870if test "$XGETTEXT" != ":"; then
74091dd4
CR
7871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
7872printf "%s\n" "$XGETTEXT" >&6; }
8868edaf 7873else
74091dd4
CR
7874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7875printf "%s\n" "no" >&6; }
8868edaf
CR
7876fi
7877
7878 rm -f messages.po
7879
7880 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
7881 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
7882 *) XGETTEXT_015=$XGETTEXT ;;
7883 esac
7884
7885
7886
7887# Prepare PATH_SEPARATOR.
7888# The user is always right.
7889if test "${PATH_SEPARATOR+set}" != set; then
7890 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
7891 # contains only /bin. Note that ksh looks also at the FPATH variable,
7892 # so we have to set that as well for the test.
7893 PATH_SEPARATOR=:
7894 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7895 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
7896 || PATH_SEPARATOR=';'
7897 }
7898fi
7899
7900# Find out how to test for executable files. Don't use a zero-byte file,
7901# as systems may use methods other than mode bits to determine executability.
7902cat >conf$$.file <<_ASEOF
7903#! /bin/sh
7904exit 0
7905_ASEOF
7906chmod +x conf$$.file
7907if test -x conf$$.file >/dev/null 2>&1; then
7908 ac_executable_p="test -x"
7909else
7910 ac_executable_p="test -f"
7911fi
7912rm -f conf$$.file
7913
7914# Extract the first word of "msgmerge", so it can be a program name with args.
7915set dummy msgmerge; ac_word=$2
74091dd4
CR
7916{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7917printf %s "checking for $ac_word... " >&6; }
7918if test ${ac_cv_path_MSGMERGE+y}
7919then :
7920 printf %s "(cached) " >&6
7921else $as_nop
8868edaf
CR
7922 case "$MSGMERGE" in
7923 [\\/]* | ?:[\\/]*)
7924 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
7925 ;;
7926 *)
7927 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
7928 for ac_dir in $PATH; do
7929 IFS="$ac_save_IFS"
7930 test -z "$ac_dir" && ac_dir=.
7931 for ac_exec_ext in '' $ac_executable_extensions; do
7932 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
7933 echo "$as_me: trying $ac_dir/$ac_word..." >&5
7934 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
7935 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
7936 break 2
7937 fi
7938 fi
7939 done
7940 done
7941 IFS="$ac_save_IFS"
7942 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
7943 ;;
7944esac
7945fi
7946MSGMERGE="$ac_cv_path_MSGMERGE"
7947if test "$MSGMERGE" != ":"; then
74091dd4
CR
7948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
7949printf "%s\n" "$MSGMERGE" >&6; }
8868edaf 7950else
74091dd4
CR
7951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7952printf "%s\n" "no" >&6; }
8868edaf
CR
7953fi
7954
7955
7956 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
7957
7958
7959 ac_config_commands="$ac_config_commands po-directories"
7960
7961
7962
74091dd4
CR
7963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2 or newer" >&5
7964printf %s "checking whether we are using the GNU C Library 2 or newer... " >&6; }
7965if test ${ac_cv_gnu_library_2+y}
7966then :
7967 printf %s "(cached) " >&6
7968else $as_nop
8868edaf
CR
7969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7970/* end confdefs.h. */
7971
7972#include <features.h>
7973#ifdef __GNU_LIBRARY__
7974 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
7975 Lucky GNU user
7976 #endif
7977#endif
7978
7979_ACEOF
7980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
7981 $EGREP "Lucky GNU user" >/dev/null 2>&1
7982then :
8868edaf 7983 ac_cv_gnu_library_2=yes
74091dd4 7984else $as_nop
8868edaf
CR
7985 ac_cv_gnu_library_2=no
7986fi
74091dd4 7987rm -rf conftest*
8868edaf
CR
7988
7989
7990
7991fi
74091dd4
CR
7992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2" >&5
7993printf "%s\n" "$ac_cv_gnu_library_2" >&6; }
8868edaf
CR
7994
7995 GLIBC2="$ac_cv_gnu_library_2"
7996
7997
7998
7999
8000 CFLAG_VISIBILITY=
8001 HAVE_VISIBILITY=0
8002 if test -n "$GCC"; then
74091dd4
CR
8003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
8004printf %s "checking whether the -Werror option is usable... " >&6; }
8005if test ${gl_cv_cc_vis_werror+y}
8006then :
8007 printf %s "(cached) " >&6
8008else $as_nop
8868edaf
CR
8009 gl_save_CFLAGS="$CFLAGS"
8010 CFLAGS="$CFLAGS -Werror"
8011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8012/* end confdefs.h. */
8013
8014int
74091dd4 8015main (void)
8868edaf
CR
8016{
8017
8018 ;
8019 return 0;
8020}
8021_ACEOF
74091dd4
CR
8022if ac_fn_c_try_compile "$LINENO"
8023then :
8868edaf 8024 gl_cv_cc_vis_werror=yes
74091dd4 8025else $as_nop
8868edaf
CR
8026 gl_cv_cc_vis_werror=no
8027fi
74091dd4 8028rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
8029 CFLAGS="$gl_save_CFLAGS"
8030
8031fi
74091dd4
CR
8032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
8033printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
8034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
8035printf %s "checking for simple visibility declarations... " >&6; }
8036if test ${gl_cv_cc_visibility+y}
8037then :
8038 printf %s "(cached) " >&6
8039else $as_nop
8868edaf
CR
8040 gl_save_CFLAGS="$CFLAGS"
8041 CFLAGS="$CFLAGS -fvisibility=hidden"
8042 if test $gl_cv_cc_vis_werror = yes; then
8043 CFLAGS="$CFLAGS -Werror"
8044 fi
8045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8046/* end confdefs.h. */
8047extern __attribute__((__visibility__("hidden"))) int hiddenvar;
8048 extern __attribute__((__visibility__("default"))) int exportedvar;
8049 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
8050 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
8051 void dummyfunc (void) {}
8052
8053int
74091dd4 8054main (void)
8868edaf
CR
8055{
8056
8057 ;
8058 return 0;
8059}
8060_ACEOF
74091dd4
CR
8061if ac_fn_c_try_compile "$LINENO"
8062then :
8868edaf 8063 gl_cv_cc_visibility=yes
74091dd4 8064else $as_nop
8868edaf
CR
8065 gl_cv_cc_visibility=no
8066fi
74091dd4 8067rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
8068 CFLAGS="$gl_save_CFLAGS"
8069
8070fi
74091dd4
CR
8071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
8072printf "%s\n" "$gl_cv_cc_visibility" >&6; }
8868edaf
CR
8073 if test $gl_cv_cc_visibility = yes; then
8074 CFLAG_VISIBILITY="-fvisibility=hidden"
8075 HAVE_VISIBILITY=1
8076 fi
8077 fi
8078
8079
8080
74091dd4 8081printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
8868edaf
CR
8082
8083
8084ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
74091dd4
CR
8085if test "x$ac_cv_type_size_t" = xyes
8086then :
8868edaf 8087
74091dd4 8088else $as_nop
8868edaf 8089
74091dd4 8090printf "%s\n" "#define size_t unsigned int" >>confdefs.h
8868edaf
CR
8091
8092fi
8093
8094
74091dd4
CR
8095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
8096printf %s "checking for stdint.h... " >&6; }
8097if test ${gl_cv_header_stdint_h+y}
8098then :
8099 printf %s "(cached) " >&6
8100else $as_nop
8868edaf
CR
8101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8102/* end confdefs.h. */
8103#include <sys/types.h>
8104 #include <stdint.h>
8105int
74091dd4 8106main (void)
8868edaf
CR
8107{
8108uintmax_t i = (uintmax_t) -1; return !i;
8109 ;
8110 return 0;
8111}
8112_ACEOF
74091dd4
CR
8113if ac_fn_c_try_compile "$LINENO"
8114then :
8868edaf 8115 gl_cv_header_stdint_h=yes
74091dd4 8116else $as_nop
8868edaf
CR
8117 gl_cv_header_stdint_h=no
8118fi
74091dd4 8119rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 8120fi
74091dd4
CR
8121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
8122printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
8868edaf
CR
8123 if test $gl_cv_header_stdint_h = yes; then
8124
74091dd4 8125printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
8868edaf
CR
8126
8127 fi
8128
8129# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8130# for constant arguments. Useless!
74091dd4
CR
8131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8132printf %s "checking for working alloca.h... " >&6; }
8133if test ${ac_cv_working_alloca_h+y}
8134then :
8135 printf %s "(cached) " >&6
8136else $as_nop
8868edaf
CR
8137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8138/* end confdefs.h. */
8139#include <alloca.h>
8140int
74091dd4 8141main (void)
8868edaf
CR
8142{
8143char *p = (char *) alloca (2 * sizeof (int));
8144 if (p) return 0;
8145 ;
8146 return 0;
8147}
8148_ACEOF
74091dd4
CR
8149if ac_fn_c_try_link "$LINENO"
8150then :
8868edaf 8151 ac_cv_working_alloca_h=yes
74091dd4 8152else $as_nop
8868edaf
CR
8153 ac_cv_working_alloca_h=no
8154fi
74091dd4 8155rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
8156 conftest$ac_exeext conftest.$ac_ext
8157fi
74091dd4
CR
8158{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8159printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
8868edaf
CR
8160if test $ac_cv_working_alloca_h = yes; then
8161
74091dd4 8162printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
8868edaf
CR
8163
8164fi
8165
74091dd4
CR
8166{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8167printf %s "checking for alloca... " >&6; }
8168if test ${ac_cv_func_alloca_works+y}
8169then :
8170 printf %s "(cached) " >&6
8171else $as_nop
8172 if test $ac_cv_working_alloca_h = yes; then
8173 ac_cv_func_alloca_works=yes
8868edaf
CR
8174else
8175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8176/* end confdefs.h. */
74091dd4
CR
8177#include <stdlib.h>
8178#include <stddef.h>
8179#ifndef alloca
8180# ifdef __GNUC__
8181# define alloca __builtin_alloca
8182# elif defined _MSC_VER
8868edaf
CR
8183# include <malloc.h>
8184# define alloca _alloca
8185# else
74091dd4
CR
8186# ifdef __cplusplus
8187extern "C"
8868edaf 8188# endif
74091dd4 8189void *alloca (size_t);
8868edaf
CR
8190# endif
8191#endif
8192
8193int
74091dd4 8194main (void)
8868edaf
CR
8195{
8196char *p = (char *) alloca (1);
8197 if (p) return 0;
8198 ;
8199 return 0;
8200}
8201_ACEOF
74091dd4
CR
8202if ac_fn_c_try_link "$LINENO"
8203then :
8868edaf 8204 ac_cv_func_alloca_works=yes
74091dd4 8205else $as_nop
8868edaf
CR
8206 ac_cv_func_alloca_works=no
8207fi
74091dd4 8208rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
8209 conftest$ac_exeext conftest.$ac_ext
8210fi
74091dd4
CR
8211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8212printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
8213fi
8868edaf
CR
8214
8215if test $ac_cv_func_alloca_works = yes; then
8216
74091dd4 8217printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
8868edaf
CR
8218
8219else
8220 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8221# that cause trouble. Some versions do not even contain alloca or
8222# contain a buggy version. If you still want to use their alloca,
8223# use ar to extract alloca.o from them instead of compiling alloca.c.
8224
8225ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8226
74091dd4 8227printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
8868edaf 8228
8868edaf 8229
74091dd4
CR
8230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8231printf %s "checking stack direction for C alloca... " >&6; }
8232if test ${ac_cv_c_stack_direction+y}
8233then :
8234 printf %s "(cached) " >&6
8235else $as_nop
8236 if test "$cross_compiling" = yes
8237then :
8868edaf 8238 ac_cv_c_stack_direction=0
74091dd4 8239else $as_nop
8868edaf
CR
8240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8241/* end confdefs.h. */
8242$ac_includes_default
8243int
8244find_stack_direction (int *addr, int depth)
8245{
8246 int dir, dummy = 0;
8247 if (! addr)
8248 addr = &dummy;
8249 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8250 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8251 return dir + dummy;
8252}
8253
8254int
8255main (int argc, char **argv)
8256{
8257 return find_stack_direction (0, argc + !argv + 20) < 0;
8258}
8259_ACEOF
74091dd4
CR
8260if ac_fn_c_try_run "$LINENO"
8261then :
8868edaf 8262 ac_cv_c_stack_direction=1
74091dd4 8263else $as_nop
8868edaf
CR
8264 ac_cv_c_stack_direction=-1
8265fi
8266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8267 conftest.$ac_objext conftest.beam conftest.$ac_ext
8268fi
8269
8270fi
74091dd4
CR
8271{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8272printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
8273printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
8868edaf
CR
8274
8275
8276fi
8277
8278
74091dd4
CR
8279ac_func=
8280for ac_item in $ac_func_c_list
8281do
8282 if test $ac_func; then
8283 ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
8284 if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
8285 echo "#define $ac_item 1" >> confdefs.h
8286 fi
8287 ac_func=
8288 else
8289 ac_func=$ac_item
8290 fi
8868edaf
CR
8291done
8292
8293
74091dd4
CR
8294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
8295printf %s "checking for working mmap... " >&6; }
8296if test ${ac_cv_func_mmap_fixed_mapped+y}
8297then :
8298 printf %s "(cached) " >&6
8299else $as_nop
8300 if test "$cross_compiling" = yes
8301then :
8302 case "$host_os" in # ((
8303 # Guess yes on platforms where we know the result.
8304 linux*) ac_cv_func_mmap_fixed_mapped=yes ;;
8305 # If we don't know, assume the worst.
8306 *) ac_cv_func_mmap_fixed_mapped=no ;;
8307 esac
8308else $as_nop
8868edaf
CR
8309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8310/* end confdefs.h. */
8311$ac_includes_default
8312/* malloc might have been renamed as rpl_malloc. */
8313#undef malloc
8314
8315/* Thanks to Mike Haertel and Jim Avera for this test.
8316 Here is a matrix of mmap possibilities:
8317 mmap private not fixed
8318 mmap private fixed at somewhere currently unmapped
8319 mmap private fixed at somewhere already mapped
8320 mmap shared not fixed
8321 mmap shared fixed at somewhere currently unmapped
8322 mmap shared fixed at somewhere already mapped
8323 For private mappings, we should verify that changes cannot be read()
8324 back from the file, nor mmap's back from the file at a different
8325 address. (There have been systems where private was not correctly
8326 implemented like the infamous i386 svr4.0, and systems where the
8327 VM page cache was not coherent with the file system buffer cache
8328 like early versions of FreeBSD and possibly contemporary NetBSD.)
8329 For shared mappings, we should conversely verify that changes get
8330 propagated back to all the places they're supposed to be.
8331
8332 Grep wants private fixed already mapped.
8333 The main things grep needs to know about mmap are:
8334 * does it exist and is it safe to write into the mmap'd area
8335 * how to use it (BSD variants) */
8336
8337#include <fcntl.h>
8338#include <sys/mman.h>
8339
8868edaf
CR
8340/* This mess was copied from the GNU getpagesize.h. */
8341#ifndef HAVE_GETPAGESIZE
8342# ifdef _SC_PAGESIZE
8343# define getpagesize() sysconf(_SC_PAGESIZE)
8344# else /* no _SC_PAGESIZE */
8345# ifdef HAVE_SYS_PARAM_H
8346# include <sys/param.h>
8347# ifdef EXEC_PAGESIZE
8348# define getpagesize() EXEC_PAGESIZE
8349# else /* no EXEC_PAGESIZE */
8350# ifdef NBPG
8351# define getpagesize() NBPG * CLSIZE
8352# ifndef CLSIZE
8353# define CLSIZE 1
8354# endif /* no CLSIZE */
8355# else /* no NBPG */
8356# ifdef NBPC
8357# define getpagesize() NBPC
8358# else /* no NBPC */
8359# ifdef PAGESIZE
8360# define getpagesize() PAGESIZE
8361# endif /* PAGESIZE */
8362# endif /* no NBPC */
8363# endif /* no NBPG */
8364# endif /* no EXEC_PAGESIZE */
8365# else /* no HAVE_SYS_PARAM_H */
8366# define getpagesize() 8192 /* punt totally */
8367# endif /* no HAVE_SYS_PARAM_H */
8368# endif /* no _SC_PAGESIZE */
8369
8370#endif /* no HAVE_GETPAGESIZE */
8371
8372int
74091dd4 8373main (void)
8868edaf
CR
8374{
8375 char *data, *data2, *data3;
8376 const char *cdata2;
8377 int i, pagesize;
8378 int fd, fd2;
8379
8380 pagesize = getpagesize ();
8381
8382 /* First, make a file with some known garbage in it. */
8383 data = (char *) malloc (pagesize);
8384 if (!data)
8385 return 1;
8386 for (i = 0; i < pagesize; ++i)
8387 *(data + i) = rand ();
8388 umask (0);
8389 fd = creat ("conftest.mmap", 0600);
8390 if (fd < 0)
8391 return 2;
8392 if (write (fd, data, pagesize) != pagesize)
8393 return 3;
8394 close (fd);
8395
8396 /* Next, check that the tail of a page is zero-filled. File must have
8397 non-zero length, otherwise we risk SIGBUS for entire page. */
8398 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
8399 if (fd2 < 0)
8400 return 4;
8401 cdata2 = "";
8402 if (write (fd2, cdata2, 1) != 1)
8403 return 5;
8404 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
8405 if (data2 == MAP_FAILED)
8406 return 6;
8407 for (i = 0; i < pagesize; ++i)
8408 if (*(data2 + i))
8409 return 7;
8410 close (fd2);
8411 if (munmap (data2, pagesize))
8412 return 8;
8413
8414 /* Next, try to mmap the file at a fixed address which already has
8415 something else allocated at it. If we can, also make sure that
8416 we see the same garbage. */
8417 fd = open ("conftest.mmap", O_RDWR);
8418 if (fd < 0)
8419 return 9;
8420 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8421 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8422 return 10;
8423 for (i = 0; i < pagesize; ++i)
8424 if (*(data + i) != *(data2 + i))
8425 return 11;
8426
8427 /* Finally, make sure that changes to the mapped area do not
8428 percolate back to the file as seen by read(). (This is a bug on
8429 some variants of i386 svr4.0.) */
8430 for (i = 0; i < pagesize; ++i)
8431 *(data2 + i) = *(data2 + i) + 1;
8432 data3 = (char *) malloc (pagesize);
8433 if (!data3)
8434 return 12;
8435 if (read (fd, data3, pagesize) != pagesize)
8436 return 13;
8437 for (i = 0; i < pagesize; ++i)
8438 if (*(data + i) != *(data3 + i))
8439 return 14;
8440 close (fd);
74091dd4
CR
8441 free (data);
8442 free (data3);
8868edaf
CR
8443 return 0;
8444}
8445_ACEOF
74091dd4
CR
8446if ac_fn_c_try_run "$LINENO"
8447then :
8868edaf 8448 ac_cv_func_mmap_fixed_mapped=yes
74091dd4 8449else $as_nop
8868edaf
CR
8450 ac_cv_func_mmap_fixed_mapped=no
8451fi
8452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8453 conftest.$ac_objext conftest.beam conftest.$ac_ext
8454fi
8455
8456fi
74091dd4
CR
8457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
8458printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; }
8868edaf
CR
8459if test $ac_cv_func_mmap_fixed_mapped = yes; then
8460
74091dd4 8461printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
8868edaf
CR
8462
8463fi
8464rm -f conftest.mmap conftest.txt
8465
8466
8467
74091dd4
CR
8468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5
8469printf %s "checking whether integer division by zero raises SIGFPE... " >&6; }
8470if test ${gt_cv_int_divbyzero_sigfpe+y}
8471then :
8472 printf %s "(cached) " >&6
8473else $as_nop
8868edaf
CR
8474
8475 gt_cv_int_divbyzero_sigfpe=
8476 case "$host_os" in
8477 macos* | darwin[6-9]* | darwin[1-9][0-9]*)
8478 # On Mac OS X 10.2 or newer, just assume the same as when cross-
8479 # compiling. If we were to perform the real test, 1 Crash Report
8480 # dialog window would pop up.
8481 case "$host_cpu" in
8482 i[34567]86 | x86_64)
8483 gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
8484 esac
8485 ;;
8486 esac
8487 if test -z "$gt_cv_int_divbyzero_sigfpe"; then
74091dd4
CR
8488 if test "$cross_compiling" = yes
8489then :
8868edaf
CR
8490
8491 # Guess based on the CPU.
8492 case "$host_cpu" in
8493 alpha* | i[34567]86 | x86_64 | m68k | s390*)
8494 gt_cv_int_divbyzero_sigfpe="guessing yes";;
8495 *)
8496 gt_cv_int_divbyzero_sigfpe="guessing no";;
8497 esac
8498
74091dd4 8499else $as_nop
8868edaf
CR
8500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8501/* end confdefs.h. */
8502
8503#include <stdlib.h>
8504#include <signal.h>
8505
8506static void
8507sigfpe_handler (int sig)
8508{
8509 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
8510 exit (sig != SIGFPE);
8511}
8512
8513int x = 1;
8514int y = 0;
8515int z;
8516int xnan;
8517
8518int main ()
8519{
8520 signal (SIGFPE, sigfpe_handler);
8521/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
8522#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
8523 signal (SIGTRAP, sigfpe_handler);
8524#endif
8525/* Linux/SPARC yields signal SIGILL. */
8526#if defined (__sparc__) && defined (__linux__)
8527 signal (SIGILL, sigfpe_handler);
8528#endif
8529
8530 z = x / y;
8531 xnan = y / y;
8532 exit (2);
8533}
8534
8535_ACEOF
74091dd4
CR
8536if ac_fn_c_try_run "$LINENO"
8537then :
8868edaf 8538 gt_cv_int_divbyzero_sigfpe=yes
74091dd4 8539else $as_nop
8868edaf
CR
8540 gt_cv_int_divbyzero_sigfpe=no
8541fi
8542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8543 conftest.$ac_objext conftest.beam conftest.$ac_ext
8544fi
8545
8546 fi
8547
8548fi
74091dd4
CR
8549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5
8550printf "%s\n" "$gt_cv_int_divbyzero_sigfpe" >&6; }
8868edaf
CR
8551 case "$gt_cv_int_divbyzero_sigfpe" in
8552 *yes) value=1;;
8553 *) value=0;;
8554 esac
8555
74091dd4 8556printf "%s\n" "#define INTDIV0_RAISES_SIGFPE $value" >>confdefs.h
8868edaf
CR
8557
8558
8559
74091dd4
CR
8560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
8561printf %s "checking for inttypes.h... " >&6; }
8562if test ${gl_cv_header_inttypes_h+y}
8563then :
8564 printf %s "(cached) " >&6
8565else $as_nop
8868edaf
CR
8566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8567/* end confdefs.h. */
8568
8569#include <sys/types.h>
8570#include <inttypes.h>
8571
8572int
74091dd4 8573main (void)
8868edaf
CR
8574{
8575uintmax_t i = (uintmax_t) -1; return !i;
8576 ;
8577 return 0;
8578}
8579_ACEOF
74091dd4
CR
8580if ac_fn_c_try_compile "$LINENO"
8581then :
8868edaf 8582 gl_cv_header_inttypes_h=yes
74091dd4 8583else $as_nop
8868edaf
CR
8584 gl_cv_header_inttypes_h=no
8585fi
74091dd4 8586rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 8587fi
74091dd4
CR
8588{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
8589printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
8868edaf
CR
8590 if test $gl_cv_header_inttypes_h = yes; then
8591
74091dd4 8592printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
8868edaf
CR
8593
8594 fi
8595
8596
74091dd4
CR
8597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
8598printf %s "checking for unsigned long long int... " >&6; }
8599if test ${ac_cv_type_unsigned_long_long_int+y}
8600then :
8601 printf %s "(cached) " >&6
8602else $as_nop
8868edaf 8603 ac_cv_type_unsigned_long_long_int=yes
74091dd4
CR
8604 case $ac_prog_cc_stdc in
8605 no | c89) ;;
8606 *)
8607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8868edaf
CR
8608/* end confdefs.h. */
8609
8610 /* For now, do not test the preprocessor; as of 2007 there are too many
8611 implementations with broken preprocessors. Perhaps this can
8612 be revisited in 2012. In the meantime, code should not expect
8613 #if to work with literals wider than 32 bits. */
8614 /* Test literals. */
8615 long long int ll = 9223372036854775807ll;
8616 long long int nll = -9223372036854775807LL;
8617 unsigned long long int ull = 18446744073709551615ULL;
8618 /* Test constant expressions. */
8619 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
8620 ? 1 : -1)];
8621 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
8622 ? 1 : -1)];
8623 int i = 63;
8624int
74091dd4 8625main (void)
8868edaf
CR
8626{
8627/* Test availability of runtime routines for shift and division. */
8628 long long int llmax = 9223372036854775807ll;
8629 unsigned long long int ullmax = 18446744073709551615ull;
8630 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
8631 | (llmax / ll) | (llmax % ll)
8632 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
8633 | (ullmax / ull) | (ullmax % ull));
8634 ;
8635 return 0;
8636}
8637
8638_ACEOF
74091dd4
CR
8639if ac_fn_c_try_link "$LINENO"
8640then :
8868edaf 8641
74091dd4 8642else $as_nop
8868edaf
CR
8643 ac_cv_type_unsigned_long_long_int=no
8644fi
74091dd4
CR
8645rm -f core conftest.err conftest.$ac_objext conftest.beam \
8646 conftest$ac_exeext conftest.$ac_ext;;
8647 esac
8868edaf 8648fi
74091dd4
CR
8649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
8650printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
8868edaf
CR
8651 if test $ac_cv_type_unsigned_long_long_int = yes; then
8652
74091dd4 8653printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8868edaf
CR
8654
8655 fi
8656
8657
8658
8659
8660 if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
8661
8662 test $ac_cv_type_unsigned_long_long_int = yes \
8663 && ac_type='unsigned long long' \
8664 || ac_type='unsigned long'
8665
74091dd4 8666printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h
8868edaf
CR
8667
8668 else
8669
74091dd4 8670printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h
8868edaf
CR
8671
8672 fi
8673
8674
74091dd4
CR
8675 ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
8676if test "x$ac_cv_header_inttypes_h" = xyes
8677then :
8678 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
8868edaf
CR
8679
8680fi
8681
8868edaf 8682 if test $ac_cv_header_inttypes_h = yes; then
74091dd4
CR
8683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
8684printf %s "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
8685if test ${gt_cv_inttypes_pri_broken+y}
8686then :
8687 printf %s "(cached) " >&6
8688else $as_nop
8868edaf
CR
8689
8690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8691/* end confdefs.h. */
8692
8693#include <inttypes.h>
8694#ifdef PRId32
8695char *p = PRId32;
8696#endif
8697
8698int
74091dd4 8699main (void)
8868edaf
CR
8700{
8701
8702 ;
8703 return 0;
8704}
8705_ACEOF
74091dd4
CR
8706if ac_fn_c_try_compile "$LINENO"
8707then :
8868edaf 8708 gt_cv_inttypes_pri_broken=no
74091dd4 8709else $as_nop
8868edaf
CR
8710 gt_cv_inttypes_pri_broken=yes
8711fi
74091dd4 8712rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
8713
8714fi
74091dd4
CR
8715{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
8716printf "%s\n" "$gt_cv_inttypes_pri_broken" >&6; }
8868edaf
CR
8717 fi
8718 if test "$gt_cv_inttypes_pri_broken" = yes; then
8719
74091dd4 8720printf "%s\n" "#define PRI_MACROS_BROKEN 1" >>confdefs.h
8868edaf
CR
8721
8722 PRI_MACROS_BROKEN=1
8723 else
8724 PRI_MACROS_BROKEN=0
8725 fi
8726
8727
8728
8729
8730
8731
8732
8733 # Check whether --enable-threads was given.
74091dd4
CR
8734if test ${enable_threads+y}
8735then :
8868edaf 8736 enableval=$enable_threads; gl_use_threads=$enableval
74091dd4 8737else $as_nop
8868edaf
CR
8738 if test -n "$gl_use_threads_default"; then
8739 gl_use_threads="$gl_use_threads_default"
8740 else
8741 case "$host_os" in
8742 osf*) gl_use_threads=no ;;
8743 cygwin*)
8744 case `uname -r` in
8745 1.[0-5].*) gl_use_threads=no ;;
8746 *) gl_use_threads=yes ;;
8747 esac
8748 ;;
8749 *) gl_use_threads=yes ;;
8750 esac
8751 fi
8752
8753fi
8754
8755 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
8756 # For using <pthread.h>:
8757 case "$host_os" in
8758 osf*)
8759 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
8760 # groks <pthread.h>. cc also understands the flag -pthread, but
8761 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
8762 # 2. putting a flag into CPPFLAGS that has an effect on the linker
8763 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
8764 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
8765 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
8766 ;;
8767 esac
8768 # Some systems optimize for single-threaded programs by default, and
8769 # need special flags to disable these optimizations. For example, the
8770 # definition of 'errno' in <errno.h>.
8771 case "$host_os" in
74091dd4 8772 aix* | freebsd* | midnightbsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
8868edaf
CR
8773 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
8774 esac
8775 fi
8776
8777
8778
8779
8780
8781 if test "X$prefix" = "XNONE"; then
8782 acl_final_prefix="$ac_default_prefix"
8783 else
8784 acl_final_prefix="$prefix"
8785 fi
8786 if test "X$exec_prefix" = "XNONE"; then
8787 acl_final_exec_prefix='${prefix}'
8788 else
8789 acl_final_exec_prefix="$exec_prefix"
8790 fi
8791 acl_save_prefix="$prefix"
8792 prefix="$acl_final_prefix"
8793 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8794 prefix="$acl_save_prefix"
8795
8796
8797
8798# Check whether --with-gnu-ld was given.
74091dd4
CR
8799if test ${with_gnu_ld+y}
8800then :
8868edaf 8801 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
74091dd4 8802else $as_nop
8868edaf
CR
8803 with_gnu_ld=no
8804fi
8805
8806# Prepare PATH_SEPARATOR.
8807# The user is always right.
8808if test "${PATH_SEPARATOR+set}" != set; then
8809 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
8810 # contains only /bin. Note that ksh looks also at the FPATH variable,
8811 # so we have to set that as well for the test.
8812 PATH_SEPARATOR=:
8813 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
8814 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
8815 || PATH_SEPARATOR=';'
8816 }
8817fi
8818
8819if test -n "$LD"; then
74091dd4
CR
8820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
8821printf %s "checking for ld... " >&6; }
8868edaf 8822elif test "$GCC" = yes; then
74091dd4
CR
8823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8824printf %s "checking for ld used by $CC... " >&6; }
8868edaf 8825elif test "$with_gnu_ld" = yes; then
74091dd4
CR
8826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8827printf %s "checking for GNU ld... " >&6; }
8868edaf 8828else
74091dd4
CR
8829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8830printf %s "checking for non-GNU ld... " >&6; }
8868edaf
CR
8831fi
8832if test -n "$LD"; then
8833 # Let the user override the test with a path.
8834 :
8835else
74091dd4
CR
8836 if test ${acl_cv_path_LD+y}
8837then :
8838 printf %s "(cached) " >&6
8839else $as_nop
8868edaf
CR
8840
8841 acl_cv_path_LD= # Final result of this test
8842 ac_prog=ld # Program to search in $PATH
8843 if test "$GCC" = yes; then
8844 # Check if gcc -print-prog-name=ld gives a path.
8845 case $host in
8846 *-*-mingw*)
8847 # gcc leaves a trailing carriage return which upsets mingw
8848 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8849 *)
8850 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
8851 esac
8852 case $acl_output in
8853 # Accept absolute paths.
8854 [\\/]* | ?:[\\/]*)
8855 re_direlt='/[^/][^/]*/\.\./'
8856 # Canonicalize the pathname of ld
8857 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
8858 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
8859 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
8860 done
8861 # Got the pathname. No search in PATH is needed.
8862 acl_cv_path_LD="$acl_output"
8863 ac_prog=
8864 ;;
8865 "")
8866 # If it fails, then pretend we aren't using GCC.
8867 ;;
8868 *)
8869 # If it is relative, then search for the first ld in PATH.
8870 with_gnu_ld=unknown
8871 ;;
8872 esac
8873 fi
8874 if test -n "$ac_prog"; then
8875 # Search for $ac_prog in $PATH.
8876 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8877 for ac_dir in $PATH; do
8878 IFS="$acl_save_ifs"
8879 test -z "$ac_dir" && ac_dir=.
8880 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8881 acl_cv_path_LD="$ac_dir/$ac_prog"
8882 # Check to see if the program is GNU ld. I'd rather use --version,
8883 # but apparently some variants of GNU ld only accept -v.
8884 # Break only if it was the GNU/non-GNU ld that we prefer.
8885 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
8886 *GNU* | *'with BFD'*)
8887 test "$with_gnu_ld" != no && break
8888 ;;
8889 *)
8890 test "$with_gnu_ld" != yes && break
8891 ;;
8892 esac
8893 fi
8894 done
8895 IFS="$acl_save_ifs"
8896 fi
8897 case $host in
8898 *-*-aix*)
8899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8900/* end confdefs.h. */
8901#if defined __powerpc64__ || defined _ARCH_PPC64
8902 int ok;
8903 #else
8904 error fail
8905 #endif
8906
8907_ACEOF
74091dd4
CR
8908if ac_fn_c_try_compile "$LINENO"
8909then :
8868edaf
CR
8910 # The compiler produces 64-bit code. Add option '-b64' so that the
8911 # linker groks 64-bit object files.
8912 case "$acl_cv_path_LD " in
8913 *" -b64 "*) ;;
8914 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
8915 esac
8916
8917fi
74091dd4 8918rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
8919 ;;
8920 sparc64-*-netbsd*)
8921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8922/* end confdefs.h. */
8923#if defined __sparcv9 || defined __arch64__
8924 int ok;
8925 #else
8926 error fail
8927 #endif
8928
8929_ACEOF
74091dd4
CR
8930if ac_fn_c_try_compile "$LINENO"
8931then :
8868edaf 8932
74091dd4 8933else $as_nop
8868edaf
CR
8934 # The compiler produces 32-bit code. Add option '-m elf32_sparc'
8935 # so that the linker groks 32-bit object files.
8936 case "$acl_cv_path_LD " in
8937 *" -m elf32_sparc "*) ;;
8938 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
8939 esac
8940
8941fi
74091dd4 8942rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
8943 ;;
8944 esac
8945
8946fi
8947
8948 LD="$acl_cv_path_LD"
8949fi
8950if test -n "$LD"; then
74091dd4
CR
8951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8952printf "%s\n" "$LD" >&6; }
8868edaf 8953else
74091dd4
CR
8954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8955printf "%s\n" "no" >&6; }
8868edaf
CR
8956 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8957fi
74091dd4
CR
8958{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8959printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8960if test ${acl_cv_prog_gnu_ld+y}
8961then :
8962 printf %s "(cached) " >&6
8963else $as_nop
8868edaf
CR
8964 # I'd rather use --version here, but apparently some GNU lds only accept -v.
8965case `$LD -v 2>&1 </dev/null` in
8966*GNU* | *'with BFD'*)
8967 acl_cv_prog_gnu_ld=yes
8968 ;;
8969*)
8970 acl_cv_prog_gnu_ld=no
8971 ;;
8972esac
8973fi
74091dd4
CR
8974{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8975printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
8868edaf
CR
8976with_gnu_ld=$acl_cv_prog_gnu_ld
8977
8978
8979
8980
74091dd4
CR
8981
8982
8983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8984printf %s "checking for shared library run path origin... " >&6; }
8985if test ${acl_cv_rpath+y}
8986then :
8987 printf %s "(cached) " >&6
8988else $as_nop
8868edaf
CR
8989
8990 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8991 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8992 . ./conftest.sh
8993 rm -f ./conftest.sh
8994 acl_cv_rpath=done
8995
8996fi
74091dd4
CR
8997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8998printf "%s\n" "$acl_cv_rpath" >&6; }
8868edaf
CR
8999 wl="$acl_cv_wl"
9000 acl_libext="$acl_cv_libext"
9001 acl_shlibext="$acl_cv_shlibext"
9002 acl_libname_spec="$acl_cv_libname_spec"
9003 acl_library_names_spec="$acl_cv_library_names_spec"
9004 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
9005 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
9006 acl_hardcode_direct="$acl_cv_hardcode_direct"
9007 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
9008 # Check whether --enable-rpath was given.
74091dd4
CR
9009if test ${enable_rpath+y}
9010then :
8868edaf 9011 enableval=$enable_rpath; :
74091dd4 9012else $as_nop
8868edaf
CR
9013 enable_rpath=yes
9014fi
9015
9016
9017
9018
74091dd4
CR
9019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
9020printf %s "checking 32-bit host C ABI... " >&6; }
9021if test ${gl_cv_host_cpu_c_abi_32bit+y}
9022then :
9023 printf %s "(cached) " >&6
9024else $as_nop
8868edaf
CR
9025 if test -n "$gl_cv_host_cpu_c_abi"; then
9026 case "$gl_cv_host_cpu_c_abi" in
9027 i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
9028 gl_cv_host_cpu_c_abi_32bit=yes ;;
9029 *)
9030 gl_cv_host_cpu_c_abi_32bit=no ;;
9031 esac
9032 else
9033 case "$host_cpu" in
9034
9035 i[4567]86 )
9036 gl_cv_host_cpu_c_abi_32bit=yes
9037 ;;
9038
9039 x86_64 )
9040 # On x86_64 systems, the C compiler may be generating code in one of
9041 # these ABIs:
9042 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
9043 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
9044 # with native Windows (mingw, MSVC).
9045 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
9046 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
9047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9048/* end confdefs.h. */
9049#if (defined __x86_64__ || defined __amd64__ \
9050 || defined _M_X64 || defined _M_AMD64) \
9051 && !(defined __ILP32__ || defined _ILP32)
9052 int ok;
9053 #else
9054 error fail
9055 #endif
9056
9057_ACEOF
74091dd4
CR
9058if ac_fn_c_try_compile "$LINENO"
9059then :
8868edaf 9060 gl_cv_host_cpu_c_abi_32bit=no
74091dd4 9061else $as_nop
8868edaf
CR
9062 gl_cv_host_cpu_c_abi_32bit=yes
9063fi
74091dd4 9064rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
9065 ;;
9066
9067 arm* | aarch64 )
9068 # Assume arm with EABI.
9069 # On arm64 systems, the C compiler may be generating code in one of
9070 # these ABIs:
9071 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
9072 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
9073 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
9074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9075/* end confdefs.h. */
9076#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
9077 int ok;
9078 #else
9079 error fail
9080 #endif
9081
9082_ACEOF
74091dd4
CR
9083if ac_fn_c_try_compile "$LINENO"
9084then :
8868edaf 9085 gl_cv_host_cpu_c_abi_32bit=no
74091dd4 9086else $as_nop
8868edaf
CR
9087 gl_cv_host_cpu_c_abi_32bit=yes
9088fi
74091dd4 9089rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
9090 ;;
9091
9092 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
9093 # On hppa, the C compiler may be generating 32-bit code or 64-bit
9094 # code. In the latter case, it defines _LP64 and __LP64__.
9095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9096/* end confdefs.h. */
9097#ifdef __LP64__
9098 int ok;
9099 #else
9100 error fail
9101 #endif
9102
9103_ACEOF
74091dd4
CR
9104if ac_fn_c_try_compile "$LINENO"
9105then :
8868edaf 9106 gl_cv_host_cpu_c_abi_32bit=no
74091dd4 9107else $as_nop
8868edaf
CR
9108 gl_cv_host_cpu_c_abi_32bit=yes
9109fi
74091dd4 9110rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
9111 ;;
9112
9113 ia64* )
9114 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
9115 # 32-bit code. In the latter case, it defines _ILP32.
9116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9117/* end confdefs.h. */
9118#ifdef _ILP32
9119 int ok;
9120 #else
9121 error fail
9122 #endif
9123
9124_ACEOF
74091dd4
CR
9125if ac_fn_c_try_compile "$LINENO"
9126then :
8868edaf 9127 gl_cv_host_cpu_c_abi_32bit=yes
74091dd4 9128else $as_nop
8868edaf
CR
9129 gl_cv_host_cpu_c_abi_32bit=no
9130fi
74091dd4 9131rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
9132 ;;
9133
9134 mips* )
9135 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
9136 # at 32.
9137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9138/* end confdefs.h. */
9139#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
9140 int ok;
9141 #else
9142 error fail
9143 #endif
9144
9145_ACEOF
74091dd4
CR
9146if ac_fn_c_try_compile "$LINENO"
9147then :
8868edaf 9148 gl_cv_host_cpu_c_abi_32bit=no
74091dd4 9149else $as_nop
8868edaf
CR
9150 gl_cv_host_cpu_c_abi_32bit=yes
9151fi
74091dd4 9152rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
9153 ;;
9154
9155 powerpc* )
9156 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
9157 # No need to distinguish them here; the caller may distinguish
9158 # them based on the OS.
9159 # On powerpc64 systems, the C compiler may still be generating
9160 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
9161 # be generating 64-bit code.
9162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9163/* end confdefs.h. */
9164#if defined __powerpc64__ || defined _ARCH_PPC64
9165 int ok;
9166 #else
9167 error fail
9168 #endif
9169
9170_ACEOF
74091dd4
CR
9171if ac_fn_c_try_compile "$LINENO"
9172then :
8868edaf 9173 gl_cv_host_cpu_c_abi_32bit=no
74091dd4 9174else $as_nop
8868edaf
CR
9175 gl_cv_host_cpu_c_abi_32bit=yes
9176fi
74091dd4 9177rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
9178 ;;
9179
9180 rs6000 )
9181 gl_cv_host_cpu_c_abi_32bit=yes
9182 ;;
9183
9184 riscv32 | riscv64 )
9185 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
9186 # Size of 'long' and 'void *':
9187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9188/* end confdefs.h. */
9189#if defined __LP64__
9190 int ok;
9191 #else
9192 error fail
9193 #endif
9194
9195_ACEOF
74091dd4
CR
9196if ac_fn_c_try_compile "$LINENO"
9197then :
8868edaf 9198 gl_cv_host_cpu_c_abi_32bit=no
74091dd4 9199else $as_nop
8868edaf
CR
9200 gl_cv_host_cpu_c_abi_32bit=yes
9201fi
74091dd4 9202rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
9203 ;;
9204
9205 s390* )
9206 # On s390x, the C compiler may be generating 64-bit (= s390x) code
9207 # or 31-bit (= s390) code.
9208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9209/* end confdefs.h. */
9210#if defined __LP64__ || defined __s390x__
9211 int ok;
9212 #else
9213 error fail
9214 #endif
9215
9216_ACEOF
74091dd4
CR
9217if ac_fn_c_try_compile "$LINENO"
9218then :
8868edaf 9219 gl_cv_host_cpu_c_abi_32bit=no
74091dd4 9220else $as_nop
8868edaf
CR
9221 gl_cv_host_cpu_c_abi_32bit=yes
9222fi
74091dd4 9223rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
9224 ;;
9225
9226 sparc | sparc64 )
9227 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
9228 # C compiler still generates 32-bit code.
9229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9230/* end confdefs.h. */
9231#if defined __sparcv9 || defined __arch64__
9232 int ok;
9233 #else
9234 error fail
9235 #endif
9236
9237_ACEOF
74091dd4
CR
9238if ac_fn_c_try_compile "$LINENO"
9239then :
8868edaf 9240 gl_cv_host_cpu_c_abi_32bit=no
74091dd4 9241else $as_nop
8868edaf
CR
9242 gl_cv_host_cpu_c_abi_32bit=yes
9243fi
74091dd4 9244rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
9245 ;;
9246
9247 *)
9248 gl_cv_host_cpu_c_abi_32bit=no
9249 ;;
9250 esac
9251 fi
9252
9253fi
74091dd4
CR
9254{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
9255printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
8868edaf
CR
9256
9257 HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
9258
9259
9260
9261
9262
9263 case "$host_os" in
9264 solaris*)
74091dd4
CR
9265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
9266printf %s "checking for 64-bit host... " >&6; }
9267if test ${gl_cv_solaris_64bit+y}
9268then :
9269 printf %s "(cached) " >&6
9270else $as_nop
8868edaf
CR
9271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9272/* end confdefs.h. */
9273#ifdef _LP64
9274 int ok;
9275 #else
9276 error fail
9277 #endif
9278
9279_ACEOF
74091dd4
CR
9280if ac_fn_c_try_compile "$LINENO"
9281then :
8868edaf 9282 gl_cv_solaris_64bit=yes
74091dd4 9283else $as_nop
8868edaf
CR
9284 gl_cv_solaris_64bit=no
9285fi
74091dd4 9286rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
9287
9288fi
74091dd4
CR
9289{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
9290printf "%s\n" "$gl_cv_solaris_64bit" >&6; };;
8868edaf
CR
9291 esac
9292
74091dd4
CR
9293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
9294printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
9295if test ${acl_cv_libdirstems+y}
9296then :
9297 printf %s "(cached) " >&6
9298else $as_nop
8868edaf
CR
9299 acl_libdirstem=lib
9300 acl_libdirstem2=
9301 case "$host_os" in
9302 solaris*)
9303 if test $gl_cv_solaris_64bit = yes; then
9304 acl_libdirstem=lib/64
9305 case "$host_cpu" in
9306 sparc*) acl_libdirstem2=lib/sparcv9 ;;
9307 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
9308 esac
9309 fi
9310 ;;
9311 *)
9312 if test "$HOST_CPU_C_ABI_32BIT" != yes; then
9313 searchpath=`(if test -f /usr/bin/gcc \
9314 && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
9315 LC_ALL=C /usr/bin/gcc -print-search-dirs; \
9316 else \
9317 LC_ALL=C $CC -print-search-dirs; \
9318 fi) 2>/dev/null \
9319 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
9320 if test -n "$searchpath"; then
9321 acl_save_IFS="${IFS= }"; IFS=":"
9322 for searchdir in $searchpath; do
9323 if test -d "$searchdir"; then
9324 case "$searchdir" in
9325 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
9326 */../ | */.. )
9327 # Better ignore directories of this form. They are misleading.
9328 ;;
9329 *) searchdir=`cd "$searchdir" && pwd`
9330 case "$searchdir" in
9331 */lib64 ) acl_libdirstem=lib64 ;;
9332 esac ;;
9333 esac
9334 fi
9335 done
9336 IFS="$acl_save_IFS"
9337 fi
9338 fi
9339 ;;
9340 esac
9341 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
9342 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
9343
9344fi
74091dd4
CR
9345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
9346printf "%s\n" "$acl_cv_libdirstems" >&6; }
8868edaf
CR
9347 # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
9348 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
9349 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
9350
9351
9352
9353 gl_threads_api=none
9354 LIBTHREAD=
9355 LTLIBTHREAD=
9356 LIBMULTITHREAD=
9357 LTLIBMULTITHREAD=
9358 if test "$gl_use_threads" != no; then
74091dd4
CR
9359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
9360printf %s "checking whether imported symbols can be declared weak... " >&6; }
9361if test ${gl_cv_have_weak+y}
9362then :
9363 printf %s "(cached) " >&6
9364else $as_nop
8868edaf
CR
9365 gl_cv_have_weak=no
9366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9367/* end confdefs.h. */
9368extern void xyzzy ();
9369#pragma weak xyzzy
9370int
74091dd4 9371main (void)
8868edaf
CR
9372{
9373xyzzy();
9374 ;
9375 return 0;
9376}
9377_ACEOF
74091dd4
CR
9378if ac_fn_c_try_link "$LINENO"
9379then :
8868edaf
CR
9380 gl_cv_have_weak=maybe
9381fi
74091dd4 9382rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
9383 conftest$ac_exeext conftest.$ac_ext
9384 if test $gl_cv_have_weak = maybe; then
74091dd4
CR
9385 if test "$cross_compiling" = yes
9386then :
8868edaf
CR
9387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9388/* end confdefs.h. */
9389#ifdef __ELF__
9390 Extensible Linking Format
9391 #endif
9392
9393_ACEOF
9394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
9395 $EGREP "Extensible Linking Format" >/dev/null 2>&1
9396then :
8868edaf 9397 gl_cv_have_weak="guessing yes"
74091dd4 9398else $as_nop
8868edaf
CR
9399 gl_cv_have_weak="guessing no"
9400fi
74091dd4 9401rm -rf conftest*
8868edaf
CR
9402
9403
74091dd4 9404else $as_nop
8868edaf
CR
9405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9406/* end confdefs.h. */
9407
9408#include <stdio.h>
9409#pragma weak fputs
9410int main ()
9411{
9412 return (fputs == NULL);
9413}
9414_ACEOF
74091dd4
CR
9415if ac_fn_c_try_run "$LINENO"
9416then :
8868edaf 9417 gl_cv_have_weak=yes
74091dd4 9418else $as_nop
8868edaf
CR
9419 gl_cv_have_weak=no
9420fi
9421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9422 conftest.$ac_objext conftest.beam conftest.$ac_ext
9423fi
9424
9425 fi
9426 case " $LDFLAGS " in
9427 *" -static "*) gl_cv_have_weak=no ;;
9428 esac
9429
9430fi
74091dd4
CR
9431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
9432printf "%s\n" "$gl_cv_have_weak" >&6; }
8868edaf
CR
9433 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
9434 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
9435 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
74091dd4
CR
9436 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
9437if test "x$ac_cv_header_pthread_h" = xyes
9438then :
8868edaf 9439 gl_have_pthread_h=yes
74091dd4 9440else $as_nop
8868edaf
CR
9441 gl_have_pthread_h=no
9442fi
9443
8868edaf
CR
9444 if test "$gl_have_pthread_h" = yes; then
9445 # Other possible tests:
9446 # -lpthreads (FSU threads, PCthreads)
9447 # -lgthreads
9448 gl_have_pthread=
9449 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
9450 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
9451 # the second one only in libpthread, and lock.c needs it.
9452 #
9453 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
9454 # needs -pthread for some reason. See:
9455 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
9456 save_LIBS=$LIBS
9457 for gl_pthread in '' '-pthread'; do
9458 LIBS="$LIBS $gl_pthread"
9459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9460/* end confdefs.h. */
9461#include <pthread.h>
9462 pthread_mutex_t m;
9463 pthread_mutexattr_t ma;
9464
9465int
74091dd4 9466main (void)
8868edaf
CR
9467{
9468pthread_mutex_lock (&m);
9469 pthread_mutexattr_init (&ma);
9470 ;
9471 return 0;
9472}
9473_ACEOF
74091dd4
CR
9474if ac_fn_c_try_link "$LINENO"
9475then :
8868edaf
CR
9476 gl_have_pthread=yes
9477 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
9478 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
9479fi
74091dd4 9480rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
9481 conftest$ac_exeext conftest.$ac_ext
9482 LIBS=$save_LIBS
9483 test -n "$gl_have_pthread" && break
9484 done
9485
9486 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
9487 # since it is defined as a macro on OSF/1.)
9488 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
9489 # The program links fine without libpthread. But it may actually
9490 # need to link with libpthread in order to create multiple threads.
74091dd4
CR
9491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
9492printf %s "checking for pthread_kill in -lpthread... " >&6; }
9493if test ${ac_cv_lib_pthread_pthread_kill+y}
9494then :
9495 printf %s "(cached) " >&6
9496else $as_nop
8868edaf
CR
9497 ac_check_lib_save_LIBS=$LIBS
9498LIBS="-lpthread $LIBS"
9499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9500/* end confdefs.h. */
9501
9502/* Override any GCC internal prototype to avoid an error.
9503 Use char because int might match the return type of a GCC
9504 builtin and then its argument prototype would still apply. */
8868edaf
CR
9505char pthread_kill ();
9506int
74091dd4 9507main (void)
8868edaf
CR
9508{
9509return pthread_kill ();
9510 ;
9511 return 0;
9512}
9513_ACEOF
74091dd4
CR
9514if ac_fn_c_try_link "$LINENO"
9515then :
8868edaf 9516 ac_cv_lib_pthread_pthread_kill=yes
74091dd4 9517else $as_nop
8868edaf
CR
9518 ac_cv_lib_pthread_pthread_kill=no
9519fi
74091dd4 9520rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
9521 conftest$ac_exeext conftest.$ac_ext
9522LIBS=$ac_check_lib_save_LIBS
9523fi
74091dd4
CR
9524{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
9525printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
9526if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
9527then :
8868edaf
CR
9528 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
9529 # On Solaris and HP-UX, most pthread functions exist also in libc.
9530 # Therefore pthread_in_use() needs to actually try to create a
9531 # thread: pthread_create from libc will fail, whereas
9532 # pthread_create will actually create a thread.
9533 # On Solaris 10 or newer, this test is no longer needed, because
9534 # libc contains the fully functional pthread functions.
9535 case "$host_os" in
9536 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
9537
74091dd4 9538printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
8868edaf
CR
9539
9540 esac
9541
9542fi
9543
9544 elif test -z "$gl_have_pthread"; then
9545 # Some library is needed. Try libpthread and libc_r.
74091dd4
CR
9546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
9547printf %s "checking for pthread_kill in -lpthread... " >&6; }
9548if test ${ac_cv_lib_pthread_pthread_kill+y}
9549then :
9550 printf %s "(cached) " >&6
9551else $as_nop
8868edaf
CR
9552 ac_check_lib_save_LIBS=$LIBS
9553LIBS="-lpthread $LIBS"
9554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9555/* end confdefs.h. */
9556
9557/* Override any GCC internal prototype to avoid an error.
9558 Use char because int might match the return type of a GCC
9559 builtin and then its argument prototype would still apply. */
8868edaf
CR
9560char pthread_kill ();
9561int
74091dd4 9562main (void)
8868edaf
CR
9563{
9564return pthread_kill ();
9565 ;
9566 return 0;
9567}
9568_ACEOF
74091dd4
CR
9569if ac_fn_c_try_link "$LINENO"
9570then :
8868edaf 9571 ac_cv_lib_pthread_pthread_kill=yes
74091dd4 9572else $as_nop
8868edaf
CR
9573 ac_cv_lib_pthread_pthread_kill=no
9574fi
74091dd4 9575rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
9576 conftest$ac_exeext conftest.$ac_ext
9577LIBS=$ac_check_lib_save_LIBS
9578fi
74091dd4
CR
9579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
9580printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
9581if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
9582then :
8868edaf
CR
9583 gl_have_pthread=yes
9584 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
9585 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
9586fi
9587
9588 if test -z "$gl_have_pthread"; then
9589 # For FreeBSD 4.
74091dd4
CR
9590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
9591printf %s "checking for pthread_kill in -lc_r... " >&6; }
9592if test ${ac_cv_lib_c_r_pthread_kill+y}
9593then :
9594 printf %s "(cached) " >&6
9595else $as_nop
8868edaf
CR
9596 ac_check_lib_save_LIBS=$LIBS
9597LIBS="-lc_r $LIBS"
9598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9599/* end confdefs.h. */
9600
9601/* Override any GCC internal prototype to avoid an error.
9602 Use char because int might match the return type of a GCC
9603 builtin and then its argument prototype would still apply. */
8868edaf
CR
9604char pthread_kill ();
9605int
74091dd4 9606main (void)
8868edaf
CR
9607{
9608return pthread_kill ();
9609 ;
9610 return 0;
9611}
9612_ACEOF
74091dd4
CR
9613if ac_fn_c_try_link "$LINENO"
9614then :
8868edaf 9615 ac_cv_lib_c_r_pthread_kill=yes
74091dd4 9616else $as_nop
8868edaf
CR
9617 ac_cv_lib_c_r_pthread_kill=no
9618fi
74091dd4 9619rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
9620 conftest$ac_exeext conftest.$ac_ext
9621LIBS=$ac_check_lib_save_LIBS
9622fi
74091dd4
CR
9623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
9624printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
9625if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
9626then :
8868edaf
CR
9627 gl_have_pthread=yes
9628 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
9629 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
9630fi
9631
9632 fi
9633 fi
9634 if test -n "$gl_have_pthread"; then
9635 gl_threads_api=posix
9636
74091dd4 9637printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
8868edaf
CR
9638
9639 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
9640 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
9641
74091dd4 9642printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
8868edaf
CR
9643
9644 LIBTHREAD=
9645 LTLIBTHREAD=
9646 fi
9647 fi
9648 fi
9649 fi
9650 fi
9651 if test -z "$gl_have_pthread"; then
9652 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
9653 gl_have_solaristhread=
9654 gl_save_LIBS="$LIBS"
9655 LIBS="$LIBS -lthread"
9656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9657/* end confdefs.h. */
9658
9659#include <thread.h>
9660#include <synch.h>
9661
9662int
74091dd4 9663main (void)
8868edaf
CR
9664{
9665thr_self();
9666 ;
9667 return 0;
9668}
9669_ACEOF
74091dd4
CR
9670if ac_fn_c_try_link "$LINENO"
9671then :
8868edaf
CR
9672 gl_have_solaristhread=yes
9673fi
74091dd4 9674rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
9675 conftest$ac_exeext conftest.$ac_ext
9676 LIBS="$gl_save_LIBS"
9677 if test -n "$gl_have_solaristhread"; then
9678 gl_threads_api=solaris
9679 LIBTHREAD=-lthread
9680 LTLIBTHREAD=-lthread
9681 LIBMULTITHREAD="$LIBTHREAD"
9682 LTLIBMULTITHREAD="$LTLIBTHREAD"
9683
74091dd4 9684printf "%s\n" "#define USE_SOLARIS_THREADS 1" >>confdefs.h
8868edaf
CR
9685
9686 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
9687
74091dd4 9688printf "%s\n" "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
8868edaf
CR
9689
9690 LIBTHREAD=
9691 LTLIBTHREAD=
9692 fi
9693 fi
9694 fi
9695 fi
9696 if test "$gl_use_threads" = pth; then
9697 gl_save_CPPFLAGS="$CPPFLAGS"
9698
9699
9700
9701
9702
74091dd4
CR
9703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
9704printf %s "checking how to link with libpth... " >&6; }
9705if test ${ac_cv_libpth_libs+y}
9706then :
9707 printf %s "(cached) " >&6
9708else $as_nop
8868edaf
CR
9709
9710
9711
9712
9713
9714
9715
9716 use_additional=yes
9717
9718 acl_save_prefix="$prefix"
9719 prefix="$acl_final_prefix"
9720 acl_save_exec_prefix="$exec_prefix"
9721 exec_prefix="$acl_final_exec_prefix"
9722
9723 eval additional_includedir=\"$includedir\"
9724 eval additional_libdir=\"$libdir\"
9725
9726 exec_prefix="$acl_save_exec_prefix"
9727 prefix="$acl_save_prefix"
9728
9729
9730# Check whether --with-libpth-prefix was given.
74091dd4
CR
9731if test ${with_libpth_prefix+y}
9732then :
8868edaf
CR
9733 withval=$with_libpth_prefix;
9734 if test "X$withval" = "Xno"; then
9735 use_additional=no
9736 else
9737 if test "X$withval" = "X"; then
9738
9739 acl_save_prefix="$prefix"
9740 prefix="$acl_final_prefix"
9741 acl_save_exec_prefix="$exec_prefix"
9742 exec_prefix="$acl_final_exec_prefix"
9743
9744 eval additional_includedir=\"$includedir\"
9745 eval additional_libdir=\"$libdir\"
9746
9747 exec_prefix="$acl_save_exec_prefix"
9748 prefix="$acl_save_prefix"
9749
9750 else
9751 additional_includedir="$withval/include"
9752 additional_libdir="$withval/$acl_libdirstem"
9753 if test "$acl_libdirstem2" != "$acl_libdirstem" \
9754 && test ! -d "$withval/$acl_libdirstem"; then
9755 additional_libdir="$withval/$acl_libdirstem2"
9756 fi
9757 fi
9758 fi
9759
9760fi
9761
9762 LIBPTH=
9763 LTLIBPTH=
9764 INCPTH=
9765 LIBPTH_PREFIX=
9766 HAVE_LIBPTH=
9767 rpathdirs=
9768 ltrpathdirs=
9769 names_already_handled=
9770 names_next_round='pth '
9771 while test -n "$names_next_round"; do
9772 names_this_round="$names_next_round"
9773 names_next_round=
9774 for name in $names_this_round; do
9775 already_handled=
9776 for n in $names_already_handled; do
9777 if test "$n" = "$name"; then
9778 already_handled=yes
9779 break
9780 fi
9781 done
9782 if test -z "$already_handled"; then
9783 names_already_handled="$names_already_handled $name"
9784 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
9785 eval value=\"\$HAVE_LIB$uppername\"
9786 if test -n "$value"; then
9787 if test "$value" = yes; then
9788 eval value=\"\$LIB$uppername\"
9789 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
9790 eval value=\"\$LTLIB$uppername\"
9791 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
9792 else
9793 :
9794 fi
9795 else
9796 found_dir=
9797 found_la=
9798 found_so=
9799 found_a=
9800 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
9801 if test -n "$acl_shlibext"; then
9802 shrext=".$acl_shlibext" # typically: shrext=.so
9803 else
9804 shrext=
9805 fi
9806 if test $use_additional = yes; then
9807 dir="$additional_libdir"
9808 if test -n "$acl_shlibext"; then
9809 if test -f "$dir/$libname$shrext"; then
9810 found_dir="$dir"
9811 found_so="$dir/$libname$shrext"
9812 else
9813 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9814 ver=`(cd "$dir" && \
9815 for f in "$libname$shrext".*; do echo "$f"; done \
9816 | sed -e "s,^$libname$shrext\\\\.,," \
9817 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9818 | sed 1q ) 2>/dev/null`
9819 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9820 found_dir="$dir"
9821 found_so="$dir/$libname$shrext.$ver"
9822 fi
9823 else
9824 eval library_names=\"$acl_library_names_spec\"
9825 for f in $library_names; do
9826 if test -f "$dir/$f"; then
9827 found_dir="$dir"
9828 found_so="$dir/$f"
9829 break
9830 fi
9831 done
9832 fi
9833 fi
9834 fi
9835 if test "X$found_dir" = "X"; then
9836 if test -f "$dir/$libname.$acl_libext"; then
9837 found_dir="$dir"
9838 found_a="$dir/$libname.$acl_libext"
9839 fi
9840 fi
9841 if test "X$found_dir" != "X"; then
9842 if test -f "$dir/$libname.la"; then
9843 found_la="$dir/$libname.la"
9844 fi
9845 fi
9846 fi
9847 if test "X$found_dir" = "X"; then
9848 for x in $LDFLAGS $LTLIBPTH; do
9849
9850 acl_save_prefix="$prefix"
9851 prefix="$acl_final_prefix"
9852 acl_save_exec_prefix="$exec_prefix"
9853 exec_prefix="$acl_final_exec_prefix"
9854 eval x=\"$x\"
9855 exec_prefix="$acl_save_exec_prefix"
9856 prefix="$acl_save_prefix"
9857
9858 case "$x" in
9859 -L*)
9860 dir=`echo "X$x" | sed -e 's/^X-L//'`
9861 if test -n "$acl_shlibext"; then
9862 if test -f "$dir/$libname$shrext"; then
9863 found_dir="$dir"
9864 found_so="$dir/$libname$shrext"
9865 else
9866 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9867 ver=`(cd "$dir" && \
9868 for f in "$libname$shrext".*; do echo "$f"; done \
9869 | sed -e "s,^$libname$shrext\\\\.,," \
9870 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9871 | sed 1q ) 2>/dev/null`
9872 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9873 found_dir="$dir"
9874 found_so="$dir/$libname$shrext.$ver"
9875 fi
9876 else
9877 eval library_names=\"$acl_library_names_spec\"
9878 for f in $library_names; do
9879 if test -f "$dir/$f"; then
9880 found_dir="$dir"
9881 found_so="$dir/$f"
9882 break
9883 fi
9884 done
9885 fi
9886 fi
9887 fi
9888 if test "X$found_dir" = "X"; then
9889 if test -f "$dir/$libname.$acl_libext"; then
9890 found_dir="$dir"
9891 found_a="$dir/$libname.$acl_libext"
9892 fi
9893 fi
9894 if test "X$found_dir" != "X"; then
9895 if test -f "$dir/$libname.la"; then
9896 found_la="$dir/$libname.la"
9897 fi
9898 fi
9899 ;;
9900 esac
9901 if test "X$found_dir" != "X"; then
9902 break
9903 fi
9904 done
9905 fi
9906 if test "X$found_dir" != "X"; then
9907 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
9908 if test "X$found_so" != "X"; then
9909 if test "$enable_rpath" = no \
9910 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
9911 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
9912 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
9913 else
9914 haveit=
9915 for x in $ltrpathdirs; do
9916 if test "X$x" = "X$found_dir"; then
9917 haveit=yes
9918 break
9919 fi
9920 done
9921 if test -z "$haveit"; then
9922 ltrpathdirs="$ltrpathdirs $found_dir"
9923 fi
9924 if test "$acl_hardcode_direct" = yes; then
9925 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
9926 else
9927 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
9928 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
9929 haveit=
9930 for x in $rpathdirs; do
9931 if test "X$x" = "X$found_dir"; then
9932 haveit=yes
9933 break
9934 fi
9935 done
9936 if test -z "$haveit"; then
9937 rpathdirs="$rpathdirs $found_dir"
9938 fi
9939 else
9940 haveit=
9941 for x in $LDFLAGS $LIBPTH; do
9942
9943 acl_save_prefix="$prefix"
9944 prefix="$acl_final_prefix"
9945 acl_save_exec_prefix="$exec_prefix"
9946 exec_prefix="$acl_final_exec_prefix"
9947 eval x=\"$x\"
9948 exec_prefix="$acl_save_exec_prefix"
9949 prefix="$acl_save_prefix"
9950
9951 if test "X$x" = "X-L$found_dir"; then
9952 haveit=yes
9953 break
9954 fi
9955 done
9956 if test -z "$haveit"; then
9957 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
9958 fi
9959 if test "$acl_hardcode_minus_L" != no; then
9960 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
9961 else
9962 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
9963 fi
9964 fi
9965 fi
9966 fi
9967 else
9968 if test "X$found_a" != "X"; then
9969 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
9970 else
9971 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
9972 fi
9973 fi
9974 additional_includedir=
9975 case "$found_dir" in
9976 */$acl_libdirstem | */$acl_libdirstem/)
9977 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
9978 if test "$name" = 'pth'; then
9979 LIBPTH_PREFIX="$basedir"
9980 fi
9981 additional_includedir="$basedir/include"
9982 ;;
9983 */$acl_libdirstem2 | */$acl_libdirstem2/)
9984 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
9985 if test "$name" = 'pth'; then
9986 LIBPTH_PREFIX="$basedir"
9987 fi
9988 additional_includedir="$basedir/include"
9989 ;;
9990 esac
9991 if test "X$additional_includedir" != "X"; then
9992 if test "X$additional_includedir" != "X/usr/include"; then
9993 haveit=
9994 if test "X$additional_includedir" = "X/usr/local/include"; then
9995 if test -n "$GCC"; then
9996 case $host_os in
9997 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9998 esac
9999 fi
10000 fi
10001 if test -z "$haveit"; then
10002 for x in $CPPFLAGS $INCPTH; do
10003
10004 acl_save_prefix="$prefix"
10005 prefix="$acl_final_prefix"
10006 acl_save_exec_prefix="$exec_prefix"
10007 exec_prefix="$acl_final_exec_prefix"
10008 eval x=\"$x\"
10009 exec_prefix="$acl_save_exec_prefix"
10010 prefix="$acl_save_prefix"
10011
10012 if test "X$x" = "X-I$additional_includedir"; then
10013 haveit=yes
10014 break
10015 fi
10016 done
10017 if test -z "$haveit"; then
10018 if test -d "$additional_includedir"; then
10019 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
10020 fi
10021 fi
10022 fi
10023 fi
10024 fi
10025 if test -n "$found_la"; then
10026 save_libdir="$libdir"
10027 case "$found_la" in
10028 */* | *\\*) . "$found_la" ;;
10029 *) . "./$found_la" ;;
10030 esac
10031 libdir="$save_libdir"
10032 for dep in $dependency_libs; do
10033 case "$dep" in
10034 -L*)
10035 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10036 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
10037 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
10038 haveit=
10039 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
10040 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
10041 if test -n "$GCC"; then
10042 case $host_os in
10043 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10044 esac
10045 fi
10046 fi
10047 if test -z "$haveit"; then
10048 haveit=
10049 for x in $LDFLAGS $LIBPTH; do
10050
10051 acl_save_prefix="$prefix"
10052 prefix="$acl_final_prefix"
10053 acl_save_exec_prefix="$exec_prefix"
10054 exec_prefix="$acl_final_exec_prefix"
10055 eval x=\"$x\"
10056 exec_prefix="$acl_save_exec_prefix"
10057 prefix="$acl_save_prefix"
10058
10059 if test "X$x" = "X-L$additional_libdir"; then
10060 haveit=yes
10061 break
10062 fi
10063 done
10064 if test -z "$haveit"; then
10065 if test -d "$additional_libdir"; then
10066 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
10067 fi
10068 fi
10069 haveit=
10070 for x in $LDFLAGS $LTLIBPTH; do
10071
10072 acl_save_prefix="$prefix"
10073 prefix="$acl_final_prefix"
10074 acl_save_exec_prefix="$exec_prefix"
10075 exec_prefix="$acl_final_exec_prefix"
10076 eval x=\"$x\"
10077 exec_prefix="$acl_save_exec_prefix"
10078 prefix="$acl_save_prefix"
10079
10080 if test "X$x" = "X-L$additional_libdir"; then
10081 haveit=yes
10082 break
10083 fi
10084 done
10085 if test -z "$haveit"; then
10086 if test -d "$additional_libdir"; then
10087 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
10088 fi
10089 fi
10090 fi
10091 fi
10092 ;;
10093 -R*)
10094 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10095 if test "$enable_rpath" != no; then
10096 haveit=
10097 for x in $rpathdirs; do
10098 if test "X$x" = "X$dir"; then
10099 haveit=yes
10100 break
10101 fi
10102 done
10103 if test -z "$haveit"; then
10104 rpathdirs="$rpathdirs $dir"
10105 fi
10106 haveit=
10107 for x in $ltrpathdirs; do
10108 if test "X$x" = "X$dir"; then
10109 haveit=yes
10110 break
10111 fi
10112 done
10113 if test -z "$haveit"; then
10114 ltrpathdirs="$ltrpathdirs $dir"
10115 fi
10116 fi
10117 ;;
10118 -l*)
10119 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10120 ;;
10121 *.la)
10122 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10123 ;;
10124 *)
10125 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
10126 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
10127 ;;
10128 esac
10129 done
10130 fi
10131 else
10132 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
10133 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
10134 fi
10135 fi
10136 fi
10137 done
10138 done
10139 if test "X$rpathdirs" != "X"; then
10140 if test -n "$acl_hardcode_libdir_separator"; then
10141 alldirs=
10142 for found_dir in $rpathdirs; do
10143 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
10144 done
10145 acl_save_libdir="$libdir"
10146 libdir="$alldirs"
10147 eval flag=\"$acl_hardcode_libdir_flag_spec\"
10148 libdir="$acl_save_libdir"
10149 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
10150 else
10151 for found_dir in $rpathdirs; do
10152 acl_save_libdir="$libdir"
10153 libdir="$found_dir"
10154 eval flag=\"$acl_hardcode_libdir_flag_spec\"
10155 libdir="$acl_save_libdir"
10156 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
10157 done
10158 fi
10159 fi
10160 if test "X$ltrpathdirs" != "X"; then
10161 for found_dir in $ltrpathdirs; do
10162 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
10163 done
10164 fi
10165
10166
10167
10168
10169
10170 ac_cv_libpth_libs="$LIBPTH"
10171 ac_cv_libpth_ltlibs="$LTLIBPTH"
10172 ac_cv_libpth_cppflags="$INCPTH"
10173 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
10174
10175fi
74091dd4
CR
10176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
10177printf "%s\n" "$ac_cv_libpth_libs" >&6; }
8868edaf
CR
10178 LIBPTH="$ac_cv_libpth_libs"
10179 LTLIBPTH="$ac_cv_libpth_ltlibs"
10180 INCPTH="$ac_cv_libpth_cppflags"
10181 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
10182
10183 for element in $INCPTH; do
10184 haveit=
10185 for x in $CPPFLAGS; do
10186
10187 acl_save_prefix="$prefix"
10188 prefix="$acl_final_prefix"
10189 acl_save_exec_prefix="$exec_prefix"
10190 exec_prefix="$acl_final_exec_prefix"
10191 eval x=\"$x\"
10192 exec_prefix="$acl_save_exec_prefix"
10193 prefix="$acl_save_prefix"
10194
10195 if test "X$x" = "X$element"; then
10196 haveit=yes
10197 break
10198 fi
10199 done
10200 if test -z "$haveit"; then
10201 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10202 fi
10203 done
10204
10205
10206
10207
10208 HAVE_LIBPTH=yes
10209
10210
10211
10212 gl_have_pth=
10213 gl_save_LIBS="$LIBS"
10214 LIBS="$LIBS $LIBPTH"
10215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10216/* end confdefs.h. */
10217#include <pth.h>
10218int
74091dd4 10219main (void)
8868edaf
CR
10220{
10221pth_self();
10222 ;
10223 return 0;
10224}
10225_ACEOF
74091dd4
CR
10226if ac_fn_c_try_link "$LINENO"
10227then :
8868edaf
CR
10228 gl_have_pth=yes
10229fi
74091dd4 10230rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
10231 conftest$ac_exeext conftest.$ac_ext
10232 LIBS="$gl_save_LIBS"
10233 if test -n "$gl_have_pth"; then
10234 gl_threads_api=pth
10235 LIBTHREAD="$LIBPTH"
10236 LTLIBTHREAD="$LTLIBPTH"
10237 LIBMULTITHREAD="$LIBTHREAD"
10238 LTLIBMULTITHREAD="$LTLIBTHREAD"
10239
74091dd4 10240printf "%s\n" "#define USE_PTH_THREADS 1" >>confdefs.h
8868edaf
CR
10241
10242 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
10243 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
10244
74091dd4 10245printf "%s\n" "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
8868edaf
CR
10246
10247 LIBTHREAD=
10248 LTLIBTHREAD=
10249 fi
10250 fi
10251 else
10252 CPPFLAGS="$gl_save_CPPFLAGS"
10253 fi
10254 fi
10255 if test -z "$gl_have_pthread"; then
10256 case "$gl_use_threads" in
10257 yes | windows | win32) # The 'win32' is for backward compatibility.
10258 if { case "$host_os" in
10259 mingw*) true;;
10260 *) false;;
10261 esac
10262 }; then
10263 gl_threads_api=windows
10264
74091dd4 10265printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
8868edaf
CR
10266
10267 fi
10268 ;;
10269 esac
10270 fi
10271 fi
74091dd4
CR
10272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
10273printf %s "checking for multithread API to use... " >&6; }
10274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
10275printf "%s\n" "$gl_threads_api" >&6; }
8868edaf
CR
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287 if test "$gl_threads_api" = posix; then
10288 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
10289 # pthread_rwlock_* functions.
10290 has_rwlock=false
10291 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
10292"
74091dd4
CR
10293if test "x$ac_cv_type_pthread_rwlock_t" = xyes
10294then :
8868edaf
CR
10295 has_rwlock=true
10296
74091dd4 10297printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
8868edaf
CR
10298
10299fi
10300
10301 if $has_rwlock; then
10302
10303
74091dd4
CR
10304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
10305printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
10306if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
10307then :
10308 printf %s "(cached) " >&6
10309else $as_nop
8868edaf
CR
10310 save_LIBS="$LIBS"
10311 LIBS="$LIBS $LIBMULTITHREAD"
74091dd4
CR
10312 if test "$cross_compiling" = yes
10313then :
8868edaf 10314 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
74091dd4 10315else $as_nop
8868edaf
CR
10316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10317/* end confdefs.h. */
10318
10319#include <errno.h>
10320#include <pthread.h>
10321#include <stdlib.h>
10322#include <unistd.h>
10323
10324#define SUCCEED() exit (0)
10325#define FAILURE() exit (1)
10326#define UNEXPECTED(n) (exit (10 + (n)))
10327
10328/* The main thread creates the waiting writer and the requesting reader threads
10329 in the default way; this guarantees that they have the same priority.
10330 We can reuse the main thread as first reader thread. */
10331
10332static pthread_rwlock_t lock;
10333static pthread_t reader1;
10334static pthread_t writer;
10335static pthread_t reader2;
10336static pthread_t timer;
10337/* Used to pass control from writer to reader2 and from reader2 to timer,
10338 as in a relay race.
10339 Passing control from one running thread to another running thread
10340 is most likely faster than to create the second thread. */
10341static pthread_mutex_t baton;
10342
10343static void *
10344timer_func (void *ignored)
10345{
10346 /* Step 13 (can be before or after step 12):
10347 The timer thread takes the baton, then waits a moment to make sure
10348 it can tell whether the second reader thread is blocked at step 12. */
10349 if (pthread_mutex_lock (&baton))
10350 UNEXPECTED (13);
10351 usleep (100000);
10352 /* By the time we get here, it's clear that the second reader thread is
10353 blocked at step 12. This is the desired behaviour. */
10354 SUCCEED ();
10355}
10356
10357static void *
10358reader2_func (void *ignored)
10359{
10360 int err;
10361
10362 /* Step 8 (can be before or after step 7):
10363 The second reader thread takes the baton, then waits a moment to make sure
10364 the writer thread has reached step 7. */
10365 if (pthread_mutex_lock (&baton))
10366 UNEXPECTED (8);
10367 usleep (100000);
10368 /* Step 9: The second reader thread requests the lock. */
10369 err = pthread_rwlock_tryrdlock (&lock);
10370 if (err == 0)
10371 FAILURE ();
10372 else if (err != EBUSY)
10373 UNEXPECTED (9);
10374 /* Step 10: Launch a timer, to test whether the next call blocks. */
10375 if (pthread_create (&timer, NULL, timer_func, NULL))
10376 UNEXPECTED (10);
10377 /* Step 11: Release the baton. */
10378 if (pthread_mutex_unlock (&baton))
10379 UNEXPECTED (11);
10380 /* Step 12: The second reader thread requests the lock. */
10381 err = pthread_rwlock_rdlock (&lock);
10382 if (err == 0)
10383 FAILURE ();
10384 else
10385 UNEXPECTED (12);
10386}
10387
10388static void *
10389writer_func (void *ignored)
10390{
10391 /* Step 4: Take the baton, so that the second reader thread does not go ahead
10392 too early. */
10393 if (pthread_mutex_lock (&baton))
10394 UNEXPECTED (4);
10395 /* Step 5: Create the second reader thread. */
10396 if (pthread_create (&reader2, NULL, reader2_func, NULL))
10397 UNEXPECTED (5);
10398 /* Step 6: Release the baton. */
10399 if (pthread_mutex_unlock (&baton))
10400 UNEXPECTED (6);
10401 /* Step 7: The writer thread requests the lock. */
10402 if (pthread_rwlock_wrlock (&lock))
10403 UNEXPECTED (7);
10404 return NULL;
10405}
10406
10407int
10408main ()
10409{
10410 reader1 = pthread_self ();
10411
10412 /* Step 1: The main thread initializes the lock and the baton. */
10413 if (pthread_rwlock_init (&lock, NULL))
10414 UNEXPECTED (1);
10415 if (pthread_mutex_init (&baton, NULL))
10416 UNEXPECTED (1);
10417 /* Step 2: The main thread acquires the lock as a reader. */
10418 if (pthread_rwlock_rdlock (&lock))
10419 UNEXPECTED (2);
10420 /* Step 3: Create the writer thread. */
10421 if (pthread_create (&writer, NULL, writer_func, NULL))
10422 UNEXPECTED (3);
10423 /* Job done. Go to sleep. */
10424 for (;;)
10425 {
10426 sleep (1);
10427 }
10428}
10429
10430_ACEOF
74091dd4
CR
10431if ac_fn_c_try_run "$LINENO"
10432then :
8868edaf 10433 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
74091dd4 10434else $as_nop
8868edaf
CR
10435 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
10436fi
10437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10438 conftest.$ac_objext conftest.beam conftest.$ac_ext
10439fi
10440
10441 LIBS="$save_LIBS"
10442
10443fi
74091dd4
CR
10444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
10445printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
8868edaf
CR
10446 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
10447 *yes)
10448
74091dd4 10449printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
8868edaf
CR
10450
10451 ;;
10452 esac
10453
10454 fi
10455 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
10456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10457/* end confdefs.h. */
10458
10459 #include <pthread.h>
10460int
74091dd4 10461main (void)
8868edaf
CR
10462{
10463
10464#if __FreeBSD__ == 4
10465error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
10466#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
10467 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
10468error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
10469#else
10470int x = (int)PTHREAD_MUTEX_RECURSIVE;
10471return !x;
10472#endif
10473
10474 ;
10475 return 0;
10476}
10477_ACEOF
74091dd4
CR
10478if ac_fn_c_try_compile "$LINENO"
10479then :
8868edaf 10480
74091dd4 10481printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
8868edaf
CR
10482
10483fi
74091dd4 10484rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
10485 fi
10486 :
10487
74091dd4
CR
10488{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
10489printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
10490if test ${ac_cv_c_undeclared_builtin_options+y}
10491then :
10492 printf %s "(cached) " >&6
10493else $as_nop
10494 ac_save_CFLAGS=$CFLAGS
10495 ac_cv_c_undeclared_builtin_options='cannot detect'
10496 for ac_arg in '' -fno-builtin; do
10497 CFLAGS="$ac_save_CFLAGS $ac_arg"
10498 # This test program should *not* compile successfully.
10499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10500/* end confdefs.h. */
10501
10502int
10503main (void)
10504{
10505(void) strchr;
10506 ;
10507 return 0;
10508}
10509_ACEOF
10510if ac_fn_c_try_compile "$LINENO"
10511then :
10512
10513else $as_nop
10514 # This test program should compile successfully.
10515 # No library function is consistently available on
10516 # freestanding implementations, so test against a dummy
10517 # declaration. Include always-available headers on the
10518 # off chance that they somehow elicit warnings.
10519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10520/* end confdefs.h. */
10521#include <float.h>
10522#include <limits.h>
10523#include <stdarg.h>
10524#include <stddef.h>
10525extern void ac_decl (int, char *);
10526
10527int
10528main (void)
10529{
10530(void) ac_decl (0, (char *) 0);
10531 (void) ac_decl;
10532
10533 ;
10534 return 0;
10535}
10536_ACEOF
10537if ac_fn_c_try_compile "$LINENO"
10538then :
10539 if test x"$ac_arg" = x
10540then :
10541 ac_cv_c_undeclared_builtin_options='none needed'
10542else $as_nop
10543 ac_cv_c_undeclared_builtin_options=$ac_arg
10544fi
10545 break
10546fi
10547rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10548fi
10549rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10550 done
10551 CFLAGS=$ac_save_CFLAGS
10552
10553fi
10554{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
10555printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
10556 case $ac_cv_c_undeclared_builtin_options in #(
10557 'cannot detect') :
10558 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10559printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
10560as_fn_error $? "cannot make $CC report undeclared builtins
10561See \`config.log' for more details" "$LINENO" 5; } ;; #(
10562 'none needed') :
10563 ac_c_undeclared_builtin_options='' ;; #(
10564 *) :
10565 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
10566esac
10567
8868edaf
CR
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578 use_additional=yes
10579
10580 acl_save_prefix="$prefix"
10581 prefix="$acl_final_prefix"
10582 acl_save_exec_prefix="$exec_prefix"
10583 exec_prefix="$acl_final_exec_prefix"
10584
10585 eval additional_includedir=\"$includedir\"
10586 eval additional_libdir=\"$libdir\"
10587
10588 exec_prefix="$acl_save_exec_prefix"
10589 prefix="$acl_save_prefix"
10590
10591
10592# Check whether --with-libiconv-prefix was given.
74091dd4
CR
10593if test ${with_libiconv_prefix+y}
10594then :
8868edaf
CR
10595 withval=$with_libiconv_prefix;
10596 if test "X$withval" = "Xno"; then
10597 use_additional=no
10598 else
10599 if test "X$withval" = "X"; then
10600
10601 acl_save_prefix="$prefix"
10602 prefix="$acl_final_prefix"
10603 acl_save_exec_prefix="$exec_prefix"
10604 exec_prefix="$acl_final_exec_prefix"
10605
10606 eval additional_includedir=\"$includedir\"
10607 eval additional_libdir=\"$libdir\"
10608
10609 exec_prefix="$acl_save_exec_prefix"
10610 prefix="$acl_save_prefix"
10611
10612 else
10613 additional_includedir="$withval/include"
10614 additional_libdir="$withval/$acl_libdirstem"
10615 if test "$acl_libdirstem2" != "$acl_libdirstem" \
10616 && test ! -d "$withval/$acl_libdirstem"; then
10617 additional_libdir="$withval/$acl_libdirstem2"
10618 fi
10619 fi
10620 fi
10621
10622fi
10623
10624 LIBICONV=
10625 LTLIBICONV=
10626 INCICONV=
10627 LIBICONV_PREFIX=
10628 HAVE_LIBICONV=
10629 rpathdirs=
10630 ltrpathdirs=
10631 names_already_handled=
10632 names_next_round='iconv '
10633 while test -n "$names_next_round"; do
10634 names_this_round="$names_next_round"
10635 names_next_round=
10636 for name in $names_this_round; do
10637 already_handled=
10638 for n in $names_already_handled; do
10639 if test "$n" = "$name"; then
10640 already_handled=yes
10641 break
10642 fi
10643 done
10644 if test -z "$already_handled"; then
10645 names_already_handled="$names_already_handled $name"
10646 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
10647 eval value=\"\$HAVE_LIB$uppername\"
10648 if test -n "$value"; then
10649 if test "$value" = yes; then
10650 eval value=\"\$LIB$uppername\"
10651 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10652 eval value=\"\$LTLIB$uppername\"
10653 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10654 else
10655 :
10656 fi
10657 else
10658 found_dir=
10659 found_la=
10660 found_so=
10661 found_a=
10662 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
10663 if test -n "$acl_shlibext"; then
10664 shrext=".$acl_shlibext" # typically: shrext=.so
10665 else
10666 shrext=
10667 fi
10668 if test $use_additional = yes; then
10669 dir="$additional_libdir"
10670 if test -n "$acl_shlibext"; then
10671 if test -f "$dir/$libname$shrext"; then
10672 found_dir="$dir"
10673 found_so="$dir/$libname$shrext"
10674 else
10675 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
10676 ver=`(cd "$dir" && \
10677 for f in "$libname$shrext".*; do echo "$f"; done \
10678 | sed -e "s,^$libname$shrext\\\\.,," \
10679 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10680 | sed 1q ) 2>/dev/null`
10681 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
10682 found_dir="$dir"
10683 found_so="$dir/$libname$shrext.$ver"
10684 fi
10685 else
10686 eval library_names=\"$acl_library_names_spec\"
10687 for f in $library_names; do
10688 if test -f "$dir/$f"; then
10689 found_dir="$dir"
10690 found_so="$dir/$f"
10691 break
10692 fi
10693 done
10694 fi
10695 fi
10696 fi
10697 if test "X$found_dir" = "X"; then
10698 if test -f "$dir/$libname.$acl_libext"; then
10699 found_dir="$dir"
10700 found_a="$dir/$libname.$acl_libext"
10701 fi
10702 fi
10703 if test "X$found_dir" != "X"; then
10704 if test -f "$dir/$libname.la"; then
10705 found_la="$dir/$libname.la"
10706 fi
10707 fi
10708 fi
10709 if test "X$found_dir" = "X"; then
10710 for x in $LDFLAGS $LTLIBICONV; do
10711
10712 acl_save_prefix="$prefix"
10713 prefix="$acl_final_prefix"
10714 acl_save_exec_prefix="$exec_prefix"
10715 exec_prefix="$acl_final_exec_prefix"
10716 eval x=\"$x\"
10717 exec_prefix="$acl_save_exec_prefix"
10718 prefix="$acl_save_prefix"
10719
10720 case "$x" in
10721 -L*)
10722 dir=`echo "X$x" | sed -e 's/^X-L//'`
10723 if test -n "$acl_shlibext"; then
10724 if test -f "$dir/$libname$shrext"; then
10725 found_dir="$dir"
10726 found_so="$dir/$libname$shrext"
10727 else
10728 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
10729 ver=`(cd "$dir" && \
10730 for f in "$libname$shrext".*; do echo "$f"; done \
10731 | sed -e "s,^$libname$shrext\\\\.,," \
10732 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10733 | sed 1q ) 2>/dev/null`
10734 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
10735 found_dir="$dir"
10736 found_so="$dir/$libname$shrext.$ver"
10737 fi
10738 else
10739 eval library_names=\"$acl_library_names_spec\"
10740 for f in $library_names; do
10741 if test -f "$dir/$f"; then
10742 found_dir="$dir"
10743 found_so="$dir/$f"
10744 break
10745 fi
10746 done
10747 fi
10748 fi
10749 fi
10750 if test "X$found_dir" = "X"; then
10751 if test -f "$dir/$libname.$acl_libext"; then
10752 found_dir="$dir"
10753 found_a="$dir/$libname.$acl_libext"
10754 fi
10755 fi
10756 if test "X$found_dir" != "X"; then
10757 if test -f "$dir/$libname.la"; then
10758 found_la="$dir/$libname.la"
10759 fi
10760 fi
10761 ;;
10762 esac
10763 if test "X$found_dir" != "X"; then
10764 break
10765 fi
10766 done
10767 fi
10768 if test "X$found_dir" != "X"; then
10769 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10770 if test "X$found_so" != "X"; then
10771 if test "$enable_rpath" = no \
10772 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
10773 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
10774 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10775 else
10776 haveit=
10777 for x in $ltrpathdirs; do
10778 if test "X$x" = "X$found_dir"; then
10779 haveit=yes
10780 break
10781 fi
10782 done
10783 if test -z "$haveit"; then
b80f6443
JA
10784 ltrpathdirs="$ltrpathdirs $found_dir"
10785 fi
8868edaf 10786 if test "$acl_hardcode_direct" = yes; then
b80f6443
JA
10787 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10788 else
8868edaf 10789 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
b80f6443
JA
10790 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10791 haveit=
10792 for x in $rpathdirs; do
10793 if test "X$x" = "X$found_dir"; then
10794 haveit=yes
10795 break
10796 fi
8868edaf
CR
10797 done
10798 if test -z "$haveit"; then
10799 rpathdirs="$rpathdirs $found_dir"
10800 fi
10801 else
10802 haveit=
10803 for x in $LDFLAGS $LIBICONV; do
10804
10805 acl_save_prefix="$prefix"
10806 prefix="$acl_final_prefix"
10807 acl_save_exec_prefix="$exec_prefix"
10808 exec_prefix="$acl_final_exec_prefix"
10809 eval x=\"$x\"
10810 exec_prefix="$acl_save_exec_prefix"
10811 prefix="$acl_save_prefix"
10812
10813 if test "X$x" = "X-L$found_dir"; then
10814 haveit=yes
10815 break
10816 fi
10817 done
10818 if test -z "$haveit"; then
10819 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10820 fi
10821 if test "$acl_hardcode_minus_L" != no; then
10822 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10823 else
10824 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10825 fi
10826 fi
10827 fi
10828 fi
10829 else
10830 if test "X$found_a" != "X"; then
10831 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10832 else
10833 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10834 fi
10835 fi
10836 additional_includedir=
10837 case "$found_dir" in
10838 */$acl_libdirstem | */$acl_libdirstem/)
10839 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
10840 if test "$name" = 'iconv'; then
10841 LIBICONV_PREFIX="$basedir"
10842 fi
10843 additional_includedir="$basedir/include"
10844 ;;
10845 */$acl_libdirstem2 | */$acl_libdirstem2/)
10846 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
10847 if test "$name" = 'iconv'; then
10848 LIBICONV_PREFIX="$basedir"
10849 fi
10850 additional_includedir="$basedir/include"
10851 ;;
10852 esac
10853 if test "X$additional_includedir" != "X"; then
10854 if test "X$additional_includedir" != "X/usr/include"; then
10855 haveit=
10856 if test "X$additional_includedir" = "X/usr/local/include"; then
10857 if test -n "$GCC"; then
10858 case $host_os in
10859 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10860 esac
10861 fi
10862 fi
10863 if test -z "$haveit"; then
10864 for x in $CPPFLAGS $INCICONV; do
10865
10866 acl_save_prefix="$prefix"
10867 prefix="$acl_final_prefix"
10868 acl_save_exec_prefix="$exec_prefix"
10869 exec_prefix="$acl_final_exec_prefix"
10870 eval x=\"$x\"
10871 exec_prefix="$acl_save_exec_prefix"
10872 prefix="$acl_save_prefix"
10873
10874 if test "X$x" = "X-I$additional_includedir"; then
10875 haveit=yes
10876 break
10877 fi
10878 done
10879 if test -z "$haveit"; then
10880 if test -d "$additional_includedir"; then
10881 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10882 fi
10883 fi
10884 fi
10885 fi
10886 fi
10887 if test -n "$found_la"; then
10888 save_libdir="$libdir"
10889 case "$found_la" in
10890 */* | *\\*) . "$found_la" ;;
10891 *) . "./$found_la" ;;
10892 esac
10893 libdir="$save_libdir"
10894 for dep in $dependency_libs; do
10895 case "$dep" in
10896 -L*)
10897 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10898 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
10899 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
10900 haveit=
10901 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
10902 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
10903 if test -n "$GCC"; then
10904 case $host_os in
10905 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10906 esac
10907 fi
10908 fi
10909 if test -z "$haveit"; then
10910 haveit=
10911 for x in $LDFLAGS $LIBICONV; do
10912
10913 acl_save_prefix="$prefix"
10914 prefix="$acl_final_prefix"
10915 acl_save_exec_prefix="$exec_prefix"
10916 exec_prefix="$acl_final_exec_prefix"
10917 eval x=\"$x\"
10918 exec_prefix="$acl_save_exec_prefix"
10919 prefix="$acl_save_prefix"
10920
10921 if test "X$x" = "X-L$additional_libdir"; then
10922 haveit=yes
10923 break
10924 fi
10925 done
10926 if test -z "$haveit"; then
10927 if test -d "$additional_libdir"; then
10928 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
10929 fi
10930 fi
10931 haveit=
10932 for x in $LDFLAGS $LTLIBICONV; do
10933
10934 acl_save_prefix="$prefix"
10935 prefix="$acl_final_prefix"
10936 acl_save_exec_prefix="$exec_prefix"
10937 exec_prefix="$acl_final_exec_prefix"
10938 eval x=\"$x\"
10939 exec_prefix="$acl_save_exec_prefix"
10940 prefix="$acl_save_prefix"
10941
10942 if test "X$x" = "X-L$additional_libdir"; then
10943 haveit=yes
10944 break
10945 fi
10946 done
10947 if test -z "$haveit"; then
10948 if test -d "$additional_libdir"; then
10949 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
10950 fi
10951 fi
10952 fi
10953 fi
10954 ;;
10955 -R*)
10956 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10957 if test "$enable_rpath" != no; then
10958 haveit=
10959 for x in $rpathdirs; do
10960 if test "X$x" = "X$dir"; then
10961 haveit=yes
10962 break
10963 fi
10964 done
10965 if test -z "$haveit"; then
10966 rpathdirs="$rpathdirs $dir"
10967 fi
10968 haveit=
10969 for x in $ltrpathdirs; do
10970 if test "X$x" = "X$dir"; then
10971 haveit=yes
10972 break
10973 fi
10974 done
10975 if test -z "$haveit"; then
10976 ltrpathdirs="$ltrpathdirs $dir"
10977 fi
b80f6443 10978 fi
8868edaf
CR
10979 ;;
10980 -l*)
10981 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10982 ;;
10983 *.la)
10984 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10985 ;;
10986 *)
10987 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
10988 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
10989 ;;
10990 esac
10991 done
10992 fi
10993 else
10994 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10995 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
10996 fi
10997 fi
10998 fi
10999 done
11000 done
11001 if test "X$rpathdirs" != "X"; then
11002 if test -n "$acl_hardcode_libdir_separator"; then
11003 alldirs=
11004 for found_dir in $rpathdirs; do
11005 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
11006 done
11007 acl_save_libdir="$libdir"
11008 libdir="$alldirs"
11009 eval flag=\"$acl_hardcode_libdir_flag_spec\"
11010 libdir="$acl_save_libdir"
11011 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11012 else
11013 for found_dir in $rpathdirs; do
11014 acl_save_libdir="$libdir"
11015 libdir="$found_dir"
11016 eval flag=\"$acl_hardcode_libdir_flag_spec\"
11017 libdir="$acl_save_libdir"
11018 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11019 done
11020 fi
11021 fi
11022 if test "X$ltrpathdirs" != "X"; then
11023 for found_dir in $ltrpathdirs; do
11024 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11025 done
11026 fi
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038 am_save_CPPFLAGS="$CPPFLAGS"
11039
11040 for element in $INCICONV; do
11041 haveit=
11042 for x in $CPPFLAGS; do
11043
11044 acl_save_prefix="$prefix"
11045 prefix="$acl_final_prefix"
11046 acl_save_exec_prefix="$exec_prefix"
11047 exec_prefix="$acl_final_exec_prefix"
11048 eval x=\"$x\"
11049 exec_prefix="$acl_save_exec_prefix"
11050 prefix="$acl_save_prefix"
11051
11052 if test "X$x" = "X$element"; then
11053 haveit=yes
11054 break
11055 fi
11056 done
11057 if test -z "$haveit"; then
11058 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11059 fi
11060 done
11061
11062
74091dd4
CR
11063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
11064printf %s "checking for iconv... " >&6; }
11065if test ${am_cv_func_iconv+y}
11066then :
11067 printf %s "(cached) " >&6
11068else $as_nop
8868edaf
CR
11069
11070 am_cv_func_iconv="no, consider installing GNU libiconv"
11071 am_cv_lib_iconv=no
11072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11073/* end confdefs.h. */
11074
11075#include <stdlib.h>
11076#include <iconv.h>
11077
11078int
74091dd4 11079main (void)
8868edaf
CR
11080{
11081iconv_t cd = iconv_open("","");
11082 iconv(cd,NULL,NULL,NULL,NULL);
11083 iconv_close(cd);
11084 ;
11085 return 0;
11086}
11087_ACEOF
74091dd4
CR
11088if ac_fn_c_try_link "$LINENO"
11089then :
8868edaf
CR
11090 am_cv_func_iconv=yes
11091fi
74091dd4 11092rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
11093 conftest$ac_exeext conftest.$ac_ext
11094 if test "$am_cv_func_iconv" != yes; then
11095 am_save_LIBS="$LIBS"
11096 LIBS="$LIBS $LIBICONV"
11097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11098/* end confdefs.h. */
11099
11100#include <stdlib.h>
11101#include <iconv.h>
11102
11103int
74091dd4 11104main (void)
8868edaf
CR
11105{
11106iconv_t cd = iconv_open("","");
11107 iconv(cd,NULL,NULL,NULL,NULL);
11108 iconv_close(cd);
11109 ;
11110 return 0;
11111}
11112_ACEOF
74091dd4
CR
11113if ac_fn_c_try_link "$LINENO"
11114then :
8868edaf
CR
11115 am_cv_lib_iconv=yes
11116 am_cv_func_iconv=yes
11117fi
74091dd4 11118rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
11119 conftest$ac_exeext conftest.$ac_ext
11120 LIBS="$am_save_LIBS"
11121 fi
11122
11123fi
74091dd4
CR
11124{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
11125printf "%s\n" "$am_cv_func_iconv" >&6; }
8868edaf 11126 if test "$am_cv_func_iconv" = yes; then
74091dd4
CR
11127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
11128printf %s "checking for working iconv... " >&6; }
11129if test ${am_cv_func_iconv_works+y}
11130then :
11131 printf %s "(cached) " >&6
11132else $as_nop
8868edaf
CR
11133
11134 am_save_LIBS="$LIBS"
11135 if test $am_cv_lib_iconv = yes; then
11136 LIBS="$LIBS $LIBICONV"
11137 fi
11138 am_cv_func_iconv_works=no
11139 for ac_iconv_const in '' 'const'; do
74091dd4
CR
11140 if test "$cross_compiling" = yes
11141then :
8868edaf
CR
11142 case "$host_os" in
11143 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
11144 *) am_cv_func_iconv_works="guessing yes" ;;
11145 esac
74091dd4 11146else $as_nop
8868edaf
CR
11147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11148/* end confdefs.h. */
11149
11150#include <iconv.h>
11151#include <string.h>
11152
11153#ifndef ICONV_CONST
11154# define ICONV_CONST $ac_iconv_const
11155#endif
11156
11157int
74091dd4 11158main (void)
8868edaf
CR
11159{
11160int result = 0;
11161 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
11162 returns. */
11163 {
11164 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
11165 if (cd_utf8_to_88591 != (iconv_t)(-1))
11166 {
11167 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
11168 char buf[10];
11169 ICONV_CONST char *inptr = input;
11170 size_t inbytesleft = strlen (input);
11171 char *outptr = buf;
11172 size_t outbytesleft = sizeof (buf);
11173 size_t res = iconv (cd_utf8_to_88591,
11174 &inptr, &inbytesleft,
11175 &outptr, &outbytesleft);
11176 if (res == 0)
11177 result |= 1;
11178 iconv_close (cd_utf8_to_88591);
11179 }
11180 }
11181 /* Test against Solaris 10 bug: Failures are not distinguishable from
11182 successful returns. */
11183 {
11184 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
11185 if (cd_ascii_to_88591 != (iconv_t)(-1))
11186 {
11187 static ICONV_CONST char input[] = "\263";
11188 char buf[10];
11189 ICONV_CONST char *inptr = input;
11190 size_t inbytesleft = strlen (input);
11191 char *outptr = buf;
11192 size_t outbytesleft = sizeof (buf);
11193 size_t res = iconv (cd_ascii_to_88591,
11194 &inptr, &inbytesleft,
11195 &outptr, &outbytesleft);
11196 if (res == 0)
11197 result |= 2;
11198 iconv_close (cd_ascii_to_88591);
11199 }
11200 }
11201 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
11202 {
11203 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
11204 if (cd_88591_to_utf8 != (iconv_t)(-1))
11205 {
11206 static ICONV_CONST char input[] = "\304";
11207 static char buf[2] = { (char)0xDE, (char)0xAD };
11208 ICONV_CONST char *inptr = input;
11209 size_t inbytesleft = 1;
11210 char *outptr = buf;
11211 size_t outbytesleft = 1;
11212 size_t res = iconv (cd_88591_to_utf8,
11213 &inptr, &inbytesleft,
11214 &outptr, &outbytesleft);
11215 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
11216 result |= 4;
11217 iconv_close (cd_88591_to_utf8);
11218 }
11219 }
11220#if 0 /* This bug could be worked around by the caller. */
11221 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
11222 {
11223 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
11224 if (cd_88591_to_utf8 != (iconv_t)(-1))
11225 {
11226 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
11227 char buf[50];
11228 ICONV_CONST char *inptr = input;
11229 size_t inbytesleft = strlen (input);
11230 char *outptr = buf;
11231 size_t outbytesleft = sizeof (buf);
11232 size_t res = iconv (cd_88591_to_utf8,
11233 &inptr, &inbytesleft,
11234 &outptr, &outbytesleft);
11235 if ((int)res > 0)
11236 result |= 8;
11237 iconv_close (cd_88591_to_utf8);
11238 }
11239 }
11240#endif
11241 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
11242 provided. */
11243 {
11244 /* Try standardized names. */
11245 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
11246 /* Try IRIX, OSF/1 names. */
11247 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
11248 /* Try AIX names. */
11249 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
11250 /* Try HP-UX names. */
11251 iconv_t cd4 = iconv_open ("utf8", "eucJP");
11252 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
11253 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
11254 result |= 16;
11255 if (cd1 != (iconv_t)(-1))
11256 iconv_close (cd1);
11257 if (cd2 != (iconv_t)(-1))
11258 iconv_close (cd2);
11259 if (cd3 != (iconv_t)(-1))
11260 iconv_close (cd3);
11261 if (cd4 != (iconv_t)(-1))
11262 iconv_close (cd4);
11263 }
11264 return result;
11265
11266 ;
11267 return 0;
11268}
11269_ACEOF
74091dd4
CR
11270if ac_fn_c_try_run "$LINENO"
11271then :
8868edaf
CR
11272 am_cv_func_iconv_works=yes
11273fi
11274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11275 conftest.$ac_objext conftest.beam conftest.$ac_ext
11276fi
11277
11278 test "$am_cv_func_iconv_works" = no || break
11279 done
11280 LIBS="$am_save_LIBS"
11281
11282fi
74091dd4
CR
11283{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
11284printf "%s\n" "$am_cv_func_iconv_works" >&6; }
8868edaf
CR
11285 case "$am_cv_func_iconv_works" in
11286 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
11287 *) am_func_iconv=yes ;;
11288 esac
11289 else
11290 am_func_iconv=no am_cv_lib_iconv=no
11291 fi
11292 if test "$am_func_iconv" = yes; then
11293
74091dd4 11294printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
8868edaf
CR
11295
11296 fi
11297 if test "$am_cv_lib_iconv" = yes; then
74091dd4
CR
11298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
11299printf %s "checking how to link with libiconv... " >&6; }
11300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
11301printf "%s\n" "$LIBICONV" >&6; }
8868edaf
CR
11302 else
11303 CPPFLAGS="$am_save_CPPFLAGS"
11304 LIBICONV=
11305 LTLIBICONV=
11306 fi
11307
11308
11309
11310 if test "$am_cv_func_iconv" = yes; then
74091dd4
CR
11311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
11312printf %s "checking for iconv declaration... " >&6; }
11313 if test ${am_cv_proto_iconv+y}
11314then :
11315 printf %s "(cached) " >&6
11316else $as_nop
8868edaf
CR
11317
11318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11319/* end confdefs.h. */
11320
11321#include <stdlib.h>
11322#include <iconv.h>
11323extern
11324#ifdef __cplusplus
11325"C"
11326#endif
11327#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
11328size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11329#else
11330size_t iconv();
11331#endif
11332
11333int
74091dd4 11334main (void)
8868edaf
CR
11335{
11336
11337 ;
11338 return 0;
11339}
11340_ACEOF
74091dd4
CR
11341if ac_fn_c_try_compile "$LINENO"
11342then :
8868edaf 11343 am_cv_proto_iconv_arg1=""
74091dd4 11344else $as_nop
8868edaf
CR
11345 am_cv_proto_iconv_arg1="const"
11346fi
74091dd4 11347rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
11348 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);"
11349fi
11350
11351 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
74091dd4 11352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:
8868edaf 11353 $am_cv_proto_iconv" >&5
74091dd4 11354printf "%s\n" "
8868edaf
CR
11355 $am_cv_proto_iconv" >&6; }
11356 else
11357 am_cv_proto_iconv_arg1=""
11358 fi
11359
74091dd4 11360printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h
8868edaf
CR
11361
11362
11363
11364
11365
11366
11367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11368/* end confdefs.h. */
11369int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }
11370int
74091dd4 11371main (void)
8868edaf
CR
11372{
11373
11374 ;
11375 return 0;
11376}
11377_ACEOF
74091dd4
CR
11378if ac_fn_c_try_link "$LINENO"
11379then :
8868edaf 11380
74091dd4 11381printf "%s\n" "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h
8868edaf
CR
11382
11383fi
74091dd4 11384rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
11385 conftest$ac_exeext conftest.$ac_ext
11386
74091dd4
CR
11387 ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default"
11388if test "x$ac_cv_header_argz_h" = xyes
11389then :
11390 printf "%s\n" "#define HAVE_ARGZ_H 1" >>confdefs.h
11391
11392fi
11393ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11394if test "x$ac_cv_header_inttypes_h" = xyes
11395then :
11396 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
11397
11398fi
11399ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
11400if test "x$ac_cv_header_limits_h" = xyes
11401then :
11402 printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h
11403
11404fi
11405ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
11406if test "x$ac_cv_header_unistd_h" = xyes
11407then :
11408 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
11409
11410fi
11411ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
11412if test "x$ac_cv_header_sys_param_h" = xyes
11413then :
11414 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
11415
11416fi
11417
11418 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
11419if test "x$ac_cv_func_getcwd" = xyes
11420then :
11421 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
11422
11423fi
11424ac_fn_c_check_func "$LINENO" "getegid" "ac_cv_func_getegid"
11425if test "x$ac_cv_func_getegid" = xyes
11426then :
11427 printf "%s\n" "#define HAVE_GETEGID 1" >>confdefs.h
11428
11429fi
11430ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid"
11431if test "x$ac_cv_func_geteuid" = xyes
11432then :
11433 printf "%s\n" "#define HAVE_GETEUID 1" >>confdefs.h
11434
11435fi
11436ac_fn_c_check_func "$LINENO" "getgid" "ac_cv_func_getgid"
11437if test "x$ac_cv_func_getgid" = xyes
11438then :
11439 printf "%s\n" "#define HAVE_GETGID 1" >>confdefs.h
11440
11441fi
11442ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid"
11443if test "x$ac_cv_func_getuid" = xyes
11444then :
11445 printf "%s\n" "#define HAVE_GETUID 1" >>confdefs.h
11446
11447fi
11448ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
11449if test "x$ac_cv_func_mempcpy" = xyes
11450then :
11451 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
11452
11453fi
11454ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap"
11455if test "x$ac_cv_func_munmap" = xyes
11456then :
11457 printf "%s\n" "#define HAVE_MUNMAP 1" >>confdefs.h
11458
11459fi
11460ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
11461if test "x$ac_cv_func_stpcpy" = xyes
11462then :
11463 printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
11464
11465fi
11466ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
11467if test "x$ac_cv_func_strcasecmp" = xyes
11468then :
11469 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
11470
11471fi
11472ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
11473if test "x$ac_cv_func_strdup" = xyes
11474then :
11475 printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
11476
11477fi
11478ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
11479if test "x$ac_cv_func_strtoul" = xyes
11480then :
11481 printf "%s\n" "#define HAVE_STRTOUL 1" >>confdefs.h
11482
11483fi
11484ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
11485if test "x$ac_cv_func_tsearch" = xyes
11486then :
11487 printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
11488
11489fi
11490ac_fn_c_check_func "$LINENO" "argz_count" "ac_cv_func_argz_count"
11491if test "x$ac_cv_func_argz_count" = xyes
11492then :
11493 printf "%s\n" "#define HAVE_ARGZ_COUNT 1" >>confdefs.h
8868edaf
CR
11494
11495fi
74091dd4
CR
11496ac_fn_c_check_func "$LINENO" "argz_stringify" "ac_cv_func_argz_stringify"
11497if test "x$ac_cv_func_argz_stringify" = xyes
11498then :
11499 printf "%s\n" "#define HAVE_ARGZ_STRINGIFY 1" >>confdefs.h
8868edaf 11500
74091dd4
CR
11501fi
11502ac_fn_c_check_func "$LINENO" "argz_next" "ac_cv_func_argz_next"
11503if test "x$ac_cv_func_argz_next" = xyes
11504then :
11505 printf "%s\n" "#define HAVE_ARGZ_NEXT 1" >>confdefs.h
8868edaf 11506
74091dd4
CR
11507fi
11508ac_fn_c_check_func "$LINENO" "__fsetlocking" "ac_cv_func___fsetlocking"
11509if test "x$ac_cv_func___fsetlocking" = xyes
11510then :
11511 printf "%s\n" "#define HAVE___FSETLOCKING 1" >>confdefs.h
8868edaf
CR
11512
11513fi
8868edaf
CR
11514
11515
74091dd4
CR
11516 ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
11517if test "x$ac_cv_func_localeconv" = xyes
11518then :
11519 printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h
8868edaf
CR
11520
11521fi
8868edaf
CR
11522
11523
74091dd4
CR
11524 ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "#include <stdio.h>
11525" "$ac_c_undeclared_builtin_options" "CFLAGS"
11526if test "x$ac_cv_have_decl_feof_unlocked" = xyes
11527then :
8868edaf 11528 ac_have_decl=1
74091dd4 11529else $as_nop
8868edaf
CR
11530 ac_have_decl=0
11531fi
74091dd4
CR
11532printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
11533ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "#include <stdio.h>
11534" "$ac_c_undeclared_builtin_options" "CFLAGS"
11535if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
11536then :
8868edaf 11537 ac_have_decl=1
74091dd4 11538else $as_nop
8868edaf
CR
11539 ac_have_decl=0
11540fi
74091dd4 11541printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
8868edaf
CR
11542
11543
11544
11545
11546 for ac_prog in bison
11547do
11548 # Extract the first word of "$ac_prog", so it can be a program name with args.
11549set dummy $ac_prog; ac_word=$2
74091dd4
CR
11550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11551printf %s "checking for $ac_word... " >&6; }
11552if test ${ac_cv_prog_INTLBISON+y}
11553then :
11554 printf %s "(cached) " >&6
11555else $as_nop
8868edaf
CR
11556 if test -n "$INTLBISON"; then
11557 ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
11558else
11559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11560for as_dir in $PATH
11561do
11562 IFS=$as_save_IFS
74091dd4
CR
11563 case $as_dir in #(((
11564 '') as_dir=./ ;;
11565 */) ;;
11566 *) as_dir=$as_dir/ ;;
11567 esac
8868edaf 11568 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 11569 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8868edaf 11570 ac_cv_prog_INTLBISON="$ac_prog"
74091dd4 11571 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8868edaf
CR
11572 break 2
11573 fi
11574done
11575 done
11576IFS=$as_save_IFS
11577
11578fi
11579fi
11580INTLBISON=$ac_cv_prog_INTLBISON
11581if test -n "$INTLBISON"; then
74091dd4
CR
11582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5
11583printf "%s\n" "$INTLBISON" >&6; }
8868edaf 11584else
74091dd4
CR
11585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11586printf "%s\n" "no" >&6; }
8868edaf
CR
11587fi
11588
11589
11590 test -n "$INTLBISON" && break
11591done
11592
11593 if test -z "$INTLBISON"; then
11594 ac_verc_fail=yes
11595 else
74091dd4
CR
11596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5
11597printf %s "checking version of bison... " >&6; }
8868edaf
CR
11598 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
11599 case $ac_prog_version in
11600 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
11601 2.[7-9]* | [3-9].*)
11602 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
11603 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
11604 esac
74091dd4
CR
11605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
11606printf "%s\n" "$ac_prog_version" >&6; }
8868edaf
CR
11607 fi
11608 if test $ac_verc_fail = yes; then
11609 INTLBISON=:
11610 fi
11611
11612
11613
74091dd4
CR
11614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
11615printf %s "checking for long long int... " >&6; }
11616if test ${ac_cv_type_long_long_int+y}
11617then :
11618 printf %s "(cached) " >&6
11619else $as_nop
8868edaf 11620 ac_cv_type_long_long_int=yes
74091dd4
CR
11621 case $ac_prog_cc_stdc in
11622 no | c89) ;;
11623 *)
11624 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
11625 if test $ac_cv_type_long_long_int = yes; then
11626 if test "$cross_compiling" = yes
11627then :
8868edaf 11628 :
74091dd4 11629else $as_nop
8868edaf
CR
11630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11631/* end confdefs.h. */
11632#include <limits.h>
74091dd4
CR
11633 #ifndef LLONG_MAX
11634 # define HALF \
11635 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
11636 # define LLONG_MAX (HALF - 1 + HALF)
11637 #endif
8868edaf 11638int
74091dd4 11639main (void)
8868edaf
CR
11640{
11641long long int n = 1;
74091dd4
CR
11642 int i;
11643 for (i = 0; ; i++)
11644 {
11645 long long int m = n << i;
11646 if (m >> i != n)
11647 return 1;
11648 if (LLONG_MAX / 2 < m)
11649 break;
11650 }
11651 return 0;
8868edaf
CR
11652 ;
11653 return 0;
11654}
11655_ACEOF
74091dd4
CR
11656if ac_fn_c_try_run "$LINENO"
11657then :
8868edaf 11658
74091dd4 11659else $as_nop
8868edaf
CR
11660 ac_cv_type_long_long_int=no
11661fi
11662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11663 conftest.$ac_objext conftest.beam conftest.$ac_ext
11664fi
11665
74091dd4
CR
11666 fi;;
11667 esac
8868edaf 11668fi
74091dd4
CR
11669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
11670printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
8868edaf
CR
11671 if test $ac_cv_type_long_long_int = yes; then
11672
74091dd4 11673printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
8868edaf
CR
11674
11675 fi
11676
11677
74091dd4
CR
11678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
11679printf %s "checking for wchar_t... " >&6; }
11680if test ${gt_cv_c_wchar_t+y}
11681then :
11682 printf %s "(cached) " >&6
11683else $as_nop
8868edaf
CR
11684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11685/* end confdefs.h. */
11686#include <stddef.h>
11687 wchar_t foo = (wchar_t)'\0';
11688int
74091dd4 11689main (void)
8868edaf
CR
11690{
11691
11692 ;
11693 return 0;
11694}
11695_ACEOF
74091dd4
CR
11696if ac_fn_c_try_compile "$LINENO"
11697then :
8868edaf 11698 gt_cv_c_wchar_t=yes
74091dd4 11699else $as_nop
8868edaf
CR
11700 gt_cv_c_wchar_t=no
11701fi
74091dd4 11702rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 11703fi
74091dd4
CR
11704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
11705printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
8868edaf
CR
11706 if test $gt_cv_c_wchar_t = yes; then
11707
74091dd4 11708printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
8868edaf
CR
11709
11710 fi
11711
11712
74091dd4
CR
11713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
11714printf %s "checking for wint_t... " >&6; }
11715if test ${gt_cv_c_wint_t+y}
11716then :
11717 printf %s "(cached) " >&6
11718else $as_nop
8868edaf
CR
11719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11720/* end confdefs.h. */
11721
11722/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11723 <wchar.h>.
11724 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
11725 before <wchar.h>. */
11726#include <stddef.h>
11727#include <stdio.h>
11728#include <time.h>
11729#include <wchar.h>
11730 wint_t foo = (wchar_t)'\0';
11731int
74091dd4 11732main (void)
8868edaf
CR
11733{
11734
11735 ;
11736 return 0;
11737}
11738_ACEOF
74091dd4
CR
11739if ac_fn_c_try_compile "$LINENO"
11740then :
8868edaf 11741 gt_cv_c_wint_t=yes
74091dd4 11742else $as_nop
8868edaf
CR
11743 gt_cv_c_wint_t=no
11744fi
74091dd4 11745rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 11746fi
74091dd4
CR
11747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
11748printf "%s\n" "$gt_cv_c_wint_t" >&6; }
8868edaf
CR
11749 if test $gt_cv_c_wint_t = yes; then
11750
74091dd4 11751printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
8868edaf
CR
11752
11753
74091dd4
CR
11754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
11755printf %s "checking whether wint_t is too small... " >&6; }
11756if test ${gl_cv_type_wint_t_too_small+y}
11757then :
11758 printf %s "(cached) " >&6
11759else $as_nop
8868edaf
CR
11760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11761/* end confdefs.h. */
11762
11763/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11764 <wchar.h>.
11765 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11766 included before <wchar.h>. */
11767#if !(defined __GLIBC__ && !defined __UCLIBC__)
11768# include <stddef.h>
11769# include <stdio.h>
11770# include <time.h>
11771#endif
11772#include <wchar.h>
11773 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
11774
11775int
74091dd4 11776main (void)
8868edaf
CR
11777{
11778
11779 ;
11780 return 0;
11781}
11782_ACEOF
74091dd4
CR
11783if ac_fn_c_try_compile "$LINENO"
11784then :
8868edaf 11785 gl_cv_type_wint_t_too_small=no
74091dd4 11786else $as_nop
8868edaf
CR
11787 gl_cv_type_wint_t_too_small=yes
11788fi
74091dd4 11789rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 11790fi
74091dd4
CR
11791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
11792printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; }
8868edaf
CR
11793 if test $gl_cv_type_wint_t_too_small = yes; then
11794 GNULIB_OVERRIDES_WINT_T=1
11795 else
11796 GNULIB_OVERRIDES_WINT_T=0
11797 fi
11798 else
11799 GNULIB_OVERRIDES_WINT_T=0
11800 fi
11801
11802
11803
11804
11805
74091dd4
CR
11806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
11807printf %s "checking for intmax_t... " >&6; }
11808if test ${gt_cv_c_intmax_t+y}
11809then :
11810 printf %s "(cached) " >&6
11811else $as_nop
8868edaf
CR
11812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11813/* end confdefs.h. */
11814
11815#include <stddef.h>
11816#include <stdlib.h>
11817#if HAVE_STDINT_H_WITH_UINTMAX
11818#include <stdint.h>
11819#endif
11820#if HAVE_INTTYPES_H_WITH_UINTMAX
11821#include <inttypes.h>
11822#endif
11823
11824int
74091dd4 11825main (void)
8868edaf
CR
11826{
11827intmax_t x = -1;
11828 return !x;
11829 ;
11830 return 0;
11831}
11832_ACEOF
74091dd4
CR
11833if ac_fn_c_try_compile "$LINENO"
11834then :
8868edaf 11835 gt_cv_c_intmax_t=yes
74091dd4 11836else $as_nop
8868edaf
CR
11837 gt_cv_c_intmax_t=no
11838fi
74091dd4 11839rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 11840fi
74091dd4
CR
11841{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
11842printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
8868edaf
CR
11843 if test $gt_cv_c_intmax_t = yes; then
11844
74091dd4 11845printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
8868edaf
CR
11846
11847 fi
11848
11849
11850
74091dd4
CR
11851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5
11852printf %s "checking whether printf() supports POSIX/XSI format strings... " >&6; }
11853if test ${gt_cv_func_printf_posix+y}
11854then :
11855 printf %s "(cached) " >&6
11856else $as_nop
8868edaf 11857
74091dd4
CR
11858 if test "$cross_compiling" = yes
11859then :
8868edaf
CR
11860
11861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11862/* end confdefs.h. */
11863
11864#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
11865 notposix
11866#endif
11867
11868_ACEOF
11869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
11870 $EGREP "notposix" >/dev/null 2>&1
11871then :
8868edaf 11872 gt_cv_func_printf_posix="guessing no"
74091dd4 11873else $as_nop
8868edaf
CR
11874 gt_cv_func_printf_posix="guessing yes"
11875fi
74091dd4 11876rm -rf conftest*
8868edaf
CR
11877
11878
74091dd4 11879else $as_nop
8868edaf
CR
11880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11881/* end confdefs.h. */
11882
11883#include <stdio.h>
11884#include <string.h>
11885/* The string "%2$d %1$d", with dollar characters protected from the shell's
11886 dollar expansion (possibly an autoconf bug). */
11887static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
11888static char buf[100];
11889int main ()
11890{
11891 sprintf (buf, format, 33, 55);
11892 return (strcmp (buf, "55 33") != 0);
11893}
11894_ACEOF
74091dd4
CR
11895if ac_fn_c_try_run "$LINENO"
11896then :
8868edaf 11897 gt_cv_func_printf_posix=yes
74091dd4 11898else $as_nop
8868edaf
CR
11899 gt_cv_func_printf_posix=no
11900fi
11901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11902 conftest.$ac_objext conftest.beam conftest.$ac_ext
11903fi
11904
11905
11906fi
74091dd4
CR
11907{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_printf_posix" >&5
11908printf "%s\n" "$gt_cv_func_printf_posix" >&6; }
8868edaf
CR
11909 case $gt_cv_func_printf_posix in
11910 *yes)
11911
74091dd4 11912printf "%s\n" "#define HAVE_POSIX_PRINTF 1" >>confdefs.h
8868edaf
CR
11913
11914 ;;
11915 esac
11916
11917
74091dd4
CR
11918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
11919printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
11920if test ${ac_cv_gnu_library_2_1+y}
11921then :
11922 printf %s "(cached) " >&6
11923else $as_nop
8868edaf
CR
11924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11925/* end confdefs.h. */
11926
11927#include <features.h>
11928#ifdef __GNU_LIBRARY__
11929 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
11930 Lucky GNU user
11931 #endif
11932#endif
11933#ifdef __UCLIBC__
11934 Lucky user
11935#endif
11936
11937_ACEOF
11938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
11939 $EGREP "Lucky" >/dev/null 2>&1
11940then :
8868edaf 11941 ac_cv_gnu_library_2_1=yes
74091dd4 11942else $as_nop
8868edaf
CR
11943 ac_cv_gnu_library_2_1=no
11944fi
74091dd4 11945rm -rf conftest*
8868edaf
CR
11946
11947
11948
11949fi
74091dd4
CR
11950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
11951printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; }
8868edaf
CR
11952
11953 GLIBC21="$ac_cv_gnu_library_2_1"
11954
11955
11956
74091dd4
CR
11957 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
11958if test "x$ac_cv_header_stdint_h" = xyes
11959then :
11960 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
8868edaf
CR
11961
11962fi
11963
74091dd4
CR
11964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
11965printf %s "checking for SIZE_MAX... " >&6; }
11966if test ${gl_cv_size_max+y}
11967then :
11968 printf %s "(cached) " >&6
11969else $as_nop
8868edaf
CR
11970
11971 gl_cv_size_max=
11972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11973/* end confdefs.h. */
11974
11975#include <limits.h>
11976#if HAVE_STDINT_H
11977#include <stdint.h>
11978#endif
11979#ifdef SIZE_MAX
11980Found it
11981#endif
11982
11983_ACEOF
11984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
11985 $EGREP "Found it" >/dev/null 2>&1
11986then :
8868edaf
CR
11987 gl_cv_size_max=yes
11988fi
74091dd4 11989rm -rf conftest*
8868edaf
CR
11990
11991 if test -z "$gl_cv_size_max"; then
11992 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
74091dd4
CR
11993#include <limits.h>"
11994then :
8868edaf 11995
74091dd4 11996else $as_nop
8868edaf
CR
11997 size_t_bits_minus_1=
11998fi
11999
74091dd4
CR
12000 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"
12001then :
8868edaf 12002
74091dd4 12003else $as_nop
8868edaf
CR
12004 fits_in_uint=
12005fi
12006
12007 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
12008 if test $fits_in_uint = 1; then
12009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12010/* end confdefs.h. */
12011#include <stddef.h>
12012 extern size_t foo;
12013 extern unsigned long foo;
12014
12015int
74091dd4 12016main (void)
8868edaf
CR
12017{
12018
12019 ;
12020 return 0;
12021}
12022_ACEOF
74091dd4
CR
12023if ac_fn_c_try_compile "$LINENO"
12024then :
8868edaf
CR
12025 fits_in_uint=0
12026fi
74091dd4 12027rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
12028 fi
12029 if test $fits_in_uint = 1; then
12030 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
12031 else
12032 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
12033 fi
12034 else
12035 gl_cv_size_max='((size_t)~(size_t)0)'
12036 fi
12037 fi
12038
12039fi
74091dd4
CR
12040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
12041printf "%s\n" "$gl_cv_size_max" >&6; }
8868edaf
CR
12042 if test "$gl_cv_size_max" != yes; then
12043
74091dd4 12044printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
8868edaf
CR
12045
12046 fi
12047
12048
12049
12050
74091dd4
CR
12051 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
12052if test "x$ac_cv_header_stdint_h" = xyes
12053then :
12054 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
8868edaf
CR
12055
12056fi
8868edaf
CR
12057
12058
12059
12060
12061
12062
12063
12064
74091dd4
CR
12065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
12066printf %s "checking for working fcntl.h... " >&6; }
12067if test ${gl_cv_header_working_fcntl_h+y}
12068then :
12069 printf %s "(cached) " >&6
12070else $as_nop
12071 if test "$cross_compiling" = yes
12072then :
8868edaf
CR
12073 case "$host_os" in
12074 # Guess 'no' on native Windows.
12075 mingw*) gl_cv_header_working_fcntl_h='no' ;;
12076 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
12077 esac
12078
74091dd4 12079else $as_nop
8868edaf
CR
12080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12081/* end confdefs.h. */
12082#include <sys/types.h>
12083 #include <sys/stat.h>
12084 #if HAVE_UNISTD_H
12085 # include <unistd.h>
12086 #else /* on Windows with MSVC */
12087 # include <io.h>
12088 # include <stdlib.h>
12089 # defined sleep(n) _sleep ((n) * 1000)
12090 #endif
12091 #include <fcntl.h>
12092 #ifndef O_NOATIME
12093 #define O_NOATIME 0
12094 #endif
12095 #ifndef O_NOFOLLOW
12096 #define O_NOFOLLOW 0
12097 #endif
12098 static int const constants[] =
12099 {
12100 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
12101 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
12102 };
12103
12104int
74091dd4 12105main (void)
8868edaf
CR
12106{
12107
12108 int result = !constants;
12109 #if HAVE_SYMLINK
12110 {
12111 static char const sym[] = "conftest.sym";
12112 if (symlink ("/dev/null", sym) != 0)
12113 result |= 2;
12114 else
12115 {
12116 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
12117 if (fd >= 0)
12118 {
12119 close (fd);
12120 result |= 4;
12121 }
12122 }
12123 if (unlink (sym) != 0 || symlink (".", sym) != 0)
12124 result |= 2;
12125 else
12126 {
12127 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
12128 if (fd >= 0)
12129 {
12130 close (fd);
12131 result |= 4;
12132 }
12133 }
12134 unlink (sym);
12135 }
12136 #endif
12137 {
12138 static char const file[] = "confdefs.h";
12139 int fd = open (file, O_RDONLY | O_NOATIME);
12140 if (fd < 0)
12141 result |= 8;
12142 else
12143 {
12144 struct stat st0;
12145 if (fstat (fd, &st0) != 0)
12146 result |= 16;
b80f6443 12147 else
8868edaf
CR
12148 {
12149 char c;
12150 sleep (1);
12151 if (read (fd, &c, 1) != 1)
12152 result |= 24;
12153 else
12154 {
12155 if (close (fd) != 0)
12156 result |= 32;
12157 else
12158 {
12159 struct stat st1;
12160 if (stat (file, &st1) != 0)
12161 result |= 40;
12162 else
12163 if (st0.st_atime != st1.st_atime)
12164 result |= 64;
12165 }
12166 }
12167 }
12168 }
12169 }
12170 return result;
12171 ;
12172 return 0;
12173}
12174_ACEOF
74091dd4
CR
12175if ac_fn_c_try_run "$LINENO"
12176then :
8868edaf 12177 gl_cv_header_working_fcntl_h=yes
74091dd4 12178else $as_nop
8868edaf
CR
12179 case $? in #(
12180 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
12181 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
12182 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
12183 *) gl_cv_header_working_fcntl_h='no';;
12184 esac
12185fi
12186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12187 conftest.$ac_objext conftest.beam conftest.$ac_ext
12188fi
b80f6443 12189
b80f6443 12190
8868edaf 12191fi
74091dd4
CR
12192{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
12193printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
b80f6443 12194
8868edaf
CR
12195 case $gl_cv_header_working_fcntl_h in #(
12196 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
12197 *) ac_val=1;;
12198 esac
b80f6443 12199
74091dd4 12200printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
b80f6443 12201
b80f6443 12202
8868edaf
CR
12203 case $gl_cv_header_working_fcntl_h in #(
12204 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
12205 *) ac_val=1;;
12206 esac
b80f6443 12207
74091dd4 12208printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
8868edaf
CR
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223 if test $ac_cv_func_uselocale = yes; then
12224
74091dd4
CR
12225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
12226printf %s "checking whether uselocale works... " >&6; }
12227if test ${gt_cv_func_uselocale_works+y}
12228then :
12229 printf %s "(cached) " >&6
12230else $as_nop
12231 if test "$cross_compiling" = yes
12232then :
8868edaf
CR
12233 # Guess no on AIX, yes otherwise.
12234 case "$host_os" in
12235 aix*) gt_cv_func_uselocale_works="guessing no" ;;
12236 *) gt_cv_func_uselocale_works="guessing yes" ;;
12237 esac
12238
74091dd4 12239else $as_nop
8868edaf
CR
12240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12241/* end confdefs.h. */
12242
12243#include <locale.h>
12244#if HAVE_XLOCALE_H
12245# include <xlocale.h>
12246#endif
12247int main ()
12248{
12249 uselocale (NULL);
12250 setlocale (LC_ALL, "en_US.UTF-8");
12251 return 0;
12252}
12253_ACEOF
74091dd4
CR
12254if ac_fn_c_try_run "$LINENO"
12255then :
8868edaf 12256 gt_cv_func_uselocale_works=yes
74091dd4 12257else $as_nop
8868edaf
CR
12258 gt_cv_func_uselocale_works=no
12259fi
12260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12261 conftest.$ac_objext conftest.beam conftest.$ac_ext
12262fi
12263
12264
12265fi
74091dd4
CR
12266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5
12267printf "%s\n" "$gt_cv_func_uselocale_works" >&6; }
8868edaf
CR
12268 else
12269 gt_cv_func_uselocale_works=no
b80f6443 12270 fi
8868edaf
CR
12271 case "$gt_cv_func_uselocale_works" in
12272 *yes)
12273
74091dd4 12274printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
8868edaf
CR
12275
12276 ;;
12277 esac
12278
12279
12280 case "$gt_cv_func_uselocale_works" in
12281 *yes)
12282
74091dd4
CR
12283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5
12284printf %s "checking for fake locale system (OpenBSD)... " >&6; }
12285if test ${gt_cv_locale_fake+y}
12286then :
12287 printf %s "(cached) " >&6
12288else $as_nop
12289 if test "$cross_compiling" = yes
12290then :
8868edaf
CR
12291 case "$host_os" in
12292 openbsd*) gt_cv_locale_fake="guessing yes" ;;
12293 *) gt_cv_locale_fake="guessing no" ;;
12294 esac
12295
74091dd4 12296else $as_nop
8868edaf
CR
12297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12298/* end confdefs.h. */
12299
12300#include <locale.h>
12301#if HAVE_XLOCALE_H
12302# include <xlocale.h>
12303#endif
12304int main ()
12305{
12306 locale_t loc1, loc2;
12307 if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1;
12308 if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1;
12309 loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0);
12310 loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
12311 return !(loc1 == loc2);
12312}
12313_ACEOF
74091dd4
CR
12314if ac_fn_c_try_run "$LINENO"
12315then :
8868edaf 12316 gt_cv_locale_fake=yes
74091dd4 12317else $as_nop
8868edaf
CR
12318 gt_cv_locale_fake=no
12319fi
12320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12321 conftest.$ac_objext conftest.beam conftest.$ac_ext
12322fi
12323
12324
12325fi
74091dd4
CR
12326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5
12327printf "%s\n" "$gt_cv_locale_fake" >&6; }
8868edaf
CR
12328 ;;
12329 *) gt_cv_locale_fake=no ;;
12330 esac
12331 case "$gt_cv_locale_fake" in
12332 *yes)
12333
74091dd4 12334printf "%s\n" "#define HAVE_FAKE_LOCALES 1" >>confdefs.h
b80f6443 12335
8868edaf
CR
12336 ;;
12337 esac
b80f6443 12338
8868edaf
CR
12339 case "$gt_cv_func_uselocale_works" in
12340 *yes)
74091dd4
CR
12341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5
12342printf %s "checking for Solaris 11.4 locale system... " >&6; }
12343if test ${gt_cv_locale_solaris114+y}
12344then :
12345 printf %s "(cached) " >&6
12346else $as_nop
8868edaf
CR
12347 case "$host_os" in
12348 solaris*)
12349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12350/* end confdefs.h. */
b80f6443 12351
8868edaf
CR
12352 #include <locale.h>
12353 struct _LC_locale_t *x;
12354 locale_t y;
b80f6443 12355
8868edaf 12356int
74091dd4 12357main (void)
8868edaf
CR
12358{
12359*y = x;
12360 ;
12361 return 0;
12362}
b80f6443 12363_ACEOF
74091dd4
CR
12364if ac_fn_c_try_compile "$LINENO"
12365then :
8868edaf 12366 gt_cv_locale_solaris114=yes
74091dd4 12367else $as_nop
8868edaf
CR
12368 gt_cv_locale_solaris114=no
12369fi
74091dd4 12370rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf
CR
12371 ;;
12372 *) gt_cv_locale_solaris114=no ;;
12373 esac
b80f6443
JA
12374
12375fi
74091dd4
CR
12376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5
12377printf "%s\n" "$gt_cv_locale_solaris114" >&6; }
8868edaf
CR
12378 ;;
12379 *) gt_cv_locale_solaris114=no ;;
12380 esac
12381 if test $gt_cv_locale_solaris114 = yes; then
b80f6443 12382
74091dd4 12383printf "%s\n" "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h
f73dda09 12384
8868edaf
CR
12385 fi
12386
12387 case "$gt_cv_func_uselocale_works" in
12388 *yes)
74091dd4
CR
12389 ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l"
12390if test "x$ac_cv_func_getlocalename_l" = xyes
12391then :
12392 printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h
f73dda09
JA
12393
12394fi
f73dda09 12395
8868edaf
CR
12396 ;;
12397 esac
b80f6443 12398
8868edaf
CR
12399 gt_nameless_locales=no
12400 if false; then
12401 gt_nameless_locales=yes
b80f6443 12402
74091dd4 12403printf "%s\n" "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h
b80f6443 12404
8868edaf 12405 fi
b80f6443
JA
12406
12407
74091dd4
CR
12408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
12409printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
12410if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
12411then :
12412 printf %s "(cached) " >&6
12413else $as_nop
8868edaf
CR
12414 gt_save_LIBS="$LIBS"
12415 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
12416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12417/* end confdefs.h. */
12418#include <CoreFoundation/CFPreferences.h>
12419int
74091dd4 12420main (void)
8868edaf
CR
12421{
12422CFPreferencesCopyAppValue(NULL, NULL)
12423 ;
12424 return 0;
12425}
12426_ACEOF
74091dd4
CR
12427if ac_fn_c_try_link "$LINENO"
12428then :
8868edaf 12429 gt_cv_func_CFPreferencesCopyAppValue=yes
74091dd4 12430else $as_nop
8868edaf
CR
12431 gt_cv_func_CFPreferencesCopyAppValue=no
12432fi
74091dd4 12433rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
12434 conftest$ac_exeext conftest.$ac_ext
12435 LIBS="$gt_save_LIBS"
12436fi
74091dd4
CR
12437{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
12438printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
8868edaf 12439 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
b80f6443 12440
74091dd4 12441printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
b80f6443 12442
8868edaf 12443 fi
74091dd4
CR
12444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
12445printf %s "checking for CFLocaleCopyCurrent... " >&6; }
12446if test ${gt_cv_func_CFLocaleCopyCurrent+y}
12447then :
12448 printf %s "(cached) " >&6
12449else $as_nop
8868edaf
CR
12450 gt_save_LIBS="$LIBS"
12451 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
12452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12453/* end confdefs.h. */
8868edaf 12454#include <CoreFoundation/CFLocale.h>
f73dda09 12455int
74091dd4 12456main (void)
f73dda09 12457{
8868edaf 12458CFLocaleCopyCurrent();
f73dda09
JA
12459 ;
12460 return 0;
12461}
12462_ACEOF
74091dd4
CR
12463if ac_fn_c_try_link "$LINENO"
12464then :
8868edaf 12465 gt_cv_func_CFLocaleCopyCurrent=yes
74091dd4 12466else $as_nop
8868edaf 12467 gt_cv_func_CFLocaleCopyCurrent=no
f73dda09 12468fi
74091dd4 12469rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 12470 conftest$ac_exeext conftest.$ac_ext
8868edaf
CR
12471 LIBS="$gt_save_LIBS"
12472fi
74091dd4
CR
12473{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
12474printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
8868edaf
CR
12475 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
12476
74091dd4 12477printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
8868edaf
CR
12478
12479 fi
74091dd4
CR
12480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
12481printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
12482if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
12483then :
12484 printf %s "(cached) " >&6
12485else $as_nop
8868edaf
CR
12486 gt_save_LIBS="$LIBS"
12487 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
12488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12489/* end confdefs.h. */
8868edaf 12490#include <CoreFoundation/CFLocale.h>
f73dda09 12491int
74091dd4 12492main (void)
f73dda09 12493{
8868edaf 12494CFLocaleCopyPreferredLanguages();
f73dda09
JA
12495 ;
12496 return 0;
12497}
12498_ACEOF
74091dd4
CR
12499if ac_fn_c_try_link "$LINENO"
12500then :
8868edaf 12501 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
74091dd4 12502else $as_nop
8868edaf 12503 gt_cv_func_CFLocaleCopyPreferredLanguages=no
f73dda09 12504fi
74091dd4 12505rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 12506 conftest$ac_exeext conftest.$ac_ext
8868edaf
CR
12507 LIBS="$gt_save_LIBS"
12508fi
74091dd4
CR
12509{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
12510printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
8868edaf 12511 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
b80f6443 12512
74091dd4 12513printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
8868edaf
CR
12514
12515 fi
12516 INTL_MACOSX_LIBS=
12517 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
12518 || test $gt_cv_func_CFLocaleCopyCurrent = yes \
12519 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
12520 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
12521 fi
12522
12523
12524
12525
12526
12527
12528
12529
74091dd4
CR
12530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
12531printf %s "checking for flexible array members... " >&6; }
12532if test ${ac_cv_c_flexmember+y}
12533then :
12534 printf %s "(cached) " >&6
12535else $as_nop
8868edaf
CR
12536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12537/* end confdefs.h. */
12538#include <stdlib.h>
12539 #include <stdio.h>
12540 #include <stddef.h>
12541 struct s { int n; double d[]; };
12542int
74091dd4 12543main (void)
8868edaf
CR
12544{
12545int m = getchar ();
74091dd4
CR
12546 struct s *p = (struct s *) malloc (offsetof (struct s, d)
12547 + m * sizeof (double));
8868edaf
CR
12548 p->d[0] = 0.0;
12549 return p->d != (double *) NULL;
12550 ;
12551 return 0;
12552}
12553_ACEOF
74091dd4
CR
12554if ac_fn_c_try_compile "$LINENO"
12555then :
8868edaf 12556 ac_cv_c_flexmember=yes
74091dd4 12557else $as_nop
8868edaf
CR
12558 ac_cv_c_flexmember=no
12559fi
74091dd4 12560rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8868edaf 12561fi
74091dd4
CR
12562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
12563printf "%s\n" "$ac_cv_c_flexmember" >&6; }
8868edaf
CR
12564 if test $ac_cv_c_flexmember = yes; then
12565
74091dd4 12566printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
8868edaf
CR
12567
12568 else
74091dd4 12569 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
8868edaf
CR
12570
12571 fi
12572
12573
12574
12575
12576
12577
12578
12579
12580 if test -n "$ac_tool_prefix"; then
12581 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
12582set dummy ${ac_tool_prefix}ar; ac_word=$2
74091dd4
CR
12583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12584printf %s "checking for $ac_word... " >&6; }
12585if test ${ac_cv_prog_AR+y}
12586then :
12587 printf %s "(cached) " >&6
12588else $as_nop
8868edaf
CR
12589 if test -n "$AR"; then
12590 ac_cv_prog_AR="$AR" # Let the user override the test.
12591else
12592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12593for as_dir in $PATH
12594do
12595 IFS=$as_save_IFS
74091dd4
CR
12596 case $as_dir in #(((
12597 '') as_dir=./ ;;
12598 */) ;;
12599 *) as_dir=$as_dir/ ;;
12600 esac
8868edaf 12601 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 12602 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8868edaf 12603 ac_cv_prog_AR="${ac_tool_prefix}ar"
74091dd4 12604 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8868edaf
CR
12605 break 2
12606 fi
12607done
12608 done
12609IFS=$as_save_IFS
12610
12611fi
12612fi
12613AR=$ac_cv_prog_AR
12614if test -n "$AR"; then
74091dd4
CR
12615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
12616printf "%s\n" "$AR" >&6; }
8868edaf 12617else
74091dd4
CR
12618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12619printf "%s\n" "no" >&6; }
8868edaf
CR
12620fi
12621
12622
12623fi
12624if test -z "$ac_cv_prog_AR"; then
12625 ac_ct_AR=$AR
12626 # Extract the first word of "ar", so it can be a program name with args.
12627set dummy ar; ac_word=$2
74091dd4
CR
12628{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12629printf %s "checking for $ac_word... " >&6; }
12630if test ${ac_cv_prog_ac_ct_AR+y}
12631then :
12632 printf %s "(cached) " >&6
12633else $as_nop
8868edaf
CR
12634 if test -n "$ac_ct_AR"; then
12635 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
12636else
12637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12638for as_dir in $PATH
12639do
12640 IFS=$as_save_IFS
74091dd4
CR
12641 case $as_dir in #(((
12642 '') as_dir=./ ;;
12643 */) ;;
12644 *) as_dir=$as_dir/ ;;
12645 esac
8868edaf 12646 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 12647 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8868edaf 12648 ac_cv_prog_ac_ct_AR="ar"
74091dd4 12649 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8868edaf
CR
12650 break 2
12651 fi
12652done
12653 done
12654IFS=$as_save_IFS
12655
12656fi
12657fi
12658ac_ct_AR=$ac_cv_prog_ac_ct_AR
12659if test -n "$ac_ct_AR"; then
74091dd4
CR
12660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
12661printf "%s\n" "$ac_ct_AR" >&6; }
8868edaf 12662else
74091dd4
CR
12663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12664printf "%s\n" "no" >&6; }
8868edaf
CR
12665fi
12666
12667 if test "x$ac_ct_AR" = x; then
12668 AR="ar"
12669 else
12670 case $cross_compiling:$ac_tool_warned in
12671yes:)
74091dd4
CR
12672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12673printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8868edaf
CR
12674ac_tool_warned=yes ;;
12675esac
12676 AR=$ac_ct_AR
12677 fi
12678else
12679 AR="$ac_cv_prog_AR"
f73dda09 12680fi
f73dda09 12681
8868edaf
CR
12682 if test -z "$ARFLAGS"; then
12683 ARFLAGS='cr'
12684 fi
f73dda09 12685
b80f6443
JA
12686
12687
12688
8868edaf
CR
12689 case "$enable_silent_rules" in
12690 yes) INTL_DEFAULT_VERBOSITY=0;;
12691 no) INTL_DEFAULT_VERBOSITY=1;;
12692 *) INTL_DEFAULT_VERBOSITY=1;;
12693 esac
12694
12695
12696 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
74091dd4
CR
12697if test "x$ac_cv_type_ptrdiff_t" = xyes
12698then :
8868edaf 12699
74091dd4 12700else $as_nop
b80f6443 12701
74091dd4 12702printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
b80f6443 12703
f73dda09 12704
8868edaf 12705fi
f73dda09 12706
74091dd4
CR
12707 ac_fn_c_check_header_compile "$LINENO" "features.h" "ac_cv_header_features_h" "$ac_includes_default"
12708if test "x$ac_cv_header_features_h" = xyes
12709then :
12710 printf "%s\n" "#define HAVE_FEATURES_H 1" >>confdefs.h
8868edaf
CR
12711
12712fi
74091dd4
CR
12713ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
12714if test "x$ac_cv_header_stddef_h" = xyes
12715then :
12716 printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h
8868edaf 12717
74091dd4
CR
12718fi
12719ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
12720if test "x$ac_cv_header_stdlib_h" = xyes
12721then :
12722 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
8868edaf 12723
74091dd4
CR
12724fi
12725ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
12726if test "x$ac_cv_header_string_h" = xyes
12727then :
12728 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
8868edaf
CR
12729
12730fi
8868edaf 12731
74091dd4
CR
12732 ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf"
12733if test "x$ac_cv_func_asprintf" = xyes
12734then :
12735 printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h
8868edaf 12736
74091dd4
CR
12737fi
12738ac_fn_c_check_func "$LINENO" "fwprintf" "ac_cv_func_fwprintf"
12739if test "x$ac_cv_func_fwprintf" = xyes
12740then :
12741 printf "%s\n" "#define HAVE_FWPRINTF 1" >>confdefs.h
12742
12743fi
12744ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
12745if test "x$ac_cv_func_newlocale" = xyes
12746then :
12747 printf "%s\n" "#define HAVE_NEWLOCALE 1" >>confdefs.h
12748
12749fi
12750ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
12751if test "x$ac_cv_func_putenv" = xyes
12752then :
12753 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
12754
12755fi
12756ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
12757if test "x$ac_cv_func_setenv" = xyes
12758then :
12759 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
12760
12761fi
12762ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
12763if test "x$ac_cv_func_setlocale" = xyes
12764then :
12765 printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h
12766
12767fi
12768ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
12769if test "x$ac_cv_func_snprintf" = xyes
12770then :
12771 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
12772
12773fi
12774ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
12775if test "x$ac_cv_func_strnlen" = xyes
12776then :
12777 printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
12778
12779fi
12780ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
12781if test "x$ac_cv_func_uselocale" = xyes
12782then :
12783 printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h
12784
12785fi
12786ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
12787if test "x$ac_cv_func_wcslen" = xyes
12788then :
12789 printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
12790
12791fi
12792ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
12793if test "x$ac_cv_func_wcsnlen" = xyes
12794then :
12795 printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
12796
12797fi
12798ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
12799if test "x$ac_cv_func_mbrtowc" = xyes
12800then :
12801 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
12802
12803fi
12804ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
12805if test "x$ac_cv_func_wcrtomb" = xyes
12806then :
12807 printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
12808
12809fi
12810
12811
12812 ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
12813" "$ac_c_undeclared_builtin_options" "CFLAGS"
12814if test "x$ac_cv_have_decl__snprintf" = xyes
12815then :
8868edaf 12816 ac_have_decl=1
74091dd4 12817else $as_nop
8868edaf 12818 ac_have_decl=0
f73dda09 12819fi
74091dd4
CR
12820printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
12821ac_fn_check_decl "$LINENO" "_snwprintf" "ac_cv_have_decl__snwprintf" "#include <stdio.h>
12822" "$ac_c_undeclared_builtin_options" "CFLAGS"
12823if test "x$ac_cv_have_decl__snwprintf" = xyes
12824then :
8868edaf 12825 ac_have_decl=1
74091dd4 12826else $as_nop
8868edaf 12827 ac_have_decl=0
f73dda09 12828fi
74091dd4 12829printf "%s\n" "#define HAVE_DECL__SNWPRINTF $ac_have_decl" >>confdefs.h
8868edaf
CR
12830
12831
74091dd4
CR
12832 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "#include <stdio.h>
12833" "$ac_c_undeclared_builtin_options" "CFLAGS"
12834if test "x$ac_cv_have_decl_getc_unlocked" = xyes
12835then :
8868edaf 12836 ac_have_decl=1
74091dd4 12837else $as_nop
8868edaf
CR
12838 ac_have_decl=0
12839fi
74091dd4 12840printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
b80f6443 12841
8868edaf
CR
12842
12843 case $gt_cv_func_printf_posix in
12844 *yes) HAVE_POSIX_PRINTF=1 ;;
12845 *) HAVE_POSIX_PRINTF=0 ;;
12846 esac
12847
12848 if test "$ac_cv_func_asprintf" = yes; then
12849 HAVE_ASPRINTF=1
12850 else
12851 HAVE_ASPRINTF=0
12852 fi
12853
12854 if test "$ac_cv_func_snprintf" = yes; then
12855 HAVE_SNPRINTF=1
12856 else
12857 HAVE_SNPRINTF=0
12858 fi
12859
12860 if test "$ac_cv_func_newlocale" = yes; then
12861 HAVE_NEWLOCALE=1
12862 else
12863 HAVE_NEWLOCALE=0
12864 fi
12865
12866 if test "$ac_cv_func_wprintf" = yes; then
12867 HAVE_WPRINTF=1
12868 else
12869 HAVE_WPRINTF=0
b80f6443
JA
12870 fi
12871
12872
8868edaf 12873
74091dd4
CR
12874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12875printf %s "checking for nl_langinfo and CODESET... " >&6; }
12876if test ${am_cv_langinfo_codeset+y}
12877then :
12878 printf %s "(cached) " >&6
12879else $as_nop
ac50fbac 12880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12881/* end confdefs.h. */
b80f6443 12882#include <langinfo.h>
f73dda09 12883int
74091dd4 12884main (void)
f73dda09 12885{
8868edaf 12886char* cs = nl_langinfo(CODESET); return !cs;
f73dda09
JA
12887 ;
12888 return 0;
12889}
12890_ACEOF
74091dd4
CR
12891if ac_fn_c_try_link "$LINENO"
12892then :
b80f6443 12893 am_cv_langinfo_codeset=yes
74091dd4 12894else $as_nop
ac50fbac 12895 am_cv_langinfo_codeset=no
f73dda09 12896fi
74091dd4 12897rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 12898 conftest$ac_exeext conftest.$ac_ext
b80f6443 12899
f73dda09 12900fi
74091dd4
CR
12901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12902printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
b80f6443 12903 if test $am_cv_langinfo_codeset = yes; then
f73dda09 12904
74091dd4 12905printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f73dda09 12906
b80f6443 12907 fi
f73dda09 12908
f73dda09 12909
74091dd4
CR
12910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12911printf %s "checking for LC_MESSAGES... " >&6; }
12912if test ${gt_cv_val_LC_MESSAGES+y}
12913then :
12914 printf %s "(cached) " >&6
12915else $as_nop
ac50fbac 12916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 12917/* end confdefs.h. */
b80f6443 12918#include <locale.h>
f73dda09 12919int
74091dd4 12920main (void)
f73dda09 12921{
b80f6443 12922return LC_MESSAGES
f73dda09
JA
12923 ;
12924 return 0;
12925}
12926_ACEOF
74091dd4
CR
12927if ac_fn_c_try_link "$LINENO"
12928then :
8868edaf 12929 gt_cv_val_LC_MESSAGES=yes
74091dd4 12930else $as_nop
8868edaf 12931 gt_cv_val_LC_MESSAGES=no
f73dda09 12932fi
74091dd4 12933rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 12934 conftest$ac_exeext conftest.$ac_ext
f73dda09 12935fi
74091dd4
CR
12936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
12937printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; }
8868edaf 12938 if test $gt_cv_val_LC_MESSAGES = yes; then
f73dda09 12939
74091dd4 12940printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h
b80f6443
JA
12941
12942 fi
12943
8868edaf
CR
12944
12945 if test $gt_nameless_locales = yes; then
12946 HAVE_NAMELESS_LOCALES=1
12947 else
12948 HAVE_NAMELESS_LOCALES=0
12949 fi
12950
12951
12952 if test "$enable_shared" = yes; then
12953 case "$host_os" in
12954 mingw* | cygwin*) is_woe32dll=yes ;;
12955 *) is_woe32dll=no ;;
12956 esac
12957 else
12958 is_woe32dll=no
b80f6443 12959 fi
8868edaf 12960 WOE32DLL=$is_woe32dll
f73dda09 12961
8868edaf
CR
12962
12963 case "$host_os" in
12964 mingw* | cygwin*) is_woe32=yes ;;
12965 *) is_woe32=no ;;
12966 esac
12967 WOE32=$is_woe32
12968
12969 if test $WOE32 = yes; then
12970 if test -n "$ac_tool_prefix"; then
12971 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
12972set dummy ${ac_tool_prefix}windres; ac_word=$2
74091dd4
CR
12973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12974printf %s "checking for $ac_word... " >&6; }
12975if test ${ac_cv_prog_WINDRES+y}
12976then :
12977 printf %s "(cached) " >&6
12978else $as_nop
8868edaf
CR
12979 if test -n "$WINDRES"; then
12980 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
b80f6443
JA
12981else
12982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12983for as_dir in $PATH
12984do
12985 IFS=$as_save_IFS
74091dd4
CR
12986 case $as_dir in #(((
12987 '') as_dir=./ ;;
12988 */) ;;
12989 *) as_dir=$as_dir/ ;;
12990 esac
ac50fbac 12991 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 12992 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8868edaf 12993 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
74091dd4 12994 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
b80f6443
JA
12995 break 2
12996 fi
12997done
ac50fbac 12998 done
3185942a 12999IFS=$as_save_IFS
f73dda09 13000
b80f6443
JA
13001fi
13002fi
8868edaf
CR
13003WINDRES=$ac_cv_prog_WINDRES
13004if test -n "$WINDRES"; then
74091dd4
CR
13005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
13006printf "%s\n" "$WINDRES" >&6; }
b80f6443 13007else
74091dd4
CR
13008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13009printf "%s\n" "no" >&6; }
f73dda09
JA
13010fi
13011
3185942a 13012
8868edaf
CR
13013fi
13014if test -z "$ac_cv_prog_WINDRES"; then
13015 ac_ct_WINDRES=$WINDRES
13016 # Extract the first word of "windres", so it can be a program name with args.
13017set dummy windres; ac_word=$2
74091dd4
CR
13018{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13019printf %s "checking for $ac_word... " >&6; }
13020if test ${ac_cv_prog_ac_ct_WINDRES+y}
13021then :
13022 printf %s "(cached) " >&6
13023else $as_nop
8868edaf
CR
13024 if test -n "$ac_ct_WINDRES"; then
13025 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
13026else
13027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13028for as_dir in $PATH
13029do
13030 IFS=$as_save_IFS
74091dd4
CR
13031 case $as_dir in #(((
13032 '') as_dir=./ ;;
13033 */) ;;
13034 *) as_dir=$as_dir/ ;;
13035 esac
8868edaf 13036 for ac_exec_ext in '' $ac_executable_extensions; do
74091dd4 13037 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8868edaf 13038 ac_cv_prog_ac_ct_WINDRES="windres"
74091dd4 13039 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8868edaf
CR
13040 break 2
13041 fi
b80f6443 13042done
8868edaf
CR
13043 done
13044IFS=$as_save_IFS
b80f6443 13045
8868edaf
CR
13046fi
13047fi
13048ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
13049if test -n "$ac_ct_WINDRES"; then
74091dd4
CR
13050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
13051printf "%s\n" "$ac_ct_WINDRES" >&6; }
8868edaf 13052else
74091dd4
CR
13053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13054printf "%s\n" "no" >&6; }
8868edaf
CR
13055fi
13056
13057 if test "x$ac_ct_WINDRES" = x; then
13058 WINDRES=""
b80f6443 13059 else
8868edaf
CR
13060 case $cross_compiling:$ac_tool_warned in
13061yes:)
74091dd4
CR
13062{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13063printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8868edaf
CR
13064ac_tool_warned=yes ;;
13065esac
13066 WINDRES=$ac_ct_WINDRES
b80f6443 13067 fi
8868edaf
CR
13068else
13069 WINDRES="$ac_cv_prog_WINDRES"
13070fi
13071
b80f6443
JA
13072 fi
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
8868edaf
CR
13089
13090
13091
13092
13093
13094
13095
13096
13097
74091dd4
CR
13098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
13099printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
13100if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
13101then :
13102 printf %s "(cached) " >&6
13103else $as_nop
8868edaf
CR
13104 gt_save_LIBS="$LIBS"
13105 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
13106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107/* end confdefs.h. */
13108#include <CoreFoundation/CFPreferences.h>
13109int
74091dd4 13110main (void)
8868edaf
CR
13111{
13112CFPreferencesCopyAppValue(NULL, NULL)
13113 ;
13114 return 0;
13115}
13116_ACEOF
74091dd4
CR
13117if ac_fn_c_try_link "$LINENO"
13118then :
8868edaf 13119 gt_cv_func_CFPreferencesCopyAppValue=yes
74091dd4 13120else $as_nop
8868edaf
CR
13121 gt_cv_func_CFPreferencesCopyAppValue=no
13122fi
74091dd4 13123rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
13124 conftest$ac_exeext conftest.$ac_ext
13125 LIBS="$gt_save_LIBS"
13126fi
74091dd4
CR
13127{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
13128printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
8868edaf
CR
13129 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
13130
74091dd4 13131printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
8868edaf
CR
13132
13133 fi
74091dd4
CR
13134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
13135printf %s "checking for CFLocaleCopyCurrent... " >&6; }
13136if test ${gt_cv_func_CFLocaleCopyCurrent+y}
13137then :
13138 printf %s "(cached) " >&6
13139else $as_nop
8868edaf
CR
13140 gt_save_LIBS="$LIBS"
13141 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
13142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13143/* end confdefs.h. */
13144#include <CoreFoundation/CFLocale.h>
13145int
74091dd4 13146main (void)
8868edaf
CR
13147{
13148CFLocaleCopyCurrent();
13149 ;
13150 return 0;
13151}
13152_ACEOF
74091dd4
CR
13153if ac_fn_c_try_link "$LINENO"
13154then :
8868edaf 13155 gt_cv_func_CFLocaleCopyCurrent=yes
74091dd4 13156else $as_nop
8868edaf
CR
13157 gt_cv_func_CFLocaleCopyCurrent=no
13158fi
74091dd4 13159rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
13160 conftest$ac_exeext conftest.$ac_ext
13161 LIBS="$gt_save_LIBS"
13162fi
74091dd4
CR
13163{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
13164printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
8868edaf
CR
13165 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
13166
74091dd4 13167printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
8868edaf
CR
13168
13169 fi
74091dd4
CR
13170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
13171printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
13172if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
13173then :
13174 printf %s "(cached) " >&6
13175else $as_nop
8868edaf
CR
13176 gt_save_LIBS="$LIBS"
13177 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
13178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13179/* end confdefs.h. */
13180#include <CoreFoundation/CFLocale.h>
13181int
74091dd4 13182main (void)
8868edaf
CR
13183{
13184CFLocaleCopyPreferredLanguages();
13185 ;
13186 return 0;
13187}
13188_ACEOF
74091dd4
CR
13189if ac_fn_c_try_link "$LINENO"
13190then :
8868edaf 13191 gt_cv_func_CFLocaleCopyPreferredLanguages=yes
74091dd4 13192else $as_nop
8868edaf
CR
13193 gt_cv_func_CFLocaleCopyPreferredLanguages=no
13194fi
74091dd4 13195rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
13196 conftest$ac_exeext conftest.$ac_ext
13197 LIBS="$gt_save_LIBS"
3185942a 13198fi
74091dd4
CR
13199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
13200printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
8868edaf
CR
13201 if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
13202
74091dd4 13203printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
8868edaf
CR
13204
13205 fi
13206 INTL_MACOSX_LIBS=
13207 if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
13208 || test $gt_cv_func_CFLocaleCopyCurrent = yes \
13209 || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
13210 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
13211 fi
13212
3185942a 13213
b80f6443
JA
13214
13215
13216
13217
13218 BUILD_INCLUDED_LIBINTL=no
13219 USE_INCLUDED_LIBINTL=no
13220
13221 LIBINTL=
13222 LTLIBINTL=
13223 POSUB=
13224
8868edaf
CR
13225 case " $gt_needs " in
13226 *" need-formatstring-macros "*) gt_api_version=3 ;;
13227 *" need-ngettext "*) gt_api_version=2 ;;
13228 *) gt_api_version=1 ;;
13229 esac
13230 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
13231 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
13232
b80f6443
JA
13233 if test "$USE_NLS" = "yes"; then
13234 gt_use_preinstalled_gnugettext=no
13235
74091dd4
CR
13236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5
13237printf %s "checking whether included gettext is requested... " >&6; }
b80f6443 13238
3185942a 13239# Check whether --with-included-gettext was given.
74091dd4
CR
13240if test ${with_included_gettext+y}
13241then :
3185942a 13242 withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
74091dd4 13243else $as_nop
b80f6443 13244 nls_cv_force_use_gnu_gettext=no
3185942a
JA
13245fi
13246
74091dd4
CR
13247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5
13248printf "%s\n" "$nls_cv_force_use_gnu_gettext" >&6; }
b80f6443
JA
13249
13250 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
13251 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
13252
13253
8868edaf
CR
13254 if test $gt_api_version -ge 3; then
13255 gt_revision_test_code='
13256#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
13257#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
13258#endif
13259typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
13260'
13261 else
13262 gt_revision_test_code=
13263 fi
13264 if test $gt_api_version -ge 2; then
13265 gt_expression_test_code=' + * ngettext ("", "", 0)'
13266 else
13267 gt_expression_test_code=
13268 fi
b80f6443 13269
74091dd4
CR
13270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
13271printf %s "checking for GNU gettext in libc... " >&6; }
13272if eval test \${$gt_func_gnugettext_libc+y}
13273then :
13274 printf %s "(cached) " >&6
13275else $as_nop
ac50fbac 13276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 13277/* end confdefs.h. */
8868edaf 13278
b80f6443 13279#include <libintl.h>
8868edaf 13280#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
b80f6443
JA
13281extern int _nl_msg_cat_cntr;
13282extern int *_nl_domain_bindings;
8868edaf
CR
13283#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
13284#else
13285#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
13286#endif
13287$gt_revision_test_code
13288
f73dda09 13289int
74091dd4 13290main (void)
f73dda09 13291{
8868edaf 13292
b80f6443 13293bindtextdomain ("", "");
8868edaf
CR
13294return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
13295
f73dda09
JA
13296 ;
13297 return 0;
13298}
13299_ACEOF
74091dd4
CR
13300if ac_fn_c_try_link "$LINENO"
13301then :
8868edaf 13302 eval "$gt_func_gnugettext_libc=yes"
74091dd4 13303else $as_nop
8868edaf 13304 eval "$gt_func_gnugettext_libc=no"
f73dda09 13305fi
74091dd4 13306rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 13307 conftest$ac_exeext conftest.$ac_ext
f73dda09 13308fi
8868edaf 13309eval ac_res=\$$gt_func_gnugettext_libc
74091dd4
CR
13310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13311printf "%s\n" "$ac_res" >&6; }
8868edaf
CR
13312
13313 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
13314
13315
13316
f73dda09 13317
f73dda09 13318
f73dda09 13319
f73dda09 13320
b80f6443
JA
13321 use_additional=yes
13322
13323 acl_save_prefix="$prefix"
13324 prefix="$acl_final_prefix"
13325 acl_save_exec_prefix="$exec_prefix"
13326 exec_prefix="$acl_final_exec_prefix"
13327
13328 eval additional_includedir=\"$includedir\"
13329 eval additional_libdir=\"$libdir\"
13330
13331 exec_prefix="$acl_save_exec_prefix"
13332 prefix="$acl_save_prefix"
13333
13334
3185942a 13335# Check whether --with-libintl-prefix was given.
74091dd4
CR
13336if test ${with_libintl_prefix+y}
13337then :
3185942a 13338 withval=$with_libintl_prefix;
b80f6443
JA
13339 if test "X$withval" = "Xno"; then
13340 use_additional=no
13341 else
13342 if test "X$withval" = "X"; then
13343
13344 acl_save_prefix="$prefix"
13345 prefix="$acl_final_prefix"
13346 acl_save_exec_prefix="$exec_prefix"
13347 exec_prefix="$acl_final_exec_prefix"
13348
13349 eval additional_includedir=\"$includedir\"
13350 eval additional_libdir=\"$libdir\"
13351
13352 exec_prefix="$acl_save_exec_prefix"
13353 prefix="$acl_save_prefix"
13354
13355 else
13356 additional_includedir="$withval/include"
8868edaf
CR
13357 additional_libdir="$withval/$acl_libdirstem"
13358 if test "$acl_libdirstem2" != "$acl_libdirstem" \
13359 && test ! -d "$withval/$acl_libdirstem"; then
13360 additional_libdir="$withval/$acl_libdirstem2"
13361 fi
b80f6443
JA
13362 fi
13363 fi
13364
3185942a
JA
13365fi
13366
b80f6443
JA
13367 LIBINTL=
13368 LTLIBINTL=
13369 INCINTL=
8868edaf
CR
13370 LIBINTL_PREFIX=
13371 HAVE_LIBINTL=
b80f6443
JA
13372 rpathdirs=
13373 ltrpathdirs=
13374 names_already_handled=
13375 names_next_round='intl '
13376 while test -n "$names_next_round"; do
13377 names_this_round="$names_next_round"
13378 names_next_round=
13379 for name in $names_this_round; do
13380 already_handled=
13381 for n in $names_already_handled; do
13382 if test "$n" = "$name"; then
13383 already_handled=yes
13384 break
13385 fi
13386 done
13387 if test -z "$already_handled"; then
13388 names_already_handled="$names_already_handled $name"
8868edaf 13389 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
b80f6443
JA
13390 eval value=\"\$HAVE_LIB$uppername\"
13391 if test -n "$value"; then
13392 if test "$value" = yes; then
13393 eval value=\"\$LIB$uppername\"
13394 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
13395 eval value=\"\$LTLIB$uppername\"
13396 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
13397 else
13398 :
13399 fi
13400 else
13401 found_dir=
13402 found_la=
13403 found_so=
13404 found_a=
8868edaf
CR
13405 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
13406 if test -n "$acl_shlibext"; then
13407 shrext=".$acl_shlibext" # typically: shrext=.so
13408 else
13409 shrext=
13410 fi
b80f6443 13411 if test $use_additional = yes; then
8868edaf
CR
13412 dir="$additional_libdir"
13413 if test -n "$acl_shlibext"; then
13414 if test -f "$dir/$libname$shrext"; then
13415 found_dir="$dir"
13416 found_so="$dir/$libname$shrext"
13417 else
13418 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13419 ver=`(cd "$dir" && \
13420 for f in "$libname$shrext".*; do echo "$f"; done \
13421 | sed -e "s,^$libname$shrext\\\\.,," \
13422 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13423 | sed 1q ) 2>/dev/null`
13424 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13425 found_dir="$dir"
13426 found_so="$dir/$libname$shrext.$ver"
13427 fi
13428 else
13429 eval library_names=\"$acl_library_names_spec\"
13430 for f in $library_names; do
13431 if test -f "$dir/$f"; then
13432 found_dir="$dir"
13433 found_so="$dir/$f"
13434 break
13435 fi
13436 done
b80f6443
JA
13437 fi
13438 fi
8868edaf
CR
13439 fi
13440 if test "X$found_dir" = "X"; then
13441 if test -f "$dir/$libname.$acl_libext"; then
13442 found_dir="$dir"
13443 found_a="$dir/$libname.$acl_libext"
13444 fi
13445 fi
13446 if test "X$found_dir" != "X"; then
13447 if test -f "$dir/$libname.la"; then
13448 found_la="$dir/$libname.la"
13449 fi
b80f6443
JA
13450 fi
13451 fi
13452 if test "X$found_dir" = "X"; then
13453 for x in $LDFLAGS $LTLIBINTL; do
13454
13455 acl_save_prefix="$prefix"
13456 prefix="$acl_final_prefix"
13457 acl_save_exec_prefix="$exec_prefix"
13458 exec_prefix="$acl_final_exec_prefix"
13459 eval x=\"$x\"
13460 exec_prefix="$acl_save_exec_prefix"
13461 prefix="$acl_save_prefix"
13462
13463 case "$x" in
13464 -L*)
13465 dir=`echo "X$x" | sed -e 's/^X-L//'`
8868edaf
CR
13466 if test -n "$acl_shlibext"; then
13467 if test -f "$dir/$libname$shrext"; then
b80f6443 13468 found_dir="$dir"
8868edaf
CR
13469 found_so="$dir/$libname$shrext"
13470 else
13471 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13472 ver=`(cd "$dir" && \
13473 for f in "$libname$shrext".*; do echo "$f"; done \
13474 | sed -e "s,^$libname$shrext\\\\.,," \
13475 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13476 | sed 1q ) 2>/dev/null`
13477 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13478 found_dir="$dir"
13479 found_so="$dir/$libname$shrext.$ver"
13480 fi
13481 else
13482 eval library_names=\"$acl_library_names_spec\"
13483 for f in $library_names; do
13484 if test -f "$dir/$f"; then
13485 found_dir="$dir"
13486 found_so="$dir/$f"
13487 break
13488 fi
13489 done
b80f6443
JA
13490 fi
13491 fi
8868edaf
CR
13492 fi
13493 if test "X$found_dir" = "X"; then
13494 if test -f "$dir/$libname.$acl_libext"; then
13495 found_dir="$dir"
13496 found_a="$dir/$libname.$acl_libext"
13497 fi
13498 fi
13499 if test "X$found_dir" != "X"; then
13500 if test -f "$dir/$libname.la"; then
13501 found_la="$dir/$libname.la"
13502 fi
b80f6443
JA
13503 fi
13504 ;;
13505 esac
13506 if test "X$found_dir" != "X"; then
13507 break
13508 fi
13509 done
13510 fi
13511 if test "X$found_dir" != "X"; then
13512 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
13513 if test "X$found_so" != "X"; then
8868edaf
CR
13514 if test "$enable_rpath" = no \
13515 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
13516 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
b80f6443
JA
13517 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
13518 else
13519 haveit=
13520 for x in $ltrpathdirs; do
13521 if test "X$x" = "X$found_dir"; then
13522 haveit=yes
13523 break
13524 fi
13525 done
13526 if test -z "$haveit"; then
13527 ltrpathdirs="$ltrpathdirs $found_dir"
13528 fi
8868edaf 13529 if test "$acl_hardcode_direct" = yes; then
b80f6443
JA
13530 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
13531 else
8868edaf 13532 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
b80f6443
JA
13533 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
13534 haveit=
13535 for x in $rpathdirs; do
13536 if test "X$x" = "X$found_dir"; then
13537 haveit=yes
13538 break
13539 fi
13540 done
13541 if test -z "$haveit"; then
13542 rpathdirs="$rpathdirs $found_dir"
13543 fi
13544 else
13545 haveit=
13546 for x in $LDFLAGS $LIBINTL; do
13547
13548 acl_save_prefix="$prefix"
13549 prefix="$acl_final_prefix"
13550 acl_save_exec_prefix="$exec_prefix"
13551 exec_prefix="$acl_final_exec_prefix"
13552 eval x=\"$x\"
13553 exec_prefix="$acl_save_exec_prefix"
13554 prefix="$acl_save_prefix"
13555
13556 if test "X$x" = "X-L$found_dir"; then
13557 haveit=yes
13558 break
13559 fi
13560 done
13561 if test -z "$haveit"; then
13562 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
13563 fi
8868edaf 13564 if test "$acl_hardcode_minus_L" != no; then
b80f6443
JA
13565 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
13566 else
13567 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
13568 fi
13569 fi
13570 fi
13571 fi
13572 else
13573 if test "X$found_a" != "X"; then
13574 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
13575 else
13576 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
13577 fi
13578 fi
13579 additional_includedir=
13580 case "$found_dir" in
8868edaf
CR
13581 */$acl_libdirstem | */$acl_libdirstem/)
13582 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
13583 if test "$name" = 'intl'; then
13584 LIBINTL_PREFIX="$basedir"
13585 fi
13586 additional_includedir="$basedir/include"
13587 ;;
13588 */$acl_libdirstem2 | */$acl_libdirstem2/)
13589 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
13590 if test "$name" = 'intl'; then
13591 LIBINTL_PREFIX="$basedir"
13592 fi
b80f6443
JA
13593 additional_includedir="$basedir/include"
13594 ;;
13595 esac
13596 if test "X$additional_includedir" != "X"; then
13597 if test "X$additional_includedir" != "X/usr/include"; then
13598 haveit=
13599 if test "X$additional_includedir" = "X/usr/local/include"; then
13600 if test -n "$GCC"; then
13601 case $host_os in
8868edaf 13602 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
b80f6443
JA
13603 esac
13604 fi
13605 fi
13606 if test -z "$haveit"; then
13607 for x in $CPPFLAGS $INCINTL; do
13608
13609 acl_save_prefix="$prefix"
13610 prefix="$acl_final_prefix"
13611 acl_save_exec_prefix="$exec_prefix"
13612 exec_prefix="$acl_final_exec_prefix"
13613 eval x=\"$x\"
13614 exec_prefix="$acl_save_exec_prefix"
13615 prefix="$acl_save_prefix"
13616
13617 if test "X$x" = "X-I$additional_includedir"; then
13618 haveit=yes
13619 break
13620 fi
13621 done
13622 if test -z "$haveit"; then
13623 if test -d "$additional_includedir"; then
13624 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
13625 fi
13626 fi
13627 fi
13628 fi
13629 fi
13630 if test -n "$found_la"; then
13631 save_libdir="$libdir"
13632 case "$found_la" in
13633 */* | *\\*) . "$found_la" ;;
13634 *) . "./$found_la" ;;
13635 esac
13636 libdir="$save_libdir"
13637 for dep in $dependency_libs; do
13638 case "$dep" in
13639 -L*)
13640 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8868edaf
CR
13641 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
13642 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
b80f6443 13643 haveit=
8868edaf
CR
13644 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
13645 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
b80f6443
JA
13646 if test -n "$GCC"; then
13647 case $host_os in
8868edaf 13648 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
b80f6443
JA
13649 esac
13650 fi
13651 fi
13652 if test -z "$haveit"; then
13653 haveit=
13654 for x in $LDFLAGS $LIBINTL; do
13655
13656 acl_save_prefix="$prefix"
13657 prefix="$acl_final_prefix"
13658 acl_save_exec_prefix="$exec_prefix"
13659 exec_prefix="$acl_final_exec_prefix"
13660 eval x=\"$x\"
13661 exec_prefix="$acl_save_exec_prefix"
13662 prefix="$acl_save_prefix"
13663
13664 if test "X$x" = "X-L$additional_libdir"; then
13665 haveit=yes
13666 break
13667 fi
13668 done
13669 if test -z "$haveit"; then
13670 if test -d "$additional_libdir"; then
13671 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
13672 fi
13673 fi
13674 haveit=
13675 for x in $LDFLAGS $LTLIBINTL; do
13676
13677 acl_save_prefix="$prefix"
13678 prefix="$acl_final_prefix"
13679 acl_save_exec_prefix="$exec_prefix"
13680 exec_prefix="$acl_final_exec_prefix"
13681 eval x=\"$x\"
13682 exec_prefix="$acl_save_exec_prefix"
13683 prefix="$acl_save_prefix"
13684
13685 if test "X$x" = "X-L$additional_libdir"; then
13686 haveit=yes
13687 break
13688 fi
13689 done
13690 if test -z "$haveit"; then
13691 if test -d "$additional_libdir"; then
13692 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
13693 fi
13694 fi
13695 fi
13696 fi
13697 ;;
13698 -R*)
13699 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13700 if test "$enable_rpath" != no; then
13701 haveit=
13702 for x in $rpathdirs; do
13703 if test "X$x" = "X$dir"; then
13704 haveit=yes
13705 break
13706 fi
13707 done
13708 if test -z "$haveit"; then
13709 rpathdirs="$rpathdirs $dir"
13710 fi
13711 haveit=
13712 for x in $ltrpathdirs; do
13713 if test "X$x" = "X$dir"; then
13714 haveit=yes
13715 break
13716 fi
13717 done
13718 if test -z "$haveit"; then
13719 ltrpathdirs="$ltrpathdirs $dir"
13720 fi
13721 fi
13722 ;;
13723 -l*)
13724 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13725 ;;
13726 *.la)
13727 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13728 ;;
13729 *)
13730 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
13731 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
13732 ;;
13733 esac
13734 done
13735 fi
13736 else
13737 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
13738 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
13739 fi
13740 fi
13741 fi
13742 done
13743 done
13744 if test "X$rpathdirs" != "X"; then
8868edaf 13745 if test -n "$acl_hardcode_libdir_separator"; then
b80f6443
JA
13746 alldirs=
13747 for found_dir in $rpathdirs; do
8868edaf 13748 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
b80f6443
JA
13749 done
13750 acl_save_libdir="$libdir"
13751 libdir="$alldirs"
8868edaf 13752 eval flag=\"$acl_hardcode_libdir_flag_spec\"
b80f6443
JA
13753 libdir="$acl_save_libdir"
13754 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
13755 else
13756 for found_dir in $rpathdirs; do
13757 acl_save_libdir="$libdir"
13758 libdir="$found_dir"
8868edaf 13759 eval flag=\"$acl_hardcode_libdir_flag_spec\"
b80f6443
JA
13760 libdir="$acl_save_libdir"
13761 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
13762 done
13763 fi
13764 fi
ac50fbac
CR
13765 if test "X$ltrpathdirs" != "X"; then
13766 for found_dir in $ltrpathdirs; do
13767 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
13768 done
13769 fi
3185942a 13770
8868edaf
CR
13771
13772
13773
13774
74091dd4
CR
13775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
13776printf %s "checking for GNU gettext in libintl... " >&6; }
13777if eval test \${$gt_func_gnugettext_libintl+y}
13778then :
13779 printf %s "(cached) " >&6
13780else $as_nop
ac50fbac
CR
13781 gt_save_CPPFLAGS="$CPPFLAGS"
13782 CPPFLAGS="$CPPFLAGS $INCINTL"
13783 gt_save_LIBS="$LIBS"
13784 LIBS="$LIBS $LIBINTL"
13785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 13786/* end confdefs.h. */
8868edaf 13787
ac50fbac 13788#include <libintl.h>
8868edaf 13789#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
ac50fbac
CR
13790extern int _nl_msg_cat_cntr;
13791extern
13792#ifdef __cplusplus
13793"C"
13794#endif
8868edaf
CR
13795const char *_nl_expand_alias (const char *);
13796#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
13797#else
13798#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
13799#endif
13800$gt_revision_test_code
13801
3185942a 13802int
74091dd4 13803main (void)
3185942a 13804{
8868edaf 13805
ac50fbac 13806bindtextdomain ("", "");
8868edaf
CR
13807return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
13808
f73dda09
JA
13809 ;
13810 return 0;
13811}
13812_ACEOF
74091dd4
CR
13813if ac_fn_c_try_link "$LINENO"
13814then :
8868edaf 13815 eval "$gt_func_gnugettext_libintl=yes"
74091dd4 13816else $as_nop
8868edaf 13817 eval "$gt_func_gnugettext_libintl=no"
ac50fbac 13818fi
74091dd4 13819rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 13820 conftest$ac_exeext conftest.$ac_ext
8868edaf 13821 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
ac50fbac
CR
13822 LIBS="$LIBS $LIBICONV"
13823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 13824/* end confdefs.h. */
8868edaf 13825
ac50fbac 13826#include <libintl.h>
8868edaf 13827#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
ac50fbac
CR
13828extern int _nl_msg_cat_cntr;
13829extern
13830#ifdef __cplusplus
13831"C"
13832#endif
8868edaf
CR
13833const char *_nl_expand_alias (const char *);
13834#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
13835#else
13836#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
13837#endif
13838$gt_revision_test_code
13839
3185942a 13840int
74091dd4 13841main (void)
3185942a 13842{
8868edaf 13843
ac50fbac 13844bindtextdomain ("", "");
8868edaf
CR
13845return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
13846
3185942a
JA
13847 ;
13848 return 0;
13849}
13850_ACEOF
74091dd4
CR
13851if ac_fn_c_try_link "$LINENO"
13852then :
ac50fbac 13853 LIBINTL="$LIBINTL $LIBICONV"
8868edaf
CR
13854 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
13855 eval "$gt_func_gnugettext_libintl=yes"
3185942a 13856
3185942a 13857fi
74091dd4 13858rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac
CR
13859 conftest$ac_exeext conftest.$ac_ext
13860 fi
13861 CPPFLAGS="$gt_save_CPPFLAGS"
13862 LIBS="$gt_save_LIBS"
13863fi
8868edaf 13864eval ac_res=\$$gt_func_gnugettext_libintl
74091dd4
CR
13865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13866printf "%s\n" "$ac_res" >&6; }
ac50fbac 13867 fi
3185942a 13868
8868edaf
CR
13869 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
13870 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
ac50fbac
CR
13871 && test "$PACKAGE" != gettext-runtime \
13872 && test "$PACKAGE" != gettext-tools; }; then
13873 gt_use_preinstalled_gnugettext=yes
13874 else
13875 LIBINTL=
13876 LTLIBINTL=
13877 INCINTL=
13878 fi
0628567a 13879
3185942a 13880
ac50fbac
CR
13881 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
13882 nls_cv_use_gnu_gettext=yes
13883 fi
13884 fi
3185942a 13885
ac50fbac
CR
13886 if test "$nls_cv_use_gnu_gettext" = "yes"; then
13887 BUILD_INCLUDED_LIBINTL=yes
13888 USE_INCLUDED_LIBINTL=yes
8868edaf
CR
13889 LIBINTL="lib/intl/libintl.a $LIBICONV $LIBTHREAD"
13890 LTLIBINTL="lib/intl/libintl.a $LTLIBICONV $LTLIBTHREAD"
ac50fbac
CR
13891 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
13892 fi
f73dda09 13893
8868edaf 13894 CATOBJEXT=
ac50fbac
CR
13895 if test "$gt_use_preinstalled_gnugettext" = "yes" \
13896 || test "$nls_cv_use_gnu_gettext" = "yes"; then
13897 CATOBJEXT=.gmo
13898 fi
ccc6cda3 13899
ccc6cda3 13900
8868edaf
CR
13901 if test -n "$INTL_MACOSX_LIBS"; then
13902 if test "$gt_use_preinstalled_gnugettext" = "yes" \
13903 || test "$nls_cv_use_gnu_gettext" = "yes"; then
13904 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
13905 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
13906 fi
13907 fi
13908
ac50fbac
CR
13909 if test "$gt_use_preinstalled_gnugettext" = "yes" \
13910 || test "$nls_cv_use_gnu_gettext" = "yes"; then
b80f6443 13911
74091dd4 13912printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
b80f6443 13913
ac50fbac
CR
13914 else
13915 USE_NLS=no
13916 fi
13917 fi
ccc6cda3 13918
74091dd4
CR
13919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
13920printf %s "checking whether to use NLS... " >&6; }
13921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
13922printf "%s\n" "$USE_NLS" >&6; }
ac50fbac 13923 if test "$USE_NLS" = "yes"; then
74091dd4
CR
13924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
13925printf %s "checking where the gettext function comes from... " >&6; }
ac50fbac 13926 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
8868edaf 13927 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
ac50fbac
CR
13928 gt_source="external libintl"
13929 else
13930 gt_source="libc"
13931 fi
13932 else
13933 gt_source="included intl directory"
13934 fi
74091dd4
CR
13935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
13936printf "%s\n" "$gt_source" >&6; }
ac50fbac 13937 fi
f73dda09 13938
ac50fbac 13939 if test "$USE_NLS" = "yes"; then
f73dda09 13940
ac50fbac 13941 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
8868edaf 13942 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
74091dd4
CR
13943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
13944printf %s "checking how to link with libintl... " >&6; }
13945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
13946printf "%s\n" "$LIBINTL" >&6; }
0628567a 13947
ac50fbac
CR
13948 for element in $INCINTL; do
13949 haveit=
13950 for x in $CPPFLAGS; do
3185942a 13951
ac50fbac
CR
13952 acl_save_prefix="$prefix"
13953 prefix="$acl_final_prefix"
13954 acl_save_exec_prefix="$exec_prefix"
13955 exec_prefix="$acl_final_exec_prefix"
13956 eval x=\"$x\"
13957 exec_prefix="$acl_save_exec_prefix"
13958 prefix="$acl_save_prefix"
ccc6cda3 13959
ac50fbac
CR
13960 if test "X$x" = "X$element"; then
13961 haveit=yes
13962 break
13963 fi
13964 done
13965 if test -z "$haveit"; then
13966 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13967 fi
13968 done
ccc6cda3 13969
ac50fbac 13970 fi
b80f6443 13971
f73dda09 13972
74091dd4 13973printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
f73dda09 13974
f73dda09 13975
74091dd4 13976printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
0628567a 13977
ac50fbac 13978 fi
3185942a 13979
ac50fbac
CR
13980 POSUB=po
13981 fi
ccc6cda3 13982
ac50fbac
CR
13983
13984 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
13985 BUILD_INCLUDED_LIBINTL=yes
13986 fi
ccc6cda3 13987
b80f6443 13988
ac50fbac
CR
13989
13990
13991
13992 nls_cv_header_intl=
13993 nls_cv_header_libgt=
13994
13995 DATADIRNAME=share
13996
13997
13998 INSTOBJEXT=.mo
13999
14000
14001 GENCAT=gencat
14002
14003
8868edaf
CR
14004 INTLOBJS=
14005 if test "$USE_INCLUDED_LIBINTL" = yes; then
ac50fbac
CR
14006 INTLOBJS="\$(GETTOBJS)"
14007 fi
14008
14009
14010 INTL_LIBTOOL_SUFFIX_PREFIX=
14011
14012
14013
14014 INTLLIBS="$LIBINTL"
14015
14016
14017
14018
14019
14020
14021
14022ac_header_dirent=no
14023for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
74091dd4
CR
14024 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
14026printf %s "checking for $ac_hdr that defines DIR... " >&6; }
14027if eval test \${$as_ac_Header+y}
14028then :
14029 printf %s "(cached) " >&6
14030else $as_nop
ac50fbac 14031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14032/* end confdefs.h. */
ccc6cda3 14033#include <sys/types.h>
ac50fbac 14034#include <$ac_hdr>
f73dda09
JA
14035
14036int
74091dd4 14037main (void)
f73dda09 14038{
ac50fbac
CR
14039if ((DIR *) 0)
14040return 0;
f73dda09
JA
14041 ;
14042 return 0;
14043}
14044_ACEOF
74091dd4
CR
14045if ac_fn_c_try_compile "$LINENO"
14046then :
ac50fbac 14047 eval "$as_ac_Header=yes"
74091dd4 14048else $as_nop
ac50fbac 14049 eval "$as_ac_Header=no"
ccc6cda3 14050fi
74091dd4 14051rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 14052fi
ac50fbac 14053eval ac_res=\$$as_ac_Header
74091dd4
CR
14054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14055printf "%s\n" "$ac_res" >&6; }
14056if eval test \"x\$"$as_ac_Header"\" = x"yes"
14057then :
ac50fbac 14058 cat >>confdefs.h <<_ACEOF
74091dd4 14059#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
b80f6443
JA
14060_ACEOF
14061
ac50fbac
CR
14062ac_header_dirent=$ac_hdr; break
14063fi
ccc6cda3 14064
ac50fbac
CR
14065done
14066# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14067if test $ac_header_dirent = dirent.h; then
74091dd4
CR
14068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
14069printf %s "checking for library containing opendir... " >&6; }
14070if test ${ac_cv_search_opendir+y}
14071then :
14072 printf %s "(cached) " >&6
14073else $as_nop
ac50fbac
CR
14074 ac_func_search_save_LIBS=$LIBS
14075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a
JA
14076/* end confdefs.h. */
14077
ac50fbac
CR
14078/* Override any GCC internal prototype to avoid an error.
14079 Use char because int might match the return type of a GCC
14080 builtin and then its argument prototype would still apply. */
ac50fbac 14081char opendir ();
17345e5a 14082int
74091dd4 14083main (void)
17345e5a 14084{
ac50fbac 14085return opendir ();
17345e5a
JA
14086 ;
14087 return 0;
14088}
14089_ACEOF
74091dd4
CR
14090for ac_lib in '' dir
14091do
ac50fbac
CR
14092 if test -z "$ac_lib"; then
14093 ac_res="none required"
14094 else
14095 ac_res=-l$ac_lib
14096 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14097 fi
74091dd4
CR
14098 if ac_fn_c_try_link "$LINENO"
14099then :
ac50fbac
CR
14100 ac_cv_search_opendir=$ac_res
14101fi
74091dd4 14102rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 14103 conftest$ac_exeext
74091dd4
CR
14104 if test ${ac_cv_search_opendir+y}
14105then :
ac50fbac
CR
14106 break
14107fi
14108done
74091dd4
CR
14109if test ${ac_cv_search_opendir+y}
14110then :
17345e5a 14111
74091dd4 14112else $as_nop
ac50fbac
CR
14113 ac_cv_search_opendir=no
14114fi
14115rm conftest.$ac_ext
14116LIBS=$ac_func_search_save_LIBS
17345e5a 14117fi
74091dd4
CR
14118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
14119printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac50fbac 14120ac_res=$ac_cv_search_opendir
74091dd4
CR
14121if test "$ac_res" != no
14122then :
ac50fbac 14123 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17345e5a 14124
17345e5a 14125fi
ac50fbac
CR
14126
14127else
74091dd4
CR
14128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
14129printf %s "checking for library containing opendir... " >&6; }
14130if test ${ac_cv_search_opendir+y}
14131then :
14132 printf %s "(cached) " >&6
14133else $as_nop
ac50fbac
CR
14134 ac_func_search_save_LIBS=$LIBS
14135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17345e5a 14136/* end confdefs.h. */
ac50fbac
CR
14137
14138/* Override any GCC internal prototype to avoid an error.
14139 Use char because int might match the return type of a GCC
14140 builtin and then its argument prototype would still apply. */
ac50fbac 14141char opendir ();
17345e5a 14142int
74091dd4 14143main (void)
17345e5a 14144{
ac50fbac 14145return opendir ();
17345e5a
JA
14146 ;
14147 return 0;
14148}
14149_ACEOF
74091dd4
CR
14150for ac_lib in '' x
14151do
ac50fbac
CR
14152 if test -z "$ac_lib"; then
14153 ac_res="none required"
14154 else
14155 ac_res=-l$ac_lib
14156 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14157 fi
74091dd4
CR
14158 if ac_fn_c_try_link "$LINENO"
14159then :
ac50fbac
CR
14160 ac_cv_search_opendir=$ac_res
14161fi
74091dd4 14162rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 14163 conftest$ac_exeext
74091dd4
CR
14164 if test ${ac_cv_search_opendir+y}
14165then :
ac50fbac 14166 break
17345e5a 14167fi
ac50fbac 14168done
74091dd4
CR
14169if test ${ac_cv_search_opendir+y}
14170then :
17345e5a 14171
74091dd4 14172else $as_nop
ac50fbac 14173 ac_cv_search_opendir=no
17345e5a 14174fi
ac50fbac
CR
14175rm conftest.$ac_ext
14176LIBS=$ac_func_search_save_LIBS
17345e5a 14177fi
74091dd4
CR
14178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
14179printf "%s\n" "$ac_cv_search_opendir" >&6; }
ac50fbac 14180ac_res=$ac_cv_search_opendir
74091dd4
CR
14181if test "$ac_res" != no
14182then :
ac50fbac 14183 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17345e5a
JA
14184
14185fi
14186
14187fi
14188
b80f6443 14189
74091dd4
CR
14190ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
14191if test "x$ac_cv_header_sys_mkdev_h" = xyes
14192then :
14193
14194printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h
14195
14196fi
14197
14198if test $ac_cv_header_sys_mkdev_h = no; then
14199 ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
14200if test "x$ac_cv_header_sys_sysmacros_h" = xyes
14201then :
14202
14203printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
14204
14205fi
14206
ac50fbac 14207fi
74091dd4
CR
14208
14209
14210
14211 ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
14212if test "x$ac_cv_header_inttypes_h" = xyes
14213then :
14214 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
14215
ac50fbac 14216fi
ac50fbac 14217
74091dd4
CR
14218
14219
14220ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
14221if test "x$ac_cv_header_unistd_h" = xyes
14222then :
14223 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
0628567a 14224
f73dda09 14225fi
74091dd4
CR
14226ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
14227if test "x$ac_cv_header_stdlib_h" = xyes
14228then :
14229 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
14230
14231fi
14232ac_fn_c_check_header_compile "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default"
14233if test "x$ac_cv_header_stdarg_h" = xyes
14234then :
14235 printf "%s\n" "#define HAVE_STDARG_H 1" >>confdefs.h
14236
14237fi
14238ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default"
14239if test "x$ac_cv_header_varargs_h" = xyes
14240then :
14241 printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h
14242
14243fi
14244ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
14245if test "x$ac_cv_header_limits_h" = xyes
14246then :
14247 printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h
14248
14249fi
14250ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
14251if test "x$ac_cv_header_string_h" = xyes
14252then :
14253 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
14254
14255fi
14256ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default"
14257if test "x$ac_cv_header_memory_h" = xyes
14258then :
14259 printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
14260
14261fi
14262ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
14263if test "x$ac_cv_header_locale_h" = xyes
14264then :
14265 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
14266
14267fi
14268ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
14269if test "x$ac_cv_header_termcap_h" = xyes
14270then :
14271 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
3185942a 14272
8868edaf 14273fi
74091dd4
CR
14274ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
14275if test "x$ac_cv_header_termio_h" = xyes
14276then :
14277 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
8868edaf
CR
14278
14279fi
74091dd4
CR
14280ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
14281if test "x$ac_cv_header_termios_h" = xyes
14282then :
14283 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
8868edaf 14284
74091dd4
CR
14285fi
14286ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
14287if test "x$ac_cv_header_dlfcn_h" = xyes
14288then :
14289 printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
8868edaf 14290
74091dd4
CR
14291fi
14292ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
14293if test "x$ac_cv_header_stdbool_h" = xyes
14294then :
14295 printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
8868edaf
CR
14296
14297fi
74091dd4
CR
14298ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
14299if test "x$ac_cv_header_stddef_h" = xyes
14300then :
14301 printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h
8868edaf 14302
74091dd4
CR
14303fi
14304ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
14305if test "x$ac_cv_header_stdint_h" = xyes
14306then :
14307 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
8868edaf 14308
74091dd4
CR
14309fi
14310ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
14311if test "x$ac_cv_header_netdb_h" = xyes
14312then :
14313 printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
8868edaf 14314
74091dd4
CR
14315fi
14316ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
14317if test "x$ac_cv_header_pwd_h" = xyes
14318then :
14319 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
8868edaf 14320
74091dd4
CR
14321fi
14322ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default"
14323if test "x$ac_cv_header_grp_h" = xyes
14324then :
14325 printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h
8868edaf
CR
14326
14327fi
74091dd4
CR
14328ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
14329if test "x$ac_cv_header_strings_h" = xyes
14330then :
14331 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
8868edaf 14332
74091dd4
CR
14333fi
14334ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default"
14335if test "x$ac_cv_header_regex_h" = xyes
14336then :
14337 printf "%s\n" "#define HAVE_REGEX_H 1" >>confdefs.h
8868edaf 14338
8868edaf 14339fi
74091dd4
CR
14340ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
14341if test "x$ac_cv_header_syslog_h" = xyes
14342then :
14343 printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h
8868edaf 14344
74091dd4
CR
14345fi
14346ac_fn_c_check_header_compile "$LINENO" "ulimit.h" "ac_cv_header_ulimit_h" "$ac_includes_default"
14347if test "x$ac_cv_header_ulimit_h" = xyes
14348then :
14349 printf "%s\n" "#define HAVE_ULIMIT_H 1" >>confdefs.h
0628567a 14350
74091dd4 14351fi
b80f6443 14352
74091dd4
CR
14353ac_fn_c_check_header_compile "$LINENO" "sys/pte.h" "ac_cv_header_sys_pte_h" "$ac_includes_default"
14354if test "x$ac_cv_header_sys_pte_h" = xyes
14355then :
14356 printf "%s\n" "#define HAVE_SYS_PTE_H 1" >>confdefs.h
ac50fbac
CR
14357
14358fi
74091dd4
CR
14359ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
14360if test "x$ac_cv_header_sys_stream_h" = xyes
14361then :
14362 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
ac50fbac 14363
74091dd4
CR
14364fi
14365ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
14366if test "x$ac_cv_header_sys_select_h" = xyes
14367then :
14368 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
ac50fbac 14369
74091dd4
CR
14370fi
14371ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default"
14372if test "x$ac_cv_header_sys_file_h" = xyes
14373then :
14374 printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h
ac50fbac 14375
74091dd4
CR
14376fi
14377ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
14378if test "x$ac_cv_header_sys_ioctl_h" = xyes
14379then :
14380 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
ac50fbac 14381
74091dd4
CR
14382fi
14383ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
14384if test "x$ac_cv_header_sys_mman_h" = xyes
14385then :
14386 printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
b80f6443 14387
ac50fbac 14388fi
74091dd4
CR
14389ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
14390if test "x$ac_cv_header_sys_param_h" = xyes
14391then :
14392 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
ac50fbac 14393
74091dd4
CR
14394fi
14395ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default"
14396if test "x$ac_cv_header_sys_random_h" = xyes
14397then :
14398 printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h
ac50fbac 14399
74091dd4
CR
14400fi
14401ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
14402if test "x$ac_cv_header_sys_socket_h" = xyes
14403then :
14404 printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
0628567a 14405
f73dda09 14406fi
74091dd4
CR
14407ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
14408if test "x$ac_cv_header_sys_stat_h" = xyes
14409then :
14410 printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
3185942a 14411
74091dd4
CR
14412fi
14413ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
14414if test "x$ac_cv_header_sys_time_h" = xyes
14415then :
14416 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
ac50fbac 14417
74091dd4
CR
14418fi
14419ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default"
14420if test "x$ac_cv_header_sys_times_h" = xyes
14421then :
14422 printf "%s\n" "#define HAVE_SYS_TIMES_H 1" >>confdefs.h
0628567a 14423
b80f6443 14424fi
74091dd4
CR
14425ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
14426if test "x$ac_cv_header_sys_types_h" = xyes
14427then :
14428 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
3185942a 14429
74091dd4
CR
14430fi
14431ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
14432if test "x$ac_cv_header_sys_wait_h" = xyes
14433then :
14434 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
14435
14436fi
14437
14438ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
14439if test "x$ac_cv_header_netinet_in_h" = xyes
14440then :
14441 printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
14442
14443fi
14444ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
14445if test "x$ac_cv_header_arpa_inet_h" = xyes
14446then :
14447 printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h
14448
14449fi
ac50fbac
CR
14450
14451
14452ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "
14453#if HAVE_SYS_STREAM_H
14454# include <sys/stream.h>
14455#endif
14456
14457"
74091dd4
CR
14458if test "x$ac_cv_header_sys_ptem_h" = xyes
14459then :
ac50fbac 14460
ccc6cda3 14461fi
3185942a 14462
ac50fbac 14463
a0c0a00f
CR
14464ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
14465#if HAVE_SYS_TIME_H
14466# include <sys/time.h>
14467#endif
14468
14469"
74091dd4
CR
14470if test "x$ac_cv_header_sys_resource_h" = xyes
14471then :
14472 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
a0c0a00f
CR
14473
14474fi
14475
14476
ac50fbac
CR
14477# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14478# for constant arguments. Useless!
74091dd4
CR
14479{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
14480printf %s "checking for working alloca.h... " >&6; }
14481if test ${ac_cv_working_alloca_h+y}
14482then :
14483 printf %s "(cached) " >&6
14484else $as_nop
ac50fbac 14485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14486/* end confdefs.h. */
ac50fbac 14487#include <alloca.h>
f73dda09 14488int
74091dd4 14489main (void)
f73dda09 14490{
ac50fbac
CR
14491char *p = (char *) alloca (2 * sizeof (int));
14492 if (p) return 0;
f73dda09
JA
14493 ;
14494 return 0;
14495}
14496_ACEOF
74091dd4
CR
14497if ac_fn_c_try_link "$LINENO"
14498then :
ac50fbac 14499 ac_cv_working_alloca_h=yes
74091dd4 14500else $as_nop
ac50fbac
CR
14501 ac_cv_working_alloca_h=no
14502fi
74091dd4 14503rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac
CR
14504 conftest$ac_exeext conftest.$ac_ext
14505fi
74091dd4
CR
14506{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
14507printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
ac50fbac
CR
14508if test $ac_cv_working_alloca_h = yes; then
14509
74091dd4 14510printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
0628567a 14511
f73dda09 14512fi
3185942a 14513
74091dd4
CR
14514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
14515printf %s "checking for alloca... " >&6; }
14516if test ${ac_cv_func_alloca_works+y}
14517then :
14518 printf %s "(cached) " >&6
14519else $as_nop
14520 if test $ac_cv_working_alloca_h = yes; then
14521 ac_cv_func_alloca_works=yes
f73dda09 14522else
ac50fbac 14523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14524/* end confdefs.h. */
74091dd4
CR
14525#include <stdlib.h>
14526#include <stddef.h>
14527#ifndef alloca
14528# ifdef __GNUC__
14529# define alloca __builtin_alloca
14530# elif defined _MSC_VER
ac50fbac
CR
14531# include <malloc.h>
14532# define alloca _alloca
14533# else
74091dd4
CR
14534# ifdef __cplusplus
14535extern "C"
ac50fbac 14536# endif
74091dd4 14537void *alloca (size_t);
ac50fbac
CR
14538# endif
14539#endif
14540
f73dda09 14541int
74091dd4 14542main (void)
f73dda09 14543{
ac50fbac
CR
14544char *p = (char *) alloca (1);
14545 if (p) return 0;
f73dda09
JA
14546 ;
14547 return 0;
14548}
14549_ACEOF
74091dd4
CR
14550if ac_fn_c_try_link "$LINENO"
14551then :
ac50fbac 14552 ac_cv_func_alloca_works=yes
74091dd4 14553else $as_nop
ac50fbac 14554 ac_cv_func_alloca_works=no
f73dda09 14555fi
74091dd4 14556rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 14557 conftest$ac_exeext conftest.$ac_ext
f73dda09 14558fi
74091dd4
CR
14559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
14560printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
14561fi
3185942a 14562
ac50fbac 14563if test $ac_cv_func_alloca_works = yes; then
3185942a 14564
74091dd4 14565printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
3185942a 14566
ac50fbac
CR
14567else
14568 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14569# that cause trouble. Some versions do not even contain alloca or
14570# contain a buggy version. If you still want to use their alloca,
14571# use ar to extract alloca.o from them instead of compiling alloca.c.
ccc6cda3 14572
ac50fbac 14573ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
b80f6443 14574
74091dd4 14575printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
ac50fbac 14576
ac50fbac 14577
74091dd4
CR
14578{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
14579printf %s "checking stack direction for C alloca... " >&6; }
14580if test ${ac_cv_c_stack_direction+y}
14581then :
14582 printf %s "(cached) " >&6
14583else $as_nop
14584 if test "$cross_compiling" = yes
14585then :
ac50fbac 14586 ac_cv_c_stack_direction=0
74091dd4 14587else $as_nop
ac50fbac 14588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14589/* end confdefs.h. */
f73dda09
JA
14590$ac_includes_default
14591int
ac50fbac 14592find_stack_direction (int *addr, int depth)
f73dda09 14593{
ac50fbac
CR
14594 int dir, dummy = 0;
14595 if (! addr)
14596 addr = &dummy;
14597 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
14598 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
14599 return dir + dummy;
14600}
b80f6443 14601
ac50fbac
CR
14602int
14603main (int argc, char **argv)
14604{
14605 return find_stack_direction (0, argc + !argv + 20) < 0;
f73dda09
JA
14606}
14607_ACEOF
74091dd4
CR
14608if ac_fn_c_try_run "$LINENO"
14609then :
ac50fbac 14610 ac_cv_c_stack_direction=1
74091dd4 14611else $as_nop
ac50fbac
CR
14612 ac_cv_c_stack_direction=-1
14613fi
14614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14615 conftest.$ac_objext conftest.beam conftest.$ac_ext
14616fi
14617
14618fi
74091dd4
CR
14619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
14620printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
14621printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
ac50fbac 14622
0628567a 14623
a0c0a00f
CR
14624fi
14625
74091dd4
CR
14626{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
14627printf %s "checking for uid_t in sys/types.h... " >&6; }
14628if test ${ac_cv_type_uid_t+y}
14629then :
14630 printf %s "(cached) " >&6
14631else $as_nop
a0c0a00f
CR
14632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14633/* end confdefs.h. */
14634#include <sys/types.h>
14635
14636_ACEOF
14637if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
14638 $EGREP "uid_t" >/dev/null 2>&1
14639then :
a0c0a00f 14640 ac_cv_type_uid_t=yes
74091dd4 14641else $as_nop
a0c0a00f
CR
14642 ac_cv_type_uid_t=no
14643fi
74091dd4 14644rm -rf conftest*
a0c0a00f
CR
14645
14646fi
74091dd4
CR
14647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
14648printf "%s\n" "$ac_cv_type_uid_t" >&6; }
a0c0a00f
CR
14649if test $ac_cv_type_uid_t = no; then
14650
74091dd4 14651printf "%s\n" "#define uid_t int" >>confdefs.h
a0c0a00f 14652
a0c0a00f 14653
74091dd4 14654printf "%s\n" "#define gid_t int" >>confdefs.h
a0c0a00f
CR
14655
14656fi
14657
74091dd4
CR
14658{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
14659printf %s "checking for working chown... " >&6; }
14660if test ${ac_cv_func_chown_works+y}
14661then :
14662 printf %s "(cached) " >&6
14663else $as_nop
14664 if test "$cross_compiling" = yes
14665then :
14666 case "$host_os" in # ((
14667 # Guess yes on glibc systems.
14668 *-gnu*) ac_cv_func_chown_works=yes ;;
14669 # If we don't know, assume the worst.
14670 *) ac_cv_func_chown_works=no ;;
14671 esac
14672else $as_nop
a0c0a00f
CR
14673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14674/* end confdefs.h. */
14675$ac_includes_default
14676#include <fcntl.h>
14677
14678int
74091dd4 14679main (void)
a0c0a00f
CR
14680{
14681 char *f = "conftest.chown";
14682 struct stat before, after;
14683
14684 if (creat (f, 0600) < 0)
14685 return 1;
14686 if (stat (f, &before) < 0)
14687 return 1;
14688 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
14689 return 1;
14690 if (stat (f, &after) < 0)
14691 return 1;
14692 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
14693
14694 ;
14695 return 0;
14696}
14697_ACEOF
74091dd4
CR
14698if ac_fn_c_try_run "$LINENO"
14699then :
a0c0a00f 14700 ac_cv_func_chown_works=yes
74091dd4 14701else $as_nop
a0c0a00f
CR
14702 ac_cv_func_chown_works=no
14703fi
14704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14705 conftest.$ac_objext conftest.beam conftest.$ac_ext
14706fi
14707
14708rm -f conftest.chown
14709
14710fi
74091dd4
CR
14711{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
14712printf "%s\n" "$ac_cv_func_chown_works" >&6; }
a0c0a00f
CR
14713if test $ac_cv_func_chown_works = yes; then
14714
74091dd4 14715printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h
a0c0a00f 14716
f73dda09 14717fi
3185942a 14718
74091dd4
CR
14719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
14720printf %s "checking whether getpgrp requires zero arguments... " >&6; }
14721if test ${ac_cv_func_getpgrp_void+y}
14722then :
14723 printf %s "(cached) " >&6
14724else $as_nop
ac50fbac
CR
14725 # Use it with a single arg.
14726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14727/* end confdefs.h. */
b80f6443
JA
14728$ac_includes_default
14729int
74091dd4 14730main (void)
b80f6443 14731{
ac50fbac 14732getpgrp (0);
b80f6443
JA
14733 ;
14734 return 0;
14735}
14736_ACEOF
74091dd4
CR
14737if ac_fn_c_try_compile "$LINENO"
14738then :
ac50fbac 14739 ac_cv_func_getpgrp_void=no
74091dd4 14740else $as_nop
ac50fbac
CR
14741 ac_cv_func_getpgrp_void=yes
14742fi
74091dd4 14743rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac
CR
14744
14745fi
74091dd4
CR
14746{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
14747printf "%s\n" "$ac_cv_func_getpgrp_void" >&6; }
ac50fbac
CR
14748if test $ac_cv_func_getpgrp_void = yes; then
14749
74091dd4 14750printf "%s\n" "#define GETPGRP_VOID 1" >>confdefs.h
ac50fbac 14751
ac50fbac
CR
14752fi
14753
14754
ac50fbac 14755
74091dd4
CR
14756if test "x$ac_cv_func_vprintf" = xno
14757then :
14758 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
14759if test "x$ac_cv_func__doprnt" = xyes
14760then :
ac50fbac 14761
74091dd4 14762printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h
ac50fbac
CR
14763
14764fi
14765
14766fi
74091dd4
CR
14767{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5
14768printf %s "checking for working strcoll... " >&6; }
14769if test ${ac_cv_func_strcoll_works+y}
14770then :
14771 printf %s "(cached) " >&6
14772else $as_nop
14773 if test "$cross_compiling" = yes
14774then :
14775 case "$host_os" in # ((
14776 # Guess yes on glibc systems.
14777 *-gnu*) ac_cv_func_strcoll_works=yes ;;
14778 # If we don't know, assume the worst.
14779 *) ac_cv_func_strcoll_works=no ;;
14780 esac
14781else $as_nop
ac50fbac 14782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 14783/* end confdefs.h. */
f73dda09
JA
14784$ac_includes_default
14785int
74091dd4 14786main (void)
f73dda09 14787{
ac50fbac
CR
14788return (strcoll ("abc", "def") >= 0 ||
14789 strcoll ("ABC", "DEF") >= 0 ||
14790 strcoll ("123", "456") >= 0)
f73dda09
JA
14791 ;
14792 return 0;
14793}
14794_ACEOF
74091dd4
CR
14795if ac_fn_c_try_run "$LINENO"
14796then :
ac50fbac 14797 ac_cv_func_strcoll_works=yes
74091dd4 14798else $as_nop
ac50fbac
CR
14799 ac_cv_func_strcoll_works=no
14800fi
14801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14802 conftest.$ac_objext conftest.beam conftest.$ac_ext
14803fi
0628567a 14804
f73dda09 14805fi
74091dd4
CR
14806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5
14807printf "%s\n" "$ac_cv_func_strcoll_works" >&6; }
ac50fbac 14808if test $ac_cv_func_strcoll_works = yes; then
3185942a 14809
74091dd4 14810printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
0628567a 14811
b80f6443 14812fi
3185942a 14813
ac50fbac
CR
14814
14815
14816if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then
14817 MALLOC_TARGET=alloca
14818 MALLOC_SRC=alloca.c
14819
14820 MALLOC_LIB='-lmalloc'
14821 MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
14822 MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
14823 MALLOC_DEP='$(MALLOC_LIBRARY)'
ccc6cda3 14824fi
3185942a 14825
ac50fbac 14826if test "$ac_cv_func_vprintf" = no; then
74091dd4
CR
14827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declaration of vprintf in stdio.h" >&5
14828printf %s "checking for declaration of vprintf in stdio.h... " >&6; }
ac50fbac
CR
14829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14830/* end confdefs.h. */
14831#include <stdio.h>
14832
0628567a 14833_ACEOF
ac50fbac 14834if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
14835 $EGREP "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1
14836then :
ac50fbac
CR
14837 ac_cv_func_vprintf=yes
14838fi
74091dd4 14839rm -rf conftest*
ac50fbac 14840
74091dd4
CR
14841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vprintf" >&5
14842printf "%s\n" "$ac_cv_func_vprintf" >&6; }
ac50fbac 14843 if test $ac_cv_func_vprintf = yes; then
74091dd4 14844 printf "%s\n" "#define HAVE_VPRINTF 1" >>confdefs.h
ac50fbac
CR
14845
14846 fi
14847fi
14848
14849if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then
14850 case " $LIBOBJS " in
14851 *" vprint.$ac_objext "* ) ;;
14852 *) LIBOBJS="$LIBOBJS vprint.$ac_objext"
14853 ;;
14854esac
14855
14856fi
14857
74091dd4
CR
14858ac_fn_c_check_func "$LINENO" "__setostype" "ac_cv_func___setostype"
14859if test "x$ac_cv_func___setostype" = xyes
14860then :
14861 printf "%s\n" "#define HAVE_SETOSTYPE 1" >>confdefs.h
14862
14863fi
14864
14865ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3"
14866if test "x$ac_cv_func_wait3" = xyes
14867then :
14868 printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h
ac50fbac 14869
ac50fbac 14870fi
74091dd4
CR
14871
14872
14873ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
14874if test "x$ac_cv_func_mkfifo" = xyes
14875then :
14876 printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h
14877
14878else $as_nop
14879 printf "%s\n" "#define MKFIFO_MISSING 1" >>confdefs.h
14880
ac50fbac 14881fi
ac50fbac 14882
ac50fbac 14883
74091dd4
CR
14884ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
14885if test "x$ac_cv_func_dup2" = xyes
14886then :
14887 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
ac50fbac 14888
74091dd4
CR
14889fi
14890ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
14891if test "x$ac_cv_func_eaccess" = xyes
14892then :
14893 printf "%s\n" "#define HAVE_EACCESS 1" >>confdefs.h
ac50fbac 14894
74091dd4
CR
14895fi
14896ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl"
14897if test "x$ac_cv_func_fcntl" = xyes
14898then :
14899 printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h
0628567a 14900
f73dda09 14901fi
74091dd4
CR
14902ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
14903if test "x$ac_cv_func_getdtablesize" = xyes
14904then :
14905 printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
3185942a 14906
74091dd4
CR
14907fi
14908ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
14909if test "x$ac_cv_func_getentropy" = xyes
14910then :
14911 printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h
ac50fbac
CR
14912
14913fi
74091dd4
CR
14914ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
14915if test "x$ac_cv_func_getgroups" = xyes
14916then :
14917 printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h
ac50fbac 14918
74091dd4
CR
14919fi
14920ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
14921if test "x$ac_cv_func_gethostname" = xyes
14922then :
14923 printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h
ac50fbac 14924
74091dd4
CR
14925fi
14926ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
14927if test "x$ac_cv_func_getpagesize" = xyes
14928then :
14929 printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
ac50fbac 14930
74091dd4
CR
14931fi
14932ac_fn_c_check_func "$LINENO" "getpeername" "ac_cv_func_getpeername"
14933if test "x$ac_cv_func_getpeername" = xyes
14934then :
14935 printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h
ac50fbac
CR
14936
14937fi
74091dd4
CR
14938ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom"
14939if test "x$ac_cv_func_getrandom" = xyes
14940then :
14941 printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h
ac50fbac 14942
74091dd4
CR
14943fi
14944ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
14945if test "x$ac_cv_func_getrlimit" = xyes
14946then :
14947 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
ac50fbac 14948
74091dd4
CR
14949fi
14950ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
14951if test "x$ac_cv_func_getrusage" = xyes
14952then :
14953 printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h
14954
14955fi
14956ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
14957if test "x$ac_cv_func_gettimeofday" = xyes
14958then :
14959 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
14960
14961fi
14962ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill"
14963if test "x$ac_cv_func_kill" = xyes
14964then :
14965 printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h
14966
14967fi
14968ac_fn_c_check_func "$LINENO" "killpg" "ac_cv_func_killpg"
14969if test "x$ac_cv_func_killpg" = xyes
14970then :
14971 printf "%s\n" "#define HAVE_KILLPG 1" >>confdefs.h
14972
14973fi
14974ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
14975if test "x$ac_cv_func_lstat" = xyes
14976then :
14977 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
14978
14979fi
14980ac_fn_c_check_func "$LINENO" "pselect" "ac_cv_func_pselect"
14981if test "x$ac_cv_func_pselect" = xyes
14982then :
14983 printf "%s\n" "#define HAVE_PSELECT 1" >>confdefs.h
14984
14985fi
14986ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
14987if test "x$ac_cv_func_readlink" = xyes
14988then :
14989 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
14990
14991fi
14992ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14993if test "x$ac_cv_func_select" = xyes
14994then :
14995 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
14996
14997fi
14998ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
14999if test "x$ac_cv_func_setdtablesize" = xyes
15000then :
15001 printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
15002
15003fi
15004ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
15005if test "x$ac_cv_func_setitimer" = xyes
15006then :
15007 printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h
15008
15009fi
15010ac_fn_c_check_func "$LINENO" "tcgetpgrp" "ac_cv_func_tcgetpgrp"
15011if test "x$ac_cv_func_tcgetpgrp" = xyes
15012then :
15013 printf "%s\n" "#define HAVE_TCGETPGRP 1" >>confdefs.h
15014
15015fi
15016ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
15017if test "x$ac_cv_func_uname" = xyes
15018then :
15019 printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h
15020
15021fi
15022ac_fn_c_check_func "$LINENO" "ulimit" "ac_cv_func_ulimit"
15023if test "x$ac_cv_func_ulimit" = xyes
15024then :
15025 printf "%s\n" "#define HAVE_ULIMIT 1" >>confdefs.h
15026
15027fi
15028ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
15029if test "x$ac_cv_func_waitpid" = xyes
15030then :
15031 printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h
ac50fbac
CR
15032
15033fi
ac50fbac
CR
15034
15035ac_fn_c_check_func "$LINENO" "rename" "ac_cv_func_rename"
74091dd4
CR
15036if test "x$ac_cv_func_rename" = xyes
15037then :
15038 printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
ac50fbac 15039
74091dd4 15040else $as_nop
ac50fbac
CR
15041 case " $LIBOBJS " in
15042 *" rename.$ac_objext "* ) ;;
15043 *) LIBOBJS="$LIBOBJS rename.$ac_objext"
15044 ;;
15045esac
15046
15047fi
15048
15049
74091dd4
CR
15050ac_fn_c_check_func "$LINENO" "bcopy" "ac_cv_func_bcopy"
15051if test "x$ac_cv_func_bcopy" = xyes
15052then :
15053 printf "%s\n" "#define HAVE_BCOPY 1" >>confdefs.h
ac50fbac 15054
74091dd4
CR
15055fi
15056ac_fn_c_check_func "$LINENO" "bzero" "ac_cv_func_bzero"
15057if test "x$ac_cv_func_bzero" = xyes
15058then :
15059 printf "%s\n" "#define HAVE_BZERO 1" >>confdefs.h
15060
15061fi
15062ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr"
15063if test "x$ac_cv_func_confstr" = xyes
15064then :
15065 printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h
15066
15067fi
15068ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat"
15069if test "x$ac_cv_func_faccessat" = xyes
15070then :
15071 printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h
15072
15073fi
15074ac_fn_c_check_func "$LINENO" "fnmatch" "ac_cv_func_fnmatch"
15075if test "x$ac_cv_func_fnmatch" = xyes
15076then :
15077 printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h
15078
15079fi
15080ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15081if test "x$ac_cv_func_getaddrinfo" = xyes
15082then :
15083 printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h
15084
15085fi
15086ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
15087if test "x$ac_cv_func_gethostbyname" = xyes
15088then :
15089 printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
15090
15091fi
15092ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
15093if test "x$ac_cv_func_getservbyname" = xyes
15094then :
15095 printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h
15096
15097fi
15098ac_fn_c_check_func "$LINENO" "getservent" "ac_cv_func_getservent"
15099if test "x$ac_cv_func_getservent" = xyes
15100then :
15101 printf "%s\n" "#define HAVE_GETSERVENT 1" >>confdefs.h
15102
15103fi
15104ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15105if test "x$ac_cv_func_inet_aton" = xyes
15106then :
15107 printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
15108
15109fi
15110ac_fn_c_check_func "$LINENO" "imaxdiv" "ac_cv_func_imaxdiv"
15111if test "x$ac_cv_func_imaxdiv" = xyes
15112then :
15113 printf "%s\n" "#define HAVE_IMAXDIV 1" >>confdefs.h
15114
15115fi
15116ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
15117if test "x$ac_cv_func_memmove" = xyes
15118then :
15119 printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h
15120
15121fi
15122ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf"
15123if test "x$ac_cv_func_pathconf" = xyes
15124then :
15125 printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h
15126
15127fi
15128ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
15129if test "x$ac_cv_func_putenv" = xyes
15130then :
15131 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
15132
15133fi
15134ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
15135if test "x$ac_cv_func_raise" = xyes
15136then :
15137 printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
15138
15139fi
15140ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15141if test "x$ac_cv_func_random" = xyes
15142then :
15143 printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h
15144
15145fi
15146ac_fn_c_check_func "$LINENO" "regcomp" "ac_cv_func_regcomp"
15147if test "x$ac_cv_func_regcomp" = xyes
15148then :
15149 printf "%s\n" "#define HAVE_REGCOMP 1" >>confdefs.h
15150
15151fi
15152ac_fn_c_check_func "$LINENO" "regexec" "ac_cv_func_regexec"
15153if test "x$ac_cv_func_regexec" = xyes
15154then :
15155 printf "%s\n" "#define HAVE_REGEXEC 1" >>confdefs.h
15156
15157fi
15158ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
15159if test "x$ac_cv_func_setenv" = xyes
15160then :
15161 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
15162
15163fi
15164ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf"
15165if test "x$ac_cv_func_setlinebuf" = xyes
15166then :
15167 printf "%s\n" "#define HAVE_SETLINEBUF 1" >>confdefs.h
15168
15169fi
15170ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
15171if test "x$ac_cv_func_setlocale" = xyes
15172then :
15173 printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h
15174
15175fi
15176ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf"
15177if test "x$ac_cv_func_setvbuf" = xyes
15178then :
15179 printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h
15180
15181fi
15182ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt"
15183if test "x$ac_cv_func_siginterrupt" = xyes
15184then :
15185 printf "%s\n" "#define HAVE_SIGINTERRUPT 1" >>confdefs.h
15186
15187fi
15188ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
15189if test "x$ac_cv_func_strchr" = xyes
15190then :
15191 printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h
15192
15193fi
15194ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
15195if test "x$ac_cv_func_sysconf" = xyes
15196then :
15197 printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
15198
15199fi
15200ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15201if test "x$ac_cv_func_syslog" = xyes
15202then :
15203 printf "%s\n" "#define HAVE_SYSLOG 1" >>confdefs.h
15204
15205fi
15206ac_fn_c_check_func "$LINENO" "tcgetattr" "ac_cv_func_tcgetattr"
15207if test "x$ac_cv_func_tcgetattr" = xyes
15208then :
15209 printf "%s\n" "#define HAVE_TCGETATTR 1" >>confdefs.h
15210
15211fi
15212ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
15213if test "x$ac_cv_func_times" = xyes
15214then :
15215 printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h
15216
15217fi
15218ac_fn_c_check_func "$LINENO" "ttyname" "ac_cv_func_ttyname"
15219if test "x$ac_cv_func_ttyname" = xyes
15220then :
15221 printf "%s\n" "#define HAVE_TTYNAME 1" >>confdefs.h
15222
15223fi
15224ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
15225if test "x$ac_cv_func_tzset" = xyes
15226then :
15227 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
15228
15229fi
15230ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15231if test "x$ac_cv_func_unsetenv" = xyes
15232then :
15233 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
15234
15235fi
15236
15237
15238ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
15239if test "x$ac_cv_func_vasprintf" = xyes
15240then :
15241 printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
15242
15243fi
15244ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf"
15245if test "x$ac_cv_func_asprintf" = xyes
15246then :
15247 printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h
15248
15249fi
15250
15251ac_fn_c_check_func "$LINENO" "isascii" "ac_cv_func_isascii"
15252if test "x$ac_cv_func_isascii" = xyes
15253then :
15254 printf "%s\n" "#define HAVE_ISASCII 1" >>confdefs.h
15255
15256fi
15257ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank"
15258if test "x$ac_cv_func_isblank" = xyes
15259then :
15260 printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h
15261
15262fi
15263ac_fn_c_check_func "$LINENO" "isgraph" "ac_cv_func_isgraph"
15264if test "x$ac_cv_func_isgraph" = xyes
15265then :
15266 printf "%s\n" "#define HAVE_ISGRAPH 1" >>confdefs.h
15267
15268fi
15269ac_fn_c_check_func "$LINENO" "isprint" "ac_cv_func_isprint"
15270if test "x$ac_cv_func_isprint" = xyes
15271then :
15272 printf "%s\n" "#define HAVE_ISPRINT 1" >>confdefs.h
15273
15274fi
15275ac_fn_c_check_func "$LINENO" "isspace" "ac_cv_func_isspace"
15276if test "x$ac_cv_func_isspace" = xyes
15277then :
15278 printf "%s\n" "#define HAVE_ISSPACE 1" >>confdefs.h
b80f6443 15279
ac50fbac 15280fi
74091dd4
CR
15281ac_fn_c_check_func "$LINENO" "isxdigit" "ac_cv_func_isxdigit"
15282if test "x$ac_cv_func_isxdigit" = xyes
15283then :
15284 printf "%s\n" "#define HAVE_ISXDIGIT 1" >>confdefs.h
b80f6443 15285
74091dd4 15286fi
ac50fbac 15287
74091dd4
CR
15288ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
15289if test "x$ac_cv_func_getpwent" = xyes
15290then :
15291 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
0628567a 15292
ccc6cda3 15293fi
74091dd4
CR
15294ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
15295if test "x$ac_cv_func_getpwnam" = xyes
15296then :
15297 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
ac50fbac 15298
74091dd4
CR
15299fi
15300ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
15301if test "x$ac_cv_func_getpwuid" = xyes
15302then :
15303 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
ac50fbac 15304
ccc6cda3 15305fi
ac50fbac 15306
74091dd4
CR
15307ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
15308if test "x$ac_cv_func_mkstemp" = xyes
15309then :
15310 printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h
ac50fbac 15311
ccc6cda3 15312fi
74091dd4
CR
15313ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15314if test "x$ac_cv_func_mkdtemp" = xyes
15315then :
15316 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
8868edaf
CR
15317
15318fi
8868edaf 15319
74091dd4
CR
15320ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random"
15321if test "x$ac_cv_func_arc4random" = xyes
15322then :
15323 printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h
a0c0a00f
CR
15324
15325fi
a0c0a00f 15326
8868edaf 15327
ac50fbac 15328ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
74091dd4
CR
15329if test "x$ac_cv_func_getcwd" = xyes
15330then :
15331 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
b80f6443 15332
74091dd4 15333else $as_nop
ac50fbac
CR
15334 case " $LIBOBJS " in
15335 *" getcwd.$ac_objext "* ) ;;
15336 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
15337 ;;
15338esac
3185942a 15339
ac50fbac 15340fi
ac50fbac 15341ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
74091dd4
CR
15342if test "x$ac_cv_func_memset" = xyes
15343then :
15344 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
f73dda09 15345
74091dd4 15346else $as_nop
ac50fbac
CR
15347 case " $LIBOBJS " in
15348 *" memset.$ac_objext "* ) ;;
15349 *) LIBOBJS="$LIBOBJS memset.$ac_objext"
15350 ;;
3185942a 15351esac
b80f6443 15352
ac50fbac
CR
15353fi
15354
ac50fbac 15355ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
74091dd4
CR
15356if test "x$ac_cv_func_strcasecmp" = xyes
15357then :
15358 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
ac50fbac 15359
74091dd4 15360else $as_nop
ac50fbac
CR
15361 case " $LIBOBJS " in
15362 *" strcasecmp.$ac_objext "* ) ;;
15363 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
15364 ;;
15365esac
0628567a 15366
f73dda09 15367fi
ac50fbac 15368ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
74091dd4
CR
15369if test "x$ac_cv_func_strcasestr" = xyes
15370then :
15371 printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h
ac50fbac 15372
74091dd4 15373else $as_nop
ac50fbac
CR
15374 case " $LIBOBJS " in
15375 *" strcasestr.$ac_objext "* ) ;;
15376 *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext"
15377 ;;
15378esac
0628567a 15379
ac50fbac 15380fi
ac50fbac 15381ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
74091dd4
CR
15382if test "x$ac_cv_func_strerror" = xyes
15383then :
15384 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
b80f6443 15385
74091dd4 15386else $as_nop
ac50fbac
CR
15387 case " $LIBOBJS " in
15388 *" strerror.$ac_objext "* ) ;;
15389 *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
15390 ;;
15391esac
0628567a 15392
f73dda09 15393fi
ac50fbac 15394ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
74091dd4
CR
15395if test "x$ac_cv_func_strftime" = xyes
15396then :
15397 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
ac50fbac 15398
74091dd4 15399else $as_nop
ac50fbac
CR
15400 case " $LIBOBJS " in
15401 *" strftime.$ac_objext "* ) ;;
15402 *) LIBOBJS="$LIBOBJS strftime.$ac_objext"
15403 ;;
15404esac
0628567a 15405
b80f6443 15406fi
ac50fbac 15407ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
74091dd4
CR
15408if test "x$ac_cv_func_strnlen" = xyes
15409then :
15410 printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
ac50fbac 15411
74091dd4 15412else $as_nop
ac50fbac
CR
15413 case " $LIBOBJS " in
15414 *" strnlen.$ac_objext "* ) ;;
15415 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15416 ;;
15417esac
15418
ccc6cda3 15419fi
ac50fbac 15420ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
74091dd4
CR
15421if test "x$ac_cv_func_strpbrk" = xyes
15422then :
15423 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
b80f6443 15424
74091dd4 15425else $as_nop
ac50fbac
CR
15426 case " $LIBOBJS " in
15427 *" strpbrk.$ac_objext "* ) ;;
15428 *) LIBOBJS="$LIBOBJS strpbrk.$ac_objext"
15429 ;;
15430esac
0628567a 15431
f73dda09 15432fi
ac50fbac 15433ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
74091dd4
CR
15434if test "x$ac_cv_func_strstr" = xyes
15435then :
15436 printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h
ac50fbac 15437
74091dd4 15438else $as_nop
ac50fbac
CR
15439 case " $LIBOBJS " in
15440 *" strstr.$ac_objext "* ) ;;
15441 *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
15442 ;;
15443esac
b80f6443 15444
ac50fbac 15445fi
b80f6443 15446
ac50fbac 15447ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod"
74091dd4
CR
15448if test "x$ac_cv_func_strtod" = xyes
15449then :
15450 printf "%s\n" "#define HAVE_STRTOD 1" >>confdefs.h
ac50fbac 15451
74091dd4 15452else $as_nop
ac50fbac
CR
15453 case " $LIBOBJS " in
15454 *" strtod.$ac_objext "* ) ;;
15455 *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
15456 ;;
3185942a 15457esac
ac50fbac
CR
15458
15459fi
ac50fbac 15460ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
74091dd4
CR
15461if test "x$ac_cv_func_strtol" = xyes
15462then :
15463 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
ac50fbac 15464
74091dd4 15465else $as_nop
ac50fbac
CR
15466 case " $LIBOBJS " in
15467 *" strtol.$ac_objext "* ) ;;
15468 *) LIBOBJS="$LIBOBJS strtol.$ac_objext"
15469 ;;
3185942a 15470esac
ac50fbac
CR
15471
15472fi
ac50fbac 15473ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
74091dd4
CR
15474if test "x$ac_cv_func_strtoul" = xyes
15475then :
15476 printf "%s\n" "#define HAVE_STRTOUL 1" >>confdefs.h
ac50fbac 15477
74091dd4 15478else $as_nop
ac50fbac
CR
15479 case " $LIBOBJS " in
15480 *" strtoul.$ac_objext "* ) ;;
15481 *) LIBOBJS="$LIBOBJS strtoul.$ac_objext"
15482 ;;
15483esac
0628567a 15484
ccc6cda3 15485fi
ac50fbac 15486ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
74091dd4
CR
15487if test "x$ac_cv_func_strtoll" = xyes
15488then :
15489 printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
ac50fbac 15490
74091dd4 15491else $as_nop
ac50fbac
CR
15492 case " $LIBOBJS " in
15493 *" strtoll.$ac_objext "* ) ;;
15494 *) LIBOBJS="$LIBOBJS strtoll.$ac_objext"
15495 ;;
15496esac
15497
ccc6cda3 15498fi
ac50fbac 15499ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
74091dd4
CR
15500if test "x$ac_cv_func_strtoull" = xyes
15501then :
15502 printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h
ac50fbac 15503
74091dd4 15504else $as_nop
ac50fbac
CR
15505 case " $LIBOBJS " in
15506 *" strtoull.$ac_objext "* ) ;;
15507 *) LIBOBJS="$LIBOBJS strtoull.$ac_objext"
15508 ;;
15509esac
15510
ccc6cda3 15511fi
ac50fbac 15512ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax"
74091dd4
CR
15513if test "x$ac_cv_func_strtoumax" = xyes
15514then :
15515 printf "%s\n" "#define HAVE_STRTOUMAX 1" >>confdefs.h
f73dda09 15516
74091dd4 15517else $as_nop
ac50fbac
CR
15518 case " $LIBOBJS " in
15519 *" strtoumax.$ac_objext "* ) ;;
15520 *) LIBOBJS="$LIBOBJS strtoumax.$ac_objext"
15521 ;;
15522esac
b80f6443 15523
ac50fbac
CR
15524fi
15525
ac50fbac 15526ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf"
74091dd4
CR
15527if test "x$ac_cv_func_dprintf" = xyes
15528then :
15529 printf "%s\n" "#define HAVE_DPRINTF 1" >>confdefs.h
ac50fbac 15530
74091dd4 15531else $as_nop
ac50fbac
CR
15532 case " $LIBOBJS " in
15533 *" dprintf.$ac_objext "* ) ;;
15534 *) LIBOBJS="$LIBOBJS dprintf.$ac_objext"
15535 ;;
3185942a 15536esac
b80f6443 15537
ac50fbac
CR
15538fi
15539
ac50fbac 15540ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
74091dd4
CR
15541if test "x$ac_cv_func_strchrnul" = xyes
15542then :
15543 printf "%s\n" "#define HAVE_STRCHRNUL 1" >>confdefs.h
ac50fbac 15544
74091dd4 15545else $as_nop
ac50fbac
CR
15546 case " $LIBOBJS " in
15547 *" strchrnul.$ac_objext "* ) ;;
15548 *) LIBOBJS="$LIBOBJS strchrnul.$ac_objext"
15549 ;;
3185942a 15550esac
ac50fbac
CR
15551
15552fi
15553
ac50fbac 15554ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
74091dd4
CR
15555if test "x$ac_cv_func_strdup" = xyes
15556then :
15557 printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
ac50fbac 15558
74091dd4 15559else $as_nop
ac50fbac
CR
15560 case " $LIBOBJS " in
15561 *" strdup.$ac_objext "* ) ;;
15562 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
15563 ;;
15564esac
0628567a 15565
f73dda09 15566fi
3185942a 15567
ac50fbac 15568
74091dd4
CR
15569ac_fn_c_check_header_compile "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
15570if test "x$ac_cv_header_libaudit_h" = xyes
15571then :
15572 printf "%s\n" "#define HAVE_LIBAUDIT_H 1" >>confdefs.h
ac50fbac 15573
ac50fbac 15574fi
0628567a 15575
74091dd4
CR
15576ac_fn_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include <linux/audit.h>
15577" "$ac_c_undeclared_builtin_options" "CFLAGS"
15578if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes
15579then :
ac50fbac 15580 ac_have_decl=1
74091dd4 15581else $as_nop
ac50fbac 15582 ac_have_decl=0
f73dda09 15583fi
74091dd4 15584printf "%s\n" "#define HAVE_DECL_AUDIT_USER_TTY $ac_have_decl" >>confdefs.h
3185942a 15585
0628567a 15586
74091dd4
CR
15587ac_fn_check_decl "$LINENO" "confstr" "ac_cv_have_decl_confstr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15588if test "x$ac_cv_have_decl_confstr" = xyes
15589then :
ac50fbac 15590 ac_have_decl=1
74091dd4 15591else $as_nop
ac50fbac 15592 ac_have_decl=0
b80f6443 15593fi
74091dd4 15594printf "%s\n" "#define HAVE_DECL_CONFSTR $ac_have_decl" >>confdefs.h
3185942a 15595
74091dd4
CR
15596ac_fn_check_decl "$LINENO" "printf" "ac_cv_have_decl_printf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15597if test "x$ac_cv_have_decl_printf" = xyes
15598then :
ac50fbac 15599 ac_have_decl=1
74091dd4 15600else $as_nop
ac50fbac 15601 ac_have_decl=0
ccc6cda3 15602fi
74091dd4 15603printf "%s\n" "#define HAVE_DECL_PRINTF $ac_have_decl" >>confdefs.h
3185942a 15604
74091dd4
CR
15605ac_fn_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15606if test "x$ac_cv_have_decl_sbrk" = xyes
15607then :
ac50fbac 15608 ac_have_decl=1
74091dd4 15609else $as_nop
ac50fbac
CR
15610 ac_have_decl=0
15611fi
74091dd4 15612printf "%s\n" "#define HAVE_DECL_SBRK $ac_have_decl" >>confdefs.h
ac50fbac 15613
74091dd4
CR
15614ac_fn_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15615if test "x$ac_cv_have_decl_setregid" = xyes
15616then :
ac50fbac 15617 ac_have_decl=1
74091dd4 15618else $as_nop
ac50fbac
CR
15619 ac_have_decl=0
15620fi
74091dd4 15621printf "%s\n" "#define HAVE_DECL_SETREGID $ac_have_decl" >>confdefs.h
0628567a 15622
74091dd4
CR
15623ac_fn_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15624if test "x$ac_cv_have_decl_strcpy" = xyes
15625then :
ac50fbac 15626 ac_have_decl=1
74091dd4 15627else $as_nop
ac50fbac 15628 ac_have_decl=0
f73dda09 15629fi
74091dd4 15630printf "%s\n" "#define HAVE_DECL_STRCPY $ac_have_decl" >>confdefs.h
3185942a 15631
74091dd4
CR
15632ac_fn_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15633if test "x$ac_cv_have_decl_strsignal" = xyes
15634then :
ac50fbac 15635 ac_have_decl=1
74091dd4 15636else $as_nop
ac50fbac
CR
15637 ac_have_decl=0
15638fi
74091dd4
CR
15639printf "%s\n" "#define HAVE_DECL_STRSIGNAL $ac_have_decl" >>confdefs.h
15640
15641
15642ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
15643if test "x$ac_cv_func_setresuid" = xyes
15644then :
15645 printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h
ac50fbac 15646
ac50fbac 15647fi
74091dd4
CR
15648ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
15649if test "x$ac_cv_func_setresgid" = xyes
15650then :
15651 printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h
3185942a 15652
74091dd4 15653fi
0628567a 15654
f73dda09 15655
74091dd4
CR
15656ac_fn_check_decl "$LINENO" "strtold" "ac_cv_have_decl_strtold" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15657if test "x$ac_cv_have_decl_strtold" = xyes
15658then :
15659 ac_have_decl=1
15660else $as_nop
15661 ac_have_decl=0
15662fi
15663printf "%s\n" "#define HAVE_DECL_STRTOLD $ac_have_decl" >>confdefs.h
15664if test $ac_have_decl = 1
15665then :
ac50fbac 15666
74091dd4
CR
15667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken strtold" >&5
15668printf %s "checking for broken strtold... " >&6; }
15669 if test ${bash_cv_strtold_broken+y}
15670then :
15671 printf %s "(cached) " >&6
15672else $as_nop
ac50fbac 15673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15674/* end confdefs.h. */
74091dd4 15675#include <stdlib.h>
f73dda09 15676int
74091dd4 15677main (void)
cce855bc 15678{
37b7e91d 15679long double r; char *foo, *bar; r = strtold(foo, &bar);
74091dd4 15680
f73dda09
JA
15681 ;
15682 return 0;
cce855bc 15683}
f73dda09 15684_ACEOF
74091dd4
CR
15685if ac_fn_c_try_compile "$LINENO"
15686then :
15687 bash_cv_strtold_broken=no
15688else $as_nop
15689 bash_cv_strtold_broken=yes
ac50fbac 15690fi
74091dd4 15691rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 15692
ac50fbac
CR
15693
15694fi
15695
74091dd4
CR
15696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_strtold_broken" >&5
15697printf "%s\n" "$bash_cv_strtold_broken" >&6; }
15698 if test "$bash_cv_strtold_broken" = "yes" ; then
15699 printf "%s\n" "#define STRTOLD_BROKEN 1" >>confdefs.h
ac50fbac 15700
74091dd4 15701 fi
ac50fbac 15702
74091dd4 15703fi
ac50fbac 15704
ac50fbac 15705
74091dd4
CR
15706ac_fn_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15707if test "x$ac_cv_have_decl_strtol" = xyes
15708then :
15709 ac_have_decl=1
15710else $as_nop
15711 ac_have_decl=0
f73dda09 15712fi
74091dd4 15713printf "%s\n" "#define HAVE_DECL_STRTOL $ac_have_decl" >>confdefs.h
3185942a 15714
74091dd4
CR
15715ac_fn_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15716if test "x$ac_cv_have_decl_strtoll" = xyes
15717then :
15718 ac_have_decl=1
15719else $as_nop
15720 ac_have_decl=0
15721fi
15722printf "%s\n" "#define HAVE_DECL_STRTOLL $ac_have_decl" >>confdefs.h
ac50fbac 15723
74091dd4
CR
15724ac_fn_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15725if test "x$ac_cv_have_decl_strtoul" = xyes
15726then :
15727 ac_have_decl=1
15728else $as_nop
15729 ac_have_decl=0
ac50fbac 15730fi
74091dd4 15731printf "%s\n" "#define HAVE_DECL_STRTOUL $ac_have_decl" >>confdefs.h
ac50fbac 15732
74091dd4
CR
15733ac_fn_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15734if test "x$ac_cv_have_decl_strtoull" = xyes
15735then :
15736 ac_have_decl=1
15737else $as_nop
15738 ac_have_decl=0
15739fi
15740printf "%s\n" "#define HAVE_DECL_STRTOULL $ac_have_decl" >>confdefs.h
0628567a 15741
74091dd4
CR
15742ac_fn_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15743if test "x$ac_cv_have_decl_strtoumax" = xyes
15744then :
15745 ac_have_decl=1
15746else $as_nop
15747 ac_have_decl=0
15748fi
15749printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h
ac50fbac
CR
15750
15751
15752
15753
15754
ac50fbac 15755
74091dd4
CR
15756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
15757printf %s "checking for working mktime... " >&6; }
15758if test ${ac_cv_func_working_mktime+y}
15759then :
15760 printf %s "(cached) " >&6
15761else $as_nop
15762 if test "$cross_compiling" = yes
15763then :
ac50fbac 15764 ac_cv_func_working_mktime=no
74091dd4 15765else $as_nop
ac50fbac 15766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 15767/* end confdefs.h. */
ac50fbac 15768/* Test program from Paul Eggert and Tony Leneis. */
74091dd4
CR
15769#include <time.h>
15770#ifdef HAVE_SYS_TIME_H
ac50fbac 15771# include <sys/time.h>
ac50fbac
CR
15772#endif
15773
15774#include <limits.h>
15775#include <stdlib.h>
15776
15777#ifdef HAVE_UNISTD_H
15778# include <unistd.h>
15779#endif
15780
15781#ifndef HAVE_ALARM
15782# define alarm(X) /* empty */
15783#endif
15784
15785/* Work around redefinition to rpl_putenv by other config tests. */
15786#undef putenv
15787
15788static time_t time_t_max;
15789static time_t time_t_min;
15790
15791/* Values we'll use to set the TZ environment variable. */
15792static const char *tz_strings[] = {
15793 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
15794 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
15795};
15796#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
15797
15798/* Return 0 if mktime fails to convert a date in the spring-forward gap.
15799 Based on a problem report from Andreas Jaeger. */
15800static int
15801spring_forward_gap ()
15802{
15803 /* glibc (up to about 1998-10-07) failed this test. */
15804 struct tm tm;
15805
15806 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15807 instead of "TZ=America/Vancouver" in order to detect the bug even
15808 on systems that don't support the Olson extension, or don't have the
15809 full zoneinfo tables installed. */
15810 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
15811
15812 tm.tm_year = 98;
15813 tm.tm_mon = 3;
15814 tm.tm_mday = 5;
15815 tm.tm_hour = 2;
15816 tm.tm_min = 0;
15817 tm.tm_sec = 0;
15818 tm.tm_isdst = -1;
15819 return mktime (&tm) != (time_t) -1;
15820}
15821
15822static int
15823mktime_test1 (time_t now)
15824{
15825 struct tm *lt;
15826 return ! (lt = localtime (&now)) || mktime (lt) == now;
15827}
15828
15829static int
15830mktime_test (time_t now)
15831{
15832 return (mktime_test1 (now)
15833 && mktime_test1 ((time_t) (time_t_max - now))
15834 && mktime_test1 ((time_t) (time_t_min + now)));
15835}
15836
15837static int
15838irix_6_4_bug ()
15839{
15840 /* Based on code from Ariel Faigon. */
15841 struct tm tm;
15842 tm.tm_year = 96;
15843 tm.tm_mon = 3;
15844 tm.tm_mday = 0;
15845 tm.tm_hour = 0;
15846 tm.tm_min = 0;
15847 tm.tm_sec = 0;
15848 tm.tm_isdst = -1;
15849 mktime (&tm);
15850 return tm.tm_mon == 2 && tm.tm_mday == 31;
15851}
15852
15853static int
15854bigtime_test (int j)
15855{
15856 struct tm tm;
15857 time_t now;
15858 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
15859 now = mktime (&tm);
15860 if (now != (time_t) -1)
15861 {
15862 struct tm *lt = localtime (&now);
15863 if (! (lt
15864 && lt->tm_year == tm.tm_year
15865 && lt->tm_mon == tm.tm_mon
15866 && lt->tm_mday == tm.tm_mday
15867 && lt->tm_hour == tm.tm_hour
15868 && lt->tm_min == tm.tm_min
15869 && lt->tm_sec == tm.tm_sec
15870 && lt->tm_yday == tm.tm_yday
15871 && lt->tm_wday == tm.tm_wday
15872 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
15873 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
15874 return 0;
15875 }
15876 return 1;
15877}
15878
15879static int
15880year_2050_test ()
b80f6443 15881{
ac50fbac
CR
15882 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
15883 ignoring leap seconds. */
15884 unsigned long int answer = 2527315200UL;
15885
15886 struct tm tm;
15887 time_t t;
15888 tm.tm_year = 2050 - 1900;
15889 tm.tm_mon = 2 - 1;
15890 tm.tm_mday = 1;
15891 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
15892 tm.tm_isdst = -1;
15893
15894 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15895 instead of "TZ=America/Vancouver" in order to detect the bug even
15896 on systems that don't support the Olson extension, or don't have the
15897 full zoneinfo tables installed. */
15898 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
b80f6443 15899
ac50fbac
CR
15900 t = mktime (&tm);
15901
15902 /* Check that the result is either a failure, or close enough
15903 to the correct answer that we can assume the discrepancy is
15904 due to leap seconds. */
15905 return (t == (time_t) -1
15906 || (0 < t && answer - 120 <= t && t <= answer + 120));
b80f6443 15907}
ac50fbac 15908
f73dda09 15909int
74091dd4 15910main (void)
f73dda09 15911{
ac50fbac
CR
15912 time_t t, delta;
15913 int i, j;
b80f6443 15914
ac50fbac
CR
15915 /* This test makes some buggy mktime implementations loop.
15916 Give up after 60 seconds; a mktime slower than that
15917 isn't worth using anyway. */
15918 alarm (60);
15919
15920 for (;;)
15921 {
15922 t = (time_t_max << 1) + 1;
15923 if (t <= time_t_max)
15924 break;
15925 time_t_max = t;
15926 }
15927 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
15928
15929 delta = time_t_max / 997; /* a suitable prime number */
15930 for (i = 0; i < N_STRINGS; i++)
15931 {
15932 if (tz_strings[i])
15933 putenv ((char*) tz_strings[i]);
15934
15935 for (t = 0; t <= time_t_max - delta; t += delta)
15936 if (! mktime_test (t))
15937 return 1;
15938 if (! (mktime_test ((time_t) 1)
15939 && mktime_test ((time_t) (60 * 60))
15940 && mktime_test ((time_t) (60 * 60 * 24))))
15941 return 1;
15942
15943 for (j = 1; ; j <<= 1)
15944 if (! bigtime_test (j))
15945 return 1;
15946 else if (INT_MAX / 2 < j)
15947 break;
15948 if (! bigtime_test (INT_MAX))
15949 return 1;
15950 }
15951 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
f73dda09
JA
15952}
15953_ACEOF
74091dd4
CR
15954if ac_fn_c_try_run "$LINENO"
15955then :
ac50fbac 15956 ac_cv_func_working_mktime=yes
74091dd4 15957else $as_nop
ac50fbac
CR
15958 ac_cv_func_working_mktime=no
15959fi
15960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15961 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 15962fi
3185942a 15963
b80f6443 15964fi
74091dd4
CR
15965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
15966printf "%s\n" "$ac_cv_func_working_mktime" >&6; }
ac50fbac
CR
15967if test $ac_cv_func_working_mktime = no; then
15968 case " $LIBOBJS " in
15969 *" mktime.$ac_objext "* ) ;;
15970 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
15971 ;;
15972esac
3185942a 15973
cce855bc 15974fi
3185942a 15975
b80f6443 15976
ac50fbac 15977
74091dd4
CR
15978ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default"
15979if test "x$ac_cv_header_argz_h" = xyes
15980then :
15981 printf "%s\n" "#define HAVE_ARGZ_H 1" >>confdefs.h
0628567a 15982
f73dda09 15983fi
74091dd4
CR
15984ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
15985if test "x$ac_cv_header_errno_h" = xyes
15986then :
15987 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
3185942a 15988
74091dd4
CR
15989fi
15990ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
15991if test "x$ac_cv_header_fcntl_h" = xyes
15992then :
15993 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
ac50fbac 15994
74091dd4
CR
15995fi
15996ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
15997if test "x$ac_cv_header_malloc_h" = xyes
15998then :
15999 printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h
ac50fbac 16000
74091dd4
CR
16001fi
16002ac_fn_c_check_header_compile "$LINENO" "stdio_ext.h" "ac_cv_header_stdio_ext_h" "$ac_includes_default"
16003if test "x$ac_cv_header_stdio_ext_h" = xyes
16004then :
16005 printf "%s\n" "#define HAVE_STDIO_EXT_H 1" >>confdefs.h
ac50fbac
CR
16006
16007fi
ac50fbac 16008
74091dd4
CR
16009
16010
16011
16012{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
16013printf %s "checking for working mmap... " >&6; }
16014if test ${ac_cv_func_mmap_fixed_mapped+y}
16015then :
16016 printf %s "(cached) " >&6
16017else $as_nop
16018 if test "$cross_compiling" = yes
16019then :
16020 case "$host_os" in # ((
16021 # Guess yes on platforms where we know the result.
16022 linux*) ac_cv_func_mmap_fixed_mapped=yes ;;
16023 # If we don't know, assume the worst.
16024 *) ac_cv_func_mmap_fixed_mapped=no ;;
16025 esac
16026else $as_nop
ac50fbac 16027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16028/* end confdefs.h. */
f73dda09 16029$ac_includes_default
ac50fbac
CR
16030/* malloc might have been renamed as rpl_malloc. */
16031#undef malloc
16032
16033/* Thanks to Mike Haertel and Jim Avera for this test.
16034 Here is a matrix of mmap possibilities:
16035 mmap private not fixed
16036 mmap private fixed at somewhere currently unmapped
16037 mmap private fixed at somewhere already mapped
16038 mmap shared not fixed
16039 mmap shared fixed at somewhere currently unmapped
16040 mmap shared fixed at somewhere already mapped
16041 For private mappings, we should verify that changes cannot be read()
16042 back from the file, nor mmap's back from the file at a different
16043 address. (There have been systems where private was not correctly
16044 implemented like the infamous i386 svr4.0, and systems where the
16045 VM page cache was not coherent with the file system buffer cache
16046 like early versions of FreeBSD and possibly contemporary NetBSD.)
16047 For shared mappings, we should conversely verify that changes get
16048 propagated back to all the places they're supposed to be.
16049
16050 Grep wants private fixed already mapped.
16051 The main things grep needs to know about mmap are:
16052 * does it exist and is it safe to write into the mmap'd area
16053 * how to use it (BSD variants) */
16054
16055#include <fcntl.h>
16056#include <sys/mman.h>
16057
ac50fbac
CR
16058/* This mess was copied from the GNU getpagesize.h. */
16059#ifndef HAVE_GETPAGESIZE
16060# ifdef _SC_PAGESIZE
16061# define getpagesize() sysconf(_SC_PAGESIZE)
16062# else /* no _SC_PAGESIZE */
16063# ifdef HAVE_SYS_PARAM_H
16064# include <sys/param.h>
16065# ifdef EXEC_PAGESIZE
16066# define getpagesize() EXEC_PAGESIZE
16067# else /* no EXEC_PAGESIZE */
16068# ifdef NBPG
16069# define getpagesize() NBPG * CLSIZE
16070# ifndef CLSIZE
16071# define CLSIZE 1
16072# endif /* no CLSIZE */
16073# else /* no NBPG */
16074# ifdef NBPC
16075# define getpagesize() NBPC
16076# else /* no NBPC */
16077# ifdef PAGESIZE
16078# define getpagesize() PAGESIZE
16079# endif /* PAGESIZE */
16080# endif /* no NBPC */
16081# endif /* no NBPG */
16082# endif /* no EXEC_PAGESIZE */
16083# else /* no HAVE_SYS_PARAM_H */
16084# define getpagesize() 8192 /* punt totally */
16085# endif /* no HAVE_SYS_PARAM_H */
16086# endif /* no _SC_PAGESIZE */
16087
16088#endif /* no HAVE_GETPAGESIZE */
16089
f73dda09 16090int
74091dd4 16091main (void)
cce855bc 16092{
ac50fbac
CR
16093 char *data, *data2, *data3;
16094 const char *cdata2;
16095 int i, pagesize;
16096 int fd, fd2;
b80f6443 16097
ac50fbac
CR
16098 pagesize = getpagesize ();
16099
16100 /* First, make a file with some known garbage in it. */
16101 data = (char *) malloc (pagesize);
16102 if (!data)
3185942a 16103 return 1;
ac50fbac
CR
16104 for (i = 0; i < pagesize; ++i)
16105 *(data + i) = rand ();
16106 umask (0);
16107 fd = creat ("conftest.mmap", 0600);
16108 if (fd < 0)
16109 return 2;
16110 if (write (fd, data, pagesize) != pagesize)
16111 return 3;
16112 close (fd);
b80f6443 16113
ac50fbac
CR
16114 /* Next, check that the tail of a page is zero-filled. File must have
16115 non-zero length, otherwise we risk SIGBUS for entire page. */
16116 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
16117 if (fd2 < 0)
16118 return 4;
16119 cdata2 = "";
16120 if (write (fd2, cdata2, 1) != 1)
16121 return 5;
16122 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
16123 if (data2 == MAP_FAILED)
16124 return 6;
16125 for (i = 0; i < pagesize; ++i)
16126 if (*(data2 + i))
16127 return 7;
16128 close (fd2);
16129 if (munmap (data2, pagesize))
16130 return 8;
16131
16132 /* Next, try to mmap the file at a fixed address which already has
16133 something else allocated at it. If we can, also make sure that
16134 we see the same garbage. */
16135 fd = open ("conftest.mmap", O_RDWR);
16136 if (fd < 0)
16137 return 9;
16138 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
16139 MAP_PRIVATE | MAP_FIXED, fd, 0L))
16140 return 10;
16141 for (i = 0; i < pagesize; ++i)
16142 if (*(data + i) != *(data2 + i))
16143 return 11;
16144
16145 /* Finally, make sure that changes to the mapped area do not
16146 percolate back to the file as seen by read(). (This is a bug on
16147 some variants of i386 svr4.0.) */
16148 for (i = 0; i < pagesize; ++i)
16149 *(data2 + i) = *(data2 + i) + 1;
16150 data3 = (char *) malloc (pagesize);
16151 if (!data3)
16152 return 12;
16153 if (read (fd, data3, pagesize) != pagesize)
16154 return 13;
16155 for (i = 0; i < pagesize; ++i)
16156 if (*(data + i) != *(data3 + i))
16157 return 14;
16158 close (fd);
74091dd4
CR
16159 free (data);
16160 free (data3);
f73dda09 16161 return 0;
cce855bc 16162}
f73dda09 16163_ACEOF
74091dd4
CR
16164if ac_fn_c_try_run "$LINENO"
16165then :
ac50fbac 16166 ac_cv_func_mmap_fixed_mapped=yes
74091dd4 16167else $as_nop
ac50fbac 16168 ac_cv_func_mmap_fixed_mapped=no
cce855bc 16169fi
ac50fbac
CR
16170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16171 conftest.$ac_objext conftest.beam conftest.$ac_ext
cce855bc 16172fi
ac50fbac 16173
f73dda09 16174fi
74091dd4
CR
16175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
16176printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; }
ac50fbac 16177if test $ac_cv_func_mmap_fixed_mapped = yes; then
cce855bc 16178
74091dd4 16179printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
b80f6443 16180
ac50fbac
CR
16181fi
16182rm -f conftest.mmap conftest.txt
3185942a 16183
74091dd4
CR
16184ac_fn_c_check_func "$LINENO" "__argz_count" "ac_cv_func___argz_count"
16185if test "x$ac_cv_func___argz_count" = xyes
16186then :
16187 printf "%s\n" "#define HAVE___ARGZ_COUNT 1" >>confdefs.h
16188
16189fi
16190ac_fn_c_check_func "$LINENO" "__argz_next" "ac_cv_func___argz_next"
16191if test "x$ac_cv_func___argz_next" = xyes
16192then :
16193 printf "%s\n" "#define HAVE___ARGZ_NEXT 1" >>confdefs.h
16194
16195fi
16196ac_fn_c_check_func "$LINENO" "__argz_stringify" "ac_cv_func___argz_stringify"
16197if test "x$ac_cv_func___argz_stringify" = xyes
16198then :
16199 printf "%s\n" "#define HAVE___ARGZ_STRINGIFY 1" >>confdefs.h
16200
16201fi
16202ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
16203if test "x$ac_cv_func_dcgettext" = xyes
16204then :
16205 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
16206
16207fi
16208ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
16209if test "x$ac_cv_func_mempcpy" = xyes
16210then :
16211 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
16212
16213fi
16214ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap"
16215if test "x$ac_cv_func_munmap" = xyes
16216then :
16217 printf "%s\n" "#define HAVE_MUNMAP 1" >>confdefs.h
16218
16219fi
16220ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap"
16221if test "x$ac_cv_func_mremap" = xyes
16222then :
16223 printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h
16224
16225fi
16226ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
16227if test "x$ac_cv_func_stpcpy" = xyes
16228then :
16229 printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
16230
16231fi
16232ac_fn_c_check_func "$LINENO" "strcspn" "ac_cv_func_strcspn"
16233if test "x$ac_cv_func_strcspn" = xyes
16234then :
16235 printf "%s\n" "#define HAVE_STRCSPN 1" >>confdefs.h
0628567a 16236
ac50fbac 16237fi
f73dda09 16238
b80f6443 16239
ac50fbac
CR
16240INTL_DEP= INTL_INC= LIBINTL_H=
16241if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then
16242 INTL_DEP='${INTL_LIBDIR}/libintl.a'
16243 INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}'
16244 LIBINTL_H='${INTL_BUILDDIR}/libintl.h'
16245fi
b80f6443 16246
ac50fbac
CR
16247
16248
16249
16250
16251
74091dd4
CR
16252ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
16253if test "x$ac_cv_header_wctype_h" = xyes
16254then :
16255 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
0628567a 16256
f73dda09 16257fi
3185942a 16258
74091dd4
CR
16259ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
16260if test "x$ac_cv_header_wchar_h" = xyes
16261then :
16262 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
b80f6443 16263
ac50fbac 16264fi
b80f6443 16265
74091dd4
CR
16266ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
16267if test "x$ac_cv_header_langinfo_h" = xyes
16268then :
16269 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
0628567a 16270
f73dda09 16271fi
3185942a 16272
ac50fbac 16273
74091dd4
CR
16274ac_fn_c_check_header_compile "$LINENO" "mbstr.h" "ac_cv_header_mbstr_h" "$ac_includes_default"
16275if test "x$ac_cv_header_mbstr_h" = xyes
16276then :
16277 printf "%s\n" "#define HAVE_MBSTR_H 1" >>confdefs.h
a0c0a00f
CR
16278
16279fi
16280
a0c0a00f 16281
ac50fbac 16282ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen"
74091dd4
CR
16283if test "x$ac_cv_func_mbrlen" = xyes
16284then :
16285 printf "%s\n" "#define HAVE_MBRLEN 1" >>confdefs.h
0628567a 16286
b80f6443 16287fi
3185942a 16288
ac50fbac 16289ac_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp"
74091dd4
CR
16290if test "x$ac_cv_func_mbscasecmp" = xyes
16291then :
16292 printf "%s\n" "#define HAVE_MBSCMP 1" >>confdefs.h
ac50fbac 16293
cce855bc 16294fi
3185942a 16295
ac50fbac 16296ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp"
74091dd4
CR
16297if test "x$ac_cv_func_mbscmp" = xyes
16298then :
16299 printf "%s\n" "#define HAVE_MBSCMP 1" >>confdefs.h
b80f6443 16300
ac50fbac
CR
16301fi
16302
16303ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs"
74091dd4
CR
16304if test "x$ac_cv_func_mbsnrtowcs" = xyes
16305then :
16306 printf "%s\n" "#define HAVE_MBSNRTOWCS 1" >>confdefs.h
0628567a 16307
f73dda09 16308fi
3185942a 16309
ac50fbac 16310ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs"
74091dd4
CR
16311if test "x$ac_cv_func_mbsrtowcs" = xyes
16312then :
16313 printf "%s\n" "#define HAVE_MBSRTOWCS 1" >>confdefs.h
b80f6443 16314
ac50fbac
CR
16315fi
16316
16317
16318ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr"
74091dd4
CR
16319if test "x$ac_cv_func_mbschr" = xyes
16320then :
16321 printf "%s\n" "#define HAVE_MBSCHR 1" >>confdefs.h
b80f6443 16322
74091dd4 16323else $as_nop
ac50fbac
CR
16324 case " $LIBOBJS " in
16325 *" mbschr.$ac_objext "* ) ;;
16326 *) LIBOBJS="$LIBOBJS mbschr.$ac_objext"
16327 ;;
16328esac
16329
16330fi
16331
16332
ac50fbac 16333ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
74091dd4
CR
16334if test "x$ac_cv_func_wcrtomb" = xyes
16335then :
16336 printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
0628567a 16337
bb70624e 16338fi
ac50fbac
CR
16339
16340ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll"
74091dd4
CR
16341if test "x$ac_cv_func_wcscoll" = xyes
16342then :
16343 printf "%s\n" "#define HAVE_WCSCOLL 1" >>confdefs.h
ac50fbac 16344
bb70624e 16345fi
ac50fbac
CR
16346
16347ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup"
74091dd4
CR
16348if test "x$ac_cv_func_wcsdup" = xyes
16349then :
16350 printf "%s\n" "#define HAVE_WCSDUP 1" >>confdefs.h
ac50fbac 16351
f73dda09 16352fi
3185942a 16353
ac50fbac 16354ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth"
74091dd4
CR
16355if test "x$ac_cv_func_wcwidth" = xyes
16356then :
16357 printf "%s\n" "#define HAVE_WCWIDTH 1" >>confdefs.h
ac50fbac
CR
16358
16359fi
3185942a 16360
ac50fbac 16361ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype"
74091dd4
CR
16362if test "x$ac_cv_func_wctype" = xyes
16363then :
16364 printf "%s\n" "#define HAVE_WCTYPE 1" >>confdefs.h
3185942a 16365
ac50fbac 16366fi
bb70624e 16367
b80f6443 16368
ac50fbac 16369ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth"
74091dd4
CR
16370if test "x$ac_cv_func_wcswidth" = xyes
16371then :
16372 printf "%s\n" "#define HAVE_WCSWIDTH 1" >>confdefs.h
b80f6443 16373
74091dd4 16374else $as_nop
ac50fbac
CR
16375 case " $LIBOBJS " in
16376 *" wcswidth.$ac_objext "* ) ;;
16377 *) LIBOBJS="$LIBOBJS wcswidth.$ac_objext"
16378 ;;
3185942a 16379esac
ac50fbac
CR
16380
16381fi
16382
16383
16384
74091dd4
CR
16385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
16386printf %s "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
16387if test ${ac_cv_func_mbrtowc+y}
16388then :
16389 printf %s "(cached) " >&6
16390else $as_nop
ac50fbac 16391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16392/* end confdefs.h. */
ac50fbac 16393#include <wchar.h>
f73dda09 16394int
74091dd4 16395main (void)
f73dda09 16396{
ac50fbac
CR
16397wchar_t wc;
16398 char const s[] = "";
16399 size_t n = 1;
16400 mbstate_t state;
16401 return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
f73dda09
JA
16402 ;
16403 return 0;
16404}
16405_ACEOF
74091dd4
CR
16406if ac_fn_c_try_link "$LINENO"
16407then :
ac50fbac 16408 ac_cv_func_mbrtowc=yes
74091dd4 16409else $as_nop
ac50fbac
CR
16410 ac_cv_func_mbrtowc=no
16411fi
74091dd4 16412rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 16413 conftest$ac_exeext conftest.$ac_ext
3185942a 16414fi
74091dd4
CR
16415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
16416printf "%s\n" "$ac_cv_func_mbrtowc" >&6; }
ac50fbac 16417 if test $ac_cv_func_mbrtowc = yes; then
3185942a 16418
74091dd4 16419printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
0628567a 16420
ac50fbac 16421 fi
3185942a 16422
ac50fbac 16423if test $ac_cv_func_mbrtowc = yes; then
74091dd4 16424 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
3185942a 16425
bb70624e 16426fi
f73dda09 16427
74091dd4
CR
16428ac_fn_c_check_func "$LINENO" "iswlower" "ac_cv_func_iswlower"
16429if test "x$ac_cv_func_iswlower" = xyes
16430then :
16431 printf "%s\n" "#define HAVE_ISWLOWER 1" >>confdefs.h
bb70624e
JA
16432
16433fi
74091dd4
CR
16434ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
16435if test "x$ac_cv_func_iswupper" = xyes
16436then :
16437 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
bb70624e 16438
74091dd4
CR
16439fi
16440ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
16441if test "x$ac_cv_func_towlower" = xyes
16442then :
16443 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
ac50fbac 16444
ac50fbac 16445fi
74091dd4
CR
16446ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
16447if test "x$ac_cv_func_towupper" = xyes
16448then :
16449 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
16450
ac50fbac 16451fi
74091dd4
CR
16452ac_fn_c_check_func "$LINENO" "iswctype" "ac_cv_func_iswctype"
16453if test "x$ac_cv_func_iswctype" = xyes
16454then :
16455 printf "%s\n" "#define HAVE_ISWCTYPE 1" >>confdefs.h
ac50fbac
CR
16456
16457fi
16458
74091dd4
CR
16459
16460
16461
16462{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5
16463printf %s "checking for wchar_t in wchar.h... " >&6; }
16464if test ${bash_cv_type_wchar_t+y}
16465then :
16466 printf %s "(cached) " >&6
16467else $as_nop
ac50fbac 16468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16469/* end confdefs.h. */
ac50fbac 16470
74091dd4 16471#include <wchar.h>
f73dda09 16472int
74091dd4 16473main (void)
f73dda09 16474{
ac50fbac
CR
16475
16476 wchar_t foo;
16477 foo = 0;
16478
f73dda09
JA
16479 ;
16480 return 0;
16481}
16482_ACEOF
74091dd4
CR
16483if ac_fn_c_try_compile "$LINENO"
16484then :
ac50fbac 16485 bash_cv_type_wchar_t=yes
74091dd4 16486else $as_nop
ac50fbac 16487 bash_cv_type_wchar_t=no
74091dd4 16488
bb70624e 16489fi
74091dd4 16490rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
bb70624e 16491fi
74091dd4
CR
16492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5
16493printf "%s\n" "$bash_cv_type_wchar_t" >&6; }
ac50fbac 16494if test $bash_cv_type_wchar_t = yes; then
f73dda09 16495
74091dd4 16496printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
bb70624e
JA
16497
16498fi
16499
74091dd4
CR
16500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5
16501printf %s "checking for wctype_t in wctype.h... " >&6; }
16502if test ${bash_cv_type_wctype_t+y}
16503then :
16504 printf %s "(cached) " >&6
16505else $as_nop
ac50fbac 16506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16507/* end confdefs.h. */
74091dd4 16508
ac50fbac 16509#include <wctype.h>
f73dda09 16510int
74091dd4 16511main (void)
f73dda09 16512{
ac50fbac
CR
16513
16514 wctype_t foo;
16515 foo = 0;
16516
f73dda09
JA
16517 ;
16518 return 0;
16519}
16520_ACEOF
74091dd4
CR
16521if ac_fn_c_try_compile "$LINENO"
16522then :
ac50fbac 16523 bash_cv_type_wctype_t=yes
74091dd4 16524else $as_nop
ac50fbac 16525 bash_cv_type_wctype_t=no
74091dd4 16526
cce855bc 16527fi
74091dd4 16528rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
cce855bc 16529fi
74091dd4
CR
16530{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5
16531printf "%s\n" "$bash_cv_type_wctype_t" >&6; }
ac50fbac 16532if test $bash_cv_type_wctype_t = yes; then
f73dda09 16533
74091dd4 16534printf "%s\n" "#define HAVE_WCTYPE_T 1" >>confdefs.h
cce855bc
JA
16535
16536fi
16537
74091dd4
CR
16538{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5
16539printf %s "checking for wint_t in wctype.h... " >&6; }
16540if test ${bash_cv_type_wint_t+y}
16541then :
16542 printf %s "(cached) " >&6
16543else $as_nop
ac50fbac 16544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16545/* end confdefs.h. */
74091dd4 16546
ac50fbac 16547#include <wctype.h>
f73dda09 16548int
74091dd4 16549main (void)
f73dda09 16550{
ac50fbac
CR
16551
16552 wint_t foo;
16553 foo = 0;
16554
f73dda09
JA
16555 ;
16556 return 0;
16557}
16558_ACEOF
74091dd4
CR
16559if ac_fn_c_try_compile "$LINENO"
16560then :
ac50fbac 16561 bash_cv_type_wint_t=yes
74091dd4 16562else $as_nop
ac50fbac 16563 bash_cv_type_wint_t=no
74091dd4 16564
ac50fbac 16565fi
74091dd4 16566rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 16567fi
74091dd4
CR
16568{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5
16569printf "%s\n" "$bash_cv_type_wint_t" >&6; }
ac50fbac
CR
16570if test $bash_cv_type_wint_t = yes; then
16571
74091dd4 16572printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
ac50fbac
CR
16573
16574fi
16575
74091dd4
CR
16576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wcwidth broken with unicode combining characters" >&5
16577printf %s "checking for wcwidth broken with unicode combining characters... " >&6; }
16578if test ${bash_cv_wcwidth_broken+y}
16579then :
16580 printf %s "(cached) " >&6
16581else $as_nop
16582 if test "$cross_compiling" = yes
16583then :
ac50fbac 16584 bash_cv_wcwidth_broken=no
74091dd4
CR
16585
16586else $as_nop
ac50fbac
CR
16587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16588/* end confdefs.h. */
16589
16590#include <unistd.h>
16591#include <stdlib.h>
16592#include <stdio.h>
16593
16594#include <locale.h>
16595#include <wchar.h>
3185942a 16596
8868edaf 16597int
ac50fbac
CR
16598main(c, v)
16599int c;
16600char **v;
16601{
16602 int w;
3185942a 16603
ac50fbac
CR
16604 setlocale(LC_ALL, "en_US.UTF-8");
16605 w = wcwidth (0x0301);
16606 exit (w == 0); /* exit 0 if wcwidth broken */
16607}
0628567a 16608
ac50fbac 16609_ACEOF
74091dd4
CR
16610if ac_fn_c_try_run "$LINENO"
16611then :
ac50fbac 16612 bash_cv_wcwidth_broken=yes
74091dd4 16613else $as_nop
a0c0a00f 16614 bash_cv_wcwidth_broken=no
ac50fbac
CR
16615fi
16616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16617 conftest.$ac_objext conftest.beam conftest.$ac_ext
16618fi
3185942a 16619
cce855bc 16620fi
74091dd4
CR
16621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5
16622printf "%s\n" "$bash_cv_wcwidth_broken" >&6; }
ac50fbac
CR
16623if test "$bash_cv_wcwidth_broken" = yes; then
16624
74091dd4 16625printf "%s\n" "#define WCWIDTH_BROKEN 1" >>confdefs.h
3185942a 16626
b72432fd 16627fi
f73dda09 16628
ac50fbac
CR
16629if test "$am_cv_func_iconv" = yes; then
16630 OLDLIBS="$LIBS"
a0c0a00f 16631 LIBS="$LIBS $LIBINTL $LIBICONV"
74091dd4
CR
16632 ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset"
16633if test "x$ac_cv_func_locale_charset" = xyes
16634then :
16635 printf "%s\n" "#define HAVE_LOCALE_CHARSET 1" >>confdefs.h
cce855bc 16636
b72432fd
JA
16637fi
16638
ac50fbac
CR
16639 LIBS="$OLDLIBS"
16640fi
16641
d233b485
CR
16642# The cast to long int works around a bug in the HP C Compiler
16643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16645# This bug is HP SR number 8606223364.
74091dd4
CR
16646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
16647printf %s "checking size of wchar_t... " >&6; }
16648if test ${ac_cv_sizeof_wchar_t+y}
16649then :
16650 printf %s "(cached) " >&6
16651else $as_nop
16652 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"
16653then :
16654
16655else $as_nop
d233b485 16656 if test "$ac_cv_type_wchar_t" = yes; then
74091dd4
CR
16657 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16658printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
d233b485
CR
16659as_fn_error 77 "cannot compute sizeof (wchar_t)
16660See \`config.log' for more details" "$LINENO" 5; }
16661 else
16662 ac_cv_sizeof_wchar_t=0
16663 fi
16664fi
16665
16666fi
74091dd4
CR
16667{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
16668printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
d233b485
CR
16669
16670
16671
74091dd4 16672printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
d233b485
CR
16673
16674
16675
ac50fbac
CR
16676
16677
16678if test "$opt_static_link" != yes; then
74091dd4
CR
16679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
16680printf %s "checking for dlopen in -ldl... " >&6; }
16681if test ${ac_cv_lib_dl_dlopen+y}
16682then :
16683 printf %s "(cached) " >&6
16684else $as_nop
ac50fbac
CR
16685 ac_check_lib_save_LIBS=$LIBS
16686LIBS="-ldl $LIBS"
16687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16688/* end confdefs.h. */
ac50fbac
CR
16689
16690/* Override any GCC internal prototype to avoid an error.
16691 Use char because int might match the return type of a GCC
16692 builtin and then its argument prototype would still apply. */
ac50fbac 16693char dlopen ();
f73dda09 16694int
74091dd4 16695main (void)
f73dda09 16696{
ac50fbac 16697return dlopen ();
f73dda09
JA
16698 ;
16699 return 0;
16700}
16701_ACEOF
74091dd4
CR
16702if ac_fn_c_try_link "$LINENO"
16703then :
ac50fbac 16704 ac_cv_lib_dl_dlopen=yes
74091dd4 16705else $as_nop
ac50fbac 16706 ac_cv_lib_dl_dlopen=no
3185942a 16707fi
74091dd4 16708rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac
CR
16709 conftest$ac_exeext conftest.$ac_ext
16710LIBS=$ac_check_lib_save_LIBS
16711fi
74091dd4
CR
16712{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
16713printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
16714if test "x$ac_cv_lib_dl_dlopen" = xyes
16715then :
16716 printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h
3185942a 16717
ac50fbac
CR
16718 LIBS="-ldl $LIBS"
16719
16720fi
0628567a 16721
74091dd4
CR
16722ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16723if test "x$ac_cv_func_dlopen" = xyes
16724then :
16725 printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
3185942a 16726
cce855bc 16727fi
74091dd4
CR
16728ac_fn_c_check_func "$LINENO" "dlclose" "ac_cv_func_dlclose"
16729if test "x$ac_cv_func_dlclose" = xyes
16730then :
16731 printf "%s\n" "#define HAVE_DLCLOSE 1" >>confdefs.h
3185942a 16732
cce855bc 16733fi
74091dd4
CR
16734ac_fn_c_check_func "$LINENO" "dlsym" "ac_cv_func_dlsym"
16735if test "x$ac_cv_func_dlsym" = xyes
16736then :
16737 printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
ac50fbac 16738
ac50fbac 16739fi
f73dda09 16740
74091dd4 16741fi
3185942a 16742
ac50fbac 16743if test "$ac_cv_func_inet_aton" != 'yes'; then
3185942a 16744
74091dd4
CR
16745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
16746printf %s "checking for inet_aton... " >&6; }
16747if test ${bash_cv_func_inet_aton+y}
16748then :
16749 printf %s "(cached) " >&6
16750else $as_nop
ac50fbac 16751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16752/* end confdefs.h. */
ac50fbac
CR
16753
16754#include <sys/types.h>
16755#include <netinet/in.h>
16756#include <arpa/inet.h>
16757struct in_addr ap;
f73dda09 16758int
74091dd4 16759main (void)
f73dda09 16760{
ac50fbac 16761 inet_aton("127.0.0.1", &ap);
f73dda09
JA
16762 ;
16763 return 0;
16764}
16765_ACEOF
74091dd4
CR
16766if ac_fn_c_try_link "$LINENO"
16767then :
ac50fbac 16768 bash_cv_func_inet_aton=yes
74091dd4 16769else $as_nop
ac50fbac
CR
16770 bash_cv_func_inet_aton=no
16771fi
74091dd4 16772rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac
CR
16773 conftest$ac_exeext conftest.$ac_ext
16774fi
74091dd4
CR
16775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_inet_aton" >&5
16776printf "%s\n" "$bash_cv_func_inet_aton" >&6; }
ac50fbac 16777if test $bash_cv_func_inet_aton = yes; then
74091dd4 16778 printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
ac50fbac
CR
16779
16780else
16781 case " $LIBOBJS " in
16782 *" inet_aton.$ac_objext "* ) ;;
16783 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16784 ;;
3185942a 16785esac
ac50fbac
CR
16786
16787fi
16788
16789fi
16790
16791case "$host_os" in
74091dd4
CR
16792irix4*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpwent in -lsun" >&5
16793printf %s "checking for getpwent in -lsun... " >&6; }
16794if test ${ac_cv_lib_sun_getpwent+y}
16795then :
16796 printf %s "(cached) " >&6
16797else $as_nop
ac50fbac
CR
16798 ac_check_lib_save_LIBS=$LIBS
16799LIBS="-lsun $LIBS"
16800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16801/* end confdefs.h. */
ac50fbac
CR
16802
16803/* Override any GCC internal prototype to avoid an error.
16804 Use char because int might match the return type of a GCC
16805 builtin and then its argument prototype would still apply. */
ac50fbac 16806char getpwent ();
f73dda09 16807int
74091dd4 16808main (void)
f73dda09 16809{
ac50fbac 16810return getpwent ();
f73dda09
JA
16811 ;
16812 return 0;
16813}
16814_ACEOF
74091dd4
CR
16815if ac_fn_c_try_link "$LINENO"
16816then :
ac50fbac 16817 ac_cv_lib_sun_getpwent=yes
74091dd4 16818else $as_nop
ac50fbac 16819 ac_cv_lib_sun_getpwent=no
3185942a 16820fi
74091dd4 16821rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac
CR
16822 conftest$ac_exeext conftest.$ac_ext
16823LIBS=$ac_check_lib_save_LIBS
b72432fd 16824fi
74091dd4
CR
16825{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwent" >&5
16826printf "%s\n" "$ac_cv_lib_sun_getpwent" >&6; }
16827if test "x$ac_cv_lib_sun_getpwent" = xyes
16828then :
16829 printf "%s\n" "#define HAVE_LIBSUN 1" >>confdefs.h
ac50fbac
CR
16830
16831 LIBS="-lsun $LIBS"
3185942a 16832
cce855bc 16833fi
ac50fbac
CR
16834 ;;
16835esac
f73dda09 16836
ac50fbac 16837if test "$ac_cv_func_getpeername" = no; then
cce855bc 16838
ac50fbac
CR
16839if test "X$bash_cv_have_socklib" = "X"; then
16840_bash_needmsg=
16841else
74091dd4
CR
16842{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket library" >&5
16843printf %s "checking for socket library... " >&6; }
ac50fbac 16844_bash_needmsg=yes
cce855bc 16845fi
74091dd4
CR
16846if test ${bash_cv_have_socklib+y}
16847then :
16848 printf %s "(cached) " >&6
16849else $as_nop
16850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpeername in -lsocket" >&5
16851printf %s "checking for getpeername in -lsocket... " >&6; }
16852if test ${ac_cv_lib_socket_getpeername+y}
16853then :
16854 printf %s "(cached) " >&6
16855else $as_nop
ac50fbac
CR
16856 ac_check_lib_save_LIBS=$LIBS
16857LIBS="-lsocket -lnsl $LIBS"
16858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 16859/* end confdefs.h. */
ac50fbac
CR
16860
16861/* Override any GCC internal prototype to avoid an error.
16862 Use char because int might match the return type of a GCC
16863 builtin and then its argument prototype would still apply. */
ac50fbac 16864char getpeername ();
f73dda09 16865int
74091dd4 16866main (void)
f73dda09 16867{
ac50fbac 16868return getpeername ();
f73dda09
JA
16869 ;
16870 return 0;
16871}
16872_ACEOF
74091dd4
CR
16873if ac_fn_c_try_link "$LINENO"
16874then :
ac50fbac 16875 ac_cv_lib_socket_getpeername=yes
74091dd4 16876else $as_nop
ac50fbac
CR
16877 ac_cv_lib_socket_getpeername=no
16878fi
74091dd4 16879rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac
CR
16880 conftest$ac_exeext conftest.$ac_ext
16881LIBS=$ac_check_lib_save_LIBS
16882fi
74091dd4
CR
16883{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getpeername" >&5
16884printf "%s\n" "$ac_cv_lib_socket_getpeername" >&6; }
16885if test "x$ac_cv_lib_socket_getpeername" = xyes
16886then :
ac50fbac 16887 bash_cv_have_socklib=yes
74091dd4 16888else $as_nop
ac50fbac
CR
16889 bash_cv_have_socklib=no
16890fi
16891
16892fi
16893
16894if test "X$_bash_needmsg" = Xyes; then
74091dd4
CR
16895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_socklib" >&5
16896printf "%s\n" "$bash_cv_have_socklib" >&6; }
ac50fbac
CR
16897 _bash_needmsg=
16898fi
16899if test $bash_cv_have_socklib = yes; then
16900 # check for libnsl, add it to LIBS if present
16901 if test "X$bash_cv_have_libnsl" = "X"; then
16902 _bash_needmsg=
16903 else
74091dd4
CR
16904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5
16905printf %s "checking for libnsl... " >&6; }
ac50fbac
CR
16906 _bash_needmsg=yes
16907 fi
74091dd4
CR
16908 if test ${bash_cv_have_libnsl+y}
16909then :
16910 printf %s "(cached) " >&6
16911else $as_nop
16912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
16913printf %s "checking for t_open in -lnsl... " >&6; }
16914if test ${ac_cv_lib_nsl_t_open+y}
16915then :
16916 printf %s "(cached) " >&6
16917else $as_nop
ac50fbac
CR
16918 ac_check_lib_save_LIBS=$LIBS
16919LIBS="-lnsl $LIBS"
16920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 16921/* end confdefs.h. */
ac50fbac
CR
16922
16923/* Override any GCC internal prototype to avoid an error.
16924 Use char because int might match the return type of a GCC
16925 builtin and then its argument prototype would still apply. */
ac50fbac 16926char t_open ();
3185942a 16927int
74091dd4 16928main (void)
3185942a 16929{
ac50fbac 16930return t_open ();
3185942a
JA
16931 ;
16932 return 0;
16933}
16934_ACEOF
74091dd4
CR
16935if ac_fn_c_try_link "$LINENO"
16936then :
ac50fbac 16937 ac_cv_lib_nsl_t_open=yes
74091dd4 16938else $as_nop
ac50fbac 16939 ac_cv_lib_nsl_t_open=no
3185942a 16940fi
74091dd4 16941rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac
CR
16942 conftest$ac_exeext conftest.$ac_ext
16943LIBS=$ac_check_lib_save_LIBS
16944fi
74091dd4
CR
16945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
16946printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; }
16947if test "x$ac_cv_lib_nsl_t_open" = xyes
16948then :
ac50fbac 16949 bash_cv_have_libnsl=yes
74091dd4 16950else $as_nop
ac50fbac 16951 bash_cv_have_libnsl=no
3185942a
JA
16952fi
16953
3185942a 16954fi
3185942a 16955
ac50fbac 16956 if test "X$_bash_needmsg" = Xyes; then
74091dd4
CR
16957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_libnsl" >&5
16958printf "%s\n" "$bash_cv_have_libnsl" >&6; }
ac50fbac
CR
16959 _bash_needmsg=
16960 fi
16961 if test $bash_cv_have_libnsl = yes; then
16962 LIBS="-lsocket -lnsl $LIBS"
16963 else
16964 LIBS="-lsocket $LIBS"
16965 fi
74091dd4 16966 printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h
ac50fbac 16967
74091dd4 16968 printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h
3185942a
JA
16969
16970fi
16971
ac50fbac
CR
16972fi
16973if test "$ac_cv_func_gethostbyname" = no; then
16974 if test "X$bash_cv_have_gethostbyname" = "X"; then
16975_bash_needmsg=yes
3185942a 16976else
74091dd4
CR
16977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5
16978printf %s "checking for gethostbyname in socket library... " >&6; }
ac50fbac
CR
16979_bash_needmsg=
16980fi
74091dd4
CR
16981if test ${bash_cv_have_gethostbyname+y}
16982then :
16983 printf %s "(cached) " >&6
16984else $as_nop
ac50fbac 16985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 16986/* end confdefs.h. */
74091dd4 16987
ac50fbac 16988#include <netdb.h>
74091dd4 16989
3185942a 16990int
74091dd4 16991main (void)
3185942a 16992{
74091dd4
CR
16993
16994struct hostent *hp;
16995hp = gethostbyname("localhost");
ac50fbac 16996
3185942a
JA
16997 ;
16998 return 0;
16999}
17000_ACEOF
74091dd4
CR
17001if ac_fn_c_try_link "$LINENO"
17002then :
ac50fbac 17003 bash_cv_have_gethostbyname=yes
74091dd4 17004else $as_nop
ac50fbac 17005 bash_cv_have_gethostbyname=no
74091dd4 17006
3185942a 17007fi
74091dd4 17008rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 17009 conftest$ac_exeext conftest.$ac_ext
ac50fbac 17010fi
3185942a 17011
ac50fbac 17012if test "X$_bash_needmsg" = Xyes; then
74091dd4
CR
17013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5
17014printf %s "checking for gethostbyname in socket library... " >&6; }
ac50fbac 17015fi
74091dd4
CR
17016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_gethostbyname" >&5
17017printf "%s\n" "$bash_cv_have_gethostbyname" >&6; }
ac50fbac 17018if test "$bash_cv_have_gethostbyname" = yes; then
74091dd4 17019printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
3185942a
JA
17020
17021fi
17022
3185942a 17023fi
ac50fbac 17024
74091dd4
CR
17025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
17026printf %s "checking type of array argument to getgroups... " >&6; }
17027if test ${ac_cv_type_getgroups+y}
17028then :
17029 printf %s "(cached) " >&6
17030else $as_nop
17031 if test "$cross_compiling" = yes
17032then :
ac50fbac 17033 ac_cv_type_getgroups=cross
74091dd4 17034else $as_nop
ac50fbac 17035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 17036/* end confdefs.h. */
ac50fbac 17037/* Thanks to Mike Rendell for this test. */
3185942a 17038$ac_includes_default
ac50fbac
CR
17039#define NGID 256
17040#undef MAX
17041#define MAX(x, y) ((x) > (y) ? (x) : (y))
17042
3185942a 17043int
74091dd4 17044main (void)
3185942a 17045{
ac50fbac
CR
17046 gid_t gidset[NGID];
17047 int i, n;
17048 union { gid_t gval; long int lval; } val;
17049
17050 val.lval = -1;
17051 for (i = 0; i < NGID; i++)
17052 gidset[i] = val.gval;
17053 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
17054 gidset);
17055 /* Exit non-zero if getgroups seems to require an array of ints. This
17056 happens when gid_t is short int but getgroups modifies an array
17057 of ints. */
17058 return n > 0 && gidset[n] != val.gval;
3185942a
JA
17059}
17060_ACEOF
74091dd4
CR
17061if ac_fn_c_try_run "$LINENO"
17062then :
ac50fbac 17063 ac_cv_type_getgroups=gid_t
74091dd4 17064else $as_nop
ac50fbac
CR
17065 ac_cv_type_getgroups=int
17066fi
17067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17068 conftest.$ac_objext conftest.beam conftest.$ac_ext
17069fi
17070
17071if test $ac_cv_type_getgroups = cross; then
17072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 17073/* end confdefs.h. */
ac50fbac
CR
17074#include <unistd.h>
17075
3185942a 17076_ACEOF
ac50fbac 17077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
17078 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1
17079then :
ac50fbac 17080 ac_cv_type_getgroups=gid_t
74091dd4 17081else $as_nop
ac50fbac
CR
17082 ac_cv_type_getgroups=int
17083fi
74091dd4 17084rm -rf conftest*
3185942a 17085
3185942a 17086fi
ac50fbac 17087fi
74091dd4
CR
17088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
17089printf "%s\n" "$ac_cv_type_getgroups" >&6; }
ac50fbac 17090
74091dd4 17091printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h
ac50fbac
CR
17092
17093
17094ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
74091dd4
CR
17095if test "x$ac_cv_type_off_t" = xyes
17096then :
3185942a 17097
74091dd4 17098else $as_nop
3185942a 17099
74091dd4 17100printf "%s\n" "#define off_t long int" >>confdefs.h
3185942a
JA
17101
17102fi
17103
ac50fbac 17104ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
74091dd4
CR
17105if test "x$ac_cv_type_mode_t" = xyes
17106then :
ac50fbac 17107
74091dd4 17108else $as_nop
3185942a 17109
74091dd4 17110printf "%s\n" "#define mode_t int" >>confdefs.h
3185942a
JA
17111
17112fi
17113
74091dd4
CR
17114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
17115printf %s "checking for uid_t in sys/types.h... " >&6; }
17116if test ${ac_cv_type_uid_t+y}
17117then :
17118 printf %s "(cached) " >&6
17119else $as_nop
ac50fbac 17120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 17121/* end confdefs.h. */
ac50fbac
CR
17122#include <sys/types.h>
17123
3185942a 17124_ACEOF
ac50fbac 17125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
17126 $EGREP "uid_t" >/dev/null 2>&1
17127then :
ac50fbac 17128 ac_cv_type_uid_t=yes
74091dd4 17129else $as_nop
ac50fbac 17130 ac_cv_type_uid_t=no
3185942a 17131fi
74091dd4 17132rm -rf conftest*
3185942a 17133
ac50fbac 17134fi
74091dd4
CR
17135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
17136printf "%s\n" "$ac_cv_type_uid_t" >&6; }
ac50fbac 17137if test $ac_cv_type_uid_t = no; then
3185942a 17138
74091dd4 17139printf "%s\n" "#define uid_t int" >>confdefs.h
3185942a 17140
3185942a 17141
74091dd4 17142printf "%s\n" "#define gid_t int" >>confdefs.h
ac50fbac 17143
3185942a 17144fi
ac50fbac 17145
ac50fbac 17146
74091dd4
CR
17147 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
17148"
17149if test "x$ac_cv_type_pid_t" = xyes
17150then :
17151
17152else $as_nop
17153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17154/* end confdefs.h. */
17155
17156 #if defined _WIN64 && !defined __CYGWIN__
17157 LLP64
17158 #endif
17159
17160int
17161main (void)
17162{
17163
17164 ;
17165 return 0;
17166}
3185942a 17167
3185942a 17168_ACEOF
74091dd4
CR
17169if ac_fn_c_try_compile "$LINENO"
17170then :
17171 ac_pid_type='int'
17172else $as_nop
17173 ac_pid_type='__int64'
17174fi
17175rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17176
17177printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
17178
3185942a
JA
17179
17180fi
17181
74091dd4 17182
ac50fbac 17183ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
74091dd4
CR
17184if test "x$ac_cv_type_size_t" = xyes
17185then :
ac50fbac 17186
74091dd4 17187else $as_nop
ac50fbac 17188
74091dd4 17189printf "%s\n" "#define size_t unsigned int" >>confdefs.h
3185942a 17190
3185942a
JA
17191fi
17192
a0c0a00f
CR
17193
17194 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
74091dd4
CR
17195if test "x$ac_cv_type_uintptr_t" = xyes
17196then :
a0c0a00f 17197
74091dd4 17198printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
a0c0a00f 17199
74091dd4 17200else $as_nop
a0c0a00f
CR
17201 for ac_type in 'unsigned int' 'unsigned long int' \
17202 'unsigned long long int'; do
17203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17204/* end confdefs.h. */
17205$ac_includes_default
17206int
74091dd4 17207main (void)
a0c0a00f
CR
17208{
17209static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
17210test_array [0] = 0;
17211return test_array [0];
17212
17213 ;
17214 return 0;
17215}
17216_ACEOF
74091dd4
CR
17217if ac_fn_c_try_compile "$LINENO"
17218then :
a0c0a00f 17219
74091dd4 17220printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h
a0c0a00f
CR
17221
17222 ac_type=
17223fi
74091dd4 17224rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
a0c0a00f
CR
17225 test -z "$ac_type" && break
17226 done
17227fi
17228
17229
17230
ac50fbac 17231ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
74091dd4
CR
17232if test "x$ac_cv_type_ssize_t" = xyes
17233then :
ac50fbac 17234
74091dd4 17235else $as_nop
3185942a 17236
74091dd4 17237printf "%s\n" "#define ssize_t int" >>confdefs.h
3185942a
JA
17238
17239fi
17240
ac50fbac 17241ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default"
74091dd4
CR
17242if test "x$ac_cv_type_time_t" = xyes
17243then :
ac50fbac 17244
74091dd4 17245else $as_nop
3185942a 17246
74091dd4 17247printf "%s\n" "#define time_t long" >>confdefs.h
3185942a
JA
17248
17249fi
17250
3185942a
JA
17251
17252
74091dd4
CR
17253
17254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
17255printf %s "checking for long long int... " >&6; }
17256if test ${ac_cv_type_long_long_int+y}
17257then :
17258 printf %s "(cached) " >&6
17259else $as_nop
17260 ac_cv_type_long_long_int=yes
17261 case $ac_prog_cc_stdc in
17262 no | c89) ;;
17263 *)
17264 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
17265 if test $ac_cv_type_long_long_int = yes; then
17266 if test "$cross_compiling" = yes
17267then :
17268 :
17269else $as_nop
ac50fbac 17270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 17271/* end confdefs.h. */
74091dd4
CR
17272#include <limits.h>
17273 #ifndef LLONG_MAX
17274 # define HALF \
17275 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17276 # define LLONG_MAX (HALF - 1 + HALF)
17277 #endif
3185942a 17278int
74091dd4 17279main (void)
3185942a 17280{
74091dd4
CR
17281long long int n = 1;
17282 int i;
17283 for (i = 0; ; i++)
17284 {
17285 long long int m = n << i;
17286 if (m >> i != n)
17287 return 1;
17288 if (LLONG_MAX / 2 < m)
17289 break;
17290 }
17291 return 0;
3185942a
JA
17292 ;
17293 return 0;
17294}
17295_ACEOF
74091dd4
CR
17296if ac_fn_c_try_run "$LINENO"
17297then :
17298
17299else $as_nop
17300 ac_cv_type_long_long_int=no
ac50fbac 17301fi
74091dd4
CR
17302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17303 conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 17304fi
ac50fbac 17305
74091dd4
CR
17306 fi;;
17307 esac
ac50fbac 17308fi
74091dd4
CR
17309{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
17310printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
17311 if test $ac_cv_type_long_long_int = yes; then
ac50fbac 17312
74091dd4 17313printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
ac50fbac 17314
74091dd4 17315 fi
3185942a 17316
cce855bc 17317
74091dd4
CR
17318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
17319printf %s "checking for unsigned long long int... " >&6; }
17320if test ${ac_cv_type_unsigned_long_long_int+y}
17321then :
17322 printf %s "(cached) " >&6
17323else $as_nop
17324 ac_cv_type_unsigned_long_long_int=yes
17325 case $ac_prog_cc_stdc in
17326 no | c89) ;;
17327 *)
17328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 17329/* end confdefs.h. */
ac50fbac 17330
74091dd4
CR
17331 /* For now, do not test the preprocessor; as of 2007 there are too many
17332 implementations with broken preprocessors. Perhaps this can
17333 be revisited in 2012. In the meantime, code should not expect
17334 #if to work with literals wider than 32 bits. */
17335 /* Test literals. */
17336 long long int ll = 9223372036854775807ll;
17337 long long int nll = -9223372036854775807LL;
17338 unsigned long long int ull = 18446744073709551615ULL;
17339 /* Test constant expressions. */
17340 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17341 ? 1 : -1)];
17342 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17343 ? 1 : -1)];
17344 int i = 63;
f73dda09 17345int
74091dd4 17346main (void)
f73dda09 17347{
74091dd4
CR
17348/* Test availability of runtime routines for shift and division. */
17349 long long int llmax = 9223372036854775807ll;
17350 unsigned long long int ullmax = 18446744073709551615ull;
17351 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17352 | (llmax / ll) | (llmax % ll)
17353 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17354 | (ullmax / ull) | (ullmax % ull));
3185942a 17355 ;
f73dda09 17356 return 0;
3185942a 17357}
74091dd4 17358
3185942a 17359_ACEOF
74091dd4
CR
17360if ac_fn_c_try_link "$LINENO"
17361then :
17362
17363else $as_nop
17364 ac_cv_type_unsigned_long_long_int=no
ac50fbac 17365fi
74091dd4
CR
17366rm -f core conftest.err conftest.$ac_objext conftest.beam \
17367 conftest$ac_exeext conftest.$ac_ext;;
17368 esac
ac50fbac 17369fi
74091dd4
CR
17370{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17371printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
17372 if test $ac_cv_type_unsigned_long_long_int = yes; then
ac50fbac 17373
74091dd4
CR
17374printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
17375
17376 fi
ac50fbac
CR
17377
17378
74091dd4
CR
17379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5
17380printf %s "checking for sig_atomic_t in signal.h... " >&6; }
17381if test ${ac_cv_have_sig_atomic_t+y}
17382then :
17383 printf %s "(cached) " >&6
17384else $as_nop
ac50fbac 17385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 17386/* end confdefs.h. */
74091dd4 17387 #include <signal.h>
3185942a 17388int
74091dd4 17389main (void)
3185942a 17390{
ac50fbac 17391 sig_atomic_t x;
f73dda09
JA
17392 ;
17393 return 0;
17394}
17395_ACEOF
74091dd4
CR
17396if ac_fn_c_try_link "$LINENO"
17397then :
ac50fbac 17398 ac_cv_have_sig_atomic_t=yes
74091dd4 17399else $as_nop
ac50fbac
CR
17400 ac_cv_have_sig_atomic_t=no
17401fi
74091dd4 17402rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 17403 conftest$ac_exeext conftest.$ac_ext
3185942a 17404fi
74091dd4
CR
17405{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5
17406printf "%s\n" "$ac_cv_have_sig_atomic_t" >&6; }
ac50fbac
CR
17407if test "$ac_cv_have_sig_atomic_t" = "no"
17408then
3185942a 17409
3185942a 17410
74091dd4
CR
17411{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5
17412printf %s "checking for sig_atomic_t... " >&6; }
17413if test ${bash_cv_type_sig_atomic_t+y}
17414then :
17415 printf %s "(cached) " >&6
17416else $as_nop
17417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17418/* end confdefs.h. */
17419#include <sys/types.h>
17420#if HAVE_STDLIB_H
17421#include <stdlib.h>
17422#endif
17423#if HAVE_STDDEF_H
17424#include <stddef.h>
17425#endif
17426#if HAVE_INTTYPES_H
17427#include <inttypes.h>
17428#endif
17429#if HAVE_STDINT_H
17430#include <stdint.h>
17431#endif
17432#include <signal.h>
17433
ac50fbac 17434_ACEOF
74091dd4
CR
17435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17436 $EGREP "sig_atomic_t" >/dev/null 2>&1
17437then :
17438 bash_cv_type_sig_atomic_t=yes
17439else $as_nop
17440 bash_cv_type_sig_atomic_t=no
17441fi
17442rm -rf conftest*
17443
17444fi
17445
17446{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5
17447printf "%s\n" "$bash_cv_type_sig_atomic_t" >&6; }
17448
17449if test $bash_cv_type_sig_atomic_t = no; then
17450 printf "%s\n" "#define sig_atomic_t int" >>confdefs.h
3185942a
JA
17451
17452fi
17453
3185942a 17454fi
ac50fbac
CR
17455
17456
17457# The cast to long int works around a bug in the HP C Compiler
17458# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17459# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17460# This bug is HP SR number 8606223364.
74091dd4
CR
17461{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
17462printf %s "checking size of char... " >&6; }
17463if test ${ac_cv_sizeof_char+y}
17464then :
17465 printf %s "(cached) " >&6
17466else $as_nop
17467 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"
17468then :
17469
17470else $as_nop
ac50fbac 17471 if test "$ac_cv_type_char" = yes; then
74091dd4
CR
17472 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17473printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
17474as_fn_error 77 "cannot compute sizeof (char)
17475See \`config.log' for more details" "$LINENO" 5; }
17476 else
17477 ac_cv_sizeof_char=0
17478 fi
17479fi
3185942a
JA
17480
17481fi
74091dd4
CR
17482{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
17483printf "%s\n" "$ac_cv_sizeof_char" >&6; }
3185942a 17484
ac50fbac
CR
17485
17486
74091dd4 17487printf "%s\n" "#define SIZEOF_CHAR $ac_cv_sizeof_char" >>confdefs.h
ac50fbac
CR
17488
17489
17490# The cast to long int works around a bug in the HP C Compiler
17491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17493# This bug is HP SR number 8606223364.
74091dd4
CR
17494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
17495printf %s "checking size of short... " >&6; }
17496if test ${ac_cv_sizeof_short+y}
17497then :
17498 printf %s "(cached) " >&6
17499else $as_nop
17500 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
17501then :
17502
17503else $as_nop
ac50fbac 17504 if test "$ac_cv_type_short" = yes; then
74091dd4
CR
17505 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17506printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
17507as_fn_error 77 "cannot compute sizeof (short)
17508See \`config.log' for more details" "$LINENO" 5; }
17509 else
17510 ac_cv_sizeof_short=0
17511 fi
17512fi
3185942a 17513
3185942a 17514fi
74091dd4
CR
17515{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
17516printf "%s\n" "$ac_cv_sizeof_short" >&6; }
3185942a 17517
0628567a 17518
3185942a 17519
74091dd4 17520printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
ac50fbac
CR
17521
17522
17523# The cast to long int works around a bug in the HP C Compiler
17524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17526# This bug is HP SR number 8606223364.
74091dd4
CR
17527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
17528printf %s "checking size of int... " >&6; }
17529if test ${ac_cv_sizeof_int+y}
17530then :
17531 printf %s "(cached) " >&6
17532else $as_nop
17533 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
17534then :
17535
17536else $as_nop
ac50fbac 17537 if test "$ac_cv_type_int" = yes; then
74091dd4
CR
17538 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17539printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
17540as_fn_error 77 "cannot compute sizeof (int)
17541See \`config.log' for more details" "$LINENO" 5; }
17542 else
17543 ac_cv_sizeof_int=0
17544 fi
b72432fd 17545fi
3185942a 17546
b72432fd 17547fi
74091dd4
CR
17548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
17549printf "%s\n" "$ac_cv_sizeof_int" >&6; }
ac50fbac
CR
17550
17551
f73dda09 17552
74091dd4 17553printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
b72432fd 17554
ac50fbac
CR
17555
17556# The cast to long int works around a bug in the HP C Compiler
17557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17559# This bug is HP SR number 8606223364.
74091dd4
CR
17560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17561printf %s "checking size of long... " >&6; }
17562if test ${ac_cv_sizeof_long+y}
17563then :
17564 printf %s "(cached) " >&6
17565else $as_nop
17566 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
17567then :
17568
17569else $as_nop
ac50fbac 17570 if test "$ac_cv_type_long" = yes; then
74091dd4
CR
17571 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17572printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
17573as_fn_error 77 "cannot compute sizeof (long)
17574See \`config.log' for more details" "$LINENO" 5; }
17575 else
17576 ac_cv_sizeof_long=0
17577 fi
b72432fd 17578fi
cce855bc 17579
b72432fd 17580fi
74091dd4
CR
17581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17582printf "%s\n" "$ac_cv_sizeof_long" >&6; }
b72432fd 17583
b80f6443 17584
ac50fbac 17585
74091dd4 17586printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
ac50fbac
CR
17587
17588
17589# The cast to long int works around a bug in the HP C Compiler
17590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17592# This bug is HP SR number 8606223364.
74091dd4
CR
17593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
17594printf %s "checking size of char *... " >&6; }
17595if test ${ac_cv_sizeof_char_p+y}
17596then :
17597 printf %s "(cached) " >&6
17598else $as_nop
17599 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"
17600then :
17601
17602else $as_nop
ac50fbac 17603 if test "$ac_cv_type_char_p" = yes; then
74091dd4
CR
17604 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17605printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
17606as_fn_error 77 "cannot compute sizeof (char *)
17607See \`config.log' for more details" "$LINENO" 5; }
17608 else
17609 ac_cv_sizeof_char_p=0
17610 fi
17611fi
3185942a 17612
3185942a 17613fi
74091dd4
CR
17614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
17615printf "%s\n" "$ac_cv_sizeof_char_p" >&6; }
3185942a 17616
3185942a
JA
17617
17618
74091dd4 17619printf "%s\n" "#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p" >>confdefs.h
ac50fbac
CR
17620
17621
17622# The cast to long int works around a bug in the HP C Compiler
17623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17625# This bug is HP SR number 8606223364.
74091dd4
CR
17626{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17627printf %s "checking size of size_t... " >&6; }
17628if test ${ac_cv_sizeof_size_t+y}
17629then :
17630 printf %s "(cached) " >&6
17631else $as_nop
17632 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
17633then :
17634
17635else $as_nop
17636 if test "$ac_cv_type_size_t" = yes; then
17637 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17638printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17639as_fn_error 77 "cannot compute sizeof (size_t)
17640See \`config.log' for more details" "$LINENO" 5; }
17641 else
17642 ac_cv_sizeof_size_t=0
17643 fi
17644fi
ac50fbac 17645
74091dd4
CR
17646fi
17647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17648printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
17649
17650
17651
17652printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
17653
17654
17655# The cast to long int works around a bug in the HP C Compiler
17656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17658# This bug is HP SR number 8606223364.
17659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
17660printf %s "checking size of double... " >&6; }
17661if test ${ac_cv_sizeof_double+y}
17662then :
17663 printf %s "(cached) " >&6
17664else $as_nop
17665 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"
17666then :
17667
17668else $as_nop
ac50fbac 17669 if test "$ac_cv_type_double" = yes; then
74091dd4
CR
17670 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17671printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
17672as_fn_error 77 "cannot compute sizeof (double)
17673See \`config.log' for more details" "$LINENO" 5; }
17674 else
17675 ac_cv_sizeof_double=0
17676 fi
3185942a
JA
17677fi
17678
3185942a 17679fi
74091dd4
CR
17680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
17681printf "%s\n" "$ac_cv_sizeof_double" >&6; }
ac50fbac
CR
17682
17683
3185942a 17684
74091dd4 17685printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h
3185942a 17686
3185942a 17687
ac50fbac
CR
17688# The cast to long int works around a bug in the HP C Compiler
17689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17691# This bug is HP SR number 8606223364.
74091dd4
CR
17692{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
17693printf %s "checking size of long long... " >&6; }
17694if test ${ac_cv_sizeof_long_long+y}
17695then :
17696 printf %s "(cached) " >&6
17697else $as_nop
17698 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
17699then :
17700
17701else $as_nop
ac50fbac 17702 if test "$ac_cv_type_long_long" = yes; then
74091dd4
CR
17703 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17704printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
17705as_fn_error 77 "cannot compute sizeof (long long)
17706See \`config.log' for more details" "$LINENO" 5; }
17707 else
17708 ac_cv_sizeof_long_long=0
17709 fi
17710fi
3185942a 17711
3185942a 17712fi
74091dd4
CR
17713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
17714printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
3185942a 17715
3185942a
JA
17716
17717
74091dd4 17718printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
ac50fbac
CR
17719
17720
17721
17722ac_fn_c_check_type "$LINENO" "u_int" "ac_cv_type_u_int" "$ac_includes_default"
74091dd4
CR
17723if test "x$ac_cv_type_u_int" = xyes
17724then :
3185942a 17725
74091dd4 17726else $as_nop
3185942a 17727
74091dd4 17728printf "%s\n" "#define u_int unsigned int" >>confdefs.h
3185942a
JA
17729
17730fi
17731
ac50fbac 17732ac_fn_c_check_type "$LINENO" "u_long" "ac_cv_type_u_long" "$ac_includes_default"
74091dd4
CR
17733if test "x$ac_cv_type_u_long" = xyes
17734then :
ac50fbac 17735
74091dd4 17736else $as_nop
ac50fbac 17737
74091dd4 17738printf "%s\n" "#define u_long unsigned long" >>confdefs.h
3185942a 17739
ac50fbac
CR
17740fi
17741
17742
17743
17744if test "$ac_cv_sizeof_short" = 2; then
17745 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
74091dd4
CR
17746if test "x$ac_cv_type_bits16_t" = xyes
17747then :
3185942a 17748
74091dd4 17749else $as_nop
0628567a 17750
74091dd4 17751printf "%s\n" "#define bits16_t short" >>confdefs.h
3185942a 17752
b72432fd 17753fi
3185942a 17754
ac50fbac
CR
17755elif test "$ac_cv_sizeof_char" = 2; then
17756 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
74091dd4
CR
17757if test "x$ac_cv_type_bits16_t" = xyes
17758then :
ac50fbac 17759
74091dd4 17760else $as_nop
f73dda09 17761
74091dd4 17762printf "%s\n" "#define bits16_t char" >>confdefs.h
b72432fd
JA
17763
17764fi
17765
b72432fd 17766else
ac50fbac 17767 ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default"
74091dd4
CR
17768if test "x$ac_cv_type_bits16_t" = xyes
17769then :
ac50fbac 17770
74091dd4 17771else $as_nop
3185942a 17772
74091dd4 17773printf "%s\n" "#define bits16_t short" >>confdefs.h
ac50fbac 17774
3185942a
JA
17775fi
17776
ac50fbac
CR
17777fi
17778
17779
17780if test "$ac_cv_sizeof_short" = 2; then
17781 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
74091dd4
CR
17782if test "x$ac_cv_type_u_bits16_t" = xyes
17783then :
ac50fbac 17784
74091dd4 17785else $as_nop
0628567a 17786
74091dd4 17787printf "%s\n" "#define u_bits16_t unsigned short" >>confdefs.h
3185942a 17788
f73dda09 17789fi
3185942a 17790
ac50fbac
CR
17791elif test "$ac_cv_sizeof_char" = 2; then
17792 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
74091dd4
CR
17793if test "x$ac_cv_type_u_bits16_t" = xyes
17794then :
ac50fbac 17795
74091dd4 17796else $as_nop
f73dda09 17797
74091dd4 17798printf "%s\n" "#define u_bits16_t unsigned char" >>confdefs.h
f73dda09 17799
cce855bc 17800fi
b72432fd 17801
3185942a 17802else
ac50fbac 17803 ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default"
74091dd4
CR
17804if test "x$ac_cv_type_u_bits16_t" = xyes
17805then :
ac50fbac 17806
74091dd4 17807else $as_nop
ac50fbac 17808
74091dd4 17809printf "%s\n" "#define u_bits16_t unsigned short" >>confdefs.h
3185942a 17810
3185942a
JA
17811fi
17812
ac50fbac
CR
17813fi
17814
17815
17816if test "$ac_cv_sizeof_int" = 4; then
17817 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
74091dd4
CR
17818if test "x$ac_cv_type_bits32_t" = xyes
17819then :
ac50fbac 17820
74091dd4 17821else $as_nop
0628567a 17822
74091dd4 17823printf "%s\n" "#define bits32_t int" >>confdefs.h
3185942a 17824
b72432fd 17825fi
3185942a 17826
ac50fbac
CR
17827elif test "$ac_cv_sizeof_long" = 4; then
17828 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
74091dd4
CR
17829if test "x$ac_cv_type_bits32_t" = xyes
17830then :
ac50fbac 17831
74091dd4 17832else $as_nop
ac50fbac 17833
74091dd4 17834printf "%s\n" "#define bits32_t long" >>confdefs.h
ac50fbac 17835
b72432fd 17836fi
ac50fbac
CR
17837
17838else
17839 ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default"
74091dd4
CR
17840if test "x$ac_cv_type_bits32_t" = xyes
17841then :
ac50fbac 17842
74091dd4 17843else $as_nop
f73dda09 17844
74091dd4 17845printf "%s\n" "#define bits32_t int" >>confdefs.h
cce855bc
JA
17846
17847fi
17848
17849fi
17850
b80f6443 17851
ac50fbac
CR
17852if test "$ac_cv_sizeof_int" = 4; then
17853 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
74091dd4
CR
17854if test "x$ac_cv_type_u_bits32_t" = xyes
17855then :
b80f6443 17856
74091dd4 17857else $as_nop
ac50fbac 17858
74091dd4 17859printf "%s\n" "#define u_bits32_t unsigned int" >>confdefs.h
3185942a 17860
3185942a
JA
17861fi
17862
ac50fbac
CR
17863elif test "$ac_cv_sizeof_long" = 4; then
17864 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
74091dd4
CR
17865if test "x$ac_cv_type_u_bits32_t" = xyes
17866then :
ac50fbac 17867
74091dd4 17868else $as_nop
0628567a 17869
74091dd4 17870printf "%s\n" "#define u_bits32_t unsigned long" >>confdefs.h
3185942a 17871
bb70624e 17872fi
3185942a 17873
ac50fbac
CR
17874else
17875 ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default"
74091dd4
CR
17876if test "x$ac_cv_type_u_bits32_t" = xyes
17877then :
ac50fbac 17878
74091dd4 17879else $as_nop
f73dda09 17880
74091dd4 17881printf "%s\n" "#define u_bits32_t unsigned int" >>confdefs.h
bb70624e
JA
17882
17883fi
17884
ac50fbac
CR
17885fi
17886
17887
17888if test "$ac_cv_sizeof_char_p" = 8; then
17889 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
74091dd4
CR
17890if test "x$ac_cv_type_bits64_t" = xyes
17891then :
ac50fbac 17892
74091dd4 17893else $as_nop
ac50fbac 17894
74091dd4 17895printf "%s\n" "#define bits64_t char *" >>confdefs.h
3185942a 17896
3185942a
JA
17897fi
17898
ac50fbac
CR
17899elif test "$ac_cv_sizeof_double" = 8; then
17900 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
74091dd4
CR
17901if test "x$ac_cv_type_bits64_t" = xyes
17902then :
ac50fbac 17903
74091dd4 17904else $as_nop
0628567a 17905
74091dd4 17906printf "%s\n" "#define bits64_t double" >>confdefs.h
3185942a 17907
bb70624e 17908fi
3185942a 17909
ac50fbac
CR
17910elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
17911 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
74091dd4
CR
17912if test "x$ac_cv_type_bits64_t" = xyes
17913then :
ac50fbac 17914
74091dd4 17915else $as_nop
f73dda09 17916
74091dd4 17917printf "%s\n" "#define bits64_t long long" >>confdefs.h
bb70624e
JA
17918
17919fi
17920
ac50fbac
CR
17921elif test "$ac_cv_sizeof_long" = 8; then
17922 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
74091dd4
CR
17923if test "x$ac_cv_type_bits64_t" = xyes
17924then :
ac50fbac 17925
74091dd4 17926else $as_nop
ac50fbac 17927
74091dd4 17928printf "%s\n" "#define bits64_t long" >>confdefs.h
3185942a 17929
3185942a
JA
17930fi
17931
bb70624e 17932else
ac50fbac 17933 ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default"
74091dd4
CR
17934if test "x$ac_cv_type_bits64_t" = xyes
17935then :
ac50fbac 17936
74091dd4 17937else $as_nop
0628567a 17938
74091dd4 17939printf "%s\n" "#define bits64_t double" >>confdefs.h
3185942a 17940
f73dda09 17941fi
3185942a 17942
f73dda09 17943fi
ac50fbac
CR
17944
17945
17946
17947if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
17948 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
74091dd4
CR
17949if test "x$ac_cv_type_ptrdiff_t" = xyes
17950then :
ac50fbac 17951
74091dd4 17952else $as_nop
f73dda09 17953
74091dd4 17954printf "%s\n" "#define ptrdiff_t int" >>confdefs.h
f73dda09 17955
bb70624e 17956fi
bb70624e 17957
ac50fbac
CR
17958elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
17959 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
74091dd4
CR
17960if test "x$ac_cv_type_ptrdiff_t" = xyes
17961then :
ac50fbac 17962
74091dd4 17963else $as_nop
ac50fbac 17964
74091dd4 17965printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
3185942a 17966
3185942a
JA
17967fi
17968
ac50fbac
CR
17969elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
17970 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
74091dd4
CR
17971if test "x$ac_cv_type_ptrdiff_t" = xyes
17972then :
ac50fbac 17973
74091dd4 17974else $as_nop
0628567a 17975
74091dd4 17976printf "%s\n" "#define ptrdiff_t long long" >>confdefs.h
3185942a 17977
bb70624e 17978fi
3185942a 17979
ac50fbac
CR
17980else
17981 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
74091dd4
CR
17982if test "x$ac_cv_type_ptrdiff_t" = xyes
17983then :
ac50fbac 17984
74091dd4 17985else $as_nop
f73dda09 17986
74091dd4 17987printf "%s\n" "#define ptrdiff_t int" >>confdefs.h
bb70624e
JA
17988
17989fi
17990
17991fi
17992
b80f6443 17993
74091dd4
CR
17994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
17995printf %s "checking whether stat file-mode macros are broken... " >&6; }
17996if test ${ac_cv_header_stat_broken+y}
17997then :
17998 printf %s "(cached) " >&6
17999else $as_nop
ac50fbac 18000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18001/* end confdefs.h. */
ccc6cda3
JA
18002#include <sys/types.h>
18003#include <sys/stat.h>
18004
3185942a
JA
18005#if defined S_ISBLK && defined S_IFDIR
18006extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
ccc6cda3
JA
18007#endif
18008
3185942a
JA
18009#if defined S_ISBLK && defined S_IFCHR
18010extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
ccc6cda3
JA
18011#endif
18012
3185942a
JA
18013#if defined S_ISLNK && defined S_IFREG
18014extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
ccc6cda3
JA
18015#endif
18016
3185942a
JA
18017#if defined S_ISSOCK && defined S_IFREG
18018extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
f73dda09
JA
18019#endif
18020
18021_ACEOF
74091dd4
CR
18022if ac_fn_c_try_compile "$LINENO"
18023then :
f73dda09 18024 ac_cv_header_stat_broken=no
74091dd4 18025else $as_nop
ac50fbac 18026 ac_cv_header_stat_broken=yes
ccc6cda3 18027fi
74091dd4 18028rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 18029fi
74091dd4
CR
18030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
18031printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
f73dda09 18032if test $ac_cv_header_stat_broken = yes; then
ccc6cda3 18033
74091dd4 18034printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
ccc6cda3
JA
18035
18036fi
18037
b80f6443 18038
74091dd4
CR
18039{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5
18040printf %s "checking whether #! works in shell scripts... " >&6; }
18041if test ${ac_cv_sys_interpreter+y}
18042then :
18043 printf %s "(cached) " >&6
18044else $as_nop
ccc6cda3
JA
18045 echo '#! /bin/cat
18046exit 69
f73dda09 18047' >conftest
ccc6cda3 18048chmod u+x conftest
3185942a 18049(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
ccc6cda3
JA
18050if test $? -ne 69; then
18051 ac_cv_sys_interpreter=yes
18052else
18053 ac_cv_sys_interpreter=no
18054fi
18055rm -f conftest
18056fi
74091dd4
CR
18057{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5
18058printf "%s\n" "$ac_cv_sys_interpreter" >&6; }
f73dda09 18059interpval=$ac_cv_sys_interpreter
ccc6cda3
JA
18060
18061if test $ac_cv_sys_interpreter = yes; then
74091dd4 18062printf "%s\n" "#define HAVE_HASH_BANG_EXEC 1" >>confdefs.h
b80f6443 18063
74091dd4 18064fi
b80f6443 18065
74091dd4
CR
18066if test "$ac_cv_func_lstat" = "no"; then
18067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5
18068printf %s "checking for lstat... " >&6; }
18069if test ${bash_cv_func_lstat+y}
18070then :
18071 printf %s "(cached) " >&6
18072else $as_nop
ac50fbac 18073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18074/* end confdefs.h. */
b80f6443 18075
74091dd4
CR
18076 #include <sys/types.h>
18077 #include <sys/stat.h>
b80f6443 18078
8868edaf 18079int
74091dd4 18080main (void)
b80f6443 18081{
74091dd4
CR
18082 lstat(".",(struct stat *)0);
18083 ;
18084 return 0;
b80f6443 18085}
b80f6443 18086_ACEOF
74091dd4
CR
18087if ac_fn_c_try_link "$LINENO"
18088then :
18089 bash_cv_func_lstat=yes
18090else $as_nop
18091 bash_cv_func_lstat=no
b80f6443 18092fi
74091dd4
CR
18093rm -f core conftest.err conftest.$ac_objext conftest.beam \
18094 conftest$ac_exeext conftest.$ac_ext
ccc6cda3 18095fi
74091dd4
CR
18096{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5
18097printf "%s\n" "$bash_cv_func_lstat" >&6; }
18098if test $bash_cv_func_lstat = yes; then
18099 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
3185942a 18100
b80f6443
JA
18101fi
18102
ccc6cda3
JA
18103fi
18104
74091dd4
CR
18105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5
18106printf %s "checking if dup2 fails to clear the close-on-exec flag... " >&6; }
18107if test ${bash_cv_dup2_broken+y}
18108then :
18109 printf %s "(cached) " >&6
18110else $as_nop
18111 if test "$cross_compiling" = yes
18112then :
18113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5
18114printf "%s\n" "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;}
cce855bc 18115 bash_cv_dup2_broken=no
74091dd4
CR
18116
18117else $as_nop
ac50fbac 18118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18119/* end confdefs.h. */
ccc6cda3
JA
18120
18121#include <sys/types.h>
18122#include <fcntl.h>
8868edaf
CR
18123#include <stdlib.h>
18124int
ccc6cda3
JA
18125main()
18126{
18127 int fd1, fd2, fl;
18128 fd1 = open("/dev/null", 2);
18129 if (fcntl(fd1, 2, 1) < 0)
18130 exit(1);
18131 fd2 = dup2(fd1, 1);
18132 if (fd2 < 0)
18133 exit(2);
18134 fl = fcntl(fd2, 1, 0);
18135 /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
18136 exit(fl != 1);
18137}
18138
f73dda09 18139_ACEOF
74091dd4
CR
18140if ac_fn_c_try_run "$LINENO"
18141then :
ccc6cda3 18142 bash_cv_dup2_broken=yes
74091dd4 18143else $as_nop
ac50fbac 18144 bash_cv_dup2_broken=no
ccc6cda3 18145fi
ac50fbac
CR
18146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18147 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
18148fi
18149
ccc6cda3
JA
18150fi
18151
74091dd4
CR
18152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dup2_broken" >&5
18153printf "%s\n" "$bash_cv_dup2_broken" >&6; }
ccc6cda3 18154if test $bash_cv_dup2_broken = yes; then
74091dd4 18155printf "%s\n" "#define DUP2_BROKEN 1" >>confdefs.h
ccc6cda3
JA
18156
18157fi
18158
b80f6443 18159
74091dd4
CR
18160{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pgrps need synchronization" >&5
18161printf %s "checking whether pgrps need synchronization... " >&6; }
18162if test ${bash_cv_pgrp_pipe+y}
18163then :
18164 printf %s "(cached) " >&6
18165else $as_nop
18166 if test "$cross_compiling" = yes
18167then :
18168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5
18169printf "%s\n" "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;}
cce855bc 18170 bash_cv_pgrp_pipe=no
74091dd4
CR
18171
18172else $as_nop
ac50fbac 18173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18174/* end confdefs.h. */
ccc6cda3
JA
18175
18176#ifdef HAVE_UNISTD_H
18177# include <unistd.h>
18178#endif
8868edaf
CR
18179#ifdef HAVE_SYS_WAIT_H
18180# include <sys/wait.h>
18181#endif
18182#include <stdlib.h>
18183int
ccc6cda3
JA
18184main()
18185{
18186# ifdef GETPGRP_VOID
18187# define getpgID() getpgrp()
18188# else
18189# define getpgID() getpgrp(0)
18190# define setpgid(x,y) setpgrp(x,y)
18191# endif
18192 int pid1, pid2, fds[2];
18193 int status;
18194 char ok;
18195
18196 switch (pid1 = fork()) {
18197 case -1:
18198 exit(1);
18199 case 0:
18200 setpgid(0, getpid());
18201 exit(0);
18202 }
18203 setpgid(pid1, pid1);
18204
18205 sleep(2); /* let first child die */
18206
18207 if (pipe(fds) < 0)
18208 exit(2);
18209
18210 switch (pid2 = fork()) {
18211 case -1:
18212 exit(3);
18213 case 0:
18214 setpgid(0, pid1);
18215 ok = getpgID() == pid1;
18216 write(fds[1], &ok, 1);
18217 exit(0);
18218 }
18219 setpgid(pid2, pid1);
18220
18221 close(fds[1]);
18222 if (read(fds[0], &ok, 1) != 1)
18223 exit(4);
18224 wait(&status);
18225 wait(&status);
18226 exit(ok ? 0 : 5);
18227}
18228
f73dda09 18229_ACEOF
74091dd4
CR
18230if ac_fn_c_try_run "$LINENO"
18231then :
ccc6cda3 18232 bash_cv_pgrp_pipe=no
74091dd4 18233else $as_nop
ac50fbac 18234 bash_cv_pgrp_pipe=yes
ccc6cda3 18235fi
ac50fbac
CR
18236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18237 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
18238fi
18239
ccc6cda3
JA
18240fi
18241
74091dd4
CR
18242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_pgrp_pipe" >&5
18243printf "%s\n" "$bash_cv_pgrp_pipe" >&6; }
ccc6cda3 18244if test $bash_cv_pgrp_pipe = yes; then
74091dd4 18245printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h
ccc6cda3
JA
18246
18247fi
18248
74091dd4
CR
18249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5
18250printf %s "checking for type of signal functions... " >&6; }
18251if test ${bash_cv_signal_vintage+y}
18252then :
18253 printf %s "(cached) " >&6
18254else $as_nop
b80f6443 18255
74091dd4
CR
18256if test ${bash_cv_posix_signals+y}
18257then :
18258 printf %s "(cached) " >&6
18259else $as_nop
ac50fbac 18260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18261/* end confdefs.h. */
74091dd4 18262
d166f048 18263#include <signal.h>
74091dd4 18264
f73dda09 18265int
74091dd4 18266main (void)
f73dda09 18267{
d166f048
JA
18268
18269 sigset_t ss;
18270 struct sigaction sa;
18271 sigemptyset(&ss); sigsuspend(&ss);
18272 sigaction(SIGINT, &sa, (struct sigaction *) 0);
18273 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
f73dda09
JA
18274
18275 ;
18276 return 0;
18277}
18278_ACEOF
74091dd4
CR
18279if ac_fn_c_try_link "$LINENO"
18280then :
18281 bash_cv_posix_signals=yes
18282else $as_nop
18283 bash_cv_posix_signals=no
18284
18285fi
18286rm -f core conftest.err conftest.$ac_objext conftest.beam \
18287 conftest$ac_exeext conftest.$ac_ext
18288fi
18289
18290
18291if test $bash_cv_posix_signals = yes; then
d166f048 18292 bash_cv_signal_vintage=posix
ccc6cda3 18293else
74091dd4
CR
18294 if test ${bash_cv_bsd_signals+y}
18295then :
18296 printf %s "(cached) " >&6
18297else $as_nop
18298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18299/* end confdefs.h. */
74091dd4 18300
d166f048 18301#include <signal.h>
74091dd4 18302
f73dda09 18303int
74091dd4 18304main (void)
f73dda09 18305{
d166f048 18306
74091dd4
CR
18307int mask = sigmask(SIGINT);
18308sigsetmask(mask); sigblock(mask); sigpause(mask);
f73dda09
JA
18309
18310 ;
18311 return 0;
18312}
18313_ACEOF
74091dd4
CR
18314if ac_fn_c_try_link "$LINENO"
18315then :
18316 bash_cv_bsd_signals=yes
18317else $as_nop
18318 bash_cv_bsd_signals=no
f73dda09 18319
74091dd4
CR
18320fi
18321rm -f core conftest.err conftest.$ac_objext conftest.beam \
18322 conftest$ac_exeext conftest.$ac_ext
18323fi
18324
18325
18326 if test $bash_cv_bsd_signals = yes; then
18327 bash_cv_signal_vintage=4.2bsd
18328 else
18329 if test ${bash_cv_sysv_signals+y}
18330then :
18331 printf %s "(cached) " >&6
18332else $as_nop
18333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18334/* end confdefs.h. */
d166f048 18335
74091dd4
CR
18336#include <signal.h>
18337void foo() { }
18338
f73dda09 18339int
74091dd4 18340main (void)
f73dda09 18341{
d166f048 18342
74091dd4
CR
18343int mask = sigmask(SIGINT);
18344sigset(SIGINT, foo); sigrelse(SIGINT);
18345sighold(SIGINT); sigpause(SIGINT);
ac50fbac
CR
18346
18347 ;
18348 return 0;
18349}
18350_ACEOF
74091dd4
CR
18351if ac_fn_c_try_link "$LINENO"
18352then :
18353 bash_cv_sysv_signals=yes
18354else $as_nop
18355 bash_cv_sysv_signals=no
f73dda09 18356
d166f048 18357fi
74091dd4 18358rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 18359 conftest$ac_exeext conftest.$ac_ext
d166f048 18360fi
d166f048 18361
74091dd4
CR
18362
18363 if test $bash_cv_sysv_signals = yes; then
18364 bash_cv_signal_vintage=svr3
18365 else
18366 bash_cv_signal_vintage=v7
18367 fi
18368 fi
d166f048 18369fi
d166f048
JA
18370
18371fi
18372
74091dd4
CR
18373{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5
18374printf "%s\n" "$bash_cv_signal_vintage" >&6; }
d166f048 18375if test "$bash_cv_signal_vintage" = posix; then
74091dd4 18376printf "%s\n" "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h
d166f048
JA
18377
18378elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
74091dd4 18379printf "%s\n" "#define HAVE_BSD_SIGNALS 1" >>confdefs.h
d166f048
JA
18380
18381elif test "$bash_cv_signal_vintage" = svr3; then
74091dd4 18382printf "%s\n" "#define HAVE_USG_SIGHOLD 1" >>confdefs.h
d166f048
JA
18383
18384fi
18385
b80f6443 18386
74091dd4
CR
18387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_errlist and sys_nerr" >&5
18388printf %s "checking for sys_errlist and sys_nerr... " >&6; }
18389if test ${bash_cv_sys_errlist+y}
18390then :
18391 printf %s "(cached) " >&6
18392else $as_nop
ac50fbac 18393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18394/* end confdefs.h. */
74091dd4 18395
f73dda09 18396#include <errno.h>
74091dd4 18397
f73dda09 18398int
74091dd4 18399main (void)
cce855bc 18400{
74091dd4 18401
d166f048 18402extern char *sys_errlist[];
74091dd4
CR
18403extern int sys_nerr;
18404char *msg = sys_errlist[sys_nerr - 1];
18405
f73dda09
JA
18406 ;
18407 return 0;
18408}
18409_ACEOF
74091dd4
CR
18410if ac_fn_c_try_link "$LINENO"
18411then :
d166f048 18412 bash_cv_sys_errlist=yes
74091dd4 18413else $as_nop
ac50fbac 18414 bash_cv_sys_errlist=no
74091dd4 18415
d166f048 18416fi
74091dd4 18417rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 18418 conftest$ac_exeext conftest.$ac_ext
d166f048 18419fi
74091dd4
CR
18420
18421{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_errlist" >&5
18422printf "%s\n" "$bash_cv_sys_errlist" >&6; }
d166f048 18423if test $bash_cv_sys_errlist = yes; then
74091dd4 18424printf "%s\n" "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
d166f048
JA
18425
18426fi
18427
74091dd4
CR
18428ac_fn_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
18429/* NetBSD declares sys_siglist in unistd.h. */
18430#ifdef HAVE_UNISTD_H
18431# include <unistd.h>
18432#endif
b80f6443 18433
74091dd4
CR
18434" "$ac_c_undeclared_builtin_options" "CFLAGS"
18435if test "x$ac_cv_have_decl_sys_siglist" = xyes
18436then :
18437 ac_have_decl=1
18438else $as_nop
18439 ac_have_decl=0
18440fi
18441printf "%s\n" "#define HAVE_DECL_SYS_SIGLIST $ac_have_decl" >>confdefs.h
18442
18443
18444
18445{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_siglist in system C library" >&5
18446printf %s "checking for sys_siglist in system C library... " >&6; }
18447if test ${bash_cv_sys_siglist+y}
18448then :
18449 printf %s "(cached) " >&6
18450else $as_nop
18451 if test "$cross_compiling" = yes
18452then :
18453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5
18454printf "%s\n" "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;}
cce855bc 18455 bash_cv_sys_siglist=no
74091dd4
CR
18456
18457else $as_nop
ac50fbac 18458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18459/* end confdefs.h. */
ccc6cda3
JA
18460
18461#include <sys/types.h>
18462#include <signal.h>
18463#ifdef HAVE_UNISTD_H
18464#include <unistd.h>
18465#endif
8868edaf 18466#include <stdlib.h>
3185942a 18467#if !HAVE_DECL_SYS_SIGLIST
ccc6cda3
JA
18468extern char *sys_siglist[];
18469#endif
8868edaf 18470int
ccc6cda3
JA
18471main()
18472{
18473char *msg = sys_siglist[2];
18474exit(msg == 0);
18475}
74091dd4 18476
f73dda09 18477_ACEOF
74091dd4
CR
18478if ac_fn_c_try_run "$LINENO"
18479then :
ccc6cda3 18480 bash_cv_sys_siglist=yes
74091dd4 18481else $as_nop
ac50fbac 18482 bash_cv_sys_siglist=no
ccc6cda3 18483fi
ac50fbac
CR
18484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18485 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 18486fi
3185942a 18487
ccc6cda3 18488fi
cce855bc 18489
74091dd4
CR
18490{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_siglist" >&5
18491printf "%s\n" "$bash_cv_sys_siglist" >&6; }
ccc6cda3 18492if test $bash_cv_sys_siglist = yes; then
74091dd4 18493printf "%s\n" "#define HAVE_SYS_SIGLIST 1" >>confdefs.h
ccc6cda3
JA
18494
18495fi
18496
74091dd4
CR
18497{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in signal.h or unistd.h" >&5
18498printf %s "checking for _sys_siglist in signal.h or unistd.h... " >&6; }
18499if test ${bash_cv_decl_under_sys_siglist+y}
18500then :
18501 printf %s "(cached) " >&6
18502else $as_nop
ac50fbac 18503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18504/* end confdefs.h. */
ccc6cda3
JA
18505
18506#include <sys/types.h>
18507#include <signal.h>
18508#ifdef HAVE_UNISTD_H
18509#include <unistd.h>
18510#endif
f73dda09 18511int
74091dd4
CR
18512main (void)
18513{
18514 char *msg = _sys_siglist[2];
18515 ;
18516 return 0;
18517}
f73dda09 18518_ACEOF
74091dd4
CR
18519if ac_fn_c_try_compile "$LINENO"
18520then :
18521 bash_cv_decl_under_sys_siglist=yes
18522else $as_nop
18523 bash_cv_decl_under_sys_siglist=no
ccc6cda3 18524fi
74091dd4 18525rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 18526fi
74091dd4
CR
18527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_under_sys_siglist" >&5
18528printf "%s\n" "$bash_cv_decl_under_sys_siglist" >&6; }
18529if test $bash_cv_decl_under_sys_siglist = yes; then
18530printf "%s\n" "#define UNDER_SYS_SIGLIST_DECLARED 1" >>confdefs.h
ccc6cda3
JA
18531
18532fi
18533
b80f6443 18534
74091dd4
CR
18535{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in system C library" >&5
18536printf %s "checking for _sys_siglist in system C library... " >&6; }
18537if test ${bash_cv_under_sys_siglist+y}
18538then :
18539 printf %s "(cached) " >&6
18540else $as_nop
18541 if test "$cross_compiling" = yes
18542then :
18543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5
18544printf "%s\n" "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;}
18545 bash_cv_under_sys_siglist=no
3185942a 18546
74091dd4 18547else $as_nop
ac50fbac 18548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 18549/* end confdefs.h. */
74091dd4 18550
ac50fbac 18551#include <sys/types.h>
74091dd4
CR
18552#include <signal.h>
18553#ifdef HAVE_UNISTD_H
18554#include <unistd.h>
ac50fbac 18555#endif
74091dd4
CR
18556#include <stdlib.h>
18557#ifndef UNDER_SYS_SIGLIST_DECLARED
18558extern char *_sys_siglist[];
ac50fbac 18559#endif
74091dd4
CR
18560int
18561main()
18562{
18563char *msg = (char *)_sys_siglist[2];
18564exit(msg == 0);
18565}
495aee44 18566
0628567a 18567_ACEOF
74091dd4
CR
18568if ac_fn_c_try_run "$LINENO"
18569then :
18570 bash_cv_under_sys_siglist=yes
18571else $as_nop
18572 bash_cv_under_sys_siglist=no
f73dda09 18573fi
74091dd4
CR
18574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18575 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
18576fi
18577
74091dd4 18578fi
495aee44 18579
74091dd4
CR
18580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_under_sys_siglist" >&5
18581printf "%s\n" "$bash_cv_under_sys_siglist" >&6; }
18582if test $bash_cv_under_sys_siglist = yes; then
18583printf "%s\n" "#define HAVE_UNDER_SYS_SIGLIST 1" >>confdefs.h
495aee44 18584
495aee44
CR
18585fi
18586
ac50fbac
CR
18587
18588
74091dd4
CR
18589
18590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
18591printf %s "checking for clock_t... " >&6; }
18592if test ${bash_cv_type_clock_t+y}
18593then :
18594 printf %s "(cached) " >&6
18595else $as_nop
ac50fbac 18596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 18597/* end confdefs.h. */
ac50fbac 18598#include <sys/types.h>
74091dd4 18599#if HAVE_STDLIB_H
495aee44 18600#include <stdlib.h>
74091dd4
CR
18601#endif
18602#if HAVE_STDDEF_H
ac50fbac
CR
18603#include <stddef.h>
18604#endif
18605#if HAVE_INTTYPES_H
18606#include <inttypes.h>
18607#endif
18608#if HAVE_STDINT_H
18609#include <stdint.h>
18610#endif
74091dd4 18611#include <sys/times.h>
495aee44 18612
495aee44 18613_ACEOF
ac50fbac 18614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
18615 $EGREP "clock_t" >/dev/null 2>&1
18616then :
18617 bash_cv_type_clock_t=yes
18618else $as_nop
18619 bash_cv_type_clock_t=no
495aee44 18620fi
74091dd4 18621rm -rf conftest*
495aee44 18622
ac50fbac 18623fi
495aee44 18624
74091dd4
CR
18625{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_clock_t" >&5
18626printf "%s\n" "$bash_cv_type_clock_t" >&6; }
495aee44 18627
74091dd4
CR
18628if test $bash_cv_type_clock_t = no; then
18629 printf "%s\n" "#define clock_t long" >>confdefs.h
495aee44 18630
ac50fbac 18631fi
495aee44
CR
18632
18633
18634
74091dd4
CR
18635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigset_t" >&5
18636printf %s "checking for sigset_t... " >&6; }
18637if test ${bash_cv_type_sigset_t+y}
18638then :
18639 printf %s "(cached) " >&6
18640else $as_nop
ac50fbac 18641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 18642/* end confdefs.h. */
495aee44 18643#include <sys/types.h>
74091dd4 18644#if HAVE_STDLIB_H
ac50fbac 18645#include <stdlib.h>
74091dd4
CR
18646#endif
18647#if HAVE_STDDEF_H
ac50fbac
CR
18648#include <stddef.h>
18649#endif
18650#if HAVE_INTTYPES_H
18651#include <inttypes.h>
18652#endif
18653#if HAVE_STDINT_H
18654#include <stdint.h>
18655#endif
74091dd4 18656#include <signal.h>
495aee44 18657
495aee44 18658_ACEOF
ac50fbac 18659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
18660 $EGREP "sigset_t" >/dev/null 2>&1
18661then :
18662 bash_cv_type_sigset_t=yes
18663else $as_nop
18664 bash_cv_type_sigset_t=no
ac50fbac 18665fi
74091dd4 18666rm -rf conftest*
ac50fbac
CR
18667
18668fi
18669
74091dd4
CR
18670{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sigset_t" >&5
18671printf "%s\n" "$bash_cv_type_sigset_t" >&6; }
495aee44 18672
74091dd4
CR
18673if test $bash_cv_type_sigset_t = no; then
18674 printf "%s\n" "#define sigset_t int" >>confdefs.h
495aee44 18675
ac50fbac
CR
18676fi
18677
18678if test "$ac_cv_header_sys_socket_h" = "yes"; then
495aee44
CR
18679
18680
74091dd4
CR
18681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
18682printf %s "checking for socklen_t... " >&6; }
18683if test ${bash_cv_type_socklen_t+y}
18684then :
18685 printf %s "(cached) " >&6
18686else $as_nop
ac50fbac
CR
18687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18688/* end confdefs.h. */
18689#include <sys/types.h>
74091dd4 18690#if HAVE_STDLIB_H
ac50fbac 18691#include <stdlib.h>
74091dd4
CR
18692#endif
18693#if HAVE_STDDEF_H
ac50fbac
CR
18694#include <stddef.h>
18695#endif
18696#if HAVE_INTTYPES_H
18697#include <inttypes.h>
18698#endif
18699#if HAVE_STDINT_H
18700#include <stdint.h>
18701#endif
18702#include <sys/socket.h>
495aee44 18703
ac50fbac
CR
18704_ACEOF
18705if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
18706 $EGREP "socklen_t" >/dev/null 2>&1
18707then :
ac50fbac 18708 bash_cv_type_socklen_t=yes
74091dd4 18709else $as_nop
ac50fbac 18710 bash_cv_type_socklen_t=no
495aee44 18711fi
74091dd4 18712rm -rf conftest*
495aee44 18713
495aee44
CR
18714fi
18715
74091dd4
CR
18716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_socklen_t" >&5
18717printf "%s\n" "$bash_cv_type_socklen_t" >&6; }
ac50fbac 18718if test $bash_cv_type_socklen_t = yes; then
74091dd4 18719 printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h
ac50fbac
CR
18720
18721 fi
18722if test $bash_cv_type_socklen_t = no; then
74091dd4 18723 printf "%s\n" "#define socklen_t unsigned int" >>confdefs.h
495aee44
CR
18724
18725fi
18726
ac50fbac 18727fi
74091dd4
CR
18728
18729ac_fn_c_check_type "$LINENO" "quad_t" "ac_cv_type_quad_t" "$ac_includes_default"
18730if test "x$ac_cv_type_quad_t" = xyes
18731then :
18732 printf "%s\n" "#define HAVE_QUAD_T 1" >>confdefs.h
18733
18734fi
18735
18736{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type of struct rlimit fields" >&5
18737printf %s "checking for type of struct rlimit fields... " >&6; }
18738if test ${bash_cv_type_rlimit+y}
18739then :
18740 printf %s "(cached) " >&6
18741else $as_nop
ac50fbac 18742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44 18743/* end confdefs.h. */
74091dd4 18744
495aee44 18745#include <sys/types.h>
ac50fbac 18746#include <sys/resource.h>
495aee44 18747int
74091dd4 18748main (void)
495aee44 18749{
ac50fbac 18750rlim_t xxx;
74091dd4 18751
495aee44
CR
18752 ;
18753 return 0;
18754}
18755_ACEOF
74091dd4
CR
18756if ac_fn_c_try_compile "$LINENO"
18757then :
ac50fbac 18758 bash_cv_type_rlimit=rlim_t
74091dd4
CR
18759else $as_nop
18760
18761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for size of struct rlimit fields" >&5
18762printf %s "checking for size of struct rlimit fields... " >&6; }
18763if test ${bash_cv_sizeof_rlim_cur+y}
18764then :
18765 printf %s "(cached) " >&6
18766else $as_nop
18767 if test "$cross_compiling" = yes
18768then :
18769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check size of rlimit fields if cross compiling -- defaulting to long" >&5
18770printf "%s\n" "$as_me: WARNING: cannot check size of rlimit fields if cross compiling -- defaulting to long" >&2;}
18771 bash_cv_sizeof_rlim_cur=$ac_cv_sizeof_long
18772
18773else $as_nop
ac50fbac 18774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
495aee44
CR
18775/* end confdefs.h. */
18776
74091dd4 18777#ifdef HAVE_SYS_TIME_H
ac50fbac 18778#include <sys/time.h>
74091dd4
CR
18779#endif
18780#include <stdlib.h>
ac50fbac 18781#include <sys/resource.h>
74091dd4
CR
18782main()
18783{
18784struct rlimit r;
18785exit(sizeof (r.rlim_cur));
18786}
18787
18788_ACEOF
18789if ac_fn_c_try_run "$LINENO"
18790then :
18791 bash_cv_sizeof_rlim_cur=$?
18792else $as_nop
18793 bash_cv_sizeof_rlim_cur=$?
18794fi
18795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18796 conftest.$ac_objext conftest.beam conftest.$ac_ext
18797fi
18798
18799fi
18800
18801{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sizeof_rlim_cur" >&5
18802printf "%s\n" "$bash_cv_sizeof_rlim_cur" >&6; }
18803
18804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for size of quad_t" >&5
18805printf %s "checking for size of quad_t... " >&6; }
18806if test ${bash_cv_sizeof_quad_t+y}
18807then :
18808 printf %s "(cached) " >&6
18809else $as_nop
18810 if test "$cross_compiling" = yes
18811then :
18812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check size of quad_t if cross compiling -- defaulting to 0" >&5
18813printf "%s\n" "$as_me: WARNING: cannot check size of quad_t if cross compiling -- defaulting to 0" >&2;}
18814 bash_cv_sizeof_quad_t=0
18815
18816else $as_nop
18817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18818/* end confdefs.h. */
18819
18820#include <sys/types.h>
8868edaf 18821#include <stdlib.h>
74091dd4
CR
18822#if HAVE_INTTYPES_H
18823#include <inttypes.h>
18824#endif
18825#if HAVE_STDINT_H
18826#include <stdint.h>
18827#endif
18828
ac50fbac 18829main()
495aee44 18830{
74091dd4
CR
18831#if HAVE_QUAD_T
18832quad_t x;
18833exit(sizeof (x));
18834#else
18835exit (0);
ac50fbac 18836#endif
495aee44 18837}
74091dd4 18838
495aee44 18839_ACEOF
74091dd4
CR
18840if ac_fn_c_try_run "$LINENO"
18841then :
18842 bash_cv_sizeof_quad_t=$?
18843else $as_nop
18844 bash_cv_sizeof_quad_t=$?
ac50fbac
CR
18845fi
18846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18847 conftest.$ac_objext conftest.beam conftest.$ac_ext
18848fi
18849
18850fi
74091dd4
CR
18851
18852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sizeof_quad_t" >&5
18853printf "%s\n" "$bash_cv_sizeof_quad_t" >&6; }
18854
18855if test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_long; then
18856 bash_cv_type_rlimit='unsigned long'
18857elif test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_long_long; then
18858 bash_cv_type_rlimit='unsigned long long'
18859elif test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_int; then
18860 bash_cv_type_rlimit='unsigned int'
18861elif test $bash_cv_sizeof_rlim_cur = $bash_cv_sizeof_quad_t; then
18862 bash_cv_type_rlimit='quad_t'
18863else
18864 bash_cv_type_rlimit='unsigned long'
18865fi
18866
18867
18868fi
18869rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18870fi
18871
18872{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_rlimit" >&5
18873printf "%s\n" "$bash_cv_type_rlimit" >&6; }
18874printf "%s\n" "#define RLIMTYPE $bash_cv_type_rlimit" >>confdefs.h
18875
18876
18877
18878
18879
18880 ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
18881if test "x$ac_cv_type_intmax_t" = xyes
18882then :
18883
18884printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
18885
18886else $as_nop
18887 test $ac_cv_type_long_long_int = yes \
18888 && ac_type='long long int' \
18889 || ac_type='long int'
18890
18891printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
ac50fbac
CR
18892
18893fi
18894
ac50fbac 18895
74091dd4
CR
18896
18897
18898 ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
18899if test "x$ac_cv_type_uintmax_t" = xyes
18900then :
18901
18902printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h
18903
18904else $as_nop
18905 test $ac_cv_type_unsigned_long_long_int = yes \
18906 && ac_type='unsigned long long int' \
18907 || ac_type='unsigned long int'
18908
18909printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h
ac50fbac
CR
18910
18911fi
18912
18913
74091dd4 18914
ac50fbac
CR
18915# The cast to long int works around a bug in the HP C Compiler
18916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18918# This bug is HP SR number 8606223364.
74091dd4
CR
18919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5
18920printf %s "checking size of intmax_t... " >&6; }
18921if test ${ac_cv_sizeof_intmax_t+y}
18922then :
18923 printf %s "(cached) " >&6
18924else $as_nop
18925 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default"
18926then :
18927
18928else $as_nop
ac50fbac 18929 if test "$ac_cv_type_intmax_t" = yes; then
74091dd4
CR
18930 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18931printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
ac50fbac
CR
18932as_fn_error 77 "cannot compute sizeof (intmax_t)
18933See \`config.log' for more details" "$LINENO" 5; }
18934 else
18935 ac_cv_sizeof_intmax_t=0
18936 fi
495aee44
CR
18937fi
18938
495aee44 18939fi
74091dd4
CR
18940{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5
18941printf "%s\n" "$ac_cv_sizeof_intmax_t" >&6; }
495aee44 18942
ac50fbac
CR
18943
18944
74091dd4 18945printf "%s\n" "#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t" >>confdefs.h
495aee44 18946
ac50fbac
CR
18947
18948
18949
18950ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" "
18951#include <sys/types.h>
18952#include <termios.h>
18953
18954"
74091dd4
CR
18955if test "x$ac_cv_member_struct_termios_c_line" = xyes
18956then :
18957 printf "%s\n" "#define TERMIOS_LDISC 1" >>confdefs.h
ac50fbac
CR
18958
18959fi
18960
18961
18962
18963ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" "
18964#include <sys/types.h>
18965#include <termio.h>
18966
18967"
74091dd4
CR
18968if test "x$ac_cv_member_struct_termio_c_line" = xyes
18969then :
18970 printf "%s\n" "#define TERMIO_LDISC 1" >>confdefs.h
ac50fbac 18971
495aee44
CR
18972fi
18973
18974
18975
74091dd4
CR
18976{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5
18977printf %s "checking for struct dirent.d_ino... " >&6; }
18978if test ${bash_cv_dirent_has_d_ino+y}
18979then :
18980 printf %s "(cached) " >&6
18981else $as_nop
18982
ccc6cda3 18983
74091dd4 18984ac_fn_c_check_member "$LINENO" "struct dirent" "d_ino" "ac_cv_member_struct_dirent_d_ino" "
ccc6cda3
JA
18985#include <stdio.h>
18986#include <sys/types.h>
18987#ifdef HAVE_UNISTD_H
18988# include <unistd.h>
18989#endif /* HAVE_UNISTD_H */
18990#if defined(HAVE_DIRENT_H)
18991# include <dirent.h>
18992#else
18993# define dirent direct
18994# ifdef HAVE_SYS_NDIR_H
18995# include <sys/ndir.h>
18996# endif /* SYSNDIR */
18997# ifdef HAVE_SYS_DIR_H
18998# include <sys/dir.h>
18999# endif /* SYSDIR */
19000# ifdef HAVE_NDIR_H
19001# include <ndir.h>
19002# endif
19003#endif /* HAVE_DIRENT_H */
19004
74091dd4
CR
19005"
19006if test "x$ac_cv_member_struct_dirent_d_ino" = xyes
19007then :
ccc6cda3 19008
74091dd4 19009printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h
ccc6cda3 19010
74091dd4
CR
19011bash_cv_dirent_has_d_ino=yes
19012else $as_nop
19013 bash_cv_dirent_has_d_ino=no
ccc6cda3 19014fi
74091dd4
CR
19015
19016
ccc6cda3
JA
19017fi
19018
74091dd4
CR
19019{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_ino" >&5
19020printf "%s\n" "$bash_cv_dirent_has_d_ino" >&6; }
19021if test $bash_cv_dirent_has_d_ino = yes; then
19022printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h
ccc6cda3
JA
19023
19024fi
19025
b80f6443 19026
74091dd4
CR
19027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5
19028printf %s "checking for struct dirent.d_fileno... " >&6; }
19029if test ${bash_cv_dirent_has_d_fileno+y}
19030then :
19031 printf %s "(cached) " >&6
19032else $as_nop
d166f048 19033
74091dd4
CR
19034
19035ac_fn_c_check_member "$LINENO" "struct dirent" "d_fileno" "ac_cv_member_struct_dirent_d_fileno" "
d166f048
JA
19036#include <stdio.h>
19037#include <sys/types.h>
19038#ifdef HAVE_UNISTD_H
19039# include <unistd.h>
19040#endif /* HAVE_UNISTD_H */
19041#if defined(HAVE_DIRENT_H)
19042# include <dirent.h>
19043#else
19044# define dirent direct
19045# ifdef HAVE_SYS_NDIR_H
19046# include <sys/ndir.h>
19047# endif /* SYSNDIR */
19048# ifdef HAVE_SYS_DIR_H
19049# include <sys/dir.h>
19050# endif /* SYSDIR */
19051# ifdef HAVE_NDIR_H
19052# include <ndir.h>
19053# endif
19054#endif /* HAVE_DIRENT_H */
19055
74091dd4
CR
19056"
19057if test "x$ac_cv_member_struct_dirent_d_fileno" = xyes
19058then :
d166f048 19059
74091dd4 19060printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h
d166f048 19061
74091dd4
CR
19062bash_cv_dirent_has_d_fileno=yes
19063else $as_nop
ac50fbac 19064 bash_cv_dirent_has_d_fileno=no
d166f048 19065fi
74091dd4
CR
19066
19067
d166f048
JA
19068fi
19069
74091dd4
CR
19070{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5
19071printf "%s\n" "$bash_cv_dirent_has_d_fileno" >&6; }
d166f048 19072if test $bash_cv_dirent_has_d_fileno = yes; then
74091dd4 19073printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h
b80f6443
JA
19074
19075fi
19076
19077
74091dd4
CR
19078{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_namlen" >&5
19079printf %s "checking for struct dirent.d_namlen... " >&6; }
19080if test ${bash_cv_dirent_has_d_namlen+y}
19081then :
19082 printf %s "(cached) " >&6
19083else $as_nop
19084
b80f6443 19085
74091dd4 19086ac_fn_c_check_member "$LINENO" "struct dirent" "d_namlen" "ac_cv_member_struct_dirent_d_namlen" "
b80f6443
JA
19087#include <stdio.h>
19088#include <sys/types.h>
19089#ifdef HAVE_UNISTD_H
19090# include <unistd.h>
19091#endif /* HAVE_UNISTD_H */
19092#if defined(HAVE_DIRENT_H)
19093# include <dirent.h>
19094#else
19095# define dirent direct
19096# ifdef HAVE_SYS_NDIR_H
19097# include <sys/ndir.h>
19098# endif /* SYSNDIR */
19099# ifdef HAVE_SYS_DIR_H
19100# include <sys/dir.h>
19101# endif /* SYSDIR */
19102# ifdef HAVE_NDIR_H
19103# include <ndir.h>
19104# endif
19105#endif /* HAVE_DIRENT_H */
19106
74091dd4
CR
19107"
19108if test "x$ac_cv_member_struct_dirent_d_namlen" = xyes
19109then :
b80f6443 19110
74091dd4 19111printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h
b80f6443 19112
74091dd4
CR
19113bash_cv_dirent_has_d_namlen=yes
19114else $as_nop
ac50fbac 19115 bash_cv_dirent_has_d_namlen=no
d166f048 19116fi
74091dd4
CR
19117
19118
b80f6443
JA
19119fi
19120
74091dd4
CR
19121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_namlen" >&5
19122printf "%s\n" "$bash_cv_dirent_has_d_namlen" >&6; }
b80f6443 19123if test $bash_cv_dirent_has_d_namlen = yes; then
74091dd4 19124printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h
d166f048 19125
b80f6443
JA
19126fi
19127
74091dd4
CR
19128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5
19129printf %s "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; }
19130if test ${bash_cv_struct_winsize_header+y}
19131then :
19132 printf %s "(cached) " >&6
19133else $as_nop
19134
19135if test ${bash_cv_struct_winsize_ioctl+y}
19136then :
19137 printf %s "(cached) " >&6
19138else $as_nop
ac50fbac 19139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19140/* end confdefs.h. */
74091dd4 19141
d166f048
JA
19142#include <sys/types.h>
19143#include <sys/ioctl.h>
74091dd4 19144
f73dda09 19145int
74091dd4 19146main (void)
f73dda09 19147{
74091dd4 19148
d166f048 19149struct winsize x;
74091dd4
CR
19150if (sizeof (x) > 0) return (0);
19151
f73dda09
JA
19152 ;
19153 return 0;
19154}
19155_ACEOF
74091dd4
CR
19156if ac_fn_c_try_compile "$LINENO"
19157then :
19158 bash_cv_struct_winsize_ioctl=yes
19159else $as_nop
19160 bash_cv_struct_winsize_ioctl=no
19161fi
19162rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19163
19164fi
19165
19166
19167if test ${bash_cv_struct_winsize_termios+y}
19168then :
19169 printf %s "(cached) " >&6
19170else $as_nop
ac50fbac 19171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19172/* end confdefs.h. */
74091dd4 19173
cce855bc 19174#include <sys/types.h>
74091dd4
CR
19175#include <sys/termios.h>
19176
f73dda09 19177int
74091dd4 19178main (void)
f73dda09 19179{
74091dd4 19180
cce855bc 19181struct winsize x;
74091dd4
CR
19182if (sizeof (x) > 0) return (0);
19183
f73dda09
JA
19184 ;
19185 return 0;
19186}
19187_ACEOF
74091dd4
CR
19188if ac_fn_c_try_compile "$LINENO"
19189then :
19190 bash_cv_struct_winsize_termios=yes
19191else $as_nop
19192 bash_cv_struct_winsize_termios=no
19193fi
19194rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19195
19196fi
19197
19198
19199
19200if test $bash_cv_struct_winsize_ioctl = yes; then
19201 bash_cv_struct_winsize_header=ioctl_h
19202elif test $bash_cv_struct_winsize_termios = yes; then
cce855bc 19203 bash_cv_struct_winsize_header=termios_h
d166f048 19204else
ac50fbac 19205 bash_cv_struct_winsize_header=other
cce855bc 19206fi
cce855bc 19207
d166f048
JA
19208fi
19209
cce855bc 19210if test $bash_cv_struct_winsize_header = ioctl_h; then
74091dd4
CR
19211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5
19212printf "%s\n" "sys/ioctl.h" >&6; }
19213 printf "%s\n" "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h
d166f048 19214
cce855bc 19215elif test $bash_cv_struct_winsize_header = termios_h; then
74091dd4
CR
19216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5
19217printf "%s\n" "termios.h" >&6; }
19218 printf "%s\n" "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h
d166f048 19219
0628567a 19220else
74091dd4
CR
19221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19222printf "%s\n" "not found" >&6; }
ac50fbac 19223fi
0628567a 19224
74091dd4
CR
19225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5
19226printf %s "checking for struct timeval in sys/time.h and time.h... " >&6; }
19227if test ${bash_cv_struct_timeval+y}
19228then :
19229 printf %s "(cached) " >&6
19230else $as_nop
ac50fbac
CR
19231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19232/* end confdefs.h. */
8868edaf
CR
19233#if HAVE_SYS_TIME_H
19234 #include <sys/time.h>
19235 #endif
19236 #include <time.h>
19237
19238int
74091dd4 19239main (void)
8868edaf
CR
19240{
19241static struct timeval x; x.tv_sec = x.tv_usec;
0628567a 19242
8868edaf
CR
19243 ;
19244 return 0;
19245}
0628567a 19246_ACEOF
74091dd4
CR
19247if ac_fn_c_try_compile "$LINENO"
19248then :
ac50fbac 19249 bash_cv_struct_timeval=yes
74091dd4 19250else $as_nop
ac50fbac
CR
19251 bash_cv_struct_timeval=no
19252fi
74091dd4 19253rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a 19254
0628567a 19255fi
3185942a 19256
74091dd4
CR
19257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timeval" >&5
19258printf "%s\n" "$bash_cv_struct_timeval" >&6; }
ac50fbac 19259if test $bash_cv_struct_timeval = yes; then
74091dd4 19260 printf "%s\n" "#define HAVE_TIMEVAL 1" >>confdefs.h
ac50fbac 19261
7117c2d2 19262fi
ac50fbac
CR
19263
19264ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
74091dd4
CR
19265if test "x$ac_cv_member_struct_stat_st_blocks" = xyes
19266then :
7117c2d2 19267
74091dd4 19268printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLOCKS 1" >>confdefs.h
b80f6443 19269
7117c2d2
JA
19270
19271fi
19272
74091dd4
CR
19273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
19274printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
19275if test ${ac_cv_struct_tm+y}
19276then :
19277 printf %s "(cached) " >&6
19278else $as_nop
ac50fbac 19279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3185942a 19280/* end confdefs.h. */
ac50fbac 19281#include <sys/types.h>
3185942a
JA
19282#include <time.h>
19283
19284int
74091dd4 19285main (void)
3185942a 19286{
ac50fbac
CR
19287struct tm tm;
19288 int *p = &tm.tm_sec;
19289 return !p;
3185942a
JA
19290 ;
19291 return 0;
19292}
19293_ACEOF
74091dd4
CR
19294if ac_fn_c_try_compile "$LINENO"
19295then :
ac50fbac 19296 ac_cv_struct_tm=time.h
74091dd4 19297else $as_nop
ac50fbac 19298 ac_cv_struct_tm=sys/time.h
3185942a 19299fi
74091dd4 19300rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a 19301fi
74091dd4
CR
19302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
19303printf "%s\n" "$ac_cv_struct_tm" >&6; }
ac50fbac
CR
19304if test $ac_cv_struct_tm = sys/time.h; then
19305
74091dd4 19306printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
ac50fbac
CR
19307
19308fi
19309
19310ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
19311#include <$ac_cv_struct_tm>
19312
19313"
74091dd4
CR
19314if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
19315then :
3185942a 19316
74091dd4 19317printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
3185942a
JA
19318
19319
ac50fbac 19320fi
3185942a 19321
ac50fbac
CR
19322if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19323
74091dd4 19324printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
3185942a 19325
ac50fbac 19326else
74091dd4
CR
19327 ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
19328" "$ac_c_undeclared_builtin_options" "CFLAGS"
19329if test "x$ac_cv_have_decl_tzname" = xyes
19330then :
ac50fbac 19331 ac_have_decl=1
74091dd4 19332else $as_nop
ac50fbac 19333 ac_have_decl=0
3185942a 19334fi
74091dd4 19335printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
3185942a 19336
74091dd4
CR
19337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
19338printf %s "checking for tzname... " >&6; }
19339if test ${ac_cv_var_tzname+y}
19340then :
19341 printf %s "(cached) " >&6
19342else $as_nop
ac50fbac 19343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19344/* end confdefs.h. */
7117c2d2 19345#include <time.h>
3185942a
JA
19346#if !HAVE_DECL_TZNAME
19347extern char *tzname[];
7117c2d2
JA
19348#endif
19349
19350int
74091dd4 19351main (void)
7117c2d2 19352{
3185942a 19353return tzname[0][0];
7117c2d2
JA
19354 ;
19355 return 0;
19356}
19357_ACEOF
74091dd4
CR
19358if ac_fn_c_try_link "$LINENO"
19359then :
7117c2d2 19360 ac_cv_var_tzname=yes
74091dd4 19361else $as_nop
ac50fbac 19362 ac_cv_var_tzname=no
7117c2d2 19363fi
74091dd4 19364rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 19365 conftest$ac_exeext conftest.$ac_ext
7117c2d2 19366fi
74091dd4
CR
19367{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
19368printf "%s\n" "$ac_cv_var_tzname" >&6; }
7117c2d2
JA
19369 if test $ac_cv_var_tzname = yes; then
19370
74091dd4 19371printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
7117c2d2
JA
19372
19373 fi
19374fi
19375
74091dd4
CR
19376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timezone in sys/time.h and time.h" >&5
19377printf %s "checking for struct timezone in sys/time.h and time.h... " >&6; }
19378if test ${bash_cv_struct_timezone+y}
19379then :
19380 printf %s "(cached) " >&6
19381else $as_nop
b80f6443 19382
ac50fbac 19383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19384/* end confdefs.h. */
b80f6443
JA
19385#include <sys/time.h>
19386
19387_ACEOF
19388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
19389 $EGREP "struct timezone" >/dev/null 2>&1
19390then :
b80f6443 19391 bash_cv_struct_timezone=yes
74091dd4 19392else $as_nop
ac50fbac 19393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19394/* end confdefs.h. */
b80f6443
JA
19395#include <time.h>
19396
19397_ACEOF
19398if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
19399 $EGREP "struct timezone" >/dev/null 2>&1
19400then :
b80f6443 19401 bash_cv_struct_timezone=yes
74091dd4 19402else $as_nop
b80f6443
JA
19403 bash_cv_struct_timezone=no
19404fi
74091dd4 19405rm -rf conftest*
b80f6443
JA
19406
19407fi
74091dd4 19408rm -rf conftest*
b80f6443
JA
19409
19410
19411fi
19412
74091dd4
CR
19413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timezone" >&5
19414printf "%s\n" "$bash_cv_struct_timezone" >&6; }
b80f6443 19415if test $bash_cv_struct_timezone = yes; then
74091dd4 19416 printf "%s\n" "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h
b80f6443
JA
19417
19418fi
19419
19420
74091dd4
CR
19421{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for offset of exit status in return status from wait" >&5
19422printf %s "checking for offset of exit status in return status from wait... " >&6; }
19423if test ${bash_cv_wexitstatus_offset+y}
19424then :
19425 printf %s "(cached) " >&6
19426else $as_nop
19427 if test "$cross_compiling" = yes
19428then :
19429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&5
19430printf "%s\n" "$as_me: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&2;}
495aee44
CR
19431 bash_cv_wexitstatus_offset=0
19432
74091dd4 19433else $as_nop
ac50fbac
CR
19434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19435/* end confdefs.h. */
495aee44
CR
19436
19437#include <stdlib.h>
19438#include <unistd.h>
19439
19440#include <sys/wait.h>
19441
8868edaf 19442int
495aee44
CR
19443main(c, v)
19444 int c;
19445 char **v;
19446{
19447 pid_t pid, p;
19448 int s, i, n;
19449
19450 s = 0;
19451 pid = fork();
19452 if (pid == 0)
19453 exit (42);
19454
19455 /* wait for the process */
19456 p = wait(&s);
19457 if (p != pid)
19458 exit (255);
19459
19460 /* crack s */
8868edaf 19461 for (i = 0; i < (sizeof(s) * 8); i++)
495aee44
CR
19462 {
19463 n = (s >> i) & 0xff;
19464 if (n == 42)
19465 exit (i);
19466 }
19467
19468 exit (254);
19469}
19470
19471_ACEOF
74091dd4
CR
19472if ac_fn_c_try_run "$LINENO"
19473then :
495aee44 19474 bash_cv_wexitstatus_offset=0
74091dd4 19475else $as_nop
ac50fbac
CR
19476 bash_cv_wexitstatus_offset=$?
19477fi
19478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19479 conftest.$ac_objext conftest.beam conftest.$ac_ext
19480fi
19481
19482fi
19483
19484if test "$bash_cv_wexitstatus_offset" -gt 32 ; then
74091dd4
CR
19485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: bad exit status from test program -- defaulting to 0" >&5
19486printf "%s\n" "$as_me: WARNING: bad exit status from test program -- defaulting to 0" >&2;}
ac50fbac
CR
19487 bash_cv_wexitstatus_offset=0
19488fi
74091dd4
CR
19489{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wexitstatus_offset" >&5
19490printf "%s\n" "$bash_cv_wexitstatus_offset" >&6; }
ac50fbac 19491
74091dd4 19492printf "%s\n" "#define WEXITSTATUS_OFFSET $bash_cv_wexitstatus_offset" >>confdefs.h
ac50fbac
CR
19493
19494
19495
19496
19497
74091dd4
CR
19498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
19499printf %s "checking for struct timespec in <time.h>... " >&6; }
19500if test ${bash_cv_sys_struct_timespec_in_time_h+y}
19501then :
19502 printf %s "(cached) " >&6
19503else $as_nop
ac50fbac
CR
19504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19505/* end confdefs.h. */
19506#include <time.h>
19507
19508int
74091dd4 19509main (void)
ac50fbac
CR
19510{
19511static struct timespec x; x.tv_sec = x.tv_nsec;
19512 ;
19513 return 0;
19514}
19515_ACEOF
74091dd4
CR
19516if ac_fn_c_try_compile "$LINENO"
19517then :
ac50fbac 19518 bash_cv_sys_struct_timespec_in_time_h=yes
74091dd4 19519else $as_nop
ac50fbac
CR
19520 bash_cv_sys_struct_timespec_in_time_h=no
19521fi
74091dd4 19522rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 19523fi
74091dd4
CR
19524{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_time_h" >&5
19525printf "%s\n" "$bash_cv_sys_struct_timespec_in_time_h" >&6; }
ac50fbac
CR
19526
19527 HAVE_STRUCT_TIMESPEC=0
19528 TIME_H_DEFINES_STRUCT_TIMESPEC=0
19529 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
19530 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
19531 if test $bash_cv_sys_struct_timespec_in_time_h = yes; then
74091dd4 19532 printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
ac50fbac 19533
74091dd4 19534 printf "%s\n" "#define TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
ac50fbac
CR
19535
19536 TIME_H_DEFINES_STRUCT_TIMESPEC=1
19537 else
74091dd4
CR
19538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
19539printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
19540if test ${bash_cv_sys_struct_timespec_in_sys_time_h+y}
19541then :
19542 printf %s "(cached) " >&6
19543else $as_nop
ac50fbac
CR
19544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19545/* end confdefs.h. */
19546#include <sys/time.h>
19547
19548int
74091dd4 19549main (void)
ac50fbac
CR
19550{
19551static struct timespec x; x.tv_sec = x.tv_nsec;
19552 ;
19553 return 0;
19554}
19555_ACEOF
74091dd4
CR
19556if ac_fn_c_try_compile "$LINENO"
19557then :
ac50fbac 19558 bash_cv_sys_struct_timespec_in_sys_time_h=yes
74091dd4 19559else $as_nop
ac50fbac
CR
19560 bash_cv_sys_struct_timespec_in_sys_time_h=no
19561fi
74091dd4 19562rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 19563fi
74091dd4
CR
19564{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_sys_time_h" >&5
19565printf "%s\n" "$bash_cv_sys_struct_timespec_in_sys_time_h" >&6; }
ac50fbac
CR
19566 if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then
19567 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
74091dd4 19568 printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
ac50fbac 19569
74091dd4 19570 printf "%s\n" "#define SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
ac50fbac
CR
19571
19572 else
74091dd4
CR
19573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
19574printf %s "checking for struct timespec in <pthread.h>... " >&6; }
19575if test ${bash_cv_sys_struct_timespec_in_pthread_h+y}
19576then :
19577 printf %s "(cached) " >&6
19578else $as_nop
ac50fbac
CR
19579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19580/* end confdefs.h. */
19581#include <pthread.h>
19582
19583int
74091dd4 19584main (void)
ac50fbac
CR
19585{
19586static struct timespec x; x.tv_sec = x.tv_nsec;
19587 ;
19588 return 0;
19589}
19590_ACEOF
74091dd4
CR
19591if ac_fn_c_try_compile "$LINENO"
19592then :
ac50fbac 19593 bash_cv_sys_struct_timespec_in_pthread_h=yes
74091dd4 19594else $as_nop
ac50fbac
CR
19595 bash_cv_sys_struct_timespec_in_pthread_h=no
19596fi
74091dd4 19597rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 19598fi
74091dd4
CR
19599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_pthread_h" >&5
19600printf "%s\n" "$bash_cv_sys_struct_timespec_in_pthread_h" >&6; }
ac50fbac
CR
19601 if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then
19602 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
74091dd4 19603 printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
ac50fbac 19604
74091dd4 19605 printf "%s\n" "#define PTHREAD_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h
ac50fbac
CR
19606
19607 fi
19608 fi
19609 fi
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619 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>
19620 #include <sys/stat.h>
19621"
74091dd4
CR
19622if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
19623then :
ac50fbac 19624
74091dd4 19625printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
ac50fbac 19626
74091dd4
CR
19627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
19628printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
19629if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
19630then :
19631 printf %s "(cached) " >&6
19632else $as_nop
ac50fbac
CR
19633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19634/* end confdefs.h. */
19635
19636 #include <sys/types.h>
19637 #include <sys/stat.h>
19638 #if HAVE_SYS_TIME_H
19639 # include <sys/time.h>
19640 #endif
19641 #include <time.h>
19642 struct timespec ts;
19643 struct stat st;
19644
19645int
74091dd4 19646main (void)
ac50fbac
CR
19647{
19648
19649 st.st_atim = ts;
19650
19651 ;
19652 return 0;
19653}
19654_ACEOF
74091dd4
CR
19655if ac_fn_c_try_compile "$LINENO"
19656then :
ac50fbac 19657 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
74091dd4 19658else $as_nop
ac50fbac
CR
19659 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
19660fi
74091dd4 19661rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac50fbac 19662fi
74091dd4
CR
19663{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
19664printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
ac50fbac
CR
19665 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
19666
74091dd4 19667printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
ac50fbac
CR
19668
19669 fi
74091dd4 19670else $as_nop
ac50fbac
CR
19671 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>
19672 #include <sys/stat.h>
19673"
74091dd4
CR
19674if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
19675then :
ac50fbac 19676
74091dd4 19677printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
ac50fbac
CR
19678
19679
74091dd4 19680else $as_nop
ac50fbac
CR
19681 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
19682 #include <sys/stat.h>
19683"
74091dd4
CR
19684if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
19685then :
ac50fbac 19686
74091dd4 19687printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
ac50fbac
CR
19688
19689
74091dd4 19690else $as_nop
ac50fbac
CR
19691 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>
19692 #include <sys/stat.h>
19693"
74091dd4
CR
19694if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
19695then :
495aee44 19696
74091dd4 19697printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
495aee44
CR
19698
19699
19700fi
19701
495aee44 19702fi
495aee44 19703
ac50fbac
CR
19704fi
19705
19706fi
495aee44
CR
19707
19708
19709
d233b485 19710
74091dd4
CR
19711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sbrk" >&5
19712printf %s "checking for sbrk... " >&6; }
19713 if test ${ac_cv_func_sbrk+y}
19714then :
19715 printf %s "(cached) " >&6
19716else $as_nop
8868edaf
CR
19717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19718/* end confdefs.h. */
19719#include <unistd.h>
19720int
74091dd4 19721main (void)
8868edaf
CR
19722{
19723 void *x = sbrk (4096);
19724 ;
19725 return 0;
19726}
19727_ACEOF
74091dd4
CR
19728if ac_fn_c_try_link "$LINENO"
19729then :
8868edaf 19730 ac_cv_func_sbrk=yes
74091dd4 19731else $as_nop
8868edaf
CR
19732 ac_cv_func_sbrk=no
19733fi
74091dd4 19734rm -f core conftest.err conftest.$ac_objext conftest.beam \
8868edaf
CR
19735 conftest$ac_exeext conftest.$ac_ext
19736fi
d233b485 19737
74091dd4
CR
19738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sbrk" >&5
19739printf "%s\n" "$ac_cv_func_sbrk" >&6; }
d233b485 19740 if test X$ac_cv_func_sbrk = Xyes; then
74091dd4
CR
19741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sbrk" >&5
19742printf %s "checking for working sbrk... " >&6; }
19743if test ${bash_cv_func_sbrk+y}
19744then :
19745 printf %s "(cached) " >&6
19746else $as_nop
19747 if test "$cross_compiling" = yes
19748then :
19749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check working sbrk if cross-compiling" >&5
19750printf "%s\n" "$as_me: WARNING: cannot check working sbrk if cross-compiling" >&2;}
d233b485
CR
19751 bash_cv_func_sbrk=yes
19752
74091dd4 19753else $as_nop
d233b485
CR
19754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19755/* end confdefs.h. */
19756
19757#include <stdlib.h>
19758#include <unistd.h>
19759
19760int
19761main(int c, char **v)
19762{
19763 void *x;
19764
19765 x = sbrk (4096);
19766 exit ((x == (void *)-1) ? 1 : 0);
19767}
19768
19769_ACEOF
74091dd4
CR
19770if ac_fn_c_try_run "$LINENO"
19771then :
d233b485 19772 bash_cv_func_sbrk=yes
74091dd4
CR
19773else $as_nop
19774 bash_cv_func_sbrk=no
d233b485
CR
19775fi
19776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19777 conftest.$ac_objext conftest.beam conftest.$ac_ext
19778fi
19779
19780fi
74091dd4
CR
19781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sbrk" >&5
19782printf "%s\n" "$bash_cv_func_sbrk" >&6; }
d233b485
CR
19783 if test $bash_cv_func_sbrk = no; then
19784 ac_cv_func_sbrk=no
19785 fi
19786 fi
8868edaf 19787 if test $ac_cv_func_sbrk = yes; then
d233b485 19788
74091dd4 19789printf "%s\n" "#define HAVE_SBRK 1" >>confdefs.h
d233b485
CR
19790
19791 fi
19792
19793
74091dd4
CR
19794{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5
19795printf %s "checking for the existence of strsignal... " >&6; }
19796if test ${bash_cv_have_strsignal+y}
19797then :
19798 printf %s "(cached) " >&6
19799else $as_nop
ac50fbac 19800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19801/* end confdefs.h. */
ccc6cda3
JA
19802#include <sys/types.h>
19803#include <signal.h>
8868edaf 19804#include <string.h>
f73dda09 19805int
74091dd4 19806main (void)
f73dda09 19807{
ccc6cda3 19808char *s = (char *)strsignal(2);
f73dda09
JA
19809 ;
19810 return 0;
19811}
19812_ACEOF
74091dd4
CR
19813if ac_fn_c_try_link "$LINENO"
19814then :
ccc6cda3 19815 bash_cv_have_strsignal=yes
74091dd4 19816else $as_nop
ac50fbac 19817 bash_cv_have_strsignal=no
ccc6cda3 19818fi
74091dd4 19819rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 19820 conftest$ac_exeext conftest.$ac_ext
ccc6cda3
JA
19821fi
19822
74091dd4
CR
19823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_strsignal" >&5
19824printf "%s\n" "$bash_cv_have_strsignal" >&6; }
ccc6cda3 19825if test $bash_cv_have_strsignal = yes; then
74091dd4 19826printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
ccc6cda3
JA
19827
19828fi
19829
74091dd4
CR
19830{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if opendir() opens non-directories" >&5
19831printf %s "checking if opendir() opens non-directories... " >&6; }
19832if test ${bash_cv_opendir_not_robust+y}
19833then :
19834 printf %s "(cached) " >&6
19835else $as_nop
19836 if test "$cross_compiling" = yes
19837then :
19838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5
19839printf "%s\n" "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
19840 bash_cv_opendir_not_robust=no
19841
74091dd4 19842else $as_nop
ac50fbac 19843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19844/* end confdefs.h. */
ccc6cda3
JA
19845
19846#include <stdio.h>
19847#include <sys/types.h>
19848#include <fcntl.h>
19849#ifdef HAVE_UNISTD_H
19850# include <unistd.h>
19851#endif /* HAVE_UNISTD_H */
8868edaf
CR
19852#ifdef HAVE_SYS_STAT_H
19853#include <sys/stat.h>
19854#endif
ccc6cda3
JA
19855#if defined(HAVE_DIRENT_H)
19856# include <dirent.h>
19857#else
19858# define dirent direct
19859# ifdef HAVE_SYS_NDIR_H
19860# include <sys/ndir.h>
19861# endif /* SYSNDIR */
19862# ifdef HAVE_SYS_DIR_H
19863# include <sys/dir.h>
19864# endif /* SYSDIR */
19865# ifdef HAVE_NDIR_H
19866# include <ndir.h>
19867# endif
19868#endif /* HAVE_DIRENT_H */
8868edaf
CR
19869#include <stdlib.h>
19870int
ccc6cda3
JA
19871main()
19872{
19873DIR *dir;
bb70624e 19874int fd, err;
3185942a 19875err = mkdir("bash-aclocal", 0700);
bb70624e
JA
19876if (err < 0) {
19877 perror("mkdir");
19878 exit(1);
19879}
3185942a
JA
19880unlink("bash-aclocal/not_a_directory");
19881fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
ccc6cda3
JA
19882write(fd, "\n", 1);
19883close(fd);
3185942a
JA
19884dir = opendir("bash-aclocal/not_a_directory");
19885unlink("bash-aclocal/not_a_directory");
19886rmdir("bash-aclocal");
ccc6cda3
JA
19887exit (dir == 0);
19888}
74091dd4 19889
f73dda09 19890_ACEOF
74091dd4
CR
19891if ac_fn_c_try_run "$LINENO"
19892then :
ccc6cda3 19893 bash_cv_opendir_not_robust=yes
74091dd4 19894else $as_nop
ac50fbac 19895 bash_cv_opendir_not_robust=no
ccc6cda3 19896fi
ac50fbac
CR
19897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19898 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 19899fi
3185942a 19900
ccc6cda3
JA
19901fi
19902
74091dd4
CR
19903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_opendir_not_robust" >&5
19904printf "%s\n" "$bash_cv_opendir_not_robust" >&6; }
ccc6cda3 19905if test $bash_cv_opendir_not_robust = yes; then
74091dd4 19906printf "%s\n" "#define OPENDIR_NOT_ROBUST 1" >>confdefs.h
ccc6cda3
JA
19907
19908fi
19909
74091dd4
CR
19910{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ulimit can substitute for getdtablesize" >&5
19911printf %s "checking whether ulimit can substitute for getdtablesize... " >&6; }
19912if test ${bash_cv_ulimit_maxfds+y}
19913then :
19914 printf %s "(cached) " >&6
19915else $as_nop
19916 if test "$cross_compiling" = yes
19917then :
19918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5
19919printf "%s\n" "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
19920 bash_cv_ulimit_maxfds=no
19921
74091dd4 19922else $as_nop
ac50fbac 19923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19924/* end confdefs.h. */
ccc6cda3 19925
8868edaf
CR
19926#include <stdlib.h>
19927#ifdef HAVE_ULIMIT_H
19928#include <ulimit.h>
19929#endif
19930int
ccc6cda3
JA
19931main()
19932{
19933long maxfds = ulimit(4, 0L);
19934exit (maxfds == -1L);
19935}
19936
f73dda09 19937_ACEOF
74091dd4
CR
19938if ac_fn_c_try_run "$LINENO"
19939then :
ccc6cda3 19940 bash_cv_ulimit_maxfds=yes
74091dd4 19941else $as_nop
ac50fbac 19942 bash_cv_ulimit_maxfds=no
3185942a 19943fi
ac50fbac
CR
19944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19945 conftest.$ac_objext conftest.beam conftest.$ac_ext
3185942a
JA
19946fi
19947
3185942a
JA
19948fi
19949
74091dd4
CR
19950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_ulimit_maxfds" >&5
19951printf "%s\n" "$bash_cv_ulimit_maxfds" >&6; }
3185942a 19952if test $bash_cv_ulimit_maxfds = yes; then
74091dd4 19953printf "%s\n" "#define ULIMIT_MAXFDS 1" >>confdefs.h
3185942a
JA
19954
19955fi
19956
19957
19958
19959
19960
19961
74091dd4
CR
19962 ac_fn_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
19963" "$ac_c_undeclared_builtin_options" "CFLAGS"
19964if test "x$ac_cv_have_decl_fpurge" = xyes
19965then :
ac50fbac 19966 ac_have_decl=1
74091dd4 19967else $as_nop
ac50fbac 19968 ac_have_decl=0
ccc6cda3 19969fi
74091dd4 19970printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h
ccc6cda3 19971
3185942a 19972
74091dd4
CR
19973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if getenv can be redefined" >&5
19974printf %s "checking to see if getenv can be redefined... " >&6; }
19975if test ${bash_cv_getenv_redef+y}
19976then :
19977 printf %s "(cached) " >&6
19978else $as_nop
19979 if test "$cross_compiling" = yes
19980then :
19981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5
19982printf "%s\n" "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;}
cce855bc
JA
19983 bash_cv_getenv_redef=yes
19984
74091dd4 19985else $as_nop
ac50fbac 19986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 19987/* end confdefs.h. */
ccc6cda3
JA
19988
19989#ifdef HAVE_UNISTD_H
19990# include <unistd.h>
19991#endif
8868edaf 19992#include <stdlib.h>
ccc6cda3
JA
19993#ifndef __STDC__
19994# ifndef const
19995# define const
19996# endif
19997#endif
19998char *
19999getenv (name)
20000#if defined (__linux__) || defined (__bsdi__) || defined (convex)
20001 const char *name;
20002#else
20003 char const *name;
20004#endif /* !__linux__ && !__bsdi__ && !convex */
20005{
20006return "42";
20007}
8868edaf 20008int
ccc6cda3
JA
20009main()
20010{
20011char *s;
20012/* The next allows this program to run, but does not allow bash to link
20013 when it redefines getenv. I'm not really interested in figuring out
20014 why not. */
20015#if defined (NeXT)
20016exit(1);
20017#endif
20018s = getenv("ABCDE");
20019exit(s == 0); /* force optimizer to leave getenv in */
20020}
20021
f73dda09 20022_ACEOF
74091dd4
CR
20023if ac_fn_c_try_run "$LINENO"
20024then :
ccc6cda3 20025 bash_cv_getenv_redef=yes
74091dd4 20026else $as_nop
ac50fbac 20027 bash_cv_getenv_redef=no
ccc6cda3 20028fi
ac50fbac
CR
20029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20030 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 20031fi
3185942a 20032
ccc6cda3
JA
20033fi
20034
74091dd4
CR
20035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getenv_redef" >&5
20036printf "%s\n" "$bash_cv_getenv_redef" >&6; }
ccc6cda3 20037if test $bash_cv_getenv_redef = yes; then
74091dd4 20038printf "%s\n" "#define CAN_REDEFINE_GETENV 1" >>confdefs.h
ccc6cda3
JA
20039
20040fi
20041
7117c2d2 20042if test "$ac_cv_func_getcwd" = "yes"; then
74091dd4
CR
20043{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getcwd() will dynamically allocate memory with 0 size" >&5
20044printf %s "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; }
20045if test ${bash_cv_getcwd_malloc+y}
20046then :
20047 printf %s "(cached) " >&6
20048else $as_nop
20049 if test "$cross_compiling" = yes
20050then :
20051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5
20052printf "%s\n" "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;}
b80f6443 20053 bash_cv_getcwd_malloc=no
cce855bc 20054
74091dd4 20055else $as_nop
ac50fbac 20056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20057/* end confdefs.h. */
ccc6cda3
JA
20058
20059#include <stdio.h>
20060#ifdef HAVE_UNISTD_H
20061#include <unistd.h>
20062#endif
8868edaf 20063#include <stdlib.h>
ccc6cda3 20064
8868edaf 20065int
ccc6cda3
JA
20066main()
20067{
b80f6443
JA
20068 char *xpwd;
20069 xpwd = getcwd(0, 0);
20070 exit (xpwd == 0);
ccc6cda3
JA
20071}
20072
f73dda09 20073_ACEOF
74091dd4
CR
20074if ac_fn_c_try_run "$LINENO"
20075then :
b80f6443 20076 bash_cv_getcwd_malloc=yes
74091dd4 20077else $as_nop
ac50fbac 20078 bash_cv_getcwd_malloc=no
ccc6cda3 20079fi
ac50fbac
CR
20080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20081 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 20082fi
3185942a 20083
ccc6cda3
JA
20084fi
20085
74091dd4
CR
20086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getcwd_malloc" >&5
20087printf "%s\n" "$bash_cv_getcwd_malloc" >&6; }
b80f6443 20088if test $bash_cv_getcwd_malloc = no; then
74091dd4 20089printf "%s\n" "#define GETCWD_BROKEN 1" >>confdefs.h
ccc6cda3 20090
3185942a 20091case " $LIBOBJS " in
0628567a 20092 *" getcwd.$ac_objext "* ) ;;
3185942a
JA
20093 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
20094 ;;
0628567a
JA
20095esac
20096
ccc6cda3
JA
20097fi
20098
ccc6cda3
JA
20099fi
20100
74091dd4
CR
20101{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
20102printf %s "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; }
20103if test ${bash_cv_func_sigsetjmp+y}
20104then :
20105 printf %s "(cached) " >&6
20106else $as_nop
20107 if test "$cross_compiling" = yes
20108then :
20109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to $bash_cv_posix_signals" >&5
20110printf "%s\n" "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to $bash_cv_posix_signals" >&2;}
20111 if test "$bash_cv_posix_signals" = "yes" ; then
20112 bash_cv_func_sigsetjmp=present
20113 else
20114 bash_cv_func_sigsetjmp=missing
20115 fi
cce855bc 20116
74091dd4 20117else $as_nop
ac50fbac 20118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20119/* end confdefs.h. */
ccc6cda3
JA
20120
20121#ifdef HAVE_UNISTD_H
20122#include <unistd.h>
20123#endif
20124#include <sys/types.h>
20125#include <signal.h>
20126#include <setjmp.h>
8868edaf 20127#include <stdlib.h>
ccc6cda3 20128
8868edaf 20129int
ccc6cda3
JA
20130main()
20131{
20132#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
20133exit (1);
20134#else
20135
20136int code;
74091dd4 20137sigset_t set, oset, nset;
ccc6cda3
JA
20138sigjmp_buf xx;
20139
20140/* get the mask */
20141sigemptyset(&set);
20142sigemptyset(&oset);
74091dd4 20143
ccc6cda3 20144sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
74091dd4
CR
20145/* paranoia -- make sure SIGINT is not blocked */
20146sigdelset (&oset, SIGINT);
20147sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL);
ccc6cda3
JA
20148
20149/* save it */
20150code = sigsetjmp(xx, 1);
20151if (code)
74091dd4
CR
20152{
20153 sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &nset);
20154 /* could compare nset to oset here, but we just look for SIGINT */
20155 if (sigismember (&nset, SIGINT))
20156 exit(1);
20157 exit(0);
20158}
ccc6cda3 20159
74091dd4 20160/* change it so that SIGINT is blocked */
ccc6cda3
JA
20161sigaddset(&set, SIGINT);
20162sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
20163
20164/* and siglongjmp */
20165siglongjmp(xx, 10);
20166exit(1);
20167#endif
20168}
74091dd4 20169
f73dda09 20170_ACEOF
74091dd4
CR
20171if ac_fn_c_try_run "$LINENO"
20172then :
ccc6cda3 20173 bash_cv_func_sigsetjmp=present
74091dd4 20174else $as_nop
ac50fbac 20175 bash_cv_func_sigsetjmp=missing
ccc6cda3 20176fi
ac50fbac
CR
20177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20178 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 20179fi
3185942a 20180
ccc6cda3
JA
20181fi
20182
74091dd4
CR
20183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5
20184printf "%s\n" "$bash_cv_func_sigsetjmp" >&6; }
ccc6cda3 20185if test $bash_cv_func_sigsetjmp = present; then
74091dd4 20186printf "%s\n" "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h
ccc6cda3
JA
20187
20188fi
20189
74091dd4
CR
20190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5
20191printf %s "checking whether or not strcoll and strcmp differ... " >&6; }
20192if test ${bash_cv_func_strcoll_broken+y}
20193then :
20194 printf %s "(cached) " >&6
20195else $as_nop
20196 if test "$cross_compiling" = yes
20197then :
20198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5
20199printf "%s\n" "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
20200 bash_cv_func_strcoll_broken=no
20201
74091dd4 20202else $as_nop
ac50fbac 20203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20204/* end confdefs.h. */
d166f048
JA
20205
20206#include <stdio.h>
20207#if defined (HAVE_LOCALE_H)
20208#include <locale.h>
20209#endif
8868edaf
CR
20210#include <string.h>
20211#include <stdlib.h>
d166f048 20212
8868edaf 20213int
d166f048
JA
20214main(c, v)
20215int c;
20216char *v[];
20217{
20218 int r1, r2;
20219 char *deflocale, *defcoll;
20220
20221#ifdef HAVE_SETLOCALE
20222 deflocale = setlocale(LC_ALL, "");
20223 defcoll = setlocale(LC_COLLATE, "");
20224#endif
20225
20226#ifdef HAVE_STRCOLL
20227 /* These two values are taken from tests/glob-test. */
20228 r1 = strcoll("abd", "aXd");
20229#else
20230 r1 = 0;
20231#endif
20232 r2 = strcmp("abd", "aXd");
20233
20234 /* These two should both be greater than 0. It is permissible for
20235 a system to return different values, as long as the sign is the
20236 same. */
20237
20238 /* Exit with 1 (failure) if these two values are both > 0, since
20239 this tests whether strcoll(3) is broken with respect to strcmp(3)
20240 in the default locale. */
20241 exit (r1 > 0 && r2 > 0);
20242}
20243
f73dda09 20244_ACEOF
74091dd4
CR
20245if ac_fn_c_try_run "$LINENO"
20246then :
d166f048 20247 bash_cv_func_strcoll_broken=yes
74091dd4 20248else $as_nop
ac50fbac 20249 bash_cv_func_strcoll_broken=no
d166f048 20250fi
ac50fbac
CR
20251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20252 conftest.$ac_objext conftest.beam conftest.$ac_ext
d166f048 20253fi
3185942a 20254
d166f048
JA
20255fi
20256
74091dd4
CR
20257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5
20258printf "%s\n" "$bash_cv_func_strcoll_broken" >&6; }
d166f048 20259if test $bash_cv_func_strcoll_broken = yes; then
74091dd4 20260printf "%s\n" "#define STRCOLL_BROKEN 1" >>confdefs.h
d166f048
JA
20261
20262fi
20263
b80f6443
JA
20264
20265
0001803f 20266
0001803f 20267 if test X$ac_cv_func_snprintf = Xyes; then
74091dd4
CR
20268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant snprintf" >&5
20269printf %s "checking for standard-conformant snprintf... " >&6; }
20270if test ${bash_cv_func_snprintf+y}
20271then :
20272 printf %s "(cached) " >&6
20273else $as_nop
20274 if test "$cross_compiling" = yes
20275then :
20276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard snprintf if cross-compiling" >&5
20277printf "%s\n" "$as_me: WARNING: cannot check standard snprintf if cross-compiling" >&2;}
0001803f
CR
20278 bash_cv_func_snprintf=yes
20279
74091dd4 20280else $as_nop
ac50fbac 20281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0001803f
CR
20282/* end confdefs.h. */
20283
20284#include <stdio.h>
8868edaf 20285#include <stdlib.h>
0001803f 20286
8868edaf 20287int
0001803f
CR
20288main()
20289{
20290 int n;
20291 n = snprintf (0, 0, "%s", "0123456");
20292 exit(n != 7);
20293}
20294
20295_ACEOF
74091dd4
CR
20296if ac_fn_c_try_run "$LINENO"
20297then :
0001803f 20298 bash_cv_func_snprintf=yes
74091dd4 20299else $as_nop
ac50fbac 20300 bash_cv_func_snprintf=no
0001803f 20301fi
ac50fbac
CR
20302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20303 conftest.$ac_objext conftest.beam conftest.$ac_ext
0001803f
CR
20304fi
20305
0001803f 20306fi
74091dd4
CR
20307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_snprintf" >&5
20308printf "%s\n" "$bash_cv_func_snprintf" >&6; }
0001803f
CR
20309 if test $bash_cv_func_snprintf = no; then
20310 ac_cv_func_snprintf=no
20311 fi
20312 fi
20313 if test $ac_cv_func_snprintf = no; then
20314
74091dd4 20315printf "%s\n" "#define HAVE_SNPRINTF 0" >>confdefs.h
0001803f
CR
20316
20317 fi
20318
20319
20320
20321
0001803f 20322 if test X$ac_cv_func_vsnprintf = Xyes; then
74091dd4
CR
20323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant vsnprintf" >&5
20324printf %s "checking for standard-conformant vsnprintf... " >&6; }
20325if test ${bash_cv_func_vsnprintf+y}
20326then :
20327 printf %s "(cached) " >&6
20328else $as_nop
20329 if test "$cross_compiling" = yes
20330then :
20331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard vsnprintf if cross-compiling" >&5
20332printf "%s\n" "$as_me: WARNING: cannot check standard vsnprintf if cross-compiling" >&2;}
0001803f
CR
20333 bash_cv_func_vsnprintf=yes
20334
74091dd4 20335else $as_nop
ac50fbac 20336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0001803f
CR
20337/* end confdefs.h. */
20338
20339#if HAVE_STDARG_H
20340#include <stdarg.h>
20341#else
20342#include <varargs.h>
20343#endif
20344#include <stdio.h>
20345#include <stdlib.h>
20346
20347static int
20348#if HAVE_STDARG_H
20349foo(const char *fmt, ...)
20350#else
20351foo(format, va_alist)
20352 const char *format;
20353 va_dcl
20354#endif
20355{
20356 va_list args;
20357 int n;
20358
20359#if HAVE_STDARG_H
20360 va_start(args, fmt);
20361#else
20362 va_start(args);
20363#endif
20364 n = vsnprintf(0, 0, fmt, args);
20365 va_end (args);
20366 return n;
20367}
20368
8868edaf 20369int
0001803f
CR
20370main()
20371{
20372 int n;
20373 n = foo("%s", "0123456");
20374 exit(n != 7);
20375}
20376
20377_ACEOF
74091dd4
CR
20378if ac_fn_c_try_run "$LINENO"
20379then :
0001803f 20380 bash_cv_func_vsnprintf=yes
74091dd4 20381else $as_nop
ac50fbac 20382 bash_cv_func_vsnprintf=no
0001803f 20383fi
ac50fbac
CR
20384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20385 conftest.$ac_objext conftest.beam conftest.$ac_ext
0001803f
CR
20386fi
20387
0001803f 20388fi
74091dd4
CR
20389{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_vsnprintf" >&5
20390printf "%s\n" "$bash_cv_func_vsnprintf" >&6; }
0001803f
CR
20391 if test $bash_cv_func_vsnprintf = no; then
20392 ac_cv_func_vsnprintf=no
20393 fi
20394 fi
20395 if test $ac_cv_func_vsnprintf = no; then
20396
74091dd4 20397printf "%s\n" "#define HAVE_VSNPRINTF 0" >>confdefs.h
0001803f
CR
20398
20399 fi
20400
20401
20402
74091dd4
CR
20403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable strtoimax" >&5
20404printf %s "checking for usable strtoimax... " >&6; }
20405if test ${bash_cv_func_strtoimax+y}
20406then :
20407 printf %s "(cached) " >&6
20408else $as_nop
7117c2d2 20409
74091dd4 20410 HAVE_STRTOIMAX=0 HAVE_DECL_STRTOIMAX=0
b80f6443 20411
74091dd4
CR
20412 ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
20413if test "x$ac_cv_func_strtoimax" = xyes
20414then :
20415 printf "%s\n" "#define HAVE_STRTOIMAX 1" >>confdefs.h
b80f6443 20416
74091dd4
CR
20417fi
20418
20419 ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20420if test "x$ac_cv_have_decl_strtoimax" = xyes
20421then :
20422 ac_have_decl=1
20423else $as_nop
20424 ac_have_decl=0
20425fi
20426printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h
20427
20428
20429 if test "$ac_cv_func_strtoimax" = "yes" ; then
20430 HAVE_STRTOIMAX=1
20431 fi
20432 if test "$ac_cv_have_decl_strtoimax" = "yes" ; then
20433 HAVE_DECL_STRTOIMAX=1
20434 fi
20435
20436 if test "$HAVE_STRTOIMAX" = 0 || test "$HAVE_DECL_STRTOIMAX" = 0 ; then
20437 bash_cv_func_strtoimax=no REPLACE_STRTOIMAX=1
20438 else
20439 bash_cv_func_strtoimax=yes
20440 fi
20441
20442fi
20443
20444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strtoimax" >&5
20445printf "%s\n" "$bash_cv_func_strtoimax" >&6; }
da16dd1e 20446if test $bash_cv_func_strtoimax = no; then
74091dd4
CR
20447case " $LIBOBJS " in
20448 *" strtoimax.$ac_objext "* ) ;;
20449 *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext"
20450 ;;
20451esac
20452
20453fi
20454
20455
20456
20457if test "$ac_cv_func_putenv" = "yes"; then
20458
20459
20460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant putenv declaration" >&5
20461printf %s "checking for standard-conformant putenv declaration... " >&6; }
20462if test ${bash_cv_std_putenv+y}
20463then :
20464 printf %s "(cached) " >&6
20465else $as_nop
ac50fbac 20466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20467/* end confdefs.h. */
7117c2d2 20468
74091dd4 20469#if HAVE_STDLIB_H
7117c2d2 20470#include <stdlib.h>
74091dd4
CR
20471#endif
20472#if HAVE_STDDEF_H
7117c2d2
JA
20473#include <stddef.h>
20474#endif
20475#ifndef __STDC__
20476# ifndef const
20477# define const
20478# endif
20479#endif
20480#ifdef PROTOTYPES
20481extern int putenv (char *);
20482#else
20483extern int putenv ();
20484#endif
20485
20486int
74091dd4 20487main (void)
7117c2d2
JA
20488{
20489return (putenv == 0);
20490 ;
20491 return 0;
20492}
20493_ACEOF
74091dd4
CR
20494if ac_fn_c_try_link "$LINENO"
20495then :
7117c2d2 20496 bash_cv_std_putenv=yes
74091dd4 20497else $as_nop
ac50fbac 20498 bash_cv_std_putenv=no
7117c2d2
JA
20499
20500fi
74091dd4 20501rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 20502 conftest$ac_exeext conftest.$ac_ext
7117c2d2 20503fi
74091dd4
CR
20504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_putenv" >&5
20505printf "%s\n" "$bash_cv_std_putenv" >&6; }
7117c2d2 20506if test $bash_cv_std_putenv = yes; then
74091dd4 20507printf "%s\n" "#define HAVE_STD_PUTENV 1" >>confdefs.h
7117c2d2
JA
20508
20509fi
20510
20511else
74091dd4 20512printf "%s\n" "#define HAVE_STD_PUTENV 1" >>confdefs.h
7117c2d2
JA
20513
20514fi
20515if test "$ac_cv_func_unsetenv" = "yes"; then
20516
b80f6443 20517
74091dd4
CR
20518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant unsetenv declaration" >&5
20519printf %s "checking for standard-conformant unsetenv declaration... " >&6; }
20520if test ${bash_cv_std_unsetenv+y}
20521then :
20522 printf %s "(cached) " >&6
20523else $as_nop
ac50fbac 20524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20525/* end confdefs.h. */
7117c2d2 20526
74091dd4 20527#if HAVE_STDLIB_H
7117c2d2 20528#include <stdlib.h>
74091dd4
CR
20529#endif
20530#if HAVE_STDDEF_H
7117c2d2
JA
20531#include <stddef.h>
20532#endif
20533#ifndef __STDC__
20534# ifndef const
20535# define const
20536# endif
20537#endif
20538#ifdef PROTOTYPES
20539extern int unsetenv (const char *);
20540#else
20541extern int unsetenv ();
20542#endif
20543
20544int
74091dd4 20545main (void)
7117c2d2
JA
20546{
20547return (unsetenv == 0);
20548 ;
20549 return 0;
20550}
20551_ACEOF
74091dd4
CR
20552if ac_fn_c_try_link "$LINENO"
20553then :
7117c2d2 20554 bash_cv_std_unsetenv=yes
74091dd4 20555else $as_nop
ac50fbac 20556 bash_cv_std_unsetenv=no
7117c2d2
JA
20557
20558fi
74091dd4 20559rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 20560 conftest$ac_exeext conftest.$ac_ext
7117c2d2 20561fi
74091dd4
CR
20562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_unsetenv" >&5
20563printf "%s\n" "$bash_cv_std_unsetenv" >&6; }
7117c2d2 20564if test $bash_cv_std_unsetenv = yes; then
74091dd4 20565printf "%s\n" "#define HAVE_STD_UNSETENV 1" >>confdefs.h
7117c2d2
JA
20566
20567fi
20568
20569else
74091dd4 20570printf "%s\n" "#define HAVE_STD_UNSETENV 1" >>confdefs.h
7117c2d2
JA
20571
20572fi
20573
74091dd4
CR
20574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for printf floating point output in hex notation" >&5
20575printf %s "checking for printf floating point output in hex notation... " >&6; }
20576if test ${bash_cv_printf_a_format+y}
20577then :
20578 printf %s "(cached) " >&6
20579else $as_nop
20580 if test "$cross_compiling" = yes
20581then :
20582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5
20583printf "%s\n" "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;}
f73dda09
JA
20584 bash_cv_printf_a_format=no
20585
74091dd4 20586else $as_nop
ac50fbac 20587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20588/* end confdefs.h. */
f73dda09
JA
20589
20590#include <stdio.h>
20591#include <string.h>
8868edaf 20592#include <stdlib.h>
f73dda09
JA
20593
20594int
20595main()
20596{
20597 double y = 0.0;
20598 char abuf[1024];
20599
20600 sprintf(abuf, "%A", y);
20601 exit(strchr(abuf, 'P') == (char *)0);
20602}
20603
20604_ACEOF
74091dd4
CR
20605if ac_fn_c_try_run "$LINENO"
20606then :
f73dda09 20607 bash_cv_printf_a_format=yes
74091dd4 20608else $as_nop
ac50fbac 20609 bash_cv_printf_a_format=no
f73dda09 20610fi
ac50fbac
CR
20611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20612 conftest.$ac_objext conftest.beam conftest.$ac_ext
f73dda09 20613fi
3185942a 20614
f73dda09 20615fi
d166f048 20616
74091dd4
CR
20617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_printf_a_format" >&5
20618printf "%s\n" "$bash_cv_printf_a_format" >&6; }
f73dda09 20619if test $bash_cv_printf_a_format = yes; then
74091dd4 20620printf "%s\n" "#define HAVE_PRINTF_A_FORMAT 1" >>confdefs.h
d166f048 20621
f73dda09 20622fi
ccc6cda3 20623
b80f6443 20624
74091dd4
CR
20625{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fnmatch can be used to check bracket equivalence classes" >&5
20626printf %s "checking whether fnmatch can be used to check bracket equivalence classes... " >&6; }
20627if test ${bash_cv_fnmatch_equiv_fallback+y}
20628then :
20629 printf %s "(cached) " >&6
20630else $as_nop
20631 if test "$cross_compiling" = yes
20632then :
20633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&5
20634printf "%s\n" "$as_me: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&2;}
d233b485
CR
20635 bash_cv_fnmatch_equiv_fallback=no
20636
74091dd4 20637else $as_nop
d233b485
CR
20638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20639/* end confdefs.h. */
20640
20641#include <stdlib.h>
20642#include <unistd.h>
20643#include <stdio.h>
20644#include <fnmatch.h>
20645#include <locale.h>
20646
20647char *pattern = "[[=a=]]";
20648
20649/* char *string = "ä"; */
20650unsigned char string[4] = { '\xc3', '\xa4', '\0' };
20651
20652int
20653main (int c, char **v)
20654{
8868edaf 20655 setlocale (LC_ALL, "en_US.UTF-8");
d233b485
CR
20656 if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH)
20657 exit (0);
20658 exit (1);
20659}
20660
d233b485 20661_ACEOF
74091dd4
CR
20662if ac_fn_c_try_run "$LINENO"
20663then :
d233b485 20664 bash_cv_fnmatch_equiv_fallback=yes
74091dd4 20665else $as_nop
d233b485
CR
20666 bash_cv_fnmatch_equiv_fallback=no
20667fi
20668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20669 conftest.$ac_objext conftest.beam conftest.$ac_ext
20670fi
20671
20672fi
20673
74091dd4
CR
20674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fnmatch_equiv_fallback" >&5
20675printf "%s\n" "$bash_cv_fnmatch_equiv_fallback" >&6; }
d233b485
CR
20676if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then
20677 bash_cv_fnmatch_equiv_value=1
20678else
20679 bash_cv_fnmatch_equiv_value=0
20680fi
20681
74091dd4 20682printf "%s\n" "#define FNMATCH_EQUIV_FALLBACK $bash_cv_fnmatch_equiv_value" >>confdefs.h
d233b485
CR
20683
20684
b80f6443
JA
20685
20686
74091dd4
CR
20687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5
20688printf %s "checking if signal handlers must be reinstalled when invoked... " >&6; }
20689if test ${bash_cv_must_reinstall_sighandlers+y}
20690then :
20691 printf %s "(cached) " >&6
20692else $as_nop
20693 if test "$cross_compiling" = yes
20694then :
20695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5
20696printf "%s\n" "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;}
cce855bc
JA
20697 bash_cv_must_reinstall_sighandlers=no
20698
74091dd4 20699else $as_nop
ac50fbac 20700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20701/* end confdefs.h. */
ccc6cda3
JA
20702
20703#include <signal.h>
20704#ifdef HAVE_UNISTD_H
20705#include <unistd.h>
20706#endif
8868edaf 20707#include <stdlib.h>
ccc6cda3 20708
74091dd4 20709typedef void sigfunc();
ccc6cda3 20710
d233b485 20711volatile int nsigint;
ccc6cda3
JA
20712
20713#ifdef HAVE_POSIX_SIGNALS
20714sigfunc *
20715set_signal_handler(sig, handler)
20716 int sig;
20717 sigfunc *handler;
20718{
20719 struct sigaction act, oact;
20720 act.sa_handler = handler;
20721 act.sa_flags = 0;
20722 sigemptyset (&act.sa_mask);
20723 sigemptyset (&oact.sa_mask);
20724 sigaction (sig, &act, &oact);
20725 return (oact.sa_handler);
20726}
20727#else
20728#define set_signal_handler(s, h) signal(s, h)
20729#endif
20730
74091dd4 20731void
ccc6cda3
JA
20732sigint(s)
20733int s;
20734{
20735 nsigint++;
20736}
20737
8868edaf 20738int
ccc6cda3
JA
20739main()
20740{
20741 nsigint = 0;
20742 set_signal_handler(SIGINT, sigint);
20743 kill((int)getpid(), SIGINT);
20744 kill((int)getpid(), SIGINT);
20745 exit(nsigint != 2);
20746}
20747
f73dda09 20748_ACEOF
74091dd4
CR
20749if ac_fn_c_try_run "$LINENO"
20750then :
ccc6cda3 20751 bash_cv_must_reinstall_sighandlers=no
74091dd4 20752else $as_nop
ac50fbac 20753 bash_cv_must_reinstall_sighandlers=yes
ccc6cda3 20754fi
ac50fbac
CR
20755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20756 conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 20757fi
3185942a 20758
ccc6cda3
JA
20759fi
20760
74091dd4
CR
20761{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5
20762printf "%s\n" "$bash_cv_must_reinstall_sighandlers" >&6; }
ccc6cda3 20763if test $bash_cv_must_reinstall_sighandlers = yes; then
74091dd4 20764printf "%s\n" "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h
ccc6cda3
JA
20765
20766fi
20767
b80f6443 20768
74091dd4
CR
20769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of necessary job control definitions" >&5
20770printf %s "checking for presence of necessary job control definitions... " >&6; }
20771if test ${bash_cv_job_control_missing+y}
20772then :
20773 printf %s "(cached) " >&6
20774else $as_nop
ac50fbac 20775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20776/* end confdefs.h. */
ccc6cda3
JA
20777
20778#include <sys/types.h>
20779#ifdef HAVE_SYS_WAIT_H
20780#include <sys/wait.h>
20781#endif
20782#ifdef HAVE_UNISTD_H
20783#include <unistd.h>
20784#endif
20785#include <signal.h>
20786
d233b485
CR
20787/* add more tests in here as appropriate */
20788
ccc6cda3
JA
20789/* signal type */
20790#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
d233b485 20791#error
ccc6cda3
JA
20792#endif
20793
20794/* signals and tty control. */
20795#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
d233b485 20796#error
ccc6cda3
JA
20797#endif
20798
20799/* process control */
f73dda09 20800#if !defined (WNOHANG) || !defined (WUNTRACED)
d233b485 20801#error
ccc6cda3
JA
20802#endif
20803
20804/* Posix systems have tcgetpgrp and waitpid. */
20805#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
d233b485 20806#error
ccc6cda3
JA
20807#endif
20808
20809#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
d233b485 20810#error
ccc6cda3
JA
20811#endif
20812
20813/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
20814#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
d233b485 20815#error
ccc6cda3
JA
20816#endif
20817
d233b485
CR
20818
20819int
74091dd4 20820main (void)
d233b485 20821{
74091dd4 20822 int x;
d233b485
CR
20823 ;
20824 return 0;
ccc6cda3 20825}
f73dda09 20826_ACEOF
74091dd4
CR
20827if ac_fn_c_try_compile "$LINENO"
20828then :
ccc6cda3 20829 bash_cv_job_control_missing=present
74091dd4 20830else $as_nop
ac50fbac 20831 bash_cv_job_control_missing=missing
3185942a 20832
ccc6cda3 20833fi
74091dd4 20834rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
d233b485 20835fi
ccc6cda3 20836
74091dd4
CR
20837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_job_control_missing" >&5
20838printf "%s\n" "$bash_cv_job_control_missing" >&6; }
ccc6cda3 20839if test $bash_cv_job_control_missing = missing; then
74091dd4 20840printf "%s\n" "#define JOB_CONTROL_MISSING 1" >>confdefs.h
ccc6cda3
JA
20841
20842fi
20843
74091dd4
CR
20844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of named pipes" >&5
20845printf %s "checking for presence of named pipes... " >&6; }
20846if test ${bash_cv_sys_named_pipes+y}
20847then :
20848 printf %s "(cached) " >&6
20849else $as_nop
20850 if test "$cross_compiling" = yes
20851then :
20852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5
20853printf "%s\n" "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;}
cce855bc
JA
20854 bash_cv_sys_named_pipes=missing
20855
74091dd4 20856else $as_nop
ac50fbac 20857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20858/* end confdefs.h. */
ccc6cda3
JA
20859
20860#include <sys/types.h>
20861#include <sys/stat.h>
20862#ifdef HAVE_UNISTD_H
20863#include <unistd.h>
20864#endif
8868edaf
CR
20865#include <stdio.h>
20866#include <stdlib.h>
ccc6cda3
JA
20867
20868/* Add more tests in here as appropriate. */
8868edaf 20869int
ccc6cda3
JA
20870main()
20871{
bb70624e 20872int fd, err;
ccc6cda3
JA
20873
20874#if defined (HAVE_MKFIFO)
20875exit (0);
20876#endif
20877
20878#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
20879exit (1);
20880#endif
20881
20882#if defined (NeXT)
20883exit (1);
20884#endif
3185942a 20885err = mkdir("bash-aclocal", 0700);
bb70624e
JA
20886if (err < 0) {
20887 perror ("mkdir");
20888 exit(1);
20889}
3185942a 20890fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
bb70624e 20891if (fd == -1) {
3185942a 20892 rmdir ("bash-aclocal");
ccc6cda3 20893 exit (1);
bb70624e 20894}
ccc6cda3 20895close(fd);
3185942a
JA
20896unlink ("bash-aclocal/sh-np-autoconf");
20897rmdir ("bash-aclocal");
ccc6cda3
JA
20898exit(0);
20899}
74091dd4 20900
f73dda09 20901_ACEOF
74091dd4
CR
20902if ac_fn_c_try_run "$LINENO"
20903then :
ccc6cda3 20904 bash_cv_sys_named_pipes=present
74091dd4 20905else $as_nop
ac50fbac 20906 bash_cv_sys_named_pipes=missing
0628567a 20907fi
ac50fbac
CR
20908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20909 conftest.$ac_objext conftest.beam conftest.$ac_ext
95732b49 20910fi
3185942a 20911
95732b49 20912fi
95732b49 20913
74091dd4
CR
20914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_named_pipes" >&5
20915printf "%s\n" "$bash_cv_sys_named_pipes" >&6; }
0628567a 20916if test $bash_cv_sys_named_pipes = missing; then
74091dd4 20917printf "%s\n" "#define NAMED_PIPES_MISSING 1" >>confdefs.h
0628567a
JA
20918
20919fi
20920
20921
74091dd4
CR
20922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
20923printf %s "checking whether termios.h defines TIOCGWINSZ... " >&6; }
20924if test ${ac_cv_sys_tiocgwinsz_in_termios_h+y}
20925then :
20926 printf %s "(cached) " >&6
20927else $as_nop
ac50fbac 20928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20929/* end confdefs.h. */
f73dda09
JA
20930#include <sys/types.h>
20931#include <termios.h>
20932#ifdef TIOCGWINSZ
20933 yes
20934#endif
20935
20936_ACEOF
20937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
20938 $EGREP "yes" >/dev/null 2>&1
20939then :
f73dda09 20940 ac_cv_sys_tiocgwinsz_in_termios_h=yes
74091dd4 20941else $as_nop
f73dda09
JA
20942 ac_cv_sys_tiocgwinsz_in_termios_h=no
20943fi
74091dd4 20944rm -rf conftest*
f73dda09
JA
20945
20946fi
74091dd4
CR
20947{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
20948printf "%s\n" "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
d166f048 20949
f73dda09 20950if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
74091dd4
CR
20951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
20952printf %s "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
20953if test ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+y}
20954then :
20955 printf %s "(cached) " >&6
20956else $as_nop
ac50fbac 20957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20958/* end confdefs.h. */
ccc6cda3
JA
20959#include <sys/types.h>
20960#include <sys/ioctl.h>
f73dda09
JA
20961#ifdef TIOCGWINSZ
20962 yes
20963#endif
20964
20965_ACEOF
20966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
20967 $EGREP "yes" >/dev/null 2>&1
20968then :
f73dda09 20969 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
74091dd4 20970else $as_nop
f73dda09 20971 ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
ccc6cda3 20972fi
74091dd4 20973rm -rf conftest*
f73dda09 20974
ccc6cda3 20975fi
74091dd4
CR
20976{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
20977printf "%s\n" "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
f73dda09
JA
20978
20979 if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
ccc6cda3 20980
74091dd4 20981printf "%s\n" "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3 20982
f73dda09 20983 fi
ccc6cda3
JA
20984fi
20985
74091dd4
CR
20986{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5
20987printf %s "checking for TIOCSTAT in sys/ioctl.h... " >&6; }
20988if test ${bash_cv_tiocstat_in_ioctl+y}
20989then :
20990 printf %s "(cached) " >&6
20991else $as_nop
ac50fbac 20992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 20993/* end confdefs.h. */
74091dd4 20994
ccc6cda3
JA
20995#include <sys/types.h>
20996#include <sys/ioctl.h>
f73dda09 20997int
74091dd4 20998main (void)
f73dda09 20999{
ccc6cda3 21000int x = TIOCSTAT;
f73dda09
JA
21001 ;
21002 return 0;
21003}
21004_ACEOF
74091dd4
CR
21005if ac_fn_c_try_compile "$LINENO"
21006then :
ccc6cda3 21007 bash_cv_tiocstat_in_ioctl=yes
74091dd4 21008else $as_nop
ac50fbac 21009 bash_cv_tiocstat_in_ioctl=no
74091dd4 21010
ccc6cda3 21011fi
74091dd4 21012rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
21013fi
21014
74091dd4
CR
21015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5
21016printf "%s\n" "$bash_cv_tiocstat_in_ioctl" >&6; }
f73dda09 21017if test $bash_cv_tiocstat_in_ioctl = yes; then
74091dd4 21018printf "%s\n" "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3
JA
21019
21020fi
21021
74091dd4
CR
21022{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5
21023printf %s "checking for FIONREAD in sys/ioctl.h... " >&6; }
21024if test ${bash_cv_fionread_in_ioctl+y}
21025then :
21026 printf %s "(cached) " >&6
21027else $as_nop
ac50fbac 21028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21029/* end confdefs.h. */
74091dd4 21030
ccc6cda3
JA
21031#include <sys/types.h>
21032#include <sys/ioctl.h>
f73dda09 21033int
74091dd4 21034main (void)
f73dda09 21035{
ccc6cda3 21036int x = FIONREAD;
f73dda09
JA
21037 ;
21038 return 0;
21039}
21040_ACEOF
74091dd4
CR
21041if ac_fn_c_try_compile "$LINENO"
21042then :
ccc6cda3 21043 bash_cv_fionread_in_ioctl=yes
74091dd4 21044else $as_nop
ac50fbac 21045 bash_cv_fionread_in_ioctl=no
74091dd4 21046
ccc6cda3 21047fi
74091dd4 21048rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3
JA
21049fi
21050
74091dd4
CR
21051{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5
21052printf "%s\n" "$bash_cv_fionread_in_ioctl" >&6; }
f73dda09 21053if test $bash_cv_fionread_in_ioctl = yes; then
74091dd4 21054printf "%s\n" "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h
ccc6cda3
JA
21055
21056fi
21057
b80f6443 21058
95732b49 21059
74091dd4
CR
21060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5
21061printf %s "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; }
21062if test ${bash_cv_wcontinued_broken+y}
21063then :
21064 printf %s "(cached) " >&6
21065else $as_nop
21066 if test "$cross_compiling" = yes
21067then :
21068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5
21069printf "%s\n" "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&2;}
95732b49
JA
21070 bash_cv_wcontinued_broken=no
21071
74091dd4 21072else $as_nop
ac50fbac 21073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21074/* end confdefs.h. */
95732b49
JA
21075
21076#include <sys/types.h>
21077#include <sys/wait.h>
21078#include <unistd.h>
21079#include <errno.h>
8868edaf 21080#include <stdlib.h>
95732b49
JA
21081
21082#ifndef errno
21083extern int errno;
21084#endif
8868edaf 21085int
95732b49
JA
21086main()
21087{
21088 int x;
21089
21090 x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED);
21091 if (x == -1 && errno == EINVAL)
21092 exit (1);
21093 else
21094 exit (0);
21095}
21096
21097_ACEOF
74091dd4
CR
21098if ac_fn_c_try_run "$LINENO"
21099then :
95732b49 21100 bash_cv_wcontinued_broken=no
74091dd4 21101else $as_nop
ac50fbac 21102 bash_cv_wcontinued_broken=yes
95732b49 21103fi
ac50fbac
CR
21104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21105 conftest.$ac_objext conftest.beam conftest.$ac_ext
95732b49 21106fi
3185942a 21107
95732b49
JA
21108fi
21109
74091dd4
CR
21110{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcontinued_broken" >&5
21111printf "%s\n" "$bash_cv_wcontinued_broken" >&6; }
95732b49 21112if test $bash_cv_wcontinued_broken = yes; then
74091dd4 21113printf "%s\n" "#define WCONTINUED_BROKEN 1" >>confdefs.h
95732b49
JA
21114
21115fi
21116
21117
74091dd4
CR
21118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5
21119printf %s "checking for speed_t in sys/types.h... " >&6; }
21120if test ${bash_cv_speed_t_in_sys_types+y}
21121then :
21122 printf %s "(cached) " >&6
21123else $as_nop
ac50fbac 21124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21125/* end confdefs.h. */
d166f048 21126#include <sys/types.h>
f73dda09 21127int
74091dd4 21128main (void)
f73dda09 21129{
d166f048 21130speed_t x;
f73dda09
JA
21131 ;
21132 return 0;
21133}
21134_ACEOF
74091dd4
CR
21135if ac_fn_c_try_compile "$LINENO"
21136then :
d166f048 21137 bash_cv_speed_t_in_sys_types=yes
74091dd4 21138else $as_nop
ac50fbac 21139 bash_cv_speed_t_in_sys_types=no
d166f048 21140fi
74091dd4 21141rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
d166f048
JA
21142fi
21143
74091dd4
CR
21144{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5
21145printf "%s\n" "$bash_cv_speed_t_in_sys_types" >&6; }
f73dda09 21146if test $bash_cv_speed_t_in_sys_types = yes; then
74091dd4 21147printf "%s\n" "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h
d166f048
JA
21148
21149fi
21150
74091dd4
CR
21151{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5
21152printf %s "checking whether getpw functions are declared in pwd.h... " >&6; }
21153if test ${bash_cv_getpw_declared+y}
21154then :
21155 printf %s "(cached) " >&6
21156else $as_nop
ac50fbac 21157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21158/* end confdefs.h. */
28ef6c31 21159
ccc6cda3 21160#include <sys/types.h>
28ef6c31
JA
21161#ifdef HAVE_UNISTD_H
21162# include <unistd.h>
21163#endif
ccc6cda3 21164#include <pwd.h>
28ef6c31 21165
f73dda09 21166_ACEOF
28ef6c31 21167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
74091dd4
CR
21168 $EGREP "getpwuid" >/dev/null 2>&1
21169then :
28ef6c31 21170 bash_cv_getpw_declared=yes
74091dd4 21171else $as_nop
28ef6c31 21172 bash_cv_getpw_declared=no
ccc6cda3 21173fi
74091dd4 21174rm -rf conftest*
28ef6c31 21175
ccc6cda3
JA
21176fi
21177
74091dd4
CR
21178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5
21179printf "%s\n" "$bash_cv_getpw_declared" >&6; }
28ef6c31 21180if test $bash_cv_getpw_declared = yes; then
74091dd4 21181printf "%s\n" "#define HAVE_GETPW_DECLS 1" >>confdefs.h
ccc6cda3
JA
21182
21183fi
21184
74091dd4
CR
21185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unusable real-time signals due to large values" >&5
21186printf %s "checking for unusable real-time signals due to large values... " >&6; }
21187if test ${bash_cv_unusable_rtsigs+y}
21188then :
21189 printf %s "(cached) " >&6
21190else $as_nop
21191 if test "$cross_compiling" = yes
21192then :
21193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5
21194printf "%s\n" "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;}
28ef6c31
JA
21195 bash_cv_unusable_rtsigs=yes
21196
74091dd4 21197else $as_nop
ac50fbac 21198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21199/* end confdefs.h. */
28ef6c31
JA
21200
21201#include <sys/types.h>
21202#include <signal.h>
8868edaf 21203#include <stdlib.h>
28ef6c31
JA
21204
21205#ifndef NSIG
21206# define NSIG 64
21207#endif
21208
8868edaf 21209int
28ef6c31
JA
21210main ()
21211{
21212 int n_sigs = 2 * NSIG;
21213#ifdef SIGRTMIN
21214 int rtmin = SIGRTMIN;
21215#else
21216 int rtmin = 0;
21217#endif
21218
21219 exit(rtmin < n_sigs);
21220}
74091dd4 21221
f73dda09 21222_ACEOF
74091dd4
CR
21223if ac_fn_c_try_run "$LINENO"
21224then :
28ef6c31 21225 bash_cv_unusable_rtsigs=yes
74091dd4 21226else $as_nop
ac50fbac 21227 bash_cv_unusable_rtsigs=no
28ef6c31 21228fi
ac50fbac
CR
21229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21230 conftest.$ac_objext conftest.beam conftest.$ac_ext
28ef6c31 21231fi
3185942a 21232
28ef6c31
JA
21233fi
21234
74091dd4
CR
21235{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_unusable_rtsigs" >&5
21236printf "%s\n" "$bash_cv_unusable_rtsigs" >&6; }
28ef6c31 21237if test $bash_cv_unusable_rtsigs = yes; then
74091dd4 21238printf "%s\n" "#define UNUSABLE_RT_SIGNALS 1" >>confdefs.h
28ef6c31
JA
21239
21240fi
21241
b80f6443
JA
21242
21243
21244
21245
f73dda09
JA
21246if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
21247 SIGLIST_O=siglist.o
21248else
21249 SIGLIST_O=
21250fi
ccc6cda3 21251
b80f6443
JA
21252
21253
ccc6cda3 21254case "$host_os" in
74091dd4
CR
21255hpux*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
21256printf %s "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; }
21257if test ${bash_cv_kernel_rlimit+y}
21258then :
21259 printf %s "(cached) " >&6
21260else $as_nop
21261 if test ${bash_cv_rlimit+y}
21262then :
21263 printf %s "(cached) " >&6
21264else $as_nop
ac50fbac 21265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21266/* end confdefs.h. */
ccc6cda3
JA
21267
21268#include <sys/types.h>
21269#include <sys/resource.h>
21270
f73dda09 21271int
74091dd4 21272main (void)
f73dda09 21273{
ccc6cda3
JA
21274
21275 int f;
21276 f = RLIMIT_DATA;
21277
f73dda09
JA
21278 ;
21279 return 0;
21280}
21281_ACEOF
74091dd4
CR
21282if ac_fn_c_try_compile "$LINENO"
21283then :
21284 bash_cv_rlimit=yes
21285else $as_nop
21286 bash_cv_rlimit=no
21287
21288fi
21289rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21290fi
21291
21292
21293if test $bash_cv_rlimit = no; then
21294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21295/* end confdefs.h. */
ccc6cda3 21296
cce855bc
JA
21297#include <sys/types.h>
21298#define _KERNEL
21299#include <sys/resource.h>
21300#undef _KERNEL
21301
f73dda09 21302int
74091dd4 21303main (void)
f73dda09 21304{
ccc6cda3 21305
74091dd4
CR
21306 int f;
21307 f = RLIMIT_DATA;
cce855bc 21308
f73dda09
JA
21309 ;
21310 return 0;
21311}
21312_ACEOF
74091dd4
CR
21313if ac_fn_c_try_compile "$LINENO"
21314then :
ccc6cda3 21315 bash_cv_kernel_rlimit=yes
74091dd4 21316else $as_nop
ac50fbac 21317 bash_cv_kernel_rlimit=no
ccc6cda3 21318fi
74091dd4 21319rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ccc6cda3 21320fi
74091dd4 21321
ccc6cda3
JA
21322fi
21323
74091dd4
CR
21324{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_kernel_rlimit" >&5
21325printf "%s\n" "$bash_cv_kernel_rlimit" >&6; }
ccc6cda3 21326if test $bash_cv_kernel_rlimit = yes; then
74091dd4 21327printf "%s\n" "#define RLIMIT_NEEDS_KERNEL 1" >>confdefs.h
ccc6cda3
JA
21328
21329fi
21330 ;;
21331esac
21332
21333if test "$opt_readline" = yes; then
d166f048
JA
21334case "$host_os" in
21335aix*) prefer_curses=yes ;;
21336esac
ccc6cda3
JA
21337
21338if test "X$bash_cv_termcap_lib" = "X"; then
21339_bash_needmsg=yes
21340else
74091dd4
CR
21341{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
21342printf %s "checking which library has the termcap functions... " >&6; }
ccc6cda3
JA
21343_bash_needmsg=
21344fi
74091dd4
CR
21345if test ${bash_cv_termcap_lib+y}
21346then :
21347 printf %s "(cached) " >&6
21348else $as_nop
ac50fbac 21349 ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
74091dd4
CR
21350if test "x$ac_cv_func_tgetent" = xyes
21351then :
b80f6443 21352 bash_cv_termcap_lib=libc
74091dd4
CR
21353else $as_nop
21354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
21355printf %s "checking for tgetent in -ltermcap... " >&6; }
21356if test ${ac_cv_lib_termcap_tgetent+y}
21357then :
21358 printf %s "(cached) " >&6
21359else $as_nop
f73dda09 21360 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 21361LIBS="-ltermcap $LIBS"
ac50fbac 21362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21363/* end confdefs.h. */
f73dda09 21364
3185942a
JA
21365/* Override any GCC internal prototype to avoid an error.
21366 Use char because int might match the return type of a GCC
21367 builtin and then its argument prototype would still apply. */
f73dda09
JA
21368char tgetent ();
21369int
74091dd4 21370main (void)
f73dda09 21371{
3185942a 21372return tgetent ();
f73dda09
JA
21373 ;
21374 return 0;
21375}
21376_ACEOF
74091dd4
CR
21377if ac_fn_c_try_link "$LINENO"
21378then :
f73dda09 21379 ac_cv_lib_termcap_tgetent=yes
74091dd4 21380else $as_nop
ac50fbac 21381 ac_cv_lib_termcap_tgetent=no
f73dda09 21382fi
74091dd4 21383rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 21384 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
21385LIBS=$ac_check_lib_save_LIBS
21386fi
74091dd4
CR
21387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
21388printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; }
21389if test "x$ac_cv_lib_termcap_tgetent" = xyes
21390then :
ccc6cda3 21391 bash_cv_termcap_lib=libtermcap
74091dd4
CR
21392else $as_nop
21393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
21394printf %s "checking for tgetent in -ltinfo... " >&6; }
21395if test ${ac_cv_lib_tinfo_tgetent+y}
21396then :
21397 printf %s "(cached) " >&6
21398else $as_nop
f73dda09
JA
21399 ac_check_lib_save_LIBS=$LIBS
21400LIBS="-ltinfo $LIBS"
ac50fbac 21401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21402/* end confdefs.h. */
f73dda09 21403
3185942a
JA
21404/* Override any GCC internal prototype to avoid an error.
21405 Use char because int might match the return type of a GCC
21406 builtin and then its argument prototype would still apply. */
f73dda09
JA
21407char tgetent ();
21408int
74091dd4 21409main (void)
f73dda09 21410{
3185942a 21411return tgetent ();
f73dda09
JA
21412 ;
21413 return 0;
21414}
21415_ACEOF
74091dd4
CR
21416if ac_fn_c_try_link "$LINENO"
21417then :
f73dda09 21418 ac_cv_lib_tinfo_tgetent=yes
74091dd4 21419else $as_nop
ac50fbac 21420 ac_cv_lib_tinfo_tgetent=no
f73dda09 21421fi
74091dd4 21422rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 21423 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
21424LIBS=$ac_check_lib_save_LIBS
21425fi
74091dd4
CR
21426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
21427printf "%s\n" "$ac_cv_lib_tinfo_tgetent" >&6; }
21428if test "x$ac_cv_lib_tinfo_tgetent" = xyes
21429then :
7117c2d2 21430 bash_cv_termcap_lib=libtinfo
74091dd4
CR
21431else $as_nop
21432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
21433printf %s "checking for tgetent in -lcurses... " >&6; }
21434if test ${ac_cv_lib_curses_tgetent+y}
21435then :
21436 printf %s "(cached) " >&6
21437else $as_nop
f73dda09
JA
21438 ac_check_lib_save_LIBS=$LIBS
21439LIBS="-lcurses $LIBS"
ac50fbac 21440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21441/* end confdefs.h. */
ccc6cda3 21442
3185942a
JA
21443/* Override any GCC internal prototype to avoid an error.
21444 Use char because int might match the return type of a GCC
21445 builtin and then its argument prototype would still apply. */
f73dda09
JA
21446char tgetent ();
21447int
74091dd4 21448main (void)
f73dda09 21449{
3185942a 21450return tgetent ();
f73dda09
JA
21451 ;
21452 return 0;
21453}
21454_ACEOF
74091dd4
CR
21455if ac_fn_c_try_link "$LINENO"
21456then :
f73dda09 21457 ac_cv_lib_curses_tgetent=yes
74091dd4 21458else $as_nop
ac50fbac 21459 ac_cv_lib_curses_tgetent=no
f73dda09 21460fi
74091dd4 21461rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 21462 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
21463LIBS=$ac_check_lib_save_LIBS
21464fi
74091dd4
CR
21465{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5
21466printf "%s\n" "$ac_cv_lib_curses_tgetent" >&6; }
21467if test "x$ac_cv_lib_curses_tgetent" = xyes
21468then :
ccc6cda3 21469 bash_cv_termcap_lib=libcurses
74091dd4
CR
21470else $as_nop
21471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5
21472printf %s "checking for tgetent in -lncurses... " >&6; }
21473if test ${ac_cv_lib_ncurses_tgetent+y}
21474then :
21475 printf %s "(cached) " >&6
21476else $as_nop
f73dda09 21477 ac_check_lib_save_LIBS=$LIBS
ccc6cda3 21478LIBS="-lncurses $LIBS"
ac50fbac 21479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0628567a 21480/* end confdefs.h. */
f73dda09 21481
3185942a
JA
21482/* Override any GCC internal prototype to avoid an error.
21483 Use char because int might match the return type of a GCC
21484 builtin and then its argument prototype would still apply. */
f73dda09
JA
21485char tgetent ();
21486int
74091dd4 21487main (void)
f73dda09 21488{
3185942a 21489return tgetent ();
f73dda09
JA
21490 ;
21491 return 0;
21492}
21493_ACEOF
74091dd4
CR
21494if ac_fn_c_try_link "$LINENO"
21495then :
f73dda09 21496 ac_cv_lib_ncurses_tgetent=yes
74091dd4 21497else $as_nop
ac50fbac 21498 ac_cv_lib_ncurses_tgetent=no
f73dda09 21499fi
74091dd4 21500rm -f core conftest.err conftest.$ac_objext conftest.beam \
ac50fbac 21501 conftest$ac_exeext conftest.$ac_ext
f73dda09
JA
21502LIBS=$ac_check_lib_save_LIBS
21503fi
74091dd4
CR
21504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5
21505printf "%s\n" "$ac_cv_lib_ncurses_tgetent" >&6; }
21506if test "x$ac_cv_lib_ncurses_tgetent" = xyes
21507then :
f73dda09 21508 bash_cv_termcap_lib=libncurses
74091dd4
CR
21509else $as_nop
21510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5
21511printf %s "checking for tgetent in -lncursesw... " >&6; }
21512if test ${ac_cv_lib_ncursesw_tgetent+y}
21513then :
21514 printf %s "(cached) " >&6
21515else $as_nop
d233b485
CR
21516 ac_check_lib_save_LIBS=$LIBS
21517LIBS="-lncursesw $LIBS"
21518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21519/* end confdefs.h. */
21520
21521/* Override any GCC internal prototype to avoid an error.
21522 Use char because int might match the return type of a GCC
21523 builtin and then its argument prototype would still apply. */
d233b485
CR
21524char tgetent ();
21525int
74091dd4 21526main (void)
d233b485
CR
21527{
21528return tgetent ();
21529 ;
21530 return 0;
21531}
21532_ACEOF
74091dd4
CR
21533if ac_fn_c_try_link "$LINENO"
21534then :
d233b485 21535 ac_cv_lib_ncursesw_tgetent=yes
74091dd4 21536else $as_nop
d233b485
CR
21537 ac_cv_lib_ncursesw_tgetent=no
21538fi
74091dd4 21539rm -f core conftest.err conftest.$ac_objext conftest.beam \
d233b485
CR
21540 conftest$ac_exeext conftest.$ac_ext
21541LIBS=$ac_check_lib_save_LIBS
21542fi
74091dd4
CR
21543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5
21544printf "%s\n" "$ac_cv_lib_ncursesw_tgetent" >&6; }
21545if test "x$ac_cv_lib_ncursesw_tgetent" = xyes
21546then :
d233b485 21547 bash_cv_termcap_lib=libncursesw
74091dd4 21548else $as_nop
f73dda09 21549 bash_cv_termcap_lib=gnutermcap
ccc6cda3 21550fi
ccc6cda3 21551
ccc6cda3
JA
21552fi
21553
21554fi
21555
21556fi
21557
21558fi
21559
b80f6443
JA
21560fi
21561
d233b485
CR
21562fi
21563
ccc6cda3 21564if test "X$_bash_needmsg" = "Xyes"; then
74091dd4
CR
21565{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5
21566printf %s "checking which library has the termcap functions... " >&6; }
ccc6cda3 21567fi
74091dd4
CR
21568{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5
21569printf "%s\n" "using $bash_cv_termcap_lib" >&6; }
cce855bc 21570if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
21571LDFLAGS="$LDFLAGS -L./lib/termcap"
21572TERMCAP_LIB="./lib/termcap/libtermcap.a"
21573TERMCAP_DEP="./lib/termcap/libtermcap.a"
d166f048 21574elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
ccc6cda3
JA
21575TERMCAP_LIB=-ltermcap
21576TERMCAP_DEP=
f73dda09
JA
21577elif test $bash_cv_termcap_lib = libtinfo; then
21578TERMCAP_LIB=-ltinfo
21579TERMCAP_DEP=
ccc6cda3
JA
21580elif test $bash_cv_termcap_lib = libncurses; then
21581TERMCAP_LIB=-lncurses
21582TERMCAP_DEP=
b80f6443
JA
21583elif test $bash_cv_termcap_lib = libc; then
21584TERMCAP_LIB=
21585TERMCAP_DEP=
ccc6cda3 21586else
74091dd4
CR
21587# we assume ncurses is installed somewhere the linker can find it
21588TERMCAP_LIB=-lncurses
ccc6cda3
JA
21589TERMCAP_DEP=
21590fi
21591
21592fi
21593
b80f6443
JA
21594
21595
74091dd4
CR
21596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/fd is available" >&5
21597printf %s "checking whether /dev/fd is available... " >&6; }
21598if test ${bash_cv_dev_fd+y}
21599then :
21600 printf %s "(cached) " >&6
21601else $as_nop
0628567a 21602 bash_cv_dev_fd=""
3185942a 21603if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then
95732b49 21604# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
3185942a 21605 if (exec test -r /dev/fd/3 3</dev/null) ; then
95732b49
JA
21606 bash_cv_dev_fd=standard
21607 else
21608 bash_cv_dev_fd=absent
21609 fi
0628567a
JA
21610fi
21611if test -z "$bash_cv_dev_fd" ; then
3185942a 21612 if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
0628567a
JA
21613 bash_cv_dev_fd=whacky
21614 else
21615 bash_cv_dev_fd=absent
21616 fi
21617fi
d166f048
JA
21618
21619fi
21620
74091dd4
CR
21621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_fd" >&5
21622printf "%s\n" "$bash_cv_dev_fd" >&6; }
d166f048 21623if test $bash_cv_dev_fd = "standard"; then
74091dd4 21624 printf "%s\n" "#define HAVE_DEV_FD 1" >>confdefs.h
d166f048 21625
74091dd4 21626 printf "%s\n" "#define DEV_FD_PREFIX \"/dev/fd/\"" >>confdefs.h
d166f048
JA
21627
21628elif test $bash_cv_dev_fd = "whacky"; then
74091dd4 21629 printf "%s\n" "#define HAVE_DEV_FD 1" >>confdefs.h
d166f048 21630
74091dd4 21631 printf "%s\n" "#define DEV_FD_PREFIX \"/proc/self/fd/\"" >>confdefs.h
d166f048
JA
21632
21633fi
21634
74091dd4
CR
21635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/stdin stdout stderr are available" >&5
21636printf %s "checking whether /dev/stdin stdout stderr are available... " >&6; }
21637if test ${bash_cv_dev_stdin+y}
21638then :
21639 printf %s "(cached) " >&6
21640else $as_nop
d233b485 21641 if (exec test -r /dev/stdin < /dev/null) ; then
bb70624e
JA
21642 bash_cv_dev_stdin=present
21643 else
21644 bash_cv_dev_stdin=absent
21645 fi
21646
21647fi
21648
74091dd4
CR
21649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_stdin" >&5
21650printf "%s\n" "$bash_cv_dev_stdin" >&6; }
bb70624e 21651if test $bash_cv_dev_stdin = "present"; then
74091dd4 21652 printf "%s\n" "#define HAVE_DEV_STDIN 1" >>confdefs.h
bb70624e
JA
21653
21654fi
21655
74091dd4
CR
21656{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5
21657printf %s "checking for default mail directory... " >&6; }
21658if test ${bash_cv_mail_dir+y}
21659then :
21660 printf %s "(cached) " >&6
21661else $as_nop
ccc6cda3
JA
21662 if test -d /var/mail; then
21663 bash_cv_mail_dir=/var/mail
ccc6cda3
JA
21664 elif test -d /var/spool/mail; then
21665 bash_cv_mail_dir=/var/spool/mail
7117c2d2
JA
21666 elif test -d /usr/mail; then
21667 bash_cv_mail_dir=/usr/mail
e8ce775d
JA
21668 elif test -d /usr/spool/mail; then
21669 bash_cv_mail_dir=/usr/spool/mail
ccc6cda3
JA
21670 else
21671 bash_cv_mail_dir=unknown
21672 fi
21673
21674fi
21675
74091dd4
CR
21676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_mail_dir" >&5
21677printf "%s\n" "$bash_cv_mail_dir" >&6; }
21678printf "%s\n" "#define DEFAULT_MAIL_DIRECTORY \"$bash_cv_mail_dir\"" >>confdefs.h
b80f6443
JA
21679
21680
ccc6cda3 21681
ccc6cda3
JA
21682if test "$bash_cv_job_control_missing" = missing; then
21683 opt_job_control=no
21684fi
21685
21686if test "$opt_job_control" = yes; then
74091dd4 21687printf "%s\n" "#define JOB_CONTROL 1" >>confdefs.h
ccc6cda3
JA
21688
21689JOBS_O=jobs.o
21690else
21691JOBS_O=nojobs.o
21692fi
21693
b80f6443
JA
21694
21695
21696
d166f048
JA
21697LOCAL_DEFS=-DSHELL
21698
b80f6443 21699
b72432fd 21700case "${host_os}" in
74091dd4 21701sysv4.2*) printf "%s\n" "#define SVR4_2 1" >>confdefs.h
ccc6cda3 21702
74091dd4 21703 printf "%s\n" "#define SVR4 1" >>confdefs.h
ccc6cda3 21704 ;;
74091dd4 21705sysv4*) printf "%s\n" "#define SVR4 1" >>confdefs.h
ccc6cda3 21706 ;;
74091dd4 21707sysv5*) printf "%s\n" "#define SVR5 1" >>confdefs.h
b72432fd 21708 ;;
8868edaf
CR
21709hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;;
21710hpux*) LOCAL_CFLAGS="-DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;;
ccc6cda3 21711dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
bb70624e
JA
21712isc*) LOCAL_CFLAGS=-Disc386 ;;
21713rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;;
f73dda09 21714darwin*) LOCAL_CFLAGS=-DMACOSX ;;
7117c2d2
JA
21715sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;;
21716sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;;
ccc6cda3 21717sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
d166f048 21718sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
f1be666c 21719solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
17345e5a
JA
21720solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;;
21721solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;;
21722solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;;
f1be666c 21723solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
b72432fd 21724lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
95732b49
JA
21725linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
21726 case "`uname -r`" in
d233b485 21727 1.*|2.[0123]*) : ;;
74091dd4 21728 *) printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h
95732b49
JA
21729 ;;
21730 esac ;;
d233b485 21731netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;;
74091dd4 21732freebsd*|midnightbsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;;
d233b485 21733*qnx[67]*) LOCAL_LIBS="-lncurses" ;;
7117c2d2 21734*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
b72432fd 21735powerux*) LOCAL_LIBS="-lgen" ;;
b80f6443 21736cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
ac50fbac
CR
21737opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;;
21738*openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;;
b72432fd
JA
21739esac
21740
21741case "${host_os}-${CC}" in
21742aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;;
21743aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;
21744bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
a0c0a00f
CR
21745bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
21746hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading
ccc6cda3
JA
21747esac
21748
bb70624e 21749case "${host_os}" in
28ef6c31
JA
21750freebsd[3-9]*)
21751 if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then
bb70624e
JA
21752 LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
21753 fi ;;
28ef6c31 21754freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
95732b49 21755dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
74091dd4 21756midnightbsd*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
bb70624e
JA
21757esac
21758
ccc6cda3
JA
21759case "$host_cpu" in
21760*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
21761esac
21762
21763case "$host_cpu-$host_os" in
21764ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
21765esac
21766
21767case "$host_cpu-$host_vendor-$host_os" in
21768m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
21769mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
21770esac
21771
d233b485 21772# turn off paren warnings in gcc
74091dd4 21773#CFLAGS="$CFLAGS ${STYLE_CFLAGS}"
d233b485 21774
b72432fd
JA
21775#
21776# Shared object configuration section. These values are generated by
21777# ${srcdir}/support/shobj-conf
21778#
21779if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf
21780then
74091dd4
CR
21781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5
21782printf %s "checking shared object configuration for loadable builtins... " >&6; }
28ef6c31 21783 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
f73dda09 21784
b80f6443
JA
21785
21786
21787
21788
21789
21790
74091dd4
CR
21791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5
21792printf "%s\n" "$SHOBJ_STATUS" >&6; }
d233b485
CR
21793else
21794 SHOBJ_STATUS=unsupported
21795
b72432fd
JA
21796fi
21797
ccc6cda3
JA
21798# try to create a directory tree if the source is elsewhere
21799# this should be packaged into a script accessible via ${srcdir}/support
21800case "$srcdir" in
21801.) ;;
cce855bc 21802*) for d in doc tests support lib examples; do # dirs
ccc6cda3
JA
21803 test -d $d || mkdir $d
21804 done
cce855bc 21805 for ld in readline glob tilde malloc sh termcap; do # libdirs
ccc6cda3
JA
21806 test -d lib/$ld || mkdir lib/$ld
21807 done
cce855bc 21808 test -d examples/loadables || mkdir examples/loadables # loadable builtins
bb70624e 21809 test -d examples/loadables/perl || mkdir examples/loadables/perl
ccc6cda3
JA
21810 ;;
21811esac
21812
21813BUILD_DIR=`pwd`
95732b49
JA
21814case "$BUILD_DIR" in
21815*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
21816*) ;;
21817esac
ccc6cda3 21818
3185942a
JA
21819if test -z "$localedir"; then
21820 localedir='${datarootdir}/locale'
21821fi
21822if test -z "$datarootdir"; then
21823 datarootdir='${prefix}/share'
21824fi
21825
21826
21827
21828
b80f6443
JA
21829
21830
3185942a 21831# Some versions of autoconf don't substitute these automatically
b80f6443
JA
21832
21833
21834
a0c0a00f
CR
21835# directory where we install dynamically loadable builtins
21836if test -z "$loadablesdir"; then
21837 loadablesdir='${libdir}/bash'
21838fi
21839
21840if test -z "$headersdir"; then
21841 headersdir='$(includedir)/$(PACKAGE_NAME)'
21842fi
21843
21844
b80f6443
JA
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
d166f048
JA
21863#AC_SUBST(ALLOCA_SOURCE)
21864#AC_SUBST(ALLOCA_OBJECT)
21865
74091dd4
CR
21866ac_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/Makefile.sample examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh"
21867
21868
21869ac_config_commands="$ac_config_commands stamp-h"
3185942a 21870
3185942a 21871
f73dda09 21872cat >confcache <<\_ACEOF
ccc6cda3
JA
21873# This file is a shell script that caches the results of configure
21874# tests run on this system so they can be shared between configure
f73dda09
JA
21875# scripts and configure runs, see configure's option --config-cache.
21876# It is not useful on other systems. If it contains results you don't
21877# want to keep, you may remove or edit it.
726f6388 21878#
f73dda09
JA
21879# config.status only pays attention to the cache file if you give it
21880# the --recheck option to rerun configure.
ccc6cda3 21881#
0628567a 21882# `ac_cv_env_foo' variables (set or unset) will be overridden when
f73dda09
JA
21883# loading this file, other *unset* `ac_cv_foo' will be assigned the
21884# following values.
21885
21886_ACEOF
21887
ccc6cda3
JA
21888# The following way of writing the cache mishandles newlines in values,
21889# but we know of no workaround that is simple, portable, and efficient.
3185942a 21890# So, we kill variables containing newlines.
ccc6cda3
JA
21891# Ultrix sh set writes to stderr and can't be redirected directly,
21892# and sets the high bit in the cache file unless we assign to the vars.
3185942a
JA
21893(
21894 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21895 eval ac_val=\$$ac_var
21896 case $ac_val in #(
21897 *${as_nl}*)
21898 case $ac_var in #(
74091dd4
CR
21899 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21900printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3185942a
JA
21901 esac
21902 case $ac_var in #(
21903 _ | IFS | as_nl) ;; #(
21904 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
ac50fbac 21905 *) { eval $ac_var=; unset $ac_var;} ;;
3185942a
JA
21906 esac ;;
21907 esac
21908 done
21909
f73dda09 21910 (set) 2>&1 |
3185942a
JA
21911 case $as_nl`(ac_space=' '; set) 2>&1` in #(
21912 *${as_nl}ac_space=\ *)
ac50fbac
CR
21913 # `set' does not quote correctly, so add quotes: double-quote
21914 # substitution turns \\\\ into \\, and sed turns \\ into \.
f73dda09 21915 sed -n \
0628567a
JA
21916 "s/'/'\\\\''/g;
21917 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
3185942a 21918 ;; #(
f73dda09
JA
21919 *)
21920 # `set' quotes correctly as required by POSIX, so do not add quotes.
3185942a 21921 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
f73dda09 21922 ;;
3185942a
JA
21923 esac |
21924 sort
21925) |
f73dda09 21926 sed '
3185942a 21927 /^ac_cv_env_/b end
f73dda09 21928 t clear
3185942a 21929 :clear
74091dd4 21930 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
f73dda09 21931 t end
3185942a
JA
21932 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21933 :end' >>confcache
21934if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21935 if test -w "$cache_file"; then
ac50fbac 21936 if test "x$cache_file" != "x/dev/null"; then
74091dd4
CR
21937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21938printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
ac50fbac
CR
21939 if test ! -f "$cache_file" || test -h "$cache_file"; then
21940 cat confcache >"$cache_file"
21941 else
21942 case $cache_file in #(
21943 */* | ?:*)
21944 mv -f confcache "$cache_file"$$ &&
21945 mv -f "$cache_file"$$ "$cache_file" ;; #(
21946 *)
21947 mv -f confcache "$cache_file" ;;
21948 esac
21949 fi
21950 fi
ccc6cda3 21951 else
74091dd4
CR
21952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21953printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
ccc6cda3
JA
21954 fi
21955fi
21956rm -f confcache
21957
ccc6cda3
JA
21958test "x$prefix" = xNONE && prefix=$ac_default_prefix
21959# Let make expand exec_prefix.
21960test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21961
ccc6cda3
JA
21962DEFS=-DHAVE_CONFIG_H
21963
0628567a
JA
21964ac_libobjs=
21965ac_ltlibobjs=
ac50fbac 21966U=
0628567a
JA
21967for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21968 # 1. Remove the extension, and $U if already installed.
3185942a 21969 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
74091dd4 21970 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
3185942a
JA
21971 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
21972 # will be set to the directory where LIBOBJS objects are built.
ac50fbac
CR
21973 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21974 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
0628567a
JA
21975done
21976LIBOBJS=$ac_libobjs
21977
21978LTLIBOBJS=$ac_ltlibobjs
21979
21980
b80f6443 21981
3185942a 21982
ac50fbac 21983: "${CONFIG_STATUS=./config.status}"
3185942a 21984ac_write_fail=0
f73dda09
JA
21985ac_clean_files_save=$ac_clean_files
21986ac_clean_files="$ac_clean_files $CONFIG_STATUS"
74091dd4
CR
21987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21988printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
ac50fbac
CR
21989as_write_fail=0
21990cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
f73dda09 21991#! $SHELL
b80f6443 21992# Generated by $as_me.
ccc6cda3 21993# Run this file to recreate the current configuration.
ccc6cda3 21994# Compiler output produced by configure, useful for debugging
f73dda09 21995# configure, is in config.log if it exists.
ccc6cda3 21996
f73dda09 21997debug=false
0628567a
JA
21998ac_cs_recheck=false
21999ac_cs_silent=false
f73dda09 22000
ac50fbac
CR
22001SHELL=\${CONFIG_SHELL-$SHELL}
22002export SHELL
22003_ASEOF
22004cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
22005## -------------------- ##
22006## M4sh Initialization. ##
22007## -------------------- ##
b80f6443 22008
3185942a
JA
22009# Be more Bourne compatible
22010DUALCASE=1; export DUALCASE # for MKS sh
74091dd4
CR
22011as_nop=:
22012if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22013then :
f73dda09
JA
22014 emulate sh
22015 NULLCMD=:
3185942a 22016 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
0628567a
JA
22017 # is contrary to our usage. Disable this feature.
22018 alias -g '${1+"$@"}'='"$@"'
3185942a 22019 setopt NO_GLOB_SUBST
74091dd4 22020else $as_nop
ac50fbac
CR
22021 case `(set -o) 2>/dev/null` in #(
22022 *posix*) :
22023 set -o posix ;; #(
22024 *) :
22025 ;;
3185942a 22026esac
3185942a
JA
22027fi
22028
22029
74091dd4
CR
22030
22031# Reset variables that may have inherited troublesome values from
22032# the environment.
22033
22034# IFS needs to be set, to space, tab, and newline, in precisely that order.
22035# (If _AS_PATH_WALK were called with IFS unset, it would have the
22036# side effect of setting IFS to empty, thus disabling word splitting.)
22037# Quoting is to prevent editors from complaining about space-tab.
3185942a
JA
22038as_nl='
22039'
22040export as_nl
74091dd4
CR
22041IFS=" "" $as_nl"
22042
22043PS1='$ '
22044PS2='> '
22045PS4='+ '
22046
22047# Ensure predictable behavior from utilities with locale-dependent output.
22048LC_ALL=C
22049export LC_ALL
22050LANGUAGE=C
22051export LANGUAGE
22052
22053# We cannot yet rely on "unset" to work, but we need these variables
22054# to be unset--not just set to an empty or harmless value--now, to
22055# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
22056# also avoids known problems related to "unset" and subshell syntax
22057# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
22058for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
22059do eval test \${$as_var+y} \
22060 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
22061done
22062
22063# Ensure that fds 0, 1, and 2 are open.
22064if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
22065if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
22066if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
3185942a
JA
22067
22068# The user is always right.
74091dd4 22069if ${PATH_SEPARATOR+false} :; then
3185942a
JA
22070 PATH_SEPARATOR=:
22071 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
22072 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
22073 PATH_SEPARATOR=';'
22074 }
f73dda09
JA
22075fi
22076
0628567a 22077
3185942a 22078# Find who we are. Look in the path if we contain no directory separator.
ac50fbac
CR
22079as_myself=
22080case $0 in #((
3185942a
JA
22081 *[\\/]* ) as_myself=$0 ;;
22082 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22083for as_dir in $PATH
22084do
22085 IFS=$as_save_IFS
74091dd4
CR
22086 case $as_dir in #(((
22087 '') as_dir=./ ;;
22088 */) ;;
22089 *) as_dir=$as_dir/ ;;
22090 esac
22091 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
ac50fbac 22092 done
3185942a
JA
22093IFS=$as_save_IFS
22094
22095 ;;
22096esac
22097# We did not find ourselves, most probably we were run as `sh COMMAND'
22098# in which case we are not to be found in the path.
22099if test "x$as_myself" = x; then
22100 as_myself=$0
22101fi
22102if test ! -f "$as_myself"; then
74091dd4 22103 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ac50fbac 22104 exit 1
3185942a
JA
22105fi
22106
ac50fbac
CR
22107
22108
22109# as_fn_error STATUS ERROR [LINENO LOG_FD]
22110# ----------------------------------------
22111# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
22112# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
22113# script with STATUS, using 1 if that was 0.
22114as_fn_error ()
22115{
22116 as_status=$1; test $as_status -eq 0 && as_status=1
22117 if test "$4"; then
22118 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
74091dd4 22119 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
ac50fbac 22120 fi
74091dd4 22121 printf "%s\n" "$as_me: error: $2" >&2
ac50fbac
CR
22122 as_fn_exit $as_status
22123} # as_fn_error
22124
22125
74091dd4 22126
ac50fbac
CR
22127# as_fn_set_status STATUS
22128# -----------------------
22129# Set $? to STATUS, without forking.
22130as_fn_set_status ()
22131{
22132 return $1
22133} # as_fn_set_status
22134
22135# as_fn_exit STATUS
22136# -----------------
22137# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
22138as_fn_exit ()
22139{
22140 set +e
22141 as_fn_set_status $1
22142 exit $1
22143} # as_fn_exit
22144
22145# as_fn_unset VAR
22146# ---------------
22147# Portably unset VAR.
22148as_fn_unset ()
22149{
22150 { eval $1=; unset $1;}
22151}
22152as_unset=as_fn_unset
74091dd4 22153
ac50fbac
CR
22154# as_fn_append VAR VALUE
22155# ----------------------
22156# Append the text in VALUE to the end of the definition contained in VAR. Take
22157# advantage of any shell optimizations that allow amortized linear growth over
22158# repeated appends, instead of the typical quadratic growth present in naive
22159# implementations.
74091dd4
CR
22160if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
22161then :
ac50fbac
CR
22162 eval 'as_fn_append ()
22163 {
22164 eval $1+=\$2
22165 }'
74091dd4 22166else $as_nop
ac50fbac
CR
22167 as_fn_append ()
22168 {
22169 eval $1=\$$1\$2
22170 }
22171fi # as_fn_append
22172
22173# as_fn_arith ARG...
22174# ------------------
22175# Perform arithmetic evaluation on the ARGs, and store the result in the
22176# global $as_val. Take advantage of shells that can avoid forks. The arguments
22177# must be portable across $(()) and expr.
74091dd4
CR
22178if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
22179then :
ac50fbac
CR
22180 eval 'as_fn_arith ()
22181 {
22182 as_val=$(( $* ))
22183 }'
74091dd4 22184else $as_nop
ac50fbac
CR
22185 as_fn_arith ()
22186 {
22187 as_val=`expr "$@" || test $? -eq 1`
22188 }
22189fi # as_fn_arith
22190
22191
3185942a
JA
22192if expr a : '\(a\)' >/dev/null 2>&1 &&
22193 test "X`expr 00001 : '.*\(...\)'`" = X001; then
0628567a
JA
22194 as_expr=expr
22195else
22196 as_expr=false
22197fi
22198
3185942a 22199if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
0628567a
JA
22200 as_basename=basename
22201else
22202 as_basename=false
22203fi
b80f6443 22204
ac50fbac
CR
22205if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22206 as_dirname=dirname
22207else
22208 as_dirname=false
22209fi
b80f6443 22210
3185942a 22211as_me=`$as_basename -- "$0" ||
b80f6443
JA
22212$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22213 X"$0" : 'X\(//\)$' \| \
3185942a 22214 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
74091dd4 22215printf "%s\n" X/"$0" |
3185942a
JA
22216 sed '/^.*\/\([^/][^/]*\)\/*$/{
22217 s//\1/
22218 q
22219 }
22220 /^X\/\(\/\/\)$/{
22221 s//\1/
22222 q
22223 }
22224 /^X\/\(\/\).*/{
22225 s//\1/
22226 q
22227 }
22228 s/.*/./; q'`
b80f6443 22229
ac50fbac
CR
22230# Avoid depending upon Character Ranges.
22231as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22232as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22233as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22234as_cr_digits='0123456789'
22235as_cr_alnum=$as_cr_Letters$as_cr_digits
f73dda09 22236
74091dd4
CR
22237
22238# Determine whether it's possible to make 'echo' print without a newline.
22239# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
22240# for compatibility with existing Makefiles.
3185942a 22241ECHO_C= ECHO_N= ECHO_T=
ac50fbac 22242case `echo -n x` in #(((((
3185942a 22243-n*)
ac50fbac 22244 case `echo 'xy\c'` in
3185942a 22245 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
ac50fbac
CR
22246 xy) ECHO_C='\c';;
22247 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
22248 ECHO_T=' ';;
3185942a
JA
22249 esac;;
22250*)
22251 ECHO_N='-n';;
22252esac
f73dda09 22253
74091dd4
CR
22254# For backward compatibility with old third-party macros, we provide
22255# the shell variables $as_echo and $as_echo_n. New code should use
22256# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
22257as_echo='printf %s\n'
22258as_echo_n='printf %s'
22259
f73dda09 22260rm -f conf$$ conf$$.exe conf$$.file
3185942a
JA
22261if test -d conf$$.dir; then
22262 rm -f conf$$.dir/conf$$.file
22263else
22264 rm -f conf$$.dir
22265 mkdir conf$$.dir 2>/dev/null
22266fi
22267if (echo >conf$$.file) 2>/dev/null; then
22268 if ln -s conf$$.file conf$$ 2>/dev/null; then
f73dda09 22269 as_ln_s='ln -s'
3185942a
JA
22270 # ... but there are two gotchas:
22271 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22272 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
ac50fbac 22273 # In both cases, we have to default to `cp -pR'.
3185942a 22274 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
ac50fbac 22275 as_ln_s='cp -pR'
3185942a
JA
22276 elif ln conf$$.file conf$$ 2>/dev/null; then
22277 as_ln_s=ln
22278 else
ac50fbac 22279 as_ln_s='cp -pR'
f73dda09 22280 fi
f73dda09 22281else
ac50fbac 22282 as_ln_s='cp -pR'
f73dda09 22283fi
3185942a
JA
22284rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22285rmdir conf$$.dir 2>/dev/null
f73dda09 22286
ac50fbac
CR
22287
22288# as_fn_mkdir_p
22289# -------------
22290# Create "$as_dir" as a directory, including parents if necessary.
22291as_fn_mkdir_p ()
22292{
22293
22294 case $as_dir in #(
22295 -*) as_dir=./$as_dir;;
22296 esac
22297 test -d "$as_dir" || eval $as_mkdir_p || {
22298 as_dirs=
22299 while :; do
22300 case $as_dir in #(
74091dd4 22301 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
ac50fbac
CR
22302 *) as_qdir=$as_dir;;
22303 esac
22304 as_dirs="'$as_qdir' $as_dirs"
22305 as_dir=`$as_dirname -- "$as_dir" ||
22306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22307 X"$as_dir" : 'X\(//\)[^/]' \| \
22308 X"$as_dir" : 'X\(//\)$' \| \
22309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
74091dd4 22310printf "%s\n" X"$as_dir" |
ac50fbac
CR
22311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22312 s//\1/
22313 q
22314 }
22315 /^X\(\/\/\)[^/].*/{
22316 s//\1/
22317 q
22318 }
22319 /^X\(\/\/\)$/{
22320 s//\1/
22321 q
22322 }
22323 /^X\(\/\).*/{
22324 s//\1/
22325 q
22326 }
22327 s/.*/./; q'`
22328 test -d "$as_dir" && break
22329 done
22330 test -z "$as_dirs" || eval "mkdir $as_dirs"
22331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
22332
22333
22334} # as_fn_mkdir_p
0628567a 22335if mkdir -p . 2>/dev/null; then
ac50fbac 22336 as_mkdir_p='mkdir -p "$as_dir"'
0628567a
JA
22337else
22338 test -d ./-p && rmdir ./-p
22339 as_mkdir_p=false
22340fi
22341
ac50fbac
CR
22342
22343# as_fn_executable_p FILE
22344# -----------------------
22345# Test if FILE is an executable regular file.
22346as_fn_executable_p ()
22347{
22348 test -f "$1" && test -x "$1"
22349} # as_fn_executable_p
22350as_test_x='test -x'
22351as_executable_p=as_fn_executable_p
b80f6443
JA
22352
22353# Sed expression to map a string onto a valid CPP name.
0628567a 22354as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
b80f6443
JA
22355
22356# Sed expression to map a string onto a valid variable name.
0628567a 22357as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
b80f6443 22358
f73dda09 22359
f73dda09 22360exec 6>&1
ac50fbac
CR
22361## ----------------------------------- ##
22362## Main body of $CONFIG_STATUS script. ##
22363## ----------------------------------- ##
22364_ASEOF
22365test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
f73dda09 22366
ac50fbac
CR
22367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22368# Save the log message, to keep $0 and so on meaningful, and to
b80f6443 22369# report actual input values of CONFIG_FILES etc. instead of their
3185942a
JA
22370# values after options handling.
22371ac_log="
74091dd4
CR
22372This file was extended by bash $as_me 5.2-release, which was
22373generated by GNU Autoconf 2.71. Invocation command line was
b80f6443
JA
22374
22375 CONFIG_FILES = $CONFIG_FILES
22376 CONFIG_HEADERS = $CONFIG_HEADERS
22377 CONFIG_LINKS = $CONFIG_LINKS
22378 CONFIG_COMMANDS = $CONFIG_COMMANDS
22379 $ $0 $@
22380
3185942a
JA
22381on `(hostname || uname -n) 2>/dev/null | sed 1q`
22382"
22383
f73dda09
JA
22384_ACEOF
22385
3185942a
JA
22386case $ac_config_files in *"
22387"*) set x $ac_config_files; shift; ac_config_files=$*;;
22388esac
f73dda09 22389
3185942a
JA
22390case $ac_config_headers in *"
22391"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
22392esac
f73dda09 22393
f73dda09 22394
3185942a
JA
22395cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22396# Files that config.status was made for.
22397config_files="$ac_config_files"
22398config_headers="$ac_config_headers"
22399config_commands="$ac_config_commands"
f73dda09 22400
3185942a 22401_ACEOF
f73dda09 22402
3185942a 22403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09 22404ac_cs_usage="\
ac50fbac
CR
22405\`$as_me' instantiates files and other configuration actions
22406from templates according to the current configuration. Unless the files
22407and actions are specified as TAGs, all are instantiated by default.
f73dda09 22408
ac50fbac 22409Usage: $0 [OPTION]... [TAG]...
f73dda09
JA
22410
22411 -h, --help print this help, then exit
3185942a 22412 -V, --version print version number and configuration settings, then exit
ac50fbac 22413 --config print configuration, then exit
3185942a
JA
22414 -q, --quiet, --silent
22415 do not print progress messages
f73dda09
JA
22416 -d, --debug don't remove temporary files
22417 --recheck update $as_me by reconfiguring in the same conditions
3185942a
JA
22418 --file=FILE[:TEMPLATE]
22419 instantiate the configuration file FILE
22420 --header=FILE[:TEMPLATE]
22421 instantiate the configuration header FILE
f73dda09
JA
22422
22423Configuration files:
22424$config_files
22425
22426Configuration headers:
22427$config_headers
22428
22429Configuration commands:
22430$config_commands
22431
ac50fbac 22432Report bugs to <bug-bash@gnu.org>."
f73dda09 22433
3185942a 22434_ACEOF
74091dd4
CR
22435ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
22436ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
3185942a 22437cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
74091dd4 22438ac_cs_config='$ac_cs_config_escaped'
f73dda09 22439ac_cs_version="\\
74091dd4
CR
22440bash config.status 5.2-release
22441configured by $0, generated by GNU Autoconf 2.71,
ac50fbac 22442 with options \\"\$ac_cs_config\\"
f73dda09 22443
74091dd4 22444Copyright (C) 2021 Free Software Foundation, Inc.
f73dda09
JA
22445This config.status script is free software; the Free Software Foundation
22446gives unlimited permission to copy, distribute and modify it."
3185942a
JA
22447
22448ac_pwd='$ac_pwd'
22449srcdir='$srcdir'
22450INSTALL='$INSTALL'
8868edaf 22451MKDIR_P='$MKDIR_P'
3185942a 22452test -n "\$AWK" || AWK=awk
b80f6443 22453_ACEOF
f73dda09 22454
3185942a
JA
22455cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22456# The default lists apply if the user does not specify any file.
f73dda09
JA
22457ac_need_defaults=:
22458while test $# != 0
ccc6cda3 22459do
f73dda09 22460 case $1 in
ac50fbac 22461 --*=?*)
3185942a
JA
22462 ac_option=`expr "X$1" : 'X\([^=]*\)='`
22463 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
0628567a
JA
22464 ac_shift=:
22465 ;;
ac50fbac
CR
22466 --*=)
22467 ac_option=`expr "X$1" : 'X\([^=]*\)='`
22468 ac_optarg=
22469 ac_shift=:
22470 ;;
3185942a 22471 *)
0628567a
JA
22472 ac_option=$1
22473 ac_optarg=$2
22474 ac_shift=shift
f73dda09 22475 ;;
f73dda09
JA
22476 esac
22477
0628567a 22478 case $ac_option in
f73dda09 22479 # Handling of the options.
0628567a
JA
22480 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22481 ac_cs_recheck=: ;;
3185942a 22482 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
74091dd4 22483 printf "%s\n" "$ac_cs_version"; exit ;;
ac50fbac 22484 --config | --confi | --conf | --con | --co | --c )
74091dd4 22485 printf "%s\n" "$ac_cs_config"; exit ;;
3185942a 22486 --debug | --debu | --deb | --de | --d | -d )
f73dda09
JA
22487 debug=: ;;
22488 --file | --fil | --fi | --f )
0628567a 22489 $ac_shift
3185942a 22490 case $ac_optarg in
74091dd4 22491 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
ac50fbac 22492 '') as_fn_error $? "missing file argument" ;;
3185942a 22493 esac
ac50fbac 22494 as_fn_append CONFIG_FILES " '$ac_optarg'"
f73dda09
JA
22495 ac_need_defaults=false;;
22496 --header | --heade | --head | --hea )
0628567a 22497 $ac_shift
3185942a 22498 case $ac_optarg in
74091dd4 22499 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
3185942a 22500 esac
ac50fbac 22501 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
f73dda09 22502 ac_need_defaults=false;;
3185942a
JA
22503 --he | --h)
22504 # Conflict between --help and --header
ac50fbac
CR
22505 as_fn_error $? "ambiguous option: \`$1'
22506Try \`$0 --help' for more information.";;
3185942a 22507 --help | --hel | -h )
74091dd4 22508 printf "%s\n" "$ac_cs_usage"; exit ;;
0628567a
JA
22509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22510 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22511 ac_cs_silent=: ;;
f73dda09
JA
22512
22513 # This is an error.
ac50fbac
CR
22514 -*) as_fn_error $? "unrecognized option: \`$1'
22515Try \`$0 --help' for more information." ;;
f73dda09 22516
ac50fbac 22517 *) as_fn_append ac_config_targets " $1"
3185942a 22518 ac_need_defaults=false ;;
f73dda09 22519
ccc6cda3 22520 esac
f73dda09 22521 shift
ccc6cda3
JA
22522done
22523
0628567a
JA
22524ac_configure_extra_args=
22525
22526if $ac_cs_silent; then
22527 exec 6>/dev/null
22528 ac_configure_extra_args="$ac_configure_extra_args --silent"
22529fi
22530
22531_ACEOF
3185942a 22532cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
0628567a 22533if \$ac_cs_recheck; then
ac50fbac 22534 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
3185942a 22535 shift
74091dd4 22536 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
3185942a
JA
22537 CONFIG_SHELL='$SHELL'
22538 export CONFIG_SHELL
22539 exec "\$@"
0628567a
JA
22540fi
22541
b80f6443 22542_ACEOF
3185942a
JA
22543cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22544exec 5>>config.log
22545{
22546 echo
22547 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22548## Running $as_me. ##
22549_ASBOX
74091dd4 22550 printf "%s\n" "$ac_log"
3185942a 22551} >&5
b80f6443 22552
3185942a
JA
22553_ACEOF
22554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
b80f6443 22555#
3185942a 22556# INIT-COMMANDS
b80f6443 22557#
b80f6443 22558# Capture the value of obsolete ALL_LINGUAS because we need it to compute
8868edaf
CR
22559 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
22560 OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
b80f6443
JA
22561 # Capture the value of LINGUAS because we need it to compute CATALOGS.
22562 LINGUAS="${LINGUAS-%UNSET%}"
f73dda09 22563
f73dda09
JA
22564
22565_ACEOF
ccc6cda3 22566
3185942a 22567cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
b80f6443 22568
3185942a 22569# Handling of arguments.
f73dda09
JA
22570for ac_config_target in $ac_config_targets
22571do
3185942a
JA
22572 case $ac_config_target in
22573 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
8868edaf 22574 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
3185942a
JA
22575 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22576 "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;;
22577 "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;;
22578 "lib/glob/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;;
22579 "lib/intl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;;
22580 "lib/malloc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;;
22581 "lib/sh/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;;
22582 "lib/termcap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;;
22583 "lib/tilde/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;;
22584 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
22585 "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;;
22586 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
22587 "examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;;
a0c0a00f 22588 "examples/loadables/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;;
74091dd4 22589 "examples/loadables/Makefile.sample") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.sample" ;;
3185942a 22590 "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;;
a0c0a00f 22591 "support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;;
d233b485 22592 "support/bashbug.sh") CONFIG_FILES="$CONFIG_FILES support/bashbug.sh" ;;
74091dd4 22593 "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
3185942a 22594
ac50fbac 22595 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
f73dda09
JA
22596 esac
22597done
22598
3185942a 22599
f73dda09
JA
22600# If the user did not use the arguments to specify the items to instantiate,
22601# then the envvar interface is used. Set only those that are not.
22602# We use the long form for the default assignment because of an extremely
22603# bizarre bug on SunOS 4.1.3.
22604if $ac_need_defaults; then
74091dd4
CR
22605 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
22606 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
22607 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
f73dda09
JA
22608fi
22609
0628567a 22610# Have a temporary directory for convenience. Make it in the build tree
3185942a 22611# simply because there is no reason against having it here, and in addition,
0628567a 22612# creating and moving files from /tmp can sometimes cause problems.
3185942a
JA
22613# Hook for its removal unless debugging.
22614# Note that there is a small window in which the directory will not be cleaned:
22615# after its creation but before its name has been assigned to `$tmp'.
f73dda09
JA
22616$debug ||
22617{
ac50fbac 22618 tmp= ac_tmp=
3185942a 22619 trap 'exit_status=$?
ac50fbac
CR
22620 : "${ac_tmp:=$tmp}"
22621 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
3185942a 22622' 0
ac50fbac 22623 trap 'as_fn_exit 1' 1 2 13 15
f73dda09 22624}
f73dda09 22625# Create a (secure) tmp directory for tmp files.
0628567a 22626
f73dda09 22627{
3185942a 22628 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
ac50fbac 22629 test -d "$tmp"
f73dda09
JA
22630} ||
22631{
3185942a
JA
22632 tmp=./conf$$-$RANDOM
22633 (umask 077 && mkdir "$tmp")
ac50fbac
CR
22634} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
22635ac_tmp=$tmp
ccc6cda3 22636
3185942a
JA
22637# Set up the scripts for CONFIG_FILES section.
22638# No need to generate them if there are no CONFIG_FILES.
22639# This happens for instance with `./config.status config.h'.
22640if test -n "$CONFIG_FILES"; then
22641
22642
ac50fbac
CR
22643ac_cr=`echo X | tr X '\015'`
22644# On cygwin, bash can eat \r inside `` if the user requested igncr.
22645# But we know of no other shell where ac_cr would be empty at this
22646# point, so we can use a bashism as a fallback.
22647if test "x$ac_cr" = x; then
22648 eval ac_cr=\$\'\\r\'
22649fi
3185942a
JA
22650ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22651if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
22652 ac_cs_awk_cr='\\r'
22653else
22654 ac_cs_awk_cr=$ac_cr
22655fi
22656
ac50fbac 22657echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
b80f6443 22658_ACEOF
ccc6cda3 22659
ccc6cda3 22660
3185942a
JA
22661{
22662 echo "cat >conf$$subs.awk <<_ACEOF" &&
22663 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22664 echo "_ACEOF"
22665} >conf$$subs.sh ||
ac50fbac
CR
22666 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22667ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
3185942a
JA
22668ac_delim='%!_!# '
22669for ac_last_try in false false false false false :; do
22670 . ./conf$$subs.sh ||
ac50fbac 22671 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
f73dda09 22672
3185942a
JA
22673 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22674 if test $ac_delim_n = $ac_delim_num; then
22675 break
22676 elif $ac_last_try; then
ac50fbac 22677 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
3185942a
JA
22678 else
22679 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
ccc6cda3 22680 fi
3185942a
JA
22681done
22682rm -f conf$$subs.sh
22683
22684cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac50fbac 22685cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
3185942a
JA
22686_ACEOF
22687sed -n '
22688h
22689s/^/S["/; s/!.*/"]=/
22690p
22691g
22692s/^[^!]*!//
22693:repl
22694t repl
22695s/'"$ac_delim"'$//
22696t delim
22697:nl
22698h
ac50fbac 22699s/\(.\{148\}\)..*/\1/
3185942a
JA
22700t more1
22701s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22702p
22703n
22704b repl
22705:more1
22706s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22707p
22708g
22709s/.\{148\}//
22710t nl
22711:delim
22712h
ac50fbac 22713s/\(.\{148\}\)..*/\1/
3185942a
JA
22714t more2
22715s/["\\]/\\&/g; s/^/"/; s/$/"/
22716p
22717b
22718:more2
22719s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22720p
22721g
22722s/.\{148\}//
22723t delim
22724' <conf$$subs.awk | sed '
22725/^[^""]/{
22726 N
22727 s/\n//
22728}
22729' >>$CONFIG_STATUS || ac_write_fail=1
22730rm -f conf$$subs.awk
22731cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22732_ACAWK
ac50fbac 22733cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
3185942a
JA
22734 for (key in S) S_is_set[key] = 1
22735 FS = "\a"
22736
22737}
22738{
22739 line = $ 0
22740 nfields = split(line, field, "@")
22741 substed = 0
22742 len = length(field[1])
22743 for (i = 2; i < nfields; i++) {
22744 key = field[i]
22745 keylen = length(key)
22746 if (S_is_set[key]) {
22747 value = S[key]
22748 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22749 len += length(value) + length(field[++i])
22750 substed = 1
22751 } else
22752 len += 1 + keylen
22753 }
22754
22755 print line
22756}
22757
22758_ACAWK
22759_ACEOF
22760cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22761if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22762 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22763else
22764 cat
ac50fbac
CR
22765fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22766 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
3185942a
JA
22767_ACEOF
22768
ac50fbac
CR
22769# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22770# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
3185942a
JA
22771# trailing colons and then remove the whole line if VPATH becomes empty
22772# (actually we leave an empty line to preserve line numbers).
22773if test "x$srcdir" = x.; then
ac50fbac
CR
22774 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
22775h
22776s///
22777s/^/:/
22778s/[ ]*$/:/
22779s/:\$(srcdir):/:/g
22780s/:\${srcdir}:/:/g
22781s/:@srcdir@:/:/g
22782s/^:*//
3185942a 22783s/:*$//
ac50fbac
CR
22784x
22785s/\(=[ ]*\).*/\1/
22786G
22787s/\n//
3185942a
JA
22788s/^[^=]*=[ ]*$//
22789}'
22790fi
22791
22792cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09 22793fi # test -n "$CONFIG_FILES"
ccc6cda3 22794
3185942a
JA
22795# Set up the scripts for CONFIG_HEADERS section.
22796# No need to generate them if there are no CONFIG_HEADERS.
22797# This happens for instance with `./config.status Makefile'.
22798if test -n "$CONFIG_HEADERS"; then
ac50fbac 22799cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
3185942a 22800BEGIN {
b80f6443 22801_ACEOF
3185942a
JA
22802
22803# Transform confdefs.h into an awk script `defines.awk', embedded as
22804# here-document in config.status, that substitutes the proper values into
22805# config.h.in to produce config.h.
22806
22807# Create a delimiter string that does not exist in confdefs.h, to ease
22808# handling of long lines.
22809ac_delim='%!_!# '
22810for ac_last_try in false false :; do
ac50fbac
CR
22811 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22812 if test -z "$ac_tt"; then
3185942a
JA
22813 break
22814 elif $ac_last_try; then
ac50fbac 22815 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
3185942a
JA
22816 else
22817 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22818 fi
22819done
22820
22821# For the awk script, D is an array of macro values keyed by name,
22822# likewise P contains macro parameters if any. Preserve backslash
22823# newline sequences.
22824
22825ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22826sed -n '
22827s/.\{148\}/&'"$ac_delim"'/g
22828t rset
22829:rset
22830s/^[ ]*#[ ]*define[ ][ ]*/ /
22831t def
22832d
22833:def
22834s/\\$//
22835t bsnl
22836s/["\\]/\\&/g
22837s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
22838D["\1"]=" \3"/p
22839s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
22840d
22841:bsnl
22842s/["\\]/\\&/g
22843s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
22844D["\1"]=" \3\\\\\\n"\\/p
22845t cont
22846s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22847t cont
22848d
22849:cont
22850n
22851s/.\{148\}/&'"$ac_delim"'/g
22852t clear
22853:clear
22854s/\\$//
22855t bsnlc
22856s/["\\]/\\&/g; s/^/"/; s/$/"/p
22857d
22858:bsnlc
22859s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22860b cont
22861' <confdefs.h | sed '
22862s/'"$ac_delim"'/"\\\
22863"/g' >>$CONFIG_STATUS || ac_write_fail=1
22864
22865cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22866 for (key in D) D_is_set[key] = 1
22867 FS = "\a"
22868}
22869/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22870 line = \$ 0
22871 split(line, arg, " ")
22872 if (arg[1] == "#") {
22873 defundef = arg[2]
22874 mac1 = arg[3]
22875 } else {
22876 defundef = substr(arg[1], 2)
22877 mac1 = arg[2]
22878 }
22879 split(mac1, mac2, "(") #)
22880 macro = mac2[1]
22881 prefix = substr(line, 1, index(line, defundef) - 1)
22882 if (D_is_set[macro]) {
22883 # Preserve the white space surrounding the "#".
22884 print prefix "define", macro P[macro] D[macro]
22885 next
22886 } else {
22887 # Replace #undef with comments. This is necessary, for example,
22888 # in the case of _POSIX_SOURCE, which is predefined and required
22889 # on some systems where configure will not decide to define it.
22890 if (defundef == "undef") {
22891 print "/*", prefix defundef, macro, "*/"
22892 next
22893 }
22894 }
22895}
22896{ print }
22897_ACAWK
22898_ACEOF
22899cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac50fbac 22900 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
3185942a
JA
22901fi # test -n "$CONFIG_HEADERS"
22902
22903
22904eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
22905shift
22906for ac_tag
22907do
22908 case $ac_tag in
22909 :[FHLC]) ac_mode=$ac_tag; continue;;
22910 esac
22911 case $ac_mode$ac_tag in
22912 :[FHL]*:*);;
ac50fbac 22913 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
3185942a
JA
22914 :[FH]-) ac_tag=-:-;;
22915 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22916 esac
22917 ac_save_IFS=$IFS
22918 IFS=:
22919 set x $ac_tag
22920 IFS=$ac_save_IFS
22921 shift
22922 ac_file=$1
22923 shift
22924
22925 case $ac_mode in
22926 :L) ac_source=$1;;
22927 :[FH])
22928 ac_file_inputs=
22929 for ac_f
22930 do
22931 case $ac_f in
ac50fbac 22932 -) ac_f="$ac_tmp/stdin";;
3185942a
JA
22933 *) # Look for the file first in the build tree, then in the source tree
22934 # (if the path is not absolute). The absolute path cannot be DOS-style,
22935 # because $ac_f cannot contain `:'.
22936 test -f "$ac_f" ||
22937 case $ac_f in
22938 [\\/$]*) false;;
22939 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22940 esac ||
ac50fbac 22941 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
3185942a 22942 esac
74091dd4 22943 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
ac50fbac 22944 as_fn_append ac_file_inputs " '$ac_f'"
3185942a
JA
22945 done
22946
22947 # Let's still pretend it is `configure' which instantiates (i.e., don't
22948 # use $as_me), people would be surprised to read:
22949 # /* config.h. Generated by config.status. */
22950 configure_input='Generated from '`
74091dd4 22951 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
3185942a
JA
22952 `' by configure.'
22953 if test x"$ac_file" != x-; then
22954 configure_input="$ac_file. $configure_input"
74091dd4
CR
22955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22956printf "%s\n" "$as_me: creating $ac_file" >&6;}
3185942a
JA
22957 fi
22958 # Neutralize special characters interpreted by sed in replacement strings.
22959 case $configure_input in #(
22960 *\&* | *\|* | *\\* )
74091dd4 22961 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
3185942a
JA
22962 sed 's/[\\\\&|]/\\\\&/g'`;; #(
22963 *) ac_sed_conf_input=$configure_input;;
22964 esac
22965
22966 case $ac_tag in
ac50fbac
CR
22967 *:-:* | *:-) cat >"$ac_tmp/stdin" \
22968 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
3185942a
JA
22969 esac
22970 ;;
ccc6cda3
JA
22971 esac
22972
3185942a 22973 ac_dir=`$as_dirname -- "$ac_file" ||
b80f6443 22974$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
0628567a
JA
22975 X"$ac_file" : 'X\(//\)[^/]' \| \
22976 X"$ac_file" : 'X\(//\)$' \| \
3185942a 22977 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
74091dd4 22978printf "%s\n" X"$ac_file" |
3185942a
JA
22979 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22980 s//\1/
22981 q
22982 }
22983 /^X\(\/\/\)[^/].*/{
22984 s//\1/
22985 q
22986 }
22987 /^X\(\/\/\)$/{
22988 s//\1/
22989 q
22990 }
22991 /^X\(\/\).*/{
22992 s//\1/
22993 q
22994 }
22995 s/.*/./; q'`
ac50fbac 22996 as_dir="$ac_dir"; as_fn_mkdir_p
b80f6443
JA
22997 ac_builddir=.
22998
3185942a
JA
22999case "$ac_dir" in
23000.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23001*)
74091dd4 23002 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
3185942a 23003 # A ".." for each directory in $ac_dir_suffix.
74091dd4 23004 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
3185942a
JA
23005 case $ac_top_builddir_sub in
23006 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23007 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23008 esac ;;
23009esac
23010ac_abs_top_builddir=$ac_pwd
23011ac_abs_builddir=$ac_pwd$ac_dir_suffix
23012# for backward compatibility:
23013ac_top_builddir=$ac_top_build_prefix
b80f6443
JA
23014
23015case $srcdir in
3185942a 23016 .) # We are building in place.
b80f6443 23017 ac_srcdir=.
3185942a
JA
23018 ac_top_srcdir=$ac_top_builddir_sub
23019 ac_abs_top_srcdir=$ac_pwd ;;
23020 [\\/]* | ?:[\\/]* ) # Absolute name.
b80f6443 23021 ac_srcdir=$srcdir$ac_dir_suffix;
3185942a
JA
23022 ac_top_srcdir=$srcdir
23023 ac_abs_top_srcdir=$srcdir ;;
23024 *) # Relative name.
23025 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23026 ac_top_srcdir=$ac_top_build_prefix$srcdir
23027 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
b80f6443 23028esac
3185942a 23029ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
0628567a 23030
b80f6443 23031
3185942a
JA
23032 case $ac_mode in
23033 :F)
23034 #
23035 # CONFIG_FILE
23036 #
ccc6cda3 23037
f73dda09
JA
23038 case $INSTALL in
23039 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
3185942a 23040 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ccc6cda3 23041 esac
8868edaf
CR
23042 ac_MKDIR_P=$MKDIR_P
23043 case $MKDIR_P in
23044 [\\/$]* | ?:[\\/]* ) ;;
23045 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
23046 esac
3185942a 23047_ACEOF
ccc6cda3 23048
3185942a
JA
23049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23050# If the template does not know about datarootdir, expand it.
23051# FIXME: This hack should be removed a few years after 2.60.
23052ac_datarootdir_hack=; ac_datarootdir_seen=
3185942a
JA
23053ac_sed_dataroot='
23054/datarootdir/ {
23055 p
23056 q
23057}
23058/@datadir@/p
23059/@docdir@/p
23060/@infodir@/p
23061/@localedir@/p
ac50fbac 23062/@mandir@/p'
3185942a
JA
23063case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
23064*datarootdir*) ac_datarootdir_seen=yes;;
23065*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
74091dd4
CR
23066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23067printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
3185942a
JA
23068_ACEOF
23069cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23070 ac_datarootdir_hack='
23071 s&@datadir@&$datadir&g
23072 s&@docdir@&$docdir&g
23073 s&@infodir@&$infodir&g
23074 s&@localedir@&$localedir&g
23075 s&@mandir@&$mandir&g
ac50fbac 23076 s&\\\${datarootdir}&$datarootdir&g' ;;
3185942a 23077esac
b80f6443 23078_ACEOF
3185942a
JA
23079
23080# Neutralize VPATH when `$srcdir' = `.'.
23081# Shell code in configure.ac might set extrasub.
23082# FIXME: do we really want to maintain this feature?
23083cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23084ac_sed_extra="$ac_vpsub
f73dda09 23085$extrasub
b80f6443 23086_ACEOF
3185942a 23087cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
f73dda09
JA
23088:t
23089/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
3185942a
JA
23090s|@configure_input@|$ac_sed_conf_input|;t t
23091s&@top_builddir@&$ac_top_builddir_sub&;t t
23092s&@top_build_prefix@&$ac_top_build_prefix&;t t
23093s&@srcdir@&$ac_srcdir&;t t
23094s&@abs_srcdir@&$ac_abs_srcdir&;t t
23095s&@top_srcdir@&$ac_top_srcdir&;t t
23096s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23097s&@builddir@&$ac_builddir&;t t
23098s&@abs_builddir@&$ac_abs_builddir&;t t
23099s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23100s&@INSTALL@&$ac_INSTALL&;t t
8868edaf 23101s&@MKDIR_P@&$ac_MKDIR_P&;t t
3185942a
JA
23102$ac_datarootdir_hack
23103"
ac50fbac
CR
23104eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
23105 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ccc6cda3 23106
3185942a 23107test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
ac50fbac
CR
23108 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
23109 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
23110 "$ac_tmp/out"`; test -z "$ac_out"; } &&
74091dd4 23111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ac50fbac 23112which seems to be undefined. Please make sure it is defined" >&5
74091dd4 23113printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ac50fbac 23114which seems to be undefined. Please make sure it is defined" >&2;}
ccc6cda3 23115
ac50fbac 23116 rm -f "$ac_tmp/stdin"
f73dda09 23117 case $ac_file in
ac50fbac
CR
23118 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
23119 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
3185942a 23120 esac \
ac50fbac 23121 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
3185942a
JA
23122 ;;
23123 :H)
23124 #
23125 # CONFIG_HEADER
23126 #
f73dda09 23127 if test x"$ac_file" != x-; then
3185942a 23128 {
74091dd4 23129 printf "%s\n" "/* $configure_input */" >&1 \
ac50fbac
CR
23130 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
23131 } >"$ac_tmp/config.h" \
23132 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
23133 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
74091dd4
CR
23134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
23135printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
f73dda09 23136 else
3185942a 23137 rm -f "$ac_file"
ac50fbac
CR
23138 mv "$ac_tmp/config.h" "$ac_file" \
23139 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ccc6cda3 23140 fi
f73dda09 23141 else
74091dd4 23142 printf "%s\n" "/* $configure_input */" >&1 \
ac50fbac
CR
23143 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
23144 || as_fn_error $? "could not create -" "$LINENO" 5
ccc6cda3 23145 fi
3185942a 23146 ;;
0628567a 23147
74091dd4
CR
23148 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
23149printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
3185942a
JA
23150 ;;
23151 esac
b80f6443 23152
ccc6cda3 23153
3185942a 23154 case $ac_file$ac_mode in
8868edaf 23155 "po-directories":C)
b80f6443
JA
23156 for ac_file in $CONFIG_FILES; do
23157 # Support "outfile[:infile[:infile...]]"
23158 case "$ac_file" in
23159 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23160 esac
23161 # PO directories have a Makefile.in generated from Makefile.in.in.
23162 case "$ac_file" in */Makefile.in)
23163 # Adjust a relative srcdir.
23164 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8868edaf 23165 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
b80f6443
JA
23166 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
23167 # In autoconf-2.13 it is called $ac_given_srcdir.
23168 # In autoconf-2.50 it is called $srcdir.
23169 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
23170 case "$ac_given_srcdir" in
23171 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
23172 /*) top_srcdir="$ac_given_srcdir" ;;
23173 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
23174 esac
8868edaf
CR
23175 # Treat a directory as a PO directory if and only if it has a
23176 # POTFILES.in file. This allows packages to have multiple PO
23177 # directories under different names or in different locations.
b80f6443
JA
23178 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
23179 rm -f "$ac_dir/POTFILES"
23180 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8868edaf
CR
23181 gt_tab=`printf '\t'`
23182 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
b80f6443 23183 POMAKEFILEDEPS="POTFILES.in"
8868edaf 23184 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
b80f6443
JA
23185 # on $ac_dir but don't depend on user-specified configuration
23186 # parameters.
23187 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
23188 # The LINGUAS file contains the set of available languages.
23189 if test -n "$OBSOLETE_ALL_LINGUAS"; then
23190 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
23191 fi
8868edaf 23192 ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
b80f6443
JA
23193 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
23194 else
23195 # The set of available languages was given in configure.in.
8868edaf 23196 ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
b80f6443 23197 fi
8868edaf
CR
23198 # Compute POFILES
23199 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
23200 # Compute UPDATEPOFILES
23201 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
23202 # Compute DUMMYPOFILES
23203 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
23204 # Compute GMOFILES
23205 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
b80f6443
JA
23206 case "$ac_given_srcdir" in
23207 .) srcdirpre= ;;
23208 *) srcdirpre='$(srcdir)/' ;;
23209 esac
23210 POFILES=
b80f6443
JA
23211 UPDATEPOFILES=
23212 DUMMYPOFILES=
8868edaf 23213 GMOFILES=
b80f6443
JA
23214 for lang in $ALL_LINGUAS; do
23215 POFILES="$POFILES $srcdirpre$lang.po"
b80f6443
JA
23216 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
23217 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
8868edaf 23218 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
b80f6443
JA
23219 done
23220 # CATALOGS depends on both $ac_dir and the user's LINGUAS
23221 # environment variable.
23222 INST_LINGUAS=
23223 if test -n "$ALL_LINGUAS"; then
23224 for presentlang in $ALL_LINGUAS; do
23225 useit=no
23226 if test "%UNSET%" != "$LINGUAS"; then
23227 desiredlanguages="$LINGUAS"
23228 else
23229 desiredlanguages="$ALL_LINGUAS"
23230 fi
23231 for desiredlang in $desiredlanguages; do
23232 # Use the presentlang catalog if desiredlang is
23233 # a. equal to presentlang, or
23234 # b. a variant of presentlang (because in this case,
23235 # presentlang can be used as a fallback for messages
23236 # which are not translated in the desiredlang catalog).
23237 case "$desiredlang" in
23238 "$presentlang"*) useit=yes;;
23239 esac
23240 done
23241 if test $useit = yes; then
23242 INST_LINGUAS="$INST_LINGUAS $presentlang"
23243 fi
23244 done
23245 fi
23246 CATALOGS=
23247 if test -n "$INST_LINGUAS"; then
23248 for lang in $INST_LINGUAS; do
23249 CATALOGS="$CATALOGS $lang.gmo"
23250 done
23251 fi
23252 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8868edaf 23253 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
b80f6443
JA
23254 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
23255 if test -f "$f"; then
23256 case "$f" in
23257 *.orig | *.bak | *~) ;;
23258 *) cat "$f" >> "$ac_dir/Makefile" ;;
23259 esac
23260 fi
23261 done
23262 fi
23263 ;;
23264 esac
23265 done ;;
74091dd4 23266 "stamp-h":C) echo timestamp > stamp-h ;;
3185942a 23267
f73dda09 23268 esac
3185942a 23269done # for ac_tag
ccc6cda3 23270
f73dda09 23271
ac50fbac 23272as_fn_exit 0
b80f6443 23273_ACEOF
f73dda09
JA
23274ac_clean_files=$ac_clean_files_save
23275
3185942a 23276test $ac_write_fail = 0 ||
ac50fbac 23277 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
3185942a 23278
b80f6443 23279
f73dda09
JA
23280# configure is writing to config.log, and then calls config.status.
23281# config.status does its own redirection, appending to config.log.
23282# Unfortunately, on DOS this fails, as config.log is still kept open
23283# by configure, so config.status won't be able to write to it; its
23284# output is simply discarded. So we exec the FD to /dev/null,
23285# effectively closing config.log, so it can be properly (re)opened and
23286# appended to by config.status. When coming back to configure, we
23287# need to make the FD available again.
23288if test "$no_create" != yes; then
23289 ac_cs_success=:
0628567a
JA
23290 ac_config_status_args=
23291 test "$silent" = yes &&
23292 ac_config_status_args="$ac_config_status_args --quiet"
f73dda09 23293 exec 5>/dev/null
0628567a 23294 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
f73dda09
JA
23295 exec 5>>config.log
23296 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23297 # would make configure fail if this is the last instruction.
ac50fbac 23298 $ac_cs_success || as_fn_exit 1
f73dda09 23299fi
3185942a 23300if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
74091dd4
CR
23301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23302printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
3185942a 23303fi
ccc6cda3 23304
74091dd4 23305